{-# 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.CloudFunctions.Types.Product where
import Network.Google.CloudFunctions.Types.Sum
import Network.Google.Prelude
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 AuditConfig = AuditConfig'
{ _acService :: !(Maybe Text)
, _acAuditLogConfigs :: !(Maybe [AuditLogConfig])
} deriving (Eq,Show,Data,Typeable,Generic)
auditConfig
:: AuditConfig
auditConfig =
AuditConfig'
{ _acService = Nothing
, _acAuditLogConfigs = Nothing
}
acService :: Lens' AuditConfig (Maybe Text)
acService
= lens _acService (\ s a -> s{_acService = a})
acAuditLogConfigs :: Lens' AuditConfig [AuditLogConfig]
acAuditLogConfigs
= lens _acAuditLogConfigs
(\ s a -> s{_acAuditLogConfigs = a})
. _Default
. _Coerce
instance FromJSON AuditConfig where
parseJSON
= withObject "AuditConfig"
(\ o ->
AuditConfig' <$>
(o .:? "service") <*>
(o .:? "auditLogConfigs" .!= mempty))
instance ToJSON AuditConfig where
toJSON AuditConfig'{..}
= object
(catMaybes
[("service" .=) <$> _acService,
("auditLogConfigs" .=) <$> _acAuditLogConfigs])
data OperationMetadataV1Beta2 = OperationMetadataV1Beta2'
{ _omvbVersionId :: !(Maybe (Textual Int64))
, _omvbUpdateTime :: !(Maybe DateTime')
, _omvbType :: !(Maybe OperationMetadataV1Beta2Type)
, _omvbTarget :: !(Maybe Text)
, _omvbRequest :: !(Maybe OperationMetadataV1Beta2Request)
} deriving (Eq,Show,Data,Typeable,Generic)
operationMetadataV1Beta2
:: OperationMetadataV1Beta2
operationMetadataV1Beta2 =
OperationMetadataV1Beta2'
{ _omvbVersionId = Nothing
, _omvbUpdateTime = Nothing
, _omvbType = Nothing
, _omvbTarget = Nothing
, _omvbRequest = Nothing
}
omvbVersionId :: Lens' OperationMetadataV1Beta2 (Maybe Int64)
omvbVersionId
= lens _omvbVersionId
(\ s a -> s{_omvbVersionId = a})
. mapping _Coerce
omvbUpdateTime :: Lens' OperationMetadataV1Beta2 (Maybe UTCTime)
omvbUpdateTime
= lens _omvbUpdateTime
(\ s a -> s{_omvbUpdateTime = a})
. mapping _DateTime
omvbType :: Lens' OperationMetadataV1Beta2 (Maybe OperationMetadataV1Beta2Type)
omvbType = lens _omvbType (\ s a -> s{_omvbType = a})
omvbTarget :: Lens' OperationMetadataV1Beta2 (Maybe Text)
omvbTarget
= lens _omvbTarget (\ s a -> s{_omvbTarget = a})
omvbRequest :: Lens' OperationMetadataV1Beta2 (Maybe OperationMetadataV1Beta2Request)
omvbRequest
= lens _omvbRequest (\ s a -> s{_omvbRequest = a})
instance FromJSON OperationMetadataV1Beta2 where
parseJSON
= withObject "OperationMetadataV1Beta2"
(\ o ->
OperationMetadataV1Beta2' <$>
(o .:? "versionId") <*> (o .:? "updateTime") <*>
(o .:? "type")
<*> (o .:? "target")
<*> (o .:? "request"))
instance ToJSON OperationMetadataV1Beta2 where
toJSON OperationMetadataV1Beta2'{..}
= object
(catMaybes
[("versionId" .=) <$> _omvbVersionId,
("updateTime" .=) <$> _omvbUpdateTime,
("type" .=) <$> _omvbType,
("target" .=) <$> _omvbTarget,
("request" .=) <$> _omvbRequest])
data Expr = Expr'
{ _eLocation :: !(Maybe Text)
, _eExpression :: !(Maybe Text)
, _eTitle :: !(Maybe Text)
, _eDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
expr
:: Expr
expr =
Expr'
{ _eLocation = Nothing
, _eExpression = Nothing
, _eTitle = Nothing
, _eDescription = Nothing
}
eLocation :: Lens' Expr (Maybe Text)
eLocation
= lens _eLocation (\ s a -> s{_eLocation = a})
eExpression :: Lens' Expr (Maybe Text)
eExpression
= lens _eExpression (\ s a -> s{_eExpression = a})
eTitle :: Lens' Expr (Maybe Text)
eTitle = lens _eTitle (\ s a -> s{_eTitle = a})
eDescription :: Lens' Expr (Maybe Text)
eDescription
= lens _eDescription (\ s a -> s{_eDescription = a})
instance FromJSON Expr where
parseJSON
= withObject "Expr"
(\ o ->
Expr' <$>
(o .:? "location") <*> (o .:? "expression") <*>
(o .:? "title")
<*> (o .:? "description"))
instance ToJSON Expr where
toJSON Expr'{..}
= object
(catMaybes
[("location" .=) <$> _eLocation,
("expression" .=) <$> _eExpression,
("title" .=) <$> _eTitle,
("description" .=) <$> _eDescription])
data ListLocationsResponse = ListLocationsResponse'
{ _llrNextPageToken :: !(Maybe Text)
, _llrLocations :: !(Maybe [Location])
} deriving (Eq,Show,Data,Typeable,Generic)
listLocationsResponse
:: ListLocationsResponse
listLocationsResponse =
ListLocationsResponse'
{ _llrNextPageToken = Nothing
, _llrLocations = Nothing
}
llrNextPageToken :: Lens' ListLocationsResponse (Maybe Text)
llrNextPageToken
= lens _llrNextPageToken
(\ s a -> s{_llrNextPageToken = a})
llrLocations :: Lens' ListLocationsResponse [Location]
llrLocations
= lens _llrLocations (\ s a -> s{_llrLocations = a})
. _Default
. _Coerce
instance FromJSON ListLocationsResponse where
parseJSON
= withObject "ListLocationsResponse"
(\ o ->
ListLocationsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "locations" .!= mempty))
instance ToJSON ListLocationsResponse where
toJSON ListLocationsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _llrNextPageToken,
("locations" .=) <$> _llrLocations])
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 GenerateUploadURLRequest =
GenerateUploadURLRequest'
deriving (Eq,Show,Data,Typeable,Generic)
generateUploadURLRequest
:: GenerateUploadURLRequest
generateUploadURLRequest = GenerateUploadURLRequest'
instance FromJSON GenerateUploadURLRequest where
parseJSON
= withObject "GenerateUploadURLRequest"
(\ o -> pure GenerateUploadURLRequest')
instance ToJSON GenerateUploadURLRequest where
toJSON = const emptyObject
data Location = Location'
{ _lName :: !(Maybe Text)
, _lMetadata :: !(Maybe LocationMetadata)
, _lDisplayName :: !(Maybe Text)
, _lLabels :: !(Maybe LocationLabels)
, _lLocationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
location
:: Location
location =
Location'
{ _lName = Nothing
, _lMetadata = Nothing
, _lDisplayName = Nothing
, _lLabels = Nothing
, _lLocationId = Nothing
}
lName :: Lens' Location (Maybe Text)
lName = lens _lName (\ s a -> s{_lName = a})
lMetadata :: Lens' Location (Maybe LocationMetadata)
lMetadata
= lens _lMetadata (\ s a -> s{_lMetadata = a})
lDisplayName :: Lens' Location (Maybe Text)
lDisplayName
= lens _lDisplayName (\ s a -> s{_lDisplayName = a})
lLabels :: Lens' Location (Maybe LocationLabels)
lLabels = lens _lLabels (\ s a -> s{_lLabels = a})
lLocationId :: Lens' Location (Maybe Text)
lLocationId
= lens _lLocationId (\ s a -> s{_lLocationId = a})
instance FromJSON Location where
parseJSON
= withObject "Location"
(\ o ->
Location' <$>
(o .:? "name") <*> (o .:? "metadata") <*>
(o .:? "displayName")
<*> (o .:? "labels")
<*> (o .:? "locationId"))
instance ToJSON Location where
toJSON Location'{..}
= object
(catMaybes
[("name" .=) <$> _lName,
("metadata" .=) <$> _lMetadata,
("displayName" .=) <$> _lDisplayName,
("labels" .=) <$> _lLabels,
("locationId" .=) <$> _lLocationId])
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])
newtype GenerateDownloadURLRequest = GenerateDownloadURLRequest'
{ _gdurVersionId :: Maybe (Textual Word64)
} deriving (Eq,Show,Data,Typeable,Generic)
generateDownloadURLRequest
:: GenerateDownloadURLRequest
generateDownloadURLRequest =
GenerateDownloadURLRequest'
{ _gdurVersionId = Nothing
}
gdurVersionId :: Lens' GenerateDownloadURLRequest (Maybe Word64)
gdurVersionId
= lens _gdurVersionId
(\ s a -> s{_gdurVersionId = a})
. mapping _Coerce
instance FromJSON GenerateDownloadURLRequest where
parseJSON
= withObject "GenerateDownloadURLRequest"
(\ o ->
GenerateDownloadURLRequest' <$> (o .:? "versionId"))
instance ToJSON GenerateDownloadURLRequest where
toJSON GenerateDownloadURLRequest'{..}
= object
(catMaybes [("versionId" .=) <$> _gdurVersionId])
data Retry =
Retry'
deriving (Eq,Show,Data,Typeable,Generic)
retry
:: Retry
retry = Retry'
instance FromJSON Retry where
parseJSON = withObject "Retry" (\ o -> pure Retry')
instance ToJSON Retry where
toJSON = const emptyObject
newtype GenerateUploadURLResponse = GenerateUploadURLResponse'
{ _guurUploadURL :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
generateUploadURLResponse
:: GenerateUploadURLResponse
generateUploadURLResponse =
GenerateUploadURLResponse'
{ _guurUploadURL = Nothing
}
guurUploadURL :: Lens' GenerateUploadURLResponse (Maybe Text)
guurUploadURL
= lens _guurUploadURL
(\ s a -> s{_guurUploadURL = a})
instance FromJSON GenerateUploadURLResponse where
parseJSON
= withObject "GenerateUploadURLResponse"
(\ o ->
GenerateUploadURLResponse' <$> (o .:? "uploadUrl"))
instance ToJSON GenerateUploadURLResponse where
toJSON GenerateUploadURLResponse'{..}
= object
(catMaybes [("uploadUrl" .=) <$> _guurUploadURL])
newtype FailurePolicy = FailurePolicy'
{ _fpRetry :: Maybe Retry
} deriving (Eq,Show,Data,Typeable,Generic)
failurePolicy
:: FailurePolicy
failurePolicy =
FailurePolicy'
{ _fpRetry = Nothing
}
fpRetry :: Lens' FailurePolicy (Maybe Retry)
fpRetry = lens _fpRetry (\ s a -> s{_fpRetry = a})
instance FromJSON FailurePolicy where
parseJSON
= withObject "FailurePolicy"
(\ o -> FailurePolicy' <$> (o .:? "retry"))
instance ToJSON FailurePolicy where
toJSON FailurePolicy'{..}
= object (catMaybes [("retry" .=) <$> _fpRetry])
data CallFunctionResponse = CallFunctionResponse'
{ _cfrExecutionId :: !(Maybe Text)
, _cfrError :: !(Maybe Text)
, _cfrResult :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
callFunctionResponse
:: CallFunctionResponse
callFunctionResponse =
CallFunctionResponse'
{ _cfrExecutionId = Nothing
, _cfrError = Nothing
, _cfrResult = Nothing
}
cfrExecutionId :: Lens' CallFunctionResponse (Maybe Text)
cfrExecutionId
= lens _cfrExecutionId
(\ s a -> s{_cfrExecutionId = a})
cfrError :: Lens' CallFunctionResponse (Maybe Text)
cfrError = lens _cfrError (\ s a -> s{_cfrError = a})
cfrResult :: Lens' CallFunctionResponse (Maybe Text)
cfrResult
= lens _cfrResult (\ s a -> s{_cfrResult = a})
instance FromJSON CallFunctionResponse where
parseJSON
= withObject "CallFunctionResponse"
(\ o ->
CallFunctionResponse' <$>
(o .:? "executionId") <*> (o .:? "error") <*>
(o .:? "result"))
instance ToJSON CallFunctionResponse where
toJSON CallFunctionResponse'{..}
= object
(catMaybes
[("executionId" .=) <$> _cfrExecutionId,
("error" .=) <$> _cfrError,
("result" .=) <$> _cfrResult])
newtype HTTPSTrigger = HTTPSTrigger'
{ _htURL :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
httpsTrigger
:: HTTPSTrigger
httpsTrigger =
HTTPSTrigger'
{ _htURL = Nothing
}
htURL :: Lens' HTTPSTrigger (Maybe Text)
htURL = lens _htURL (\ s a -> s{_htURL = a})
instance FromJSON HTTPSTrigger where
parseJSON
= withObject "HTTPSTrigger"
(\ o -> HTTPSTrigger' <$> (o .:? "url"))
instance ToJSON HTTPSTrigger where
toJSON HTTPSTrigger'{..}
= object (catMaybes [("url" .=) <$> _htURL])
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
newtype CloudFunctionEnvironmentVariables = CloudFunctionEnvironmentVariables'
{ _cfevAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
cloudFunctionEnvironmentVariables
:: HashMap Text Text
-> CloudFunctionEnvironmentVariables
cloudFunctionEnvironmentVariables pCfevAddtional_ =
CloudFunctionEnvironmentVariables'
{ _cfevAddtional = _Coerce # pCfevAddtional_
}
cfevAddtional :: Lens' CloudFunctionEnvironmentVariables (HashMap Text Text)
cfevAddtional
= lens _cfevAddtional
(\ s a -> s{_cfevAddtional = a})
. _Coerce
instance FromJSON CloudFunctionEnvironmentVariables
where
parseJSON
= withObject "CloudFunctionEnvironmentVariables"
(\ o ->
CloudFunctionEnvironmentVariables' <$>
(parseJSONObject o))
instance ToJSON CloudFunctionEnvironmentVariables
where
toJSON = toJSON . _cfevAddtional
newtype OperationMetadataV1Request = OperationMetadataV1Request'
{ _omvrAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
operationMetadataV1Request
:: HashMap Text JSONValue
-> OperationMetadataV1Request
operationMetadataV1Request pOmvrAddtional_ =
OperationMetadataV1Request'
{ _omvrAddtional = _Coerce # pOmvrAddtional_
}
omvrAddtional :: Lens' OperationMetadataV1Request (HashMap Text JSONValue)
omvrAddtional
= lens _omvrAddtional
(\ s a -> s{_omvrAddtional = a})
. _Coerce
instance FromJSON OperationMetadataV1Request where
parseJSON
= withObject "OperationMetadataV1Request"
(\ o ->
OperationMetadataV1Request' <$> (parseJSONObject o))
instance ToJSON OperationMetadataV1Request where
toJSON = toJSON . _omvrAddtional
data SetIAMPolicyRequest = SetIAMPolicyRequest'
{ _siprUpdateMask :: !(Maybe GFieldMask)
, _siprPolicy :: !(Maybe Policy)
} deriving (Eq,Show,Data,Typeable,Generic)
setIAMPolicyRequest
:: SetIAMPolicyRequest
setIAMPolicyRequest =
SetIAMPolicyRequest'
{ _siprUpdateMask = Nothing
, _siprPolicy = Nothing
}
siprUpdateMask :: Lens' SetIAMPolicyRequest (Maybe GFieldMask)
siprUpdateMask
= lens _siprUpdateMask
(\ s a -> s{_siprUpdateMask = a})
siprPolicy :: Lens' SetIAMPolicyRequest (Maybe Policy)
siprPolicy
= lens _siprPolicy (\ s a -> s{_siprPolicy = a})
instance FromJSON SetIAMPolicyRequest where
parseJSON
= withObject "SetIAMPolicyRequest"
(\ o ->
SetIAMPolicyRequest' <$>
(o .:? "updateMask") <*> (o .:? "policy"))
instance ToJSON SetIAMPolicyRequest where
toJSON SetIAMPolicyRequest'{..}
= object
(catMaybes
[("updateMask" .=) <$> _siprUpdateMask,
("policy" .=) <$> _siprPolicy])
data EventTrigger = EventTrigger'
{ _etService :: !(Maybe Text)
, _etFailurePolicy :: !(Maybe FailurePolicy)
, _etEventType :: !(Maybe Text)
, _etResource :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
eventTrigger
:: EventTrigger
eventTrigger =
EventTrigger'
{ _etService = Nothing
, _etFailurePolicy = Nothing
, _etEventType = Nothing
, _etResource = Nothing
}
etService :: Lens' EventTrigger (Maybe Text)
etService
= lens _etService (\ s a -> s{_etService = a})
etFailurePolicy :: Lens' EventTrigger (Maybe FailurePolicy)
etFailurePolicy
= lens _etFailurePolicy
(\ s a -> s{_etFailurePolicy = a})
etEventType :: Lens' EventTrigger (Maybe Text)
etEventType
= lens _etEventType (\ s a -> s{_etEventType = a})
etResource :: Lens' EventTrigger (Maybe Text)
etResource
= lens _etResource (\ s a -> s{_etResource = a})
instance FromJSON EventTrigger where
parseJSON
= withObject "EventTrigger"
(\ o ->
EventTrigger' <$>
(o .:? "service") <*> (o .:? "failurePolicy") <*>
(o .:? "eventType")
<*> (o .:? "resource"))
instance ToJSON EventTrigger where
toJSON EventTrigger'{..}
= object
(catMaybes
[("service" .=) <$> _etService,
("failurePolicy" .=) <$> _etFailurePolicy,
("eventType" .=) <$> _etEventType,
("resource" .=) <$> _etResource])
data SourceRepository = SourceRepository'
{ _srURL :: !(Maybe Text)
, _srDeployedURL :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
sourceRepository
:: SourceRepository
sourceRepository =
SourceRepository'
{ _srURL = Nothing
, _srDeployedURL = Nothing
}
srURL :: Lens' SourceRepository (Maybe Text)
srURL = lens _srURL (\ s a -> s{_srURL = a})
srDeployedURL :: Lens' SourceRepository (Maybe Text)
srDeployedURL
= lens _srDeployedURL
(\ s a -> s{_srDeployedURL = a})
instance FromJSON SourceRepository where
parseJSON
= withObject "SourceRepository"
(\ o ->
SourceRepository' <$>
(o .:? "url") <*> (o .:? "deployedUrl"))
instance ToJSON SourceRepository where
toJSON SourceRepository'{..}
= object
(catMaybes
[("url" .=) <$> _srURL,
("deployedUrl" .=) <$> _srDeployedURL])
data OperationMetadataV1 = OperationMetadataV1'
{ _omvVersionId :: !(Maybe (Textual Int64))
, _omvUpdateTime :: !(Maybe DateTime')
, _omvType :: !(Maybe OperationMetadataV1Type)
, _omvTarget :: !(Maybe Text)
, _omvRequest :: !(Maybe OperationMetadataV1Request)
} deriving (Eq,Show,Data,Typeable,Generic)
operationMetadataV1
:: OperationMetadataV1
operationMetadataV1 =
OperationMetadataV1'
{ _omvVersionId = Nothing
, _omvUpdateTime = Nothing
, _omvType = Nothing
, _omvTarget = Nothing
, _omvRequest = Nothing
}
omvVersionId :: Lens' OperationMetadataV1 (Maybe Int64)
omvVersionId
= lens _omvVersionId (\ s a -> s{_omvVersionId = a})
. mapping _Coerce
omvUpdateTime :: Lens' OperationMetadataV1 (Maybe UTCTime)
omvUpdateTime
= lens _omvUpdateTime
(\ s a -> s{_omvUpdateTime = a})
. mapping _DateTime
omvType :: Lens' OperationMetadataV1 (Maybe OperationMetadataV1Type)
omvType = lens _omvType (\ s a -> s{_omvType = a})
omvTarget :: Lens' OperationMetadataV1 (Maybe Text)
omvTarget
= lens _omvTarget (\ s a -> s{_omvTarget = a})
omvRequest :: Lens' OperationMetadataV1 (Maybe OperationMetadataV1Request)
omvRequest
= lens _omvRequest (\ s a -> s{_omvRequest = a})
instance FromJSON OperationMetadataV1 where
parseJSON
= withObject "OperationMetadataV1"
(\ o ->
OperationMetadataV1' <$>
(o .:? "versionId") <*> (o .:? "updateTime") <*>
(o .:? "type")
<*> (o .:? "target")
<*> (o .:? "request"))
instance ToJSON OperationMetadataV1 where
toJSON OperationMetadataV1'{..}
= object
(catMaybes
[("versionId" .=) <$> _omvVersionId,
("updateTime" .=) <$> _omvUpdateTime,
("type" .=) <$> _omvType,
("target" .=) <$> _omvTarget,
("request" .=) <$> _omvRequest])
newtype GenerateDownloadURLResponse = GenerateDownloadURLResponse'
{ _gdurDownloadURL :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
generateDownloadURLResponse
:: GenerateDownloadURLResponse
generateDownloadURLResponse =
GenerateDownloadURLResponse'
{ _gdurDownloadURL = Nothing
}
gdurDownloadURL :: Lens' GenerateDownloadURLResponse (Maybe Text)
gdurDownloadURL
= lens _gdurDownloadURL
(\ s a -> s{_gdurDownloadURL = a})
instance FromJSON GenerateDownloadURLResponse where
parseJSON
= withObject "GenerateDownloadURLResponse"
(\ o ->
GenerateDownloadURLResponse' <$>
(o .:? "downloadUrl"))
instance ToJSON GenerateDownloadURLResponse where
toJSON GenerateDownloadURLResponse'{..}
= object
(catMaybes [("downloadUrl" .=) <$> _gdurDownloadURL])
newtype TestIAMPermissionsRequest = TestIAMPermissionsRequest'
{ _tiprPermissions :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
testIAMPermissionsRequest
:: TestIAMPermissionsRequest
testIAMPermissionsRequest =
TestIAMPermissionsRequest'
{ _tiprPermissions = Nothing
}
tiprPermissions :: Lens' TestIAMPermissionsRequest [Text]
tiprPermissions
= lens _tiprPermissions
(\ s a -> s{_tiprPermissions = a})
. _Default
. _Coerce
instance FromJSON TestIAMPermissionsRequest where
parseJSON
= withObject "TestIAMPermissionsRequest"
(\ o ->
TestIAMPermissionsRequest' <$>
(o .:? "permissions" .!= mempty))
instance ToJSON TestIAMPermissionsRequest where
toJSON TestIAMPermissionsRequest'{..}
= object
(catMaybes [("permissions" .=) <$> _tiprPermissions])
newtype TestIAMPermissionsResponse = TestIAMPermissionsResponse'
{ _tiamprPermissions :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
testIAMPermissionsResponse
:: TestIAMPermissionsResponse
testIAMPermissionsResponse =
TestIAMPermissionsResponse'
{ _tiamprPermissions = Nothing
}
tiamprPermissions :: Lens' TestIAMPermissionsResponse [Text]
tiamprPermissions
= lens _tiamprPermissions
(\ s a -> s{_tiamprPermissions = a})
. _Default
. _Coerce
instance FromJSON TestIAMPermissionsResponse where
parseJSON
= withObject "TestIAMPermissionsResponse"
(\ o ->
TestIAMPermissionsResponse' <$>
(o .:? "permissions" .!= mempty))
instance ToJSON TestIAMPermissionsResponse where
toJSON TestIAMPermissionsResponse'{..}
= object
(catMaybes
[("permissions" .=) <$> _tiamprPermissions])
data Policy = Policy'
{ _pAuditConfigs :: !(Maybe [AuditConfig])
, _pEtag :: !(Maybe Bytes)
, _pVersion :: !(Maybe (Textual Int32))
, _pBindings :: !(Maybe [Binding])
} deriving (Eq,Show,Data,Typeable,Generic)
policy
:: Policy
policy =
Policy'
{ _pAuditConfigs = Nothing
, _pEtag = Nothing
, _pVersion = Nothing
, _pBindings = Nothing
}
pAuditConfigs :: Lens' Policy [AuditConfig]
pAuditConfigs
= lens _pAuditConfigs
(\ s a -> s{_pAuditConfigs = a})
. _Default
. _Coerce
pEtag :: Lens' Policy (Maybe ByteString)
pEtag
= lens _pEtag (\ s a -> s{_pEtag = a}) .
mapping _Bytes
pVersion :: Lens' Policy (Maybe Int32)
pVersion
= lens _pVersion (\ s a -> s{_pVersion = a}) .
mapping _Coerce
pBindings :: Lens' Policy [Binding]
pBindings
= lens _pBindings (\ s a -> s{_pBindings = a}) .
_Default
. _Coerce
instance FromJSON Policy where
parseJSON
= withObject "Policy"
(\ o ->
Policy' <$>
(o .:? "auditConfigs" .!= mempty) <*> (o .:? "etag")
<*> (o .:? "version")
<*> (o .:? "bindings" .!= mempty))
instance ToJSON Policy where
toJSON Policy'{..}
= object
(catMaybes
[("auditConfigs" .=) <$> _pAuditConfigs,
("etag" .=) <$> _pEtag, ("version" .=) <$> _pVersion,
("bindings" .=) <$> _pBindings])
newtype LocationLabels = LocationLabels'
{ _llAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
locationLabels
:: HashMap Text Text
-> LocationLabels
locationLabels pLlAddtional_ =
LocationLabels'
{ _llAddtional = _Coerce # pLlAddtional_
}
llAddtional :: Lens' LocationLabels (HashMap Text Text)
llAddtional
= lens _llAddtional (\ s a -> s{_llAddtional = a}) .
_Coerce
instance FromJSON LocationLabels where
parseJSON
= withObject "LocationLabels"
(\ o -> LocationLabels' <$> (parseJSONObject o))
instance ToJSON LocationLabels where
toJSON = toJSON . _llAddtional
data ListFunctionsResponse = ListFunctionsResponse'
{ _lfrNextPageToken :: !(Maybe Text)
, _lfrFunctions :: !(Maybe [CloudFunction])
} deriving (Eq,Show,Data,Typeable,Generic)
listFunctionsResponse
:: ListFunctionsResponse
listFunctionsResponse =
ListFunctionsResponse'
{ _lfrNextPageToken = Nothing
, _lfrFunctions = Nothing
}
lfrNextPageToken :: Lens' ListFunctionsResponse (Maybe Text)
lfrNextPageToken
= lens _lfrNextPageToken
(\ s a -> s{_lfrNextPageToken = a})
lfrFunctions :: Lens' ListFunctionsResponse [CloudFunction]
lfrFunctions
= lens _lfrFunctions (\ s a -> s{_lfrFunctions = a})
. _Default
. _Coerce
instance FromJSON ListFunctionsResponse where
parseJSON
= withObject "ListFunctionsResponse"
(\ o ->
ListFunctionsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "functions" .!= mempty))
instance ToJSON ListFunctionsResponse where
toJSON ListFunctionsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lfrNextPageToken,
("functions" .=) <$> _lfrFunctions])
newtype LocationMetadata = LocationMetadata'
{ _lmAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
locationMetadata
:: HashMap Text JSONValue
-> LocationMetadata
locationMetadata pLmAddtional_ =
LocationMetadata'
{ _lmAddtional = _Coerce # pLmAddtional_
}
lmAddtional :: Lens' LocationMetadata (HashMap Text JSONValue)
lmAddtional
= lens _lmAddtional (\ s a -> s{_lmAddtional = a}) .
_Coerce
instance FromJSON LocationMetadata where
parseJSON
= withObject "LocationMetadata"
(\ o -> LocationMetadata' <$> (parseJSONObject o))
instance ToJSON LocationMetadata where
toJSON = toJSON . _lmAddtional
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
data AuditLogConfig = AuditLogConfig'
{ _alcLogType :: !(Maybe AuditLogConfigLogType)
, _alcExemptedMembers :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
auditLogConfig
:: AuditLogConfig
auditLogConfig =
AuditLogConfig'
{ _alcLogType = Nothing
, _alcExemptedMembers = Nothing
}
alcLogType :: Lens' AuditLogConfig (Maybe AuditLogConfigLogType)
alcLogType
= lens _alcLogType (\ s a -> s{_alcLogType = a})
alcExemptedMembers :: Lens' AuditLogConfig [Text]
alcExemptedMembers
= lens _alcExemptedMembers
(\ s a -> s{_alcExemptedMembers = a})
. _Default
. _Coerce
instance FromJSON AuditLogConfig where
parseJSON
= withObject "AuditLogConfig"
(\ o ->
AuditLogConfig' <$>
(o .:? "logType") <*>
(o .:? "exemptedMembers" .!= mempty))
instance ToJSON AuditLogConfig where
toJSON AuditLogConfig'{..}
= object
(catMaybes
[("logType" .=) <$> _alcLogType,
("exemptedMembers" .=) <$> _alcExemptedMembers])
data CloudFunction = CloudFunction'
{ _cfRuntime :: !(Maybe Text)
, _cfStatus :: !(Maybe CloudFunctionStatus)
, _cfSourceArchiveURL :: !(Maybe Text)
, _cfVersionId :: !(Maybe (Textual Int64))
, _cfSourceUploadURL :: !(Maybe Text)
, _cfEntryPoint :: !(Maybe Text)
, _cfHTTPSTrigger :: !(Maybe HTTPSTrigger)
, _cfNetwork :: !(Maybe Text)
, _cfMaxInstances :: !(Maybe (Textual Int32))
, _cfEventTrigger :: !(Maybe EventTrigger)
, _cfUpdateTime :: !(Maybe DateTime')
, _cfName :: !(Maybe Text)
, _cfSourceRepository :: !(Maybe SourceRepository)
, _cfAvailableMemoryMb :: !(Maybe (Textual Int32))
, _cfLabels :: !(Maybe CloudFunctionLabels)
, _cfServiceAccountEmail :: !(Maybe Text)
, _cfEnvironmentVariables :: !(Maybe CloudFunctionEnvironmentVariables)
, _cfTimeout :: !(Maybe GDuration)
, _cfVPCConnector :: !(Maybe Text)
, _cfDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
cloudFunction
:: CloudFunction
cloudFunction =
CloudFunction'
{ _cfRuntime = Nothing
, _cfStatus = Nothing
, _cfSourceArchiveURL = Nothing
, _cfVersionId = Nothing
, _cfSourceUploadURL = Nothing
, _cfEntryPoint = Nothing
, _cfHTTPSTrigger = Nothing
, _cfNetwork = Nothing
, _cfMaxInstances = Nothing
, _cfEventTrigger = Nothing
, _cfUpdateTime = Nothing
, _cfName = Nothing
, _cfSourceRepository = Nothing
, _cfAvailableMemoryMb = Nothing
, _cfLabels = Nothing
, _cfServiceAccountEmail = Nothing
, _cfEnvironmentVariables = Nothing
, _cfTimeout = Nothing
, _cfVPCConnector = Nothing
, _cfDescription = Nothing
}
cfRuntime :: Lens' CloudFunction (Maybe Text)
cfRuntime
= lens _cfRuntime (\ s a -> s{_cfRuntime = a})
cfStatus :: Lens' CloudFunction (Maybe CloudFunctionStatus)
cfStatus = lens _cfStatus (\ s a -> s{_cfStatus = a})
cfSourceArchiveURL :: Lens' CloudFunction (Maybe Text)
cfSourceArchiveURL
= lens _cfSourceArchiveURL
(\ s a -> s{_cfSourceArchiveURL = a})
cfVersionId :: Lens' CloudFunction (Maybe Int64)
cfVersionId
= lens _cfVersionId (\ s a -> s{_cfVersionId = a}) .
mapping _Coerce
cfSourceUploadURL :: Lens' CloudFunction (Maybe Text)
cfSourceUploadURL
= lens _cfSourceUploadURL
(\ s a -> s{_cfSourceUploadURL = a})
cfEntryPoint :: Lens' CloudFunction (Maybe Text)
cfEntryPoint
= lens _cfEntryPoint (\ s a -> s{_cfEntryPoint = a})
cfHTTPSTrigger :: Lens' CloudFunction (Maybe HTTPSTrigger)
cfHTTPSTrigger
= lens _cfHTTPSTrigger
(\ s a -> s{_cfHTTPSTrigger = a})
cfNetwork :: Lens' CloudFunction (Maybe Text)
cfNetwork
= lens _cfNetwork (\ s a -> s{_cfNetwork = a})
cfMaxInstances :: Lens' CloudFunction (Maybe Int32)
cfMaxInstances
= lens _cfMaxInstances
(\ s a -> s{_cfMaxInstances = a})
. mapping _Coerce
cfEventTrigger :: Lens' CloudFunction (Maybe EventTrigger)
cfEventTrigger
= lens _cfEventTrigger
(\ s a -> s{_cfEventTrigger = a})
cfUpdateTime :: Lens' CloudFunction (Maybe UTCTime)
cfUpdateTime
= lens _cfUpdateTime (\ s a -> s{_cfUpdateTime = a})
. mapping _DateTime
cfName :: Lens' CloudFunction (Maybe Text)
cfName = lens _cfName (\ s a -> s{_cfName = a})
cfSourceRepository :: Lens' CloudFunction (Maybe SourceRepository)
cfSourceRepository
= lens _cfSourceRepository
(\ s a -> s{_cfSourceRepository = a})
cfAvailableMemoryMb :: Lens' CloudFunction (Maybe Int32)
cfAvailableMemoryMb
= lens _cfAvailableMemoryMb
(\ s a -> s{_cfAvailableMemoryMb = a})
. mapping _Coerce
cfLabels :: Lens' CloudFunction (Maybe CloudFunctionLabels)
cfLabels = lens _cfLabels (\ s a -> s{_cfLabels = a})
cfServiceAccountEmail :: Lens' CloudFunction (Maybe Text)
cfServiceAccountEmail
= lens _cfServiceAccountEmail
(\ s a -> s{_cfServiceAccountEmail = a})
cfEnvironmentVariables :: Lens' CloudFunction (Maybe CloudFunctionEnvironmentVariables)
cfEnvironmentVariables
= lens _cfEnvironmentVariables
(\ s a -> s{_cfEnvironmentVariables = a})
cfTimeout :: Lens' CloudFunction (Maybe Scientific)
cfTimeout
= lens _cfTimeout (\ s a -> s{_cfTimeout = a}) .
mapping _GDuration
cfVPCConnector :: Lens' CloudFunction (Maybe Text)
cfVPCConnector
= lens _cfVPCConnector
(\ s a -> s{_cfVPCConnector = a})
cfDescription :: Lens' CloudFunction (Maybe Text)
cfDescription
= lens _cfDescription
(\ s a -> s{_cfDescription = a})
instance FromJSON CloudFunction where
parseJSON
= withObject "CloudFunction"
(\ o ->
CloudFunction' <$>
(o .:? "runtime") <*> (o .:? "status") <*>
(o .:? "sourceArchiveUrl")
<*> (o .:? "versionId")
<*> (o .:? "sourceUploadUrl")
<*> (o .:? "entryPoint")
<*> (o .:? "httpsTrigger")
<*> (o .:? "network")
<*> (o .:? "maxInstances")
<*> (o .:? "eventTrigger")
<*> (o .:? "updateTime")
<*> (o .:? "name")
<*> (o .:? "sourceRepository")
<*> (o .:? "availableMemoryMb")
<*> (o .:? "labels")
<*> (o .:? "serviceAccountEmail")
<*> (o .:? "environmentVariables")
<*> (o .:? "timeout")
<*> (o .:? "vpcConnector")
<*> (o .:? "description"))
instance ToJSON CloudFunction where
toJSON CloudFunction'{..}
= object
(catMaybes
[("runtime" .=) <$> _cfRuntime,
("status" .=) <$> _cfStatus,
("sourceArchiveUrl" .=) <$> _cfSourceArchiveURL,
("versionId" .=) <$> _cfVersionId,
("sourceUploadUrl" .=) <$> _cfSourceUploadURL,
("entryPoint" .=) <$> _cfEntryPoint,
("httpsTrigger" .=) <$> _cfHTTPSTrigger,
("network" .=) <$> _cfNetwork,
("maxInstances" .=) <$> _cfMaxInstances,
("eventTrigger" .=) <$> _cfEventTrigger,
("updateTime" .=) <$> _cfUpdateTime,
("name" .=) <$> _cfName,
("sourceRepository" .=) <$> _cfSourceRepository,
("availableMemoryMb" .=) <$> _cfAvailableMemoryMb,
("labels" .=) <$> _cfLabels,
("serviceAccountEmail" .=) <$>
_cfServiceAccountEmail,
("environmentVariables" .=) <$>
_cfEnvironmentVariables,
("timeout" .=) <$> _cfTimeout,
("vpcConnector" .=) <$> _cfVPCConnector,
("description" .=) <$> _cfDescription])
newtype OperationMetadataV1Beta2Request = OperationMetadataV1Beta2Request'
{ _omvbrAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
operationMetadataV1Beta2Request
:: HashMap Text JSONValue
-> OperationMetadataV1Beta2Request
operationMetadataV1Beta2Request pOmvbrAddtional_ =
OperationMetadataV1Beta2Request'
{ _omvbrAddtional = _Coerce # pOmvbrAddtional_
}
omvbrAddtional :: Lens' OperationMetadataV1Beta2Request (HashMap Text JSONValue)
omvbrAddtional
= lens _omvbrAddtional
(\ s a -> s{_omvbrAddtional = a})
. _Coerce
instance FromJSON OperationMetadataV1Beta2Request
where
parseJSON
= withObject "OperationMetadataV1Beta2Request"
(\ o ->
OperationMetadataV1Beta2Request' <$>
(parseJSONObject o))
instance ToJSON OperationMetadataV1Beta2Request where
toJSON = toJSON . _omvbrAddtional
newtype CloudFunctionLabels = CloudFunctionLabels'
{ _cflAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
cloudFunctionLabels
:: HashMap Text Text
-> CloudFunctionLabels
cloudFunctionLabels pCflAddtional_ =
CloudFunctionLabels'
{ _cflAddtional = _Coerce # pCflAddtional_
}
cflAddtional :: Lens' CloudFunctionLabels (HashMap Text Text)
cflAddtional
= lens _cflAddtional (\ s a -> s{_cflAddtional = a})
. _Coerce
instance FromJSON CloudFunctionLabels where
parseJSON
= withObject "CloudFunctionLabels"
(\ o -> CloudFunctionLabels' <$> (parseJSONObject o))
instance ToJSON CloudFunctionLabels where
toJSON = toJSON . _cflAddtional
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
newtype CallFunctionRequest = CallFunctionRequest'
{ _cfrData :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
callFunctionRequest
:: CallFunctionRequest
callFunctionRequest =
CallFunctionRequest'
{ _cfrData = Nothing
}
cfrData :: Lens' CallFunctionRequest (Maybe Text)
cfrData = lens _cfrData (\ s a -> s{_cfrData = a})
instance FromJSON CallFunctionRequest where
parseJSON
= withObject "CallFunctionRequest"
(\ o -> CallFunctionRequest' <$> (o .:? "data"))
instance ToJSON CallFunctionRequest where
toJSON CallFunctionRequest'{..}
= object (catMaybes [("data" .=) <$> _cfrData])
data Binding = Binding'
{ _bMembers :: !(Maybe [Text])
, _bRole :: !(Maybe Text)
, _bCondition :: !(Maybe Expr)
} deriving (Eq,Show,Data,Typeable,Generic)
binding
:: Binding
binding =
Binding'
{ _bMembers = Nothing
, _bRole = Nothing
, _bCondition = Nothing
}
bMembers :: Lens' Binding [Text]
bMembers
= lens _bMembers (\ s a -> s{_bMembers = a}) .
_Default
. _Coerce
bRole :: Lens' Binding (Maybe Text)
bRole = lens _bRole (\ s a -> s{_bRole = a})
bCondition :: Lens' Binding (Maybe Expr)
bCondition
= lens _bCondition (\ s a -> s{_bCondition = a})
instance FromJSON Binding where
parseJSON
= withObject "Binding"
(\ o ->
Binding' <$>
(o .:? "members" .!= mempty) <*> (o .:? "role") <*>
(o .:? "condition"))
instance ToJSON Binding where
toJSON Binding'{..}
= object
(catMaybes
[("members" .=) <$> _bMembers,
("role" .=) <$> _bRole,
("condition" .=) <$> _bCondition])