{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CodeGuruReviewer.Types.CodeReviewSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.CodeGuruReviewer.Types.CodeReviewSummary where

import Amazonka.CodeGuruReviewer.Types.JobState
import Amazonka.CodeGuruReviewer.Types.MetricsSummary
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

-- | Information about the summary of the code review.
--
-- /See:/ 'newCodeReviewSummary' smart constructor.
data CodeReviewSummary = CodeReviewSummary'
  { -- | The state of the code review.
    --
    -- The valid code review states are:
    --
    -- -   @Completed@: The code review is complete.
    --
    -- -   @Pending@: The code review started and has not completed or failed.
    --
    -- -   @Failed@: The code review failed.
    --
    -- -   @Deleting@: The code review is being deleted.
    CodeReviewSummary -> Maybe JobState
state :: Prelude.Maybe JobState,
    -- | The pull request ID for the code review.
    CodeReviewSummary -> Maybe Text
pullRequestId :: Prelude.Maybe Prelude.Text,
    -- | The provider type of the repository association.
    CodeReviewSummary -> Maybe ProviderType
providerType :: Prelude.Maybe ProviderType,
    -- | The owner of the repository. For an Amazon Web Services CodeCommit
    -- repository, this is the Amazon Web Services account ID of the account
    -- that owns the repository. For a GitHub, GitHub Enterprise Server, or
    -- Bitbucket repository, this is the username for the account that owns the
    -- repository. For an S3 repository, it can be the username or Amazon Web
    -- Services account ID.
    CodeReviewSummary -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
    -- | The name of the code review.
    CodeReviewSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the
    -- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html CodeReview>
    -- object.
    CodeReviewSummary -> Maybe Text
codeReviewArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the repository.
    CodeReviewSummary -> Maybe Text
repositoryName :: Prelude.Maybe Prelude.Text,
    -- | The type of the code review.
    CodeReviewSummary -> Maybe Type
type' :: Prelude.Maybe Type,
    CodeReviewSummary -> Maybe SourceCodeType
sourceCodeType :: Prelude.Maybe SourceCodeType,
    -- | The statistics from the code review.
    CodeReviewSummary -> Maybe MetricsSummary
metricsSummary :: Prelude.Maybe MetricsSummary,
    -- | The time, in milliseconds since the epoch, when the code review was
    -- created.
    CodeReviewSummary -> Maybe POSIX
createdTimeStamp :: Prelude.Maybe Core.POSIX,
    -- | The time, in milliseconds since the epoch, when the code review was last
    -- updated.
    CodeReviewSummary -> Maybe POSIX
lastUpdatedTimeStamp :: Prelude.Maybe Core.POSIX
  }
  deriving (CodeReviewSummary -> CodeReviewSummary -> Bool
(CodeReviewSummary -> CodeReviewSummary -> Bool)
-> (CodeReviewSummary -> CodeReviewSummary -> Bool)
-> Eq CodeReviewSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CodeReviewSummary -> CodeReviewSummary -> Bool
$c/= :: CodeReviewSummary -> CodeReviewSummary -> Bool
== :: CodeReviewSummary -> CodeReviewSummary -> Bool
$c== :: CodeReviewSummary -> CodeReviewSummary -> Bool
Prelude.Eq, ReadPrec [CodeReviewSummary]
ReadPrec CodeReviewSummary
Int -> ReadS CodeReviewSummary
ReadS [CodeReviewSummary]
(Int -> ReadS CodeReviewSummary)
-> ReadS [CodeReviewSummary]
-> ReadPrec CodeReviewSummary
-> ReadPrec [CodeReviewSummary]
-> Read CodeReviewSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CodeReviewSummary]
$creadListPrec :: ReadPrec [CodeReviewSummary]
readPrec :: ReadPrec CodeReviewSummary
$creadPrec :: ReadPrec CodeReviewSummary
readList :: ReadS [CodeReviewSummary]
$creadList :: ReadS [CodeReviewSummary]
readsPrec :: Int -> ReadS CodeReviewSummary
$creadsPrec :: Int -> ReadS CodeReviewSummary
Prelude.Read, Int -> CodeReviewSummary -> ShowS
[CodeReviewSummary] -> ShowS
CodeReviewSummary -> String
(Int -> CodeReviewSummary -> ShowS)
-> (CodeReviewSummary -> String)
-> ([CodeReviewSummary] -> ShowS)
-> Show CodeReviewSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CodeReviewSummary] -> ShowS
$cshowList :: [CodeReviewSummary] -> ShowS
show :: CodeReviewSummary -> String
$cshow :: CodeReviewSummary -> String
showsPrec :: Int -> CodeReviewSummary -> ShowS
$cshowsPrec :: Int -> CodeReviewSummary -> ShowS
Prelude.Show, (forall x. CodeReviewSummary -> Rep CodeReviewSummary x)
-> (forall x. Rep CodeReviewSummary x -> CodeReviewSummary)
-> Generic CodeReviewSummary
forall x. Rep CodeReviewSummary x -> CodeReviewSummary
forall x. CodeReviewSummary -> Rep CodeReviewSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CodeReviewSummary x -> CodeReviewSummary
$cfrom :: forall x. CodeReviewSummary -> Rep CodeReviewSummary x
Prelude.Generic)

