{-# 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.SourceCodeType
-- 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.SourceCodeType where

import Amazonka.CodeGuruReviewer.Types.BranchDiffSourceCodeType
import Amazonka.CodeGuruReviewer.Types.CommitDiffSourceCodeType
import Amazonka.CodeGuruReviewer.Types.RepositoryHeadSourceCodeType
import Amazonka.CodeGuruReviewer.Types.RequestMetadata
import Amazonka.CodeGuruReviewer.Types.S3BucketRepository
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Specifies the source code that is analyzed in a code review.
--
-- /See:/ 'newSourceCodeType' smart constructor.
data SourceCodeType = SourceCodeType'
  { -- | Information about an associated repository in an S3 bucket that includes
    -- its name and an @S3RepositoryDetails@ object. The @S3RepositoryDetails@
    -- object includes the name of an S3 bucket, an S3 key for a source code
    -- .zip file, and an S3 key for a build artifacts .zip file.
    -- @S3BucketRepository@ is required in
    -- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType SourceCodeType>
    -- for @S3BucketRepository@ based code reviews.
    SourceCodeType -> Maybe S3BucketRepository
s3BucketRepository :: Prelude.Maybe S3BucketRepository,
    -- | Metadata that is associated with a code review. This applies to any type
    -- of code review supported by CodeGuru Reviewer. The @RequestMetadaa@
    -- field captures any event metadata. For example, it might capture
    -- metadata associated with an event trigger, such as a push or a pull
    -- request.
    SourceCodeType -> Maybe RequestMetadata
requestMetadata :: Prelude.Maybe RequestMetadata,
    SourceCodeType -> Maybe RepositoryHeadSourceCodeType
repositoryHead :: Prelude.Maybe RepositoryHeadSourceCodeType,
    -- | A
    -- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType SourceCodeType>
    -- that specifies a commit diff created by a pull request on an associated
    -- repository.
    SourceCodeType -> Maybe CommitDiffSourceCodeType
commitDiff :: Prelude.Maybe CommitDiffSourceCodeType,
    -- | A type of
    -- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType SourceCodeType>
    -- that specifies a source branch name and a destination branch name in an
    -- associated repository.
    SourceCodeType -> Maybe BranchDiffSourceCodeType
branchDiff :: Prelude.Maybe BranchDiffSourceCodeType
  }
  deriving (SourceCodeType -> SourceCodeType -> Bool
(SourceCodeType -> SourceCodeType -> Bool)
-> (SourceCodeType -> SourceCodeType -> Bool) -> Eq SourceCodeType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SourceCodeType -> SourceCodeType -> Bool
$c/= :: SourceCodeType -> SourceCodeType -> Bool
== :: SourceCodeType -> SourceCodeType -> Bool
$c== :: SourceCodeType -> SourceCodeType -> Bool
Prelude.Eq, ReadPrec [SourceCodeType]
ReadPrec SourceCodeType
Int -> ReadS SourceCodeType
ReadS [SourceCodeType]
(Int -> ReadS SourceCodeType)
-> ReadS [SourceCodeType]
-> ReadPrec SourceCodeType
-> ReadPrec [SourceCodeType]
-> Read SourceCodeType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SourceCodeType]
$creadListPrec :: ReadPrec [SourceCodeType]
readPrec :: ReadPrec SourceCodeType
$creadPrec :: ReadPrec SourceCodeType
readList :: ReadS [SourceCodeType]
$creadList :: ReadS [SourceCodeType]
readsPrec :: Int -> ReadS SourceCodeType
$creadsPrec :: Int -> ReadS SourceCodeType
Prelude.Read, Int -> SourceCodeType -> ShowS
[SourceCodeType] -> ShowS
SourceCodeType -> String
(Int -> SourceCodeType -> ShowS)
-> (SourceCodeType -> String)
-> ([SourceCodeType] -> ShowS)
-> Show SourceCodeType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SourceCodeType] -> ShowS
$cshowList :: [SourceCodeType] -> ShowS
show :: SourceCodeType -> String
$cshow :: SourceCodeType -> String
showsPrec :: Int -> SourceCodeType -> ShowS
$cshowsPrec :: Int -> SourceCodeType -> ShowS
Prelude.Show, (forall x. SourceCodeType -> Rep SourceCodeType x)
-> (forall x. Rep SourceCodeType x -> SourceCodeType)
-> Generic SourceCodeType
forall x. Rep SourceCodeType x -> SourceCodeType
forall x. SourceCodeType -> Rep SourceCodeType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SourceCodeType x -> SourceCodeType
$cfrom :: forall x. SourceCodeType -> Rep SourceCodeType x
Prelude.Generic)

