module Network.Google.DeploymentManager.Types.Product where
import Network.Google.DeploymentManager.Types.Sum
import Network.Google.Prelude
data OperationWarningsItemDataItem = OperationWarningsItemDataItem'
{ _owidiValue :: !(Maybe Text)
, _owidiKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationWarningsItemDataItem
:: OperationWarningsItemDataItem
operationWarningsItemDataItem =
OperationWarningsItemDataItem'
{ _owidiValue = Nothing
, _owidiKey = Nothing
}
owidiValue :: Lens' OperationWarningsItemDataItem (Maybe Text)
owidiValue
= lens _owidiValue (\ s a -> s{_owidiValue = a})
owidiKey :: Lens' OperationWarningsItemDataItem (Maybe Text)
owidiKey = lens _owidiKey (\ s a -> s{_owidiKey = a})
instance FromJSON OperationWarningsItemDataItem where
parseJSON
= withObject "OperationWarningsItemDataItem"
(\ o ->
OperationWarningsItemDataItem' <$>
(o .:? "value") <*> (o .:? "key"))
instance ToJSON OperationWarningsItemDataItem where
toJSON OperationWarningsItemDataItem'{..}
= object
(catMaybes
[("value" .=) <$> _owidiValue,
("key" .=) <$> _owidiKey])
newtype ConfigFile = ConfigFile'
{ _cfContent :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
configFile
:: ConfigFile
configFile =
ConfigFile'
{ _cfContent = Nothing
}
cfContent :: Lens' ConfigFile (Maybe Text)
cfContent
= lens _cfContent (\ s a -> s{_cfContent = a})
instance FromJSON ConfigFile where
parseJSON
= withObject "ConfigFile"
(\ o -> ConfigFile' <$> (o .:? "content"))
instance ToJSON ConfigFile where
toJSON ConfigFile'{..}
= object (catMaybes [("content" .=) <$> _cfContent])
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 OperationsListResponse = OperationsListResponse'
{ _olrNextPageToken :: !(Maybe Text)
, _olrOperations :: !(Maybe [Operation])
} deriving (Eq,Show,Data,Typeable,Generic)
operationsListResponse
:: OperationsListResponse
operationsListResponse =
OperationsListResponse'
{ _olrNextPageToken = Nothing
, _olrOperations = Nothing
}
olrNextPageToken :: Lens' OperationsListResponse (Maybe Text)
olrNextPageToken
= lens _olrNextPageToken
(\ s a -> s{_olrNextPageToken = a})
olrOperations :: Lens' OperationsListResponse [Operation]
olrOperations
= lens _olrOperations
(\ s a -> s{_olrOperations = a})
. _Default
. _Coerce
instance FromJSON OperationsListResponse where
parseJSON
= withObject "OperationsListResponse"
(\ o ->
OperationsListResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "operations" .!= mempty))
instance ToJSON OperationsListResponse where
toJSON OperationsListResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _olrNextPageToken,
("operations" .=) <$> _olrOperations])
data ResourceUpdateWarningsItemDataItem = ResourceUpdateWarningsItemDataItem'
{ _ruwidiValue :: !(Maybe Text)
, _ruwidiKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
resourceUpdateWarningsItemDataItem
:: ResourceUpdateWarningsItemDataItem
resourceUpdateWarningsItemDataItem =
ResourceUpdateWarningsItemDataItem'
{ _ruwidiValue = Nothing
, _ruwidiKey = Nothing
}
ruwidiValue :: Lens' ResourceUpdateWarningsItemDataItem (Maybe Text)
ruwidiValue
= lens _ruwidiValue (\ s a -> s{_ruwidiValue = a})
ruwidiKey :: Lens' ResourceUpdateWarningsItemDataItem (Maybe Text)
ruwidiKey
= lens _ruwidiKey (\ s a -> s{_ruwidiKey = a})
instance FromJSON ResourceUpdateWarningsItemDataItem
where
parseJSON
= withObject "ResourceUpdateWarningsItemDataItem"
(\ o ->
ResourceUpdateWarningsItemDataItem' <$>
(o .:? "value") <*> (o .:? "key"))
instance ToJSON ResourceUpdateWarningsItemDataItem
where
toJSON ResourceUpdateWarningsItemDataItem'{..}
= object
(catMaybes
[("value" .=) <$> _ruwidiValue,
("key" .=) <$> _ruwidiKey])
data TypesListResponse = TypesListResponse'
{ _tlrNextPageToken :: !(Maybe Text)
, _tlrTypes :: !(Maybe [Type])
} deriving (Eq,Show,Data,Typeable,Generic)
typesListResponse
:: TypesListResponse
typesListResponse =
TypesListResponse'
{ _tlrNextPageToken = Nothing
, _tlrTypes = Nothing
}
tlrNextPageToken :: Lens' TypesListResponse (Maybe Text)
tlrNextPageToken
= lens _tlrNextPageToken
(\ s a -> s{_tlrNextPageToken = a})
tlrTypes :: Lens' TypesListResponse [Type]
tlrTypes
= lens _tlrTypes (\ s a -> s{_tlrTypes = a}) .
_Default
. _Coerce
instance FromJSON TypesListResponse where
parseJSON
= withObject "TypesListResponse"
(\ o ->
TypesListResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "types" .!= mempty))
instance ToJSON TypesListResponse where
toJSON TypesListResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _tlrNextPageToken,
("types" .=) <$> _tlrTypes])
data LogConfigCounterOptions = LogConfigCounterOptions'
{ _lccoField :: !(Maybe Text)
, _lccoMetric :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
logConfigCounterOptions
:: LogConfigCounterOptions
logConfigCounterOptions =
LogConfigCounterOptions'
{ _lccoField = Nothing
, _lccoMetric = Nothing
}
lccoField :: Lens' LogConfigCounterOptions (Maybe Text)
lccoField
= lens _lccoField (\ s a -> s{_lccoField = a})
lccoMetric :: Lens' LogConfigCounterOptions (Maybe Text)
lccoMetric
= lens _lccoMetric (\ s a -> s{_lccoMetric = a})
instance FromJSON LogConfigCounterOptions where
parseJSON
= withObject "LogConfigCounterOptions"
(\ o ->
LogConfigCounterOptions' <$>
(o .:? "field") <*> (o .:? "metric"))
instance ToJSON LogConfigCounterOptions where
toJSON LogConfigCounterOptions'{..}
= object
(catMaybes
[("field" .=) <$> _lccoField,
("metric" .=) <$> _lccoMetric])
data Operation = Operation'
{ _oTargetId :: !(Maybe (Textual Word64))
, _oStatus :: !(Maybe Text)
, _oInsertTime :: !(Maybe Text)
, _oProgress :: !(Maybe (Textual Int32))
, _oStartTime :: !(Maybe Text)
, _oKind :: !Text
, _oError :: !(Maybe OperationError)
, _oHTTPErrorMessage :: !(Maybe Text)
, _oZone :: !(Maybe Text)
, _oWarnings :: !(Maybe [OperationWarningsItem])
, _oHTTPErrorStatusCode :: !(Maybe (Textual Int32))
, _oUser :: !(Maybe Text)
, _oSelfLink :: !(Maybe Text)
, _oName :: !(Maybe Text)
, _oStatusMessage :: !(Maybe Text)
, _oCreationTimestamp :: !(Maybe Text)
, _oEndTime :: !(Maybe Text)
, _oId :: !(Maybe (Textual Word64))
, _oOperationType :: !(Maybe Text)
, _oRegion :: !(Maybe Text)
, _oDescription :: !(Maybe Text)
, _oTargetLink :: !(Maybe Text)
, _oClientOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operation
:: Operation
operation =
Operation'
{ _oTargetId = Nothing
, _oStatus = Nothing
, _oInsertTime = Nothing
, _oProgress = Nothing
, _oStartTime = Nothing
, _oKind = "deploymentmanager#operation"
, _oError = Nothing
, _oHTTPErrorMessage = Nothing
, _oZone = Nothing
, _oWarnings = Nothing
, _oHTTPErrorStatusCode = Nothing
, _oUser = Nothing
, _oSelfLink = Nothing
, _oName = Nothing
, _oStatusMessage = Nothing
, _oCreationTimestamp = Nothing
, _oEndTime = Nothing
, _oId = Nothing
, _oOperationType = Nothing
, _oRegion = Nothing
, _oDescription = Nothing
, _oTargetLink = Nothing
, _oClientOperationId = Nothing
}
oTargetId :: Lens' Operation (Maybe Word64)
oTargetId
= lens _oTargetId (\ s a -> s{_oTargetId = a}) .
mapping _Coerce
oStatus :: Lens' Operation (Maybe Text)
oStatus = lens _oStatus (\ s a -> s{_oStatus = a})
oInsertTime :: Lens' Operation (Maybe Text)
oInsertTime
= lens _oInsertTime (\ s a -> s{_oInsertTime = a})
oProgress :: Lens' Operation (Maybe Int32)
oProgress
= lens _oProgress (\ s a -> s{_oProgress = a}) .
mapping _Coerce
oStartTime :: Lens' Operation (Maybe Text)
oStartTime
= lens _oStartTime (\ s a -> s{_oStartTime = a})
oKind :: Lens' Operation Text
oKind = lens _oKind (\ s a -> s{_oKind = a})
oError :: Lens' Operation (Maybe OperationError)
oError = lens _oError (\ s a -> s{_oError = a})
oHTTPErrorMessage :: Lens' Operation (Maybe Text)
oHTTPErrorMessage
= lens _oHTTPErrorMessage
(\ s a -> s{_oHTTPErrorMessage = a})
oZone :: Lens' Operation (Maybe Text)
oZone = lens _oZone (\ s a -> s{_oZone = a})
oWarnings :: Lens' Operation [OperationWarningsItem]
oWarnings
= lens _oWarnings (\ s a -> s{_oWarnings = a}) .
_Default
. _Coerce
oHTTPErrorStatusCode :: Lens' Operation (Maybe Int32)
oHTTPErrorStatusCode
= lens _oHTTPErrorStatusCode
(\ s a -> s{_oHTTPErrorStatusCode = a})
. mapping _Coerce
oUser :: Lens' Operation (Maybe Text)
oUser = lens _oUser (\ s a -> s{_oUser = a})
oSelfLink :: Lens' Operation (Maybe Text)
oSelfLink
= lens _oSelfLink (\ s a -> s{_oSelfLink = a})
oName :: Lens' Operation (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
oStatusMessage :: Lens' Operation (Maybe Text)
oStatusMessage
= lens _oStatusMessage
(\ s a -> s{_oStatusMessage = a})
oCreationTimestamp :: Lens' Operation (Maybe Text)
oCreationTimestamp
= lens _oCreationTimestamp
(\ s a -> s{_oCreationTimestamp = a})
oEndTime :: Lens' Operation (Maybe Text)
oEndTime = lens _oEndTime (\ s a -> s{_oEndTime = a})
oId :: Lens' Operation (Maybe Word64)
oId
= lens _oId (\ s a -> s{_oId = a}) . mapping _Coerce
oOperationType :: Lens' Operation (Maybe Text)
oOperationType
= lens _oOperationType
(\ s a -> s{_oOperationType = a})
oRegion :: Lens' Operation (Maybe Text)
oRegion = lens _oRegion (\ s a -> s{_oRegion = a})
oDescription :: Lens' Operation (Maybe Text)
oDescription
= lens _oDescription (\ s a -> s{_oDescription = a})
oTargetLink :: Lens' Operation (Maybe Text)
oTargetLink
= lens _oTargetLink (\ s a -> s{_oTargetLink = a})
oClientOperationId :: Lens' Operation (Maybe Text)
oClientOperationId
= lens _oClientOperationId
(\ s a -> s{_oClientOperationId = a})
instance FromJSON Operation where
parseJSON
= withObject "Operation"
(\ o ->
Operation' <$>
(o .:? "targetId") <*> (o .:? "status") <*>
(o .:? "insertTime")
<*> (o .:? "progress")
<*> (o .:? "startTime")
<*> (o .:? "kind" .!= "deploymentmanager#operation")
<*> (o .:? "error")
<*> (o .:? "httpErrorMessage")
<*> (o .:? "zone")
<*> (o .:? "warnings" .!= mempty)
<*> (o .:? "httpErrorStatusCode")
<*> (o .:? "user")
<*> (o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "statusMessage")
<*> (o .:? "creationTimestamp")
<*> (o .:? "endTime")
<*> (o .:? "id")
<*> (o .:? "operationType")
<*> (o .:? "region")
<*> (o .:? "description")
<*> (o .:? "targetLink")
<*> (o .:? "clientOperationId"))
instance ToJSON Operation where
toJSON Operation'{..}
= object
(catMaybes
[("targetId" .=) <$> _oTargetId,
("status" .=) <$> _oStatus,
("insertTime" .=) <$> _oInsertTime,
("progress" .=) <$> _oProgress,
("startTime" .=) <$> _oStartTime,
Just ("kind" .= _oKind), ("error" .=) <$> _oError,
("httpErrorMessage" .=) <$> _oHTTPErrorMessage,
("zone" .=) <$> _oZone,
("warnings" .=) <$> _oWarnings,
("httpErrorStatusCode" .=) <$> _oHTTPErrorStatusCode,
("user" .=) <$> _oUser,
("selfLink" .=) <$> _oSelfLink,
("name" .=) <$> _oName,
("statusMessage" .=) <$> _oStatusMessage,
("creationTimestamp" .=) <$> _oCreationTimestamp,
("endTime" .=) <$> _oEndTime, ("id" .=) <$> _oId,
("operationType" .=) <$> _oOperationType,
("region" .=) <$> _oRegion,
("description" .=) <$> _oDescription,
("targetLink" .=) <$> _oTargetLink,
("clientOperationId" .=) <$> _oClientOperationId])
newtype TestPermissionsResponse = TestPermissionsResponse'
{ _tprPermissions :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
testPermissionsResponse
:: TestPermissionsResponse
testPermissionsResponse =
TestPermissionsResponse'
{ _tprPermissions = Nothing
}
tprPermissions :: Lens' TestPermissionsResponse [Text]
tprPermissions
= lens _tprPermissions
(\ s a -> s{_tprPermissions = a})
. _Default
. _Coerce
instance FromJSON TestPermissionsResponse where
parseJSON
= withObject "TestPermissionsResponse"
(\ o ->
TestPermissionsResponse' <$>
(o .:? "permissions" .!= mempty))
instance ToJSON TestPermissionsResponse where
toJSON TestPermissionsResponse'{..}
= object
(catMaybes [("permissions" .=) <$> _tprPermissions])
data ResourcesListResponse = ResourcesListResponse'
{ _rlrNextPageToken :: !(Maybe Text)
, _rlrResources :: !(Maybe [Resource])
} deriving (Eq,Show,Data,Typeable,Generic)
resourcesListResponse
:: ResourcesListResponse
resourcesListResponse =
ResourcesListResponse'
{ _rlrNextPageToken = Nothing
, _rlrResources = Nothing
}
rlrNextPageToken :: Lens' ResourcesListResponse (Maybe Text)
rlrNextPageToken
= lens _rlrNextPageToken
(\ s a -> s{_rlrNextPageToken = a})
rlrResources :: Lens' ResourcesListResponse [Resource]
rlrResources
= lens _rlrResources (\ s a -> s{_rlrResources = a})
. _Default
. _Coerce
instance FromJSON ResourcesListResponse where
parseJSON
= withObject "ResourcesListResponse"
(\ o ->
ResourcesListResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "resources" .!= mempty))
instance ToJSON ResourcesListResponse where
toJSON ResourcesListResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _rlrNextPageToken,
("resources" .=) <$> _rlrResources])
data DeploymentUpdate = DeploymentUpdate'
{ _duManifest :: !(Maybe Text)
, _duLabels :: !(Maybe [DeploymentUpdateLabelEntry])
} deriving (Eq,Show,Data,Typeable,Generic)
deploymentUpdate
:: DeploymentUpdate
deploymentUpdate =
DeploymentUpdate'
{ _duManifest = Nothing
, _duLabels = Nothing
}
duManifest :: Lens' DeploymentUpdate (Maybe Text)
duManifest
= lens _duManifest (\ s a -> s{_duManifest = a})
duLabels :: Lens' DeploymentUpdate [DeploymentUpdateLabelEntry]
duLabels
= lens _duLabels (\ s a -> s{_duLabels = a}) .
_Default
. _Coerce
instance FromJSON DeploymentUpdate where
parseJSON
= withObject "DeploymentUpdate"
(\ o ->
DeploymentUpdate' <$>
(o .:? "manifest") <*> (o .:? "labels" .!= mempty))
instance ToJSON DeploymentUpdate where
toJSON DeploymentUpdate'{..}
= object
(catMaybes
[("manifest" .=) <$> _duManifest,
("labels" .=) <$> _duLabels])
data ResourceUpdate = ResourceUpdate'
{ _ruState :: !(Maybe Text)
, _ruError :: !(Maybe ResourceUpdateError)
, _ruAccessControl :: !(Maybe ResourceAccessControl)
, _ruWarnings :: !(Maybe [ResourceUpdateWarningsItem])
, _ruIntent :: !(Maybe Text)
, _ruManifest :: !(Maybe Text)
, _ruFinalProperties :: !(Maybe Text)
, _ruProperties :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
resourceUpdate
:: ResourceUpdate
resourceUpdate =
ResourceUpdate'
{ _ruState = Nothing
, _ruError = Nothing
, _ruAccessControl = Nothing
, _ruWarnings = Nothing
, _ruIntent = Nothing
, _ruManifest = Nothing
, _ruFinalProperties = Nothing
, _ruProperties = Nothing
}
ruState :: Lens' ResourceUpdate (Maybe Text)
ruState = lens _ruState (\ s a -> s{_ruState = a})
ruError :: Lens' ResourceUpdate (Maybe ResourceUpdateError)
ruError = lens _ruError (\ s a -> s{_ruError = a})
ruAccessControl :: Lens' ResourceUpdate (Maybe ResourceAccessControl)
ruAccessControl
= lens _ruAccessControl
(\ s a -> s{_ruAccessControl = a})
ruWarnings :: Lens' ResourceUpdate [ResourceUpdateWarningsItem]
ruWarnings
= lens _ruWarnings (\ s a -> s{_ruWarnings = a}) .
_Default
. _Coerce
ruIntent :: Lens' ResourceUpdate (Maybe Text)
ruIntent = lens _ruIntent (\ s a -> s{_ruIntent = a})
ruManifest :: Lens' ResourceUpdate (Maybe Text)
ruManifest
= lens _ruManifest (\ s a -> s{_ruManifest = a})
ruFinalProperties :: Lens' ResourceUpdate (Maybe Text)
ruFinalProperties
= lens _ruFinalProperties
(\ s a -> s{_ruFinalProperties = a})
ruProperties :: Lens' ResourceUpdate (Maybe Text)
ruProperties
= lens _ruProperties (\ s a -> s{_ruProperties = a})
instance FromJSON ResourceUpdate where
parseJSON
= withObject "ResourceUpdate"
(\ o ->
ResourceUpdate' <$>
(o .:? "state") <*> (o .:? "error") <*>
(o .:? "accessControl")
<*> (o .:? "warnings" .!= mempty)
<*> (o .:? "intent")
<*> (o .:? "manifest")
<*> (o .:? "finalProperties")
<*> (o .:? "properties"))
instance ToJSON ResourceUpdate where
toJSON ResourceUpdate'{..}
= object
(catMaybes
[("state" .=) <$> _ruState,
("error" .=) <$> _ruError,
("accessControl" .=) <$> _ruAccessControl,
("warnings" .=) <$> _ruWarnings,
("intent" .=) <$> _ruIntent,
("manifest" .=) <$> _ruManifest,
("finalProperties" .=) <$> _ruFinalProperties,
("properties" .=) <$> _ruProperties])
data DeploymentLabelEntry = DeploymentLabelEntry'
{ _dleValue :: !(Maybe Text)
, _dleKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
deploymentLabelEntry
:: DeploymentLabelEntry
deploymentLabelEntry =
DeploymentLabelEntry'
{ _dleValue = Nothing
, _dleKey = Nothing
}
dleValue :: Lens' DeploymentLabelEntry (Maybe Text)
dleValue = lens _dleValue (\ s a -> s{_dleValue = a})
dleKey :: Lens' DeploymentLabelEntry (Maybe Text)
dleKey = lens _dleKey (\ s a -> s{_dleKey = a})
instance FromJSON DeploymentLabelEntry where
parseJSON
= withObject "DeploymentLabelEntry"
(\ o ->
DeploymentLabelEntry' <$>
(o .:? "value") <*> (o .:? "key"))
instance ToJSON DeploymentLabelEntry where
toJSON DeploymentLabelEntry'{..}
= object
(catMaybes
[("value" .=) <$> _dleValue, ("key" .=) <$> _dleKey])
data Rule = Rule'
{ _rAction :: !(Maybe Text)
, _rNotIns :: !(Maybe [Text])
, _rIns :: !(Maybe [Text])
, _rLogConfigs :: !(Maybe [LogConfig])
, _rConditions :: !(Maybe [Condition])
, _rPermissions :: !(Maybe [Text])
, _rDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
rule
:: Rule
rule =
Rule'
{ _rAction = Nothing
, _rNotIns = Nothing
, _rIns = Nothing
, _rLogConfigs = Nothing
, _rConditions = Nothing
, _rPermissions = Nothing
, _rDescription = Nothing
}
rAction :: Lens' Rule (Maybe Text)
rAction = lens _rAction (\ s a -> s{_rAction = a})
rNotIns :: Lens' Rule [Text]
rNotIns
= lens _rNotIns (\ s a -> s{_rNotIns = a}) . _Default
. _Coerce
rIns :: Lens' Rule [Text]
rIns
= lens _rIns (\ s a -> s{_rIns = a}) . _Default .
_Coerce
rLogConfigs :: Lens' Rule [LogConfig]
rLogConfigs
= lens _rLogConfigs (\ s a -> s{_rLogConfigs = 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
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 .:? "notIns" .!= mempty) <*>
(o .:? "ins" .!= mempty)
<*> (o .:? "logConfigs" .!= mempty)
<*> (o .:? "conditions" .!= mempty)
<*> (o .:? "permissions" .!= mempty)
<*> (o .:? "description"))
instance ToJSON Rule where
toJSON Rule'{..}
= object
(catMaybes
[("action" .=) <$> _rAction,
("notIns" .=) <$> _rNotIns, ("ins" .=) <$> _rIns,
("logConfigs" .=) <$> _rLogConfigs,
("conditions" .=) <$> _rConditions,
("permissions" .=) <$> _rPermissions,
("description" .=) <$> _rDescription])
newtype TestPermissionsRequest = TestPermissionsRequest'
{ _tPermissions :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
testPermissionsRequest
:: TestPermissionsRequest
testPermissionsRequest =
TestPermissionsRequest'
{ _tPermissions = Nothing
}
tPermissions :: Lens' TestPermissionsRequest [Text]
tPermissions
= lens _tPermissions (\ s a -> s{_tPermissions = a})
. _Default
. _Coerce
instance FromJSON TestPermissionsRequest where
parseJSON
= withObject "TestPermissionsRequest"
(\ o ->
TestPermissionsRequest' <$>
(o .:? "permissions" .!= mempty))
instance ToJSON TestPermissionsRequest where
toJSON TestPermissionsRequest'{..}
= object
(catMaybes [("permissions" .=) <$> _tPermissions])
data Manifest = Manifest'
{ _mInsertTime :: !(Maybe Text)
, _mLayout :: !(Maybe Text)
, _mConfig :: !(Maybe ConfigFile)
, _mExpandedConfig :: !(Maybe Text)
, _mImports :: !(Maybe [ImportFile])
, _mSelfLink :: !(Maybe Text)
, _mName :: !(Maybe Text)
, _mId :: !(Maybe (Textual Word64))
} deriving (Eq,Show,Data,Typeable,Generic)
manifest
:: Manifest
manifest =
Manifest'
{ _mInsertTime = Nothing
, _mLayout = Nothing
, _mConfig = Nothing
, _mExpandedConfig = Nothing
, _mImports = Nothing
, _mSelfLink = Nothing
, _mName = Nothing
, _mId = Nothing
}
mInsertTime :: Lens' Manifest (Maybe Text)
mInsertTime
= lens _mInsertTime (\ s a -> s{_mInsertTime = a})
mLayout :: Lens' Manifest (Maybe Text)
mLayout = lens _mLayout (\ s a -> s{_mLayout = a})
mConfig :: Lens' Manifest (Maybe ConfigFile)
mConfig = lens _mConfig (\ s a -> s{_mConfig = a})
mExpandedConfig :: Lens' Manifest (Maybe Text)
mExpandedConfig
= lens _mExpandedConfig
(\ s a -> s{_mExpandedConfig = a})
mImports :: Lens' Manifest [ImportFile]
mImports
= lens _mImports (\ s a -> s{_mImports = a}) .
_Default
. _Coerce
mSelfLink :: Lens' Manifest (Maybe Text)
mSelfLink
= lens _mSelfLink (\ s a -> s{_mSelfLink = a})
mName :: Lens' Manifest (Maybe Text)
mName = lens _mName (\ s a -> s{_mName = a})
mId :: Lens' Manifest (Maybe Word64)
mId
= lens _mId (\ s a -> s{_mId = a}) . mapping _Coerce
instance FromJSON Manifest where
parseJSON
= withObject "Manifest"
(\ o ->
Manifest' <$>
(o .:? "insertTime") <*> (o .:? "layout") <*>
(o .:? "config")
<*> (o .:? "expandedConfig")
<*> (o .:? "imports" .!= mempty)
<*> (o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "id"))
instance ToJSON Manifest where
toJSON Manifest'{..}
= object
(catMaybes
[("insertTime" .=) <$> _mInsertTime,
("layout" .=) <$> _mLayout,
("config" .=) <$> _mConfig,
("expandedConfig" .=) <$> _mExpandedConfig,
("imports" .=) <$> _mImports,
("selfLink" .=) <$> _mSelfLink,
("name" .=) <$> _mName, ("id" .=) <$> _mId])
data ResourceUpdateWarningsItem = ResourceUpdateWarningsItem'
{ _ruwiData :: !(Maybe [ResourceUpdateWarningsItemDataItem])
, _ruwiCode :: !(Maybe Text)
, _ruwiMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
resourceUpdateWarningsItem
:: ResourceUpdateWarningsItem
resourceUpdateWarningsItem =
ResourceUpdateWarningsItem'
{ _ruwiData = Nothing
, _ruwiCode = Nothing
, _ruwiMessage = Nothing
}
ruwiData :: Lens' ResourceUpdateWarningsItem [ResourceUpdateWarningsItemDataItem]
ruwiData
= lens _ruwiData (\ s a -> s{_ruwiData = a}) .
_Default
. _Coerce
ruwiCode :: Lens' ResourceUpdateWarningsItem (Maybe Text)
ruwiCode = lens _ruwiCode (\ s a -> s{_ruwiCode = a})
ruwiMessage :: Lens' ResourceUpdateWarningsItem (Maybe Text)
ruwiMessage
= lens _ruwiMessage (\ s a -> s{_ruwiMessage = a})
instance FromJSON ResourceUpdateWarningsItem where
parseJSON
= withObject "ResourceUpdateWarningsItem"
(\ o ->
ResourceUpdateWarningsItem' <$>
(o .:? "data" .!= mempty) <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON ResourceUpdateWarningsItem where
toJSON ResourceUpdateWarningsItem'{..}
= object
(catMaybes
[("data" .=) <$> _ruwiData,
("code" .=) <$> _ruwiCode,
("message" .=) <$> _ruwiMessage])
newtype DeploymentsCancelPreviewRequest = DeploymentsCancelPreviewRequest'
{ _dcprFingerprint :: Maybe Bytes
} deriving (Eq,Show,Data,Typeable,Generic)
deploymentsCancelPreviewRequest
:: DeploymentsCancelPreviewRequest
deploymentsCancelPreviewRequest =
DeploymentsCancelPreviewRequest'
{ _dcprFingerprint = Nothing
}
dcprFingerprint :: Lens' DeploymentsCancelPreviewRequest (Maybe ByteString)
dcprFingerprint
= lens _dcprFingerprint
(\ s a -> s{_dcprFingerprint = a})
. mapping _Bytes
instance FromJSON DeploymentsCancelPreviewRequest
where
parseJSON
= withObject "DeploymentsCancelPreviewRequest"
(\ o ->
DeploymentsCancelPreviewRequest' <$>
(o .:? "fingerprint"))
instance ToJSON DeploymentsCancelPreviewRequest where
toJSON DeploymentsCancelPreviewRequest'{..}
= object
(catMaybes [("fingerprint" .=) <$> _dcprFingerprint])
data Resource = Resource'
{ _rInsertTime :: !(Maybe Text)
, _rAccessControl :: !(Maybe ResourceAccessControl)
, _rURL :: !(Maybe Text)
, _rWarnings :: !(Maybe [ResourceWarningsItem])
, _rUpdateTime :: !(Maybe Text)
, _rName :: !(Maybe Text)
, _rManifest :: !(Maybe Text)
, _rFinalProperties :: !(Maybe Text)
, _rId :: !(Maybe (Textual Word64))
, _rType :: !(Maybe Text)
, _rUpdate :: !(Maybe ResourceUpdate)
, _rProperties :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
resource
:: Resource
resource =
Resource'
{ _rInsertTime = Nothing
, _rAccessControl = Nothing
, _rURL = Nothing
, _rWarnings = Nothing
, _rUpdateTime = Nothing
, _rName = Nothing
, _rManifest = Nothing
, _rFinalProperties = Nothing
, _rId = Nothing
, _rType = Nothing
, _rUpdate = Nothing
, _rProperties = Nothing
}
rInsertTime :: Lens' Resource (Maybe Text)
rInsertTime
= lens _rInsertTime (\ s a -> s{_rInsertTime = a})
rAccessControl :: Lens' Resource (Maybe ResourceAccessControl)
rAccessControl
= lens _rAccessControl
(\ s a -> s{_rAccessControl = a})
rURL :: Lens' Resource (Maybe Text)
rURL = lens _rURL (\ s a -> s{_rURL = a})
rWarnings :: Lens' Resource [ResourceWarningsItem]
rWarnings
= lens _rWarnings (\ s a -> s{_rWarnings = a}) .
_Default
. _Coerce
rUpdateTime :: Lens' Resource (Maybe Text)
rUpdateTime
= lens _rUpdateTime (\ s a -> s{_rUpdateTime = a})
rName :: Lens' Resource (Maybe Text)
rName = lens _rName (\ s a -> s{_rName = a})
rManifest :: Lens' Resource (Maybe Text)
rManifest
= lens _rManifest (\ s a -> s{_rManifest = a})
rFinalProperties :: Lens' Resource (Maybe Text)
rFinalProperties
= lens _rFinalProperties
(\ s a -> s{_rFinalProperties = a})
rId :: Lens' Resource (Maybe Word64)
rId
= lens _rId (\ s a -> s{_rId = a}) . mapping _Coerce
rType :: Lens' Resource (Maybe Text)
rType = lens _rType (\ s a -> s{_rType = a})
rUpdate :: Lens' Resource (Maybe ResourceUpdate)
rUpdate = lens _rUpdate (\ s a -> s{_rUpdate = a})
rProperties :: Lens' Resource (Maybe Text)
rProperties
= lens _rProperties (\ s a -> s{_rProperties = a})
instance FromJSON Resource where
parseJSON
= withObject "Resource"
(\ o ->
Resource' <$>
(o .:? "insertTime") <*> (o .:? "accessControl") <*>
(o .:? "url")
<*> (o .:? "warnings" .!= mempty)
<*> (o .:? "updateTime")
<*> (o .:? "name")
<*> (o .:? "manifest")
<*> (o .:? "finalProperties")
<*> (o .:? "id")
<*> (o .:? "type")
<*> (o .:? "update")
<*> (o .:? "properties"))
instance ToJSON Resource where
toJSON Resource'{..}
= object
(catMaybes
[("insertTime" .=) <$> _rInsertTime,
("accessControl" .=) <$> _rAccessControl,
("url" .=) <$> _rURL, ("warnings" .=) <$> _rWarnings,
("updateTime" .=) <$> _rUpdateTime,
("name" .=) <$> _rName,
("manifest" .=) <$> _rManifest,
("finalProperties" .=) <$> _rFinalProperties,
("id" .=) <$> _rId, ("type" .=) <$> _rType,
("update" .=) <$> _rUpdate,
("properties" .=) <$> _rProperties])
data DeploymentUpdateLabelEntry = DeploymentUpdateLabelEntry'
{ _duleValue :: !(Maybe Text)
, _duleKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
deploymentUpdateLabelEntry
:: DeploymentUpdateLabelEntry
deploymentUpdateLabelEntry =
DeploymentUpdateLabelEntry'
{ _duleValue = Nothing
, _duleKey = Nothing
}
duleValue :: Lens' DeploymentUpdateLabelEntry (Maybe Text)
duleValue
= lens _duleValue (\ s a -> s{_duleValue = a})
duleKey :: Lens' DeploymentUpdateLabelEntry (Maybe Text)
duleKey = lens _duleKey (\ s a -> s{_duleKey = a})
instance FromJSON DeploymentUpdateLabelEntry where
parseJSON
= withObject "DeploymentUpdateLabelEntry"
(\ o ->
DeploymentUpdateLabelEntry' <$>
(o .:? "value") <*> (o .:? "key"))
instance ToJSON DeploymentUpdateLabelEntry where
toJSON DeploymentUpdateLabelEntry'{..}
= object
(catMaybes
[("value" .=) <$> _duleValue,
("key" .=) <$> _duleKey])
data ResourceUpdateErrorErrorsItem = ResourceUpdateErrorErrorsItem'
{ _rueeiLocation :: !(Maybe Text)
, _rueeiCode :: !(Maybe Text)
, _rueeiMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
resourceUpdateErrorErrorsItem
:: ResourceUpdateErrorErrorsItem
resourceUpdateErrorErrorsItem =
ResourceUpdateErrorErrorsItem'
{ _rueeiLocation = Nothing
, _rueeiCode = Nothing
, _rueeiMessage = Nothing
}
rueeiLocation :: Lens' ResourceUpdateErrorErrorsItem (Maybe Text)
rueeiLocation
= lens _rueeiLocation
(\ s a -> s{_rueeiLocation = a})
rueeiCode :: Lens' ResourceUpdateErrorErrorsItem (Maybe Text)
rueeiCode
= lens _rueeiCode (\ s a -> s{_rueeiCode = a})
rueeiMessage :: Lens' ResourceUpdateErrorErrorsItem (Maybe Text)
rueeiMessage
= lens _rueeiMessage (\ s a -> s{_rueeiMessage = a})
instance FromJSON ResourceUpdateErrorErrorsItem where
parseJSON
= withObject "ResourceUpdateErrorErrorsItem"
(\ o ->
ResourceUpdateErrorErrorsItem' <$>
(o .:? "location") <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON ResourceUpdateErrorErrorsItem where
toJSON ResourceUpdateErrorErrorsItem'{..}
= object
(catMaybes
[("location" .=) <$> _rueeiLocation,
("code" .=) <$> _rueeiCode,
("message" .=) <$> _rueeiMessage])
data ManifestsListResponse = ManifestsListResponse'
{ _mlrNextPageToken :: !(Maybe Text)
, _mlrManifests :: !(Maybe [Manifest])
} deriving (Eq,Show,Data,Typeable,Generic)
manifestsListResponse
:: ManifestsListResponse
manifestsListResponse =
ManifestsListResponse'
{ _mlrNextPageToken = Nothing
, _mlrManifests = Nothing
}
mlrNextPageToken :: Lens' ManifestsListResponse (Maybe Text)
mlrNextPageToken
= lens _mlrNextPageToken
(\ s a -> s{_mlrNextPageToken = a})
mlrManifests :: Lens' ManifestsListResponse [Manifest]
mlrManifests
= lens _mlrManifests (\ s a -> s{_mlrManifests = a})
. _Default
. _Coerce
instance FromJSON ManifestsListResponse where
parseJSON
= withObject "ManifestsListResponse"
(\ o ->
ManifestsListResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "manifests" .!= mempty))
instance ToJSON ManifestsListResponse where
toJSON ManifestsListResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _mlrNextPageToken,
("manifests" .=) <$> _mlrManifests])
newtype OperationError = OperationError'
{ _oeErrors :: Maybe [OperationErrorErrorsItem]
} deriving (Eq,Show,Data,Typeable,Generic)
operationError
:: OperationError
operationError =
OperationError'
{ _oeErrors = Nothing
}
oeErrors :: Lens' OperationError [OperationErrorErrorsItem]
oeErrors
= lens _oeErrors (\ s a -> s{_oeErrors = a}) .
_Default
. _Coerce
instance FromJSON OperationError where
parseJSON
= withObject "OperationError"
(\ o ->
OperationError' <$> (o .:? "errors" .!= mempty))
instance ToJSON OperationError where
toJSON OperationError'{..}
= object (catMaybes [("errors" .=) <$> _oeErrors])
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])
data Type = Type'
{ _tInsertTime :: !(Maybe Text)
, _tOperation :: !(Maybe Operation)
, _tSelfLink :: !(Maybe Text)
, _tName :: !(Maybe Text)
, _tId :: !(Maybe (Textual Word64))
} deriving (Eq,Show,Data,Typeable,Generic)
type'
:: Type
type' =
Type'
{ _tInsertTime = Nothing
, _tOperation = Nothing
, _tSelfLink = Nothing
, _tName = Nothing
, _tId = Nothing
}
tInsertTime :: Lens' Type (Maybe Text)
tInsertTime
= lens _tInsertTime (\ s a -> s{_tInsertTime = a})
tOperation :: Lens' Type (Maybe Operation)
tOperation
= lens _tOperation (\ s a -> s{_tOperation = a})
tSelfLink :: Lens' Type (Maybe Text)
tSelfLink
= lens _tSelfLink (\ s a -> s{_tSelfLink = a})
tName :: Lens' Type (Maybe Text)
tName = lens _tName (\ s a -> s{_tName = a})
tId :: Lens' Type (Maybe Word64)
tId
= lens _tId (\ s a -> s{_tId = a}) . mapping _Coerce
instance FromJSON Type where
parseJSON
= withObject "Type"
(\ o ->
Type' <$>
(o .:? "insertTime") <*> (o .:? "operation") <*>
(o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "id"))
instance ToJSON Type where
toJSON Type'{..}
= object
(catMaybes
[("insertTime" .=) <$> _tInsertTime,
("operation" .=) <$> _tOperation,
("selfLink" .=) <$> _tSelfLink,
("name" .=) <$> _tName, ("id" .=) <$> _tId])
data ImportFile = ImportFile'
{ _ifContent :: !(Maybe Text)
, _ifName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
importFile
:: ImportFile
importFile =
ImportFile'
{ _ifContent = Nothing
, _ifName = Nothing
}
ifContent :: Lens' ImportFile (Maybe Text)
ifContent
= lens _ifContent (\ s a -> s{_ifContent = a})
ifName :: Lens' ImportFile (Maybe Text)
ifName = lens _ifName (\ s a -> s{_ifName = a})
instance FromJSON ImportFile where
parseJSON
= withObject "ImportFile"
(\ o ->
ImportFile' <$> (o .:? "content") <*> (o .:? "name"))
instance ToJSON ImportFile where
toJSON ImportFile'{..}
= object
(catMaybes
[("content" .=) <$> _ifContent,
("name" .=) <$> _ifName])
data OperationErrorErrorsItem = OperationErrorErrorsItem'
{ _oeeiLocation :: !(Maybe Text)
, _oeeiCode :: !(Maybe Text)
, _oeeiMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationErrorErrorsItem
:: OperationErrorErrorsItem
operationErrorErrorsItem =
OperationErrorErrorsItem'
{ _oeeiLocation = Nothing
, _oeeiCode = Nothing
, _oeeiMessage = Nothing
}
oeeiLocation :: Lens' OperationErrorErrorsItem (Maybe Text)
oeeiLocation
= lens _oeeiLocation (\ s a -> s{_oeeiLocation = a})
oeeiCode :: Lens' OperationErrorErrorsItem (Maybe Text)
oeeiCode = lens _oeeiCode (\ s a -> s{_oeeiCode = a})
oeeiMessage :: Lens' OperationErrorErrorsItem (Maybe Text)
oeeiMessage
= lens _oeeiMessage (\ s a -> s{_oeeiMessage = a})
instance FromJSON OperationErrorErrorsItem where
parseJSON
= withObject "OperationErrorErrorsItem"
(\ o ->
OperationErrorErrorsItem' <$>
(o .:? "location") <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON OperationErrorErrorsItem where
toJSON OperationErrorErrorsItem'{..}
= object
(catMaybes
[("location" .=) <$> _oeeiLocation,
("code" .=) <$> _oeeiCode,
("message" .=) <$> _oeeiMessage])
newtype DeploymentsStopRequest = DeploymentsStopRequest'
{ _dsrFingerprint :: Maybe Bytes
} deriving (Eq,Show,Data,Typeable,Generic)
deploymentsStopRequest
:: DeploymentsStopRequest
deploymentsStopRequest =
DeploymentsStopRequest'
{ _dsrFingerprint = Nothing
}
dsrFingerprint :: Lens' DeploymentsStopRequest (Maybe ByteString)
dsrFingerprint
= lens _dsrFingerprint
(\ s a -> s{_dsrFingerprint = a})
. mapping _Bytes
instance FromJSON DeploymentsStopRequest where
parseJSON
= withObject "DeploymentsStopRequest"
(\ o ->
DeploymentsStopRequest' <$> (o .:? "fingerprint"))
instance ToJSON DeploymentsStopRequest where
toJSON DeploymentsStopRequest'{..}
= object
(catMaybes [("fingerprint" .=) <$> _dsrFingerprint])
data ResourceWarningsItemDataItem = ResourceWarningsItemDataItem'
{ _rwidiValue :: !(Maybe Text)
, _rwidiKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
resourceWarningsItemDataItem
:: ResourceWarningsItemDataItem
resourceWarningsItemDataItem =
ResourceWarningsItemDataItem'
{ _rwidiValue = Nothing
, _rwidiKey = Nothing
}
rwidiValue :: Lens' ResourceWarningsItemDataItem (Maybe Text)
rwidiValue
= lens _rwidiValue (\ s a -> s{_rwidiValue = a})
rwidiKey :: Lens' ResourceWarningsItemDataItem (Maybe Text)
rwidiKey = lens _rwidiKey (\ s a -> s{_rwidiKey = a})
instance FromJSON ResourceWarningsItemDataItem where
parseJSON
= withObject "ResourceWarningsItemDataItem"
(\ o ->
ResourceWarningsItemDataItem' <$>
(o .:? "value") <*> (o .:? "key"))
instance ToJSON ResourceWarningsItemDataItem where
toJSON ResourceWarningsItemDataItem'{..}
= object
(catMaybes
[("value" .=) <$> _rwidiValue,
("key" .=) <$> _rwidiKey])
data AuditLogConfig = AuditLogConfig'
{ _alcLogType :: !(Maybe Text)
, _alcExemptedMembers :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
auditLogConfig
:: AuditLogConfig
auditLogConfig =
AuditLogConfig'
{ _alcLogType = Nothing
, _alcExemptedMembers = Nothing
}
alcLogType :: Lens' AuditLogConfig (Maybe Text)
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])
newtype ResourceUpdateError = ResourceUpdateError'
{ _rueErrors :: Maybe [ResourceUpdateErrorErrorsItem]
} deriving (Eq,Show,Data,Typeable,Generic)
resourceUpdateError
:: ResourceUpdateError
resourceUpdateError =
ResourceUpdateError'
{ _rueErrors = Nothing
}
rueErrors :: Lens' ResourceUpdateError [ResourceUpdateErrorErrorsItem]
rueErrors
= lens _rueErrors (\ s a -> s{_rueErrors = a}) .
_Default
. _Coerce
instance FromJSON ResourceUpdateError where
parseJSON
= withObject "ResourceUpdateError"
(\ o ->
ResourceUpdateError' <$> (o .:? "errors" .!= mempty))
instance ToJSON ResourceUpdateError where
toJSON ResourceUpdateError'{..}
= object (catMaybes [("errors" .=) <$> _rueErrors])
data Condition = Condition'
{ _cOp :: !(Maybe Text)
, _cIAM :: !(Maybe Text)
, _cValues :: !(Maybe [Text])
, _cValue :: !(Maybe Text)
, _cSys :: !(Maybe Text)
, _cSvc :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
condition
:: Condition
condition =
Condition'
{ _cOp = Nothing
, _cIAM = Nothing
, _cValues = Nothing
, _cValue = Nothing
, _cSys = Nothing
, _cSvc = Nothing
}
cOp :: Lens' Condition (Maybe Text)
cOp = lens _cOp (\ s a -> s{_cOp = a})
cIAM :: Lens' Condition (Maybe Text)
cIAM = lens _cIAM (\ s a -> s{_cIAM = a})
cValues :: Lens' Condition [Text]
cValues
= lens _cValues (\ s a -> s{_cValues = a}) . _Default
. _Coerce
cValue :: Lens' Condition (Maybe Text)
cValue = lens _cValue (\ s a -> s{_cValue = a})
cSys :: Lens' Condition (Maybe Text)
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 .:? "value")
<*> (o .:? "sys")
<*> (o .:? "svc"))
instance ToJSON Condition where
toJSON Condition'{..}
= object
(catMaybes
[("op" .=) <$> _cOp, ("iam" .=) <$> _cIAM,
("values" .=) <$> _cValues, ("value" .=) <$> _cValue,
("sys" .=) <$> _cSys, ("svc" .=) <$> _cSvc])
data DeploymentsListResponse = DeploymentsListResponse'
{ _dlrNextPageToken :: !(Maybe Text)
, _dlrDeployments :: !(Maybe [Deployment])
} deriving (Eq,Show,Data,Typeable,Generic)
deploymentsListResponse
:: DeploymentsListResponse
deploymentsListResponse =
DeploymentsListResponse'
{ _dlrNextPageToken = Nothing
, _dlrDeployments = Nothing
}
dlrNextPageToken :: Lens' DeploymentsListResponse (Maybe Text)
dlrNextPageToken
= lens _dlrNextPageToken
(\ s a -> s{_dlrNextPageToken = a})
dlrDeployments :: Lens' DeploymentsListResponse [Deployment]
dlrDeployments
= lens _dlrDeployments
(\ s a -> s{_dlrDeployments = a})
. _Default
. _Coerce
instance FromJSON DeploymentsListResponse where
parseJSON
= withObject "DeploymentsListResponse"
(\ o ->
DeploymentsListResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "deployments" .!= mempty))
instance ToJSON DeploymentsListResponse where
toJSON DeploymentsListResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _dlrNextPageToken,
("deployments" .=) <$> _dlrDeployments])
data ResourceWarningsItem = ResourceWarningsItem'
{ _rwiData :: !(Maybe [ResourceWarningsItemDataItem])
, _rwiCode :: !(Maybe Text)
, _rwiMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
resourceWarningsItem
:: ResourceWarningsItem
resourceWarningsItem =
ResourceWarningsItem'
{ _rwiData = Nothing
, _rwiCode = Nothing
, _rwiMessage = Nothing
}
rwiData :: Lens' ResourceWarningsItem [ResourceWarningsItemDataItem]
rwiData
= lens _rwiData (\ s a -> s{_rwiData = a}) . _Default
. _Coerce
rwiCode :: Lens' ResourceWarningsItem (Maybe Text)
rwiCode = lens _rwiCode (\ s a -> s{_rwiCode = a})
rwiMessage :: Lens' ResourceWarningsItem (Maybe Text)
rwiMessage
= lens _rwiMessage (\ s a -> s{_rwiMessage = a})
instance FromJSON ResourceWarningsItem where
parseJSON
= withObject "ResourceWarningsItem"
(\ o ->
ResourceWarningsItem' <$>
(o .:? "data" .!= mempty) <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON ResourceWarningsItem where
toJSON ResourceWarningsItem'{..}
= object
(catMaybes
[("data" .=) <$> _rwiData, ("code" .=) <$> _rwiCode,
("message" .=) <$> _rwiMessage])
newtype LogConfig = LogConfig'
{ _lcCounter :: Maybe LogConfigCounterOptions
} deriving (Eq,Show,Data,Typeable,Generic)
logConfig
:: LogConfig
logConfig =
LogConfig'
{ _lcCounter = Nothing
}
lcCounter :: Lens' LogConfig (Maybe LogConfigCounterOptions)
lcCounter
= lens _lcCounter (\ s a -> s{_lcCounter = a})
instance FromJSON LogConfig where
parseJSON
= withObject "LogConfig"
(\ o -> LogConfig' <$> (o .:? "counter"))
instance ToJSON LogConfig where
toJSON LogConfig'{..}
= object (catMaybes [("counter" .=) <$> _lcCounter])
newtype ResourceAccessControl = ResourceAccessControl'
{ _racGcpIAMPolicy :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
resourceAccessControl
:: ResourceAccessControl
resourceAccessControl =
ResourceAccessControl'
{ _racGcpIAMPolicy = Nothing
}
racGcpIAMPolicy :: Lens' ResourceAccessControl (Maybe Text)
racGcpIAMPolicy
= lens _racGcpIAMPolicy
(\ s a -> s{_racGcpIAMPolicy = a})
instance FromJSON ResourceAccessControl where
parseJSON
= withObject "ResourceAccessControl"
(\ o ->
ResourceAccessControl' <$> (o .:? "gcpIamPolicy"))
instance ToJSON ResourceAccessControl where
toJSON ResourceAccessControl'{..}
= object
(catMaybes
[("gcpIamPolicy" .=) <$> _racGcpIAMPolicy])
data TargetConfiguration = TargetConfiguration'
{ _tcConfig :: !(Maybe ConfigFile)
, _tcImports :: !(Maybe [ImportFile])
} deriving (Eq,Show,Data,Typeable,Generic)
targetConfiguration
:: TargetConfiguration
targetConfiguration =
TargetConfiguration'
{ _tcConfig = Nothing
, _tcImports = Nothing
}
tcConfig :: Lens' TargetConfiguration (Maybe ConfigFile)
tcConfig = lens _tcConfig (\ s a -> s{_tcConfig = a})
tcImports :: Lens' TargetConfiguration [ImportFile]
tcImports
= lens _tcImports (\ s a -> s{_tcImports = a}) .
_Default
. _Coerce
instance FromJSON TargetConfiguration where
parseJSON
= withObject "TargetConfiguration"
(\ o ->
TargetConfiguration' <$>
(o .:? "config") <*> (o .:? "imports" .!= mempty))
instance ToJSON TargetConfiguration where
toJSON TargetConfiguration'{..}
= object
(catMaybes
[("config" .=) <$> _tcConfig,
("imports" .=) <$> _tcImports])
data OperationWarningsItem = OperationWarningsItem'
{ _owiData :: !(Maybe [OperationWarningsItemDataItem])
, _owiCode :: !(Maybe Text)
, _owiMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationWarningsItem
:: OperationWarningsItem
operationWarningsItem =
OperationWarningsItem'
{ _owiData = Nothing
, _owiCode = Nothing
, _owiMessage = Nothing
}
owiData :: Lens' OperationWarningsItem [OperationWarningsItemDataItem]
owiData
= lens _owiData (\ s a -> s{_owiData = a}) . _Default
. _Coerce
owiCode :: Lens' OperationWarningsItem (Maybe Text)
owiCode = lens _owiCode (\ s a -> s{_owiCode = a})
owiMessage :: Lens' OperationWarningsItem (Maybe Text)
owiMessage
= lens _owiMessage (\ s a -> s{_owiMessage = a})
instance FromJSON OperationWarningsItem where
parseJSON
= withObject "OperationWarningsItem"
(\ o ->
OperationWarningsItem' <$>
(o .:? "data" .!= mempty) <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON OperationWarningsItem where
toJSON OperationWarningsItem'{..}
= object
(catMaybes
[("data" .=) <$> _owiData, ("code" .=) <$> _owiCode,
("message" .=) <$> _owiMessage])
data Binding = Binding'
{ _bMembers :: !(Maybe [Text])
, _bRole :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
binding
:: Binding
binding =
Binding'
{ _bMembers = Nothing
, _bRole = 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})
instance FromJSON Binding where
parseJSON
= withObject "Binding"
(\ o ->
Binding' <$>
(o .:? "members" .!= mempty) <*> (o .:? "role"))
instance ToJSON Binding where
toJSON Binding'{..}
= object
(catMaybes
[("members" .=) <$> _bMembers,
("role" .=) <$> _bRole])
data Deployment = Deployment'
{ _dInsertTime :: !(Maybe Text)
, _dOperation :: !(Maybe Operation)
, _dFingerprint :: !(Maybe Bytes)
, _dSelfLink :: !(Maybe Text)
, _dName :: !(Maybe Text)
, _dManifest :: !(Maybe Text)
, _dId :: !(Maybe (Textual Word64))
, _dLabels :: !(Maybe [DeploymentLabelEntry])
, _dDescription :: !(Maybe Text)
, _dUpdate :: !(Maybe DeploymentUpdate)
, _dTarget :: !(Maybe TargetConfiguration)
} deriving (Eq,Show,Data,Typeable,Generic)
deployment
:: Deployment
deployment =
Deployment'
{ _dInsertTime = Nothing
, _dOperation = Nothing
, _dFingerprint = Nothing
, _dSelfLink = Nothing
, _dName = Nothing
, _dManifest = Nothing
, _dId = Nothing
, _dLabels = Nothing
, _dDescription = Nothing
, _dUpdate = Nothing
, _dTarget = Nothing
}
dInsertTime :: Lens' Deployment (Maybe Text)
dInsertTime
= lens _dInsertTime (\ s a -> s{_dInsertTime = a})
dOperation :: Lens' Deployment (Maybe Operation)
dOperation
= lens _dOperation (\ s a -> s{_dOperation = a})
dFingerprint :: Lens' Deployment (Maybe ByteString)
dFingerprint
= lens _dFingerprint (\ s a -> s{_dFingerprint = a})
. mapping _Bytes
dSelfLink :: Lens' Deployment (Maybe Text)
dSelfLink
= lens _dSelfLink (\ s a -> s{_dSelfLink = a})
dName :: Lens' Deployment (Maybe Text)
dName = lens _dName (\ s a -> s{_dName = a})
dManifest :: Lens' Deployment (Maybe Text)
dManifest
= lens _dManifest (\ s a -> s{_dManifest = a})
dId :: Lens' Deployment (Maybe Word64)
dId
= lens _dId (\ s a -> s{_dId = a}) . mapping _Coerce
dLabels :: Lens' Deployment [DeploymentLabelEntry]
dLabels
= lens _dLabels (\ s a -> s{_dLabels = a}) . _Default
. _Coerce
dDescription :: Lens' Deployment (Maybe Text)
dDescription
= lens _dDescription (\ s a -> s{_dDescription = a})
dUpdate :: Lens' Deployment (Maybe DeploymentUpdate)
dUpdate = lens _dUpdate (\ s a -> s{_dUpdate = a})
dTarget :: Lens' Deployment (Maybe TargetConfiguration)
dTarget = lens _dTarget (\ s a -> s{_dTarget = a})
instance FromJSON Deployment where
parseJSON
= withObject "Deployment"
(\ o ->
Deployment' <$>
(o .:? "insertTime") <*> (o .:? "operation") <*>
(o .:? "fingerprint")
<*> (o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "manifest")
<*> (o .:? "id")
<*> (o .:? "labels" .!= mempty)
<*> (o .:? "description")
<*> (o .:? "update")
<*> (o .:? "target"))
instance ToJSON Deployment where
toJSON Deployment'{..}
= object
(catMaybes
[("insertTime" .=) <$> _dInsertTime,
("operation" .=) <$> _dOperation,
("fingerprint" .=) <$> _dFingerprint,
("selfLink" .=) <$> _dSelfLink,
("name" .=) <$> _dName,
("manifest" .=) <$> _dManifest, ("id" .=) <$> _dId,
("labels" .=) <$> _dLabels,
("description" .=) <$> _dDescription,
("update" .=) <$> _dUpdate,
("target" .=) <$> _dTarget])