-- |
-- Create a value of 'CodeReviewSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'state', 'codeReviewSummary_state' - The state of the code review.
--
-- The valid code review states are:
--
-- -   @Completed@: The code review is complete.
--
-- -   @Pending@: The code review started and has not completed or failed.
--
-- -   @Failed@: The code review failed.
--
-- -   @Deleting@: The code review is being deleted.
--
-- 'pullRequestId', 'codeReviewSummary_pullRequestId' - The pull request ID for the code review.
--
-- 'providerType', 'codeReviewSummary_providerType' - The provider type of the repository association.
--
-- 'owner', 'codeReviewSummary_owner' - The owner of the repository. For an Amazon Web Services CodeCommit
-- repository, this is the Amazon Web Services account ID of the account
-- that owns the repository. For a GitHub, GitHub Enterprise Server, or
-- Bitbucket repository, this is the username for the account that owns the
-- repository. For an S3 repository, it can be the username or Amazon Web
-- Services account ID.
--
-- 'name', 'codeReviewSummary_name' - The name of the code review.
--
-- 'codeReviewArn', 'codeReviewSummary_codeReviewArn' - The Amazon Resource Name (ARN) of the
-- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html CodeReview>
-- object.
--
-- 'repositoryName', 'codeReviewSummary_repositoryName' - The name of the repository.
--
-- 'type'', 'codeReviewSummary_type' - The type of the code review.
--
-- 'sourceCodeType', 'codeReviewSummary_sourceCodeType' - Undocumented member.
--
-- 'metricsSummary', 'codeReviewSummary_metricsSummary' - The statistics from the code review.
--
-- 'createdTimeStamp', 'codeReviewSummary_createdTimeStamp' - The time, in milliseconds since the epoch, when the code review was
-- created.
--
-- 'lastUpdatedTimeStamp', 'codeReviewSummary_lastUpdatedTimeStamp' - The time, in milliseconds since the epoch, when the code review was last
-- updated.
newCodeReviewSummary ::
  CodeReviewSummary
newCodeReviewSummary :: CodeReviewSummary
newCodeReviewSummary =
  CodeReviewSummary' :: Maybe JobState
