@@ -104,6 +104,62 @@ instance ToJSON ConfigFile where
104104 toJSON ConfigFile'{..}
105105 = object (catMaybes [("content" .=) <$> _cfContent])
106106
107+-- | Enables \"data access\" audit logging for a service and specifies a list
108+-- of members that are log-exempted.
109+--
110+-- /See:/ 'auditConfig' smart constructor.
111+data AuditConfig = AuditConfig'
112+ { _acService :: !(Maybe Text)
113+ , _acExemptedMembers :: !(Maybe [Text])
114+ } deriving (Eq,Show,Data,Typeable,Generic)
115+
116+-- | Creates a value of 'AuditConfig' with the minimum fields required to make a request.
117+--
118+-- Use one of the following lenses to modify other fields as desired:
119+--
120+-- * 'acService'
121+--
122+-- * 'acExemptedMembers'
123+auditConfig
124+ :: AuditConfig
125+auditConfig =
126+ AuditConfig'
127+ { _acService = Nothing
128+ , _acExemptedMembers = Nothing
129+ }
130+
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)
135+acService
136+ = lens _acService (\ s a -> s{_acService = a})
137+
138+-- | Specifies the identities that are exempted from \"data access\" audit
139+-- logging for the \`service\` specified above. Follows the same format of
140+-- Binding.members.
141+acExemptedMembers :: Lens' AuditConfig [Text]
142+acExemptedMembers
143+ = lens _acExemptedMembers
144+ (\ s a -> s{_acExemptedMembers = a})
145+ . _Default
146+ . _Coerce
147+
148+instance FromJSON AuditConfig where
149+ parseJSON
150+ = withObject "AuditConfig"
151+ (\ o ->
152+ AuditConfig' <$>
153+ (o .:? "service") <*>
154+ (o .:? "exemptedMembers" .!= mempty))
155+
156+instance ToJSON AuditConfig where
157+ toJSON AuditConfig'{..}
158+ = object
159+ (catMaybes
160+ [("service" .=) <$> _acService,
161+ ("exemptedMembers" .=) <$> _acExemptedMembers])
162+
107163-- | A response containing a partial list of operations and a page token used
108164-- to build the next request if the request has been truncated.
109165--
@@ -262,6 +318,53 @@ instance ToJSON TypesListResponse where
262318 [("nextPageToken" .=) <$> _tlrNextPageToken,
263319 ("types" .=) <$> _tlrTypes])
264320
321+-- | Options for counters
322+--
323+-- /See:/ 'logConfigCounterOptions' smart constructor.
324+data LogConfigCounterOptions = LogConfigCounterOptions'
325+ { _lccoField :: !(Maybe Text)
326+ , _lccoMetric :: !(Maybe Text)
327+ } deriving (Eq,Show,Data,Typeable,Generic)
328+
329+-- | Creates a value of 'LogConfigCounterOptions' with the minimum fields required to make a request.
330+--
331+-- Use one of the following lenses to modify other fields as desired:
332+--
333+-- * 'lccoField'
334+--
335+-- * 'lccoMetric'
336+logConfigCounterOptions
337+ :: LogConfigCounterOptions
338+logConfigCounterOptions =
339+ LogConfigCounterOptions'
340+ { _lccoField = Nothing
341+ , _lccoMetric = Nothing
342+ }
343+
344+-- | The field value to attribute.
345+lccoField :: Lens' LogConfigCounterOptions (Maybe Text)
346+lccoField
347+ = lens _lccoField (\ s a -> s{_lccoField = a})
348+
349+-- | The metric to update.
350+lccoMetric :: Lens' LogConfigCounterOptions (Maybe Text)
351+lccoMetric
352+ = lens _lccoMetric (\ s a -> s{_lccoMetric = a})
353+
354+instance FromJSON LogConfigCounterOptions where
355+ parseJSON
356+ = withObject "LogConfigCounterOptions"
357+ (\ o ->
358+ LogConfigCounterOptions' <$>
359+ (o .:? "field") <*> (o .:? "metric"))
360+
361+instance ToJSON LogConfigCounterOptions where
362+ toJSON LogConfigCounterOptions'{..}
363+ = object
364+ (catMaybes
365+ [("field" .=) <$> _lccoField,
366+ ("metric" .=) <$> _lccoMetric])
367+
265368-- | An Operation resource, used to manage asynchronous API requests.
266369--
267370-- /See:/ 'operation' smart constructor.
@@ -498,7 +601,9 @@ oDescription :: Lens' Operation (Maybe Text)
498601oDescription
499602 = lens _oDescription (\ s a -> s{_oDescription = a})
500603
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.
502607oTargetLink :: Lens' Operation (Maybe Text)
503608oTargetLink
504609 = lens _oTargetLink (\ s a -> s{_oTargetLink = a})
@@ -563,6 +668,45 @@ instance ToJSON Operation where
563668 ("targetLink" .=) <$> _oTargetLink,
564669 ("clientOperationId" .=) <$> _oClientOperationId])
565670
671+--
672+-- /See:/ 'testPermissionsResponse' smart constructor.
673+newtype TestPermissionsResponse = TestPermissionsResponse'
674+ { _tprPermissions :: Maybe [Text]
675+ } deriving (Eq,Show,Data,Typeable,Generic)
676+
677+-- | Creates a value of 'TestPermissionsResponse' with the minimum fields required to make a request.
678+--
679+-- Use one of the following lenses to modify other fields as desired:
680+--
681+-- * 'tprPermissions'
682+testPermissionsResponse
683+ :: TestPermissionsResponse
684+testPermissionsResponse =
685+ TestPermissionsResponse'
686+ { _tprPermissions = Nothing
687+ }
688+
689+-- | A subset of \`TestPermissionsRequest.permissions\` that the caller is
690+-- allowed.
691+tprPermissions :: Lens' TestPermissionsResponse [Text]
692+tprPermissions
693+ = lens _tprPermissions
694+ (\ s a -> s{_tprPermissions = a})
695+ . _Default
696+ . _Coerce
697+
698+instance FromJSON TestPermissionsResponse where
699+ parseJSON
700+ = withObject "TestPermissionsResponse"
701+ (\ o ->
702+ TestPermissionsResponse' <$>
703+ (o .:? "permissions" .!= mempty))
704+
705+instance ToJSON TestPermissionsResponse where
706+ toJSON TestPermissionsResponse'{..}
707+ = object
708+ (catMaybes [("permissions" .=) <$> _tprPermissions])
709+
566710-- | A response containing a partial list of resources and a page token used
567711-- to build the next request if the request has been truncated.
568712--
@@ -676,6 +820,7 @@ instance ToJSON DeploymentUpdate where
676820data ResourceUpdate = ResourceUpdate'
677821 { _ruState :: !(Maybe Text)
678822 , _ruError :: !(Maybe ResourceUpdateError)
823+ , _ruAccessControl :: !(Maybe ResourceAccessControl)
679824 , _ruWarnings :: !(Maybe [ResourceUpdateWarningsItem])
680825 , _ruIntent :: !(Maybe Text)
681826 , _ruManifest :: !(Maybe Text)
@@ -691,6 +836,8 @@ data ResourceUpdate = ResourceUpdate'
691836--
692837-- * 'ruError'
693838--
839+-- * 'ruAccessControl'
840+--
694841-- * 'ruWarnings'
695842--
696843-- * 'ruIntent'
@@ -706,6 +853,7 @@ resourceUpdate =
706853 ResourceUpdate'
707854 { _ruState = Nothing
708855 , _ruError = Nothing
856+ , _ruAccessControl = Nothing
709857 , _ruWarnings = Nothing
710858 , _ruIntent = Nothing
711859 , _ruManifest = Nothing
@@ -722,6 +870,13 @@ ruState = lens _ruState (\ s a -> s{_ruState = a})
722870ruError :: Lens' ResourceUpdate (Maybe ResourceUpdateError)
723871ruError = lens _ruError (\ s a -> s{_ruError = a})
724872
873+-- | The Access Control Policy to set on this resource after updating the
874+-- resource itself.
875+ruAccessControl :: Lens' ResourceUpdate (Maybe ResourceAccessControl)
876+ruAccessControl
877+ = lens _ruAccessControl
878+ (\ s a -> s{_ruAccessControl = a})
879+
725880-- | [Output Only] If warning messages are generated during processing of
726881-- this resource, this field will be populated.
727882ruWarnings :: Lens' ResourceUpdate [ResourceUpdateWarningsItem]
@@ -759,7 +914,8 @@ instance FromJSON ResourceUpdate where
759914 (\ o ->
760915 ResourceUpdate' <$>
761916 (o .:? "state") <*> (o .:? "error") <*>
762− (o .:? "warnings" .!= mempty)
917+ (o .:? "accessControl")
918+ <*> (o .:? "warnings" .!= mempty)
763919 <*> (o .:? "intent")
764920 <*> (o .:? "manifest")
765921 <*> (o .:? "finalProperties")
@@ -771,6 +927,7 @@ instance ToJSON ResourceUpdate where
771927 (catMaybes
772928 [("state" .=) <$> _ruState,
773929 ("error" .=) <$> _ruError,
930+ ("accessControl" .=) <$> _ruAccessControl,
774931 ("warnings" .=) <$> _ruWarnings,
775932 ("intent" .=) <$> _ruIntent,
776933 ("manifest" .=) <$> _ruManifest,
@@ -818,6 +975,157 @@ instance ToJSON DeploymentLabelEntry where
818975 (catMaybes
819976 [("value" .=) <$> _dleValue, ("key" .=) <$> _dleKey])
820977
978+-- | A rule to be applied in a Policy.
979+--
980+-- /See:/ 'rule' smart constructor.
981+data Rule = Rule'
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)
990+
991+-- | Creates a value of 'Rule' with the minimum fields required to make a request.
992+--
993+-- Use one of the following lenses to modify other fields as desired:
994+--
995+-- * 'rAction'
996+--
997+-- * 'rNotIns'
998+--
999+-- * 'rIns'
1000+--
1001+-- * 'rLogConfigs'
1002+--
1003+-- * 'rConditions'
1004+--
1005+-- * 'rPermissions'
1006+--
1007+-- * 'rDescription'
1008+rule
1009+ :: Rule
1010+rule =
1011+ Rule'
1012+ { _rAction = Nothing
1013+ , _rNotIns = Nothing
1014+ , _rIns = Nothing
1015+ , _rLogConfigs = Nothing
1016+ , _rConditions = Nothing
1017+ , _rPermissions = Nothing
1018+ , _rDescription = Nothing
1019+ }
1020+
1021+-- | Required
1022+rAction :: Lens' Rule (Maybe Text)
1023+rAction = lens _rAction (\ s a -> s{_rAction = a})
1024+
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]
1028+rNotIns
1029+ = lens _rNotIns (\ s a -> s{_rNotIns = a}) . _Default
1030+ . _Coerce
1031+
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]
1035+rIns
1036+ = lens _rIns (\ s a -> s{_rIns = a}) . _Default .
1037+ _Coerce
1038+
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]
1042+rLogConfigs
1043+ = lens _rLogConfigs (\ s a -> s{_rLogConfigs = a}) .
1044+ _Default
1045+ . _Coerce
1046+
1047+-- | Additional restrictions that must be met
1048+rConditions :: Lens' Rule [Condition]
1049+rConditions
1050+ = lens _rConditions (\ s a -> s{_rConditions = a}) .
1051+ _Default
1052+ . _Coerce
1053+
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]
1058+rPermissions
1059+ = lens _rPermissions (\ s a -> s{_rPermissions = a})
1060+ . _Default
1061+ . _Coerce
1062+
1063+-- | Human-readable description of the rule.
1064+rDescription :: Lens' Rule (Maybe Text)
1065+rDescription
1066+ = lens _rDescription (\ s a -> s{_rDescription = a})
1067+
1068+instance FromJSON Rule where
1069+ parseJSON
1070+ = withObject "Rule"
1071+ (\ o ->
1072+ 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"))
1079+
1080+instance ToJSON Rule where
1081+ toJSON Rule'{..}
1082+ = object
1083+ (catMaybes
1084+ [("action" .=) <$> _rAction,
1085+ ("notIns" .=) <$> _rNotIns, ("ins" .=) <$> _rIns,
1086+ ("logConfigs" .=) <$> _rLogConfigs,
1087+ ("conditions" .=) <$> _rConditions,
1088+ ("permissions" .=) <$> _rPermissions,
1089+ ("description" .=) <$> _rDescription])
1090+
1091+--
1092+-- /See:/ 'testPermissionsRequest' smart constructor.
1093+newtype TestPermissionsRequest = TestPermissionsRequest'
1094+ { _tPermissions :: Maybe [Text]
1095+ } deriving (Eq,Show,Data,Typeable,Generic)
1096+
1097+-- | Creates a value of 'TestPermissionsRequest' with the minimum fields required to make a request.
1098+--
1099+-- Use one of the following lenses to modify other fields as desired:
1100+--
1101+-- * 'tPermissions'
1102+testPermissionsRequest
1103+ :: TestPermissionsRequest
1104+testPermissionsRequest =
1105+ TestPermissionsRequest'
1106+ { _tPermissions = Nothing
1107+ }
1108+
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]
1112+tPermissions
1113+ = lens _tPermissions (\ s a -> s{_tPermissions = a})
1114+ . _Default
1115+ . _Coerce
1116+
1117+instance FromJSON TestPermissionsRequest where
1118+ parseJSON
1119+ = withObject "TestPermissionsRequest"
1120+ (\ o ->
1121+ TestPermissionsRequest' <$>
1122+ (o .:? "permissions" .!= mempty))
1123+
1124+instance ToJSON TestPermissionsRequest where
1125+ toJSON TestPermissionsRequest'{..}
1126+ = object
1127+ (catMaybes [("permissions" .=) <$> _tPermissions])
1128+
8211129-- |
8221130--
8231131-- /See:/ 'manifest' smart constructor.
@@ -1045,6 +1353,7 @@ instance ToJSON DeploymentsCancelPreviewRequest where
10451353-- /See:/ 'resource' smart constructor.
10461354data Resource = Resource'
10471355 { _rInsertTime :: !(Maybe Text)
1356+ , _rAccessControl :: !(Maybe ResourceAccessControl)
10481357 , _rURL :: !(Maybe Text)
10491358 , _rWarnings :: !(Maybe [ResourceWarningsItem])
10501359 , _rUpdateTime :: !(Maybe Text)
@@ -1063,6 +1372,8 @@ data Resource = Resource'
10631372--
10641373-- * 'rInsertTime'
10651374--
1375+-- * 'rAccessControl'
1376+--
10661377-- * 'rURL'
10671378--
10681379-- * 'rWarnings'
@@ -1087,6 +1398,7 @@ resource
10871398resource =
10881399 Resource'
10891400 { _rInsertTime = Nothing
1401+ , _rAccessControl = Nothing
10901402 , _rURL = Nothing
10911403 , _rWarnings = Nothing
10921404 , _rUpdateTime = Nothing
@@ -1105,6 +1417,12 @@ rInsertTime :: Lens' Resource (Maybe Text)
11051417rInsertTime
11061418 = lens _rInsertTime (\ s a -> s{_rInsertTime = a})
11071419
1420+-- | The Access Control Policy set on this resource.
1421+rAccessControl :: Lens' Resource (Maybe ResourceAccessControl)
1422+rAccessControl
1423+ = lens _rAccessControl
1424+ (\ s a -> s{_rAccessControl = a})
1425+
11081426-- | [Output Only] The URL of the actual resource.
11091427rURL :: Lens' Resource (Maybe Text)
11101428rURL = lens _rURL (\ s a -> s{_rURL = a})
@@ -1146,7 +1464,7 @@ rId
11461464 = lens _rId (\ s a -> s{_rId = a}) . mapping _Coerce
11471465
11481466-- | [Output Only] The type of the resource, for example compute.v1.instance,
1149−-- or replicaPools.v1beta2.instanceGroupManager.
1467+-- or cloudfunctions.v1beta1.function.
11501468rType :: Lens' Resource (Maybe Text)
11511469rType = lens _rType (\ s a -> s{_rType = a})
11521470
@@ -1166,8 +1484,9 @@ instance FromJSON Resource where
11661484 = withObject "Resource"
11671485 (\ o ->
11681486 Resource' <$>
1169− (o .:? "insertTime") <*> (o .:? "url") <*>
1170− (o .:? "warnings" .!= mempty)
1487+ (o .:? "insertTime") <*> (o .:? "accessControl") <*>
1488+ (o .:? "url")
1489+ <*> (o .:? "warnings" .!= mempty)
11711490 <*> (o .:? "updateTime")
11721491 <*> (o .:? "name")
11731492 <*> (o .:? "manifest")
@@ -1182,6 +1501,7 @@ instance ToJSON Resource where
11821501 = object
11831502 (catMaybes
11841503 [("insertTime" .=) <$> _rInsertTime,
1504+ ("accessControl" .=) <$> _rAccessControl,
11851505 ("url" .=) <$> _rURL, ("warnings" .=) <$> _rWarnings,
11861506 ("updateTime" .=) <$> _rUpdateTime,
11871507 ("name" .=) <$> _rName,
@@ -1383,11 +1703,142 @@ instance ToJSON OperationError where
13831703 toJSON OperationError'{..}
13841704 = object (catMaybes [("errors" .=) <$> _oeErrors])
13851705
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).
1719+--
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)
1729+
1730+-- | Creates a value of 'Policy' with the minimum fields required to make a request.
1731+--
1732+-- Use one of the following lenses to modify other fields as desired:
1733+--
1734+-- * 'pAuditConfigs'
1735+--
1736+-- * 'pEtag'
1737+--
1738+-- * 'pRules'
1739+--
1740+-- * 'pVersion'
1741+--
1742+-- * 'pBindings'
1743+--
1744+-- * 'pIAMOwned'
1745+policy
1746+ :: Policy
1747+policy =
1748+ Policy'
1749+ { _pAuditConfigs = Nothing
1750+ , _pEtag = Nothing
1751+ , _pRules = Nothing
1752+ , _pVersion = Nothing
1753+ , _pBindings = Nothing
1754+ , _pIAMOwned = Nothing
1755+ }
1756+
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
1761+-- logging.
1762+pAuditConfigs :: Lens' Policy [AuditConfig]
1763+pAuditConfigs
1764+ = lens _pAuditConfigs
1765+ (\ s a -> s{_pAuditConfigs = a})
1766+ . _Default
1767+ . _Coerce
1768+
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)
1779+pEtag
1780+ = lens _pEtag (\ s a -> s{_pEtag = a}) .
1781+ mapping _Base64
1782+
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]
1791+pRules
1792+ = lens _pRules (\ s a -> s{_pRules = a}) . _Default .
1793+ _Coerce
1794+
1795+-- | Version of the \`Policy\`. The default version is 0.
1796+pVersion :: Lens' Policy (Maybe Int32)
1797+pVersion
1798+ = lens _pVersion (\ s a -> s{_pVersion = a}) .
1799+ mapping _Coerce
1800+
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]
1805+pBindings
1806+ = lens _pBindings (\ s a -> s{_pBindings = a}) .
1807+ _Default
1808+ . _Coerce
1809+
1810+-- |
1811+pIAMOwned :: Lens' Policy (Maybe Bool)
1812+pIAMOwned
1813+ = lens _pIAMOwned (\ s a -> s{_pIAMOwned = a})
1814+
1815+instance FromJSON Policy where
1816+ parseJSON
1817+ = withObject "Policy"
1818+ (\ o ->
1819+ Policy' <$>
1820+ (o .:? "auditConfigs" .!= mempty) <*> (o .:? "etag")
1821+ <*> (o .:? "rules" .!= mempty)
1822+ <*> (o .:? "version")
1823+ <*> (o .:? "bindings" .!= mempty)
1824+ <*> (o .:? "iamOwned"))
1825+
1826+instance ToJSON Policy where
1827+ toJSON Policy'{..}
1828+ = object
1829+ (catMaybes
1830+ [("auditConfigs" .=) <$> _pAuditConfigs,
1831+ ("etag" .=) <$> _pEtag, ("rules" .=) <$> _pRules,
1832+ ("version" .=) <$> _pVersion,
1833+ ("bindings" .=) <$> _pBindings,
1834+ ("iamOwned" .=) <$> _pIAMOwned])
1835+
13861836-- | A resource type supported by Deployment Manager.
13871837--
13881838-- /See:/ 'type'' smart constructor.
13891839data Type = Type'
13901840 { _tInsertTime :: !(Maybe Text)
1841+ , _tOperation :: !(Maybe Operation)
13911842 , _tSelfLink :: !(Maybe Text)
13921843 , _tName :: !(Maybe Text)
13931844 , _tId :: !(Maybe (Textual Word64))
@@ -1399,6 +1850,8 @@ data Type = Type'
13991850--
14001851-- * 'tInsertTime'
14011852--
1853+-- * 'tOperation'
1854+--
14021855-- * 'tSelfLink'
14031856--
14041857-- * 'tName'
@@ -1409,6 +1862,7 @@ type'
14091862type' =
14101863 Type'
14111864 { _tInsertTime = Nothing
1865+ , _tOperation = Nothing
14121866 , _tSelfLink = Nothing
14131867 , _tName = Nothing
14141868 , _tId = Nothing
@@ -1420,6 +1874,12 @@ tInsertTime :: Lens' Type (Maybe Text)
14201874tInsertTime
14211875 = lens _tInsertTime (\ s a -> s{_tInsertTime = a})
14221876
1877+-- | [Output Only] The Operation that most recently ran, or is currently
1878+-- running, on this type.
1879+tOperation :: Lens' Type (Maybe Operation)
1880+tOperation
1881+ = lens _tOperation (\ s a -> s{_tOperation = a})
1882+
14231883-- | [Output Only] Self link for the type.
14241884tSelfLink :: Lens' Type (Maybe Text)
14251885tSelfLink
@@ -1439,8 +1899,9 @@ instance FromJSON Type where
14391899 = withObject "Type"
14401900 (\ o ->
14411901 Type' <$>
1442− (o .:? "insertTime") <*> (o .:? "selfLink") <*>
1443− (o .:? "name")
1902+ (o .:? "insertTime") <*> (o .:? "operation") <*>
1903+ (o .:? "selfLink")
1904+ <*> (o .:? "name")
14441905 <*> (o .:? "id"))
14451906
14461907instance ToJSON Type where
@@ -1448,6 +1909,7 @@ instance ToJSON Type where
14481909 = object
14491910 (catMaybes
14501911 [("insertTime" .=) <$> _tInsertTime,
1912+ ("operation" .=) <$> _tOperation,
14511913 ("selfLink" .=) <$> _tSelfLink,
14521914 ("name" .=) <$> _tName, ("id" .=) <$> _tId])
14531915
@@ -1687,6 +2149,91 @@ instance ToJSON ResourceUpdateError where
16872149 toJSON ResourceUpdateError'{..}
16882150 = object (catMaybes [("errors" .=) <$> _rueErrors])
16892151
2152+-- | A condition to be met.
2153+--
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)
2163+
2164+-- | Creates a value of 'Condition' with the minimum fields required to make a request.
2165+--
2166+-- Use one of the following lenses to modify other fields as desired:
2167+--
2168+-- * 'cOp'
2169+--
2170+-- * 'cIAM'
2171+--
2172+-- * 'cValues'
2173+--
2174+-- * 'cValue'
2175+--
2176+-- * 'cSys'
2177+--
2178+-- * 'cSvc'
2179+condition
2180+ :: Condition
2181+condition =
2182+ Condition'
2183+ { _cOp = Nothing
2184+ , _cIAM = Nothing
2185+ , _cValues = Nothing
2186+ , _cValue = Nothing
2187+ , _cSys = Nothing
2188+ , _cSvc = Nothing
2189+ }
2190+
2191+-- | An operator to apply the subject with.
2192+cOp :: Lens' Condition (Maybe Text)
2193+cOp = lens _cOp (\ s a -> s{_cOp = a})
2194+
2195+-- | Trusted attributes supplied by the IAM system.
2196+cIAM :: Lens' Condition (Maybe Text)
2197+cIAM = lens _cIAM (\ s a -> s{_cIAM = a})
2198+
2199+-- | The objects of the condition. This is mutually exclusive with \'value\'.
2200+cValues :: Lens' Condition [Text]
2201+cValues
2202+ = lens _cValues (\ s a -> s{_cValues = a}) . _Default
2203+ . _Coerce
2204+
2205+-- | DEPRECATED. Use \'values\' instead.
2206+cValue :: Lens' Condition (Maybe Text)
2207+cValue = lens _cValue (\ s a -> s{_cValue = a})
2208+
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})
2213+
2214+-- | Trusted attributes discharged by the service.
2215+cSvc :: Lens' Condition (Maybe Text)
2216+cSvc = lens _cSvc (\ s a -> s{_cSvc = a})
2217+
2218+instance FromJSON Condition where
2219+ parseJSON
2220+ = withObject "Condition"
2221+ (\ o ->
2222+ Condition' <$>
2223+ (o .:? "op") <*> (o .:? "iam") <*>
2224+ (o .:? "values" .!= mempty)
2225+ <*> (o .:? "value")
2226+ <*> (o .:? "sys")
2227+ <*> (o .:? "svc"))
2228+
2229+instance ToJSON Condition where
2230+ toJSON Condition'{..}
2231+ = object
2232+ (catMaybes
2233+ [("op" .=) <$> _cOp, ("iam" .=) <$> _cIAM,
2234+ ("values" .=) <$> _cValues, ("value" .=) <$> _cValue,
2235+ ("sys" .=) <$> _cSys, ("svc" .=) <$> _cSvc])
2236+
16902237-- | A response containing a partial list of deployments and a page token
16912238-- used to build the next request if the request has been truncated.
16922239--
@@ -1799,6 +2346,76 @@ instance ToJSON ResourceWarningsItem where
17992346 [("data" .=) <$> _rwiData, ("code" .=) <$> _rwiCode,
18002347 ("message" .=) <$> _rwiMessage])
18012348
2349+-- | Specifies what kind of log the caller must write
2350+--
2351+-- /See:/ 'logConfig' smart constructor.
2352+newtype LogConfig = LogConfig'
2353+ { _lcCounter :: Maybe LogConfigCounterOptions
2354+ } deriving (Eq,Show,Data,Typeable,Generic)
2355+
2356+-- | Creates a value of 'LogConfig' with the minimum fields required to make a request.
2357+--
2358+-- Use one of the following lenses to modify other fields as desired:
2359+--
2360+-- * 'lcCounter'
2361+logConfig
2362+ :: LogConfig
2363+logConfig =
2364+ LogConfig'
2365+ { _lcCounter = Nothing
2366+ }
2367+
2368+-- | Counter options.
2369+lcCounter :: Lens' LogConfig (Maybe LogConfigCounterOptions)
2370+lcCounter
2371+ = lens _lcCounter (\ s a -> s{_lcCounter = a})
2372+
2373+instance FromJSON LogConfig where
2374+ parseJSON
2375+ = withObject "LogConfig"
2376+ (\ o -> LogConfig' <$> (o .:? "counter"))
2377+
2378+instance ToJSON LogConfig where
2379+ toJSON LogConfig'{..}
2380+ = object (catMaybes [("counter" .=) <$> _lcCounter])
2381+
2382+-- | The access controls set on the resource.
2383+--
2384+-- /See:/ 'resourceAccessControl' smart constructor.
2385+newtype ResourceAccessControl = ResourceAccessControl'
2386+ { _racGcpIAMPolicy :: Maybe Text
2387+ } deriving (Eq,Show,Data,Typeable,Generic)
2388+
2389+-- | Creates a value of 'ResourceAccessControl' with the minimum fields required to make a request.
2390+--
2391+-- Use one of the following lenses to modify other fields as desired:
2392+--
2393+-- * 'racGcpIAMPolicy'
2394+resourceAccessControl
2395+ :: ResourceAccessControl
2396+resourceAccessControl =
2397+ ResourceAccessControl'
2398+ { _racGcpIAMPolicy = Nothing
2399+ }
2400+
2401+-- | The GCP IAM Policy to set on the resource.
2402+racGcpIAMPolicy :: Lens' ResourceAccessControl (Maybe Text)
2403+racGcpIAMPolicy
2404+ = lens _racGcpIAMPolicy
2405+ (\ s a -> s{_racGcpIAMPolicy = a})
2406+
2407+instance FromJSON ResourceAccessControl where
2408+ parseJSON
2409+ = withObject "ResourceAccessControl"
2410+ (\ o ->
2411+ ResourceAccessControl' <$> (o .:? "gcpIamPolicy"))
2412+
2413+instance ToJSON ResourceAccessControl where
2414+ toJSON ResourceAccessControl'{..}
2415+ = object
2416+ (catMaybes
2417+ [("gcpIamPolicy" .=) <$> _racGcpIAMPolicy])
2418+
18022419-- |
18032420--
18042421-- /See:/ 'targetConfiguration' smart constructor.
@@ -1908,6 +2525,68 @@ instance ToJSON OperationWarningsItem where
19082525 [("data" .=) <$> _owiData, ("code" .=) <$> _owiCode,
19092526 ("message" .=) <$> _owiMessage])
19102527
2528+-- | Associates \`members\` with a \`role\`.
2529+--
2530+-- /See:/ 'binding' smart constructor.
2531+data Binding = Binding'
2532+ { _bMembers :: !(Maybe [Text])
2533+ , _bRole :: !(Maybe Text)
2534+ } deriving (Eq,Show,Data,Typeable,Generic)
2535+
2536+-- | Creates a value of 'Binding' with the minimum fields required to make a request.
2537+--
2538+-- Use one of the following lenses to modify other fields as desired:
2539+--
2540+-- * 'bMembers'
2541+--
2542+-- * 'bRole'
2543+binding
2544+ :: Binding
2545+binding =
2546+ Binding'
2547+ { _bMembers = Nothing
2548+ , _bRole = Nothing
2549+ }
2550+
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]
2566+bMembers
2567+ = lens _bMembers (\ s a -> s{_bMembers = a}) .
2568+ _Default
2569+ . _Coerce
2570+
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})
2575+
2576+instance FromJSON Binding where
2577+ parseJSON
2578+ = withObject "Binding"
2579+ (\ o ->
2580+ Binding' <$>
2581+ (o .:? "members" .!= mempty) <*> (o .:? "role"))
2582+
2583+instance ToJSON Binding where
2584+ toJSON Binding'{..}
2585+ = object
2586+ (catMaybes
2587+ [("members" .=) <$> _bMembers,
2588+ ("role" .=) <$> _bRole])
2589+
19112590-- |
19122591--
19132592-- /See:/ 'deployment' smart constructor.