{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.CodeCommit.Types.Product where
import Network.AWS.CodeCommit.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data BlobMetadata = BlobMetadata'
{ _bmPath :: !(Maybe Text)
, _bmMode :: !(Maybe Text)
, _bmBlobId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
blobMetadata
:: BlobMetadata
blobMetadata =
BlobMetadata' {_bmPath = Nothing, _bmMode = Nothing, _bmBlobId = Nothing}
bmPath :: Lens' BlobMetadata (Maybe Text)
bmPath = lens _bmPath (\ s a -> s{_bmPath = a})
bmMode :: Lens' BlobMetadata (Maybe Text)
bmMode = lens _bmMode (\ s a -> s{_bmMode = a})
bmBlobId :: Lens' BlobMetadata (Maybe Text)
bmBlobId = lens _bmBlobId (\ s a -> s{_bmBlobId = a})
instance FromJSON BlobMetadata where
parseJSON
= withObject "BlobMetadata"
(\ x ->
BlobMetadata' <$>
(x .:? "path") <*> (x .:? "mode") <*>
(x .:? "blobId"))
instance Hashable BlobMetadata where
instance NFData BlobMetadata where
data BranchInfo = BranchInfo'
{ _biCommitId :: !(Maybe Text)
, _biBranchName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
branchInfo
:: BranchInfo
branchInfo = BranchInfo' {_biCommitId = Nothing, _biBranchName = Nothing}
biCommitId :: Lens' BranchInfo (Maybe Text)
biCommitId = lens _biCommitId (\ s a -> s{_biCommitId = a})
biBranchName :: Lens' BranchInfo (Maybe Text)
biBranchName = lens _biBranchName (\ s a -> s{_biBranchName = a})
instance FromJSON BranchInfo where
parseJSON
= withObject "BranchInfo"
(\ x ->
BranchInfo' <$>
(x .:? "commitId") <*> (x .:? "branchName"))
instance Hashable BranchInfo where
instance NFData BranchInfo where
data Comment = Comment'
{ _cLastModifiedDate :: !(Maybe POSIX)
, _cAuthorARN :: !(Maybe Text)
, _cContent :: !(Maybe Text)
, _cCreationDate :: !(Maybe POSIX)
, _cDeleted :: !(Maybe Bool)
, _cClientRequestToken :: !(Maybe Text)
, _cCommentId :: !(Maybe Text)
, _cInReplyTo :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
comment
:: Comment
comment =
Comment'
{ _cLastModifiedDate = Nothing
, _cAuthorARN = Nothing
, _cContent = Nothing
, _cCreationDate = Nothing
, _cDeleted = Nothing
, _cClientRequestToken = Nothing
, _cCommentId = Nothing
, _cInReplyTo = Nothing
}
cLastModifiedDate :: Lens' Comment (Maybe UTCTime)
cLastModifiedDate = lens _cLastModifiedDate (\ s a -> s{_cLastModifiedDate = a}) . mapping _Time
cAuthorARN :: Lens' Comment (Maybe Text)
cAuthorARN = lens _cAuthorARN (\ s a -> s{_cAuthorARN = a})
cContent :: Lens' Comment (Maybe Text)
cContent = lens _cContent (\ s a -> s{_cContent = a})
cCreationDate :: Lens' Comment (Maybe UTCTime)
cCreationDate = lens _cCreationDate (\ s a -> s{_cCreationDate = a}) . mapping _Time
cDeleted :: Lens' Comment (Maybe Bool)
cDeleted = lens _cDeleted (\ s a -> s{_cDeleted = a})
cClientRequestToken :: Lens' Comment (Maybe Text)
cClientRequestToken = lens _cClientRequestToken (\ s a -> s{_cClientRequestToken = a})
cCommentId :: Lens' Comment (Maybe Text)
cCommentId = lens _cCommentId (\ s a -> s{_cCommentId = a})
cInReplyTo :: Lens' Comment (Maybe Text)
cInReplyTo = lens _cInReplyTo (\ s a -> s{_cInReplyTo = a})
instance FromJSON Comment where
parseJSON
= withObject "Comment"
(\ x ->
Comment' <$>
(x .:? "lastModifiedDate") <*> (x .:? "authorArn")
<*> (x .:? "content")
<*> (x .:? "creationDate")
<*> (x .:? "deleted")
<*> (x .:? "clientRequestToken")
<*> (x .:? "commentId")
<*> (x .:? "inReplyTo"))
instance Hashable Comment where
instance NFData Comment where
data CommentsForComparedCommit = CommentsForComparedCommit'
{ _cfccBeforeBlobId :: !(Maybe Text)
, _cfccLocation :: !(Maybe Location)
, _cfccAfterCommitId :: !(Maybe Text)
, _cfccAfterBlobId :: !(Maybe Text)
, _cfccBeforeCommitId :: !(Maybe Text)
, _cfccRepositoryName :: !(Maybe Text)
, _cfccComments :: !(Maybe [Comment])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
commentsForComparedCommit
:: CommentsForComparedCommit
commentsForComparedCommit =
CommentsForComparedCommit'
{ _cfccBeforeBlobId = Nothing
, _cfccLocation = Nothing
, _cfccAfterCommitId = Nothing
, _cfccAfterBlobId = Nothing
, _cfccBeforeCommitId = Nothing
, _cfccRepositoryName = Nothing
, _cfccComments = Nothing
}
cfccBeforeBlobId :: Lens' CommentsForComparedCommit (Maybe Text)
cfccBeforeBlobId = lens _cfccBeforeBlobId (\ s a -> s{_cfccBeforeBlobId = a})
cfccLocation :: Lens' CommentsForComparedCommit (Maybe Location)
cfccLocation = lens _cfccLocation (\ s a -> s{_cfccLocation = a})
cfccAfterCommitId :: Lens' CommentsForComparedCommit (Maybe Text)
cfccAfterCommitId = lens _cfccAfterCommitId (\ s a -> s{_cfccAfterCommitId = a})
cfccAfterBlobId :: Lens' CommentsForComparedCommit (Maybe Text)
cfccAfterBlobId = lens _cfccAfterBlobId (\ s a -> s{_cfccAfterBlobId = a})
cfccBeforeCommitId :: Lens' CommentsForComparedCommit (Maybe Text)
cfccBeforeCommitId = lens _cfccBeforeCommitId (\ s a -> s{_cfccBeforeCommitId = a})
cfccRepositoryName :: Lens' CommentsForComparedCommit (Maybe Text)
cfccRepositoryName = lens _cfccRepositoryName (\ s a -> s{_cfccRepositoryName = a})
cfccComments :: Lens' CommentsForComparedCommit [Comment]
cfccComments = lens _cfccComments (\ s a -> s{_cfccComments = a}) . _Default . _Coerce
instance FromJSON CommentsForComparedCommit where
parseJSON
= withObject "CommentsForComparedCommit"
(\ x ->
CommentsForComparedCommit' <$>
(x .:? "beforeBlobId") <*> (x .:? "location") <*>
(x .:? "afterCommitId")
<*> (x .:? "afterBlobId")
<*> (x .:? "beforeCommitId")
<*> (x .:? "repositoryName")
<*> (x .:? "comments" .!= mempty))
instance Hashable CommentsForComparedCommit where
instance NFData CommentsForComparedCommit where
data CommentsForPullRequest = CommentsForPullRequest'
{ _cfprBeforeBlobId :: !(Maybe Text)
, _cfprLocation :: !(Maybe Location)
, _cfprAfterCommitId :: !(Maybe Text)
, _cfprPullRequestId :: !(Maybe Text)
, _cfprAfterBlobId :: !(Maybe Text)
, _cfprBeforeCommitId :: !(Maybe Text)
, _cfprRepositoryName :: !(Maybe Text)
, _cfprComments :: !(Maybe [Comment])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
commentsForPullRequest
:: CommentsForPullRequest
commentsForPullRequest =
CommentsForPullRequest'
{ _cfprBeforeBlobId = Nothing
, _cfprLocation = Nothing
, _cfprAfterCommitId = Nothing
, _cfprPullRequestId = Nothing
, _cfprAfterBlobId = Nothing
, _cfprBeforeCommitId = Nothing
, _cfprRepositoryName = Nothing
, _cfprComments = Nothing
}
cfprBeforeBlobId :: Lens' CommentsForPullRequest (Maybe Text)
cfprBeforeBlobId = lens _cfprBeforeBlobId (\ s a -> s{_cfprBeforeBlobId = a})
cfprLocation :: Lens' CommentsForPullRequest (Maybe Location)
cfprLocation = lens _cfprLocation (\ s a -> s{_cfprLocation = a})
cfprAfterCommitId :: Lens' CommentsForPullRequest (Maybe Text)
cfprAfterCommitId = lens _cfprAfterCommitId (\ s a -> s{_cfprAfterCommitId = a})
cfprPullRequestId :: Lens' CommentsForPullRequest (Maybe Text)
cfprPullRequestId = lens _cfprPullRequestId (\ s a -> s{_cfprPullRequestId = a})
cfprAfterBlobId :: Lens' CommentsForPullRequest (Maybe Text)
cfprAfterBlobId = lens _cfprAfterBlobId (\ s a -> s{_cfprAfterBlobId = a})
cfprBeforeCommitId :: Lens' CommentsForPullRequest (Maybe Text)
cfprBeforeCommitId = lens _cfprBeforeCommitId (\ s a -> s{_cfprBeforeCommitId = a})
cfprRepositoryName :: Lens' CommentsForPullRequest (Maybe Text)
cfprRepositoryName = lens _cfprRepositoryName (\ s a -> s{_cfprRepositoryName = a})
cfprComments :: Lens' CommentsForPullRequest [Comment]
cfprComments = lens _cfprComments (\ s a -> s{_cfprComments = a}) . _Default . _Coerce
instance FromJSON CommentsForPullRequest where
parseJSON
= withObject "CommentsForPullRequest"
(\ x ->
CommentsForPullRequest' <$>
(x .:? "beforeBlobId") <*> (x .:? "location") <*>
(x .:? "afterCommitId")
<*> (x .:? "pullRequestId")
<*> (x .:? "afterBlobId")
<*> (x .:? "beforeCommitId")
<*> (x .:? "repositoryName")
<*> (x .:? "comments" .!= mempty))
instance Hashable CommentsForPullRequest where
instance NFData CommentsForPullRequest where
data Commit = Commit'
{ _cCommitId :: !(Maybe Text)
, _cCommitter :: !(Maybe UserInfo)
, _cTreeId :: !(Maybe Text)
, _cAdditionalData :: !(Maybe Text)
, _cParents :: !(Maybe [Text])
, _cAuthor :: !(Maybe UserInfo)
, _cMessage :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
commit
:: Commit
commit =
Commit'
{ _cCommitId = Nothing
, _cCommitter = Nothing
, _cTreeId = Nothing
, _cAdditionalData = Nothing
, _cParents = Nothing
, _cAuthor = Nothing
, _cMessage = Nothing
}
cCommitId :: Lens' Commit (Maybe Text)
cCommitId = lens _cCommitId (\ s a -> s{_cCommitId = a})
cCommitter :: Lens' Commit (Maybe UserInfo)
cCommitter = lens _cCommitter (\ s a -> s{_cCommitter = a})
cTreeId :: Lens' Commit (Maybe Text)
cTreeId = lens _cTreeId (\ s a -> s{_cTreeId = a})
cAdditionalData :: Lens' Commit (Maybe Text)
cAdditionalData = lens _cAdditionalData (\ s a -> s{_cAdditionalData = a})
cParents :: Lens' Commit [Text]
cParents = lens _cParents (\ s a -> s{_cParents = a}) . _Default . _Coerce
cAuthor :: Lens' Commit (Maybe UserInfo)
cAuthor = lens _cAuthor (\ s a -> s{_cAuthor = a})
cMessage :: Lens' Commit (Maybe Text)
cMessage = lens _cMessage (\ s a -> s{_cMessage = a})
instance FromJSON Commit where
parseJSON
= withObject "Commit"
(\ x ->
Commit' <$>
(x .:? "commitId") <*> (x .:? "committer") <*>
(x .:? "treeId")
<*> (x .:? "additionalData")
<*> (x .:? "parents" .!= mempty)
<*> (x .:? "author")
<*> (x .:? "message"))
instance Hashable Commit where
instance NFData Commit where
data Difference = Difference'
{ _dAfterBlob :: !(Maybe BlobMetadata)
, _dBeforeBlob :: !(Maybe BlobMetadata)
, _dChangeType :: !(Maybe ChangeTypeEnum)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
difference
:: Difference
difference =
Difference'
{_dAfterBlob = Nothing, _dBeforeBlob = Nothing, _dChangeType = Nothing}
dAfterBlob :: Lens' Difference (Maybe BlobMetadata)
dAfterBlob = lens _dAfterBlob (\ s a -> s{_dAfterBlob = a})
dBeforeBlob :: Lens' Difference (Maybe BlobMetadata)
dBeforeBlob = lens _dBeforeBlob (\ s a -> s{_dBeforeBlob = a})
dChangeType :: Lens' Difference (Maybe ChangeTypeEnum)
dChangeType = lens _dChangeType (\ s a -> s{_dChangeType = a})
instance FromJSON Difference where
parseJSON
= withObject "Difference"
(\ x ->
Difference' <$>
(x .:? "afterBlob") <*> (x .:? "beforeBlob") <*>
(x .:? "changeType"))
instance Hashable Difference where
instance NFData Difference where
data Location = Location'
{ _lRelativeFileVersion :: !(Maybe RelativeFileVersionEnum)
, _lFilePath :: !(Maybe Text)
, _lFilePosition :: !(Maybe Integer)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
location
:: Location
location =
Location'
{ _lRelativeFileVersion = Nothing
, _lFilePath = Nothing
, _lFilePosition = Nothing
}
lRelativeFileVersion :: Lens' Location (Maybe RelativeFileVersionEnum)
lRelativeFileVersion = lens _lRelativeFileVersion (\ s a -> s{_lRelativeFileVersion = a})
lFilePath :: Lens' Location (Maybe Text)
lFilePath = lens _lFilePath (\ s a -> s{_lFilePath = a})
lFilePosition :: Lens' Location (Maybe Integer)
lFilePosition = lens _lFilePosition (\ s a -> s{_lFilePosition = a})
instance FromJSON Location where
parseJSON
= withObject "Location"
(\ x ->
Location' <$>
(x .:? "relativeFileVersion") <*> (x .:? "filePath")
<*> (x .:? "filePosition"))
instance Hashable Location where
instance NFData Location where
instance ToJSON Location where
toJSON Location'{..}
= object
(catMaybes
[("relativeFileVersion" .=) <$>
_lRelativeFileVersion,
("filePath" .=) <$> _lFilePath,
("filePosition" .=) <$> _lFilePosition])
data MergeMetadata = MergeMetadata'
{ _mmMergedBy :: !(Maybe Text)
, _mmIsMerged :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
mergeMetadata
:: MergeMetadata
mergeMetadata = MergeMetadata' {_mmMergedBy = Nothing, _mmIsMerged = Nothing}
mmMergedBy :: Lens' MergeMetadata (Maybe Text)
mmMergedBy = lens _mmMergedBy (\ s a -> s{_mmMergedBy = a})
mmIsMerged :: Lens' MergeMetadata (Maybe Bool)
mmIsMerged = lens _mmIsMerged (\ s a -> s{_mmIsMerged = a})
instance FromJSON MergeMetadata where
parseJSON
= withObject "MergeMetadata"
(\ x ->
MergeMetadata' <$>
(x .:? "mergedBy") <*> (x .:? "isMerged"))
instance Hashable MergeMetadata where
instance NFData MergeMetadata where
data PullRequest = PullRequest'
{ _prAuthorARN :: !(Maybe Text)
, _prPullRequestId :: !(Maybe Text)
, _prCreationDate :: !(Maybe POSIX)
, _prPullRequestStatus :: !(Maybe PullRequestStatusEnum)
, _prTitle :: !(Maybe Text)
, _prClientRequestToken :: !(Maybe Text)
, _prLastActivityDate :: !(Maybe POSIX)
, _prPullRequestTargets :: !(Maybe [PullRequestTarget])
, _prDescription :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
pullRequest
:: PullRequest
pullRequest =
PullRequest'
{ _prAuthorARN = Nothing
, _prPullRequestId = Nothing
, _prCreationDate = Nothing
, _prPullRequestStatus = Nothing
, _prTitle = Nothing
, _prClientRequestToken = Nothing
, _prLastActivityDate = Nothing
, _prPullRequestTargets = Nothing
, _prDescription = Nothing
}
prAuthorARN :: Lens' PullRequest (Maybe Text)
prAuthorARN = lens _prAuthorARN (\ s a -> s{_prAuthorARN = a})
prPullRequestId :: Lens' PullRequest (Maybe Text)
prPullRequestId = lens _prPullRequestId (\ s a -> s{_prPullRequestId = a})
prCreationDate :: Lens' PullRequest (Maybe UTCTime)
prCreationDate = lens _prCreationDate (\ s a -> s{_prCreationDate = a}) . mapping _Time
prPullRequestStatus :: Lens' PullRequest (Maybe PullRequestStatusEnum)
prPullRequestStatus = lens _prPullRequestStatus (\ s a -> s{_prPullRequestStatus = a})
prTitle :: Lens' PullRequest (Maybe Text)
prTitle = lens _prTitle (\ s a -> s{_prTitle = a})
prClientRequestToken :: Lens' PullRequest (Maybe Text)
prClientRequestToken = lens _prClientRequestToken (\ s a -> s{_prClientRequestToken = a})
prLastActivityDate :: Lens' PullRequest (Maybe UTCTime)
prLastActivityDate = lens _prLastActivityDate (\ s a -> s{_prLastActivityDate = a}) . mapping _Time
prPullRequestTargets :: Lens' PullRequest [PullRequestTarget]
prPullRequestTargets = lens _prPullRequestTargets (\ s a -> s{_prPullRequestTargets = a}) . _Default . _Coerce
prDescription :: Lens' PullRequest (Maybe Text)
prDescription = lens _prDescription (\ s a -> s{_prDescription = a})
instance FromJSON PullRequest where
parseJSON
= withObject "PullRequest"
(\ x ->
PullRequest' <$>
(x .:? "authorArn") <*> (x .:? "pullRequestId") <*>
(x .:? "creationDate")
<*> (x .:? "pullRequestStatus")
<*> (x .:? "title")
<*> (x .:? "clientRequestToken")
<*> (x .:? "lastActivityDate")
<*> (x .:? "pullRequestTargets" .!= mempty)
<*> (x .:? "description"))
instance Hashable PullRequest where
instance NFData PullRequest where
data PullRequestEvent = PullRequestEvent'
{ _prePullRequestMergedStateChangedEventMetadata :: !(Maybe PullRequestMergedStateChangedEventMetadata)
, _prePullRequestEventType :: !(Maybe PullRequestEventType)
, _prePullRequestStatusChangedEventMetadata :: !(Maybe PullRequestStatusChangedEventMetadata)
, _preActorARN :: !(Maybe Text)
, _prePullRequestId :: !(Maybe Text)
, _preEventDate :: !(Maybe POSIX)
, _prePullRequestSourceReferenceUpdatedEventMetadata :: !(Maybe PullRequestSourceReferenceUpdatedEventMetadata)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
pullRequestEvent
:: PullRequestEvent
pullRequestEvent =
PullRequestEvent'
{ _prePullRequestMergedStateChangedEventMetadata = Nothing
, _prePullRequestEventType = Nothing
, _prePullRequestStatusChangedEventMetadata = Nothing
, _preActorARN = Nothing
, _prePullRequestId = Nothing
, _preEventDate = Nothing
, _prePullRequestSourceReferenceUpdatedEventMetadata = Nothing
}
prePullRequestMergedStateChangedEventMetadata :: Lens' PullRequestEvent (Maybe PullRequestMergedStateChangedEventMetadata)
prePullRequestMergedStateChangedEventMetadata = lens _prePullRequestMergedStateChangedEventMetadata (\ s a -> s{_prePullRequestMergedStateChangedEventMetadata = a})
prePullRequestEventType :: Lens' PullRequestEvent (Maybe PullRequestEventType)
prePullRequestEventType = lens _prePullRequestEventType (\ s a -> s{_prePullRequestEventType = a})
prePullRequestStatusChangedEventMetadata :: Lens' PullRequestEvent (Maybe PullRequestStatusChangedEventMetadata)
prePullRequestStatusChangedEventMetadata = lens _prePullRequestStatusChangedEventMetadata (\ s a -> s{_prePullRequestStatusChangedEventMetadata = a})
preActorARN :: Lens' PullRequestEvent (Maybe Text)
preActorARN = lens _preActorARN (\ s a -> s{_preActorARN = a})
prePullRequestId :: Lens' PullRequestEvent (Maybe Text)
prePullRequestId = lens _prePullRequestId (\ s a -> s{_prePullRequestId = a})
preEventDate :: Lens' PullRequestEvent (Maybe UTCTime)
preEventDate = lens _preEventDate (\ s a -> s{_preEventDate = a}) . mapping _Time
prePullRequestSourceReferenceUpdatedEventMetadata :: Lens' PullRequestEvent (Maybe PullRequestSourceReferenceUpdatedEventMetadata)
prePullRequestSourceReferenceUpdatedEventMetadata = lens _prePullRequestSourceReferenceUpdatedEventMetadata (\ s a -> s{_prePullRequestSourceReferenceUpdatedEventMetadata = a})
instance FromJSON PullRequestEvent where
parseJSON
= withObject "PullRequestEvent"
(\ x ->
PullRequestEvent' <$>
(x .:? "pullRequestMergedStateChangedEventMetadata")
<*> (x .:? "pullRequestEventType")
<*> (x .:? "pullRequestStatusChangedEventMetadata")
<*> (x .:? "actorArn")
<*> (x .:? "pullRequestId")
<*> (x .:? "eventDate")
<*>
(x .:?
"pullRequestSourceReferenceUpdatedEventMetadata"))
instance Hashable PullRequestEvent where
instance NFData PullRequestEvent where
data PullRequestMergedStateChangedEventMetadata = PullRequestMergedStateChangedEventMetadata'
{ _prmscemDestinationReference :: !(Maybe Text)
, _prmscemMergeMetadata :: !(Maybe MergeMetadata)
, _prmscemRepositoryName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
pullRequestMergedStateChangedEventMetadata
:: PullRequestMergedStateChangedEventMetadata
pullRequestMergedStateChangedEventMetadata =
PullRequestMergedStateChangedEventMetadata'
{ _prmscemDestinationReference = Nothing
, _prmscemMergeMetadata = Nothing
, _prmscemRepositoryName = Nothing
}
prmscemDestinationReference :: Lens' PullRequestMergedStateChangedEventMetadata (Maybe Text)
prmscemDestinationReference = lens _prmscemDestinationReference (\ s a -> s{_prmscemDestinationReference = a})
prmscemMergeMetadata :: Lens' PullRequestMergedStateChangedEventMetadata (Maybe MergeMetadata)
prmscemMergeMetadata = lens _prmscemMergeMetadata (\ s a -> s{_prmscemMergeMetadata = a})
prmscemRepositoryName :: Lens' PullRequestMergedStateChangedEventMetadata (Maybe Text)
prmscemRepositoryName = lens _prmscemRepositoryName (\ s a -> s{_prmscemRepositoryName = a})
instance FromJSON
PullRequestMergedStateChangedEventMetadata
where
parseJSON
= withObject
"PullRequestMergedStateChangedEventMetadata"
(\ x ->
PullRequestMergedStateChangedEventMetadata' <$>
(x .:? "destinationReference") <*>
(x .:? "mergeMetadata")
<*> (x .:? "repositoryName"))
instance Hashable
PullRequestMergedStateChangedEventMetadata
where
instance NFData
PullRequestMergedStateChangedEventMetadata
where
data PullRequestSourceReferenceUpdatedEventMetadata = PullRequestSourceReferenceUpdatedEventMetadata'
{ _prsruemAfterCommitId :: !(Maybe Text)
, _prsruemBeforeCommitId :: !(Maybe Text)
, _prsruemRepositoryName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
pullRequestSourceReferenceUpdatedEventMetadata
:: PullRequestSourceReferenceUpdatedEventMetadata
pullRequestSourceReferenceUpdatedEventMetadata =
PullRequestSourceReferenceUpdatedEventMetadata'
{ _prsruemAfterCommitId = Nothing
, _prsruemBeforeCommitId = Nothing
, _prsruemRepositoryName = Nothing
}
prsruemAfterCommitId :: Lens' PullRequestSourceReferenceUpdatedEventMetadata (Maybe Text)
prsruemAfterCommitId = lens _prsruemAfterCommitId (\ s a -> s{_prsruemAfterCommitId = a})
prsruemBeforeCommitId :: Lens' PullRequestSourceReferenceUpdatedEventMetadata (Maybe Text)
prsruemBeforeCommitId = lens _prsruemBeforeCommitId (\ s a -> s{_prsruemBeforeCommitId = a})
prsruemRepositoryName :: Lens' PullRequestSourceReferenceUpdatedEventMetadata (Maybe Text)
prsruemRepositoryName = lens _prsruemRepositoryName (\ s a -> s{_prsruemRepositoryName = a})
instance FromJSON
PullRequestSourceReferenceUpdatedEventMetadata
where
parseJSON
= withObject
"PullRequestSourceReferenceUpdatedEventMetadata"
(\ x ->
PullRequestSourceReferenceUpdatedEventMetadata' <$>
(x .:? "afterCommitId") <*> (x .:? "beforeCommitId")
<*> (x .:? "repositoryName"))
instance Hashable
PullRequestSourceReferenceUpdatedEventMetadata
where
instance NFData
PullRequestSourceReferenceUpdatedEventMetadata
where
newtype PullRequestStatusChangedEventMetadata = PullRequestStatusChangedEventMetadata'
{ _prscemPullRequestStatus :: Maybe PullRequestStatusEnum
} deriving (Eq, Read, Show, Data, Typeable, Generic)
pullRequestStatusChangedEventMetadata
:: PullRequestStatusChangedEventMetadata
pullRequestStatusChangedEventMetadata =
PullRequestStatusChangedEventMetadata' {_prscemPullRequestStatus = Nothing}
prscemPullRequestStatus :: Lens' PullRequestStatusChangedEventMetadata (Maybe PullRequestStatusEnum)
prscemPullRequestStatus = lens _prscemPullRequestStatus (\ s a -> s{_prscemPullRequestStatus = a})
instance FromJSON
PullRequestStatusChangedEventMetadata
where
parseJSON
= withObject "PullRequestStatusChangedEventMetadata"
(\ x ->
PullRequestStatusChangedEventMetadata' <$>
(x .:? "pullRequestStatus"))
instance Hashable
PullRequestStatusChangedEventMetadata
where
instance NFData PullRequestStatusChangedEventMetadata
where
data PullRequestTarget = PullRequestTarget'
{ _prtSourceCommit :: !(Maybe Text)
, _prtDestinationReference :: !(Maybe Text)
, _prtMergeMetadata :: !(Maybe MergeMetadata)
, _prtDestinationCommit :: !(Maybe Text)
, _prtRepositoryName :: !(Maybe Text)
, _prtSourceReference :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
pullRequestTarget
:: PullRequestTarget
pullRequestTarget =
PullRequestTarget'
{ _prtSourceCommit = Nothing
, _prtDestinationReference = Nothing
, _prtMergeMetadata = Nothing
, _prtDestinationCommit = Nothing
, _prtRepositoryName = Nothing
, _prtSourceReference = Nothing
}
prtSourceCommit :: Lens' PullRequestTarget (Maybe Text)
prtSourceCommit = lens _prtSourceCommit (\ s a -> s{_prtSourceCommit = a})
prtDestinationReference :: Lens' PullRequestTarget (Maybe Text)
prtDestinationReference = lens _prtDestinationReference (\ s a -> s{_prtDestinationReference = a})
prtMergeMetadata :: Lens' PullRequestTarget (Maybe MergeMetadata)
prtMergeMetadata = lens _prtMergeMetadata (\ s a -> s{_prtMergeMetadata = a})
prtDestinationCommit :: Lens' PullRequestTarget (Maybe Text)
prtDestinationCommit = lens _prtDestinationCommit (\ s a -> s{_prtDestinationCommit = a})
prtRepositoryName :: Lens' PullRequestTarget (Maybe Text)
prtRepositoryName = lens _prtRepositoryName (\ s a -> s{_prtRepositoryName = a})
prtSourceReference :: Lens' PullRequestTarget (Maybe Text)
prtSourceReference = lens _prtSourceReference (\ s a -> s{_prtSourceReference = a})
instance FromJSON PullRequestTarget where
parseJSON
= withObject "PullRequestTarget"
(\ x ->
PullRequestTarget' <$>
(x .:? "sourceCommit") <*>
(x .:? "destinationReference")
<*> (x .:? "mergeMetadata")
<*> (x .:? "destinationCommit")
<*> (x .:? "repositoryName")
<*> (x .:? "sourceReference"))
instance Hashable PullRequestTarget where
instance NFData PullRequestTarget where
data RepositoryMetadata = RepositoryMetadata'
{ _rmRepositoryDescription :: !(Maybe Text)
, _rmLastModifiedDate :: !(Maybe POSIX)
, _rmARN :: !(Maybe Text)
, _rmCloneURLHTTP :: !(Maybe Text)
, _rmAccountId :: !(Maybe Text)
, _rmDefaultBranch :: !(Maybe Text)
, _rmRepositoryId :: !(Maybe Text)
, _rmRepositoryName :: !(Maybe Text)
, _rmCreationDate :: !(Maybe POSIX)
, _rmCloneURLSSH :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
repositoryMetadata
:: RepositoryMetadata
repositoryMetadata =
RepositoryMetadata'
{ _rmRepositoryDescription = Nothing
, _rmLastModifiedDate = Nothing
, _rmARN = Nothing
, _rmCloneURLHTTP = Nothing
, _rmAccountId = Nothing
, _rmDefaultBranch = Nothing
, _rmRepositoryId = Nothing
, _rmRepositoryName = Nothing
, _rmCreationDate = Nothing
, _rmCloneURLSSH = Nothing
}
rmRepositoryDescription :: Lens' RepositoryMetadata (Maybe Text)
rmRepositoryDescription = lens _rmRepositoryDescription (\ s a -> s{_rmRepositoryDescription = a})
rmLastModifiedDate :: Lens' RepositoryMetadata (Maybe UTCTime)
rmLastModifiedDate = lens _rmLastModifiedDate (\ s a -> s{_rmLastModifiedDate = a}) . mapping _Time
rmARN :: Lens' RepositoryMetadata (Maybe Text)
rmARN = lens _rmARN (\ s a -> s{_rmARN = a})
rmCloneURLHTTP :: Lens' RepositoryMetadata (Maybe Text)
rmCloneURLHTTP = lens _rmCloneURLHTTP (\ s a -> s{_rmCloneURLHTTP = a})
rmAccountId :: Lens' RepositoryMetadata (Maybe Text)
rmAccountId = lens _rmAccountId (\ s a -> s{_rmAccountId = a})
rmDefaultBranch :: Lens' RepositoryMetadata (Maybe Text)
rmDefaultBranch = lens _rmDefaultBranch (\ s a -> s{_rmDefaultBranch = a})
rmRepositoryId :: Lens' RepositoryMetadata (Maybe Text)
rmRepositoryId = lens _rmRepositoryId (\ s a -> s{_rmRepositoryId = a})
rmRepositoryName :: Lens' RepositoryMetadata (Maybe Text)
rmRepositoryName = lens _rmRepositoryName (\ s a -> s{_rmRepositoryName = a})
rmCreationDate :: Lens' RepositoryMetadata (Maybe UTCTime)
rmCreationDate = lens _rmCreationDate (\ s a -> s{_rmCreationDate = a}) . mapping _Time
rmCloneURLSSH :: Lens' RepositoryMetadata (Maybe Text)
rmCloneURLSSH = lens _rmCloneURLSSH (\ s a -> s{_rmCloneURLSSH = a})
instance FromJSON RepositoryMetadata where
parseJSON
= withObject "RepositoryMetadata"
(\ x ->
RepositoryMetadata' <$>
(x .:? "repositoryDescription") <*>
(x .:? "lastModifiedDate")
<*> (x .:? "Arn")
<*> (x .:? "cloneUrlHttp")
<*> (x .:? "accountId")
<*> (x .:? "defaultBranch")
<*> (x .:? "repositoryId")
<*> (x .:? "repositoryName")
<*> (x .:? "creationDate")
<*> (x .:? "cloneUrlSsh"))
instance Hashable RepositoryMetadata where
instance NFData RepositoryMetadata where
data RepositoryNameIdPair = RepositoryNameIdPair'
{ _rnipRepositoryId :: !(Maybe Text)
, _rnipRepositoryName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
repositoryNameIdPair
:: RepositoryNameIdPair
repositoryNameIdPair =
RepositoryNameIdPair'
{_rnipRepositoryId = Nothing, _rnipRepositoryName = Nothing}
rnipRepositoryId :: Lens' RepositoryNameIdPair (Maybe Text)
rnipRepositoryId = lens _rnipRepositoryId (\ s a -> s{_rnipRepositoryId = a})
rnipRepositoryName :: Lens' RepositoryNameIdPair (Maybe Text)
rnipRepositoryName = lens _rnipRepositoryName (\ s a -> s{_rnipRepositoryName = a})
instance FromJSON RepositoryNameIdPair where
parseJSON
= withObject "RepositoryNameIdPair"
(\ x ->
RepositoryNameIdPair' <$>
(x .:? "repositoryId") <*> (x .:? "repositoryName"))
instance Hashable RepositoryNameIdPair where
instance NFData RepositoryNameIdPair where
data RepositoryTrigger = RepositoryTrigger'
{ _rtBranches :: !(Maybe [Text])
, _rtCustomData :: !(Maybe Text)
, _rtName :: !Text
, _rtDestinationARN :: !Text
, _rtEvents :: ![RepositoryTriggerEventEnum]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
repositoryTrigger
:: Text
-> Text
-> RepositoryTrigger
repositoryTrigger pName_ pDestinationARN_ =
RepositoryTrigger'
{ _rtBranches = Nothing
, _rtCustomData = Nothing
, _rtName = pName_
, _rtDestinationARN = pDestinationARN_
, _rtEvents = mempty
}
rtBranches :: Lens' RepositoryTrigger [Text]
rtBranches = lens _rtBranches (\ s a -> s{_rtBranches = a}) . _Default . _Coerce
rtCustomData :: Lens' RepositoryTrigger (Maybe Text)
rtCustomData = lens _rtCustomData (\ s a -> s{_rtCustomData = a})
rtName :: Lens' RepositoryTrigger Text
rtName = lens _rtName (\ s a -> s{_rtName = a})
rtDestinationARN :: Lens' RepositoryTrigger Text
rtDestinationARN = lens _rtDestinationARN (\ s a -> s{_rtDestinationARN = a})
rtEvents :: Lens' RepositoryTrigger [RepositoryTriggerEventEnum]
rtEvents = lens _rtEvents (\ s a -> s{_rtEvents = a}) . _Coerce
instance FromJSON RepositoryTrigger where
parseJSON
= withObject "RepositoryTrigger"
(\ x ->
RepositoryTrigger' <$>
(x .:? "branches" .!= mempty) <*>
(x .:? "customData")
<*> (x .: "name")
<*> (x .: "destinationArn")
<*> (x .:? "events" .!= mempty))
instance Hashable RepositoryTrigger where
instance NFData RepositoryTrigger where
instance ToJSON RepositoryTrigger where
toJSON RepositoryTrigger'{..}
= object
(catMaybes
[("branches" .=) <$> _rtBranches,
("customData" .=) <$> _rtCustomData,
Just ("name" .= _rtName),
Just ("destinationArn" .= _rtDestinationARN),
Just ("events" .= _rtEvents)])
data RepositoryTriggerExecutionFailure = RepositoryTriggerExecutionFailure'
{ _rtefFailureMessage :: !(Maybe Text)
, _rtefTrigger :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
repositoryTriggerExecutionFailure
:: RepositoryTriggerExecutionFailure
repositoryTriggerExecutionFailure =
RepositoryTriggerExecutionFailure'
{_rtefFailureMessage = Nothing, _rtefTrigger = Nothing}
rtefFailureMessage :: Lens' RepositoryTriggerExecutionFailure (Maybe Text)
rtefFailureMessage = lens _rtefFailureMessage (\ s a -> s{_rtefFailureMessage = a})
rtefTrigger :: Lens' RepositoryTriggerExecutionFailure (Maybe Text)
rtefTrigger = lens _rtefTrigger (\ s a -> s{_rtefTrigger = a})
instance FromJSON RepositoryTriggerExecutionFailure
where
parseJSON
= withObject "RepositoryTriggerExecutionFailure"
(\ x ->
RepositoryTriggerExecutionFailure' <$>
(x .:? "failureMessage") <*> (x .:? "trigger"))
instance Hashable RepositoryTriggerExecutionFailure
where
instance NFData RepositoryTriggerExecutionFailure
where
data Target = Target'
{ _tDestinationReference :: !(Maybe Text)
, _tRepositoryName :: !Text
, _tSourceReference :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
target
:: Text
-> Text
-> Target
target pRepositoryName_ pSourceReference_ =
Target'
{ _tDestinationReference = Nothing
, _tRepositoryName = pRepositoryName_
, _tSourceReference = pSourceReference_
}
tDestinationReference :: Lens' Target (Maybe Text)
tDestinationReference = lens _tDestinationReference (\ s a -> s{_tDestinationReference = a})
tRepositoryName :: Lens' Target Text
tRepositoryName = lens _tRepositoryName (\ s a -> s{_tRepositoryName = a})
tSourceReference :: Lens' Target Text
tSourceReference = lens _tSourceReference (\ s a -> s{_tSourceReference = a})
instance Hashable Target where
instance NFData Target where
instance ToJSON Target where
toJSON Target'{..}
= object
(catMaybes
[("destinationReference" .=) <$>
_tDestinationReference,
Just ("repositoryName" .= _tRepositoryName),
Just ("sourceReference" .= _tSourceReference)])
data UserInfo = UserInfo'
{ _uiEmail :: !(Maybe Text)
, _uiDate :: !(Maybe Text)
, _uiName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
userInfo
:: UserInfo
userInfo = UserInfo' {_uiEmail = Nothing, _uiDate = Nothing, _uiName = Nothing}
uiEmail :: Lens' UserInfo (Maybe Text)
uiEmail = lens _uiEmail (\ s a -> s{_uiEmail = a})
uiDate :: Lens' UserInfo (Maybe Text)
uiDate = lens _uiDate (\ s a -> s{_uiDate = a})
uiName :: Lens' UserInfo (Maybe Text)
uiName = lens _uiName (\ s a -> s{_uiName = a})
instance FromJSON UserInfo where
parseJSON
= withObject "UserInfo"
(\ x ->
UserInfo' <$>
(x .:? "email") <*> (x .:? "date") <*>
(x .:? "name"))
instance Hashable UserInfo where
instance NFData UserInfo where