-> Maybe Text
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe MetricsSummary
-> Maybe POSIX
-> Maybe POSIX
-> CodeReviewSummary
CodeReviewSummary'
    { $sel:state:CodeReviewSummary' :: Maybe JobState
state = Maybe JobState
forall a. Maybe a
Prelude.Nothing,
      $sel:pullRequestId:CodeReviewSummary' :: Maybe Text
pullRequestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:providerType:CodeReviewSummary' :: Maybe ProviderType
providerType = Maybe ProviderType
forall a. Maybe a
Prelude.Nothing,
      $sel:owner:CodeReviewSummary' :: Maybe Text
owner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CodeReviewSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:codeReviewArn:CodeReviewSummary' :: Maybe Text
codeReviewArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:repositoryName:CodeReviewSummary' :: Maybe Text
repositoryName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':CodeReviewSummary' :: Maybe Type
type' = Maybe Type
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceCodeType:CodeReviewSummary' :: Maybe SourceCodeType
sourceCodeType = Maybe SourceCodeType
forall a. Maybe a
Prelude.Nothing,
      $sel:metricsSummary:CodeReviewSummary' :: Maybe MetricsSummary
metricsSummary = Maybe MetricsSummary
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTimeStamp:CodeReviewSummary' :: Maybe POSIX
createdTimeStamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTimeStamp:CodeReviewSummary' :: Maybe POSIX
lastUpdatedTimeStamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | The state of the code review.
--
-- The valid code review states are:
--
-- -   @Completed@: The code review is complete.
--
-- -   @Pending@: The code review started and has not completed or failed.
--
-- -   @Failed@: The code review failed.
--
-- -   @Deleting@: The code review is being deleted.
codeReviewSummary_state :: Lens.Lens' CodeReviewSummary (Prelude.Maybe JobState)
codeReviewSummary_state :: (Maybe JobState -> f (Maybe JobState))
-> CodeReviewSummary -> f CodeReviewSummary
codeReviewSummary_state = (CodeReviewSummary -> Maybe JobState)
-> (CodeReviewSummary -> Maybe JobState -> CodeReviewSummary)
-> Lens
     CodeReviewSummary
     CodeReviewSummary
     (Maybe JobState)
     (Maybe JobState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReviewSummary' {Maybe JobState
state :: Maybe JobState
$sel:state:CodeReviewSummary' :: CodeReviewSummary -> Maybe JobState
state} -> Maybe JobState
state) (\s :: CodeReviewSummary
s@CodeReviewSummary' {} Maybe JobState
a -> CodeReviewSummary
s {$sel:state:CodeReviewSummary' :: Maybe JobState
state = Maybe JobState
a} :: CodeReviewSummary)

-- | The pull request ID for the code review.
codeReviewSummary_pullRequestId :: Lens.Lens' CodeReviewSummary (Prelude.Maybe Prelude.Text)
codeReviewSummary_pullRequestId :: (Maybe Text -> f (Maybe Text))
-> CodeReviewSummary -> f CodeReviewSummary
codeReviewSummary_pullRequestId = (CodeReviewSummary -> Maybe Text)
-> (CodeReviewSummary -> Maybe Text -> CodeReviewSummary)
-> Lens
     CodeReviewSummary CodeReviewSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReviewSummary' {Maybe Text
pullRequestId :: Maybe Text
$sel:pullRequestId:CodeReviewSummary' :: CodeReviewSummary -> Maybe Text
pullRequestId} -> Maybe Text
pullRequestId) (\s :: CodeReviewSummary
s@CodeReviewSummary' {} Maybe Text
a -> CodeReviewSummary
s {$sel:pullRequestId:CodeReviewSummary' :: Maybe Text
pullRequestId = Maybe Text
a} :: CodeReviewSummary)

