{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CodeBuild.Types.ReportFilter where
import Amazonka.CodeBuild.Types.ReportStatusType
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ReportFilter = ReportFilter'
{
ReportFilter -> Maybe ReportStatusType
status :: Prelude.Maybe ReportStatusType
}
deriving (ReportFilter -> ReportFilter -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReportFilter -> ReportFilter -> Bool
$c/= :: ReportFilter -> ReportFilter -> Bool
== :: ReportFilter -> ReportFilter -> Bool
$c== :: ReportFilter -> ReportFilter -> Bool
Prelude.Eq, ReadPrec [ReportFilter]
ReadPrec ReportFilter
Int -> ReadS ReportFilter
ReadS [ReportFilter]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReportFilter]
$creadListPrec :: ReadPrec [ReportFilter]
readPrec :: ReadPrec ReportFilter
$creadPrec :: ReadPrec ReportFilter
readList :: ReadS [ReportFilter]
$creadList :: ReadS [ReportFilter]
readsPrec :: Int -> ReadS ReportFilter
$creadsPrec :: Int -> ReadS ReportFilter
Prelude.Read, Int -> ReportFilter -> ShowS
[ReportFilter] -> ShowS
ReportFilter -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReportFilter] -> ShowS
$cshowList :: [ReportFilter] -> ShowS
show :: ReportFilter -> String
$cshow :: ReportFilter -> String
showsPrec :: Int -> ReportFilter -> ShowS
$cshowsPrec :: Int -> ReportFilter -> ShowS
Prelude.Show, forall x. Rep ReportFilter x -> ReportFilter
forall x. ReportFilter -> Rep ReportFilter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReportFilter x -> ReportFilter
$cfrom :: forall x. ReportFilter -> Rep ReportFilter x
Prelude.Generic)
newReportFilter ::
ReportFilter
newReportFilter :: ReportFilter
newReportFilter =
ReportFilter' {$sel:status:ReportFilter' :: Maybe ReportStatusType
status = forall a. Maybe a
Prelude.Nothing}
reportFilter_status :: Lens.Lens' ReportFilter (Prelude.Maybe ReportStatusType)
reportFilter_status :: Lens' ReportFilter (Maybe ReportStatusType)
reportFilter_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportFilter' {Maybe ReportStatusType
status :: Maybe ReportStatusType
$sel:status:ReportFilter' :: ReportFilter -> Maybe ReportStatusType
status} -> Maybe ReportStatusType
status) (\s :: ReportFilter
s@ReportFilter' {} Maybe ReportStatusType
a -> ReportFilter
s {$sel:status:ReportFilter' :: Maybe ReportStatusType
status = Maybe ReportStatusType
a} :: ReportFilter)
instance Prelude.Hashable ReportFilter where
hashWithSalt :: Int -> ReportFilter -> Int
hashWithSalt Int
_salt ReportFilter' {Maybe ReportStatusType
status :: Maybe ReportStatusType
$sel:status:ReportFilter' :: ReportFilter -> Maybe ReportStatusType
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReportStatusType
status
instance Prelude.NFData ReportFilter where
rnf :: ReportFilter -> ()
rnf ReportFilter' {Maybe ReportStatusType
status :: Maybe ReportStatusType
$sel:status:ReportFilter' :: ReportFilter -> Maybe ReportStatusType
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe ReportStatusType
status
instance Data.ToJSON ReportFilter where
toJSON :: ReportFilter -> Value
toJSON ReportFilter' {Maybe ReportStatusType
status :: Maybe ReportStatusType
$sel:status:ReportFilter' :: ReportFilter -> Maybe ReportStatusType
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"status" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReportStatusType
status]
)