{-# 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.CodeStar.Types.ProjectSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ProjectSummary = ProjectSummary'
{
ProjectSummary -> Maybe Text
projectArn :: Prelude.Maybe Prelude.Text,
ProjectSummary -> Maybe Text
projectId :: Prelude.Maybe Prelude.Text
}
deriving (ProjectSummary -> ProjectSummary -> Bool
(ProjectSummary -> ProjectSummary -> Bool)
-> (ProjectSummary -> ProjectSummary -> Bool) -> Eq ProjectSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProjectSummary -> ProjectSummary -> Bool
$c/= :: ProjectSummary -> ProjectSummary -> Bool
== :: ProjectSummary -> ProjectSummary -> Bool
$c== :: ProjectSummary -> ProjectSummary -> Bool
Prelude.Eq, ReadPrec [ProjectSummary]
ReadPrec ProjectSummary
Int -> ReadS ProjectSummary
ReadS [ProjectSummary]
(Int -> ReadS ProjectSummary)
-> ReadS [ProjectSummary]
-> ReadPrec ProjectSummary
-> ReadPrec [ProjectSummary]
-> Read ProjectSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProjectSummary]
$creadListPrec :: ReadPrec [ProjectSummary]
readPrec :: ReadPrec ProjectSummary
$creadPrec :: ReadPrec ProjectSummary
readList :: ReadS [ProjectSummary]
$creadList :: ReadS [ProjectSummary]
readsPrec :: Int -> ReadS ProjectSummary
$creadsPrec :: Int -> ReadS ProjectSummary
Prelude.Read, Int -> ProjectSummary -> ShowS
[ProjectSummary] -> ShowS
ProjectSummary -> String
(Int -> ProjectSummary -> ShowS)
-> (ProjectSummary -> String)
-> ([ProjectSummary] -> ShowS)
-> Show ProjectSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProjectSummary] -> ShowS
$cshowList :: [ProjectSummary] -> ShowS
show :: ProjectSummary -> String
$cshow :: ProjectSummary -> String
showsPrec :: Int -> ProjectSummary -> ShowS
$cshowsPrec :: Int -> ProjectSummary -> ShowS
Prelude.Show, (forall x. ProjectSummary -> Rep ProjectSummary x)
-> (forall x. Rep ProjectSummary x -> ProjectSummary)
-> Generic ProjectSummary
forall x. Rep ProjectSummary x -> ProjectSummary
forall x. ProjectSummary -> Rep ProjectSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProjectSummary x -> ProjectSummary
$cfrom :: forall x. ProjectSummary -> Rep ProjectSummary x
Prelude.Generic)
newProjectSummary ::
ProjectSummary
newProjectSummary :: ProjectSummary
newProjectSummary =
ProjectSummary' :: Maybe Text -> Maybe Text -> ProjectSummary
ProjectSummary'
{ $sel:projectArn:ProjectSummary' :: Maybe Text
projectArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:projectId:ProjectSummary' :: Maybe Text
projectId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
projectSummary_projectArn :: Lens.Lens' ProjectSummary (Prelude.Maybe Prelude.Text)
projectSummary_projectArn :: (Maybe Text -> f (Maybe Text))
-> ProjectSummary -> f ProjectSummary
projectSummary_projectArn = (ProjectSummary -> Maybe Text)
-> (ProjectSummary -> Maybe Text -> ProjectSummary)
-> Lens ProjectSummary ProjectSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectSummary' {Maybe Text
projectArn :: Maybe Text
$sel:projectArn:ProjectSummary' :: ProjectSummary -> Maybe Text
projectArn} -> Maybe Text
projectArn) (\s :: ProjectSummary
s@ProjectSummary' {} Maybe Text
a -> ProjectSummary
s {$sel:projectArn:ProjectSummary' :: Maybe Text
projectArn = Maybe Text
a} :: ProjectSummary)
projectSummary_projectId :: Lens.Lens' ProjectSummary (Prelude.Maybe Prelude.Text)
projectSummary_projectId :: (Maybe Text -> f (Maybe Text))
-> ProjectSummary -> f ProjectSummary
projectSummary_projectId = (ProjectSummary -> Maybe Text)
-> (ProjectSummary -> Maybe Text -> ProjectSummary)
-> Lens ProjectSummary ProjectSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectSummary' {Maybe Text
projectId :: Maybe Text
$sel:projectId:ProjectSummary' :: ProjectSummary -> Maybe Text
projectId} -> Maybe Text
projectId) (\s :: ProjectSummary
s@ProjectSummary' {} Maybe Text
a -> ProjectSummary
s {$sel:projectId:ProjectSummary' :: Maybe Text
projectId = Maybe Text
a} :: ProjectSummary)
instance Core.FromJSON ProjectSummary where
parseJSON :: Value -> Parser ProjectSummary
parseJSON =
String
-> (Object -> Parser ProjectSummary)
-> Value
-> Parser ProjectSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ProjectSummary"
( \Object
x ->
Maybe Text -> Maybe Text -> ProjectSummary
ProjectSummary'
(Maybe Text -> Maybe Text -> ProjectSummary)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ProjectSummary)
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
"projectArn")
Parser (Maybe Text -> ProjectSummary)
-> Parser (Maybe Text) -> Parser ProjectSummary
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
"projectId")
)
instance Prelude.Hashable ProjectSummary
instance Prelude.NFData ProjectSummary