{-# 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 #-}
module Amazonka.ECR.DescribeImageScanFindings
(
DescribeImageScanFindings (..),
newDescribeImageScanFindings,
describeImageScanFindings_registryId,
describeImageScanFindings_nextToken,
describeImageScanFindings_maxResults,
describeImageScanFindings_repositoryName,
describeImageScanFindings_imageId,
DescribeImageScanFindingsResponse (..),
newDescribeImageScanFindingsResponse,
describeImageScanFindingsResponse_registryId,
describeImageScanFindingsResponse_imageScanFindings,
describeImageScanFindingsResponse_imageScanStatus,
describeImageScanFindingsResponse_nextToken,
describeImageScanFindingsResponse_imageId,
describeImageScanFindingsResponse_repositoryName,
describeImageScanFindingsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ECR.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeImageScanFindings = DescribeImageScanFindings'
{
DescribeImageScanFindings -> Maybe Text
registryId :: Prelude.Maybe Prelude.Text,
DescribeImageScanFindings -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeImageScanFindings -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
DescribeImageScanFindings -> Text
repositoryName :: Prelude.Text,
DescribeImageScanFindings -> ImageIdentifier
imageId :: ImageIdentifier
}
deriving (DescribeImageScanFindings -> DescribeImageScanFindings -> Bool
(DescribeImageScanFindings -> DescribeImageScanFindings -> Bool)
-> (DescribeImageScanFindings -> DescribeImageScanFindings -> Bool)
-> Eq DescribeImageScanFindings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeImageScanFindings -> DescribeImageScanFindings -> Bool
$c/= :: DescribeImageScanFindings -> DescribeImageScanFindings -> Bool
== :: DescribeImageScanFindings -> DescribeImageScanFindings -> Bool
$c== :: DescribeImageScanFindings -> DescribeImageScanFindings -> Bool
Prelude.Eq, ReadPrec [DescribeImageScanFindings]
ReadPrec DescribeImageScanFindings
Int -> ReadS DescribeImageScanFindings
ReadS [DescribeImageScanFindings]
(Int -> ReadS DescribeImageScanFindings)
-> ReadS [DescribeImageScanFindings]
-> ReadPrec DescribeImageScanFindings
-> ReadPrec [DescribeImageScanFindings]
-> Read DescribeImageScanFindings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeImageScanFindings]
$creadListPrec :: ReadPrec [DescribeImageScanFindings]
readPrec :: ReadPrec DescribeImageScanFindings
$creadPrec :: ReadPrec DescribeImageScanFindings
readList :: ReadS [DescribeImageScanFindings]
$creadList :: ReadS [DescribeImageScanFindings]
readsPrec :: Int -> ReadS DescribeImageScanFindings
$creadsPrec :: Int -> ReadS DescribeImageScanFindings
Prelude.Read, Int -> DescribeImageScanFindings -> ShowS
[DescribeImageScanFindings] -> ShowS
DescribeImageScanFindings -> String
(Int -> DescribeImageScanFindings -> ShowS)
-> (DescribeImageScanFindings -> String)
-> ([DescribeImageScanFindings] -> ShowS)
-> Show DescribeImageScanFindings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeImageScanFindings] -> ShowS
$cshowList :: [DescribeImageScanFindings] -> ShowS
show :: DescribeImageScanFindings -> String
$cshow :: DescribeImageScanFindings -> String
showsPrec :: Int -> DescribeImageScanFindings -> ShowS
$cshowsPrec :: Int -> DescribeImageScanFindings -> ShowS
Prelude.Show, (forall x.
DescribeImageScanFindings -> Rep DescribeImageScanFindings x)
-> (forall x.
Rep DescribeImageScanFindings x -> DescribeImageScanFindings)
-> Generic DescribeImageScanFindings
forall x.
Rep DescribeImageScanFindings x -> DescribeImageScanFindings
forall x.
DescribeImageScanFindings -> Rep DescribeImageScanFindings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeImageScanFindings x -> DescribeImageScanFindings
$cfrom :: forall x.
DescribeImageScanFindings -> Rep DescribeImageScanFindings x
Prelude.Generic)
newDescribeImageScanFindings ::
Prelude.Text ->
ImageIdentifier ->
DescribeImageScanFindings
newDescribeImageScanFindings :: Text -> ImageIdentifier -> DescribeImageScanFindings
newDescribeImageScanFindings
Text
pRepositoryName_
ImageIdentifier
pImageId_ =
DescribeImageScanFindings' :: Maybe Text
-> Maybe Text
-> Maybe Natural
-> Text
-> ImageIdentifier
-> DescribeImageScanFindings
DescribeImageScanFindings'
{ $sel:registryId:DescribeImageScanFindings' :: Maybe Text
registryId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeImageScanFindings' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeImageScanFindings' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:repositoryName:DescribeImageScanFindings' :: Text
repositoryName = Text
pRepositoryName_,
$sel:imageId:DescribeImageScanFindings' :: ImageIdentifier
imageId = ImageIdentifier
pImageId_
}
describeImageScanFindings_registryId :: Lens.Lens' DescribeImageScanFindings (Prelude.Maybe Prelude.Text)
describeImageScanFindings_registryId :: (Maybe Text -> f (Maybe Text))
-> DescribeImageScanFindings -> f DescribeImageScanFindings
describeImageScanFindings_registryId = (DescribeImageScanFindings -> Maybe Text)
-> (DescribeImageScanFindings
-> Maybe Text -> DescribeImageScanFindings)
-> Lens
DescribeImageScanFindings
DescribeImageScanFindings
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageScanFindings' {Maybe Text
registryId :: Maybe Text
$sel:registryId:DescribeImageScanFindings' :: DescribeImageScanFindings -> Maybe Text
registryId} -> Maybe Text
registryId) (\s :: DescribeImageScanFindings
s@DescribeImageScanFindings' {} Maybe Text
a -> DescribeImageScanFindings
s {$sel:registryId:DescribeImageScanFindings' :: Maybe Text
registryId = Maybe Text
a} :: DescribeImageScanFindings)
describeImageScanFindings_nextToken :: Lens.Lens' DescribeImageScanFindings (Prelude.Maybe Prelude.Text)
describeImageScanFindings_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeImageScanFindings -> f DescribeImageScanFindings
describeImageScanFindings_nextToken = (DescribeImageScanFindings -> Maybe Text)
-> (DescribeImageScanFindings
-> Maybe Text -> DescribeImageScanFindings)
-> Lens
DescribeImageScanFindings
DescribeImageScanFindings
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageScanFindings' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeImageScanFindings' :: DescribeImageScanFindings -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeImageScanFindings
s@DescribeImageScanFindings' {} Maybe Text
a -> DescribeImageScanFindings
s {$sel:nextToken:DescribeImageScanFindings' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeImageScanFindings)
describeImageScanFindings_maxResults :: Lens.Lens' DescribeImageScanFindings (Prelude.Maybe Prelude.Natural)
describeImageScanFindings_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeImageScanFindings -> f DescribeImageScanFindings
describeImageScanFindings_maxResults = (DescribeImageScanFindings -> Maybe Natural)
-> (DescribeImageScanFindings
-> Maybe Natural -> DescribeImageScanFindings)
-> Lens
DescribeImageScanFindings
DescribeImageScanFindings
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageScanFindings' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeImageScanFindings' :: DescribeImageScanFindings -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeImageScanFindings
s@DescribeImageScanFindings' {} Maybe Natural
a -> DescribeImageScanFindings
s {$sel:maxResults:DescribeImageScanFindings' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeImageScanFindings)
describeImageScanFindings_repositoryName :: Lens.Lens' DescribeImageScanFindings Prelude.Text
describeImageScanFindings_repositoryName :: (Text -> f Text)
-> DescribeImageScanFindings -> f DescribeImageScanFindings
describeImageScanFindings_repositoryName = (DescribeImageScanFindings -> Text)
-> (DescribeImageScanFindings -> Text -> DescribeImageScanFindings)
-> Lens
DescribeImageScanFindings DescribeImageScanFindings Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageScanFindings' {Text
repositoryName :: Text
$sel:repositoryName:DescribeImageScanFindings' :: DescribeImageScanFindings -> Text
repositoryName} -> Text
repositoryName) (\s :: DescribeImageScanFindings
s@DescribeImageScanFindings' {} Text
a -> DescribeImageScanFindings
s {$sel:repositoryName:DescribeImageScanFindings' :: Text
repositoryName = Text
a} :: DescribeImageScanFindings)
describeImageScanFindings_imageId :: Lens.Lens' DescribeImageScanFindings ImageIdentifier
describeImageScanFindings_imageId :: (ImageIdentifier -> f ImageIdentifier)
-> DescribeImageScanFindings -> f DescribeImageScanFindings
describeImageScanFindings_imageId = (DescribeImageScanFindings -> ImageIdentifier)
-> (DescribeImageScanFindings
-> ImageIdentifier -> DescribeImageScanFindings)
-> Lens
DescribeImageScanFindings
DescribeImageScanFindings
ImageIdentifier
ImageIdentifier
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageScanFindings' {ImageIdentifier
imageId :: ImageIdentifier
$sel:imageId:DescribeImageScanFindings' :: DescribeImageScanFindings -> ImageIdentifier
imageId} -> ImageIdentifier
imageId) (\s :: DescribeImageScanFindings
s@DescribeImageScanFindings' {} ImageIdentifier
a -> DescribeImageScanFindings
s {$sel:imageId:DescribeImageScanFindings' :: ImageIdentifier
imageId = ImageIdentifier
a} :: DescribeImageScanFindings)
instance Core.AWSPager DescribeImageScanFindings where
page :: DescribeImageScanFindings
-> AWSResponse DescribeImageScanFindings
-> Maybe DescribeImageScanFindings
page DescribeImageScanFindings
rq AWSResponse DescribeImageScanFindings
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeImageScanFindings
DescribeImageScanFindingsResponse
rs
DescribeImageScanFindingsResponse
-> Getting (First Text) DescribeImageScanFindingsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeImageScanFindingsResponse
-> Const (First Text) DescribeImageScanFindingsResponse
Lens' DescribeImageScanFindingsResponse (Maybe Text)
describeImageScanFindingsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeImageScanFindingsResponse
-> Const (First Text) DescribeImageScanFindingsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeImageScanFindingsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeImageScanFindings
forall a. Maybe a
Prelude.Nothing
| Maybe [ImageScanFinding] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeImageScanFindings
DescribeImageScanFindingsResponse
rs
DescribeImageScanFindingsResponse
-> Getting
(First [ImageScanFinding])
DescribeImageScanFindingsResponse
[ImageScanFinding]
-> Maybe [ImageScanFinding]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe ImageScanFindings
-> Const (First [ImageScanFinding]) (Maybe ImageScanFindings))
-> DescribeImageScanFindingsResponse
-> Const
(First [ImageScanFinding]) DescribeImageScanFindingsResponse
Lens' DescribeImageScanFindingsResponse (Maybe ImageScanFindings)
describeImageScanFindingsResponse_imageScanFindings
((Maybe ImageScanFindings
-> Const (First [ImageScanFinding]) (Maybe ImageScanFindings))
-> DescribeImageScanFindingsResponse
-> Const
(First [ImageScanFinding]) DescribeImageScanFindingsResponse)
-> (([ImageScanFinding]
-> Const (First [ImageScanFinding]) [ImageScanFinding])
-> Maybe ImageScanFindings
-> Const (First [ImageScanFinding]) (Maybe ImageScanFindings))
-> Getting
(First [ImageScanFinding])
DescribeImageScanFindingsResponse
[ImageScanFinding]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ImageScanFindings
-> Const (First [ImageScanFinding]) ImageScanFindings)
-> Maybe ImageScanFindings
-> Const (First [ImageScanFinding]) (Maybe ImageScanFindings)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
((ImageScanFindings
-> Const (First [ImageScanFinding]) ImageScanFindings)
-> Maybe ImageScanFindings
-> Const (First [ImageScanFinding]) (Maybe ImageScanFindings))
-> (([ImageScanFinding]
-> Const (First [ImageScanFinding]) [ImageScanFinding])
-> ImageScanFindings
-> Const (First [ImageScanFinding]) ImageScanFindings)
-> ([ImageScanFinding]
-> Const (First [ImageScanFinding]) [ImageScanFinding])
-> Maybe ImageScanFindings
-> Const (First [ImageScanFinding]) (Maybe ImageScanFindings)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe [ImageScanFinding]
-> Const (First [ImageScanFinding]) (Maybe [ImageScanFinding]))
-> ImageScanFindings
-> Const (First [ImageScanFinding]) ImageScanFindings
Lens' ImageScanFindings (Maybe [ImageScanFinding])
imageScanFindings_findings
((Maybe [ImageScanFinding]
-> Const (First [ImageScanFinding]) (Maybe [ImageScanFinding]))
-> ImageScanFindings
-> Const (First [ImageScanFinding]) ImageScanFindings)
-> (([ImageScanFinding]
-> Const (First [ImageScanFinding]) [ImageScanFinding])
-> Maybe [ImageScanFinding]
-> Const (First [ImageScanFinding]) (Maybe [ImageScanFinding]))
-> ([ImageScanFinding]
-> Const (First [ImageScanFinding]) [ImageScanFinding])
-> ImageScanFindings
-> Const (First [ImageScanFinding]) ImageScanFindings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ImageScanFinding]
-> Const (First [ImageScanFinding]) [ImageScanFinding])
-> Maybe [ImageScanFinding]
-> Const (First [ImageScanFinding]) (Maybe [ImageScanFinding])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeImageScanFindings
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeImageScanFindings -> Maybe DescribeImageScanFindings
forall a. a -> Maybe a
Prelude.Just (DescribeImageScanFindings -> Maybe DescribeImageScanFindings)
-> DescribeImageScanFindings -> Maybe DescribeImageScanFindings
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeImageScanFindings
rq
DescribeImageScanFindings
-> (DescribeImageScanFindings -> DescribeImageScanFindings)
-> DescribeImageScanFindings
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeImageScanFindings -> Identity DescribeImageScanFindings
Lens
DescribeImageScanFindings
DescribeImageScanFindings
(Maybe Text)
(Maybe Text)
describeImageScanFindings_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeImageScanFindings -> Identity DescribeImageScanFindings)
-> Maybe Text
-> DescribeImageScanFindings
-> DescribeImageScanFindings
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeImageScanFindings
DescribeImageScanFindingsResponse
rs
DescribeImageScanFindingsResponse
-> Getting (First Text) DescribeImageScanFindingsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeImageScanFindingsResponse
-> Const (First Text) DescribeImageScanFindingsResponse
Lens' DescribeImageScanFindingsResponse (Maybe Text)
describeImageScanFindingsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeImageScanFindingsResponse
-> Const (First Text) DescribeImageScanFindingsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeImageScanFindingsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest DescribeImageScanFindings where
type
AWSResponse DescribeImageScanFindings =
DescribeImageScanFindingsResponse
request :: DescribeImageScanFindings -> Request DescribeImageScanFindings
request = Service
-> DescribeImageScanFindings -> Request DescribeImageScanFindings
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeImageScanFindings
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeImageScanFindings)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeImageScanFindings))
-> Logger
-> Service
-> Proxy DescribeImageScanFindings
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeImageScanFindings)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe ImageScanFindings
-> Maybe ImageScanStatus
-> Maybe Text
-> Maybe ImageIdentifier
-> Maybe Text
-> Int
-> DescribeImageScanFindingsResponse
DescribeImageScanFindingsResponse'
(Maybe Text
-> Maybe ImageScanFindings
-> Maybe ImageScanStatus
-> Maybe Text
-> Maybe ImageIdentifier
-> Maybe Text
-> Int
-> DescribeImageScanFindingsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe ImageScanFindings
-> Maybe ImageScanStatus
-> Maybe Text
-> Maybe ImageIdentifier
-> Maybe Text
-> Int
-> DescribeImageScanFindingsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"registryId")
Either
String
(Maybe ImageScanFindings
-> Maybe ImageScanStatus
-> Maybe Text
-> Maybe ImageIdentifier
-> Maybe Text
-> Int
-> DescribeImageScanFindingsResponse)
-> Either String (Maybe ImageScanFindings)
-> Either
String
(Maybe ImageScanStatus
-> Maybe Text
-> Maybe ImageIdentifier
-> Maybe Text
-> Int
-> DescribeImageScanFindingsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ImageScanFindings)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"imageScanFindings")
Either
String
(Maybe ImageScanStatus
-> Maybe Text
-> Maybe ImageIdentifier
-> Maybe Text
-> Int
-> DescribeImageScanFindingsResponse)
-> Either String (Maybe ImageScanStatus)
-> Either
String
(Maybe Text
-> Maybe ImageIdentifier
-> Maybe Text
-> Int
-> DescribeImageScanFindingsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ImageScanStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"imageScanStatus")
Either
String
(Maybe Text
-> Maybe ImageIdentifier
-> Maybe Text
-> Int
-> DescribeImageScanFindingsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe ImageIdentifier
-> Maybe Text -> Int -> DescribeImageScanFindingsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextToken")
Either
String
(Maybe ImageIdentifier
-> Maybe Text -> Int -> DescribeImageScanFindingsResponse)
-> Either String (Maybe ImageIdentifier)
-> Either
String (Maybe Text -> Int -> DescribeImageScanFindingsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ImageIdentifier)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"imageId")
Either
String (Maybe Text -> Int -> DescribeImageScanFindingsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeImageScanFindingsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"repositoryName")
Either String (Int -> DescribeImageScanFindingsResponse)
-> Either String Int
-> Either String DescribeImageScanFindingsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DescribeImageScanFindings
instance Prelude.NFData DescribeImageScanFindings
instance Core.ToHeaders DescribeImageScanFindings where
toHeaders :: DescribeImageScanFindings -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeImageScanFindings -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonEC2ContainerRegistry_V20150921.DescribeImageScanFindings" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DescribeImageScanFindings where
toJSON :: DescribeImageScanFindings -> Value
toJSON DescribeImageScanFindings' {Maybe Natural
Maybe Text
Text
ImageIdentifier
imageId :: ImageIdentifier
repositoryName :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
registryId :: Maybe Text
$sel:imageId:DescribeImageScanFindings' :: DescribeImageScanFindings -> ImageIdentifier
$sel:repositoryName:DescribeImageScanFindings' :: DescribeImageScanFindings -> Text
$sel:maxResults:DescribeImageScanFindings' :: DescribeImageScanFindings -> Maybe Natural
$sel:nextToken:DescribeImageScanFindings' :: DescribeImageScanFindings -> Maybe Text
$sel:registryId:DescribeImageScanFindings' :: DescribeImageScanFindings -> 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
"nextToken" 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
nextToken,
(Text
"maxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"repositoryName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
repositoryName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"imageId" Text -> ImageIdentifier -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ImageIdentifier
imageId)
]
)
instance Core.ToPath DescribeImageScanFindings where
toPath :: DescribeImageScanFindings -> ByteString
toPath = ByteString -> DescribeImageScanFindings -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeImageScanFindings where
toQuery :: DescribeImageScanFindings -> QueryString
toQuery = QueryString -> DescribeImageScanFindings -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeImageScanFindingsResponse = DescribeImageScanFindingsResponse'
{
DescribeImageScanFindingsResponse -> Maybe Text
registryId :: Prelude.Maybe Prelude.Text,
DescribeImageScanFindingsResponse -> Maybe ImageScanFindings
imageScanFindings :: Prelude.Maybe ImageScanFindings,
DescribeImageScanFindingsResponse -> Maybe ImageScanStatus
imageScanStatus :: Prelude.Maybe ImageScanStatus,
DescribeImageScanFindingsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeImageScanFindingsResponse -> Maybe ImageIdentifier
imageId :: Prelude.Maybe ImageIdentifier,
DescribeImageScanFindingsResponse -> Maybe Text
repositoryName :: Prelude.Maybe Prelude.Text,
DescribeImageScanFindingsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeImageScanFindingsResponse
-> DescribeImageScanFindingsResponse -> Bool
(DescribeImageScanFindingsResponse
-> DescribeImageScanFindingsResponse -> Bool)
-> (DescribeImageScanFindingsResponse
-> DescribeImageScanFindingsResponse -> Bool)
-> Eq DescribeImageScanFindingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeImageScanFindingsResponse
-> DescribeImageScanFindingsResponse -> Bool
$c/= :: DescribeImageScanFindingsResponse
-> DescribeImageScanFindingsResponse -> Bool
== :: DescribeImageScanFindingsResponse
-> DescribeImageScanFindingsResponse -> Bool
$c== :: DescribeImageScanFindingsResponse
-> DescribeImageScanFindingsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeImageScanFindingsResponse]
ReadPrec DescribeImageScanFindingsResponse
Int -> ReadS DescribeImageScanFindingsResponse
ReadS [DescribeImageScanFindingsResponse]
(Int -> ReadS DescribeImageScanFindingsResponse)
-> ReadS [DescribeImageScanFindingsResponse]
-> ReadPrec DescribeImageScanFindingsResponse
-> ReadPrec [DescribeImageScanFindingsResponse]
-> Read DescribeImageScanFindingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeImageScanFindingsResponse]
$creadListPrec :: ReadPrec [DescribeImageScanFindingsResponse]
readPrec :: ReadPrec DescribeImageScanFindingsResponse
$creadPrec :: ReadPrec DescribeImageScanFindingsResponse
readList :: ReadS [DescribeImageScanFindingsResponse]
$creadList :: ReadS [DescribeImageScanFindingsResponse]
readsPrec :: Int -> ReadS DescribeImageScanFindingsResponse
$creadsPrec :: Int -> ReadS DescribeImageScanFindingsResponse
Prelude.Read, Int -> DescribeImageScanFindingsResponse -> ShowS
[DescribeImageScanFindingsResponse] -> ShowS
DescribeImageScanFindingsResponse -> String
(Int -> DescribeImageScanFindingsResponse -> ShowS)
-> (DescribeImageScanFindingsResponse -> String)
-> ([DescribeImageScanFindingsResponse] -> ShowS)
-> Show DescribeImageScanFindingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeImageScanFindingsResponse] -> ShowS
$cshowList :: [DescribeImageScanFindingsResponse] -> ShowS
show :: DescribeImageScanFindingsResponse -> String
$cshow :: DescribeImageScanFindingsResponse -> String
showsPrec :: Int -> DescribeImageScanFindingsResponse -> ShowS
$cshowsPrec :: Int -> DescribeImageScanFindingsResponse -> ShowS
Prelude.Show, (forall x.
DescribeImageScanFindingsResponse
-> Rep DescribeImageScanFindingsResponse x)
-> (forall x.
Rep DescribeImageScanFindingsResponse x
-> DescribeImageScanFindingsResponse)
-> Generic DescribeImageScanFindingsResponse
forall x.
Rep DescribeImageScanFindingsResponse x
-> DescribeImageScanFindingsResponse
forall x.
DescribeImageScanFindingsResponse
-> Rep DescribeImageScanFindingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeImageScanFindingsResponse x
-> DescribeImageScanFindingsResponse
$cfrom :: forall x.
DescribeImageScanFindingsResponse
-> Rep DescribeImageScanFindingsResponse x
Prelude.Generic)
newDescribeImageScanFindingsResponse ::
Prelude.Int ->
DescribeImageScanFindingsResponse
newDescribeImageScanFindingsResponse :: Int -> DescribeImageScanFindingsResponse
newDescribeImageScanFindingsResponse Int
pHttpStatus_ =
DescribeImageScanFindingsResponse' :: Maybe Text
-> Maybe ImageScanFindings
-> Maybe ImageScanStatus
-> Maybe Text
-> Maybe ImageIdentifier
-> Maybe Text
-> Int
-> DescribeImageScanFindingsResponse
DescribeImageScanFindingsResponse'
{ $sel:registryId:DescribeImageScanFindingsResponse' :: Maybe Text
registryId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:imageScanFindings:DescribeImageScanFindingsResponse' :: Maybe ImageScanFindings
imageScanFindings = Maybe ImageScanFindings
forall a. Maybe a
Prelude.Nothing,
$sel:imageScanStatus:DescribeImageScanFindingsResponse' :: Maybe ImageScanStatus
imageScanStatus = Maybe ImageScanStatus
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeImageScanFindingsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:imageId:DescribeImageScanFindingsResponse' :: Maybe ImageIdentifier
imageId = Maybe ImageIdentifier
forall a. Maybe a
Prelude.Nothing,
$sel:repositoryName:DescribeImageScanFindingsResponse' :: Maybe Text
repositoryName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeImageScanFindingsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeImageScanFindingsResponse_registryId :: Lens.Lens' DescribeImageScanFindingsResponse (Prelude.Maybe Prelude.Text)
describeImageScanFindingsResponse_registryId :: (Maybe Text -> f (Maybe Text))
-> DescribeImageScanFindingsResponse
-> f DescribeImageScanFindingsResponse
describeImageScanFindingsResponse_registryId = (DescribeImageScanFindingsResponse -> Maybe Text)
-> (DescribeImageScanFindingsResponse
-> Maybe Text -> DescribeImageScanFindingsResponse)
-> Lens' DescribeImageScanFindingsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageScanFindingsResponse' {Maybe Text
registryId :: Maybe Text
$sel:registryId:DescribeImageScanFindingsResponse' :: DescribeImageScanFindingsResponse -> Maybe Text
registryId} -> Maybe Text
registryId) (\s :: DescribeImageScanFindingsResponse
s@DescribeImageScanFindingsResponse' {} Maybe Text
a -> DescribeImageScanFindingsResponse
s {$sel:registryId:DescribeImageScanFindingsResponse' :: Maybe Text
registryId = Maybe Text
a} :: DescribeImageScanFindingsResponse)
describeImageScanFindingsResponse_imageScanFindings :: Lens.Lens' DescribeImageScanFindingsResponse (Prelude.Maybe ImageScanFindings)
describeImageScanFindingsResponse_imageScanFindings :: (Maybe ImageScanFindings -> f (Maybe ImageScanFindings))
-> DescribeImageScanFindingsResponse
-> f DescribeImageScanFindingsResponse
describeImageScanFindingsResponse_imageScanFindings = (DescribeImageScanFindingsResponse -> Maybe ImageScanFindings)
-> (DescribeImageScanFindingsResponse
-> Maybe ImageScanFindings -> DescribeImageScanFindingsResponse)
-> Lens'
DescribeImageScanFindingsResponse (Maybe ImageScanFindings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageScanFindingsResponse' {Maybe ImageScanFindings
imageScanFindings :: Maybe ImageScanFindings
$sel:imageScanFindings:DescribeImageScanFindingsResponse' :: DescribeImageScanFindingsResponse -> Maybe ImageScanFindings
imageScanFindings} -> Maybe ImageScanFindings
imageScanFindings) (\s :: DescribeImageScanFindingsResponse
s@DescribeImageScanFindingsResponse' {} Maybe ImageScanFindings
a -> DescribeImageScanFindingsResponse
s {$sel:imageScanFindings:DescribeImageScanFindingsResponse' :: Maybe ImageScanFindings
imageScanFindings = Maybe ImageScanFindings
a} :: DescribeImageScanFindingsResponse)
describeImageScanFindingsResponse_imageScanStatus :: Lens.Lens' DescribeImageScanFindingsResponse (Prelude.Maybe ImageScanStatus)
describeImageScanFindingsResponse_imageScanStatus :: (Maybe ImageScanStatus -> f (Maybe ImageScanStatus))
-> DescribeImageScanFindingsResponse
-> f DescribeImageScanFindingsResponse
describeImageScanFindingsResponse_imageScanStatus = (DescribeImageScanFindingsResponse -> Maybe ImageScanStatus)
-> (DescribeImageScanFindingsResponse
-> Maybe ImageScanStatus -> DescribeImageScanFindingsResponse)
-> Lens
DescribeImageScanFindingsResponse
DescribeImageScanFindingsResponse
(Maybe ImageScanStatus)
(Maybe ImageScanStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageScanFindingsResponse' {Maybe ImageScanStatus
imageScanStatus :: Maybe ImageScanStatus
$sel:imageScanStatus:DescribeImageScanFindingsResponse' :: DescribeImageScanFindingsResponse -> Maybe ImageScanStatus
imageScanStatus} -> Maybe ImageScanStatus
imageScanStatus) (\s :: DescribeImageScanFindingsResponse
s@DescribeImageScanFindingsResponse' {} Maybe ImageScanStatus
a -> DescribeImageScanFindingsResponse
s {$sel:imageScanStatus:DescribeImageScanFindingsResponse' :: Maybe ImageScanStatus
imageScanStatus = Maybe ImageScanStatus
a} :: DescribeImageScanFindingsResponse)
describeImageScanFindingsResponse_nextToken :: Lens.Lens' DescribeImageScanFindingsResponse (Prelude.Maybe Prelude.Text)
describeImageScanFindingsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeImageScanFindingsResponse
-> f DescribeImageScanFindingsResponse
describeImageScanFindingsResponse_nextToken = (DescribeImageScanFindingsResponse -> Maybe Text)
-> (DescribeImageScanFindingsResponse
-> Maybe Text -> DescribeImageScanFindingsResponse)
-> Lens' DescribeImageScanFindingsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageScanFindingsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeImageScanFindingsResponse' :: DescribeImageScanFindingsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeImageScanFindingsResponse
s@DescribeImageScanFindingsResponse' {} Maybe Text
a -> DescribeImageScanFindingsResponse
s {$sel:nextToken:DescribeImageScanFindingsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeImageScanFindingsResponse)
describeImageScanFindingsResponse_imageId :: Lens.Lens' DescribeImageScanFindingsResponse (Prelude.Maybe ImageIdentifier)
describeImageScanFindingsResponse_imageId :: (Maybe ImageIdentifier -> f (Maybe ImageIdentifier))
-> DescribeImageScanFindingsResponse
-> f DescribeImageScanFindingsResponse
describeImageScanFindingsResponse_imageId = (DescribeImageScanFindingsResponse -> Maybe ImageIdentifier)
-> (DescribeImageScanFindingsResponse
-> Maybe ImageIdentifier -> DescribeImageScanFindingsResponse)
-> Lens
DescribeImageScanFindingsResponse
DescribeImageScanFindingsResponse
(Maybe ImageIdentifier)
(Maybe ImageIdentifier)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageScanFindingsResponse' {Maybe ImageIdentifier
imageId :: Maybe ImageIdentifier
$sel:imageId:DescribeImageScanFindingsResponse' :: DescribeImageScanFindingsResponse -> Maybe ImageIdentifier
imageId} -> Maybe ImageIdentifier
imageId) (\s :: DescribeImageScanFindingsResponse
s@DescribeImageScanFindingsResponse' {} Maybe ImageIdentifier
a -> DescribeImageScanFindingsResponse
s {$sel:imageId:DescribeImageScanFindingsResponse' :: Maybe ImageIdentifier
imageId = Maybe ImageIdentifier
a} :: DescribeImageScanFindingsResponse)
describeImageScanFindingsResponse_repositoryName :: Lens.Lens' DescribeImageScanFindingsResponse (Prelude.Maybe Prelude.Text)
describeImageScanFindingsResponse_repositoryName :: (Maybe Text -> f (Maybe Text))
-> DescribeImageScanFindingsResponse
-> f DescribeImageScanFindingsResponse
describeImageScanFindingsResponse_repositoryName = (DescribeImageScanFindingsResponse -> Maybe Text)
-> (DescribeImageScanFindingsResponse
-> Maybe Text -> DescribeImageScanFindingsResponse)
-> Lens' DescribeImageScanFindingsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageScanFindingsResponse' {Maybe Text
repositoryName :: Maybe Text
$sel:repositoryName:DescribeImageScanFindingsResponse' :: DescribeImageScanFindingsResponse -> Maybe Text
repositoryName} -> Maybe Text
repositoryName) (\s :: DescribeImageScanFindingsResponse
s@DescribeImageScanFindingsResponse' {} Maybe Text
a -> DescribeImageScanFindingsResponse
s {$sel:repositoryName:DescribeImageScanFindingsResponse' :: Maybe Text
repositoryName = Maybe Text
a} :: DescribeImageScanFindingsResponse)
describeImageScanFindingsResponse_httpStatus :: Lens.Lens' DescribeImageScanFindingsResponse Prelude.Int
describeImageScanFindingsResponse_httpStatus :: (Int -> f Int)
-> DescribeImageScanFindingsResponse
-> f DescribeImageScanFindingsResponse
describeImageScanFindingsResponse_httpStatus = (DescribeImageScanFindingsResponse -> Int)
-> (DescribeImageScanFindingsResponse
-> Int -> DescribeImageScanFindingsResponse)
-> Lens
DescribeImageScanFindingsResponse
DescribeImageScanFindingsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageScanFindingsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeImageScanFindingsResponse' :: DescribeImageScanFindingsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeImageScanFindingsResponse
s@DescribeImageScanFindingsResponse' {} Int
a -> DescribeImageScanFindingsResponse
s {$sel:httpStatus:DescribeImageScanFindingsResponse' :: Int
httpStatus = Int
a} :: DescribeImageScanFindingsResponse)
instance
Prelude.NFData
DescribeImageScanFindingsResponse