{-# 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.SecurityHub.Types.AwsEcrContainerImageDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsEcrContainerImageDetails = AwsEcrContainerImageDetails'
{
AwsEcrContainerImageDetails -> Maybe Text
registryId :: Prelude.Maybe Prelude.Text,
AwsEcrContainerImageDetails -> Maybe [Text]
imageTags :: Prelude.Maybe [Prelude.Text],
AwsEcrContainerImageDetails -> Maybe Text
imageDigest :: Prelude.Maybe Prelude.Text,
AwsEcrContainerImageDetails -> Maybe Text
imagePublishedAt :: Prelude.Maybe Prelude.Text,
AwsEcrContainerImageDetails -> Maybe Text
architecture :: Prelude.Maybe Prelude.Text,
AwsEcrContainerImageDetails -> Maybe Text
repositoryName :: Prelude.Maybe Prelude.Text
}
deriving (AwsEcrContainerImageDetails -> AwsEcrContainerImageDetails -> Bool
(AwsEcrContainerImageDetails
-> AwsEcrContainerImageDetails -> Bool)
-> (AwsEcrContainerImageDetails
-> AwsEcrContainerImageDetails -> Bool)
-> Eq AwsEcrContainerImageDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEcrContainerImageDetails -> AwsEcrContainerImageDetails -> Bool
$c/= :: AwsEcrContainerImageDetails -> AwsEcrContainerImageDetails -> Bool
== :: AwsEcrContainerImageDetails -> AwsEcrContainerImageDetails -> Bool
$c== :: AwsEcrContainerImageDetails -> AwsEcrContainerImageDetails -> Bool
Prelude.Eq, ReadPrec [AwsEcrContainerImageDetails]
ReadPrec AwsEcrContainerImageDetails
Int -> ReadS AwsEcrContainerImageDetails
ReadS [AwsEcrContainerImageDetails]
(Int -> ReadS AwsEcrContainerImageDetails)
-> ReadS [AwsEcrContainerImageDetails]
-> ReadPrec AwsEcrContainerImageDetails
-> ReadPrec [AwsEcrContainerImageDetails]
-> Read AwsEcrContainerImageDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsEcrContainerImageDetails]
$creadListPrec :: ReadPrec [AwsEcrContainerImageDetails]
readPrec :: ReadPrec AwsEcrContainerImageDetails
$creadPrec :: ReadPrec AwsEcrContainerImageDetails
readList :: ReadS [AwsEcrContainerImageDetails]
$creadList :: ReadS [AwsEcrContainerImageDetails]
readsPrec :: Int -> ReadS AwsEcrContainerImageDetails
$creadsPrec :: Int -> ReadS AwsEcrContainerImageDetails
Prelude.Read, Int -> AwsEcrContainerImageDetails -> ShowS
[AwsEcrContainerImageDetails] -> ShowS
AwsEcrContainerImageDetails -> String
(Int -> AwsEcrContainerImageDetails -> ShowS)
-> (AwsEcrContainerImageDetails -> String)
-> ([AwsEcrContainerImageDetails] -> ShowS)
-> Show AwsEcrContainerImageDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEcrContainerImageDetails] -> ShowS
$cshowList :: [AwsEcrContainerImageDetails] -> ShowS
show :: AwsEcrContainerImageDetails -> String
$cshow :: AwsEcrContainerImageDetails -> String
showsPrec :: Int -> AwsEcrContainerImageDetails -> ShowS
$cshowsPrec :: Int -> AwsEcrContainerImageDetails -> ShowS
Prelude.Show, (forall x.
AwsEcrContainerImageDetails -> Rep AwsEcrContainerImageDetails x)
-> (forall x.
Rep AwsEcrContainerImageDetails x -> AwsEcrContainerImageDetails)
-> Generic AwsEcrContainerImageDetails
forall x.
Rep AwsEcrContainerImageDetails x -> AwsEcrContainerImageDetails
forall x.
AwsEcrContainerImageDetails -> Rep AwsEcrContainerImageDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsEcrContainerImageDetails x -> AwsEcrContainerImageDetails
$cfrom :: forall x.
AwsEcrContainerImageDetails -> Rep AwsEcrContainerImageDetails x
Prelude.Generic)
newAwsEcrContainerImageDetails ::
AwsEcrContainerImageDetails
newAwsEcrContainerImageDetails :: AwsEcrContainerImageDetails
newAwsEcrContainerImageDetails =
AwsEcrContainerImageDetails' :: Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsEcrContainerImageDetails
AwsEcrContainerImageDetails'
{ $sel:registryId:AwsEcrContainerImageDetails' :: Maybe Text
registryId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:imageTags:AwsEcrContainerImageDetails' :: Maybe [Text]
imageTags = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:imageDigest:AwsEcrContainerImageDetails' :: Maybe Text
imageDigest = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:imagePublishedAt:AwsEcrContainerImageDetails' :: Maybe Text
imagePublishedAt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:architecture:AwsEcrContainerImageDetails' :: Maybe Text
architecture = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:repositoryName:AwsEcrContainerImageDetails' :: Maybe Text
repositoryName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsEcrContainerImageDetails_registryId :: Lens.Lens' AwsEcrContainerImageDetails (Prelude.Maybe Prelude.Text)
awsEcrContainerImageDetails_registryId :: (Maybe Text -> f (Maybe Text))
-> AwsEcrContainerImageDetails -> f AwsEcrContainerImageDetails
awsEcrContainerImageDetails_registryId = (AwsEcrContainerImageDetails -> Maybe Text)
-> (AwsEcrContainerImageDetails
-> Maybe Text -> AwsEcrContainerImageDetails)
-> Lens
AwsEcrContainerImageDetails
AwsEcrContainerImageDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcrContainerImageDetails' {Maybe Text
registryId :: Maybe Text
$sel:registryId:AwsEcrContainerImageDetails' :: AwsEcrContainerImageDetails -> Maybe Text
registryId} -> Maybe Text
registryId) (\s :: AwsEcrContainerImageDetails
s@AwsEcrContainerImageDetails' {} Maybe Text
a -> AwsEcrContainerImageDetails
s {$sel:registryId:AwsEcrContainerImageDetails' :: Maybe Text
registryId = Maybe Text
a} :: AwsEcrContainerImageDetails)
awsEcrContainerImageDetails_imageTags :: Lens.Lens' AwsEcrContainerImageDetails (Prelude.Maybe [Prelude.Text])
awsEcrContainerImageDetails_imageTags :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsEcrContainerImageDetails -> f AwsEcrContainerImageDetails
awsEcrContainerImageDetails_imageTags = (AwsEcrContainerImageDetails -> Maybe [Text])
-> (AwsEcrContainerImageDetails
-> Maybe [Text] -> AwsEcrContainerImageDetails)
-> Lens
AwsEcrContainerImageDetails
AwsEcrContainerImageDetails
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcrContainerImageDetails' {Maybe [Text]
imageTags :: Maybe [Text]
$sel:imageTags:AwsEcrContainerImageDetails' :: AwsEcrContainerImageDetails -> Maybe [Text]
imageTags} -> Maybe [Text]
imageTags) (\s :: AwsEcrContainerImageDetails
s@AwsEcrContainerImageDetails' {} Maybe [Text]
a -> AwsEcrContainerImageDetails
s {$sel:imageTags:AwsEcrContainerImageDetails' :: Maybe [Text]
imageTags = Maybe [Text]
a} :: AwsEcrContainerImageDetails) ((Maybe [Text] -> f (Maybe [Text]))
-> AwsEcrContainerImageDetails -> f AwsEcrContainerImageDetails)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsEcrContainerImageDetails
-> f AwsEcrContainerImageDetails
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
awsEcrContainerImageDetails_imageDigest :: Lens.Lens' AwsEcrContainerImageDetails (Prelude.Maybe Prelude.Text)
awsEcrContainerImageDetails_imageDigest :: (Maybe Text -> f (Maybe Text))
-> AwsEcrContainerImageDetails -> f AwsEcrContainerImageDetails
awsEcrContainerImageDetails_imageDigest = (AwsEcrContainerImageDetails -> Maybe Text)
-> (AwsEcrContainerImageDetails
-> Maybe Text -> AwsEcrContainerImageDetails)
-> Lens
AwsEcrContainerImageDetails
AwsEcrContainerImageDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcrContainerImageDetails' {Maybe Text
imageDigest :: Maybe Text
$sel:imageDigest:AwsEcrContainerImageDetails' :: AwsEcrContainerImageDetails -> Maybe Text
imageDigest} -> Maybe Text
imageDigest) (\s :: AwsEcrContainerImageDetails
s@AwsEcrContainerImageDetails' {} Maybe Text
a -> AwsEcrContainerImageDetails
s {$sel:imageDigest:AwsEcrContainerImageDetails' :: Maybe Text
imageDigest = Maybe Text
a} :: AwsEcrContainerImageDetails)
awsEcrContainerImageDetails_imagePublishedAt :: Lens.Lens' AwsEcrContainerImageDetails (Prelude.Maybe Prelude.Text)
awsEcrContainerImageDetails_imagePublishedAt :: (Maybe Text -> f (Maybe Text))
-> AwsEcrContainerImageDetails -> f AwsEcrContainerImageDetails
awsEcrContainerImageDetails_imagePublishedAt = (AwsEcrContainerImageDetails -> Maybe Text)
-> (AwsEcrContainerImageDetails
-> Maybe Text -> AwsEcrContainerImageDetails)
-> Lens
AwsEcrContainerImageDetails
AwsEcrContainerImageDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcrContainerImageDetails' {Maybe Text
imagePublishedAt :: Maybe Text
$sel:imagePublishedAt:AwsEcrContainerImageDetails' :: AwsEcrContainerImageDetails -> Maybe Text
imagePublishedAt} -> Maybe Text
imagePublishedAt) (\s :: AwsEcrContainerImageDetails
s@AwsEcrContainerImageDetails' {} Maybe Text
a -> AwsEcrContainerImageDetails
s {$sel:imagePublishedAt:AwsEcrContainerImageDetails' :: Maybe Text
imagePublishedAt = Maybe Text
a} :: AwsEcrContainerImageDetails)
awsEcrContainerImageDetails_architecture :: Lens.Lens' AwsEcrContainerImageDetails (Prelude.Maybe Prelude.Text)
awsEcrContainerImageDetails_architecture :: (Maybe Text -> f (Maybe Text))
-> AwsEcrContainerImageDetails -> f AwsEcrContainerImageDetails
awsEcrContainerImageDetails_architecture = (AwsEcrContainerImageDetails -> Maybe Text)
-> (AwsEcrContainerImageDetails
-> Maybe Text -> AwsEcrContainerImageDetails)
-> Lens
AwsEcrContainerImageDetails
AwsEcrContainerImageDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcrContainerImageDetails' {Maybe Text
architecture :: Maybe Text
$sel:architecture:AwsEcrContainerImageDetails' :: AwsEcrContainerImageDetails -> Maybe Text
architecture} -> Maybe Text
architecture) (\s :: AwsEcrContainerImageDetails
s@AwsEcrContainerImageDetails' {} Maybe Text
a -> AwsEcrContainerImageDetails
s {$sel:architecture:AwsEcrContainerImageDetails' :: Maybe Text
architecture = Maybe Text
a} :: AwsEcrContainerImageDetails)
awsEcrContainerImageDetails_repositoryName :: Lens.Lens' AwsEcrContainerImageDetails (Prelude.Maybe Prelude.Text)
awsEcrContainerImageDetails_repositoryName :: (Maybe Text -> f (Maybe Text))
-> AwsEcrContainerImageDetails -> f AwsEcrContainerImageDetails
awsEcrContainerImageDetails_repositoryName = (AwsEcrContainerImageDetails -> Maybe Text)
-> (AwsEcrContainerImageDetails
-> Maybe Text -> AwsEcrContainerImageDetails)
-> Lens
AwsEcrContainerImageDetails
AwsEcrContainerImageDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcrContainerImageDetails' {Maybe Text
repositoryName :: Maybe Text
$sel:repositoryName:AwsEcrContainerImageDetails' :: AwsEcrContainerImageDetails -> Maybe Text
repositoryName} -> Maybe Text
repositoryName) (\s :: AwsEcrContainerImageDetails
s@AwsEcrContainerImageDetails' {} Maybe Text
a -> AwsEcrContainerImageDetails
s {$sel:repositoryName:AwsEcrContainerImageDetails' :: Maybe Text
repositoryName = Maybe Text
a} :: AwsEcrContainerImageDetails)
instance Core.FromJSON AwsEcrContainerImageDetails where
parseJSON :: Value -> Parser AwsEcrContainerImageDetails
parseJSON =
String
-> (Object -> Parser AwsEcrContainerImageDetails)
-> Value
-> Parser AwsEcrContainerImageDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsEcrContainerImageDetails"
( \Object
x ->
Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsEcrContainerImageDetails
AwsEcrContainerImageDetails'
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsEcrContainerImageDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsEcrContainerImageDetails)
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsEcrContainerImageDetails)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsEcrContainerImageDetails)
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsEcrContainerImageDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> AwsEcrContainerImageDetails)
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 Text -> Maybe Text -> AwsEcrContainerImageDetails)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> AwsEcrContainerImageDetails)
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
"ImagePublishedAt")
Parser (Maybe Text -> Maybe Text -> AwsEcrContainerImageDetails)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AwsEcrContainerImageDetails)
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
"Architecture")
Parser (Maybe Text -> AwsEcrContainerImageDetails)
-> Parser (Maybe Text) -> Parser AwsEcrContainerImageDetails
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 AwsEcrContainerImageDetails
instance Prelude.NFData AwsEcrContainerImageDetails
instance Core.ToJSON AwsEcrContainerImageDetails where
toJSON :: AwsEcrContainerImageDetails -> Value
toJSON AwsEcrContainerImageDetails' {Maybe [Text]
Maybe Text
repositoryName :: Maybe Text
architecture :: Maybe Text
imagePublishedAt :: Maybe Text
imageDigest :: Maybe Text
imageTags :: Maybe [Text]
registryId :: Maybe Text
$sel:repositoryName:AwsEcrContainerImageDetails' :: AwsEcrContainerImageDetails -> Maybe Text
$sel:architecture:AwsEcrContainerImageDetails' :: AwsEcrContainerImageDetails -> Maybe Text
$sel:imagePublishedAt:AwsEcrContainerImageDetails' :: AwsEcrContainerImageDetails -> Maybe Text
$sel:imageDigest:AwsEcrContainerImageDetails' :: AwsEcrContainerImageDetails -> Maybe Text
$sel:imageTags:AwsEcrContainerImageDetails' :: AwsEcrContainerImageDetails -> Maybe [Text]
$sel:registryId:AwsEcrContainerImageDetails' :: AwsEcrContainerImageDetails -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"RegistryId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
registryId,
(Text
"ImageTags" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
imageTags,
(Text
"ImageDigest" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
imageDigest,
(Text
"ImagePublishedAt" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
imagePublishedAt,
(Text
"Architecture" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
architecture,
(Text
"RepositoryName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
repositoryName
]
)