{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.ContainerBuilder.Types.Product where
import Network.Google.ContainerBuilder.Types.Sum
import Network.Google.Prelude
data BuildStep = BuildStep'
{ _bsStatus :: !(Maybe BuildStepStatus)
, _bsDir :: !(Maybe Text)
, _bsArgs :: !(Maybe [Text])
, _bsEnv :: !(Maybe [Text])
, _bsPullTiming :: !(Maybe TimeSpan)
, _bsEntrypoint :: !(Maybe Text)
, _bsWaitFor :: !(Maybe [Text])
, _bsName :: !(Maybe Text)
, _bsId :: !(Maybe Text)
, _bsTiming :: !(Maybe TimeSpan)
, _bsSecretEnv :: !(Maybe [Text])
, _bsTimeout :: !(Maybe GDuration)
, _bsVolumes :: !(Maybe [Volume])
} deriving (Eq,Show,Data,Typeable,Generic)
buildStep
:: BuildStep
buildStep =
BuildStep'
{ _bsStatus = Nothing
, _bsDir = Nothing
, _bsArgs = Nothing
, _bsEnv = Nothing
, _bsPullTiming = Nothing
, _bsEntrypoint = Nothing
, _bsWaitFor = Nothing
, _bsName = Nothing
, _bsId = Nothing
, _bsTiming = Nothing
, _bsSecretEnv = Nothing
, _bsTimeout = Nothing
, _bsVolumes = Nothing
}
bsStatus :: Lens' BuildStep (Maybe BuildStepStatus)
bsStatus = lens _bsStatus (\ s a -> s{_bsStatus = a})
bsDir :: Lens' BuildStep (Maybe Text)
bsDir = lens _bsDir (\ s a -> s{_bsDir = a})
bsArgs :: Lens' BuildStep [Text]
bsArgs
= lens _bsArgs (\ s a -> s{_bsArgs = a}) . _Default .
_Coerce
bsEnv :: Lens' BuildStep [Text]
bsEnv
= lens _bsEnv (\ s a -> s{_bsEnv = a}) . _Default .
_Coerce
bsPullTiming :: Lens' BuildStep (Maybe TimeSpan)
bsPullTiming
= lens _bsPullTiming (\ s a -> s{_bsPullTiming = a})
bsEntrypoint :: Lens' BuildStep (Maybe Text)
bsEntrypoint
= lens _bsEntrypoint (\ s a -> s{_bsEntrypoint = a})
bsWaitFor :: Lens' BuildStep [Text]
bsWaitFor
= lens _bsWaitFor (\ s a -> s{_bsWaitFor = a}) .
_Default
. _Coerce
bsName :: Lens' BuildStep (Maybe Text)
bsName = lens _bsName (\ s a -> s{_bsName = a})
bsId :: Lens' BuildStep (Maybe Text)
bsId = lens _bsId (\ s a -> s{_bsId = a})
bsTiming :: Lens' BuildStep (Maybe TimeSpan)
bsTiming = lens _bsTiming (\ s a -> s{_bsTiming = a})
bsSecretEnv :: Lens' BuildStep [Text]
bsSecretEnv
= lens _bsSecretEnv (\ s a -> s{_bsSecretEnv = a}) .
_Default
. _Coerce
bsTimeout :: Lens' BuildStep (Maybe Scientific)
bsTimeout
= lens _bsTimeout (\ s a -> s{_bsTimeout = a}) .
mapping _GDuration
bsVolumes :: Lens' BuildStep [Volume]
bsVolumes
= lens _bsVolumes (\ s a -> s{_bsVolumes = a}) .
_Default
. _Coerce
instance FromJSON BuildStep where
parseJSON
= withObject "BuildStep"
(\ o ->
BuildStep' <$>
(o .:? "status") <*> (o .:? "dir") <*>
(o .:? "args" .!= mempty)
<*> (o .:? "env" .!= mempty)
<*> (o .:? "pullTiming")
<*> (o .:? "entrypoint")
<*> (o .:? "waitFor" .!= mempty)
<*> (o .:? "name")
<*> (o .:? "id")
<*> (o .:? "timing")
<*> (o .:? "secretEnv" .!= mempty)
<*> (o .:? "timeout")
<*> (o .:? "volumes" .!= mempty))
instance ToJSON BuildStep where
toJSON BuildStep'{..}
= object
(catMaybes
[("status" .=) <$> _bsStatus, ("dir" .=) <$> _bsDir,
("args" .=) <$> _bsArgs, ("env" .=) <$> _bsEnv,
("pullTiming" .=) <$> _bsPullTiming,
("entrypoint" .=) <$> _bsEntrypoint,
("waitFor" .=) <$> _bsWaitFor,
("name" .=) <$> _bsName, ("id" .=) <$> _bsId,
("timing" .=) <$> _bsTiming,
("secretEnv" .=) <$> _bsSecretEnv,
("timeout" .=) <$> _bsTimeout,
("volumes" .=) <$> _bsVolumes])
data SourceProvenance = SourceProvenance'
{ _spResolvedRepoSource :: !(Maybe RepoSource)
, _spResolvedStorageSource :: !(Maybe StorageSource)
, _spFileHashes :: !(Maybe SourceProvenanceFileHashes)
} deriving (Eq,Show,Data,Typeable,Generic)
sourceProvenance
:: SourceProvenance
sourceProvenance =
SourceProvenance'
{ _spResolvedRepoSource = Nothing
, _spResolvedStorageSource = Nothing
, _spFileHashes = Nothing
}
spResolvedRepoSource :: Lens' SourceProvenance (Maybe RepoSource)
spResolvedRepoSource
= lens _spResolvedRepoSource
(\ s a -> s{_spResolvedRepoSource = a})
spResolvedStorageSource :: Lens' SourceProvenance (Maybe StorageSource)
spResolvedStorageSource
= lens _spResolvedStorageSource
(\ s a -> s{_spResolvedStorageSource = a})
spFileHashes :: Lens' SourceProvenance (Maybe SourceProvenanceFileHashes)
spFileHashes
= lens _spFileHashes (\ s a -> s{_spFileHashes = a})
instance FromJSON SourceProvenance where
parseJSON
= withObject "SourceProvenance"
(\ o ->
SourceProvenance' <$>
(o .:? "resolvedRepoSource") <*>
(o .:? "resolvedStorageSource")
<*> (o .:? "fileHashes"))
instance ToJSON SourceProvenance where
toJSON SourceProvenance'{..}
= object
(catMaybes
[("resolvedRepoSource" .=) <$> _spResolvedRepoSource,
("resolvedStorageSource" .=) <$>
_spResolvedStorageSource,
("fileHashes" .=) <$> _spFileHashes])
data ListBuildsResponse = ListBuildsResponse'
{ _lbrNextPageToken :: !(Maybe Text)
, _lbrBuilds :: !(Maybe [Build])
} deriving (Eq,Show,Data,Typeable,Generic)
listBuildsResponse
:: ListBuildsResponse
listBuildsResponse =
ListBuildsResponse'
{ _lbrNextPageToken = Nothing
, _lbrBuilds = Nothing
}
lbrNextPageToken :: Lens' ListBuildsResponse (Maybe Text)
lbrNextPageToken
= lens _lbrNextPageToken
(\ s a -> s{_lbrNextPageToken = a})
lbrBuilds :: Lens' ListBuildsResponse [Build]
lbrBuilds
= lens _lbrBuilds (\ s a -> s{_lbrBuilds = a}) .
_Default
. _Coerce
instance FromJSON ListBuildsResponse where
parseJSON
= withObject "ListBuildsResponse"
(\ o ->
ListBuildsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "builds" .!= mempty))
instance ToJSON ListBuildsResponse where
toJSON ListBuildsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lbrNextPageToken,
("builds" .=) <$> _lbrBuilds])
data Status = Status'
{ _sDetails :: !(Maybe [StatusDetailsItem])
, _sCode :: !(Maybe (Textual Int32))
, _sMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
status
:: Status
status =
Status'
{ _sDetails = Nothing
, _sCode = Nothing
, _sMessage = Nothing
}
sDetails :: Lens' Status [StatusDetailsItem]
sDetails
= lens _sDetails (\ s a -> s{_sDetails = a}) .
_Default
. _Coerce
sCode :: Lens' Status (Maybe Int32)
sCode
= lens _sCode (\ s a -> s{_sCode = a}) .
mapping _Coerce
sMessage :: Lens' Status (Maybe Text)
sMessage = lens _sMessage (\ s a -> s{_sMessage = a})
instance FromJSON Status where
parseJSON
= withObject "Status"
(\ o ->
Status' <$>
(o .:? "details" .!= mempty) <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON Status where
toJSON Status'{..}
= object
(catMaybes
[("details" .=) <$> _sDetails,
("code" .=) <$> _sCode,
("message" .=) <$> _sMessage])
data RetryBuildRequest =
RetryBuildRequest'
deriving (Eq,Show,Data,Typeable,Generic)
retryBuildRequest
:: RetryBuildRequest
retryBuildRequest = RetryBuildRequest'
instance FromJSON RetryBuildRequest where
parseJSON
= withObject "RetryBuildRequest"
(\ o -> pure RetryBuildRequest')
instance ToJSON RetryBuildRequest where
toJSON = const emptyObject
data ListOperationsResponse = ListOperationsResponse'
{ _lorNextPageToken :: !(Maybe Text)
, _lorOperations :: !(Maybe [Operation])
} deriving (Eq,Show,Data,Typeable,Generic)
listOperationsResponse
:: ListOperationsResponse
listOperationsResponse =
ListOperationsResponse'
{ _lorNextPageToken = Nothing
, _lorOperations = Nothing
}
lorNextPageToken :: Lens' ListOperationsResponse (Maybe Text)
lorNextPageToken
= lens _lorNextPageToken
(\ s a -> s{_lorNextPageToken = a})
lorOperations :: Lens' ListOperationsResponse [Operation]
lorOperations
= lens _lorOperations
(\ s a -> s{_lorOperations = a})
. _Default
. _Coerce
instance FromJSON ListOperationsResponse where
parseJSON
= withObject "ListOperationsResponse"
(\ o ->
ListOperationsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "operations" .!= mempty))
instance ToJSON ListOperationsResponse where
toJSON ListOperationsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lorNextPageToken,
("operations" .=) <$> _lorOperations])
data CancelOperationRequest =
CancelOperationRequest'
deriving (Eq,Show,Data,Typeable,Generic)
cancelOperationRequest
:: CancelOperationRequest
cancelOperationRequest = CancelOperationRequest'
instance FromJSON CancelOperationRequest where
parseJSON
= withObject "CancelOperationRequest"
(\ o -> pure CancelOperationRequest')
instance ToJSON CancelOperationRequest where
toJSON = const emptyObject
data Hash = Hash'
{ _hValue :: !(Maybe Bytes)
, _hType :: !(Maybe HashType)
} deriving (Eq,Show,Data,Typeable,Generic)
hash
:: Hash
hash =
Hash'
{ _hValue = Nothing
, _hType = Nothing
}
hValue :: Lens' Hash (Maybe ByteString)
hValue
= lens _hValue (\ s a -> s{_hValue = a}) .
mapping _Bytes
hType :: Lens' Hash (Maybe HashType)
hType = lens _hType (\ s a -> s{_hType = a})
instance FromJSON Hash where
parseJSON
= withObject "Hash"
(\ o -> Hash' <$> (o .:? "value") <*> (o .:? "type"))
instance ToJSON Hash where
toJSON Hash'{..}
= object
(catMaybes
[("value" .=) <$> _hValue, ("type" .=) <$> _hType])
data Results = Results'
{ _rImages :: !(Maybe [BuiltImage])
, _rBuildStepImages :: !(Maybe [Text])
, _rArtifactManifest :: !(Maybe Text)
, _rBuildStepOutputs :: !(Maybe [Bytes])
, _rNumArtifacts :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
results
:: Results
results =
Results'
{ _rImages = Nothing
, _rBuildStepImages = Nothing
, _rArtifactManifest = Nothing
, _rBuildStepOutputs = Nothing
, _rNumArtifacts = Nothing
}
rImages :: Lens' Results [BuiltImage]
rImages
= lens _rImages (\ s a -> s{_rImages = a}) . _Default
. _Coerce
rBuildStepImages :: Lens' Results [Text]
rBuildStepImages
= lens _rBuildStepImages
(\ s a -> s{_rBuildStepImages = a})
. _Default
. _Coerce
rArtifactManifest :: Lens' Results (Maybe Text)
rArtifactManifest
= lens _rArtifactManifest
(\ s a -> s{_rArtifactManifest = a})
rBuildStepOutputs :: Lens' Results [ByteString]
rBuildStepOutputs
= lens _rBuildStepOutputs
(\ s a -> s{_rBuildStepOutputs = a})
. _Default
. _Coerce
rNumArtifacts :: Lens' Results (Maybe Int64)
rNumArtifacts
= lens _rNumArtifacts
(\ s a -> s{_rNumArtifacts = a})
. mapping _Coerce
instance FromJSON Results where
parseJSON
= withObject "Results"
(\ o ->
Results' <$>
(o .:? "images" .!= mempty) <*>
(o .:? "buildStepImages" .!= mempty)
<*> (o .:? "artifactManifest")
<*> (o .:? "buildStepOutputs" .!= mempty)
<*> (o .:? "numArtifacts"))
instance ToJSON Results where
toJSON Results'{..}
= object
(catMaybes
[("images" .=) <$> _rImages,
("buildStepImages" .=) <$> _rBuildStepImages,
("artifactManifest" .=) <$> _rArtifactManifest,
("buildStepOutputs" .=) <$> _rBuildStepOutputs,
("numArtifacts" .=) <$> _rNumArtifacts])
newtype BuildTriggerSubstitutions = BuildTriggerSubstitutions'
{ _btsAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
buildTriggerSubstitutions
:: HashMap Text Text
-> BuildTriggerSubstitutions
buildTriggerSubstitutions pBtsAddtional_ =
BuildTriggerSubstitutions'
{ _btsAddtional = _Coerce # pBtsAddtional_
}
btsAddtional :: Lens' BuildTriggerSubstitutions (HashMap Text Text)
btsAddtional
= lens _btsAddtional (\ s a -> s{_btsAddtional = a})
. _Coerce
instance FromJSON BuildTriggerSubstitutions where
parseJSON
= withObject "BuildTriggerSubstitutions"
(\ o ->
BuildTriggerSubstitutions' <$> (parseJSONObject o))
instance ToJSON BuildTriggerSubstitutions where
toJSON = toJSON . _btsAddtional
data RepoSource = RepoSource'
{ _rsRepoName :: !(Maybe Text)
, _rsDir :: !(Maybe Text)
, _rsCommitSha :: !(Maybe Text)
, _rsBranchName :: !(Maybe Text)
, _rsTagName :: !(Maybe Text)
, _rsProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
repoSource
:: RepoSource
repoSource =
RepoSource'
{ _rsRepoName = Nothing
, _rsDir = Nothing
, _rsCommitSha = Nothing
, _rsBranchName = Nothing
, _rsTagName = Nothing
, _rsProjectId = Nothing
}
rsRepoName :: Lens' RepoSource (Maybe Text)
rsRepoName
= lens _rsRepoName (\ s a -> s{_rsRepoName = a})
rsDir :: Lens' RepoSource (Maybe Text)
rsDir = lens _rsDir (\ s a -> s{_rsDir = a})
rsCommitSha :: Lens' RepoSource (Maybe Text)
rsCommitSha
= lens _rsCommitSha (\ s a -> s{_rsCommitSha = a})
rsBranchName :: Lens' RepoSource (Maybe Text)
rsBranchName
= lens _rsBranchName (\ s a -> s{_rsBranchName = a})
rsTagName :: Lens' RepoSource (Maybe Text)
rsTagName
= lens _rsTagName (\ s a -> s{_rsTagName = a})
rsProjectId :: Lens' RepoSource (Maybe Text)
rsProjectId
= lens _rsProjectId (\ s a -> s{_rsProjectId = a})
instance FromJSON RepoSource where
parseJSON
= withObject "RepoSource"
(\ o ->
RepoSource' <$>
(o .:? "repoName") <*> (o .:? "dir") <*>
(o .:? "commitSha")
<*> (o .:? "branchName")
<*> (o .:? "tagName")
<*> (o .:? "projectId"))
instance ToJSON RepoSource where
toJSON RepoSource'{..}
= object
(catMaybes
[("repoName" .=) <$> _rsRepoName,
("dir" .=) <$> _rsDir,
("commitSha" .=) <$> _rsCommitSha,
("branchName" .=) <$> _rsBranchName,
("tagName" .=) <$> _rsTagName,
("projectId" .=) <$> _rsProjectId])
data Operation = Operation'
{ _oDone :: !(Maybe Bool)
, _oError :: !(Maybe Status)
, _oResponse :: !(Maybe OperationResponse)
, _oName :: !(Maybe Text)
, _oMetadata :: !(Maybe OperationMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
operation
:: Operation
operation =
Operation'
{ _oDone = Nothing
, _oError = Nothing
, _oResponse = Nothing
, _oName = Nothing
, _oMetadata = Nothing
}
oDone :: Lens' Operation (Maybe Bool)
oDone = lens _oDone (\ s a -> s{_oDone = a})
oError :: Lens' Operation (Maybe Status)
oError = lens _oError (\ s a -> s{_oError = a})
oResponse :: Lens' Operation (Maybe OperationResponse)
oResponse
= lens _oResponse (\ s a -> s{_oResponse = a})
oName :: Lens' Operation (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
oMetadata :: Lens' Operation (Maybe OperationMetadata)
oMetadata
= lens _oMetadata (\ s a -> s{_oMetadata = a})
instance FromJSON Operation where
parseJSON
= withObject "Operation"
(\ o ->
Operation' <$>
(o .:? "done") <*> (o .:? "error") <*>
(o .:? "response")
<*> (o .:? "name")
<*> (o .:? "metadata"))
instance ToJSON Operation where
toJSON Operation'{..}
= object
(catMaybes
[("done" .=) <$> _oDone, ("error" .=) <$> _oError,
("response" .=) <$> _oResponse,
("name" .=) <$> _oName,
("metadata" .=) <$> _oMetadata])
data Empty =
Empty'
deriving (Eq,Show,Data,Typeable,Generic)
empty
:: Empty
empty = Empty'
instance FromJSON Empty where
parseJSON = withObject "Empty" (\ o -> pure Empty')
instance ToJSON Empty where
toJSON = const emptyObject
newtype SecretSecretEnv = SecretSecretEnv'
{ _sseAddtional :: HashMap Text Bytes
} deriving (Eq,Show,Data,Typeable,Generic)
secretSecretEnv
:: HashMap Text ByteString
-> SecretSecretEnv
secretSecretEnv pSseAddtional_ =
SecretSecretEnv'
{ _sseAddtional = _Coerce # pSseAddtional_
}
sseAddtional :: Lens' SecretSecretEnv (HashMap Text ByteString)
sseAddtional
= lens _sseAddtional (\ s a -> s{_sseAddtional = a})
. _Coerce
instance FromJSON SecretSecretEnv where
parseJSON
= withObject "SecretSecretEnv"
(\ o -> SecretSecretEnv' <$> (parseJSONObject o))
instance ToJSON SecretSecretEnv where
toJSON = toJSON . _sseAddtional
data Artifacts = Artifacts'
{ _aImages :: !(Maybe [Text])
, _aObjects :: !(Maybe ArtifactObjects)
} deriving (Eq,Show,Data,Typeable,Generic)
artifacts
:: Artifacts
artifacts =
Artifacts'
{ _aImages = Nothing
, _aObjects = Nothing
}
aImages :: Lens' Artifacts [Text]
aImages
= lens _aImages (\ s a -> s{_aImages = a}) . _Default
. _Coerce
aObjects :: Lens' Artifacts (Maybe ArtifactObjects)
aObjects = lens _aObjects (\ s a -> s{_aObjects = a})
instance FromJSON Artifacts where
parseJSON
= withObject "Artifacts"
(\ o ->
Artifacts' <$>
(o .:? "images" .!= mempty) <*> (o .:? "objects"))
instance ToJSON Artifacts where
toJSON Artifacts'{..}
= object
(catMaybes
[("images" .=) <$> _aImages,
("objects" .=) <$> _aObjects])
data ArtifactObjects = ArtifactObjects'
{ _aoLocation :: !(Maybe Text)
, _aoTiming :: !(Maybe TimeSpan)
, _aoPaths :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
artifactObjects
:: ArtifactObjects
artifactObjects =
ArtifactObjects'
{ _aoLocation = Nothing
, _aoTiming = Nothing
, _aoPaths = Nothing
}
aoLocation :: Lens' ArtifactObjects (Maybe Text)
aoLocation
= lens _aoLocation (\ s a -> s{_aoLocation = a})
aoTiming :: Lens' ArtifactObjects (Maybe TimeSpan)
aoTiming = lens _aoTiming (\ s a -> s{_aoTiming = a})
aoPaths :: Lens' ArtifactObjects [Text]
aoPaths
= lens _aoPaths (\ s a -> s{_aoPaths = a}) . _Default
. _Coerce
instance FromJSON ArtifactObjects where
parseJSON
= withObject "ArtifactObjects"
(\ o ->
ArtifactObjects' <$>
(o .:? "location") <*> (o .:? "timing") <*>
(o .:? "paths" .!= mempty))
instance ToJSON ArtifactObjects where
toJSON ArtifactObjects'{..}
= object
(catMaybes
[("location" .=) <$> _aoLocation,
("timing" .=) <$> _aoTiming,
("paths" .=) <$> _aoPaths])
data Volume = Volume'
{ _vPath :: !(Maybe Text)
, _vName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volume
:: Volume
volume =
Volume'
{ _vPath = Nothing
, _vName = Nothing
}
vPath :: Lens' Volume (Maybe Text)
vPath = lens _vPath (\ s a -> s{_vPath = a})
vName :: Lens' Volume (Maybe Text)
vName = lens _vName (\ s a -> s{_vName = a})
instance FromJSON Volume where
parseJSON
= withObject "Volume"
(\ o ->
Volume' <$> (o .:? "path") <*> (o .:? "name"))
instance ToJSON Volume where
toJSON Volume'{..}
= object
(catMaybes
[("path" .=) <$> _vPath, ("name" .=) <$> _vName])
newtype StatusDetailsItem = StatusDetailsItem'
{ _sdiAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
statusDetailsItem
:: HashMap Text JSONValue
-> StatusDetailsItem
statusDetailsItem pSdiAddtional_ =
StatusDetailsItem'
{ _sdiAddtional = _Coerce # pSdiAddtional_
}
sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
sdiAddtional
= lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})
. _Coerce
instance FromJSON StatusDetailsItem where
parseJSON
= withObject "StatusDetailsItem"
(\ o -> StatusDetailsItem' <$> (parseJSONObject o))
instance ToJSON StatusDetailsItem where
toJSON = toJSON . _sdiAddtional
data Build = Build'
{ _bImages :: !(Maybe [Text])
, _bStatus :: !(Maybe BuildStatus)
, _bSourceProvenance :: !(Maybe SourceProvenance)
, _bSubstitutions :: !(Maybe BuildSubstitutions)
, _bLogURL :: !(Maybe Text)
, _bResults :: !(Maybe Results)
, _bSecrets :: !(Maybe [Secret])
, _bStartTime :: !(Maybe DateTime')
, _bArtifacts :: !(Maybe Artifacts)
, _bLogsBucket :: !(Maybe Text)
, _bSteps :: !(Maybe [BuildStep])
, _bStatusDetail :: !(Maybe Text)
, _bSource :: !(Maybe Source)
, _bId :: !(Maybe Text)
, _bOptions :: !(Maybe BuildOptions)
, _bProjectId :: !(Maybe Text)
, _bTiming :: !(Maybe BuildTiming)
, _bBuildTriggerId :: !(Maybe Text)
, _bTimeout :: !(Maybe GDuration)
, _bFinishTime :: !(Maybe DateTime')
, _bCreateTime :: !(Maybe DateTime')
, _bTags :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
build
:: Build
build =
Build'
{ _bImages = Nothing
, _bStatus = Nothing
, _bSourceProvenance = Nothing
, _bSubstitutions = Nothing
, _bLogURL = Nothing
, _bResults = Nothing
, _bSecrets = Nothing
, _bStartTime = Nothing
, _bArtifacts = Nothing
, _bLogsBucket = Nothing
, _bSteps = Nothing
, _bStatusDetail = Nothing
, _bSource = Nothing
, _bId = Nothing
, _bOptions = Nothing
, _bProjectId = Nothing
, _bTiming = Nothing
, _bBuildTriggerId = Nothing
, _bTimeout = Nothing
, _bFinishTime = Nothing
, _bCreateTime = Nothing
, _bTags = Nothing
}
bImages :: Lens' Build [Text]
bImages
= lens _bImages (\ s a -> s{_bImages = a}) . _Default
. _Coerce
bStatus :: Lens' Build (Maybe BuildStatus)
bStatus = lens _bStatus (\ s a -> s{_bStatus = a})
bSourceProvenance :: Lens' Build (Maybe SourceProvenance)
bSourceProvenance
= lens _bSourceProvenance
(\ s a -> s{_bSourceProvenance = a})
bSubstitutions :: Lens' Build (Maybe BuildSubstitutions)
bSubstitutions
= lens _bSubstitutions
(\ s a -> s{_bSubstitutions = a})
bLogURL :: Lens' Build (Maybe Text)
bLogURL = lens _bLogURL (\ s a -> s{_bLogURL = a})
bResults :: Lens' Build (Maybe Results)
bResults = lens _bResults (\ s a -> s{_bResults = a})
bSecrets :: Lens' Build [Secret]
bSecrets
= lens _bSecrets (\ s a -> s{_bSecrets = a}) .
_Default
. _Coerce
bStartTime :: Lens' Build (Maybe UTCTime)
bStartTime
= lens _bStartTime (\ s a -> s{_bStartTime = a}) .
mapping _DateTime
bArtifacts :: Lens' Build (Maybe Artifacts)
bArtifacts
= lens _bArtifacts (\ s a -> s{_bArtifacts = a})
bLogsBucket :: Lens' Build (Maybe Text)
bLogsBucket
= lens _bLogsBucket (\ s a -> s{_bLogsBucket = a})
bSteps :: Lens' Build [BuildStep]
bSteps
= lens _bSteps (\ s a -> s{_bSteps = a}) . _Default .
_Coerce
bStatusDetail :: Lens' Build (Maybe Text)
bStatusDetail
= lens _bStatusDetail
(\ s a -> s{_bStatusDetail = a})
bSource :: Lens' Build (Maybe Source)
bSource = lens _bSource (\ s a -> s{_bSource = a})
bId :: Lens' Build (Maybe Text)
bId = lens _bId (\ s a -> s{_bId = a})
bOptions :: Lens' Build (Maybe BuildOptions)
bOptions = lens _bOptions (\ s a -> s{_bOptions = a})
bProjectId :: Lens' Build (Maybe Text)
bProjectId
= lens _bProjectId (\ s a -> s{_bProjectId = a})
bTiming :: Lens' Build (Maybe BuildTiming)
bTiming = lens _bTiming (\ s a -> s{_bTiming = a})
bBuildTriggerId :: Lens' Build (Maybe Text)
bBuildTriggerId
= lens _bBuildTriggerId
(\ s a -> s{_bBuildTriggerId = a})
bTimeout :: Lens' Build (Maybe Scientific)
bTimeout
= lens _bTimeout (\ s a -> s{_bTimeout = a}) .
mapping _GDuration
bFinishTime :: Lens' Build (Maybe UTCTime)
bFinishTime
= lens _bFinishTime (\ s a -> s{_bFinishTime = a}) .
mapping _DateTime
bCreateTime :: Lens' Build (Maybe UTCTime)
bCreateTime
= lens _bCreateTime (\ s a -> s{_bCreateTime = a}) .
mapping _DateTime
bTags :: Lens' Build [Text]
bTags
= lens _bTags (\ s a -> s{_bTags = a}) . _Default .
_Coerce
instance FromJSON Build where
parseJSON
= withObject "Build"
(\ o ->
Build' <$>
(o .:? "images" .!= mempty) <*> (o .:? "status") <*>
(o .:? "sourceProvenance")
<*> (o .:? "substitutions")
<*> (o .:? "logUrl")
<*> (o .:? "results")
<*> (o .:? "secrets" .!= mempty)
<*> (o .:? "startTime")
<*> (o .:? "artifacts")
<*> (o .:? "logsBucket")
<*> (o .:? "steps" .!= mempty)
<*> (o .:? "statusDetail")
<*> (o .:? "source")
<*> (o .:? "id")
<*> (o .:? "options")
<*> (o .:? "projectId")
<*> (o .:? "timing")
<*> (o .:? "buildTriggerId")
<*> (o .:? "timeout")
<*> (o .:? "finishTime")
<*> (o .:? "createTime")
<*> (o .:? "tags" .!= mempty))
instance ToJSON Build where
toJSON Build'{..}
= object
(catMaybes
[("images" .=) <$> _bImages,
("status" .=) <$> _bStatus,
("sourceProvenance" .=) <$> _bSourceProvenance,
("substitutions" .=) <$> _bSubstitutions,
("logUrl" .=) <$> _bLogURL,
("results" .=) <$> _bResults,
("secrets" .=) <$> _bSecrets,
("startTime" .=) <$> _bStartTime,
("artifacts" .=) <$> _bArtifacts,
("logsBucket" .=) <$> _bLogsBucket,
("steps" .=) <$> _bSteps,
("statusDetail" .=) <$> _bStatusDetail,
("source" .=) <$> _bSource, ("id" .=) <$> _bId,
("options" .=) <$> _bOptions,
("projectId" .=) <$> _bProjectId,
("timing" .=) <$> _bTiming,
("buildTriggerId" .=) <$> _bBuildTriggerId,
("timeout" .=) <$> _bTimeout,
("finishTime" .=) <$> _bFinishTime,
("createTime" .=) <$> _bCreateTime,
("tags" .=) <$> _bTags])
newtype SourceProvenanceFileHashes = SourceProvenanceFileHashes'
{ _spfhAddtional :: HashMap Text FileHashes
} deriving (Eq,Show,Data,Typeable,Generic)
sourceProvenanceFileHashes
:: HashMap Text FileHashes
-> SourceProvenanceFileHashes
sourceProvenanceFileHashes pSpfhAddtional_ =
SourceProvenanceFileHashes'
{ _spfhAddtional = _Coerce # pSpfhAddtional_
}
spfhAddtional :: Lens' SourceProvenanceFileHashes (HashMap Text FileHashes)
spfhAddtional
= lens _spfhAddtional
(\ s a -> s{_spfhAddtional = a})
. _Coerce
instance FromJSON SourceProvenanceFileHashes where
parseJSON
= withObject "SourceProvenanceFileHashes"
(\ o ->
SourceProvenanceFileHashes' <$> (parseJSONObject o))
instance ToJSON SourceProvenanceFileHashes where
toJSON = toJSON . _spfhAddtional
data Secret = Secret'
{ _sKmsKeyName :: !(Maybe Text)
, _sSecretEnv :: !(Maybe SecretSecretEnv)
} deriving (Eq,Show,Data,Typeable,Generic)
secret
:: Secret
secret =
Secret'
{ _sKmsKeyName = Nothing
, _sSecretEnv = Nothing
}
sKmsKeyName :: Lens' Secret (Maybe Text)
sKmsKeyName
= lens _sKmsKeyName (\ s a -> s{_sKmsKeyName = a})
sSecretEnv :: Lens' Secret (Maybe SecretSecretEnv)
sSecretEnv
= lens _sSecretEnv (\ s a -> s{_sSecretEnv = a})
instance FromJSON Secret where
parseJSON
= withObject "Secret"
(\ o ->
Secret' <$>
(o .:? "kmsKeyName") <*> (o .:? "secretEnv"))
instance ToJSON Secret where
toJSON Secret'{..}
= object
(catMaybes
[("kmsKeyName" .=) <$> _sKmsKeyName,
("secretEnv" .=) <$> _sSecretEnv])
data CancelBuildRequest =
CancelBuildRequest'
deriving (Eq,Show,Data,Typeable,Generic)
cancelBuildRequest
:: CancelBuildRequest
cancelBuildRequest = CancelBuildRequest'
instance FromJSON CancelBuildRequest where
parseJSON
= withObject "CancelBuildRequest"
(\ o -> pure CancelBuildRequest')
instance ToJSON CancelBuildRequest where
toJSON = const emptyObject
data TimeSpan = TimeSpan'
{ _tsStartTime :: !(Maybe DateTime')
, _tsEndTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
timeSpan
:: TimeSpan
timeSpan =
TimeSpan'
{ _tsStartTime = Nothing
, _tsEndTime = Nothing
}
tsStartTime :: Lens' TimeSpan (Maybe UTCTime)
tsStartTime
= lens _tsStartTime (\ s a -> s{_tsStartTime = a}) .
mapping _DateTime
tsEndTime :: Lens' TimeSpan (Maybe UTCTime)
tsEndTime
= lens _tsEndTime (\ s a -> s{_tsEndTime = a}) .
mapping _DateTime
instance FromJSON TimeSpan where
parseJSON
= withObject "TimeSpan"
(\ o ->
TimeSpan' <$>
(o .:? "startTime") <*> (o .:? "endTime"))
instance ToJSON TimeSpan where
toJSON TimeSpan'{..}
= object
(catMaybes
[("startTime" .=) <$> _tsStartTime,
("endTime" .=) <$> _tsEndTime])
data StorageSource = StorageSource'
{ _ssBucket :: !(Maybe Text)
, _ssObject :: !(Maybe Text)
, _ssGeneration :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
storageSource
:: StorageSource
storageSource =
StorageSource'
{ _ssBucket = Nothing
, _ssObject = Nothing
, _ssGeneration = Nothing
}
ssBucket :: Lens' StorageSource (Maybe Text)
ssBucket = lens _ssBucket (\ s a -> s{_ssBucket = a})
ssObject :: Lens' StorageSource (Maybe Text)
ssObject = lens _ssObject (\ s a -> s{_ssObject = a})
ssGeneration :: Lens' StorageSource (Maybe Int64)
ssGeneration
= lens _ssGeneration (\ s a -> s{_ssGeneration = a})
. mapping _Coerce
instance FromJSON StorageSource where
parseJSON
= withObject "StorageSource"
(\ o ->
StorageSource' <$>
(o .:? "bucket") <*> (o .:? "object") <*>
(o .:? "generation"))
instance ToJSON StorageSource where
toJSON StorageSource'{..}
= object
(catMaybes
[("bucket" .=) <$> _ssBucket,
("object" .=) <$> _ssObject,
("generation" .=) <$> _ssGeneration])
newtype ListBuildTriggersResponse = ListBuildTriggersResponse'
{ _lbtrTriggers :: Maybe [BuildTrigger]
} deriving (Eq,Show,Data,Typeable,Generic)
listBuildTriggersResponse
:: ListBuildTriggersResponse
listBuildTriggersResponse =
ListBuildTriggersResponse'
{ _lbtrTriggers = Nothing
}
lbtrTriggers :: Lens' ListBuildTriggersResponse [BuildTrigger]
lbtrTriggers
= lens _lbtrTriggers (\ s a -> s{_lbtrTriggers = a})
. _Default
. _Coerce
instance FromJSON ListBuildTriggersResponse where
parseJSON
= withObject "ListBuildTriggersResponse"
(\ o ->
ListBuildTriggersResponse' <$>
(o .:? "triggers" .!= mempty))
instance ToJSON ListBuildTriggersResponse where
toJSON ListBuildTriggersResponse'{..}
= object
(catMaybes [("triggers" .=) <$> _lbtrTriggers])
data ArtifactResult = ArtifactResult'
{ _arFileHash :: !(Maybe [FileHashes])
, _arLocation :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
artifactResult
:: ArtifactResult
artifactResult =
ArtifactResult'
{ _arFileHash = Nothing
, _arLocation = Nothing
}
arFileHash :: Lens' ArtifactResult [FileHashes]
arFileHash
= lens _arFileHash (\ s a -> s{_arFileHash = a}) .
_Default
. _Coerce
arLocation :: Lens' ArtifactResult (Maybe Text)
arLocation
= lens _arLocation (\ s a -> s{_arLocation = a})
instance FromJSON ArtifactResult where
parseJSON
= withObject "ArtifactResult"
(\ o ->
ArtifactResult' <$>
(o .:? "fileHash" .!= mempty) <*> (o .:? "location"))
instance ToJSON ArtifactResult where
toJSON ArtifactResult'{..}
= object
(catMaybes
[("fileHash" .=) <$> _arFileHash,
("location" .=) <$> _arLocation])
newtype FileHashes = FileHashes'
{ _fhFileHash :: Maybe [Hash]
} deriving (Eq,Show,Data,Typeable,Generic)
fileHashes
:: FileHashes
fileHashes =
FileHashes'
{ _fhFileHash = Nothing
}
fhFileHash :: Lens' FileHashes [Hash]
fhFileHash
= lens _fhFileHash (\ s a -> s{_fhFileHash = a}) .
_Default
. _Coerce
instance FromJSON FileHashes where
parseJSON
= withObject "FileHashes"
(\ o ->
FileHashes' <$> (o .:? "fileHash" .!= mempty))
instance ToJSON FileHashes where
toJSON FileHashes'{..}
= object
(catMaybes [("fileHash" .=) <$> _fhFileHash])
newtype BuildSubstitutions = BuildSubstitutions'
{ _bsAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
buildSubstitutions
:: HashMap Text Text
-> BuildSubstitutions
buildSubstitutions pBsAddtional_ =
BuildSubstitutions'
{ _bsAddtional = _Coerce # pBsAddtional_
}
bsAddtional :: Lens' BuildSubstitutions (HashMap Text Text)
bsAddtional
= lens _bsAddtional (\ s a -> s{_bsAddtional = a}) .
_Coerce
instance FromJSON BuildSubstitutions where
parseJSON
= withObject "BuildSubstitutions"
(\ o -> BuildSubstitutions' <$> (parseJSONObject o))
instance ToJSON BuildSubstitutions where
toJSON = toJSON . _bsAddtional
data Source = Source'
{ _sRepoSource :: !(Maybe RepoSource)
, _sStorageSource :: !(Maybe StorageSource)
} deriving (Eq,Show,Data,Typeable,Generic)
source
:: Source
source =
Source'
{ _sRepoSource = Nothing
, _sStorageSource = Nothing
}
sRepoSource :: Lens' Source (Maybe RepoSource)
sRepoSource
= lens _sRepoSource (\ s a -> s{_sRepoSource = a})
sStorageSource :: Lens' Source (Maybe StorageSource)
sStorageSource
= lens _sStorageSource
(\ s a -> s{_sStorageSource = a})
instance FromJSON Source where
parseJSON
= withObject "Source"
(\ o ->
Source' <$>
(o .:? "repoSource") <*> (o .:? "storageSource"))
instance ToJSON Source where
toJSON Source'{..}
= object
(catMaybes
[("repoSource" .=) <$> _sRepoSource,
("storageSource" .=) <$> _sStorageSource])
newtype OperationMetadata = OperationMetadata'
{ _omAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
operationMetadata
:: HashMap Text JSONValue
-> OperationMetadata
operationMetadata pOmAddtional_ =
OperationMetadata'
{ _omAddtional = _Coerce # pOmAddtional_
}
omAddtional :: Lens' OperationMetadata (HashMap Text JSONValue)
omAddtional
= lens _omAddtional (\ s a -> s{_omAddtional = a}) .
_Coerce
instance FromJSON OperationMetadata where
parseJSON
= withObject "OperationMetadata"
(\ o -> OperationMetadata' <$> (parseJSONObject o))
instance ToJSON OperationMetadata where
toJSON = toJSON . _omAddtional
newtype BuildTiming = BuildTiming'
{ _btAddtional :: HashMap Text TimeSpan
} deriving (Eq,Show,Data,Typeable,Generic)
buildTiming
:: HashMap Text TimeSpan
-> BuildTiming
buildTiming pBtAddtional_ =
BuildTiming'
{ _btAddtional = _Coerce # pBtAddtional_
}
btAddtional :: Lens' BuildTiming (HashMap Text TimeSpan)
btAddtional
= lens _btAddtional (\ s a -> s{_btAddtional = a}) .
_Coerce
instance FromJSON BuildTiming where
parseJSON
= withObject "BuildTiming"
(\ o -> BuildTiming' <$> (parseJSONObject o))
instance ToJSON BuildTiming where
toJSON = toJSON . _btAddtional
newtype BuildOperationMetadata = BuildOperationMetadata'
{ _bomBuild :: Maybe Build
} deriving (Eq,Show,Data,Typeable,Generic)
buildOperationMetadata
:: BuildOperationMetadata
buildOperationMetadata =
BuildOperationMetadata'
{ _bomBuild = Nothing
}
bomBuild :: Lens' BuildOperationMetadata (Maybe Build)
bomBuild = lens _bomBuild (\ s a -> s{_bomBuild = a})
instance FromJSON BuildOperationMetadata where
parseJSON
= withObject "BuildOperationMetadata"
(\ o -> BuildOperationMetadata' <$> (o .:? "build"))
instance ToJSON BuildOperationMetadata where
toJSON BuildOperationMetadata'{..}
= object (catMaybes [("build" .=) <$> _bomBuild])
data BuildOptions = BuildOptions'
{ _boDiskSizeGb :: !(Maybe (Textual Int64))
, _boEnv :: !(Maybe [Text])
, _boSubstitutionOption :: !(Maybe BuildOptionsSubstitutionOption)
, _boRequestedVerifyOption :: !(Maybe BuildOptionsRequestedVerifyOption)
, _boWorkerPool :: !(Maybe Text)
, _boMachineType :: !(Maybe BuildOptionsMachineType)
, _boSecretEnv :: !(Maybe [Text])
, _boVolumes :: !(Maybe [Volume])
, _boLogStreamingOption :: !(Maybe BuildOptionsLogStreamingOption)
, _boLogging :: !(Maybe BuildOptionsLogging)
, _boSourceProvenanceHash :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
buildOptions
:: BuildOptions
buildOptions =
BuildOptions'
{ _boDiskSizeGb = Nothing
, _boEnv = Nothing
, _boSubstitutionOption = Nothing
, _boRequestedVerifyOption = Nothing
, _boWorkerPool = Nothing
, _boMachineType = Nothing
, _boSecretEnv = Nothing
, _boVolumes = Nothing
, _boLogStreamingOption = Nothing
, _boLogging = Nothing
, _boSourceProvenanceHash = Nothing
}
boDiskSizeGb :: Lens' BuildOptions (Maybe Int64)
boDiskSizeGb
= lens _boDiskSizeGb (\ s a -> s{_boDiskSizeGb = a})
. mapping _Coerce
boEnv :: Lens' BuildOptions [Text]
boEnv
= lens _boEnv (\ s a -> s{_boEnv = a}) . _Default .
_Coerce
boSubstitutionOption :: Lens' BuildOptions (Maybe BuildOptionsSubstitutionOption)
boSubstitutionOption
= lens _boSubstitutionOption
(\ s a -> s{_boSubstitutionOption = a})
boRequestedVerifyOption :: Lens' BuildOptions (Maybe BuildOptionsRequestedVerifyOption)
boRequestedVerifyOption
= lens _boRequestedVerifyOption
(\ s a -> s{_boRequestedVerifyOption = a})
boWorkerPool :: Lens' BuildOptions (Maybe Text)
boWorkerPool
= lens _boWorkerPool (\ s a -> s{_boWorkerPool = a})
boMachineType :: Lens' BuildOptions (Maybe BuildOptionsMachineType)
boMachineType
= lens _boMachineType
(\ s a -> s{_boMachineType = a})
boSecretEnv :: Lens' BuildOptions [Text]
boSecretEnv
= lens _boSecretEnv (\ s a -> s{_boSecretEnv = a}) .
_Default
. _Coerce
boVolumes :: Lens' BuildOptions [Volume]
boVolumes
= lens _boVolumes (\ s a -> s{_boVolumes = a}) .
_Default
. _Coerce
boLogStreamingOption :: Lens' BuildOptions (Maybe BuildOptionsLogStreamingOption)
boLogStreamingOption
= lens _boLogStreamingOption
(\ s a -> s{_boLogStreamingOption = a})
boLogging :: Lens' BuildOptions (Maybe BuildOptionsLogging)
boLogging
= lens _boLogging (\ s a -> s{_boLogging = a})
boSourceProvenanceHash :: Lens' BuildOptions [Text]
boSourceProvenanceHash
= lens _boSourceProvenanceHash
(\ s a -> s{_boSourceProvenanceHash = a})
. _Default
. _Coerce
instance FromJSON BuildOptions where
parseJSON
= withObject "BuildOptions"
(\ o ->
BuildOptions' <$>
(o .:? "diskSizeGb") <*> (o .:? "env" .!= mempty) <*>
(o .:? "substitutionOption")
<*> (o .:? "requestedVerifyOption")
<*> (o .:? "workerPool")
<*> (o .:? "machineType")
<*> (o .:? "secretEnv" .!= mempty)
<*> (o .:? "volumes" .!= mempty)
<*> (o .:? "logStreamingOption")
<*> (o .:? "logging")
<*> (o .:? "sourceProvenanceHash" .!= mempty))
instance ToJSON BuildOptions where
toJSON BuildOptions'{..}
= object
(catMaybes
[("diskSizeGb" .=) <$> _boDiskSizeGb,
("env" .=) <$> _boEnv,
("substitutionOption" .=) <$> _boSubstitutionOption,
("requestedVerifyOption" .=) <$>
_boRequestedVerifyOption,
("workerPool" .=) <$> _boWorkerPool,
("machineType" .=) <$> _boMachineType,
("secretEnv" .=) <$> _boSecretEnv,
("volumes" .=) <$> _boVolumes,
("logStreamingOption" .=) <$> _boLogStreamingOption,
("logging" .=) <$> _boLogging,
("sourceProvenanceHash" .=) <$>
_boSourceProvenanceHash])
newtype OperationResponse = OperationResponse'
{ _orAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
operationResponse
:: HashMap Text JSONValue
-> OperationResponse
operationResponse pOrAddtional_ =
OperationResponse'
{ _orAddtional = _Coerce # pOrAddtional_
}
orAddtional :: Lens' OperationResponse (HashMap Text JSONValue)
orAddtional
= lens _orAddtional (\ s a -> s{_orAddtional = a}) .
_Coerce
instance FromJSON OperationResponse where
parseJSON
= withObject "OperationResponse"
(\ o -> OperationResponse' <$> (parseJSONObject o))
instance ToJSON OperationResponse where
toJSON = toJSON . _orAddtional
data BuildTrigger = BuildTrigger'
{ _btSubstitutions :: !(Maybe BuildTriggerSubstitutions)
, _btIncludedFiles :: !(Maybe [Text])
, _btDisabled :: !(Maybe Bool)
, _btTriggerTemplate :: !(Maybe RepoSource)
, _btBuild :: !(Maybe Build)
, _btIgnoredFiles :: !(Maybe [Text])
, _btId :: !(Maybe Text)
, _btDescription :: !(Maybe Text)
, _btFilename :: !(Maybe Text)
, _btCreateTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
buildTrigger
:: BuildTrigger
buildTrigger =
BuildTrigger'
{ _btSubstitutions = Nothing
, _btIncludedFiles = Nothing
, _btDisabled = Nothing
, _btTriggerTemplate = Nothing
, _btBuild = Nothing
, _btIgnoredFiles = Nothing
, _btId = Nothing
, _btDescription = Nothing
, _btFilename = Nothing
, _btCreateTime = Nothing
}
btSubstitutions :: Lens' BuildTrigger (Maybe BuildTriggerSubstitutions)
btSubstitutions
= lens _btSubstitutions
(\ s a -> s{_btSubstitutions = a})
btIncludedFiles :: Lens' BuildTrigger [Text]
btIncludedFiles
= lens _btIncludedFiles
(\ s a -> s{_btIncludedFiles = a})
. _Default
. _Coerce
btDisabled :: Lens' BuildTrigger (Maybe Bool)
btDisabled
= lens _btDisabled (\ s a -> s{_btDisabled = a})
btTriggerTemplate :: Lens' BuildTrigger (Maybe RepoSource)
btTriggerTemplate
= lens _btTriggerTemplate
(\ s a -> s{_btTriggerTemplate = a})
btBuild :: Lens' BuildTrigger (Maybe Build)
btBuild = lens _btBuild (\ s a -> s{_btBuild = a})
btIgnoredFiles :: Lens' BuildTrigger [Text]
btIgnoredFiles
= lens _btIgnoredFiles
(\ s a -> s{_btIgnoredFiles = a})
. _Default
. _Coerce
btId :: Lens' BuildTrigger (Maybe Text)
btId = lens _btId (\ s a -> s{_btId = a})
btDescription :: Lens' BuildTrigger (Maybe Text)
btDescription
= lens _btDescription
(\ s a -> s{_btDescription = a})
btFilename :: Lens' BuildTrigger (Maybe Text)
btFilename
= lens _btFilename (\ s a -> s{_btFilename = a})
btCreateTime :: Lens' BuildTrigger (Maybe UTCTime)
btCreateTime
= lens _btCreateTime (\ s a -> s{_btCreateTime = a})
. mapping _DateTime
instance FromJSON BuildTrigger where
parseJSON
= withObject "BuildTrigger"
(\ o ->
BuildTrigger' <$>
(o .:? "substitutions") <*>
(o .:? "includedFiles" .!= mempty)
<*> (o .:? "disabled")
<*> (o .:? "triggerTemplate")
<*> (o .:? "build")
<*> (o .:? "ignoredFiles" .!= mempty)
<*> (o .:? "id")
<*> (o .:? "description")
<*> (o .:? "filename")
<*> (o .:? "createTime"))
instance ToJSON BuildTrigger where
toJSON BuildTrigger'{..}
= object
(catMaybes
[("substitutions" .=) <$> _btSubstitutions,
("includedFiles" .=) <$> _btIncludedFiles,
("disabled" .=) <$> _btDisabled,
("triggerTemplate" .=) <$> _btTriggerTemplate,
("build" .=) <$> _btBuild,
("ignoredFiles" .=) <$> _btIgnoredFiles,
("id" .=) <$> _btId,
("description" .=) <$> _btDescription,
("filename" .=) <$> _btFilename,
("createTime" .=) <$> _btCreateTime])
data BuiltImage = BuiltImage'
{ _biPushTiming :: !(Maybe TimeSpan)
, _biName :: !(Maybe Text)
, _biDigest :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
builtImage
:: BuiltImage
builtImage =
BuiltImage'
{ _biPushTiming = Nothing
, _biName = Nothing
, _biDigest = Nothing
}
biPushTiming :: Lens' BuiltImage (Maybe TimeSpan)
biPushTiming
= lens _biPushTiming (\ s a -> s{_biPushTiming = a})
biName :: Lens' BuiltImage (Maybe Text)
biName = lens _biName (\ s a -> s{_biName = a})
biDigest :: Lens' BuiltImage (Maybe Text)
biDigest = lens _biDigest (\ s a -> s{_biDigest = a})
instance FromJSON BuiltImage where
parseJSON
= withObject "BuiltImage"
(\ o ->
BuiltImage' <$>
(o .:? "pushTiming") <*> (o .:? "name") <*>
(o .:? "digest"))
instance ToJSON BuiltImage where
toJSON BuiltImage'{..}
= object
(catMaybes
[("pushTiming" .=) <$> _biPushTiming,
("name" .=) <$> _biName,
("digest" .=) <$> _biDigest])