{-# 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.CodeCommit.Types.CommentsForComparedCommit where
import Amazonka.CodeCommit.Types.Comment
import Amazonka.CodeCommit.Types.Location
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data =
{
:: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe [Comment],
:: Prelude.Maybe Location,
:: Prelude.Maybe Prelude.Text
}
deriving (CommentsForComparedCommit -> CommentsForComparedCommit -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CommentsForComparedCommit -> CommentsForComparedCommit -> Bool
$c/= :: CommentsForComparedCommit -> CommentsForComparedCommit -> Bool
== :: CommentsForComparedCommit -> CommentsForComparedCommit -> Bool
$c== :: CommentsForComparedCommit -> CommentsForComparedCommit -> Bool
Prelude.Eq, ReadPrec [CommentsForComparedCommit]
ReadPrec CommentsForComparedCommit
Int -> ReadS CommentsForComparedCommit
ReadS [CommentsForComparedCommit]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CommentsForComparedCommit]
$creadListPrec :: ReadPrec [CommentsForComparedCommit]
readPrec :: ReadPrec CommentsForComparedCommit
$creadPrec :: ReadPrec CommentsForComparedCommit
readList :: ReadS [CommentsForComparedCommit]
$creadList :: ReadS [CommentsForComparedCommit]
readsPrec :: Int -> ReadS CommentsForComparedCommit
$creadsPrec :: Int -> ReadS CommentsForComparedCommit
Prelude.Read, Int -> CommentsForComparedCommit -> ShowS
[CommentsForComparedCommit] -> ShowS
CommentsForComparedCommit -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CommentsForComparedCommit] -> ShowS
$cshowList :: [CommentsForComparedCommit] -> ShowS
show :: CommentsForComparedCommit -> String
$cshow :: CommentsForComparedCommit -> String
showsPrec :: Int -> CommentsForComparedCommit -> ShowS
$cshowsPrec :: Int -> CommentsForComparedCommit -> ShowS
Prelude.Show, forall x.
Rep CommentsForComparedCommit x -> CommentsForComparedCommit
forall x.
CommentsForComparedCommit -> Rep CommentsForComparedCommit x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CommentsForComparedCommit x -> CommentsForComparedCommit
$cfrom :: forall x.
CommentsForComparedCommit -> Rep CommentsForComparedCommit x
Prelude.Generic)
newCommentsForComparedCommit ::
CommentsForComparedCommit
=
CommentsForComparedCommit'
{ $sel:afterBlobId:CommentsForComparedCommit' :: Maybe Text
afterBlobId =
forall a. Maybe a
Prelude.Nothing,
$sel:afterCommitId:CommentsForComparedCommit' :: Maybe Text
afterCommitId = forall a. Maybe a
Prelude.Nothing,
$sel:beforeBlobId:CommentsForComparedCommit' :: Maybe Text
beforeBlobId = forall a. Maybe a
Prelude.Nothing,
$sel:beforeCommitId:CommentsForComparedCommit' :: Maybe Text
beforeCommitId = forall a. Maybe a
Prelude.Nothing,
$sel:comments:CommentsForComparedCommit' :: Maybe [Comment]
comments = forall a. Maybe a
Prelude.Nothing,
$sel:location:CommentsForComparedCommit' :: Maybe Location
location = forall a. Maybe a
Prelude.Nothing,
$sel:repositoryName:CommentsForComparedCommit' :: Maybe Text
repositoryName = forall a. Maybe a
Prelude.Nothing
}
commentsForComparedCommit_afterBlobId :: Lens.Lens' CommentsForComparedCommit (Prelude.Maybe Prelude.Text)
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CommentsForComparedCommit' {Maybe Text
afterBlobId :: Maybe Text
$sel:afterBlobId:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Text
afterBlobId} -> Maybe Text
afterBlobId) (\s :: CommentsForComparedCommit
s@CommentsForComparedCommit' {} Maybe Text
a -> CommentsForComparedCommit
s {$sel:afterBlobId:CommentsForComparedCommit' :: Maybe Text
afterBlobId = Maybe Text
a} :: CommentsForComparedCommit)
commentsForComparedCommit_afterCommitId :: Lens.Lens' CommentsForComparedCommit (Prelude.Maybe Prelude.Text)
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CommentsForComparedCommit' {Maybe Text
afterCommitId :: Maybe Text
$sel:afterCommitId:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Text
afterCommitId} -> Maybe Text
afterCommitId) (\s :: CommentsForComparedCommit
s@CommentsForComparedCommit' {} Maybe Text
a -> CommentsForComparedCommit
s {$sel:afterCommitId:CommentsForComparedCommit' :: Maybe Text
afterCommitId = Maybe Text
a} :: CommentsForComparedCommit)
commentsForComparedCommit_beforeBlobId :: Lens.Lens' CommentsForComparedCommit (Prelude.Maybe Prelude.Text)
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CommentsForComparedCommit' {Maybe Text
beforeBlobId :: Maybe Text
$sel:beforeBlobId:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Text
beforeBlobId} -> Maybe Text
beforeBlobId) (\s :: CommentsForComparedCommit
s@CommentsForComparedCommit' {} Maybe Text
a -> CommentsForComparedCommit
s {$sel:beforeBlobId:CommentsForComparedCommit' :: Maybe Text
beforeBlobId = Maybe Text
a} :: CommentsForComparedCommit)
commentsForComparedCommit_beforeCommitId :: Lens.Lens' CommentsForComparedCommit (Prelude.Maybe Prelude.Text)
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CommentsForComparedCommit' {Maybe Text
beforeCommitId :: Maybe Text
$sel:beforeCommitId:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Text
beforeCommitId} -> Maybe Text
beforeCommitId) (\s :: CommentsForComparedCommit
s@CommentsForComparedCommit' {} Maybe Text
a -> CommentsForComparedCommit
s {$sel:beforeCommitId:CommentsForComparedCommit' :: Maybe Text
beforeCommitId = Maybe Text
a} :: CommentsForComparedCommit)
commentsForComparedCommit_comments :: Lens.Lens' CommentsForComparedCommit (Prelude.Maybe [Comment])
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CommentsForComparedCommit' {Maybe [Comment]
comments :: Maybe [Comment]
$sel:comments:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe [Comment]
comments} -> Maybe [Comment]
comments) (\s :: CommentsForComparedCommit
s@CommentsForComparedCommit' {} Maybe [Comment]
a -> CommentsForComparedCommit
s {$sel:comments:CommentsForComparedCommit' :: Maybe [Comment]
comments = Maybe [Comment]
a} :: CommentsForComparedCommit) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
commentsForComparedCommit_location :: Lens.Lens' CommentsForComparedCommit (Prelude.Maybe Location)
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CommentsForComparedCommit' {Maybe Location
location :: Maybe Location
$sel:location:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Location
location} -> Maybe Location
location) (\s :: CommentsForComparedCommit
s@CommentsForComparedCommit' {} Maybe Location
a -> CommentsForComparedCommit
s {$sel:location:CommentsForComparedCommit' :: Maybe Location
location = Maybe Location
a} :: CommentsForComparedCommit)
commentsForComparedCommit_repositoryName :: Lens.Lens' CommentsForComparedCommit (Prelude.Maybe Prelude.Text)
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CommentsForComparedCommit' {Maybe Text
repositoryName :: Maybe Text
$sel:repositoryName:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Text
repositoryName} -> Maybe Text
repositoryName) (\s :: CommentsForComparedCommit
s@CommentsForComparedCommit' {} Maybe Text
a -> CommentsForComparedCommit
s {$sel:repositoryName:CommentsForComparedCommit' :: Maybe Text
repositoryName = Maybe Text
a} :: CommentsForComparedCommit)
instance Data.FromJSON CommentsForComparedCommit where
parseJSON :: Value -> Parser CommentsForComparedCommit
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CommentsForComparedCommit"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Comment]
-> Maybe Location
-> Maybe Text
-> CommentsForComparedCommit
CommentsForComparedCommit'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"afterBlobId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"afterCommitId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"beforeBlobId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"beforeCommitId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"comments" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"location")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"repositoryName")
)
instance Prelude.Hashable CommentsForComparedCommit where
hashWithSalt :: Int -> CommentsForComparedCommit -> Int
hashWithSalt Int
_salt CommentsForComparedCommit' {Maybe [Comment]
Maybe Text
Maybe Location
repositoryName :: Maybe Text
location :: Maybe Location
comments :: Maybe [Comment]
beforeCommitId :: Maybe Text
beforeBlobId :: Maybe Text
afterCommitId :: Maybe Text
afterBlobId :: Maybe Text
$sel:repositoryName:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Text
$sel:location:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Location
$sel:comments:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe [Comment]
$sel:beforeCommitId:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Text
$sel:beforeBlobId:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Text
$sel:afterCommitId:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Text
$sel:afterBlobId:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
afterBlobId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
afterCommitId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
beforeBlobId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
beforeCommitId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Comment]
comments
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Location
location
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
repositoryName
instance Prelude.NFData CommentsForComparedCommit where
rnf :: CommentsForComparedCommit -> ()
rnf CommentsForComparedCommit' {Maybe [Comment]
Maybe Text
Maybe Location
repositoryName :: Maybe Text
location :: Maybe Location
comments :: Maybe [Comment]
beforeCommitId :: Maybe Text
beforeBlobId :: Maybe Text
afterCommitId :: Maybe Text
afterBlobId :: Maybe Text
$sel:repositoryName:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Text
$sel:location:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Location
$sel:comments:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe [Comment]
$sel:beforeCommitId:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Text
$sel:beforeBlobId:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Text
$sel:afterCommitId:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Text
$sel:afterBlobId:CommentsForComparedCommit' :: CommentsForComparedCommit -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
afterBlobId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
afterCommitId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
beforeBlobId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
beforeCommitId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Comment]
comments
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Location
location
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
repositoryName