-- | The provider type of the repository association.
codeReviewSummary_providerType :: Lens.Lens' CodeReviewSummary (Prelude.Maybe ProviderType)
codeReviewSummary_providerType :: (Maybe ProviderType -> f (Maybe ProviderType))
-> CodeReviewSummary -> f CodeReviewSummary
codeReviewSummary_providerType = (CodeReviewSummary -> Maybe ProviderType)
-> (CodeReviewSummary -> Maybe ProviderType -> CodeReviewSummary)
-> Lens
     CodeReviewSummary
     CodeReviewSummary
     (Maybe ProviderType)
     (Maybe ProviderType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReviewSummary' {Maybe ProviderType
providerType :: Maybe ProviderType
$sel:providerType:CodeReviewSummary' :: CodeReviewSummary -> Maybe ProviderType
providerType} -> Maybe ProviderType
providerType) (\s :: CodeReviewSummary
s@CodeReviewSummary' {} Maybe ProviderType
a -> CodeReviewSummary
s {$sel:providerType:CodeReviewSummary' :: Maybe ProviderType
providerType = Maybe ProviderType
a} :: CodeReviewSummary)

-- | The owner of the repository. For an Amazon Web Services CodeCommit
-- repository, this is the Amazon Web Services account ID of the account
-- that owns the repository. For a GitHub, GitHub Enterprise Server, or
-- Bitbucket repository, this is the username for the account that owns the
-- repository. For an S3 repository, it can be the username or Amazon Web
-- Services account ID.
codeReviewSummary_owner :: Lens.Lens' CodeReviewSummary (Prelude.Maybe Prelude.Text)
codeReviewSummary_owner :: (Maybe Text -> f (Maybe Text))
-> CodeReviewSummary -> f CodeReviewSummary
codeReviewSummary_owner = (CodeReviewSummary -> Maybe Text)
-> (CodeReviewSummary -> Maybe Text -> CodeReviewSummary)
-> Lens
     CodeReviewSummary CodeReviewSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReviewSummary' {Maybe Text
owner :: Maybe Text
$sel:owner:CodeReviewSummary' :: CodeReviewSummary -> Maybe Text
owner} -> Maybe Text
owner) (\s :: CodeReviewSummary
s@CodeReviewSummary' {} Maybe Text
a -> CodeReviewSummary
s {$sel:owner:CodeReviewSummary' :: Maybe Text
owner = Maybe Text
a} :: CodeReviewSummary)

-- | The name of the code review.
codeReviewSummary_name :: Lens.Lens' CodeReviewSummary (Prelude.Maybe Prelude.Text)
codeReviewSummary_name :: (Maybe Text -> f (Maybe Text))
-> CodeReviewSummary -> f CodeReviewSummary
codeReviewSummary_name = (CodeReviewSummary -> Maybe Text)
-> (CodeReviewSummary -> Maybe Text -> CodeReviewSummary)
-> Lens
     CodeReviewSummary CodeReviewSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReviewSummary' {Maybe Text
name :: Maybe Text
$sel:name:CodeReviewSummary' :: CodeReviewSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: CodeReviewSummary
s@CodeReviewSummary' {} Maybe Text
a -> CodeReviewSummary
s {$sel:name:CodeReviewSummary' :: Maybe Text
name = Maybe Text
a} :: CodeReviewSummary)

-- | The Amazon Resource Name (ARN) of the
-- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html CodeReview>
-- object.
codeReviewSummary_codeReviewArn :: Lens.Lens' CodeReviewSummary (Prelude.Maybe Prelude.Text)
codeReviewSummary_codeReviewArn :: (Maybe Text -> f (Maybe Text))
-> CodeReviewSummary -> f CodeReviewSummary
codeReviewSummary_codeReviewArn = (CodeReviewSummary -> Maybe Text)
-> (CodeReviewSummary -> Maybe Text -> CodeReviewSummary)
-> Lens
     CodeReviewSummary CodeReviewSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReviewSummary' {Maybe Text
codeReviewArn :: Maybe Text
$sel:codeReviewArn:CodeReviewSummary' :: CodeReviewSummary -> Maybe Text
codeReviewArn} -> Maybe Text
codeReviewArn) (\s :: CodeReviewSummary
s@CodeReviewSummary' {} Maybe Text
a -> CodeReviewSummary
s {$sel:codeReviewArn:CodeReviewSummary' :: Maybe Text
codeReviewArn = Maybe Text
a} :: CodeReviewSummary)

