{-# 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.ReportGroup where
import Amazonka.CodeBuild.Types.ReportExportConfig
import Amazonka.CodeBuild.Types.ReportGroupStatusType
import Amazonka.CodeBuild.Types.ReportType
import Amazonka.CodeBuild.Types.Tag
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ReportGroup = ReportGroup'
{
ReportGroup -> Maybe ReportGroupStatusType
status :: Prelude.Maybe ReportGroupStatusType,
ReportGroup -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
ReportGroup -> Maybe POSIX
created :: Prelude.Maybe Core.POSIX,
ReportGroup -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ReportGroup -> Maybe ReportType
type' :: Prelude.Maybe ReportType,
ReportGroup -> Maybe POSIX
lastModified :: Prelude.Maybe Core.POSIX,
ReportGroup -> Maybe ReportExportConfig
exportConfig :: Prelude.Maybe ReportExportConfig,
ReportGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
}
deriving (ReportGroup -> ReportGroup -> Bool
(ReportGroup -> ReportGroup -> Bool)
-> (ReportGroup -> ReportGroup -> Bool) -> Eq ReportGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReportGroup -> ReportGroup -> Bool
$c/= :: ReportGroup -> ReportGroup -> Bool
== :: ReportGroup -> ReportGroup -> Bool
$c== :: ReportGroup -> ReportGroup -> Bool
Prelude.Eq, ReadPrec [ReportGroup]
ReadPrec ReportGroup
Int -> ReadS ReportGroup
ReadS [ReportGroup]
(Int -> ReadS ReportGroup)
-> ReadS [ReportGroup]
-> ReadPrec ReportGroup
-> ReadPrec [ReportGroup]
-> Read ReportGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReportGroup]
$creadListPrec :: ReadPrec [ReportGroup]
readPrec :: ReadPrec ReportGroup
$creadPrec :: ReadPrec ReportGroup
readList :: ReadS [ReportGroup]
$creadList :: ReadS [ReportGroup]
readsPrec :: Int -> ReadS ReportGroup
$creadsPrec :: Int -> ReadS ReportGroup
Prelude.Read, Int -> ReportGroup -> ShowS
[ReportGroup] -> ShowS
ReportGroup -> String
(Int -> ReportGroup -> ShowS)
-> (ReportGroup -> String)
-> ([ReportGroup] -> ShowS)
-> Show ReportGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReportGroup] -> ShowS
$cshowList :: [ReportGroup] -> ShowS
show :: ReportGroup -> String
$cshow :: ReportGroup -> String
showsPrec :: Int -> ReportGroup -> ShowS
$cshowsPrec :: Int -> ReportGroup -> ShowS
Prelude.Show, (forall x. ReportGroup -> Rep ReportGroup x)
-> (forall x. Rep ReportGroup x -> ReportGroup)
-> Generic ReportGroup
forall x. Rep ReportGroup x -> ReportGroup
forall x. ReportGroup -> Rep ReportGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReportGroup x -> ReportGroup
$cfrom :: forall x. ReportGroup -> Rep ReportGroup x
Prelude.Generic)
newReportGroup ::
ReportGroup
newReportGroup :: ReportGroup
newReportGroup =
ReportGroup' :: Maybe ReportGroupStatusType
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ReportType
-> Maybe POSIX
-> Maybe ReportExportConfig
-> Maybe [Tag]
-> ReportGroup
ReportGroup'
{ $sel:status:ReportGroup' :: Maybe ReportGroupStatusType
status = Maybe ReportGroupStatusType
forall a. Maybe a
Prelude.Nothing,
$sel:arn:ReportGroup' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:created:ReportGroup' :: Maybe POSIX
created = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:name:ReportGroup' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':ReportGroup' :: Maybe ReportType
type' = Maybe ReportType
forall a. Maybe a
Prelude.Nothing,
$sel:lastModified:ReportGroup' :: Maybe POSIX
lastModified = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:exportConfig:ReportGroup' :: Maybe ReportExportConfig
exportConfig = Maybe ReportExportConfig
forall a. Maybe a
Prelude.Nothing,
$sel:tags:ReportGroup' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
}
reportGroup_status :: Lens.Lens' ReportGroup (Prelude.Maybe ReportGroupStatusType)
reportGroup_status :: (Maybe ReportGroupStatusType -> f (Maybe ReportGroupStatusType))
-> ReportGroup -> f ReportGroup
reportGroup_status = (ReportGroup -> Maybe ReportGroupStatusType)
-> (ReportGroup -> Maybe ReportGroupStatusType -> ReportGroup)
-> Lens
ReportGroup
ReportGroup
(Maybe ReportGroupStatusType)
(Maybe ReportGroupStatusType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGroup' {Maybe ReportGroupStatusType
status :: Maybe ReportGroupStatusType
$sel:status:ReportGroup' :: ReportGroup -> Maybe ReportGroupStatusType
status} -> Maybe ReportGroupStatusType
status) (\s :: ReportGroup
s@ReportGroup' {} Maybe ReportGroupStatusType
a -> ReportGroup
s {$sel:status:ReportGroup' :: Maybe ReportGroupStatusType
status = Maybe ReportGroupStatusType
a} :: ReportGroup)
reportGroup_arn :: Lens.Lens' ReportGroup (Prelude.Maybe Prelude.Text)
reportGroup_arn :: (Maybe Text -> f (Maybe Text)) -> ReportGroup -> f ReportGroup
reportGroup_arn = (ReportGroup -> Maybe Text)
-> (ReportGroup -> Maybe Text -> ReportGroup)
-> Lens ReportGroup ReportGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGroup' {Maybe Text
arn :: Maybe Text
$sel:arn:ReportGroup' :: ReportGroup -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ReportGroup
s@ReportGroup' {} Maybe Text
a -> ReportGroup
s {$sel:arn:ReportGroup' :: Maybe Text
arn = Maybe Text
a} :: ReportGroup)
reportGroup_created :: Lens.Lens' ReportGroup (Prelude.Maybe Prelude.UTCTime)
reportGroup_created :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ReportGroup -> f ReportGroup
reportGroup_created = (ReportGroup -> Maybe POSIX)
-> (ReportGroup -> Maybe POSIX -> ReportGroup)
-> Lens ReportGroup ReportGroup (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGroup' {Maybe POSIX
created :: Maybe POSIX
$sel:created:ReportGroup' :: ReportGroup -> Maybe POSIX
created} -> Maybe POSIX
created) (\s :: ReportGroup
s@ReportGroup' {} Maybe POSIX
a -> ReportGroup
s {$sel:created:ReportGroup' :: Maybe POSIX
created = Maybe POSIX
a} :: ReportGroup) ((Maybe POSIX -> f (Maybe POSIX)) -> ReportGroup -> f ReportGroup)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ReportGroup
-> f ReportGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
reportGroup_name :: Lens.Lens' ReportGroup (Prelude.Maybe Prelude.Text)
reportGroup_name :: (Maybe Text -> f (Maybe Text)) -> ReportGroup -> f ReportGroup
reportGroup_name = (ReportGroup -> Maybe Text)
-> (ReportGroup -> Maybe Text -> ReportGroup)
-> Lens ReportGroup ReportGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGroup' {Maybe Text
name :: Maybe Text
$sel:name:ReportGroup' :: ReportGroup -> Maybe Text
name} -> Maybe Text
name) (\s :: ReportGroup
s@ReportGroup' {} Maybe Text
a -> ReportGroup
s {$sel:name:ReportGroup' :: Maybe Text
name = Maybe Text
a} :: ReportGroup)
reportGroup_type :: Lens.Lens' ReportGroup (Prelude.Maybe ReportType)
reportGroup_type :: (Maybe ReportType -> f (Maybe ReportType))
-> ReportGroup -> f ReportGroup
reportGroup_type = (ReportGroup -> Maybe ReportType)
-> (ReportGroup -> Maybe ReportType -> ReportGroup)
-> Lens
ReportGroup ReportGroup (Maybe ReportType) (Maybe ReportType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGroup' {Maybe ReportType
type' :: Maybe ReportType
$sel:type':ReportGroup' :: ReportGroup -> Maybe ReportType
type'} -> Maybe ReportType
type') (\s :: ReportGroup
s@ReportGroup' {} Maybe ReportType
a -> ReportGroup
s {$sel:type':ReportGroup' :: Maybe ReportType
type' = Maybe ReportType
a} :: ReportGroup)
reportGroup_lastModified :: Lens.Lens' ReportGroup (Prelude.Maybe Prelude.UTCTime)
reportGroup_lastModified :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ReportGroup -> f ReportGroup
reportGroup_lastModified = (ReportGroup -> Maybe POSIX)
-> (ReportGroup -> Maybe POSIX -> ReportGroup)
-> Lens ReportGroup ReportGroup (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGroup' {Maybe POSIX
lastModified :: Maybe POSIX
$sel:lastModified:ReportGroup' :: ReportGroup -> Maybe POSIX
lastModified} -> Maybe POSIX
lastModified) (\s :: ReportGroup
s@ReportGroup' {} Maybe POSIX
a -> ReportGroup
s {$sel:lastModified:ReportGroup' :: Maybe POSIX
lastModified = Maybe POSIX
a} :: ReportGroup) ((Maybe POSIX -> f (Maybe POSIX)) -> ReportGroup -> f ReportGroup)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ReportGroup
-> f ReportGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
reportGroup_exportConfig :: Lens.Lens' ReportGroup (Prelude.Maybe ReportExportConfig)
reportGroup_exportConfig :: (Maybe ReportExportConfig -> f (Maybe ReportExportConfig))
-> ReportGroup -> f ReportGroup
reportGroup_exportConfig = (ReportGroup -> Maybe ReportExportConfig)
-> (ReportGroup -> Maybe ReportExportConfig -> ReportGroup)
-> Lens
ReportGroup
ReportGroup
(Maybe ReportExportConfig)
(Maybe ReportExportConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGroup' {Maybe ReportExportConfig
exportConfig :: Maybe ReportExportConfig
$sel:exportConfig:ReportGroup' :: ReportGroup -> Maybe ReportExportConfig
exportConfig} -> Maybe ReportExportConfig
exportConfig) (\s :: ReportGroup
s@ReportGroup' {} Maybe ReportExportConfig
a -> ReportGroup
s {$sel:exportConfig:ReportGroup' :: Maybe ReportExportConfig
exportConfig = Maybe ReportExportConfig
a} :: ReportGroup)
reportGroup_tags :: Lens.Lens' ReportGroup (Prelude.Maybe [Tag])
reportGroup_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> ReportGroup -> f ReportGroup
reportGroup_tags = (ReportGroup -> Maybe [Tag])
-> (ReportGroup -> Maybe [Tag] -> ReportGroup)
-> Lens ReportGroup ReportGroup (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:ReportGroup' :: ReportGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: ReportGroup
s@ReportGroup' {} Maybe [Tag]
a -> ReportGroup
s {$sel:tags:ReportGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: ReportGroup) ((Maybe [Tag] -> f (Maybe [Tag])) -> ReportGroup -> f ReportGroup)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> ReportGroup
-> f ReportGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON ReportGroup where
parseJSON :: Value -> Parser ReportGroup
parseJSON =
String
-> (Object -> Parser ReportGroup) -> Value -> Parser ReportGroup
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ReportGroup"
( \Object
x ->
Maybe ReportGroupStatusType
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ReportType
-> Maybe POSIX
-> Maybe ReportExportConfig
-> Maybe [Tag]
-> ReportGroup
ReportGroup'
(Maybe ReportGroupStatusType
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ReportType
-> Maybe POSIX
-> Maybe ReportExportConfig
-> Maybe [Tag]
-> ReportGroup)
-> Parser (Maybe ReportGroupStatusType)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ReportType
-> Maybe POSIX
-> Maybe ReportExportConfig
-> Maybe [Tag]
-> ReportGroup)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ReportGroupStatusType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ReportType
-> Maybe POSIX
-> Maybe ReportExportConfig
-> Maybe [Tag]
-> ReportGroup)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe ReportType
-> Maybe POSIX
-> Maybe ReportExportConfig
-> Maybe [Tag]
-> ReportGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe ReportType
-> Maybe POSIX
-> Maybe ReportExportConfig
-> Maybe [Tag]
-> ReportGroup)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe ReportType
-> Maybe POSIX
-> Maybe ReportExportConfig
-> Maybe [Tag]
-> ReportGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"created")
Parser
(Maybe Text
-> Maybe ReportType
-> Maybe POSIX
-> Maybe ReportExportConfig
-> Maybe [Tag]
-> ReportGroup)
-> Parser (Maybe Text)
-> Parser
(Maybe ReportType
-> Maybe POSIX
-> Maybe ReportExportConfig
-> Maybe [Tag]
-> ReportGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
Parser
(Maybe ReportType
-> Maybe POSIX
-> Maybe ReportExportConfig
-> Maybe [Tag]
-> ReportGroup)
-> Parser (Maybe ReportType)
-> Parser
(Maybe POSIX
-> Maybe ReportExportConfig -> Maybe [Tag] -> ReportGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReportType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
Parser
(Maybe POSIX
-> Maybe ReportExportConfig -> Maybe [Tag] -> ReportGroup)
-> Parser (Maybe POSIX)
-> Parser (Maybe ReportExportConfig -> Maybe [Tag] -> ReportGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastModified")
Parser (Maybe ReportExportConfig -> Maybe [Tag] -> ReportGroup)
-> Parser (Maybe ReportExportConfig)
-> Parser (Maybe [Tag] -> ReportGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReportExportConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"exportConfig")
Parser (Maybe [Tag] -> ReportGroup)
-> Parser (Maybe [Tag]) -> Parser ReportGroup
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable ReportGroup
instance Prelude.NFData ReportGroup