{-# 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.BuildGroup where
import Amazonka.CodeBuild.Types.BuildSummary
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BuildGroup = BuildGroup'
{
BuildGroup -> Maybe Text
identifier :: Prelude.Maybe Prelude.Text,
BuildGroup -> Maybe [Text]
dependsOn :: Prelude.Maybe [Prelude.Text],
BuildGroup -> Maybe Bool
ignoreFailure :: Prelude.Maybe Prelude.Bool,
BuildGroup -> Maybe BuildSummary
currentBuildSummary :: Prelude.Maybe BuildSummary,
BuildGroup -> Maybe [BuildSummary]
priorBuildSummaryList :: Prelude.Maybe [BuildSummary]
}
deriving (BuildGroup -> BuildGroup -> Bool
(BuildGroup -> BuildGroup -> Bool)
-> (BuildGroup -> BuildGroup -> Bool) -> Eq BuildGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BuildGroup -> BuildGroup -> Bool
$c/= :: BuildGroup -> BuildGroup -> Bool
== :: BuildGroup -> BuildGroup -> Bool
$c== :: BuildGroup -> BuildGroup -> Bool
Prelude.Eq, ReadPrec [BuildGroup]
ReadPrec BuildGroup
Int -> ReadS BuildGroup
ReadS [BuildGroup]
(Int -> ReadS BuildGroup)
-> ReadS [BuildGroup]
-> ReadPrec BuildGroup
-> ReadPrec [BuildGroup]
-> Read BuildGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BuildGroup]
$creadListPrec :: ReadPrec [BuildGroup]
readPrec :: ReadPrec BuildGroup
$creadPrec :: ReadPrec BuildGroup
readList :: ReadS [BuildGroup]
$creadList :: ReadS [BuildGroup]
readsPrec :: Int -> ReadS BuildGroup
$creadsPrec :: Int -> ReadS BuildGroup
Prelude.Read, Int -> BuildGroup -> ShowS
[BuildGroup] -> ShowS
BuildGroup -> String
(Int -> BuildGroup -> ShowS)
-> (BuildGroup -> String)
-> ([BuildGroup] -> ShowS)
-> Show BuildGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BuildGroup] -> ShowS
$cshowList :: [BuildGroup] -> ShowS
show :: BuildGroup -> String
$cshow :: BuildGroup -> String
showsPrec :: Int -> BuildGroup -> ShowS
$cshowsPrec :: Int -> BuildGroup -> ShowS
Prelude.Show, (forall x. BuildGroup -> Rep BuildGroup x)
-> (forall x. Rep BuildGroup x -> BuildGroup) -> Generic BuildGroup
forall x. Rep BuildGroup x -> BuildGroup
forall x. BuildGroup -> Rep BuildGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BuildGroup x -> BuildGroup
$cfrom :: forall x. BuildGroup -> Rep BuildGroup x
Prelude.Generic)
newBuildGroup ::
BuildGroup
newBuildGroup :: BuildGroup
newBuildGroup =
BuildGroup' :: Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe BuildSummary
-> Maybe [BuildSummary]
-> BuildGroup
BuildGroup'
{ $sel:identifier:BuildGroup' :: Maybe Text
identifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dependsOn:BuildGroup' :: Maybe [Text]
dependsOn = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:ignoreFailure:BuildGroup' :: Maybe Bool
ignoreFailure = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:currentBuildSummary:BuildGroup' :: Maybe BuildSummary
currentBuildSummary = Maybe BuildSummary
forall a. Maybe a
Prelude.Nothing,
$sel:priorBuildSummaryList:BuildGroup' :: Maybe [BuildSummary]
priorBuildSummaryList = Maybe [BuildSummary]
forall a. Maybe a
Prelude.Nothing
}
buildGroup_identifier :: Lens.Lens' BuildGroup (Prelude.Maybe Prelude.Text)
buildGroup_identifier :: (Maybe Text -> f (Maybe Text)) -> BuildGroup -> f BuildGroup
buildGroup_identifier = (BuildGroup -> Maybe Text)
-> (BuildGroup -> Maybe Text -> BuildGroup)
-> Lens BuildGroup BuildGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BuildGroup' {Maybe Text
identifier :: Maybe Text
$sel:identifier:BuildGroup' :: BuildGroup -> Maybe Text
identifier} -> Maybe Text
identifier) (\s :: BuildGroup
s@BuildGroup' {} Maybe Text
a -> BuildGroup
s {$sel:identifier:BuildGroup' :: Maybe Text
identifier = Maybe Text
a} :: BuildGroup)
buildGroup_dependsOn :: Lens.Lens' BuildGroup (Prelude.Maybe [Prelude.Text])
buildGroup_dependsOn :: (Maybe [Text] -> f (Maybe [Text])) -> BuildGroup -> f BuildGroup
buildGroup_dependsOn = (BuildGroup -> Maybe [Text])
-> (BuildGroup -> Maybe [Text] -> BuildGroup)
-> Lens BuildGroup BuildGroup (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BuildGroup' {Maybe [Text]
dependsOn :: Maybe [Text]
$sel:dependsOn:BuildGroup' :: BuildGroup -> Maybe [Text]
dependsOn} -> Maybe [Text]
dependsOn) (\s :: BuildGroup
s@BuildGroup' {} Maybe [Text]
a -> BuildGroup
s {$sel:dependsOn:BuildGroup' :: Maybe [Text]
dependsOn = Maybe [Text]
a} :: BuildGroup) ((Maybe [Text] -> f (Maybe [Text])) -> BuildGroup -> f BuildGroup)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> BuildGroup
-> f BuildGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
buildGroup_ignoreFailure :: Lens.Lens' BuildGroup (Prelude.Maybe Prelude.Bool)
buildGroup_ignoreFailure :: (Maybe Bool -> f (Maybe Bool)) -> BuildGroup -> f BuildGroup
buildGroup_ignoreFailure = (BuildGroup -> Maybe Bool)
-> (BuildGroup -> Maybe Bool -> BuildGroup)
-> Lens BuildGroup BuildGroup (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BuildGroup' {Maybe Bool
ignoreFailure :: Maybe Bool
$sel:ignoreFailure:BuildGroup' :: BuildGroup -> Maybe Bool
ignoreFailure} -> Maybe Bool
ignoreFailure) (\s :: BuildGroup
s@BuildGroup' {} Maybe Bool
a -> BuildGroup
s {$sel:ignoreFailure:BuildGroup' :: Maybe Bool
ignoreFailure = Maybe Bool
a} :: BuildGroup)
buildGroup_currentBuildSummary :: Lens.Lens' BuildGroup (Prelude.Maybe BuildSummary)
buildGroup_currentBuildSummary :: (Maybe BuildSummary -> f (Maybe BuildSummary))
-> BuildGroup -> f BuildGroup
buildGroup_currentBuildSummary = (BuildGroup -> Maybe BuildSummary)
-> (BuildGroup -> Maybe BuildSummary -> BuildGroup)
-> Lens
BuildGroup BuildGroup (Maybe BuildSummary) (Maybe BuildSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BuildGroup' {Maybe BuildSummary
currentBuildSummary :: Maybe BuildSummary
$sel:currentBuildSummary:BuildGroup' :: BuildGroup -> Maybe BuildSummary
currentBuildSummary} -> Maybe BuildSummary
currentBuildSummary) (\s :: BuildGroup
s@BuildGroup' {} Maybe BuildSummary
a -> BuildGroup
s {$sel:currentBuildSummary:BuildGroup' :: Maybe BuildSummary
currentBuildSummary = Maybe BuildSummary
a} :: BuildGroup)
buildGroup_priorBuildSummaryList :: Lens.Lens' BuildGroup (Prelude.Maybe [BuildSummary])
buildGroup_priorBuildSummaryList :: (Maybe [BuildSummary] -> f (Maybe [BuildSummary]))
-> BuildGroup -> f BuildGroup
buildGroup_priorBuildSummaryList = (BuildGroup -> Maybe [BuildSummary])
-> (BuildGroup -> Maybe [BuildSummary] -> BuildGroup)
-> Lens
BuildGroup BuildGroup (Maybe [BuildSummary]) (Maybe [BuildSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BuildGroup' {Maybe [BuildSummary]
priorBuildSummaryList :: Maybe [BuildSummary]
$sel:priorBuildSummaryList:BuildGroup' :: BuildGroup -> Maybe [BuildSummary]
priorBuildSummaryList} -> Maybe [BuildSummary]
priorBuildSummaryList) (\s :: BuildGroup
s@BuildGroup' {} Maybe [BuildSummary]
a -> BuildGroup
s {$sel:priorBuildSummaryList:BuildGroup' :: Maybe [BuildSummary]
priorBuildSummaryList = Maybe [BuildSummary]
a} :: BuildGroup) ((Maybe [BuildSummary] -> f (Maybe [BuildSummary]))
-> BuildGroup -> f BuildGroup)
-> ((Maybe [BuildSummary] -> f (Maybe [BuildSummary]))
-> Maybe [BuildSummary] -> f (Maybe [BuildSummary]))
-> (Maybe [BuildSummary] -> f (Maybe [BuildSummary]))
-> BuildGroup
-> f BuildGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [BuildSummary] [BuildSummary] [BuildSummary] [BuildSummary]
-> Iso
(Maybe [BuildSummary])
(Maybe [BuildSummary])
(Maybe [BuildSummary])
(Maybe [BuildSummary])
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 [BuildSummary] [BuildSummary] [BuildSummary] [BuildSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON BuildGroup where
parseJSON :: Value -> Parser BuildGroup
parseJSON =
String
-> (Object -> Parser BuildGroup) -> Value -> Parser BuildGroup
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BuildGroup"
( \Object
x ->
Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe BuildSummary
-> Maybe [BuildSummary]
-> BuildGroup
BuildGroup'
(Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe BuildSummary
-> Maybe [BuildSummary]
-> BuildGroup)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Bool
-> Maybe BuildSummary
-> Maybe [BuildSummary]
-> BuildGroup)
forall (f :: * -> *) a b. Functor 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
"identifier")
Parser
(Maybe [Text]
-> Maybe Bool
-> Maybe BuildSummary
-> Maybe [BuildSummary]
-> BuildGroup)
-> Parser (Maybe [Text])
-> Parser
(Maybe Bool
-> Maybe BuildSummary -> Maybe [BuildSummary] -> BuildGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dependsOn" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Bool
-> Maybe BuildSummary -> Maybe [BuildSummary] -> BuildGroup)
-> Parser (Maybe Bool)
-> Parser
(Maybe BuildSummary -> Maybe [BuildSummary] -> BuildGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ignoreFailure")
Parser (Maybe BuildSummary -> Maybe [BuildSummary] -> BuildGroup)
-> Parser (Maybe BuildSummary)
-> Parser (Maybe [BuildSummary] -> BuildGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BuildSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"currentBuildSummary")
Parser (Maybe [BuildSummary] -> BuildGroup)
-> Parser (Maybe [BuildSummary]) -> Parser BuildGroup
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [BuildSummary]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"priorBuildSummaryList"
Parser (Maybe (Maybe [BuildSummary]))
-> Maybe [BuildSummary] -> Parser (Maybe [BuildSummary])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [BuildSummary]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable BuildGroup
instance Prelude.NFData BuildGroup