{-# 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.CodeBuild.ListCuratedEnvironmentImages
(
ListCuratedEnvironmentImages (..),
newListCuratedEnvironmentImages,
ListCuratedEnvironmentImagesResponse (..),
newListCuratedEnvironmentImagesResponse,
listCuratedEnvironmentImagesResponse_platforms,
listCuratedEnvironmentImagesResponse_httpStatus,
)
where
import Amazonka.CodeBuild.Types
import qualified Amazonka.Core as Core
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 ListCuratedEnvironmentImages = ListCuratedEnvironmentImages'
{
}
deriving (ListCuratedEnvironmentImages
-> ListCuratedEnvironmentImages -> Bool
(ListCuratedEnvironmentImages
-> ListCuratedEnvironmentImages -> Bool)
-> (ListCuratedEnvironmentImages
-> ListCuratedEnvironmentImages -> Bool)
-> Eq ListCuratedEnvironmentImages
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCuratedEnvironmentImages
-> ListCuratedEnvironmentImages -> Bool
$c/= :: ListCuratedEnvironmentImages
-> ListCuratedEnvironmentImages -> Bool
== :: ListCuratedEnvironmentImages
-> ListCuratedEnvironmentImages -> Bool
$c== :: ListCuratedEnvironmentImages
-> ListCuratedEnvironmentImages -> Bool
Prelude.Eq, ReadPrec [ListCuratedEnvironmentImages]
ReadPrec ListCuratedEnvironmentImages
Int -> ReadS ListCuratedEnvironmentImages
ReadS [ListCuratedEnvironmentImages]
(Int -> ReadS ListCuratedEnvironmentImages)
-> ReadS [ListCuratedEnvironmentImages]
-> ReadPrec ListCuratedEnvironmentImages
-> ReadPrec [ListCuratedEnvironmentImages]
-> Read ListCuratedEnvironmentImages
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCuratedEnvironmentImages]
$creadListPrec :: ReadPrec [ListCuratedEnvironmentImages]
readPrec :: ReadPrec ListCuratedEnvironmentImages
$creadPrec :: ReadPrec ListCuratedEnvironmentImages
readList :: ReadS [ListCuratedEnvironmentImages]
$creadList :: ReadS [ListCuratedEnvironmentImages]
readsPrec :: Int -> ReadS ListCuratedEnvironmentImages
$creadsPrec :: Int -> ReadS ListCuratedEnvironmentImages
Prelude.Read, Int -> ListCuratedEnvironmentImages -> ShowS
[ListCuratedEnvironmentImages] -> ShowS
ListCuratedEnvironmentImages -> String
(Int -> ListCuratedEnvironmentImages -> ShowS)
-> (ListCuratedEnvironmentImages -> String)
-> ([ListCuratedEnvironmentImages] -> ShowS)
-> Show ListCuratedEnvironmentImages
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCuratedEnvironmentImages] -> ShowS
$cshowList :: [ListCuratedEnvironmentImages] -> ShowS
show :: ListCuratedEnvironmentImages -> String
$cshow :: ListCuratedEnvironmentImages -> String
showsPrec :: Int -> ListCuratedEnvironmentImages -> ShowS
$cshowsPrec :: Int -> ListCuratedEnvironmentImages -> ShowS
Prelude.Show, (forall x.
ListCuratedEnvironmentImages -> Rep ListCuratedEnvironmentImages x)
-> (forall x.
Rep ListCuratedEnvironmentImages x -> ListCuratedEnvironmentImages)
-> Generic ListCuratedEnvironmentImages
forall x.
Rep ListCuratedEnvironmentImages x -> ListCuratedEnvironmentImages
forall x.
ListCuratedEnvironmentImages -> Rep ListCuratedEnvironmentImages x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCuratedEnvironmentImages x -> ListCuratedEnvironmentImages
$cfrom :: forall x.
ListCuratedEnvironmentImages -> Rep ListCuratedEnvironmentImages x
Prelude.Generic)
newListCuratedEnvironmentImages ::
ListCuratedEnvironmentImages
newListCuratedEnvironmentImages :: ListCuratedEnvironmentImages
newListCuratedEnvironmentImages =
ListCuratedEnvironmentImages
ListCuratedEnvironmentImages'
instance Core.AWSRequest ListCuratedEnvironmentImages where
type
AWSResponse ListCuratedEnvironmentImages =
ListCuratedEnvironmentImagesResponse
request :: ListCuratedEnvironmentImages
-> Request ListCuratedEnvironmentImages
request = Service
-> ListCuratedEnvironmentImages
-> Request ListCuratedEnvironmentImages
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListCuratedEnvironmentImages
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListCuratedEnvironmentImages)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListCuratedEnvironmentImages))
-> Logger
-> Service
-> Proxy ListCuratedEnvironmentImages
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListCuratedEnvironmentImages)))
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 [EnvironmentPlatform]
-> Int -> ListCuratedEnvironmentImagesResponse
ListCuratedEnvironmentImagesResponse'
(Maybe [EnvironmentPlatform]
-> Int -> ListCuratedEnvironmentImagesResponse)
-> Either String (Maybe [EnvironmentPlatform])
-> Either String (Int -> ListCuratedEnvironmentImagesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Key -> Either String (Maybe (Maybe [EnvironmentPlatform]))
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Core..?> Key
"platforms" Either String (Maybe (Maybe [EnvironmentPlatform]))
-> Maybe [EnvironmentPlatform]
-> Either String (Maybe [EnvironmentPlatform])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [EnvironmentPlatform]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> ListCuratedEnvironmentImagesResponse)
-> Either String Int
-> Either String ListCuratedEnvironmentImagesResponse
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
ListCuratedEnvironmentImages
instance Prelude.NFData ListCuratedEnvironmentImages
instance Core.ToHeaders ListCuratedEnvironmentImages where
toHeaders :: ListCuratedEnvironmentImages -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListCuratedEnvironmentImages -> 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
"CodeBuild_20161006.ListCuratedEnvironmentImages" ::
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 ListCuratedEnvironmentImages where
toJSON :: ListCuratedEnvironmentImages -> Value
toJSON = Value -> ListCuratedEnvironmentImages -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)
instance Core.ToPath ListCuratedEnvironmentImages where
toPath :: ListCuratedEnvironmentImages -> ByteString
toPath = ByteString -> ListCuratedEnvironmentImages -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListCuratedEnvironmentImages where
toQuery :: ListCuratedEnvironmentImages -> QueryString
toQuery = QueryString -> ListCuratedEnvironmentImages -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListCuratedEnvironmentImagesResponse = ListCuratedEnvironmentImagesResponse'
{
ListCuratedEnvironmentImagesResponse -> Maybe [EnvironmentPlatform]
platforms :: Prelude.Maybe [EnvironmentPlatform],
ListCuratedEnvironmentImagesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListCuratedEnvironmentImagesResponse
-> ListCuratedEnvironmentImagesResponse -> Bool
(ListCuratedEnvironmentImagesResponse
-> ListCuratedEnvironmentImagesResponse -> Bool)
-> (ListCuratedEnvironmentImagesResponse
-> ListCuratedEnvironmentImagesResponse -> Bool)
-> Eq ListCuratedEnvironmentImagesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCuratedEnvironmentImagesResponse
-> ListCuratedEnvironmentImagesResponse -> Bool
$c/= :: ListCuratedEnvironmentImagesResponse
-> ListCuratedEnvironmentImagesResponse -> Bool
== :: ListCuratedEnvironmentImagesResponse
-> ListCuratedEnvironmentImagesResponse -> Bool
$c== :: ListCuratedEnvironmentImagesResponse
-> ListCuratedEnvironmentImagesResponse -> Bool
Prelude.Eq, ReadPrec [ListCuratedEnvironmentImagesResponse]
ReadPrec ListCuratedEnvironmentImagesResponse
Int -> ReadS ListCuratedEnvironmentImagesResponse
ReadS [ListCuratedEnvironmentImagesResponse]
(Int -> ReadS ListCuratedEnvironmentImagesResponse)
-> ReadS [ListCuratedEnvironmentImagesResponse]
-> ReadPrec ListCuratedEnvironmentImagesResponse
-> ReadPrec [ListCuratedEnvironmentImagesResponse]
-> Read ListCuratedEnvironmentImagesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCuratedEnvironmentImagesResponse]
$creadListPrec :: ReadPrec [ListCuratedEnvironmentImagesResponse]
readPrec :: ReadPrec ListCuratedEnvironmentImagesResponse
$creadPrec :: ReadPrec ListCuratedEnvironmentImagesResponse
readList :: ReadS [ListCuratedEnvironmentImagesResponse]
$creadList :: ReadS [ListCuratedEnvironmentImagesResponse]
readsPrec :: Int -> ReadS ListCuratedEnvironmentImagesResponse
$creadsPrec :: Int -> ReadS ListCuratedEnvironmentImagesResponse
Prelude.Read, Int -> ListCuratedEnvironmentImagesResponse -> ShowS
[ListCuratedEnvironmentImagesResponse] -> ShowS
ListCuratedEnvironmentImagesResponse -> String
(Int -> ListCuratedEnvironmentImagesResponse -> ShowS)
-> (ListCuratedEnvironmentImagesResponse -> String)
-> ([ListCuratedEnvironmentImagesResponse] -> ShowS)
-> Show ListCuratedEnvironmentImagesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCuratedEnvironmentImagesResponse] -> ShowS
$cshowList :: [ListCuratedEnvironmentImagesResponse] -> ShowS
show :: ListCuratedEnvironmentImagesResponse -> String
$cshow :: ListCuratedEnvironmentImagesResponse -> String
showsPrec :: Int -> ListCuratedEnvironmentImagesResponse -> ShowS
$cshowsPrec :: Int -> ListCuratedEnvironmentImagesResponse -> ShowS
Prelude.Show, (forall x.
ListCuratedEnvironmentImagesResponse
-> Rep ListCuratedEnvironmentImagesResponse x)
-> (forall x.
Rep ListCuratedEnvironmentImagesResponse x
-> ListCuratedEnvironmentImagesResponse)
-> Generic ListCuratedEnvironmentImagesResponse
forall x.
Rep ListCuratedEnvironmentImagesResponse x
-> ListCuratedEnvironmentImagesResponse
forall x.
ListCuratedEnvironmentImagesResponse
-> Rep ListCuratedEnvironmentImagesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCuratedEnvironmentImagesResponse x
-> ListCuratedEnvironmentImagesResponse
$cfrom :: forall x.
ListCuratedEnvironmentImagesResponse
-> Rep ListCuratedEnvironmentImagesResponse x
Prelude.Generic)
newListCuratedEnvironmentImagesResponse ::
Prelude.Int ->
ListCuratedEnvironmentImagesResponse
newListCuratedEnvironmentImagesResponse :: Int -> ListCuratedEnvironmentImagesResponse
newListCuratedEnvironmentImagesResponse Int
pHttpStatus_ =
ListCuratedEnvironmentImagesResponse' :: Maybe [EnvironmentPlatform]
-> Int -> ListCuratedEnvironmentImagesResponse
ListCuratedEnvironmentImagesResponse'
{ $sel:platforms:ListCuratedEnvironmentImagesResponse' :: Maybe [EnvironmentPlatform]
platforms =
Maybe [EnvironmentPlatform]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListCuratedEnvironmentImagesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listCuratedEnvironmentImagesResponse_platforms :: Lens.Lens' ListCuratedEnvironmentImagesResponse (Prelude.Maybe [EnvironmentPlatform])
listCuratedEnvironmentImagesResponse_platforms :: (Maybe [EnvironmentPlatform] -> f (Maybe [EnvironmentPlatform]))
-> ListCuratedEnvironmentImagesResponse
-> f ListCuratedEnvironmentImagesResponse
listCuratedEnvironmentImagesResponse_platforms = (ListCuratedEnvironmentImagesResponse
-> Maybe [EnvironmentPlatform])
-> (ListCuratedEnvironmentImagesResponse
-> Maybe [EnvironmentPlatform]
-> ListCuratedEnvironmentImagesResponse)
-> Lens
ListCuratedEnvironmentImagesResponse
ListCuratedEnvironmentImagesResponse
(Maybe [EnvironmentPlatform])
(Maybe [EnvironmentPlatform])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCuratedEnvironmentImagesResponse' {Maybe [EnvironmentPlatform]
platforms :: Maybe [EnvironmentPlatform]
$sel:platforms:ListCuratedEnvironmentImagesResponse' :: ListCuratedEnvironmentImagesResponse -> Maybe [EnvironmentPlatform]
platforms} -> Maybe [EnvironmentPlatform]
platforms) (\s :: ListCuratedEnvironmentImagesResponse
s@ListCuratedEnvironmentImagesResponse' {} Maybe [EnvironmentPlatform]
a -> ListCuratedEnvironmentImagesResponse
s {$sel:platforms:ListCuratedEnvironmentImagesResponse' :: Maybe [EnvironmentPlatform]
platforms = Maybe [EnvironmentPlatform]
a} :: ListCuratedEnvironmentImagesResponse) ((Maybe [EnvironmentPlatform] -> f (Maybe [EnvironmentPlatform]))
-> ListCuratedEnvironmentImagesResponse
-> f ListCuratedEnvironmentImagesResponse)
-> ((Maybe [EnvironmentPlatform]
-> f (Maybe [EnvironmentPlatform]))
-> Maybe [EnvironmentPlatform] -> f (Maybe [EnvironmentPlatform]))
-> (Maybe [EnvironmentPlatform] -> f (Maybe [EnvironmentPlatform]))
-> ListCuratedEnvironmentImagesResponse
-> f ListCuratedEnvironmentImagesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[EnvironmentPlatform]
[EnvironmentPlatform]
[EnvironmentPlatform]
[EnvironmentPlatform]
-> Iso
(Maybe [EnvironmentPlatform])
(Maybe [EnvironmentPlatform])
(Maybe [EnvironmentPlatform])
(Maybe [EnvironmentPlatform])
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
[EnvironmentPlatform]
[EnvironmentPlatform]
[EnvironmentPlatform]
[EnvironmentPlatform]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listCuratedEnvironmentImagesResponse_httpStatus :: Lens.Lens' ListCuratedEnvironmentImagesResponse Prelude.Int
listCuratedEnvironmentImagesResponse_httpStatus :: (Int -> f Int)
-> ListCuratedEnvironmentImagesResponse
-> f ListCuratedEnvironmentImagesResponse
listCuratedEnvironmentImagesResponse_httpStatus = (ListCuratedEnvironmentImagesResponse -> Int)
-> (ListCuratedEnvironmentImagesResponse
-> Int -> ListCuratedEnvironmentImagesResponse)
-> Lens
ListCuratedEnvironmentImagesResponse
ListCuratedEnvironmentImagesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCuratedEnvironmentImagesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListCuratedEnvironmentImagesResponse' :: ListCuratedEnvironmentImagesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListCuratedEnvironmentImagesResponse
s@ListCuratedEnvironmentImagesResponse' {} Int
a -> ListCuratedEnvironmentImagesResponse
s {$sel:httpStatus:ListCuratedEnvironmentImagesResponse' :: Int
httpStatus = Int
a} :: ListCuratedEnvironmentImagesResponse)
instance
Prelude.NFData
ListCuratedEnvironmentImagesResponse