{-# 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.CodeGuruReviewer.Types.CodeReview where
import Amazonka.CodeGuruReviewer.Types.AnalysisType
import Amazonka.CodeGuruReviewer.Types.JobState
import Amazonka.CodeGuruReviewer.Types.Metrics
import Amazonka.CodeGuruReviewer.Types.ProviderType
import Amazonka.CodeGuruReviewer.Types.SourceCodeType
import Amazonka.CodeGuruReviewer.Types.Type
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CodeReview = CodeReview'
{
CodeReview -> Maybe Text
associationArn :: Prelude.Maybe Prelude.Text,
CodeReview -> Maybe JobState
state :: Prelude.Maybe JobState,
CodeReview -> Maybe Metrics
metrics :: Prelude.Maybe Metrics,
CodeReview -> Maybe Text
pullRequestId :: Prelude.Maybe Prelude.Text,
CodeReview -> Maybe ProviderType
providerType :: Prelude.Maybe ProviderType,
CodeReview -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
CodeReview -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CodeReview -> Maybe Text
codeReviewArn :: Prelude.Maybe Prelude.Text,
CodeReview -> Maybe Text
repositoryName :: Prelude.Maybe Prelude.Text,
CodeReview -> Maybe Type
type' :: Prelude.Maybe Type,
CodeReview -> Maybe SourceCodeType
sourceCodeType :: Prelude.Maybe SourceCodeType,
CodeReview -> Maybe Text
stateReason :: Prelude.Maybe Prelude.Text,
CodeReview -> Maybe POSIX
createdTimeStamp :: Prelude.Maybe Core.POSIX,
CodeReview -> Maybe [AnalysisType]
analysisTypes :: Prelude.Maybe [AnalysisType],
CodeReview -> Maybe POSIX
lastUpdatedTimeStamp :: Prelude.Maybe Core.POSIX
}
deriving (CodeReview -> CodeReview -> Bool
(CodeReview -> CodeReview -> Bool)
-> (CodeReview -> CodeReview -> Bool) -> Eq CodeReview
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CodeReview -> CodeReview -> Bool
$c/= :: CodeReview -> CodeReview -> Bool
== :: CodeReview -> CodeReview -> Bool
$c== :: CodeReview -> CodeReview -> Bool
Prelude.Eq, ReadPrec [CodeReview]
ReadPrec CodeReview
Int -> ReadS CodeReview
ReadS [CodeReview]
(Int -> ReadS CodeReview)
-> ReadS [CodeReview]
-> ReadPrec CodeReview
-> ReadPrec [CodeReview]
-> Read CodeReview
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CodeReview]
$creadListPrec :: ReadPrec [CodeReview]
readPrec :: ReadPrec CodeReview
$creadPrec :: ReadPrec CodeReview
readList :: ReadS [CodeReview]
$creadList :: ReadS [CodeReview]
readsPrec :: Int -> ReadS CodeReview
$creadsPrec :: Int -> ReadS CodeReview
Prelude.Read, Int -> CodeReview -> ShowS
[CodeReview] -> ShowS
CodeReview -> String
(Int -> CodeReview -> ShowS)
-> (CodeReview -> String)
-> ([CodeReview] -> ShowS)
-> Show CodeReview
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CodeReview] -> ShowS
$cshowList :: [CodeReview] -> ShowS
show :: CodeReview -> String
$cshow :: CodeReview -> String
showsPrec :: Int -> CodeReview -> ShowS
$cshowsPrec :: Int -> CodeReview -> ShowS
Prelude.Show, (forall x. CodeReview -> Rep CodeReview x)
-> (forall x. Rep CodeReview x -> CodeReview) -> Generic CodeReview
forall x. Rep CodeReview x -> CodeReview
forall x. CodeReview -> Rep CodeReview x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CodeReview x -> CodeReview
$cfrom :: forall x. CodeReview -> Rep CodeReview x
Prelude.Generic)
newCodeReview ::
CodeReview
newCodeReview :: CodeReview
newCodeReview =
CodeReview' :: Maybe Text
-> Maybe JobState
-> Maybe Metrics
-> Maybe Text
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview
CodeReview'
{ $sel:associationArn:CodeReview' :: Maybe Text
associationArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:state:CodeReview' :: Maybe JobState
state = Maybe JobState
forall a. Maybe a
Prelude.Nothing,
$sel:metrics:CodeReview' :: Maybe Metrics
metrics = Maybe Metrics
forall a. Maybe a
Prelude.Nothing,
$sel:pullRequestId:CodeReview' :: Maybe Text
pullRequestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:providerType:CodeReview' :: Maybe ProviderType
providerType = Maybe ProviderType
forall a. Maybe a
Prelude.Nothing,
$sel:owner:CodeReview' :: Maybe Text
owner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:CodeReview' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:codeReviewArn:CodeReview' :: Maybe Text
codeReviewArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:repositoryName:CodeReview' :: Maybe Text
repositoryName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':CodeReview' :: Maybe Type
type' = Maybe Type
forall a. Maybe a
Prelude.Nothing,
$sel:sourceCodeType:CodeReview' :: Maybe SourceCodeType
sourceCodeType = Maybe SourceCodeType
forall a. Maybe a
Prelude.Nothing,
$sel:stateReason:CodeReview' :: Maybe Text
stateReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdTimeStamp:CodeReview' :: Maybe POSIX
createdTimeStamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:analysisTypes:CodeReview' :: Maybe [AnalysisType]
analysisTypes = Maybe [AnalysisType]
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedTimeStamp:CodeReview' :: Maybe POSIX
lastUpdatedTimeStamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
codeReview_associationArn :: Lens.Lens' CodeReview (Prelude.Maybe Prelude.Text)
codeReview_associationArn :: (Maybe Text -> f (Maybe Text)) -> CodeReview -> f CodeReview
codeReview_associationArn = (CodeReview -> Maybe Text)
-> (CodeReview -> Maybe Text -> CodeReview)
-> Lens CodeReview CodeReview (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReview' {Maybe Text
associationArn :: Maybe Text
$sel:associationArn:CodeReview' :: CodeReview -> Maybe Text
associationArn} -> Maybe Text
associationArn) (\s :: CodeReview
s@CodeReview' {} Maybe Text
a -> CodeReview
s {$sel:associationArn:CodeReview' :: Maybe Text
associationArn = Maybe Text
a} :: CodeReview)
codeReview_state :: Lens.Lens' CodeReview (Prelude.Maybe JobState)
codeReview_state :: (Maybe JobState -> f (Maybe JobState))
-> CodeReview -> f CodeReview
codeReview_state = (CodeReview -> Maybe JobState)
-> (CodeReview -> Maybe JobState -> CodeReview)
-> Lens CodeReview CodeReview (Maybe JobState) (Maybe JobState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReview' {Maybe JobState
state :: Maybe JobState
$sel:state:CodeReview' :: CodeReview -> Maybe JobState
state} -> Maybe JobState
state) (\s :: CodeReview
s@CodeReview' {} Maybe JobState
a -> CodeReview
s {$sel:state:CodeReview' :: Maybe JobState
state = Maybe JobState
a} :: CodeReview)
codeReview_metrics :: Lens.Lens' CodeReview (Prelude.Maybe Metrics)
codeReview_metrics :: (Maybe Metrics -> f (Maybe Metrics)) -> CodeReview -> f CodeReview
codeReview_metrics = (CodeReview -> Maybe Metrics)
-> (CodeReview -> Maybe Metrics -> CodeReview)
-> Lens CodeReview CodeReview (Maybe Metrics) (Maybe Metrics)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReview' {Maybe Metrics
metrics :: Maybe Metrics
$sel:metrics:CodeReview' :: CodeReview -> Maybe Metrics
metrics} -> Maybe Metrics
metrics) (\s :: CodeReview
s@CodeReview' {} Maybe Metrics
a -> CodeReview
s {$sel:metrics:CodeReview' :: Maybe Metrics
metrics = Maybe Metrics
a} :: CodeReview)
codeReview_pullRequestId :: Lens.Lens' CodeReview (Prelude.Maybe Prelude.Text)
codeReview_pullRequestId :: (Maybe Text -> f (Maybe Text)) -> CodeReview -> f CodeReview
codeReview_pullRequestId = (CodeReview -> Maybe Text)
-> (CodeReview -> Maybe Text -> CodeReview)
-> Lens CodeReview CodeReview (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReview' {Maybe Text
pullRequestId :: Maybe Text
$sel:pullRequestId:CodeReview' :: CodeReview -> Maybe Text
pullRequestId} -> Maybe Text
pullRequestId) (\s :: CodeReview
s@CodeReview' {} Maybe Text
a -> CodeReview
s {$sel:pullRequestId:CodeReview' :: Maybe Text
pullRequestId = Maybe Text
a} :: CodeReview)
codeReview_providerType :: Lens.Lens' CodeReview (Prelude.Maybe ProviderType)
codeReview_providerType :: (Maybe ProviderType -> f (Maybe ProviderType))
-> CodeReview -> f CodeReview
codeReview_providerType = (CodeReview -> Maybe ProviderType)
-> (CodeReview -> Maybe ProviderType -> CodeReview)
-> Lens
CodeReview CodeReview (Maybe ProviderType) (Maybe ProviderType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReview' {Maybe ProviderType
providerType :: Maybe ProviderType
$sel:providerType:CodeReview' :: CodeReview -> Maybe ProviderType
providerType} -> Maybe ProviderType
providerType) (\s :: CodeReview
s@CodeReview' {} Maybe ProviderType
a -> CodeReview
s {$sel:providerType:CodeReview' :: Maybe ProviderType
providerType = Maybe ProviderType
a} :: CodeReview)
codeReview_owner :: Lens.Lens' CodeReview (Prelude.Maybe Prelude.Text)
codeReview_owner :: (Maybe Text -> f (Maybe Text)) -> CodeReview -> f CodeReview
codeReview_owner = (CodeReview -> Maybe Text)
-> (CodeReview -> Maybe Text -> CodeReview)
-> Lens CodeReview CodeReview (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReview' {Maybe Text
owner :: Maybe Text
$sel:owner:CodeReview' :: CodeReview -> Maybe Text
owner} -> Maybe Text
owner) (\s :: CodeReview
s@CodeReview' {} Maybe Text
a -> CodeReview
s {$sel:owner:CodeReview' :: Maybe Text
owner = Maybe Text
a} :: CodeReview)
codeReview_name :: Lens.Lens' CodeReview (Prelude.Maybe Prelude.Text)
codeReview_name :: (Maybe Text -> f (Maybe Text)) -> CodeReview -> f CodeReview
codeReview_name = (CodeReview -> Maybe Text)
-> (CodeReview -> Maybe Text -> CodeReview)
-> Lens CodeReview CodeReview (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReview' {Maybe Text
name :: Maybe Text
$sel:name:CodeReview' :: CodeReview -> Maybe Text
name} -> Maybe Text
name) (\s :: CodeReview
s@CodeReview' {} Maybe Text
a -> CodeReview
s {$sel:name:CodeReview' :: Maybe Text
name = Maybe Text
a} :: CodeReview)
codeReview_codeReviewArn :: Lens.Lens' CodeReview (Prelude.Maybe Prelude.Text)
codeReview_codeReviewArn :: (Maybe Text -> f (Maybe Text)) -> CodeReview -> f CodeReview
codeReview_codeReviewArn = (CodeReview -> Maybe Text)
-> (CodeReview -> Maybe Text -> CodeReview)
-> Lens CodeReview CodeReview (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReview' {Maybe Text
codeReviewArn :: Maybe Text
$sel:codeReviewArn:CodeReview' :: CodeReview -> Maybe Text
codeReviewArn} -> Maybe Text
codeReviewArn) (\s :: CodeReview
s@CodeReview' {} Maybe Text
a -> CodeReview
s {$sel:codeReviewArn:CodeReview' :: Maybe Text
codeReviewArn = Maybe Text
a} :: CodeReview)
codeReview_repositoryName :: Lens.Lens' CodeReview (Prelude.Maybe Prelude.Text)
codeReview_repositoryName :: (Maybe Text -> f (Maybe Text)) -> CodeReview -> f CodeReview
codeReview_repositoryName = (CodeReview -> Maybe Text)
-> (CodeReview -> Maybe Text -> CodeReview)
-> Lens CodeReview CodeReview (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReview' {Maybe Text
repositoryName :: Maybe Text
$sel:repositoryName:CodeReview' :: CodeReview -> Maybe Text
repositoryName} -> Maybe Text
repositoryName) (\s :: CodeReview
s@CodeReview' {} Maybe Text
a -> CodeReview
s {$sel:repositoryName:CodeReview' :: Maybe Text
repositoryName = Maybe Text
a} :: CodeReview)
codeReview_type :: Lens.Lens' CodeReview (Prelude.Maybe Type)
codeReview_type :: (Maybe Type -> f (Maybe Type)) -> CodeReview -> f CodeReview
codeReview_type = (CodeReview -> Maybe Type)
-> (CodeReview -> Maybe Type -> CodeReview)
-> Lens CodeReview CodeReview (Maybe Type) (Maybe Type)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReview' {Maybe Type
type' :: Maybe Type
$sel:type':CodeReview' :: CodeReview -> Maybe Type
type'} -> Maybe Type
type') (\s :: CodeReview
s@CodeReview' {} Maybe Type
a -> CodeReview
s {$sel:type':CodeReview' :: Maybe Type
type' = Maybe Type
a} :: CodeReview)
codeReview_sourceCodeType :: Lens.Lens' CodeReview (Prelude.Maybe SourceCodeType)
codeReview_sourceCodeType :: (Maybe SourceCodeType -> f (Maybe SourceCodeType))
-> CodeReview -> f CodeReview
codeReview_sourceCodeType = (CodeReview -> Maybe SourceCodeType)
-> (CodeReview -> Maybe SourceCodeType -> CodeReview)
-> Lens
CodeReview CodeReview (Maybe SourceCodeType) (Maybe SourceCodeType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReview' {Maybe SourceCodeType
sourceCodeType :: Maybe SourceCodeType
$sel:sourceCodeType:CodeReview' :: CodeReview -> Maybe SourceCodeType
sourceCodeType} -> Maybe SourceCodeType
sourceCodeType) (\s :: CodeReview
s@CodeReview' {} Maybe SourceCodeType
a -> CodeReview
s {$sel:sourceCodeType:CodeReview' :: Maybe SourceCodeType
sourceCodeType = Maybe SourceCodeType
a} :: CodeReview)
codeReview_stateReason :: Lens.Lens' CodeReview (Prelude.Maybe Prelude.Text)
codeReview_stateReason :: (Maybe Text -> f (Maybe Text)) -> CodeReview -> f CodeReview
codeReview_stateReason = (CodeReview -> Maybe Text)
-> (CodeReview -> Maybe Text -> CodeReview)
-> Lens CodeReview CodeReview (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReview' {Maybe Text
stateReason :: Maybe Text
$sel:stateReason:CodeReview' :: CodeReview -> Maybe Text
stateReason} -> Maybe Text
stateReason) (\s :: CodeReview
s@CodeReview' {} Maybe Text
a -> CodeReview
s {$sel:stateReason:CodeReview' :: Maybe Text
stateReason = Maybe Text
a} :: CodeReview)
codeReview_createdTimeStamp :: Lens.Lens' CodeReview (Prelude.Maybe Prelude.UTCTime)
codeReview_createdTimeStamp :: (Maybe UTCTime -> f (Maybe UTCTime)) -> CodeReview -> f CodeReview
codeReview_createdTimeStamp = (CodeReview -> Maybe POSIX)
-> (CodeReview -> Maybe POSIX -> CodeReview)
-> Lens CodeReview CodeReview (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReview' {Maybe POSIX
createdTimeStamp :: Maybe POSIX
$sel:createdTimeStamp:CodeReview' :: CodeReview -> Maybe POSIX
createdTimeStamp} -> Maybe POSIX
createdTimeStamp) (\s :: CodeReview
s@CodeReview' {} Maybe POSIX
a -> CodeReview
s {$sel:createdTimeStamp:CodeReview' :: Maybe POSIX
createdTimeStamp = Maybe POSIX
a} :: CodeReview) ((Maybe POSIX -> f (Maybe POSIX)) -> CodeReview -> f CodeReview)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CodeReview
-> f CodeReview
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
codeReview_analysisTypes :: Lens.Lens' CodeReview (Prelude.Maybe [AnalysisType])
codeReview_analysisTypes :: (Maybe [AnalysisType] -> f (Maybe [AnalysisType]))
-> CodeReview -> f CodeReview
codeReview_analysisTypes = (CodeReview -> Maybe [AnalysisType])
-> (CodeReview -> Maybe [AnalysisType] -> CodeReview)
-> Lens
CodeReview CodeReview (Maybe [AnalysisType]) (Maybe [AnalysisType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReview' {Maybe [AnalysisType]
analysisTypes :: Maybe [AnalysisType]
$sel:analysisTypes:CodeReview' :: CodeReview -> Maybe [AnalysisType]
analysisTypes} -> Maybe [AnalysisType]
analysisTypes) (\s :: CodeReview
s@CodeReview' {} Maybe [AnalysisType]
a -> CodeReview
s {$sel:analysisTypes:CodeReview' :: Maybe [AnalysisType]
analysisTypes = Maybe [AnalysisType]
a} :: CodeReview) ((Maybe [AnalysisType] -> f (Maybe [AnalysisType]))
-> CodeReview -> f CodeReview)
-> ((Maybe [AnalysisType] -> f (Maybe [AnalysisType]))
-> Maybe [AnalysisType] -> f (Maybe [AnalysisType]))
-> (Maybe [AnalysisType] -> f (Maybe [AnalysisType]))
-> CodeReview
-> f CodeReview
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [AnalysisType] [AnalysisType] [AnalysisType] [AnalysisType]
-> Iso
(Maybe [AnalysisType])
(Maybe [AnalysisType])
(Maybe [AnalysisType])
(Maybe [AnalysisType])
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 [AnalysisType] [AnalysisType] [AnalysisType] [AnalysisType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
codeReview_lastUpdatedTimeStamp :: Lens.Lens' CodeReview (Prelude.Maybe Prelude.UTCTime)
codeReview_lastUpdatedTimeStamp :: (Maybe UTCTime -> f (Maybe UTCTime)) -> CodeReview -> f CodeReview
codeReview_lastUpdatedTimeStamp = (CodeReview -> Maybe POSIX)
-> (CodeReview -> Maybe POSIX -> CodeReview)
-> Lens CodeReview CodeReview (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReview' {Maybe POSIX
lastUpdatedTimeStamp :: Maybe POSIX
$sel:lastUpdatedTimeStamp:CodeReview' :: CodeReview -> Maybe POSIX
lastUpdatedTimeStamp} -> Maybe POSIX
lastUpdatedTimeStamp) (\s :: CodeReview
s@CodeReview' {} Maybe POSIX
a -> CodeReview
s {$sel:lastUpdatedTimeStamp:CodeReview' :: Maybe POSIX
lastUpdatedTimeStamp = Maybe POSIX
a} :: CodeReview) ((Maybe POSIX -> f (Maybe POSIX)) -> CodeReview -> f CodeReview)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CodeReview
-> f CodeReview
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
instance Core.FromJSON CodeReview where
parseJSON :: Value -> Parser CodeReview
parseJSON =
String
-> (Object -> Parser CodeReview) -> Value -> Parser CodeReview
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CodeReview"
( \Object
x ->
Maybe Text
-> Maybe JobState
-> Maybe Metrics
-> Maybe Text
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview
CodeReview'
(Maybe Text
-> Maybe JobState
-> Maybe Metrics
-> Maybe Text
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
-> Parser (Maybe Text)
-> Parser
(Maybe JobState
-> Maybe Metrics
-> Maybe Text
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
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
"AssociationArn")
Parser
(Maybe JobState
-> Maybe Metrics
-> Maybe Text
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
-> Parser (Maybe JobState)
-> Parser
(Maybe Metrics
-> Maybe Text
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"State")
Parser
(Maybe Metrics
-> Maybe Text
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
-> Parser (Maybe Metrics)
-> Parser
(Maybe Text
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Metrics)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Metrics")
Parser
(Maybe Text
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
-> Parser (Maybe Text)
-> Parser
(Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
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
"PullRequestId")
Parser
(Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
-> Parser (Maybe ProviderType)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProviderType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProviderType")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
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
"Owner")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
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 Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
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
"CodeReviewArn")
Parser
(Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
-> Parser (Maybe Text)
-> Parser
(Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
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
"RepositoryName")
Parser
(Maybe Type
-> Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
-> Parser (Maybe Type)
-> Parser
(Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Type)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
Parser
(Maybe SourceCodeType
-> Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
-> Parser (Maybe SourceCodeType)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SourceCodeType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SourceCodeType")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe [AnalysisType]
-> Maybe POSIX
-> CodeReview)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX -> Maybe [AnalysisType] -> Maybe POSIX -> CodeReview)
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
"StateReason")
Parser
(Maybe POSIX -> Maybe [AnalysisType] -> Maybe POSIX -> CodeReview)
-> Parser (Maybe POSIX)
-> Parser (Maybe [AnalysisType] -> Maybe POSIX -> CodeReview)
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
"CreatedTimeStamp")
Parser (Maybe [AnalysisType] -> Maybe POSIX -> CodeReview)
-> Parser (Maybe [AnalysisType])
-> Parser (Maybe POSIX -> CodeReview)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [AnalysisType]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AnalysisTypes" Parser (Maybe (Maybe [AnalysisType]))
-> Maybe [AnalysisType] -> Parser (Maybe [AnalysisType])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AnalysisType]
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe POSIX -> CodeReview)
-> Parser (Maybe POSIX) -> Parser CodeReview
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
"LastUpdatedTimeStamp")
)
instance Prelude.Hashable CodeReview
instance Prelude.NFData CodeReview