-- |
-- Create a value of 'SourceCodeType' 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:
--
-- 's3BucketRepository', 'sourceCodeType_s3BucketRepository' - Information about an associated repository in an S3 bucket that includes
-- its name and an @S3RepositoryDetails@ object. The @S3RepositoryDetails@
-- object includes the name of an S3 bucket, an S3 key for a source code
-- .zip file, and an S3 key for a build artifacts .zip file.
-- @S3BucketRepository@ is required in
-- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType SourceCodeType>
-- for @S3BucketRepository@ based code reviews.
--
-- 'requestMetadata', 'sourceCodeType_requestMetadata' - Metadata that is associated with a code review. This applies to any type
-- of code review supported by CodeGuru Reviewer. The @RequestMetadaa@
-- field captures any event metadata. For example, it might capture
-- metadata associated with an event trigger, such as a push or a pull
-- request.
--
-- 'repositoryHead', 'sourceCodeType_repositoryHead' - Undocumented member.
--
-- 'commitDiff', 'sourceCodeType_commitDiff' - A
-- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType SourceCodeType>
-- that specifies a commit diff created by a pull request on an associated
-- repository.
--
-- 'branchDiff', 'sourceCodeType_branchDiff' - A type of
-- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType SourceCodeType>
-- that specifies a source branch name and a destination branch name in an
-- associated repository.
newSourceCodeType ::
  SourceCodeType
newSourceCodeType :: SourceCodeType
newSourceCodeType =
  SourceCodeType' :: Maybe S3BucketRepository
-> Maybe RequestMetadata
-> Maybe RepositoryHeadSourceCodeType
-> Maybe CommitDiffSourceCodeType
-> Maybe BranchDiffSourceCodeType
-> SourceCodeType
SourceCodeType'
    { $sel:s3BucketRepository:SourceCodeType' :: Maybe S3BucketRepository
s3BucketRepository =
        Maybe S3BucketRepository
forall a. Maybe a
Prelude.Nothing,
      $sel:requestMetadata:SourceCodeType' :: Maybe RequestMetadata
requestMetadata = Maybe RequestMetadata
forall a. Maybe a
Prelude.Nothing,
      $sel:repositoryHead:SourceCodeType' :: Maybe RepositoryHeadSourceCodeType
repositoryHead = Maybe RepositoryHeadSourceCodeType
forall a. Maybe a
Prelude.Nothing,
      $sel:commitDiff:SourceCodeType' :: Maybe CommitDiffSourceCodeType
commitDiff = Maybe CommitDiffSourceCodeType
forall a. Maybe a
Prelude.Nothing,
      $sel:branchDiff:SourceCodeType' :: Maybe BranchDiffSourceCodeType
branchDiff = Maybe BranchDiffSourceCodeType
forall a. Maybe a
Prelude.Nothing
    }

-- | Information about an associated repository in an S3 bucket that includes
-- its name and an @S3RepositoryDetails@ object. The @S3RepositoryDetails@
-- object includes the name of an S3 bucket, an S3 key for a source code
-- .zip file, and an S3 key for a build artifacts .zip file.
-- @S3BucketRepository@ is required in
-- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType SourceCodeType>
-- for @S3BucketRepository@ based code reviews.
sourceCodeType_s3BucketRepository :: Lens.Lens' SourceCodeType (Prelude.Maybe S3BucketRepository)
sourceCodeType_s3BucketRepository :: (Maybe S3BucketRepository -> f (Maybe S3BucketRepository))
-> SourceCodeType -> f SourceCodeType
sourceCodeType_s3BucketRepository = (SourceCodeType -> Maybe S3BucketRepository)
-> (SourceCodeType -> Maybe S3BucketRepository -> SourceCodeType)
-> Lens
     SourceCodeType
     SourceCodeType
     (Maybe S3BucketRepository)
     (Maybe S3BucketRepository)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceCodeType' {Maybe S3BucketRepository
s3BucketRepository :: Maybe S3BucketRepository
$sel:s3BucketRepository:SourceCodeType' :: SourceCodeType -> Maybe S3BucketRepository
s3BucketRepository} -> Maybe S3BucketRepository
s3BucketRepository) (\s :: SourceCodeType
s@SourceCodeType' {} Maybe S3BucketRepository
a -> SourceCodeType
s {$sel:s3BucketRepository:SourceCodeType' :: Maybe S3BucketRepository
s3BucketRepository = Maybe S3BucketRepository
a} :: SourceCodeType)