-- | The name of the repository.
codeReviewSummary_repositoryName :: Lens.Lens' CodeReviewSummary (Prelude.Maybe Prelude.Text)
codeReviewSummary_repositoryName :: (Maybe Text -> f (Maybe Text))
-> CodeReviewSummary -> f CodeReviewSummary
codeReviewSummary_repositoryName = (CodeReviewSummary -> Maybe Text)
-> (CodeReviewSummary -> Maybe Text -> CodeReviewSummary)
-> Lens
     CodeReviewSummary CodeReviewSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReviewSummary' {Maybe Text
repositoryName :: Maybe Text
$sel:repositoryName:CodeReviewSummary' :: CodeReviewSummary -> Maybe Text
repositoryName} -> Maybe Text
repositoryName) (\s :: CodeReviewSummary
s@CodeReviewSummary' {} Maybe Text
a -> CodeReviewSummary
s {$sel:repositoryName:CodeReviewSummary' :: Maybe Text
repositoryName = Maybe Text
a} :: CodeReviewSummary)

-- | The type of the code review.
codeReviewSummary_type :: Lens.Lens' CodeReviewSummary (Prelude.Maybe Type)
codeReviewSummary_type :: (Maybe Type -> f (Maybe Type))
-> CodeReviewSummary -> f CodeReviewSummary
codeReviewSummary_type = (CodeReviewSummary -> Maybe Type)
-> (CodeReviewSummary -> Maybe Type -> CodeReviewSummary)
-> Lens
     CodeReviewSummary CodeReviewSummary (Maybe Type) (Maybe Type)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReviewSummary' {Maybe Type
type' :: Maybe Type
$sel:type':CodeReviewSummary' :: CodeReviewSummary -> Maybe Type
type'} -> Maybe Type
type') (\s :: CodeReviewSummary
s@CodeReviewSummary' {} Maybe Type
a -> CodeReviewSummary
s {$sel:type':CodeReviewSummary' :: Maybe Type
type' = Maybe Type
a} :: CodeReviewSummary)

-- | Undocumented member.
codeReviewSummary_sourceCodeType :: Lens.Lens' CodeReviewSummary (Prelude.Maybe SourceCodeType)
codeReviewSummary_sourceCodeType :: (Maybe SourceCodeType -> f (Maybe SourceCodeType))
-> CodeReviewSummary -> f CodeReviewSummary
codeReviewSummary_sourceCodeType = (CodeReviewSummary -> Maybe SourceCodeType)
-> (CodeReviewSummary -> Maybe SourceCodeType -> CodeReviewSummary)
-> Lens
     CodeReviewSummary
     CodeReviewSummary
     (Maybe SourceCodeType)
     (Maybe SourceCodeType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReviewSummary' {Maybe SourceCodeType
sourceCodeType :: Maybe SourceCodeType
$sel:sourceCodeType:CodeReviewSummary' :: CodeReviewSummary -> Maybe SourceCodeType
sourceCodeType} -> Maybe SourceCodeType
sourceCodeType) (\s :: CodeReviewSummary
s@CodeReviewSummary' {} Maybe SourceCodeType
a -> CodeReviewSummary
s {$sel:sourceCodeType:CodeReviewSummary' :: Maybe SourceCodeType
sourceCodeType = Maybe SourceCodeType
a} :: CodeReviewSummary)

