@@ -104,6 +104,62 @@ instance ToJSON ConfigFile where
104 toJSON ConfigFile'{..}
104 toJSON ConfigFile'{..}
105 = object (catMaybes [("content" .=) <$> _cfContent])
105 = object (catMaybes [("content" .=) <$> _cfContent])
107+-- | Enables \"data access\" audit logging for a service and specifies a list
108+-- of members that are log-exempted.
110+-- /See:/ 'auditConfig' smart constructor.
111+data AuditConfig = AuditConfig'
112+ { _acService :: !(Maybe Text)
113+ , _acExemptedMembers :: !(Maybe [Text])
114+ } deriving (Eq,Show,Data,Typeable,Generic)
116+-- | Creates a value of 'AuditConfig' with the minimum fields required to make a request.
118+-- Use one of the following lenses to modify other fields as desired:
122+-- * 'acExemptedMembers'
127+ { _acService = Nothing
128+ , _acExemptedMembers = Nothing
131+-- | Specifies a service that will be enabled for \"data access\" audit
132+-- logging. For example, \`resourcemanager\`, \`storage\`, \`compute\`.
133+-- \`allServices\` is a special value that covers all services.
134+acService :: Lens' AuditConfig (Maybe Text)
136+ = lens _acService (\ s a -> s{_acService = a})
138+-- | Specifies the identities that are exempted from \"data access\" audit
139+-- logging for the \`service\` specified above. Follows the same format of
141+acExemptedMembers :: Lens' AuditConfig [Text]
143+ = lens _acExemptedMembers
144+ (\ s a -> s{_acExemptedMembers = a})
148+instance FromJSON AuditConfig where
150+ = withObject "AuditConfig"
153+ (o .:? "service") <*>
154+ (o .:? "exemptedMembers" .!= mempty))
156+instance ToJSON AuditConfig where
157+ toJSON AuditConfig'{..}
160+ [("service" .=) <$> _acService,
161+ ("exemptedMembers" .=) <$> _acExemptedMembers])
107-- | A response containing a partial list of operations and a page token used
163-- | A response containing a partial list of operations and a page token used
108-- to build the next request if the request has been truncated.
164-- to build the next request if the request has been truncated.
@@ -262,6 +318,53 @@ instance ToJSON TypesListResponse where
262 [("nextPageToken" .=) <$> _tlrNextPageToken,
318 [("nextPageToken" .=) <$> _tlrNextPageToken,
263 ("types" .=) <$> _tlrTypes])
319 ("types" .=) <$> _tlrTypes])
321+-- | Options for counters
323+-- /See:/ 'logConfigCounterOptions' smart constructor.
324+data LogConfigCounterOptions = LogConfigCounterOptions'
325+ { _lccoField :: !(Maybe Text)
326+ , _lccoMetric :: !(Maybe Text)
327+ } deriving (Eq,Show,Data,Typeable,Generic)
329+-- | Creates a value of 'LogConfigCounterOptions' with the minimum fields required to make a request.
331+-- Use one of the following lenses to modify other fields as desired:
336+logConfigCounterOptions
337+ :: LogConfigCounterOptions
338+logConfigCounterOptions =
339+ LogConfigCounterOptions'
340+ { _lccoField = Nothing
341+ , _lccoMetric = Nothing
344+-- | The field value to attribute.
345+lccoField :: Lens' LogConfigCounterOptions (Maybe Text)
347+ = lens _lccoField (\ s a -> s{_lccoField = a})
349+-- | The metric to update.
350+lccoMetric :: Lens' LogConfigCounterOptions (Maybe Text)
352+ = lens _lccoMetric (\ s a -> s{_lccoMetric = a})
354+instance FromJSON LogConfigCounterOptions where
356+ = withObject "LogConfigCounterOptions"
358+ LogConfigCounterOptions' <$>
359+ (o .:? "field") <*> (o .:? "metric"))
361+instance ToJSON LogConfigCounterOptions where
362+ toJSON LogConfigCounterOptions'{..}
365+ [("field" .=) <$> _lccoField,
366+ ("metric" .=) <$> _lccoMetric])
265-- | An Operation resource, used to manage asynchronous API requests.
368-- | An Operation resource, used to manage asynchronous API requests.
267-- /See:/ 'operation' smart constructor.
370-- /See:/ 'operation' smart constructor.
@@ -498,7 +601,9 @@ oDescription :: Lens' Operation (Maybe Text)
498oDescription
601oDescription
499 = lens _oDescription (\ s a -> s{_oDescription = a})
602 = lens _oDescription (\ s a -> s{_oDescription = a})
501−-- | [Output Only] The URL of the resource that the operation modifies.
604+-- | [Output Only] The URL of the resource that the operation modifies. If
605+-- creating a persistent disk snapshot, this points to the persistent disk
606+-- that the snapshot was created from.
502oTargetLink :: Lens' Operation (Maybe Text)
607oTargetLink :: Lens' Operation (Maybe Text)
503oTargetLink
608oTargetLink
504 = lens _oTargetLink (\ s a -> s{_oTargetLink = a})
609 = lens _oTargetLink (\ s a -> s{_oTargetLink = a})
@@ -563,6 +668,45 @@ instance ToJSON Operation where
563 ("targetLink" .=) <$> _oTargetLink,
668 ("targetLink" .=) <$> _oTargetLink,
564 ("clientOperationId" .=) <$> _oClientOperationId])
669 ("clientOperationId" .=) <$> _oClientOperationId])
672+-- /See:/ 'testPermissionsResponse' smart constructor.
673+newtype TestPermissionsResponse = TestPermissionsResponse'
674+ { _tprPermissions :: Maybe [Text]
675+ } deriving (Eq,Show,Data,Typeable,Generic)
677+-- | Creates a value of 'TestPermissionsResponse' with the minimum fields required to make a request.
679+-- Use one of the following lenses to modify other fields as desired:
681+-- * 'tprPermissions'
682+testPermissionsResponse
683+ :: TestPermissionsResponse
684+testPermissionsResponse =
685+ TestPermissionsResponse'
686+ { _tprPermissions = Nothing
689+-- | A subset of \`TestPermissionsRequest.permissions\` that the caller is
691+tprPermissions :: Lens' TestPermissionsResponse [Text]
693+ = lens _tprPermissions
694+ (\ s a -> s{_tprPermissions = a})
698+instance FromJSON TestPermissionsResponse where
700+ = withObject "TestPermissionsResponse"
702+ TestPermissionsResponse' <$>
703+ (o .:? "permissions" .!= mempty))
705+instance ToJSON TestPermissionsResponse where
706+ toJSON TestPermissionsResponse'{..}
708+ (catMaybes [("permissions" .=) <$> _tprPermissions])
566-- | A response containing a partial list of resources and a page token used
710-- | A response containing a partial list of resources and a page token used
567-- to build the next request if the request has been truncated.
711-- to build the next request if the request has been truncated.
@@ -676,6 +820,7 @@ instance ToJSON DeploymentUpdate where
676data ResourceUpdate = ResourceUpdate'
820data ResourceUpdate = ResourceUpdate'
677 { _ruState :: !(Maybe Text)
821 { _ruState :: !(Maybe Text)
678 , _ruError :: !(Maybe ResourceUpdateError)
822 , _ruError :: !(Maybe ResourceUpdateError)
823+ , _ruAccessControl :: !(Maybe ResourceAccessControl)
679 , _ruWarnings :: !(Maybe [ResourceUpdateWarningsItem])
824 , _ruWarnings :: !(Maybe [ResourceUpdateWarningsItem])
680 , _ruIntent :: !(Maybe Text)
825 , _ruIntent :: !(Maybe Text)
681 , _ruManifest :: !(Maybe Text)
826 , _ruManifest :: !(Maybe Text)
@@ -691,6 +836,8 @@ data ResourceUpdate = ResourceUpdate'
692-- * 'ruError'
837-- * 'ruError'
839+-- * 'ruAccessControl'
694-- * 'ruWarnings'
841-- * 'ruWarnings'
696-- * 'ruIntent'
843-- * 'ruIntent'
@@ -706,6 +853,7 @@ resourceUpdate =
706 ResourceUpdate'
853 ResourceUpdate'
707 { _ruState = Nothing
854 { _ruState = Nothing
708 , _ruError = Nothing
855 , _ruError = Nothing
856+ , _ruAccessControl = Nothing
709 , _ruWarnings = Nothing
857 , _ruWarnings = Nothing
710 , _ruIntent = Nothing
858 , _ruIntent = Nothing
711 , _ruManifest = Nothing
859 , _ruManifest = Nothing
@@ -722,6 +870,13 @@ ruState = lens _ruState (\ s a -> s{_ruState = a})
722ruError :: Lens' ResourceUpdate (Maybe ResourceUpdateError)
870ruError :: Lens' ResourceUpdate (Maybe ResourceUpdateError)
723ruError = lens _ruError (\ s a -> s{_ruError = a})
871ruError = lens _ruError (\ s a -> s{_ruError = a})
873+-- | The Access Control Policy to set on this resource after updating the
875+ruAccessControl :: Lens' ResourceUpdate (Maybe ResourceAccessControl)
877+ = lens _ruAccessControl
878+ (\ s a -> s{_ruAccessControl = a})
725-- | [Output Only] If warning messages are generated during processing of
880-- | [Output Only] If warning messages are generated during processing of
726-- this resource, this field will be populated.
881-- this resource, this field will be populated.
727ruWarnings :: Lens' ResourceUpdate [ResourceUpdateWarningsItem]
882ruWarnings :: Lens' ResourceUpdate [ResourceUpdateWarningsItem]
@@ -759,7 +914,8 @@ instance FromJSON ResourceUpdate where
760 ResourceUpdate' <$>
915 ResourceUpdate' <$>
761 (o .:? "state") <*> (o .:? "error") <*>
916 (o .:? "state") <*> (o .:? "error") <*>
917+ (o .:? "accessControl")
762− (o .:? "warnings" .!= mempty)
918+ <*> (o .:? "warnings" .!= mempty)
763 <*> (o .:? "intent")
919 <*> (o .:? "intent")
764 <*> (o .:? "manifest")
920 <*> (o .:? "manifest")
765 <*> (o .:? "finalProperties")
921 <*> (o .:? "finalProperties")
@@ -771,6 +927,7 @@ instance ToJSON ResourceUpdate where
771 (catMaybes
927 (catMaybes
772 [("state" .=) <$> _ruState,
928 [("state" .=) <$> _ruState,
773 ("error" .=) <$> _ruError,
929 ("error" .=) <$> _ruError,
930+ ("accessControl" .=) <$> _ruAccessControl,
774 ("warnings" .=) <$> _ruWarnings,
931 ("warnings" .=) <$> _ruWarnings,
775 ("intent" .=) <$> _ruIntent,
932 ("intent" .=) <$> _ruIntent,
776 ("manifest" .=) <$> _ruManifest,
933 ("manifest" .=) <$> _ruManifest,
@@ -818,6 +975,157 @@ instance ToJSON DeploymentLabelEntry where
818 (catMaybes
975 (catMaybes
819 [("value" .=) <$> _dleValue, ("key" .=) <$> _dleKey])
976 [("value" .=) <$> _dleValue, ("key" .=) <$> _dleKey])
978+-- | A rule to be applied in a Policy.
980+-- /See:/ 'rule' smart constructor.
982+ { _rAction :: !(Maybe Text)
983+ , _rNotIns :: !(Maybe [Text])
984+ , _rIns :: !(Maybe [Text])
985+ , _rLogConfigs :: !(Maybe [LogConfig])
986+ , _rConditions :: !(Maybe [Condition])
987+ , _rPermissions :: !(Maybe [Text])
988+ , _rDescription :: !(Maybe Text)
989+ } deriving (Eq,Show,Data,Typeable,Generic)
991+-- | Creates a value of 'Rule' with the minimum fields required to make a request.
993+-- Use one of the following lenses to modify other fields as desired:
1012+ { _rAction = Nothing
1013+ , _rNotIns = Nothing
1015+ , _rLogConfigs = Nothing
1016+ , _rConditions = Nothing
1017+ , _rPermissions = Nothing
1018+ , _rDescription = Nothing
1022+rAction :: Lens' Rule (Maybe Text)
1023+rAction = lens _rAction (\ s a -> s{_rAction = a})
1025+-- | If one or more \'not_in\' clauses are specified, the rule matches if the
1026+-- PRINCIPAL\/AUTHORITY_SELECTOR is in none of the entries.
1027+rNotIns :: Lens' Rule [Text]
1029+ = lens _rNotIns (\ s a -> s{_rNotIns = a}) . _Default
1032+-- | If one or more \'in\' clauses are specified, the rule matches if the
1033+-- PRINCIPAL\/AUTHORITY_SELECTOR is in at least one of these entries.
1034+rIns :: Lens' Rule [Text]
1036+ = lens _rIns (\ s a -> s{_rIns = a}) . _Default .
1039+-- | The config returned to callers of tech.iam.IAM.CheckPolicy for any
1040+-- entries that match the LOG action.
1041+rLogConfigs :: Lens' Rule [LogConfig]
1043+ = lens _rLogConfigs (\ s a -> s{_rLogConfigs = a}) .
1047+-- | Additional restrictions that must be met
1048+rConditions :: Lens' Rule [Condition]
1050+ = lens _rConditions (\ s a -> s{_rConditions = a}) .
1054+-- | A permission is a string of form \'..\' (e.g.,
1055+-- \'storage.buckets.list\'). A value of \'*\' matches all permissions, and
1056+-- a verb part of \'*\' (e.g., \'storage.buckets.*\') matches all verbs.
1057+rPermissions :: Lens' Rule [Text]
1059+ = lens _rPermissions (\ s a -> s{_rPermissions = a})
1063+-- | Human-readable description of the rule.
1064+rDescription :: Lens' Rule (Maybe Text)
1066+ = lens _rDescription (\ s a -> s{_rDescription = a})
1068+instance FromJSON Rule where
1070+ = withObject "Rule"
1073+ (o .:? "action") <*> (o .:? "notIns" .!= mempty) <*>
1074+ (o .:? "ins" .!= mempty)
1075+ <*> (o .:? "logConfigs" .!= mempty)
1076+ <*> (o .:? "conditions" .!= mempty)
1077+ <*> (o .:? "permissions" .!= mempty)
1078+ <*> (o .:? "description"))
1080+instance ToJSON Rule where
1084+ [("action" .=) <$> _rAction,
1085+ ("notIns" .=) <$> _rNotIns, ("ins" .=) <$> _rIns,
1086+ ("logConfigs" .=) <$> _rLogConfigs,
1087+ ("conditions" .=) <$> _rConditions,
1088+ ("permissions" .=) <$> _rPermissions,
1089+ ("description" .=) <$> _rDescription])
1092+-- /See:/ 'testPermissionsRequest' smart constructor.
1093+newtype TestPermissionsRequest = TestPermissionsRequest'
1094+ { _tPermissions :: Maybe [Text]
1095+ } deriving (Eq,Show,Data,Typeable,Generic)
1097+-- | Creates a value of 'TestPermissionsRequest' with the minimum fields required to make a request.
1099+-- Use one of the following lenses to modify other fields as desired:
1102+testPermissionsRequest
1103+ :: TestPermissionsRequest
1104+testPermissionsRequest =
1105+ TestPermissionsRequest'
1106+ { _tPermissions = Nothing
1109+-- | The set of permissions to check for the \'resource\'. Permissions with
1110+-- wildcards (such as \'*\' or \'storage.*\') are not allowed.
1111+tPermissions :: Lens' TestPermissionsRequest [Text]
1113+ = lens _tPermissions (\ s a -> s{_tPermissions = a})
1117+instance FromJSON TestPermissionsRequest where
1119+ = withObject "TestPermissionsRequest"
1121+ TestPermissionsRequest' <$>
1122+ (o .:? "permissions" .!= mempty))
1124+instance ToJSON TestPermissionsRequest where
1125+ toJSON TestPermissionsRequest'{..}
1127+ (catMaybes [("permissions" .=) <$> _tPermissions])
823-- /See:/ 'manifest' smart constructor.
1131-- /See:/ 'manifest' smart constructor.
@@ -1045,6 +1353,7 @@ instance ToJSON DeploymentsCancelPreviewRequest where
1045-- /See:/ 'resource' smart constructor.
1353-- /See:/ 'resource' smart constructor.
1046data Resource = Resource'
1354data Resource = Resource'
1047 { _rInsertTime :: !(Maybe Text)
1355 { _rInsertTime :: !(Maybe Text)
1356+ , _rAccessControl :: !(Maybe ResourceAccessControl)
1048 , _rURL :: !(Maybe Text)
1357 , _rURL :: !(Maybe Text)
1049 , _rWarnings :: !(Maybe [ResourceWarningsItem])
1358 , _rWarnings :: !(Maybe [ResourceWarningsItem])
1050 , _rUpdateTime :: !(Maybe Text)
1359 , _rUpdateTime :: !(Maybe Text)
@@ -1063,6 +1372,8 @@ data Resource = Resource'
1064-- * 'rInsertTime'
1373-- * 'rInsertTime'
1375+-- * 'rAccessControl'
1066-- * 'rURL'
1377-- * 'rURL'
1068-- * 'rWarnings'
1379-- * 'rWarnings'
@@ -1087,6 +1398,7 @@ resource
1087resource =
1398resource =
1088 Resource'
1399 Resource'
1089 { _rInsertTime = Nothing
1400 { _rInsertTime = Nothing
1401+ , _rAccessControl = Nothing
1090 , _rURL = Nothing
1402 , _rURL = Nothing
1091 , _rWarnings = Nothing
1403 , _rWarnings = Nothing
1092 , _rUpdateTime = Nothing
1404 , _rUpdateTime = Nothing
@@ -1105,6 +1417,12 @@ rInsertTime :: Lens' Resource (Maybe Text)
1105rInsertTime
1417rInsertTime
1106 = lens _rInsertTime (\ s a -> s{_rInsertTime = a})
1418 = lens _rInsertTime (\ s a -> s{_rInsertTime = a})
1420+-- | The Access Control Policy set on this resource.
1421+rAccessControl :: Lens' Resource (Maybe ResourceAccessControl)
1423+ = lens _rAccessControl
1424+ (\ s a -> s{_rAccessControl = a})
1108-- | [Output Only] The URL of the actual resource.
1426-- | [Output Only] The URL of the actual resource.
1109rURL :: Lens' Resource (Maybe Text)
1427rURL :: Lens' Resource (Maybe Text)
1110rURL = lens _rURL (\ s a -> s{_rURL = a})
1428rURL = lens _rURL (\ s a -> s{_rURL = a})
@@ -1146,7 +1464,7 @@ rId
1146 = lens _rId (\ s a -> s{_rId = a}) . mapping _Coerce
1464 = lens _rId (\ s a -> s{_rId = a}) . mapping _Coerce
1148-- | [Output Only] The type of the resource, for example compute.v1.instance,
1466-- | [Output Only] The type of the resource, for example compute.v1.instance,
1149−-- or replicaPools.v1beta2.instanceGroupManager.
1467+-- or cloudfunctions.v1beta1.function.
1150rType :: Lens' Resource (Maybe Text)
1468rType :: Lens' Resource (Maybe Text)
1151rType = lens _rType (\ s a -> s{_rType = a})
1469rType = lens _rType (\ s a -> s{_rType = a})
@@ -1166,8 +1484,9 @@ instance FromJSON Resource where
1166 = withObject "Resource"
1484 = withObject "Resource"
1168 Resource' <$>
1486 Resource' <$>
1169− (o .:? "insertTime") <*> (o .:? "url") <*>
1487+ (o .:? "insertTime") <*> (o .:? "accessControl") <*>
1170− (o .:? "warnings" .!= mempty)
1489+ <*> (o .:? "warnings" .!= mempty)
1171 <*> (o .:? "updateTime")
1490 <*> (o .:? "updateTime")
1172 <*> (o .:? "name")
1491 <*> (o .:? "name")
1173 <*> (o .:? "manifest")
1492 <*> (o .:? "manifest")
@@ -1182,6 +1501,7 @@ instance ToJSON Resource where
1182 = object
1501 = object
1183 (catMaybes
1502 (catMaybes
1184 [("insertTime" .=) <$> _rInsertTime,
1503 [("insertTime" .=) <$> _rInsertTime,
1504+ ("accessControl" .=) <$> _rAccessControl,
1185 ("url" .=) <$> _rURL, ("warnings" .=) <$> _rWarnings,
1505 ("url" .=) <$> _rURL, ("warnings" .=) <$> _rWarnings,
1186 ("updateTime" .=) <$> _rUpdateTime,
1506 ("updateTime" .=) <$> _rUpdateTime,
1187 ("name" .=) <$> _rName,
1507 ("name" .=) <$> _rName,
@@ -1383,11 +1703,142 @@ instance ToJSON OperationError where
1383 toJSON OperationError'{..}
1703 toJSON OperationError'{..}
1384 = object (catMaybes [("errors" .=) <$> _oeErrors])
1704 = object (catMaybes [("errors" .=) <$> _oeErrors])
1706+-- | Defines an Identity and Access Management (IAM) policy. It is used to
1707+-- specify access control policies for Cloud Platform resources. A
1708+-- \`Policy\` consists of a list of \`bindings\`. A \`Binding\` binds a
1709+-- list of \`members\` to a \`role\`, where the members can be user
1710+-- accounts, Google groups, Google domains, and service accounts. A
1711+-- \`role\` is a named list of permissions defined by IAM. **Example** {
1712+-- \"bindings\": [ { \"role\": \"roles\/owner\", \"members\": [
1713+-- \"user:mike\'example.com\", \"group:admins\'example.com\",
1714+-- \"domain:google.com\",
1715+-- \"serviceAccount:my-other-app\'appspot.gserviceaccount.com\", ] }, {
1716+-- \"role\": \"roles\/viewer\", \"members\": [\"user:sean\'example.com\"] }
1717+-- ] } For a description of IAM and its features, see the [IAM developer\'s
1718+-- guide](https:\/\/cloud.google.com\/iam).
1720+-- /See:/ 'policy' smart constructor.
1721+data Policy = Policy'
1722+ { _pAuditConfigs :: !(Maybe [AuditConfig])
1723+ , _pEtag :: !(Maybe Base64)
1724+ , _pRules :: !(Maybe [Rule])
1725+ , _pVersion :: !(Maybe (Textual Int32))
1726+ , _pBindings :: !(Maybe [Binding])
1727+ , _pIAMOwned :: !(Maybe Bool)
1728+ } deriving (Eq,Show,Data,Typeable,Generic)
1730+-- | Creates a value of 'Policy' with the minimum fields required to make a request.
1732+-- Use one of the following lenses to modify other fields as desired:
1734+-- * 'pAuditConfigs'
1749+ { _pAuditConfigs = Nothing
1751+ , _pRules = Nothing
1752+ , _pVersion = Nothing
1753+ , _pBindings = Nothing
1754+ , _pIAMOwned = Nothing
1757+-- | Specifies audit logging configs for \"data access\". \"data access\":
1758+-- generally refers to data reads\/writes and admin reads. \"admin
1759+-- activity\": generally refers to admin writes. Note: \`AuditConfig\`
1760+-- doesn\'t apply to \"admin activity\", which always enables audit
1762+pAuditConfigs :: Lens' Policy [AuditConfig]
1764+ = lens _pAuditConfigs
1765+ (\ s a -> s{_pAuditConfigs = a})
1769+-- | \`etag\` is used for optimistic concurrency control as a way to help
1770+-- prevent simultaneous updates of a policy from overwriting each other. It
1771+-- is strongly suggested that systems make use of the \`etag\` in the
1772+-- read-modify-write cycle to perform policy updates in order to avoid race
1773+-- conditions: An \`etag\` is returned in the response to \`getIamPolicy\`,
1774+-- and systems are expected to put that etag in the request to
1775+-- \`setIamPolicy\` to ensure that their change will be applied to the same
1776+-- version of the policy. If no \`etag\` is provided in the call to
1777+-- \`setIamPolicy\`, then the existing policy is overwritten blindly.
1778+pEtag :: Lens' Policy (Maybe ByteString)
1780+ = lens _pEtag (\ s a -> s{_pEtag = a}) .
1783+-- | If more than one rule is specified, the rules are applied in the
1784+-- following manner: - All matching LOG rules are always applied. - If any
1785+-- DENY\/DENY_WITH_LOG rule matches, permission is denied. Logging will be
1786+-- applied if one or more matching rule requires logging. - Otherwise, if
1787+-- any ALLOW\/ALLOW_WITH_LOG rule matches, permission is granted. Logging
1788+-- will be applied if one or more matching rule requires logging. -
1789+-- Otherwise, if no rule applies, permission is denied.
1790+pRules :: Lens' Policy [Rule]
1792+ = lens _pRules (\ s a -> s{_pRules = a}) . _Default .
1795+-- | Version of the \`Policy\`. The default version is 0.
1796+pVersion :: Lens' Policy (Maybe Int32)
1798+ = lens _pVersion (\ s a -> s{_pVersion = a}) .
1801+-- | Associates a list of \`members\` to a \`role\`. Multiple \`bindings\`
1802+-- must not be specified for the same \`role\`. \`bindings\` with no
1803+-- members will result in an error.
1804+pBindings :: Lens' Policy [Binding]
1806+ = lens _pBindings (\ s a -> s{_pBindings = a}) .
1811+pIAMOwned :: Lens' Policy (Maybe Bool)
1813+ = lens _pIAMOwned (\ s a -> s{_pIAMOwned = a})
1815+instance FromJSON Policy where
1817+ = withObject "Policy"
1820+ (o .:? "auditConfigs" .!= mempty) <*> (o .:? "etag")
1821+ <*> (o .:? "rules" .!= mempty)
1822+ <*> (o .:? "version")
1823+ <*> (o .:? "bindings" .!= mempty)
1824+ <*> (o .:? "iamOwned"))
1826+instance ToJSON Policy where
1830+ [("auditConfigs" .=) <$> _pAuditConfigs,
1831+ ("etag" .=) <$> _pEtag, ("rules" .=) <$> _pRules,
1832+ ("version" .=) <$> _pVersion,
1833+ ("bindings" .=) <$> _pBindings,
1834+ ("iamOwned" .=) <$> _pIAMOwned])
1386-- | A resource type supported by Deployment Manager.
1836-- | A resource type supported by Deployment Manager.
1388-- /See:/ 'type'' smart constructor.
1838-- /See:/ 'type'' smart constructor.
1389data Type = Type'
1839data Type = Type'
1390 { _tInsertTime :: !(Maybe Text)
1840 { _tInsertTime :: !(Maybe Text)
1841+ , _tOperation :: !(Maybe Operation)
1391 , _tSelfLink :: !(Maybe Text)
1842 , _tSelfLink :: !(Maybe Text)
1392 , _tName :: !(Maybe Text)
1843 , _tName :: !(Maybe Text)
1393 , _tId :: !(Maybe (Textual Word64))
1844 , _tId :: !(Maybe (Textual Word64))
@@ -1399,6 +1850,8 @@ data Type = Type'
1400-- * 'tInsertTime'
1851-- * 'tInsertTime'
1402-- * 'tSelfLink'
1855-- * 'tSelfLink'
1404-- * 'tName'
1857-- * 'tName'
@@ -1409,6 +1862,7 @@ type'
1411 { _tInsertTime = Nothing
1864 { _tInsertTime = Nothing
1865+ , _tOperation = Nothing
1412 , _tSelfLink = Nothing
1866 , _tSelfLink = Nothing
1413 , _tName = Nothing
1867 , _tName = Nothing
1414 , _tId = Nothing
1868 , _tId = Nothing
@@ -1420,6 +1874,12 @@ tInsertTime :: Lens' Type (Maybe Text)
1420tInsertTime
1874tInsertTime
1421 = lens _tInsertTime (\ s a -> s{_tInsertTime = a})
1875 = lens _tInsertTime (\ s a -> s{_tInsertTime = a})
1877+-- | [Output Only] The Operation that most recently ran, or is currently
1878+-- running, on this type.
1879+tOperation :: Lens' Type (Maybe Operation)
1881+ = lens _tOperation (\ s a -> s{_tOperation = a})
1423-- | [Output Only] Self link for the type.
1883-- | [Output Only] Self link for the type.
1424tSelfLink :: Lens' Type (Maybe Text)
1884tSelfLink :: Lens' Type (Maybe Text)
1425tSelfLink
1885tSelfLink
@@ -1439,8 +1899,9 @@ instance FromJSON Type where
1439 = withObject "Type"
1899 = withObject "Type"
1441 Type' <$>
1901 Type' <$>
1442− (o .:? "insertTime") <*> (o .:? "selfLink") <*>
1902+ (o .:? "insertTime") <*> (o .:? "operation") <*>
1443− (o .:? "name")
1904+ <*> (o .:? "name")
1444 <*> (o .:? "id"))
1905 <*> (o .:? "id"))
1446instance ToJSON Type where
1907instance ToJSON Type where
@@ -1448,6 +1909,7 @@ instance ToJSON Type where
1448 = object
1909 = object
1449 (catMaybes
1910 (catMaybes
1450 [("insertTime" .=) <$> _tInsertTime,
1911 [("insertTime" .=) <$> _tInsertTime,
1912+ ("operation" .=) <$> _tOperation,
1451 ("selfLink" .=) <$> _tSelfLink,
1913 ("selfLink" .=) <$> _tSelfLink,
1452 ("name" .=) <$> _tName, ("id" .=) <$> _tId])
1914 ("name" .=) <$> _tName, ("id" .=) <$> _tId])
@@ -1687,6 +2149,91 @@ instance ToJSON ResourceUpdateError where
1687 toJSON ResourceUpdateError'{..}
2149 toJSON ResourceUpdateError'{..}
1688 = object (catMaybes [("errors" .=) <$> _rueErrors])
2150 = object (catMaybes [("errors" .=) <$> _rueErrors])
2152+-- | A condition to be met.
2154+-- /See:/ 'condition' smart constructor.
2155+data Condition = Condition'
2156+ { _cOp :: !(Maybe Text)
2157+ , _cIAM :: !(Maybe Text)
2158+ , _cValues :: !(Maybe [Text])
2159+ , _cValue :: !(Maybe Text)
2160+ , _cSys :: !(Maybe Text)
2161+ , _cSvc :: !(Maybe Text)
2162+ } deriving (Eq,Show,Data,Typeable,Generic)
2164+-- | Creates a value of 'Condition' with the minimum fields required to make a request.
2166+-- Use one of the following lenses to modify other fields as desired:
2185+ , _cValues = Nothing
2186+ , _cValue = Nothing
2191+-- | An operator to apply the subject with.
2192+cOp :: Lens' Condition (Maybe Text)
2193+cOp = lens _cOp (\ s a -> s{_cOp = a})
2195+-- | Trusted attributes supplied by the IAM system.
2196+cIAM :: Lens' Condition (Maybe Text)
2197+cIAM = lens _cIAM (\ s a -> s{_cIAM = a})
2199+-- | The objects of the condition. This is mutually exclusive with \'value\'.
2200+cValues :: Lens' Condition [Text]
2202+ = lens _cValues (\ s a -> s{_cValues = a}) . _Default
2205+-- | DEPRECATED. Use \'values\' instead.
2206+cValue :: Lens' Condition (Maybe Text)
2207+cValue = lens _cValue (\ s a -> s{_cValue = a})
2209+-- | Trusted attributes supplied by any service that owns resources and uses
2210+-- the IAM system for access control.
2211+cSys :: Lens' Condition (Maybe Text)
2212+cSys = lens _cSys (\ s a -> s{_cSys = a})
2214+-- | Trusted attributes discharged by the service.
2215+cSvc :: Lens' Condition (Maybe Text)
2216+cSvc = lens _cSvc (\ s a -> s{_cSvc = a})
2218+instance FromJSON Condition where
2220+ = withObject "Condition"
2223+ (o .:? "op") <*> (o .:? "iam") <*>
2224+ (o .:? "values" .!= mempty)
2225+ <*> (o .:? "value")
2229+instance ToJSON Condition where
2230+ toJSON Condition'{..}
2233+ [("op" .=) <$> _cOp, ("iam" .=) <$> _cIAM,
2234+ ("values" .=) <$> _cValues, ("value" .=) <$> _cValue,
2235+ ("sys" .=) <$> _cSys, ("svc" .=) <$> _cSvc])
1690-- | A response containing a partial list of deployments and a page token
2237-- | A response containing a partial list of deployments and a page token
1691-- used to build the next request if the request has been truncated.
2238-- used to build the next request if the request has been truncated.
@@ -1799,6 +2346,76 @@ instance ToJSON ResourceWarningsItem where
1799 [("data" .=) <$> _rwiData, ("code" .=) <$> _rwiCode,
2346 [("data" .=) <$> _rwiData, ("code" .=) <$> _rwiCode,
1800 ("message" .=) <$> _rwiMessage])
2347 ("message" .=) <$> _rwiMessage])
2349+-- | Specifies what kind of log the caller must write
2351+-- /See:/ 'logConfig' smart constructor.
2352+newtype LogConfig = LogConfig'
2353+ { _lcCounter :: Maybe LogConfigCounterOptions
2354+ } deriving (Eq,Show,Data,Typeable,Generic)
2356+-- | Creates a value of 'LogConfig' with the minimum fields required to make a request.
2358+-- Use one of the following lenses to modify other fields as desired:
2365+ { _lcCounter = Nothing
2368+-- | Counter options.
2369+lcCounter :: Lens' LogConfig (Maybe LogConfigCounterOptions)
2371+ = lens _lcCounter (\ s a -> s{_lcCounter = a})
2373+instance FromJSON LogConfig where
2375+ = withObject "LogConfig"
2376+ (\ o -> LogConfig' <$> (o .:? "counter"))
2378+instance ToJSON LogConfig where
2379+ toJSON LogConfig'{..}
2380+ = object (catMaybes [("counter" .=) <$> _lcCounter])
2382+-- | The access controls set on the resource.
2384+-- /See:/ 'resourceAccessControl' smart constructor.
2385+newtype ResourceAccessControl = ResourceAccessControl'
2386+ { _racGcpIAMPolicy :: Maybe Text
2387+ } deriving (Eq,Show,Data,Typeable,Generic)
2389+-- | Creates a value of 'ResourceAccessControl' with the minimum fields required to make a request.
2391+-- Use one of the following lenses to modify other fields as desired:
2393+-- * 'racGcpIAMPolicy'
2394+resourceAccessControl
2395+ :: ResourceAccessControl
2396+resourceAccessControl =
2397+ ResourceAccessControl'
2398+ { _racGcpIAMPolicy = Nothing
2401+-- | The GCP IAM Policy to set on the resource.
2402+racGcpIAMPolicy :: Lens' ResourceAccessControl (Maybe Text)
2404+ = lens _racGcpIAMPolicy
2405+ (\ s a -> s{_racGcpIAMPolicy = a})
2407+instance FromJSON ResourceAccessControl where
2409+ = withObject "ResourceAccessControl"
2411+ ResourceAccessControl' <$> (o .:? "gcpIamPolicy"))
2413+instance ToJSON ResourceAccessControl where
2414+ toJSON ResourceAccessControl'{..}
2417+ [("gcpIamPolicy" .=) <$> _racGcpIAMPolicy])
1804-- /See:/ 'targetConfiguration' smart constructor.
2421-- /See:/ 'targetConfiguration' smart constructor.
@@ -1908,6 +2525,68 @@ instance ToJSON OperationWarningsItem where
1908 [("data" .=) <$> _owiData, ("code" .=) <$> _owiCode,
2525 [("data" .=) <$> _owiData, ("code" .=) <$> _owiCode,
1909 ("message" .=) <$> _owiMessage])
2526 ("message" .=) <$> _owiMessage])
2528+-- | Associates \`members\` with a \`role\`.
2530+-- /See:/ 'binding' smart constructor.
2531+data Binding = Binding'
2532+ { _bMembers :: !(Maybe [Text])
2533+ , _bRole :: !(Maybe Text)
2534+ } deriving (Eq,Show,Data,Typeable,Generic)
2536+-- | Creates a value of 'Binding' with the minimum fields required to make a request.
2538+-- Use one of the following lenses to modify other fields as desired:
2547+ { _bMembers = Nothing
2551+-- | Specifies the identities requesting access for a Cloud Platform
2552+-- resource. \`members\` can have the following values: * \`allUsers\`: A
2553+-- special identifier that represents anyone who is on the internet; with
2554+-- or without a Google account. * \`allAuthenticatedUsers\`: A special
2555+-- identifier that represents anyone who is authenticated with a Google
2556+-- account or a service account. * \`user:{emailid}\`: An email address
2557+-- that represents a specific Google account. For example,
2558+-- \`alice\'gmail.com\` or \`joe\'example.com\`. *
2559+-- \`serviceAccount:{emailid}\`: An email address that represents a service
2560+-- account. For example, \`my-other-app\'appspot.gserviceaccount.com\`. *
2561+-- \`group:{emailid}\`: An email address that represents a Google group.
2562+-- For example, \`admins\'example.com\`. * \`domain:{domain}\`: A Google
2563+-- Apps domain name that represents all the users of that domain. For
2564+-- example, \`google.com\` or \`example.com\`.
2565+bMembers :: Lens' Binding [Text]
2567+ = lens _bMembers (\ s a -> s{_bMembers = a}) .
2571+-- | Role that is assigned to \`members\`. For example, \`roles\/viewer\`,
2572+-- \`roles\/editor\`, or \`roles\/owner\`.
2573+bRole :: Lens' Binding (Maybe Text)
2574+bRole = lens _bRole (\ s a -> s{_bRole = a})
2576+instance FromJSON Binding where
2578+ = withObject "Binding"
2581+ (o .:? "members" .!= mempty) <*> (o .:? "role"))
2583+instance ToJSON Binding where
2584+ toJSON Binding'{..}
2587+ [("members" .=) <$> _bMembers,
2588+ ("role" .=) <$> _bRole])
1913-- /See:/ 'deployment' smart constructor.
2592-- /See:/ 'deployment' smart constructor.