-- | Metadata that is associated with a code review. This applies to any type
-- of code review supported by CodeGuru Reviewer. The @RequestMetadaa@
-- field captures any event metadata. For example, it might capture
-- metadata associated with an event trigger, such as a push or a pull
-- request.
sourceCodeType_requestMetadata :: Lens.Lens' SourceCodeType (Prelude.Maybe RequestMetadata)
sourceCodeType_requestMetadata :: (Maybe RequestMetadata -> f (Maybe RequestMetadata))
-> SourceCodeType -> f SourceCodeType
sourceCodeType_requestMetadata = (SourceCodeType -> Maybe RequestMetadata)
-> (SourceCodeType -> Maybe RequestMetadata -> SourceCodeType)
-> Lens
     SourceCodeType
     SourceCodeType
     (Maybe RequestMetadata)
     (Maybe RequestMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceCodeType' {Maybe RequestMetadata
requestMetadata :: Maybe RequestMetadata
$sel:requestMetadata:SourceCodeType' :: SourceCodeType -> Maybe RequestMetadata
requestMetadata} -> Maybe RequestMetadata
requestMetadata) (\s :: SourceCodeType
s@SourceCodeType' {} Maybe RequestMetadata
a -> SourceCodeType
s {$sel:requestMetadata:SourceCodeType' :: Maybe RequestMetadata
requestMetadata = Maybe RequestMetadata
a} :: SourceCodeType)

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

-- | A
-- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType SourceCodeType>
-- that specifies a commit diff created by a pull request on an associated
-- repository.
sourceCodeType_commitDiff :: Lens.Lens' SourceCodeType (Prelude.Maybe CommitDiffSourceCodeType)
sourceCodeType_commitDiff :: (Maybe CommitDiffSourceCodeType
 -> f (Maybe CommitDiffSourceCodeType))
-> SourceCodeType -> f SourceCodeType
sourceCodeType_commitDiff = (SourceCodeType -> Maybe CommitDiffSourceCodeType)
-> (SourceCodeType
    -> Maybe CommitDiffSourceCodeType -> SourceCodeType)
-> Lens
     SourceCodeType
     SourceCodeType
     (Maybe CommitDiffSourceCodeType)
     (Maybe CommitDiffSourceCodeType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceCodeType' {Maybe CommitDiffSourceCodeType
commitDiff :: Maybe CommitDiffSourceCodeType
$sel:commitDiff:SourceCodeType' :: SourceCodeType -> Maybe CommitDiffSourceCodeType
commitDiff} -> Maybe CommitDiffSourceCodeType
commitDiff) (\s :: SourceCodeType
s@SourceCodeType' {} Maybe CommitDiffSourceCodeType
a -> SourceCodeType
s {$sel:commitDiff:SourceCodeType' :: Maybe CommitDiffSourceCodeType
commitDiff = Maybe CommitDiffSourceCodeType
a} :: SourceCodeType)

-- | A type of
-- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType SourceCodeType>
-- that specifies a source branch name and a destination branch name in an
-- associated repository.
sourceCodeType_branchDiff :: Lens.Lens' SourceCodeType (Prelude.Maybe BranchDiffSourceCodeType)
sourceCodeType_branchDiff :: (Maybe BranchDiffSourceCodeType
 -> f (Maybe BranchDiffSourceCodeType))
-> SourceCodeType -> f SourceCodeType
sourceCodeType_branchDiff = (SourceCodeType -> Maybe BranchDiffSourceCodeType)
-> (SourceCodeType
    -> Maybe BranchDiffSourceCodeType -> SourceCodeType)
-> Lens
     SourceCodeType
     SourceCodeType
     (Maybe BranchDiffSourceCodeType)
     (Maybe BranchDiffSourceCodeType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceCodeType' {Maybe BranchDiffSourceCodeType
branchDiff :: Maybe BranchDiffSourceCodeType
$sel:branchDiff:SourceCodeType' :: SourceCodeType -> Maybe BranchDiffSourceCodeType
branchDiff} -> Maybe BranchDiffSourceCodeType
branchDiff) (\s :: SourceCodeType
s@SourceCodeType' {} Maybe BranchDiffSourceCodeType
a -> SourceCodeType
s {$sel:branchDiff:SourceCodeType' :: Maybe BranchDiffSourceCodeType
branchDiff = Maybe BranchDiffSourceCodeType
a} :: SourceCodeType)

instance Core.FromJSON SourceCodeType where
  parseJSON :: Value -> Parser SourceCodeType
parseJSON =
    String
