module Network.AWS.CodeCommit.Types.Product where
import Network.AWS.CodeCommit.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
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
instance NFData BranchInfo
data Commit = Commit'
{ _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'
{ _cCommitter = Nothing
, _cTreeId = Nothing
, _cAdditionalData = Nothing
, _cParents = Nothing
, _cAuthor = Nothing
, _cMessage = Nothing
}
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 .:? "committer") <*> (x .:? "treeId") <*>
(x .:? "additionalData")
<*> (x .:? "parents" .!= mempty)
<*> (x .:? "author")
<*> (x .:? "message"))
instance Hashable Commit
instance NFData Commit
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
instance NFData RepositoryMetadata
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
instance NFData RepositoryNameIdPair
data RepositoryTrigger = RepositoryTrigger'
{ _rtBranches :: !(Maybe [Text])
, _rtCustomData :: !(Maybe Text)
, _rtDestinationARN :: !(Maybe Text)
, _rtName :: !(Maybe Text)
, _rtEvents :: !(Maybe [RepositoryTriggerEventEnum])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
repositoryTrigger
:: RepositoryTrigger
repositoryTrigger =
RepositoryTrigger'
{ _rtBranches = Nothing
, _rtCustomData = Nothing
, _rtDestinationARN = Nothing
, _rtName = Nothing
, _rtEvents = Nothing
}
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});
rtDestinationARN :: Lens' RepositoryTrigger (Maybe Text)
rtDestinationARN = lens _rtDestinationARN (\ s a -> s{_rtDestinationARN = a});
rtName :: Lens' RepositoryTrigger (Maybe Text)
rtName = lens _rtName (\ s a -> s{_rtName = a});
rtEvents :: Lens' RepositoryTrigger [RepositoryTriggerEventEnum]
rtEvents = lens _rtEvents (\ s a -> s{_rtEvents = a}) . _Default . _Coerce;
instance FromJSON RepositoryTrigger where
parseJSON
= withObject "RepositoryTrigger"
(\ x ->
RepositoryTrigger' <$>
(x .:? "branches" .!= mempty) <*>
(x .:? "customData")
<*> (x .:? "destinationArn")
<*> (x .:? "name")
<*> (x .:? "events" .!= mempty))
instance Hashable RepositoryTrigger
instance NFData RepositoryTrigger
instance ToJSON RepositoryTrigger where
toJSON RepositoryTrigger'{..}
= object
(catMaybes
[("branches" .=) <$> _rtBranches,
("customData" .=) <$> _rtCustomData,
("destinationArn" .=) <$> _rtDestinationARN,
("name" .=) <$> _rtName,
("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
instance NFData RepositoryTriggerExecutionFailure
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
instance NFData UserInfo