{-# 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.DescribeImages
(
DescribeImages (..),
newDescribeImages,
describeImages_registryId,
describeImages_imageIds,
describeImages_nextToken,
describeImages_filter,
describeImages_maxResults,
describeImages_repositoryName,
DescribeImagesResponse (..),
newDescribeImagesResponse,
describeImagesResponse_imageDetails,
describeImagesResponse_nextToken,
describeImagesResponse_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 DescribeImages = DescribeImages'
{
DescribeImages -> Maybe Text
registryId :: Prelude.Maybe Prelude.Text,
DescribeImages -> Maybe [ImageIdentifier]
imageIds :: Prelude.Maybe [ImageIdentifier],
DescribeImages -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeImages -> Maybe DescribeImagesFilter
filter' :: Prelude.Maybe DescribeImagesFilter,
DescribeImages -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
DescribeImages -> Text
repositoryName :: Prelude.Text
}
deriving (DescribeImages -> DescribeImages -> Bool
(DescribeImages -> DescribeImages -> Bool)
-> (DescribeImages -> DescribeImages -> Bool) -> Eq DescribeImages
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeImages -> DescribeImages -> Bool
$c/= :: DescribeImages -> DescribeImages -> Bool
== :: DescribeImages -> DescribeImages -> Bool
$c== :: DescribeImages -> DescribeImages -> Bool
Prelude.Eq, ReadPrec [DescribeImages]
ReadPrec DescribeImages
Int -> ReadS DescribeImages
ReadS [DescribeImages]
(Int -> ReadS DescribeImages)
-> ReadS [DescribeImages]
-> ReadPrec DescribeImages
-> ReadPrec [DescribeImages]
-> Read DescribeImages
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeImages]
$creadListPrec :: ReadPrec [DescribeImages]
readPrec :: ReadPrec DescribeImages
$creadPrec :: ReadPrec DescribeImages
readList :: ReadS [DescribeImages]
$creadList :: ReadS [DescribeImages]
readsPrec :: Int -> ReadS DescribeImages
$creadsPrec :: Int -> ReadS DescribeImages
Prelude.Read, Int -> DescribeImages -> ShowS
[DescribeImages] -> ShowS
DescribeImages -> String
(Int -> DescribeImages -> ShowS)
-> (DescribeImages -> String)
-> ([DescribeImages] -> ShowS)
-> Show DescribeImages
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeImages] -> ShowS
$cshowList :: [DescribeImages] -> ShowS
show :: DescribeImages -> String
$cshow :: DescribeImages -> String
showsPrec :: Int -> DescribeImages -> ShowS
$cshowsPrec :: Int -> DescribeImages -> ShowS
Prelude.Show, (forall x. DescribeImages -> Rep DescribeImages x)
-> (forall x. Rep DescribeImages x -> DescribeImages)
-> Generic DescribeImages
forall x. Rep DescribeImages x -> DescribeImages
forall x. DescribeImages -> Rep DescribeImages x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeImages x -> DescribeImages
$cfrom :: forall x. DescribeImages -> Rep DescribeImages x
Prelude.Generic)
newDescribeImages ::
Prelude.Text ->
DescribeImages
newDescribeImages :: Text -> DescribeImages
newDescribeImages Text
pRepositoryName_ =
DescribeImages' :: Maybe Text
-> Maybe [ImageIdentifier]
-> Maybe Text
-> Maybe DescribeImagesFilter
-> Maybe Natural
-> Text
-> DescribeImages
DescribeImages'
{ $sel:registryId:DescribeImages' :: Maybe Text
registryId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:imageIds:DescribeImages' :: Maybe [ImageIdentifier]
imageIds = Maybe [ImageIdentifier]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeImages' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:filter':DescribeImages' :: Maybe DescribeImagesFilter
filter' = Maybe DescribeImagesFilter
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeImages' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:repositoryName:DescribeImages' :: Text
repositoryName = Text
pRepositoryName_
}
describeImages_registryId :: Lens.Lens' DescribeImages (Prelude.Maybe Prelude.Text)
describeImages_registryId :: (Maybe Text -> f (Maybe Text))
-> DescribeImages -> f DescribeImages
describeImages_registryId = (DescribeImages -> Maybe Text)
-> (DescribeImages -> Maybe Text -> DescribeImages)
-> Lens DescribeImages DescribeImages (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImages' {Maybe Text
registryId :: Maybe Text
$sel:registryId:DescribeImages' :: DescribeImages -> Maybe Text
registryId} -> Maybe Text
registryId) (\s :: DescribeImages
s@DescribeImages' {} Maybe Text
a -> DescribeImages
s {$sel:registryId:DescribeImages' :: Maybe Text
registryId = Maybe Text
a} :: DescribeImages)
describeImages_imageIds :: Lens.Lens' DescribeImages (Prelude.Maybe [ImageIdentifier])
describeImages_imageIds :: (Maybe [ImageIdentifier] -> f (Maybe [ImageIdentifier]))
-> DescribeImages -> f DescribeImages
describeImages_imageIds = (DescribeImages -> Maybe [ImageIdentifier])
-> (DescribeImages -> Maybe [ImageIdentifier] -> DescribeImages)
-> Lens
DescribeImages
DescribeImages
(Maybe [ImageIdentifier])
(Maybe [ImageIdentifier])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImages' {Maybe [ImageIdentifier]
imageIds :: Maybe [ImageIdentifier]
$sel:imageIds:DescribeImages' :: DescribeImages -> Maybe [ImageIdentifier]
imageIds} -> Maybe [ImageIdentifier]
imageIds) (\s :: DescribeImages
s@DescribeImages' {} Maybe [ImageIdentifier]
a -> DescribeImages
s {$sel:imageIds:DescribeImages' :: Maybe [ImageIdentifier]
imageIds = Maybe [ImageIdentifier]
a} :: DescribeImages) ((Maybe [ImageIdentifier] -> f (Maybe [ImageIdentifier]))
-> DescribeImages -> f DescribeImages)
-> ((Maybe [ImageIdentifier] -> f (Maybe [ImageIdentifier]))
-> Maybe [ImageIdentifier] -> f (Maybe [ImageIdentifier]))
-> (Maybe [ImageIdentifier] -> f (Maybe [ImageIdentifier]))
-> DescribeImages
-> f DescribeImages
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ImageIdentifier]
[ImageIdentifier]
[ImageIdentifier]
[ImageIdentifier]
-> Iso
(Maybe [ImageIdentifier])
(Maybe [ImageIdentifier])
(Maybe [ImageIdentifier])
(Maybe [ImageIdentifier])
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
[ImageIdentifier]
[ImageIdentifier]
[ImageIdentifier]
[ImageIdentifier]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeImages_nextToken :: Lens.Lens' DescribeImages (Prelude.Maybe Prelude.Text)
describeImages_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeImages -> f DescribeImages
describeImages_nextToken = (DescribeImages -> Maybe Text)
-> (DescribeImages -> Maybe Text -> DescribeImages)
-> Lens DescribeImages DescribeImages (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImages' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeImages' :: DescribeImages -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeImages
s@DescribeImages' {} Maybe Text
a -> DescribeImages
s {$sel:nextToken:DescribeImages' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeImages)
describeImages_filter :: Lens.Lens' DescribeImages (Prelude.Maybe DescribeImagesFilter)
describeImages_filter :: (Maybe DescribeImagesFilter -> f (Maybe DescribeImagesFilter))
-> DescribeImages -> f DescribeImages
describeImages_filter = (DescribeImages -> Maybe DescribeImagesFilter)
-> (DescribeImages -> Maybe DescribeImagesFilter -> DescribeImages)
-> Lens
DescribeImages
DescribeImages
(Maybe DescribeImagesFilter)
(Maybe DescribeImagesFilter)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImages' {Maybe DescribeImagesFilter
filter' :: Maybe DescribeImagesFilter
$sel:filter':DescribeImages' :: DescribeImages -> Maybe DescribeImagesFilter
filter'} -> Maybe DescribeImagesFilter
filter') (\s :: DescribeImages
s@DescribeImages' {} Maybe DescribeImagesFilter
a -> DescribeImages
s {$sel:filter':DescribeImages' :: Maybe DescribeImagesFilter
filter' = Maybe DescribeImagesFilter
a} :: DescribeImages)
describeImages_maxResults :: Lens.Lens' DescribeImages (Prelude.Maybe Prelude.Natural)
describeImages_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeImages -> f DescribeImages
describeImages_maxResults = (DescribeImages -> Maybe Natural)
-> (DescribeImages -> Maybe Natural -> DescribeImages)
-> Lens
DescribeImages DescribeImages (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImages' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeImages' :: DescribeImages -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeImages
s@DescribeImages' {} Maybe Natural
a -> DescribeImages
s {$sel:maxResults:DescribeImages' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeImages)
describeImages_repositoryName :: Lens.Lens' DescribeImages Prelude.Text
describeImages_repositoryName :: (Text -> f Text) -> DescribeImages -> f DescribeImages
describeImages_repositoryName = (DescribeImages -> Text)
-> (DescribeImages -> Text -> DescribeImages)
-> Lens DescribeImages DescribeImages Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImages' {Text
repositoryName :: Text
$sel:repositoryName:DescribeImages' :: DescribeImages -> Text
repositoryName} -> Text
repositoryName) (\s :: DescribeImages
s@DescribeImages' {} Text
a -> DescribeImages
s {$sel:repositoryName:DescribeImages' :: Text
repositoryName = Text
a} :: DescribeImages)
instance Core.AWSPager DescribeImages where
page :: DescribeImages
-> AWSResponse DescribeImages -> Maybe DescribeImages
page DescribeImages
rq AWSResponse DescribeImages
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeImages
DescribeImagesResponse
rs
DescribeImagesResponse
-> Getting (First Text) DescribeImagesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeImagesResponse
-> Const (First Text) DescribeImagesResponse
Lens' DescribeImagesResponse (Maybe Text)
describeImagesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeImagesResponse
-> Const (First Text) DescribeImagesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeImagesResponse 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 DescribeImages
forall a. Maybe a
Prelude.Nothing
| Maybe [ImageDetail] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeImages
DescribeImagesResponse
rs
DescribeImagesResponse
-> Getting
(First [ImageDetail]) DescribeImagesResponse [ImageDetail]
-> Maybe [ImageDetail]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ImageDetail]
-> Const (First [ImageDetail]) (Maybe [ImageDetail]))
-> DescribeImagesResponse
-> Const (First [ImageDetail]) DescribeImagesResponse
Lens' DescribeImagesResponse (Maybe [ImageDetail])
describeImagesResponse_imageDetails
((Maybe [ImageDetail]
-> Const (First [ImageDetail]) (Maybe [ImageDetail]))
-> DescribeImagesResponse
-> Const (First [ImageDetail]) DescribeImagesResponse)
-> (([ImageDetail] -> Const (First [ImageDetail]) [ImageDetail])
-> Maybe [ImageDetail]
-> Const (First [ImageDetail]) (Maybe [ImageDetail]))
-> Getting
(First [ImageDetail]) DescribeImagesResponse [ImageDetail]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ImageDetail] -> Const (First [ImageDetail]) [ImageDetail])
-> Maybe [ImageDetail]
-> Const (First [ImageDetail]) (Maybe [ImageDetail])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeImages
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeImages -> Maybe DescribeImages
forall a. a -> Maybe a
Prelude.Just (DescribeImages -> Maybe DescribeImages)
-> DescribeImages -> Maybe DescribeImages
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeImages
rq
DescribeImages
-> (DescribeImages -> DescribeImages) -> DescribeImages
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeImages -> Identity DescribeImages
Lens DescribeImages DescribeImages (Maybe Text) (Maybe Text)
describeImages_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeImages -> Identity DescribeImages)
-> Maybe Text -> DescribeImages -> DescribeImages
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeImages
DescribeImagesResponse
rs
DescribeImagesResponse
-> Getting (First Text) DescribeImagesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeImagesResponse
-> Const (First Text) DescribeImagesResponse
Lens' DescribeImagesResponse (Maybe Text)
describeImagesResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeImagesResponse
-> Const (First Text) DescribeImagesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeImagesResponse 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 DescribeImages where
type
AWSResponse DescribeImages =
DescribeImagesResponse
request :: DescribeImages -> Request DescribeImages
request = Service -> DescribeImages -> Request DescribeImages
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeImages
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeImages)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeImages))
-> Logger
-> Service
-> Proxy DescribeImages
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeImages)))
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 [ImageDetail] -> Maybe Text -> Int -> DescribeImagesResponse
DescribeImagesResponse'
(Maybe [ImageDetail]
-> Maybe Text -> Int -> DescribeImagesResponse)
-> Either String (Maybe [ImageDetail])
-> Either String (Maybe Text -> Int -> DescribeImagesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [ImageDetail]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"imageDetails" Either String (Maybe (Maybe [ImageDetail]))
-> Maybe [ImageDetail] -> Either String (Maybe [ImageDetail])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ImageDetail]
forall a. Monoid a => a
Prelude.mempty)
Either String (Maybe Text -> Int -> DescribeImagesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeImagesResponse)
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 (Int -> DescribeImagesResponse)
-> Either String Int -> Either String DescribeImagesResponse
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 DescribeImages
instance Prelude.NFData DescribeImages
instance Core.ToHeaders DescribeImages where
toHeaders :: DescribeImages -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeImages -> 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.DescribeImages" ::
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 DescribeImages where
toJSON :: DescribeImages -> Value
toJSON DescribeImages' {Maybe Natural
Maybe [ImageIdentifier]
Maybe Text
Maybe DescribeImagesFilter
Text
repositoryName :: Text
maxResults :: Maybe Natural
filter' :: Maybe DescribeImagesFilter
nextToken :: Maybe Text
imageIds :: Maybe [ImageIdentifier]
registryId :: Maybe Text
$sel:repositoryName:DescribeImages' :: DescribeImages -> Text
$sel:maxResults:DescribeImages' :: DescribeImages -> Maybe Natural
$sel:filter':DescribeImages' :: DescribeImages -> Maybe DescribeImagesFilter
$sel:nextToken:DescribeImages' :: DescribeImages -> Maybe Text
$sel:imageIds:DescribeImages' :: DescribeImages -> Maybe [ImageIdentifier]
$sel:registryId:DescribeImages' :: DescribeImages -> 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
"imageIds" Text -> [ImageIdentifier] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([ImageIdentifier] -> Pair)
-> Maybe [ImageIdentifier] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ImageIdentifier]
imageIds,
(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
"filter" Text -> DescribeImagesFilter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (DescribeImagesFilter -> Pair)
-> Maybe DescribeImagesFilter -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DescribeImagesFilter
filter',
(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)
]
)
instance Core.ToPath DescribeImages where
toPath :: DescribeImages -> ByteString
toPath = ByteString -> DescribeImages -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeImages where
toQuery :: DescribeImages -> QueryString
toQuery = QueryString -> DescribeImages -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeImagesResponse = DescribeImagesResponse'
{
DescribeImagesResponse -> Maybe [ImageDetail]
imageDetails :: Prelude.Maybe [ImageDetail],
DescribeImagesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeImagesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeImagesResponse -> DescribeImagesResponse -> Bool
(DescribeImagesResponse -> DescribeImagesResponse -> Bool)
-> (DescribeImagesResponse -> DescribeImagesResponse -> Bool)
-> Eq DescribeImagesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeImagesResponse -> DescribeImagesResponse -> Bool
$c/= :: DescribeImagesResponse -> DescribeImagesResponse -> Bool
== :: DescribeImagesResponse -> DescribeImagesResponse -> Bool
$c== :: DescribeImagesResponse -> DescribeImagesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeImagesResponse]
ReadPrec DescribeImagesResponse
Int -> ReadS DescribeImagesResponse
ReadS [DescribeImagesResponse]
(Int -> ReadS DescribeImagesResponse)
-> ReadS [DescribeImagesResponse]
-> ReadPrec DescribeImagesResponse
-> ReadPrec [DescribeImagesResponse]
-> Read DescribeImagesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeImagesResponse]
$creadListPrec :: ReadPrec [DescribeImagesResponse]
readPrec :: ReadPrec DescribeImagesResponse
$creadPrec :: ReadPrec DescribeImagesResponse
readList :: ReadS [DescribeImagesResponse]
$creadList :: ReadS [DescribeImagesResponse]
readsPrec :: Int -> ReadS DescribeImagesResponse
$creadsPrec :: Int -> ReadS DescribeImagesResponse
Prelude.Read, Int -> DescribeImagesResponse -> ShowS
[DescribeImagesResponse] -> ShowS
DescribeImagesResponse -> String
(Int -> DescribeImagesResponse -> ShowS)
-> (DescribeImagesResponse -> String)
-> ([DescribeImagesResponse] -> ShowS)
-> Show DescribeImagesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeImagesResponse] -> ShowS
$cshowList :: [DescribeImagesResponse] -> ShowS
show :: DescribeImagesResponse -> String
$cshow :: DescribeImagesResponse -> String
showsPrec :: Int -> DescribeImagesResponse -> ShowS
$cshowsPrec :: Int -> DescribeImagesResponse -> ShowS
Prelude.Show, (forall x. DescribeImagesResponse -> Rep DescribeImagesResponse x)
-> (forall x.
Rep DescribeImagesResponse x -> DescribeImagesResponse)
-> Generic DescribeImagesResponse
forall x. Rep DescribeImagesResponse x -> DescribeImagesResponse
forall x. DescribeImagesResponse -> Rep DescribeImagesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeImagesResponse x -> DescribeImagesResponse
$cfrom :: forall x. DescribeImagesResponse -> Rep DescribeImagesResponse x
Prelude.Generic)
newDescribeImagesResponse ::
Prelude.Int ->
DescribeImagesResponse
newDescribeImagesResponse :: Int -> DescribeImagesResponse
newDescribeImagesResponse Int
pHttpStatus_ =
DescribeImagesResponse' :: Maybe [ImageDetail] -> Maybe Text -> Int -> DescribeImagesResponse
DescribeImagesResponse'
{ $sel:imageDetails:DescribeImagesResponse' :: Maybe [ImageDetail]
imageDetails =
Maybe [ImageDetail]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeImagesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeImagesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeImagesResponse_imageDetails :: Lens.Lens' DescribeImagesResponse (Prelude.Maybe [ImageDetail])
describeImagesResponse_imageDetails :: (Maybe [ImageDetail] -> f (Maybe [ImageDetail]))
-> DescribeImagesResponse -> f DescribeImagesResponse
describeImagesResponse_imageDetails = (DescribeImagesResponse -> Maybe [ImageDetail])
-> (DescribeImagesResponse
-> Maybe [ImageDetail] -> DescribeImagesResponse)
-> Lens' DescribeImagesResponse (Maybe [ImageDetail])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImagesResponse' {Maybe [ImageDetail]
imageDetails :: Maybe [ImageDetail]
$sel:imageDetails:DescribeImagesResponse' :: DescribeImagesResponse -> Maybe [ImageDetail]
imageDetails} -> Maybe [ImageDetail]
imageDetails) (\s :: DescribeImagesResponse
s@DescribeImagesResponse' {} Maybe [ImageDetail]
a -> DescribeImagesResponse
s {$sel:imageDetails:DescribeImagesResponse' :: Maybe [ImageDetail]
imageDetails = Maybe [ImageDetail]
a} :: DescribeImagesResponse) ((Maybe [ImageDetail] -> f (Maybe [ImageDetail]))
-> DescribeImagesResponse -> f DescribeImagesResponse)
-> ((Maybe [ImageDetail] -> f (Maybe [ImageDetail]))
-> Maybe [ImageDetail] -> f (Maybe [ImageDetail]))
-> (Maybe [ImageDetail] -> f (Maybe [ImageDetail]))
-> DescribeImagesResponse
-> f DescribeImagesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ImageDetail] [ImageDetail] [ImageDetail] [ImageDetail]
-> Iso
(Maybe [ImageDetail])
(Maybe [ImageDetail])
(Maybe [ImageDetail])
(Maybe [ImageDetail])
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 [ImageDetail] [ImageDetail] [ImageDetail] [ImageDetail]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeImagesResponse_nextToken :: Lens.Lens' DescribeImagesResponse (Prelude.Maybe Prelude.Text)
describeImagesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeImagesResponse -> f DescribeImagesResponse
describeImagesResponse_nextToken = (DescribeImagesResponse -> Maybe Text)
-> (DescribeImagesResponse -> Maybe Text -> DescribeImagesResponse)
-> Lens' DescribeImagesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImagesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeImagesResponse' :: DescribeImagesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeImagesResponse
s@DescribeImagesResponse' {} Maybe Text
a -> DescribeImagesResponse
s {$sel:nextToken:DescribeImagesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeImagesResponse)
describeImagesResponse_httpStatus :: Lens.Lens' DescribeImagesResponse Prelude.Int
describeImagesResponse_httpStatus :: (Int -> f Int)
-> DescribeImagesResponse -> f DescribeImagesResponse
describeImagesResponse_httpStatus = (DescribeImagesResponse -> Int)
-> (DescribeImagesResponse -> Int -> DescribeImagesResponse)
-> Lens DescribeImagesResponse DescribeImagesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImagesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeImagesResponse' :: DescribeImagesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeImagesResponse
s@DescribeImagesResponse' {} Int
a -> DescribeImagesResponse
s {$sel:httpStatus:DescribeImagesResponse' :: Int
httpStatus = Int
a} :: DescribeImagesResponse)
instance Prelude.NFData DescribeImagesResponse