{-# 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.DataFusion.Types.Product where
import Network.Google.DataFusion.Types.Sum
import Network.Google.Prelude
newtype InstanceLabels =
InstanceLabels'
{ _ilAddtional :: HashMap Text Text
}
deriving (Eq, Show, Data, Typeable, Generic)
instanceLabels
:: HashMap Text Text
-> InstanceLabels
instanceLabels pIlAddtional_ =
InstanceLabels' {_ilAddtional = _Coerce # pIlAddtional_}
ilAddtional :: Lens' InstanceLabels (HashMap Text Text)
ilAddtional
= lens _ilAddtional (\ s a -> s{_ilAddtional = a}) .
_Coerce
instance FromJSON InstanceLabels where
parseJSON
= withObject "InstanceLabels"
(\ o -> InstanceLabels' <$> (parseJSONObject o))
instance ToJSON InstanceLabels where
toJSON = toJSON . _ilAddtional
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])
newtype OperationSchema =
OperationSchema'
{ _osAddtional :: HashMap Text JSONValue
}
deriving (Eq, Show, Data, Typeable, Generic)
operationSchema
:: HashMap Text JSONValue
-> OperationSchema
operationSchema pOsAddtional_ =
OperationSchema' {_osAddtional = _Coerce # pOsAddtional_}
osAddtional :: Lens' OperationSchema (HashMap Text JSONValue)
osAddtional
= lens _osAddtional (\ s a -> s{_osAddtional = a}) .
_Coerce
instance FromJSON OperationSchema where
parseJSON
= withObject "OperationSchema"
(\ o -> OperationSchema' <$> (parseJSONObject o))
instance ToJSON OperationSchema where
toJSON = toJSON . _osAddtional
data CounterOptions =
CounterOptions'
{ _coField :: !(Maybe Text)
, _coMetric :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
counterOptions
:: CounterOptions
counterOptions = CounterOptions' {_coField = Nothing, _coMetric = Nothing}
coField :: Lens' CounterOptions (Maybe Text)
coField = lens _coField (\ s a -> s{_coField = a})
coMetric :: Lens' CounterOptions (Maybe Text)
coMetric = lens _coMetric (\ s a -> s{_coMetric = a})
instance FromJSON CounterOptions where
parseJSON
= withObject "CounterOptions"
(\ o ->
CounterOptions' <$>
(o .:? "field") <*> (o .:? "metric"))
instance ToJSON CounterOptions where
toJSON CounterOptions'{..}
= object
(catMaybes
[("field" .=) <$> _coField,
("metric" .=) <$> _coMetric])
data AuditConfig =
AuditConfig'
{ _acService :: !(Maybe Text)
, _acAuditLogConfigs :: !(Maybe [AuditLogConfig])
, _acExemptedMembers :: !(Maybe [Text])
}
deriving (Eq, Show, Data, Typeable, Generic)
auditConfig
:: AuditConfig
auditConfig =
AuditConfig'
{ _acService = Nothing
, _acAuditLogConfigs = Nothing
, _acExemptedMembers = 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
acExemptedMembers :: Lens' AuditConfig [Text]
acExemptedMembers
= lens _acExemptedMembers
(\ s a -> s{_acExemptedMembers = a})
. _Default
. _Coerce
instance FromJSON AuditConfig where
parseJSON
= withObject "AuditConfig"
(\ o ->
AuditConfig' <$>
(o .:? "service") <*>
(o .:? "auditLogConfigs" .!= mempty)
<*> (o .:? "exemptedMembers" .!= mempty))
instance ToJSON AuditConfig where
toJSON AuditConfig'{..}
= object
(catMaybes
[("service" .=) <$> _acService,
("auditLogConfigs" .=) <$> _acAuditLogConfigs,
("exemptedMembers" .=) <$> _acExemptedMembers])
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 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 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 OperationSchema)
}
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 OperationSchema)
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 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 Rule =
Rule'
{ _rAction :: !(Maybe RuleAction)
, _rIn :: !(Maybe [Text])
, _rNotIn :: !(Maybe [Text])
, _rConditions :: !(Maybe [Condition])
, _rPermissions :: !(Maybe [Text])
, _rLogConfig :: !(Maybe [LogConfig])
, _rDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
rule
:: Rule
rule =
Rule'
{ _rAction = Nothing
, _rIn = Nothing
, _rNotIn = Nothing
, _rConditions = Nothing
, _rPermissions = Nothing
, _rLogConfig = Nothing
, _rDescription = Nothing
}
rAction :: Lens' Rule (Maybe RuleAction)
rAction = lens _rAction (\ s a -> s{_rAction = a})
rIn :: Lens' Rule [Text]
rIn
= lens _rIn (\ s a -> s{_rIn = a}) . _Default .
_Coerce
rNotIn :: Lens' Rule [Text]
rNotIn
= lens _rNotIn (\ s a -> s{_rNotIn = a}) . _Default .
_Coerce
rConditions :: Lens' Rule [Condition]
rConditions
= lens _rConditions (\ s a -> s{_rConditions = a}) .
_Default
. _Coerce
rPermissions :: Lens' Rule [Text]
rPermissions
= lens _rPermissions (\ s a -> s{_rPermissions = a})
. _Default
. _Coerce
rLogConfig :: Lens' Rule [LogConfig]
rLogConfig
= lens _rLogConfig (\ s a -> s{_rLogConfig = a}) .
_Default
. _Coerce
rDescription :: Lens' Rule (Maybe Text)
rDescription
= lens _rDescription (\ s a -> s{_rDescription = a})
instance FromJSON Rule where
parseJSON
= withObject "Rule"
(\ o ->
Rule' <$>
(o .:? "action") <*> (o .:? "in" .!= mempty) <*>
(o .:? "notIn" .!= mempty)
<*> (o .:? "conditions" .!= mempty)
<*> (o .:? "permissions" .!= mempty)
<*> (o .:? "logConfig" .!= mempty)
<*> (o .:? "description"))
instance ToJSON Rule where
toJSON Rule'{..}
= object
(catMaybes
[("action" .=) <$> _rAction, ("in" .=) <$> _rIn,
("notIn" .=) <$> _rNotIn,
("conditions" .=) <$> _rConditions,
("permissions" .=) <$> _rPermissions,
("logConfig" .=) <$> _rLogConfig,
("description" .=) <$> _rDescription])
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 NetworkConfig =
NetworkConfig'
{ _ncNetwork :: !(Maybe Text)
, _ncIPAllocation :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
networkConfig
:: NetworkConfig
networkConfig = NetworkConfig' {_ncNetwork = Nothing, _ncIPAllocation = Nothing}
ncNetwork :: Lens' NetworkConfig (Maybe Text)
ncNetwork
= lens _ncNetwork (\ s a -> s{_ncNetwork = a})
ncIPAllocation :: Lens' NetworkConfig (Maybe Text)
ncIPAllocation
= lens _ncIPAllocation
(\ s a -> s{_ncIPAllocation = a})
instance FromJSON NetworkConfig where
parseJSON
= withObject "NetworkConfig"
(\ o ->
NetworkConfig' <$>
(o .:? "network") <*> (o .:? "ipAllocation"))
instance ToJSON NetworkConfig where
toJSON NetworkConfig'{..}
= object
(catMaybes
[("network" .=) <$> _ncNetwork,
("ipAllocation" .=) <$> _ncIPAllocation])
data CloudAuditOptions =
CloudAuditOptions'
{ _caoAuthorizationLoggingOptions :: !(Maybe AuthorizationLoggingOptions)
, _caoLogName :: !(Maybe CloudAuditOptionsLogName)
}
deriving (Eq, Show, Data, Typeable, Generic)
cloudAuditOptions
:: CloudAuditOptions
cloudAuditOptions =
CloudAuditOptions'
{_caoAuthorizationLoggingOptions = Nothing, _caoLogName = Nothing}
caoAuthorizationLoggingOptions :: Lens' CloudAuditOptions (Maybe AuthorizationLoggingOptions)
caoAuthorizationLoggingOptions
= lens _caoAuthorizationLoggingOptions
(\ s a -> s{_caoAuthorizationLoggingOptions = a})
caoLogName :: Lens' CloudAuditOptions (Maybe CloudAuditOptionsLogName)
caoLogName
= lens _caoLogName (\ s a -> s{_caoLogName = a})
instance FromJSON CloudAuditOptions where
parseJSON
= withObject "CloudAuditOptions"
(\ o ->
CloudAuditOptions' <$>
(o .:? "authorizationLoggingOptions") <*>
(o .:? "logName"))
instance ToJSON CloudAuditOptions where
toJSON CloudAuditOptions'{..}
= object
(catMaybes
[("authorizationLoggingOptions" .=) <$>
_caoAuthorizationLoggingOptions,
("logName" .=) <$> _caoLogName])
newtype DataAccessOptions =
DataAccessOptions'
{ _daoLogMode :: Maybe DataAccessOptionsLogMode
}
deriving (Eq, Show, Data, Typeable, Generic)
dataAccessOptions
:: DataAccessOptions
dataAccessOptions = DataAccessOptions' {_daoLogMode = Nothing}
daoLogMode :: Lens' DataAccessOptions (Maybe DataAccessOptionsLogMode)
daoLogMode
= lens _daoLogMode (\ s a -> s{_daoLogMode = a})
instance FromJSON DataAccessOptions where
parseJSON
= withObject "DataAccessOptions"
(\ o -> DataAccessOptions' <$> (o .:? "logMode"))
instance ToJSON DataAccessOptions where
toJSON DataAccessOptions'{..}
= object (catMaybes [("logMode" .=) <$> _daoLogMode])
data RestartInstanceRequest =
RestartInstanceRequest'
deriving (Eq, Show, Data, Typeable, Generic)
restartInstanceRequest
:: RestartInstanceRequest
restartInstanceRequest = RestartInstanceRequest'
instance FromJSON RestartInstanceRequest where
parseJSON
= withObject "RestartInstanceRequest"
(\ o -> pure RestartInstanceRequest')
instance ToJSON RestartInstanceRequest where
toJSON = const emptyObject
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 UpgradeInstanceRequest =
UpgradeInstanceRequest'
deriving (Eq, Show, Data, Typeable, Generic)
upgradeInstanceRequest
:: UpgradeInstanceRequest
upgradeInstanceRequest = UpgradeInstanceRequest'
instance FromJSON UpgradeInstanceRequest where
parseJSON
= withObject "UpgradeInstanceRequest"
(\ o -> pure UpgradeInstanceRequest')
instance ToJSON UpgradeInstanceRequest where
toJSON = const emptyObject
newtype AuthorizationLoggingOptions =
AuthorizationLoggingOptions'
{ _aloPermissionType :: Maybe AuthorizationLoggingOptionsPermissionType
}
deriving (Eq, Show, Data, Typeable, Generic)
authorizationLoggingOptions
:: AuthorizationLoggingOptions
authorizationLoggingOptions =
AuthorizationLoggingOptions' {_aloPermissionType = Nothing}
aloPermissionType :: Lens' AuthorizationLoggingOptions (Maybe AuthorizationLoggingOptionsPermissionType)
aloPermissionType
= lens _aloPermissionType
(\ s a -> s{_aloPermissionType = a})
instance FromJSON AuthorizationLoggingOptions where
parseJSON
= withObject "AuthorizationLoggingOptions"
(\ o ->
AuthorizationLoggingOptions' <$>
(o .:? "permissionType"))
instance ToJSON AuthorizationLoggingOptions where
toJSON AuthorizationLoggingOptions'{..}
= object
(catMaybes
[("permissionType" .=) <$> _aloPermissionType])
data Policy =
Policy'
{ _pAuditConfigs :: !(Maybe [AuditConfig])
, _pEtag :: !(Maybe Bytes)
, _pRules :: !(Maybe [Rule])
, _pVersion :: !(Maybe (Textual Int32))
, _pBindings :: !(Maybe [Binding])
, _pIAMOwned :: !(Maybe Bool)
}
deriving (Eq, Show, Data, Typeable, Generic)
policy
:: Policy
policy =
Policy'
{ _pAuditConfigs = Nothing
, _pEtag = Nothing
, _pRules = Nothing
, _pVersion = Nothing
, _pBindings = Nothing
, _pIAMOwned = 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
pRules :: Lens' Policy [Rule]
pRules
= lens _pRules (\ s a -> s{_pRules = a}) . _Default .
_Coerce
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
pIAMOwned :: Lens' Policy (Maybe Bool)
pIAMOwned
= lens _pIAMOwned (\ s a -> s{_pIAMOwned = a})
instance FromJSON Policy where
parseJSON
= withObject "Policy"
(\ o ->
Policy' <$>
(o .:? "auditConfigs" .!= mempty) <*> (o .:? "etag")
<*> (o .:? "rules" .!= mempty)
<*> (o .:? "version")
<*> (o .:? "bindings" .!= mempty)
<*> (o .:? "iamOwned"))
instance ToJSON Policy where
toJSON Policy'{..}
= object
(catMaybes
[("auditConfigs" .=) <$> _pAuditConfigs,
("etag" .=) <$> _pEtag, ("rules" .=) <$> _pRules,
("version" .=) <$> _pVersion,
("bindings" .=) <$> _pBindings,
("iamOwned" .=) <$> _pIAMOwned])
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
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
data OperationMetadata =
OperationMetadata'
{ _omAPIVersion :: !(Maybe Text)
, _omRequestedCancellation :: !(Maybe Bool)
, _omEndTime :: !(Maybe DateTime')
, _omStatusDetail :: !(Maybe Text)
, _omVerb :: !(Maybe Text)
, _omTarget :: !(Maybe Text)
, _omCreateTime :: !(Maybe DateTime')
}
deriving (Eq, Show, Data, Typeable, Generic)
operationMetadata
:: OperationMetadata
operationMetadata =
OperationMetadata'
{ _omAPIVersion = Nothing
, _omRequestedCancellation = Nothing
, _omEndTime = Nothing
, _omStatusDetail = Nothing
, _omVerb = Nothing
, _omTarget = Nothing
, _omCreateTime = Nothing
}
omAPIVersion :: Lens' OperationMetadata (Maybe Text)
omAPIVersion
= lens _omAPIVersion (\ s a -> s{_omAPIVersion = a})
omRequestedCancellation :: Lens' OperationMetadata (Maybe Bool)
omRequestedCancellation
= lens _omRequestedCancellation
(\ s a -> s{_omRequestedCancellation = a})
omEndTime :: Lens' OperationMetadata (Maybe UTCTime)
omEndTime
= lens _omEndTime (\ s a -> s{_omEndTime = a}) .
mapping _DateTime
omStatusDetail :: Lens' OperationMetadata (Maybe Text)
omStatusDetail
= lens _omStatusDetail
(\ s a -> s{_omStatusDetail = a})
omVerb :: Lens' OperationMetadata (Maybe Text)
omVerb = lens _omVerb (\ s a -> s{_omVerb = a})
omTarget :: Lens' OperationMetadata (Maybe Text)
omTarget = lens _omTarget (\ s a -> s{_omTarget = a})
omCreateTime :: Lens' OperationMetadata (Maybe UTCTime)
omCreateTime
= lens _omCreateTime (\ s a -> s{_omCreateTime = a})
. mapping _DateTime
instance FromJSON OperationMetadata where
parseJSON
= withObject "OperationMetadata"
(\ o ->
OperationMetadata' <$>
(o .:? "apiVersion") <*>
(o .:? "requestedCancellation")
<*> (o .:? "endTime")
<*> (o .:? "statusDetail")
<*> (o .:? "verb")
<*> (o .:? "target")
<*> (o .:? "createTime"))
instance ToJSON OperationMetadata where
toJSON OperationMetadata'{..}
= object
(catMaybes
[("apiVersion" .=) <$> _omAPIVersion,
("requestedCancellation" .=) <$>
_omRequestedCancellation,
("endTime" .=) <$> _omEndTime,
("statusDetail" .=) <$> _omStatusDetail,
("verb" .=) <$> _omVerb, ("target" .=) <$> _omTarget,
("createTime" .=) <$> _omCreateTime])
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 ListInstancesResponse =
ListInstancesResponse'
{ _lirNextPageToken :: !(Maybe Text)
, _lirUnreachable :: !(Maybe [Text])
, _lirInstances :: !(Maybe [Instance])
}
deriving (Eq, Show, Data, Typeable, Generic)
listInstancesResponse
:: ListInstancesResponse
listInstancesResponse =
ListInstancesResponse'
{ _lirNextPageToken = Nothing
, _lirUnreachable = Nothing
, _lirInstances = Nothing
}
lirNextPageToken :: Lens' ListInstancesResponse (Maybe Text)
lirNextPageToken
= lens _lirNextPageToken
(\ s a -> s{_lirNextPageToken = a})
lirUnreachable :: Lens' ListInstancesResponse [Text]
lirUnreachable
= lens _lirUnreachable
(\ s a -> s{_lirUnreachable = a})
. _Default
. _Coerce
lirInstances :: Lens' ListInstancesResponse [Instance]
lirInstances
= lens _lirInstances (\ s a -> s{_lirInstances = a})
. _Default
. _Coerce
instance FromJSON ListInstancesResponse where
parseJSON
= withObject "ListInstancesResponse"
(\ o ->
ListInstancesResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "unreachable" .!= mempty)
<*> (o .:? "instances" .!= mempty))
instance ToJSON ListInstancesResponse where
toJSON ListInstancesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lirNextPageToken,
("unreachable" .=) <$> _lirUnreachable,
("instances" .=) <$> _lirInstances])
data Condition =
Condition'
{ _cOp :: !(Maybe ConditionOp)
, _cIAM :: !(Maybe ConditionIAM)
, _cValues :: !(Maybe [Text])
, _cSys :: !(Maybe ConditionSys)
, _cSvc :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
condition
:: Condition
condition =
Condition'
{ _cOp = Nothing
, _cIAM = Nothing
, _cValues = Nothing
, _cSys = Nothing
, _cSvc = Nothing
}
cOp :: Lens' Condition (Maybe ConditionOp)
cOp = lens _cOp (\ s a -> s{_cOp = a})
cIAM :: Lens' Condition (Maybe ConditionIAM)
cIAM = lens _cIAM (\ s a -> s{_cIAM = a})
cValues :: Lens' Condition [Text]
cValues
= lens _cValues (\ s a -> s{_cValues = a}) . _Default
. _Coerce
cSys :: Lens' Condition (Maybe ConditionSys)
cSys = lens _cSys (\ s a -> s{_cSys = a})
cSvc :: Lens' Condition (Maybe Text)
cSvc = lens _cSvc (\ s a -> s{_cSvc = a})
instance FromJSON Condition where
parseJSON
= withObject "Condition"
(\ o ->
Condition' <$>
(o .:? "op") <*> (o .:? "iam") <*>
(o .:? "values" .!= mempty)
<*> (o .:? "sys")
<*> (o .:? "svc"))
instance ToJSON Condition where
toJSON Condition'{..}
= object
(catMaybes
[("op" .=) <$> _cOp, ("iam" .=) <$> _cIAM,
("values" .=) <$> _cValues, ("sys" .=) <$> _cSys,
("svc" .=) <$> _cSvc])
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 LogConfig =
LogConfig'
{ _lcCloudAudit :: !(Maybe CloudAuditOptions)
, _lcDataAccess :: !(Maybe DataAccessOptions)
, _lcCounter :: !(Maybe CounterOptions)
}
deriving (Eq, Show, Data, Typeable, Generic)
logConfig
:: LogConfig
logConfig =
LogConfig'
{_lcCloudAudit = Nothing, _lcDataAccess = Nothing, _lcCounter = Nothing}
lcCloudAudit :: Lens' LogConfig (Maybe CloudAuditOptions)
lcCloudAudit
= lens _lcCloudAudit (\ s a -> s{_lcCloudAudit = a})
lcDataAccess :: Lens' LogConfig (Maybe DataAccessOptions)
lcDataAccess
= lens _lcDataAccess (\ s a -> s{_lcDataAccess = a})
lcCounter :: Lens' LogConfig (Maybe CounterOptions)
lcCounter
= lens _lcCounter (\ s a -> s{_lcCounter = a})
instance FromJSON LogConfig where
parseJSON
= withObject "LogConfig"
(\ o ->
LogConfig' <$>
(o .:? "cloudAudit") <*> (o .:? "dataAccess") <*>
(o .:? "counter"))
instance ToJSON LogConfig where
toJSON LogConfig'{..}
= object
(catMaybes
[("cloudAudit" .=) <$> _lcCloudAudit,
("dataAccess" .=) <$> _lcDataAccess,
("counter" .=) <$> _lcCounter])
newtype InstanceOptions =
InstanceOptions'
{ _ioAddtional :: HashMap Text Text
}
deriving (Eq, Show, Data, Typeable, Generic)
instanceOptions
:: HashMap Text Text
-> InstanceOptions
instanceOptions pIoAddtional_ =
InstanceOptions' {_ioAddtional = _Coerce # pIoAddtional_}
ioAddtional :: Lens' InstanceOptions (HashMap Text Text)
ioAddtional
= lens _ioAddtional (\ s a -> s{_ioAddtional = a}) .
_Coerce
instance FromJSON InstanceOptions where
parseJSON
= withObject "InstanceOptions"
(\ o -> InstanceOptions' <$> (parseJSONObject o))
instance ToJSON InstanceOptions where
toJSON = toJSON . _ioAddtional
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])
data Instance =
Instance'
{ _iStateMessage :: !(Maybe Text)
, _iState :: !(Maybe InstanceState)
, _iEnableStackdriverLogging :: !(Maybe Bool)
, _iServiceEndpoint :: !(Maybe Text)
, _iZone :: !(Maybe Text)
, _iServiceAccount :: !(Maybe Text)
, _iNetworkConfig :: !(Maybe NetworkConfig)
, _iUpdateTime :: !(Maybe DateTime')
, _iPrivateInstance :: !(Maybe Bool)
, _iName :: !(Maybe Text)
, _iVersion :: !(Maybe Text)
, _iDisplayName :: !(Maybe Text)
, _iEnableStackdriverMonitoring :: !(Maybe Bool)
, _iLabels :: !(Maybe InstanceLabels)
, _iOptions :: !(Maybe InstanceOptions)
, _iType :: !(Maybe InstanceType)
, _iDescription :: !(Maybe Text)
, _iCreateTime :: !(Maybe DateTime')
}
deriving (Eq, Show, Data, Typeable, Generic)
instance'
:: Instance
instance' =
Instance'
{ _iStateMessage = Nothing
, _iState = Nothing
, _iEnableStackdriverLogging = Nothing
, _iServiceEndpoint = Nothing
, _iZone = Nothing
, _iServiceAccount = Nothing
, _iNetworkConfig = Nothing
, _iUpdateTime = Nothing
, _iPrivateInstance = Nothing
, _iName = Nothing
, _iVersion = Nothing
, _iDisplayName = Nothing
, _iEnableStackdriverMonitoring = Nothing
, _iLabels = Nothing
, _iOptions = Nothing
, _iType = Nothing
, _iDescription = Nothing
, _iCreateTime = Nothing
}
iStateMessage :: Lens' Instance (Maybe Text)
iStateMessage
= lens _iStateMessage
(\ s a -> s{_iStateMessage = a})
iState :: Lens' Instance (Maybe InstanceState)
iState = lens _iState (\ s a -> s{_iState = a})
iEnableStackdriverLogging :: Lens' Instance (Maybe Bool)
iEnableStackdriverLogging
= lens _iEnableStackdriverLogging
(\ s a -> s{_iEnableStackdriverLogging = a})
iServiceEndpoint :: Lens' Instance (Maybe Text)
iServiceEndpoint
= lens _iServiceEndpoint
(\ s a -> s{_iServiceEndpoint = a})
iZone :: Lens' Instance (Maybe Text)
iZone = lens _iZone (\ s a -> s{_iZone = a})
iServiceAccount :: Lens' Instance (Maybe Text)
iServiceAccount
= lens _iServiceAccount
(\ s a -> s{_iServiceAccount = a})
iNetworkConfig :: Lens' Instance (Maybe NetworkConfig)
iNetworkConfig
= lens _iNetworkConfig
(\ s a -> s{_iNetworkConfig = a})
iUpdateTime :: Lens' Instance (Maybe UTCTime)
iUpdateTime
= lens _iUpdateTime (\ s a -> s{_iUpdateTime = a}) .
mapping _DateTime
iPrivateInstance :: Lens' Instance (Maybe Bool)
iPrivateInstance
= lens _iPrivateInstance
(\ s a -> s{_iPrivateInstance = a})
iName :: Lens' Instance (Maybe Text)
iName = lens _iName (\ s a -> s{_iName = a})
iVersion :: Lens' Instance (Maybe Text)
iVersion = lens _iVersion (\ s a -> s{_iVersion = a})
iDisplayName :: Lens' Instance (Maybe Text)
iDisplayName
= lens _iDisplayName (\ s a -> s{_iDisplayName = a})
iEnableStackdriverMonitoring :: Lens' Instance (Maybe Bool)
iEnableStackdriverMonitoring
= lens _iEnableStackdriverMonitoring
(\ s a -> s{_iEnableStackdriverMonitoring = a})
iLabels :: Lens' Instance (Maybe InstanceLabels)
iLabels = lens _iLabels (\ s a -> s{_iLabels = a})
iOptions :: Lens' Instance (Maybe InstanceOptions)
iOptions = lens _iOptions (\ s a -> s{_iOptions = a})
iType :: Lens' Instance (Maybe InstanceType)
iType = lens _iType (\ s a -> s{_iType = a})
iDescription :: Lens' Instance (Maybe Text)
iDescription
= lens _iDescription (\ s a -> s{_iDescription = a})
iCreateTime :: Lens' Instance (Maybe UTCTime)
iCreateTime
= lens _iCreateTime (\ s a -> s{_iCreateTime = a}) .
mapping _DateTime
instance FromJSON Instance where
parseJSON
= withObject "Instance"
(\ o ->
Instance' <$>
(o .:? "stateMessage") <*> (o .:? "state") <*>
(o .:? "enableStackdriverLogging")
<*> (o .:? "serviceEndpoint")
<*> (o .:? "zone")
<*> (o .:? "serviceAccount")
<*> (o .:? "networkConfig")
<*> (o .:? "updateTime")
<*> (o .:? "privateInstance")
<*> (o .:? "name")
<*> (o .:? "version")
<*> (o .:? "displayName")
<*> (o .:? "enableStackdriverMonitoring")
<*> (o .:? "labels")
<*> (o .:? "options")
<*> (o .:? "type")
<*> (o .:? "description")
<*> (o .:? "createTime"))
instance ToJSON Instance where
toJSON Instance'{..}
= object
(catMaybes
[("stateMessage" .=) <$> _iStateMessage,
("state" .=) <$> _iState,
("enableStackdriverLogging" .=) <$>
_iEnableStackdriverLogging,
("serviceEndpoint" .=) <$> _iServiceEndpoint,
("zone" .=) <$> _iZone,
("serviceAccount" .=) <$> _iServiceAccount,
("networkConfig" .=) <$> _iNetworkConfig,
("updateTime" .=) <$> _iUpdateTime,
("privateInstance" .=) <$> _iPrivateInstance,
("name" .=) <$> _iName, ("version" .=) <$> _iVersion,
("displayName" .=) <$> _iDisplayName,
("enableStackdriverMonitoring" .=) <$>
_iEnableStackdriverMonitoring,
("labels" .=) <$> _iLabels,
("options" .=) <$> _iOptions, ("type" .=) <$> _iType,
("description" .=) <$> _iDescription,
("createTime" .=) <$> _iCreateTime])