-> (Object -> Parser SourceCodeType)
-> Value
-> Parser SourceCodeType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SourceCodeType"
      ( \Object
x ->
          Maybe S3BucketRepository
-> Maybe RequestMetadata
-> Maybe RepositoryHeadSourceCodeType
-> Maybe CommitDiffSourceCodeType
-> Maybe BranchDiffSourceCodeType
-> SourceCodeType
SourceCodeType'
            (Maybe S3BucketRepository
 -> Maybe RequestMetadata
 -> Maybe RepositoryHeadSourceCodeType
 -> Maybe CommitDiffSourceCodeType
 -> Maybe BranchDiffSourceCodeType
 -> SourceCodeType)
-> Parser (Maybe S3BucketRepository)
-> Parser
     (Maybe RequestMetadata
      -> Maybe RepositoryHeadSourceCodeType
      -> Maybe CommitDiffSourceCodeType
      -> Maybe BranchDiffSourceCodeType
      -> SourceCodeType)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe S3BucketRepository)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"S3BucketRepository")
            Parser
  (Maybe RequestMetadata
   -> Maybe RepositoryHeadSourceCodeType
   -> Maybe CommitDiffSourceCodeType
   -> Maybe BranchDiffSourceCodeType
   -> SourceCodeType)
-> Parser (Maybe RequestMetadata)
-> Parser
     (Maybe RepositoryHeadSourceCodeType
      -> Maybe CommitDiffSourceCodeType
      -> Maybe BranchDiffSourceCodeType
      -> SourceCodeType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RequestMetadata)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RequestMetadata")
            Parser
  (Maybe RepositoryHeadSourceCodeType
   -> Maybe CommitDiffSourceCodeType
   -> Maybe BranchDiffSourceCodeType
   -> SourceCodeType)
-> Parser (Maybe RepositoryHeadSourceCodeType)
-> Parser
     (Maybe CommitDiffSourceCodeType
      -> Maybe BranchDiffSourceCodeType -> SourceCodeType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RepositoryHeadSourceCodeType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RepositoryHead")
            Parser
  (Maybe CommitDiffSourceCodeType
   -> Maybe BranchDiffSourceCodeType -> SourceCodeType)
-> Parser (Maybe CommitDiffSourceCodeType)
-> Parser (Maybe BranchDiffSourceCodeType -> SourceCodeType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CommitDiffSourceCodeType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CommitDiff")
            Parser (Maybe BranchDiffSourceCodeType -> SourceCodeType)
-> Parser (Maybe BranchDiffSourceCodeType) -> Parser SourceCodeType
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BranchDiffSourceCodeType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BranchDiff")
      )

instance Prelude.Hashable SourceCodeType

instance Prelude.NFData SourceCodeType

instance Core.ToJSON SourceCodeType where
  toJSON :: SourceCodeType -> Value
toJSON SourceCodeType' {Maybe BranchDiffSourceCodeType
Maybe CommitDiffSourceCodeType
Maybe RepositoryHeadSourceCodeType
Maybe S3BucketRepository
Maybe RequestMetadata
branchDiff :: Maybe BranchDiffSourceCodeType
commitDiff :: Maybe CommitDiffSourceCodeType
repositoryHead :: Maybe RepositoryHeadSourceCodeType
requestMetadata :: Maybe RequestMetadata
s3BucketRepository :: Maybe S3BucketRepository
$sel:branchDiff:SourceCodeType' :: SourceCodeType -> Maybe BranchDiffSourceCodeType
$sel:commitDiff:SourceCodeType' :: SourceCodeType -> Maybe CommitDiffSourceCodeType
$sel:repositoryHead:SourceCodeType' :: SourceCodeType -> Maybe RepositoryHeadSourceCodeType
$sel:requestMetadata:SourceCodeType' :: SourceCodeType -> Maybe RequestMetadata
$sel:s3BucketRepository:SourceCodeType' :: SourceCodeType -> Maybe S3BucketRepository
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"S3BucketRepository" Text -> S3BucketRepository -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (S3BucketRepository -> Pair)
-> Maybe S3BucketRepository -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3BucketRepository
s3BucketRepository,
            (Text
"RequestMetadata" Text -> RequestMetadata -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (RequestMetadata -> Pair) -> Maybe RequestMetadata -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RequestMetadata
requestMetadata,
            (Text
"RepositoryHead" Text -> RepositoryHeadSourceCodeType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (RepositoryHeadSourceCodeType -> Pair)
-> Maybe RepositoryHeadSourceCodeType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RepositoryHeadSourceCodeType
repositoryHead,
            (Text
"CommitDiff" Text -> CommitDiffSourceCodeType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (CommitDiffSourceCodeType -> Pair)
-> Maybe CommitDiffSourceCodeType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CommitDiffSourceCodeType
commitDiff,
            (Text
"BranchDiff" Text -> BranchDiffSourceCodeType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (BranchDiffSourceCodeType -> Pair)
-> Maybe BranchDiffSourceCodeType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BranchDiffSourceCodeType
branchDiff
          ]
      )