-- | The statistics from the code review.
codeReviewSummary_metricsSummary :: Lens.Lens' CodeReviewSummary (Prelude.Maybe MetricsSummary)
codeReviewSummary_metricsSummary :: (Maybe MetricsSummary -> f (Maybe MetricsSummary))
-> CodeReviewSummary -> f CodeReviewSummary
codeReviewSummary_metricsSummary = (CodeReviewSummary -> Maybe MetricsSummary)
-> (CodeReviewSummary -> Maybe MetricsSummary -> CodeReviewSummary)
-> Lens
     CodeReviewSummary
     CodeReviewSummary
     (Maybe MetricsSummary)
     (Maybe MetricsSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReviewSummary' {Maybe MetricsSummary
metricsSummary :: Maybe MetricsSummary
$sel:metricsSummary:CodeReviewSummary' :: CodeReviewSummary -> Maybe MetricsSummary
metricsSummary} -> Maybe MetricsSummary
metricsSummary) (\s :: CodeReviewSummary
s@CodeReviewSummary' {} Maybe MetricsSummary
a -> CodeReviewSummary
s {$sel:metricsSummary:CodeReviewSummary' :: Maybe MetricsSummary
metricsSummary = Maybe MetricsSummary
a} :: CodeReviewSummary)

-- | The time, in milliseconds since the epoch, when the code review was
-- created.
codeReviewSummary_createdTimeStamp :: Lens.Lens' CodeReviewSummary (Prelude.Maybe Prelude.UTCTime)
codeReviewSummary_createdTimeStamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CodeReviewSummary -> f CodeReviewSummary
codeReviewSummary_createdTimeStamp = (CodeReviewSummary -> Maybe POSIX)
-> (CodeReviewSummary -> Maybe POSIX -> CodeReviewSummary)
-> Lens
     CodeReviewSummary CodeReviewSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReviewSummary' {Maybe POSIX
createdTimeStamp :: Maybe POSIX
$sel:createdTimeStamp:CodeReviewSummary' :: CodeReviewSummary -> Maybe POSIX
createdTimeStamp} -> Maybe POSIX
createdTimeStamp) (\s :: CodeReviewSummary
s@CodeReviewSummary' {} Maybe POSIX
a -> CodeReviewSummary
s {$sel:createdTimeStamp:CodeReviewSummary' :: Maybe POSIX
createdTimeStamp = Maybe POSIX
a} :: CodeReviewSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> CodeReviewSummary -> f CodeReviewSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CodeReviewSummary
-> f CodeReviewSummary
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

-- | The time, in milliseconds since the epoch, when the code review was last
-- updated.
codeReviewSummary_lastUpdatedTimeStamp :: Lens.Lens' CodeReviewSummary (Prelude.Maybe Prelude.UTCTime)
codeReviewSummary_lastUpdatedTimeStamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CodeReviewSummary -> f CodeReviewSummary
codeReviewSummary_lastUpdatedTimeStamp = (CodeReviewSummary -> Maybe POSIX)
-> (CodeReviewSummary -> Maybe POSIX -> CodeReviewSummary)
-> Lens
     CodeReviewSummary CodeReviewSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeReviewSummary' {Maybe POSIX
lastUpdatedTimeStamp :: Maybe POSIX
$sel:lastUpdatedTimeStamp:CodeReviewSummary' :: CodeReviewSummary -> Maybe POSIX
lastUpdatedTimeStamp} -> Maybe POSIX
lastUpdatedTimeStamp) (\s :: CodeReviewSummary
s@CodeReviewSummary' {} Maybe POSIX
a -> CodeReviewSummary
s {$sel:lastUpdatedTimeStamp:CodeReviewSummary' :: Maybe POSIX
lastUpdatedTimeStamp = Maybe POSIX
a} :: CodeReviewSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> CodeReviewSummary -> f CodeReviewSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CodeReviewSummary
-> f CodeReviewSummary
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 CodeReviewSummary where
  parseJSON :: Value -> Parser CodeReviewSummary
parseJSON =
    String
-> (Object -> Parser CodeReviewSummary)
-> Value
-> Parser CodeReviewSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"CodeReviewSummary"
      ( \Object
x ->
          Maybe JobState
-> Maybe Text
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Type
-> Maybe SourceCodeType
-> Maybe MetricsSummary
-> Maybe POSIX
-> Maybe POSIX
-> CodeReviewSummary
CodeReviewSummary'
            (Maybe JobState
 -> Maybe Text
 -> Maybe ProviderType
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Type
 -> Maybe SourceCodeType
 -> Maybe MetricsSummary
 -> Maybe POSIX
 -> Maybe POSIX
 -> CodeReviewSummary)
-> Parser (Maybe JobState)
-> Parser
     (Maybe Text
      -> Maybe ProviderType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Type
      -> Maybe SourceCodeType
      -> Maybe MetricsSummary
      -> Maybe POSIX
      -> Maybe POSIX
      -> CodeReviewSummary)
forall (f :: * -> *) a b. Functor 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 Text
   -> Maybe ProviderType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Type
   -> Maybe SourceCodeType
   -> Maybe MetricsSummary
   -> Maybe POSIX
   -> Maybe POSIX
   -> CodeReviewSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe ProviderType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Type
      -> Maybe SourceCodeType
      -> Maybe MetricsSummary
      -> Maybe POSIX
      -> Maybe POSIX
      -> CodeReviewSummary)
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 MetricsSummary
   -> Maybe POSIX
   -> Maybe POSIX
   -> CodeReviewSummary)
