{-# 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.DescribeCodeCoverages
(
DescribeCodeCoverages (..),
newDescribeCodeCoverages,
describeCodeCoverages_minLineCoveragePercentage,
describeCodeCoverages_sortOrder,
describeCodeCoverages_maxLineCoveragePercentage,
describeCodeCoverages_nextToken,
describeCodeCoverages_maxResults,
describeCodeCoverages_sortBy,
describeCodeCoverages_reportArn,
DescribeCodeCoveragesResponse (..),
newDescribeCodeCoveragesResponse,
describeCodeCoveragesResponse_codeCoverages,
describeCodeCoveragesResponse_nextToken,
describeCodeCoveragesResponse_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 DescribeCodeCoverages = DescribeCodeCoverages'
{
DescribeCodeCoverages -> Maybe Double
minLineCoveragePercentage :: Prelude.Maybe Prelude.Double,
DescribeCodeCoverages -> Maybe SortOrderType
sortOrder :: Prelude.Maybe SortOrderType,
DescribeCodeCoverages -> Maybe Double
maxLineCoveragePercentage :: Prelude.Maybe Prelude.Double,
DescribeCodeCoverages -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeCodeCoverages -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
DescribeCodeCoverages -> Maybe ReportCodeCoverageSortByType
sortBy :: Prelude.Maybe ReportCodeCoverageSortByType,
DescribeCodeCoverages -> Text
reportArn :: Prelude.Text
}
deriving (DescribeCodeCoverages -> DescribeCodeCoverages -> Bool
(DescribeCodeCoverages -> DescribeCodeCoverages -> Bool)
-> (DescribeCodeCoverages -> DescribeCodeCoverages -> Bool)
-> Eq DescribeCodeCoverages
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCodeCoverages -> DescribeCodeCoverages -> Bool
$c/= :: DescribeCodeCoverages -> DescribeCodeCoverages -> Bool
== :: DescribeCodeCoverages -> DescribeCodeCoverages -> Bool
$c== :: DescribeCodeCoverages -> DescribeCodeCoverages -> Bool
Prelude.Eq, ReadPrec [DescribeCodeCoverages]
ReadPrec DescribeCodeCoverages
Int -> ReadS DescribeCodeCoverages
ReadS [DescribeCodeCoverages]
(Int -> ReadS DescribeCodeCoverages)
-> ReadS [DescribeCodeCoverages]
-> ReadPrec DescribeCodeCoverages
-> ReadPrec [DescribeCodeCoverages]
-> Read DescribeCodeCoverages
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCodeCoverages]
$creadListPrec :: ReadPrec [DescribeCodeCoverages]
readPrec :: ReadPrec DescribeCodeCoverages
$creadPrec :: ReadPrec DescribeCodeCoverages
readList :: ReadS [DescribeCodeCoverages]
$creadList :: ReadS [DescribeCodeCoverages]
readsPrec :: Int -> ReadS DescribeCodeCoverages
$creadsPrec :: Int -> ReadS DescribeCodeCoverages
Prelude.Read, Int -> DescribeCodeCoverages -> ShowS
[DescribeCodeCoverages] -> ShowS
DescribeCodeCoverages -> String
(Int -> DescribeCodeCoverages -> ShowS)
-> (DescribeCodeCoverages -> String)
-> ([DescribeCodeCoverages] -> ShowS)
-> Show DescribeCodeCoverages
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCodeCoverages] -> ShowS
$cshowList :: [DescribeCodeCoverages] -> ShowS
show :: DescribeCodeCoverages -> String
$cshow :: DescribeCodeCoverages -> String
showsPrec :: Int -> DescribeCodeCoverages -> ShowS
$cshowsPrec :: Int -> DescribeCodeCoverages -> ShowS
Prelude.Show, (forall x. DescribeCodeCoverages -> Rep DescribeCodeCoverages x)
-> (forall x. Rep DescribeCodeCoverages x -> DescribeCodeCoverages)
-> Generic DescribeCodeCoverages
forall x. Rep DescribeCodeCoverages x -> DescribeCodeCoverages
forall x. DescribeCodeCoverages -> Rep DescribeCodeCoverages x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeCodeCoverages x -> DescribeCodeCoverages
$cfrom :: forall x. DescribeCodeCoverages -> Rep DescribeCodeCoverages x
Prelude.Generic)
newDescribeCodeCoverages ::
Prelude.Text ->
DescribeCodeCoverages
newDescribeCodeCoverages :: Text -> DescribeCodeCoverages
newDescribeCodeCoverages Text
pReportArn_ =
DescribeCodeCoverages' :: Maybe Double
-> Maybe SortOrderType
-> Maybe Double
-> Maybe Text
-> Maybe Natural
-> Maybe ReportCodeCoverageSortByType
-> Text
-> DescribeCodeCoverages
DescribeCodeCoverages'
{ $sel:minLineCoveragePercentage:DescribeCodeCoverages' :: Maybe Double
minLineCoveragePercentage =
Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:sortOrder:DescribeCodeCoverages' :: Maybe SortOrderType
sortOrder = Maybe SortOrderType
forall a. Maybe a
Prelude.Nothing,
$sel:maxLineCoveragePercentage:DescribeCodeCoverages' :: Maybe Double
maxLineCoveragePercentage = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeCodeCoverages' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeCodeCoverages' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:sortBy:DescribeCodeCoverages' :: Maybe ReportCodeCoverageSortByType
sortBy = Maybe ReportCodeCoverageSortByType
forall a. Maybe a
Prelude.Nothing,
$sel:reportArn:DescribeCodeCoverages' :: Text
reportArn = Text
pReportArn_
}
describeCodeCoverages_minLineCoveragePercentage :: Lens.Lens' DescribeCodeCoverages (Prelude.Maybe Prelude.Double)
describeCodeCoverages_minLineCoveragePercentage :: (Maybe Double -> f (Maybe Double))
-> DescribeCodeCoverages -> f DescribeCodeCoverages
describeCodeCoverages_minLineCoveragePercentage = (DescribeCodeCoverages -> Maybe Double)
-> (DescribeCodeCoverages -> Maybe Double -> DescribeCodeCoverages)
-> Lens
DescribeCodeCoverages
DescribeCodeCoverages
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeCoverages' {Maybe Double
minLineCoveragePercentage :: Maybe Double
$sel:minLineCoveragePercentage:DescribeCodeCoverages' :: DescribeCodeCoverages -> Maybe Double
minLineCoveragePercentage} -> Maybe Double
minLineCoveragePercentage) (\s :: DescribeCodeCoverages
s@DescribeCodeCoverages' {} Maybe Double
a -> DescribeCodeCoverages
s {$sel:minLineCoveragePercentage:DescribeCodeCoverages' :: Maybe Double
minLineCoveragePercentage = Maybe Double
a} :: DescribeCodeCoverages)
describeCodeCoverages_sortOrder :: Lens.Lens' DescribeCodeCoverages (Prelude.Maybe SortOrderType)
describeCodeCoverages_sortOrder :: (Maybe SortOrderType -> f (Maybe SortOrderType))
-> DescribeCodeCoverages -> f DescribeCodeCoverages
describeCodeCoverages_sortOrder = (DescribeCodeCoverages -> Maybe SortOrderType)
-> (DescribeCodeCoverages
-> Maybe SortOrderType -> DescribeCodeCoverages)
-> Lens
DescribeCodeCoverages
DescribeCodeCoverages
(Maybe SortOrderType)
(Maybe SortOrderType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeCoverages' {Maybe SortOrderType
sortOrder :: Maybe SortOrderType
$sel:sortOrder:DescribeCodeCoverages' :: DescribeCodeCoverages -> Maybe SortOrderType
sortOrder} -> Maybe SortOrderType
sortOrder) (\s :: DescribeCodeCoverages
s@DescribeCodeCoverages' {} Maybe SortOrderType
a -> DescribeCodeCoverages
s {$sel:sortOrder:DescribeCodeCoverages' :: Maybe SortOrderType
sortOrder = Maybe SortOrderType
a} :: DescribeCodeCoverages)
describeCodeCoverages_maxLineCoveragePercentage :: Lens.Lens' DescribeCodeCoverages (Prelude.Maybe Prelude.Double)
describeCodeCoverages_maxLineCoveragePercentage :: (Maybe Double -> f (Maybe Double))
-> DescribeCodeCoverages -> f DescribeCodeCoverages
describeCodeCoverages_maxLineCoveragePercentage = (DescribeCodeCoverages -> Maybe Double)
-> (DescribeCodeCoverages -> Maybe Double -> DescribeCodeCoverages)
-> Lens
DescribeCodeCoverages
DescribeCodeCoverages
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeCoverages' {Maybe Double
maxLineCoveragePercentage :: Maybe Double
$sel:maxLineCoveragePercentage:DescribeCodeCoverages' :: DescribeCodeCoverages -> Maybe Double
maxLineCoveragePercentage} -> Maybe Double
maxLineCoveragePercentage) (\s :: DescribeCodeCoverages
s@DescribeCodeCoverages' {} Maybe Double
a -> DescribeCodeCoverages
s {$sel:maxLineCoveragePercentage:DescribeCodeCoverages' :: Maybe Double
maxLineCoveragePercentage = Maybe Double
a} :: DescribeCodeCoverages)
describeCodeCoverages_nextToken :: Lens.Lens' DescribeCodeCoverages (Prelude.Maybe Prelude.Text)
describeCodeCoverages_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeCodeCoverages -> f DescribeCodeCoverages
describeCodeCoverages_nextToken = (DescribeCodeCoverages -> Maybe Text)
-> (DescribeCodeCoverages -> Maybe Text -> DescribeCodeCoverages)
-> Lens
DescribeCodeCoverages
DescribeCodeCoverages
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeCoverages' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeCodeCoverages' :: DescribeCodeCoverages -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeCodeCoverages
s@DescribeCodeCoverages' {} Maybe Text
a -> DescribeCodeCoverages
s {$sel:nextToken:DescribeCodeCoverages' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeCodeCoverages)
describeCodeCoverages_maxResults :: Lens.Lens' DescribeCodeCoverages (Prelude.Maybe Prelude.Natural)
describeCodeCoverages_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeCodeCoverages -> f DescribeCodeCoverages
describeCodeCoverages_maxResults = (DescribeCodeCoverages -> Maybe Natural)
-> (DescribeCodeCoverages
-> Maybe Natural -> DescribeCodeCoverages)
-> Lens
DescribeCodeCoverages
DescribeCodeCoverages
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeCoverages' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeCodeCoverages' :: DescribeCodeCoverages -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeCodeCoverages
s@DescribeCodeCoverages' {} Maybe Natural
a -> DescribeCodeCoverages
s {$sel:maxResults:DescribeCodeCoverages' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeCodeCoverages)
describeCodeCoverages_sortBy :: Lens.Lens' DescribeCodeCoverages (Prelude.Maybe ReportCodeCoverageSortByType)
describeCodeCoverages_sortBy :: (Maybe ReportCodeCoverageSortByType
-> f (Maybe ReportCodeCoverageSortByType))
-> DescribeCodeCoverages -> f DescribeCodeCoverages
describeCodeCoverages_sortBy = (DescribeCodeCoverages -> Maybe ReportCodeCoverageSortByType)
-> (DescribeCodeCoverages
-> Maybe ReportCodeCoverageSortByType -> DescribeCodeCoverages)
-> Lens
DescribeCodeCoverages
DescribeCodeCoverages
(Maybe ReportCodeCoverageSortByType)
(Maybe ReportCodeCoverageSortByType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeCoverages' {Maybe ReportCodeCoverageSortByType
sortBy :: Maybe ReportCodeCoverageSortByType
$sel:sortBy:DescribeCodeCoverages' :: DescribeCodeCoverages -> Maybe ReportCodeCoverageSortByType
sortBy} -> Maybe ReportCodeCoverageSortByType
sortBy) (\s :: DescribeCodeCoverages
s@DescribeCodeCoverages' {} Maybe ReportCodeCoverageSortByType
a -> DescribeCodeCoverages
s {$sel:sortBy:DescribeCodeCoverages' :: Maybe ReportCodeCoverageSortByType
sortBy = Maybe ReportCodeCoverageSortByType
a} :: DescribeCodeCoverages)
describeCodeCoverages_reportArn :: Lens.Lens' DescribeCodeCoverages Prelude.Text
describeCodeCoverages_reportArn :: (Text -> f Text)
-> DescribeCodeCoverages -> f DescribeCodeCoverages
describeCodeCoverages_reportArn = (DescribeCodeCoverages -> Text)
-> (DescribeCodeCoverages -> Text -> DescribeCodeCoverages)
-> Lens DescribeCodeCoverages DescribeCodeCoverages Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeCoverages' {Text
reportArn :: Text
$sel:reportArn:DescribeCodeCoverages' :: DescribeCodeCoverages -> Text
reportArn} -> Text
reportArn) (\s :: DescribeCodeCoverages
s@DescribeCodeCoverages' {} Text
a -> DescribeCodeCoverages
s {$sel:reportArn:DescribeCodeCoverages' :: Text
reportArn = Text
a} :: DescribeCodeCoverages)
instance Core.AWSPager DescribeCodeCoverages where
page :: DescribeCodeCoverages
-> AWSResponse DescribeCodeCoverages -> Maybe DescribeCodeCoverages
page DescribeCodeCoverages
rq AWSResponse DescribeCodeCoverages
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeCodeCoverages
DescribeCodeCoveragesResponse
rs
DescribeCodeCoveragesResponse
-> Getting (First Text) DescribeCodeCoveragesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeCodeCoveragesResponse
-> Const (First Text) DescribeCodeCoveragesResponse
Lens' DescribeCodeCoveragesResponse (Maybe Text)
describeCodeCoveragesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeCodeCoveragesResponse
-> Const (First Text) DescribeCodeCoveragesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeCodeCoveragesResponse 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 DescribeCodeCoverages
forall a. Maybe a
Prelude.Nothing
| Maybe [CodeCoverage] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeCodeCoverages
DescribeCodeCoveragesResponse
rs
DescribeCodeCoveragesResponse
-> Getting
(First [CodeCoverage]) DescribeCodeCoveragesResponse [CodeCoverage]
-> Maybe [CodeCoverage]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [CodeCoverage]
-> Const (First [CodeCoverage]) (Maybe [CodeCoverage]))
-> DescribeCodeCoveragesResponse
-> Const (First [CodeCoverage]) DescribeCodeCoveragesResponse
Lens' DescribeCodeCoveragesResponse (Maybe [CodeCoverage])
describeCodeCoveragesResponse_codeCoverages
((Maybe [CodeCoverage]
-> Const (First [CodeCoverage]) (Maybe [CodeCoverage]))
-> DescribeCodeCoveragesResponse
-> Const (First [CodeCoverage]) DescribeCodeCoveragesResponse)
-> (([CodeCoverage] -> Const (First [CodeCoverage]) [CodeCoverage])
-> Maybe [CodeCoverage]
-> Const (First [CodeCoverage]) (Maybe [CodeCoverage]))
-> Getting
(First [CodeCoverage]) DescribeCodeCoveragesResponse [CodeCoverage]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([CodeCoverage] -> Const (First [CodeCoverage]) [CodeCoverage])
-> Maybe [CodeCoverage]
-> Const (First [CodeCoverage]) (Maybe [CodeCoverage])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeCodeCoverages
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeCodeCoverages -> Maybe DescribeCodeCoverages
forall a. a -> Maybe a
Prelude.Just (DescribeCodeCoverages -> Maybe DescribeCodeCoverages)
-> DescribeCodeCoverages -> Maybe DescribeCodeCoverages
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeCodeCoverages
rq
DescribeCodeCoverages
-> (DescribeCodeCoverages -> DescribeCodeCoverages)
-> DescribeCodeCoverages
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeCodeCoverages -> Identity DescribeCodeCoverages
Lens
DescribeCodeCoverages
DescribeCodeCoverages
(Maybe Text)
(Maybe Text)
describeCodeCoverages_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeCodeCoverages -> Identity DescribeCodeCoverages)
-> Maybe Text -> DescribeCodeCoverages -> DescribeCodeCoverages
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeCodeCoverages
DescribeCodeCoveragesResponse
rs
DescribeCodeCoveragesResponse
-> Getting (First Text) DescribeCodeCoveragesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeCodeCoveragesResponse
-> Const (First Text) DescribeCodeCoveragesResponse
Lens' DescribeCodeCoveragesResponse (Maybe Text)
describeCodeCoveragesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeCodeCoveragesResponse
-> Const (First Text) DescribeCodeCoveragesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeCodeCoveragesResponse 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 DescribeCodeCoverages where
type
AWSResponse DescribeCodeCoverages =
DescribeCodeCoveragesResponse
request :: DescribeCodeCoverages -> Request DescribeCodeCoverages
request = Service -> DescribeCodeCoverages -> Request DescribeCodeCoverages
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeCodeCoverages
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeCodeCoverages)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeCodeCoverages))
-> Logger
-> Service
-> Proxy DescribeCodeCoverages
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeCodeCoverages)))
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 [CodeCoverage]
-> Maybe Text -> Int -> DescribeCodeCoveragesResponse
DescribeCodeCoveragesResponse'
(Maybe [CodeCoverage]
-> Maybe Text -> Int -> DescribeCodeCoveragesResponse)
-> Either String (Maybe [CodeCoverage])
-> Either
String (Maybe Text -> Int -> DescribeCodeCoveragesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [CodeCoverage]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"codeCoverages" Either String (Maybe (Maybe [CodeCoverage]))
-> Maybe [CodeCoverage] -> Either String (Maybe [CodeCoverage])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [CodeCoverage]
forall a. Monoid a => a
Prelude.mempty)
Either String (Maybe Text -> Int -> DescribeCodeCoveragesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeCodeCoveragesResponse)
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 -> DescribeCodeCoveragesResponse)
-> Either String Int -> Either String DescribeCodeCoveragesResponse
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 DescribeCodeCoverages
instance Prelude.NFData DescribeCodeCoverages
instance Core.ToHeaders DescribeCodeCoverages where
toHeaders :: DescribeCodeCoverages -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeCodeCoverages -> 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.DescribeCodeCoverages" ::
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 DescribeCodeCoverages where
toJSON :: DescribeCodeCoverages -> Value
toJSON DescribeCodeCoverages' {Maybe Double
Maybe Natural
Maybe Text
Maybe ReportCodeCoverageSortByType
Maybe SortOrderType
Text
reportArn :: Text
sortBy :: Maybe ReportCodeCoverageSortByType
maxResults :: Maybe Natural
nextToken :: Maybe Text
maxLineCoveragePercentage :: Maybe Double
sortOrder :: Maybe SortOrderType
minLineCoveragePercentage :: Maybe Double
$sel:reportArn:DescribeCodeCoverages' :: DescribeCodeCoverages -> Text
$sel:sortBy:DescribeCodeCoverages' :: DescribeCodeCoverages -> Maybe ReportCodeCoverageSortByType
$sel:maxResults:DescribeCodeCoverages' :: DescribeCodeCoverages -> Maybe Natural
$sel:nextToken:DescribeCodeCoverages' :: DescribeCodeCoverages -> Maybe Text
$sel:maxLineCoveragePercentage:DescribeCodeCoverages' :: DescribeCodeCoverages -> Maybe Double
$sel:sortOrder:DescribeCodeCoverages' :: DescribeCodeCoverages -> Maybe SortOrderType
$sel:minLineCoveragePercentage:DescribeCodeCoverages' :: DescribeCodeCoverages -> Maybe Double
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"minLineCoveragePercentage" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
minLineCoveragePercentage,
(Text
"sortOrder" Text -> SortOrderType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SortOrderType -> Pair) -> Maybe SortOrderType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SortOrderType
sortOrder,
(Text
"maxLineCoveragePercentage" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
maxLineCoveragePercentage,
(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,
(Text
"sortBy" Text -> ReportCodeCoverageSortByType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ReportCodeCoverageSortByType -> Pair)
-> Maybe ReportCodeCoverageSortByType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReportCodeCoverageSortByType
sortBy,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"reportArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
reportArn)
]
)
instance Core.ToPath DescribeCodeCoverages where
toPath :: DescribeCodeCoverages -> ByteString
toPath = ByteString -> DescribeCodeCoverages -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeCodeCoverages where
toQuery :: DescribeCodeCoverages -> QueryString
toQuery = QueryString -> DescribeCodeCoverages -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeCodeCoveragesResponse = DescribeCodeCoveragesResponse'
{
DescribeCodeCoveragesResponse -> Maybe [CodeCoverage]
codeCoverages :: Prelude.Maybe [CodeCoverage],
DescribeCodeCoveragesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeCodeCoveragesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeCodeCoveragesResponse
-> DescribeCodeCoveragesResponse -> Bool
(DescribeCodeCoveragesResponse
-> DescribeCodeCoveragesResponse -> Bool)
-> (DescribeCodeCoveragesResponse
-> DescribeCodeCoveragesResponse -> Bool)
-> Eq DescribeCodeCoveragesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCodeCoveragesResponse
-> DescribeCodeCoveragesResponse -> Bool
$c/= :: DescribeCodeCoveragesResponse
-> DescribeCodeCoveragesResponse -> Bool
== :: DescribeCodeCoveragesResponse
-> DescribeCodeCoveragesResponse -> Bool
$c== :: DescribeCodeCoveragesResponse
-> DescribeCodeCoveragesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeCodeCoveragesResponse]
ReadPrec DescribeCodeCoveragesResponse
Int -> ReadS DescribeCodeCoveragesResponse
ReadS [DescribeCodeCoveragesResponse]
(Int -> ReadS DescribeCodeCoveragesResponse)
-> ReadS [DescribeCodeCoveragesResponse]
-> ReadPrec DescribeCodeCoveragesResponse
-> ReadPrec [DescribeCodeCoveragesResponse]
-> Read DescribeCodeCoveragesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCodeCoveragesResponse]
$creadListPrec :: ReadPrec [DescribeCodeCoveragesResponse]
readPrec :: ReadPrec DescribeCodeCoveragesResponse
$creadPrec :: ReadPrec DescribeCodeCoveragesResponse
readList :: ReadS [DescribeCodeCoveragesResponse]
$creadList :: ReadS [DescribeCodeCoveragesResponse]
readsPrec :: Int -> ReadS DescribeCodeCoveragesResponse
$creadsPrec :: Int -> ReadS DescribeCodeCoveragesResponse
Prelude.Read, Int -> DescribeCodeCoveragesResponse -> ShowS
[DescribeCodeCoveragesResponse] -> ShowS
DescribeCodeCoveragesResponse -> String
(Int -> DescribeCodeCoveragesResponse -> ShowS)
-> (DescribeCodeCoveragesResponse -> String)
-> ([DescribeCodeCoveragesResponse] -> ShowS)
-> Show DescribeCodeCoveragesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCodeCoveragesResponse] -> ShowS
$cshowList :: [DescribeCodeCoveragesResponse] -> ShowS
show :: DescribeCodeCoveragesResponse -> String
$cshow :: DescribeCodeCoveragesResponse -> String
showsPrec :: Int -> DescribeCodeCoveragesResponse -> ShowS
$cshowsPrec :: Int -> DescribeCodeCoveragesResponse -> ShowS
Prelude.Show, (forall x.
DescribeCodeCoveragesResponse
-> Rep DescribeCodeCoveragesResponse x)
-> (forall x.
Rep DescribeCodeCoveragesResponse x
-> DescribeCodeCoveragesResponse)
-> Generic DescribeCodeCoveragesResponse
forall x.
Rep DescribeCodeCoveragesResponse x
-> DescribeCodeCoveragesResponse
forall x.
DescribeCodeCoveragesResponse
-> Rep DescribeCodeCoveragesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeCodeCoveragesResponse x
-> DescribeCodeCoveragesResponse
$cfrom :: forall x.
DescribeCodeCoveragesResponse
-> Rep DescribeCodeCoveragesResponse x
Prelude.Generic)
newDescribeCodeCoveragesResponse ::
Prelude.Int ->
DescribeCodeCoveragesResponse
newDescribeCodeCoveragesResponse :: Int -> DescribeCodeCoveragesResponse
newDescribeCodeCoveragesResponse Int
pHttpStatus_ =
DescribeCodeCoveragesResponse' :: Maybe [CodeCoverage]
-> Maybe Text -> Int -> DescribeCodeCoveragesResponse
DescribeCodeCoveragesResponse'
{ $sel:codeCoverages:DescribeCodeCoveragesResponse' :: Maybe [CodeCoverage]
codeCoverages =
Maybe [CodeCoverage]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeCodeCoveragesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeCodeCoveragesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeCodeCoveragesResponse_codeCoverages :: Lens.Lens' DescribeCodeCoveragesResponse (Prelude.Maybe [CodeCoverage])
describeCodeCoveragesResponse_codeCoverages :: (Maybe [CodeCoverage] -> f (Maybe [CodeCoverage]))
-> DescribeCodeCoveragesResponse -> f DescribeCodeCoveragesResponse
describeCodeCoveragesResponse_codeCoverages = (DescribeCodeCoveragesResponse -> Maybe [CodeCoverage])
-> (DescribeCodeCoveragesResponse
-> Maybe [CodeCoverage] -> DescribeCodeCoveragesResponse)
-> Lens' DescribeCodeCoveragesResponse (Maybe [CodeCoverage])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeCoveragesResponse' {Maybe [CodeCoverage]
codeCoverages :: Maybe [CodeCoverage]
$sel:codeCoverages:DescribeCodeCoveragesResponse' :: DescribeCodeCoveragesResponse -> Maybe [CodeCoverage]
codeCoverages} -> Maybe [CodeCoverage]
codeCoverages) (\s :: DescribeCodeCoveragesResponse
s@DescribeCodeCoveragesResponse' {} Maybe [CodeCoverage]
a -> DescribeCodeCoveragesResponse
s {$sel:codeCoverages:DescribeCodeCoveragesResponse' :: Maybe [CodeCoverage]
codeCoverages = Maybe [CodeCoverage]
a} :: DescribeCodeCoveragesResponse) ((Maybe [CodeCoverage] -> f (Maybe [CodeCoverage]))
-> DescribeCodeCoveragesResponse
-> f DescribeCodeCoveragesResponse)
-> ((Maybe [CodeCoverage] -> f (Maybe [CodeCoverage]))
-> Maybe [CodeCoverage] -> f (Maybe [CodeCoverage]))
-> (Maybe [CodeCoverage] -> f (Maybe [CodeCoverage]))
-> DescribeCodeCoveragesResponse
-> f DescribeCodeCoveragesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [CodeCoverage] [CodeCoverage] [CodeCoverage] [CodeCoverage]
-> Iso
(Maybe [CodeCoverage])
(Maybe [CodeCoverage])
(Maybe [CodeCoverage])
(Maybe [CodeCoverage])
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 [CodeCoverage] [CodeCoverage] [CodeCoverage] [CodeCoverage]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeCodeCoveragesResponse_nextToken :: Lens.Lens' DescribeCodeCoveragesResponse (Prelude.Maybe Prelude.Text)
describeCodeCoveragesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeCodeCoveragesResponse -> f DescribeCodeCoveragesResponse
describeCodeCoveragesResponse_nextToken = (DescribeCodeCoveragesResponse -> Maybe Text)
-> (DescribeCodeCoveragesResponse
-> Maybe Text -> DescribeCodeCoveragesResponse)
-> Lens' DescribeCodeCoveragesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeCoveragesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeCodeCoveragesResponse' :: DescribeCodeCoveragesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeCodeCoveragesResponse
s@DescribeCodeCoveragesResponse' {} Maybe Text
a -> DescribeCodeCoveragesResponse
s {$sel:nextToken:DescribeCodeCoveragesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeCodeCoveragesResponse)
describeCodeCoveragesResponse_httpStatus :: Lens.Lens' DescribeCodeCoveragesResponse Prelude.Int
describeCodeCoveragesResponse_httpStatus :: (Int -> f Int)
-> DescribeCodeCoveragesResponse -> f DescribeCodeCoveragesResponse
describeCodeCoveragesResponse_httpStatus = (DescribeCodeCoveragesResponse -> Int)
-> (DescribeCodeCoveragesResponse
-> Int -> DescribeCodeCoveragesResponse)
-> Lens
DescribeCodeCoveragesResponse DescribeCodeCoveragesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeCoveragesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeCodeCoveragesResponse' :: DescribeCodeCoveragesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeCodeCoveragesResponse
s@DescribeCodeCoveragesResponse' {} Int
a -> DescribeCodeCoveragesResponse
s {$sel:httpStatus:DescribeCodeCoveragesResponse' :: Int
httpStatus = Int
a} :: DescribeCodeCoveragesResponse)
instance Prelude.NFData DescribeCodeCoveragesResponse