-> Parser (Maybe ProviderType)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Type
      -> Maybe SourceCodeType
      -> Maybe MetricsSummary
      -> Maybe POSIX
      -> Maybe POSIX
      -> CodeReviewSummary)
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 MetricsSummary
   -> Maybe POSIX
   -> Maybe POSIX
   -> CodeReviewSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Type
      -> Maybe SourceCodeType
      -> Maybe MetricsSummary
      -> Maybe POSIX
      -> Maybe POSIX
      -> CodeReviewSummary)
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 MetricsSummary
   -> Maybe POSIX
   -> Maybe POSIX
   -> CodeReviewSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Type
      -> Maybe SourceCodeType
      -> Maybe MetricsSummary
      -> Maybe POSIX
      -> Maybe POSIX
      -> CodeReviewSummary)
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 MetricsSummary
   -> Maybe POSIX
   -> Maybe POSIX
   -> CodeReviewSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Type
      -> Maybe SourceCodeType
      -> Maybe MetricsSummary
      -> Maybe POSIX
      -> Maybe POSIX
      -> CodeReviewSummary)
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 MetricsSummary
   -> Maybe POSIX
   -> Maybe POSIX
   -> CodeReviewSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Type
      -> Maybe SourceCodeType
      -> Maybe MetricsSummary
      -> Maybe POSIX
      -> Maybe POSIX
      -> CodeReviewSummary)
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 MetricsSummary
   -> Maybe POSIX
   -> Maybe POSIX
   -> CodeReviewSummary)
-> Parser (Maybe Type)
-> Parser
     (Maybe SourceCodeType
      -> Maybe MetricsSummary
      -> Maybe POSIX
      -> Maybe POSIX
      -> CodeReviewSummary)
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 MetricsSummary
   -> Maybe POSIX
   -> Maybe POSIX
   -> CodeReviewSummary)
-> Parser (Maybe SourceCodeType)
-> Parser
     (Maybe MetricsSummary
      -> Maybe POSIX -> Maybe POSIX -> CodeReviewSummary)
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 MetricsSummary
   -> Maybe POSIX -> Maybe POSIX -> CodeReviewSummary)
-> Parser (Maybe MetricsSummary)
-> Parser (Maybe POSIX -> Maybe POSIX -> CodeReviewSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MetricsSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MetricsSummary")
            Parser (Maybe POSIX -> Maybe POSIX -> CodeReviewSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe POSIX -> CodeReviewSummary)
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 POSIX -> CodeReviewSummary)
-> Parser (Maybe POSIX) -> Parser CodeReviewSummary
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 CodeReviewSummary

instance Prelude.NFData CodeReviewSummary