@@ -20,51 +20,6 @@ module Network.Google.KnowledgeGraphSearch.Types.Product where
2020import Network.Google.KnowledgeGraphSearch.Types.Sum
2121import Network.Google.Prelude
2222
23−-- | Options for counters
24−--
25−-- /See:/ 'counterOptions' smart constructor.
26−data CounterOptions = CounterOptions'
27− { _coField :: !(Maybe Text)
28− , _coMetric :: !(Maybe Text)
29− } deriving (Eq,Show,Data,Typeable,Generic)
30−
31−-- | Creates a value of 'CounterOptions' with the minimum fields required to make a request.
32−--
33−-- Use one of the following lenses to modify other fields as desired:
34−--
35−-- * 'coField'
36−--
37−-- * 'coMetric'
38−counterOptions
39− :: CounterOptions
40−counterOptions =
41− CounterOptions'
42− { _coField = Nothing
43− , _coMetric = Nothing
44− }
45−
46−-- | The field value to attribute.
47−coField :: Lens' CounterOptions (Maybe Text)
48−coField = lens _coField (\ s a -> s{_coField = a})
49−
50−-- | The metric to update.
51−coMetric :: Lens' CounterOptions (Maybe Text)
52−coMetric = lens _coMetric (\ s a -> s{_coMetric = a})
53−
54−instance FromJSON CounterOptions where
55− parseJSON
56− = withObject "CounterOptions"
57− (\ o ->
58− CounterOptions' <$>
59− (o .:? "field") <*> (o .:? "metric"))
60−
61−instance ToJSON CounterOptions where
62− toJSON CounterOptions'{..}
63− = object
64− (catMaybes
65− [("field" .=) <$> _coField,
66− ("metric" .=) <$> _coMetric])
67−
6823-- | A generic empty message that you can re-use to avoid defining duplicated
6924-- empty messages in your APIs. A typical example is to use it as the
7025-- request or the response type of an API method. For instance: service Foo
@@ -88,17 +43,62 @@ instance FromJSON Empty where
8843instance ToJSON Empty where
8944 toJSON = const emptyObject
9045
91−-- | Represents a service account key. A service account can have 0 or more
92−-- key pairs. The private keys for these are not stored by Google.
93−-- ServiceAccountKeys are immutable.
46+-- | Audit log information specific to Cloud IAM. This message is serialized
47+-- as an \`Any\` type in the \`ServiceData\` message of an \`AuditLog\`
48+-- message.
49+--
50+-- /See:/ 'auditData' smart constructor.
51+newtype AuditData = AuditData'
52+ { _adPolicyDelta :: Maybe PolicyDelta
53+ } deriving (Eq,Show,Data,Typeable,Generic)
54+
55+-- | Creates a value of 'AuditData' with the minimum fields required to make a request.
56+--
57+-- Use one of the following lenses to modify other fields as desired:
58+--
59+-- * 'adPolicyDelta'
60+auditData
61+ :: AuditData
62+auditData =
63+ AuditData'
64+ { _adPolicyDelta = Nothing
65+ }
66+
67+-- | Policy delta between the original policy and the newly set policy.
68+adPolicyDelta :: Lens' AuditData (Maybe PolicyDelta)
69+adPolicyDelta
70+ = lens _adPolicyDelta
71+ (\ s a -> s{_adPolicyDelta = a})
72+
73+instance FromJSON AuditData where
74+ parseJSON
75+ = withObject "AuditData"
76+ (\ o -> AuditData' <$> (o .:? "policyDelta"))
77+
78+instance ToJSON AuditData where
79+ toJSON AuditData'{..}
80+ = object
81+ (catMaybes [("policyDelta" .=) <$> _adPolicyDelta])
82+
83+-- | Represents a service account key. A service account has two sets of
84+-- key-pairs: user-managed, and system-managed. User-managed key-pairs can
85+-- be created and deleted by users. Users are responsible for rotating
86+-- these keys periodically to ensure security of their service accounts.
87+-- Users retain the private key of these key-pairs, and Google retains ONLY
88+-- the public key. System-managed key-pairs are managed automatically by
89+-- Google, and rotated daily without user intervention. The private key
90+-- never leaves Google\'s servers to maximize security. Public keys for all
91+-- service accounts are also published at the OAuth2 Service Account API.
9492--
9593-- /See:/ 'serviceAccountKey' smart constructor.
9694data ServiceAccountKey = ServiceAccountKey'
9795 { _sakValidAfterTime :: !(Maybe Text)
9896 , _sakPrivateKeyData :: !(Maybe Base64)
97+ , _sakPublicKeyData :: !(Maybe Base64)
9998 , _sakName :: !(Maybe Text)
10099 , _sakPrivateKeyType :: !(Maybe Text)
101100 , _sakValidBeforeTime :: !(Maybe Text)
101+ , _sakKeyAlgorithm :: !(Maybe Text)
102102 } deriving (Eq,Show,Data,Typeable,Generic)
103103
104104-- | Creates a value of 'ServiceAccountKey' with the minimum fields required to make a request.
@@ -109,20 +109,26 @@ data ServiceAccountKey = ServiceAccountKey'
109109--
110110-- * 'sakPrivateKeyData'
111111--
112+-- * 'sakPublicKeyData'
113+--
112114-- * 'sakName'
113115--
114116-- * 'sakPrivateKeyType'
115117--
116118-- * 'sakValidBeforeTime'
119+--
120+-- * 'sakKeyAlgorithm'
117121serviceAccountKey
118122 :: ServiceAccountKey
119123serviceAccountKey =
120124 ServiceAccountKey'
121125 { _sakValidAfterTime = Nothing
122126 , _sakPrivateKeyData = Nothing
127+ , _sakPublicKeyData = Nothing
123128 , _sakName = Nothing
124129 , _sakPrivateKeyType = Nothing
125130 , _sakValidBeforeTime = Nothing
131+ , _sakKeyAlgorithm = Nothing
126132 }
127133
128134-- | The key can be used after this timestamp.
@@ -131,19 +137,32 @@ sakValidAfterTime
131137 = lens _sakValidAfterTime
132138 (\ s a -> s{_sakValidAfterTime = a})
133139
134−-- | The key data.
140+-- | The private key data. Only provided in \`CreateServiceAccountKey\`
141+-- responses.
135142sakPrivateKeyData :: Lens' ServiceAccountKey (Maybe ByteString)
136143sakPrivateKeyData
137144 = lens _sakPrivateKeyData
138145 (\ s a -> s{_sakPrivateKeyData = a})
139146 . mapping _Base64
140147
141−-- | The resource name of the service account key in the format
142−-- \"projects\/{project}\/serviceAccounts\/{email}\/keys\/{key}\".
148+-- | The public key data. Only provided in \`GetServiceAccountKey\`
149+-- responses.
150+sakPublicKeyData :: Lens' ServiceAccountKey (Maybe ByteString)
151+sakPublicKeyData
152+ = lens _sakPublicKeyData
153+ (\ s a -> s{_sakPublicKeyData = a})
154+ . mapping _Base64
155+
156+-- | The resource name of the service account key in the following format
157+-- \`projects\/{project}\/serviceAccounts\/{account}\/keys\/{key}\`.
143158sakName :: Lens' ServiceAccountKey (Maybe Text)
144159sakName = lens _sakName (\ s a -> s{_sakName = a})
145160
146−-- | The type of the private key.
161+-- | The output format for the private key. Only provided in
162+-- \`CreateServiceAccountKey\` responses, not in \`GetServiceAccountKey\`
163+-- or \`ListServiceAccountKey\` responses. Google never exposes
164+-- system-managed private keys, and never retains user-managed private
165+-- keys.
147166sakPrivateKeyType :: Lens' ServiceAccountKey (Maybe Text)
148167sakPrivateKeyType
149168 = lens _sakPrivateKeyType
@@ -155,15 +174,23 @@ sakValidBeforeTime
155174 = lens _sakValidBeforeTime
156175 (\ s a -> s{_sakValidBeforeTime = a})
157176
177+-- | Specifies the algorithm (and possibly key size) for the key.
178+sakKeyAlgorithm :: Lens' ServiceAccountKey (Maybe Text)
179+sakKeyAlgorithm
180+ = lens _sakKeyAlgorithm
181+ (\ s a -> s{_sakKeyAlgorithm = a})
182+
158183instance FromJSON ServiceAccountKey where
159184 parseJSON
160185 = withObject "ServiceAccountKey"
161186 (\ o ->
162187 ServiceAccountKey' <$>
163188 (o .:? "validAfterTime") <*> (o .:? "privateKeyData")
189+ <*> (o .:? "publicKeyData")
164190 <*> (o .:? "name")
165191 <*> (o .:? "privateKeyType")
166− <*> (o .:? "validBeforeTime"))
192+ <*> (o .:? "validBeforeTime")
193+ <*> (o .:? "keyAlgorithm"))
167194
168195instance ToJSON ServiceAccountKey where
169196 toJSON ServiceAccountKey'{..}
@@ -171,129 +198,18 @@ instance ToJSON ServiceAccountKey where
171198 (catMaybes
172199 [("validAfterTime" .=) <$> _sakValidAfterTime,
173200 ("privateKeyData" .=) <$> _sakPrivateKeyData,
201+ ("publicKeyData" .=) <$> _sakPublicKeyData,
174202 ("name" .=) <$> _sakName,
175203 ("privateKeyType" .=) <$> _sakPrivateKeyType,
176− ("validBeforeTime" .=) <$> _sakValidBeforeTime])
177−
178−-- | A rule to be applied in a Policy.
179−--
180−-- /See:/ 'rule' smart constructor.
181−data Rule = Rule'
182− { _rAction :: !(Maybe Text)
183− , _rIn :: !(Maybe [Text])
184− , _rNotIn :: !(Maybe [Text])
185− , _rConditions :: !(Maybe [Condition])
186− , _rPermissions :: !(Maybe [Text])
187− , _rLogConfig :: !(Maybe [LogConfig])
188− , _rDescription :: !(Maybe Text)
189− } deriving (Eq,Show,Data,Typeable,Generic)
190−
191−-- | Creates a value of 'Rule' with the minimum fields required to make a request.
192−--
193−-- Use one of the following lenses to modify other fields as desired:
194−--
195−-- * 'rAction'
196−--
197−-- * 'rIn'
198−--
199−-- * 'rNotIn'
200−--
201−-- * 'rConditions'
202−--
203−-- * 'rPermissions'
204−--
205−-- * 'rLogConfig'
206−--
207−-- * 'rDescription'
208−rule
209− :: Rule
210−rule =
211− Rule'
212− { _rAction = Nothing
213− , _rIn = Nothing
214− , _rNotIn = Nothing
215− , _rConditions = Nothing
216− , _rPermissions = Nothing
217− , _rLogConfig = Nothing
218− , _rDescription = Nothing
219− }
220−
221−-- | Required
222−rAction :: Lens' Rule (Maybe Text)
223−rAction = lens _rAction (\ s a -> s{_rAction = a})
224−
225−-- | The rule matches if the PRINCIPAL\/AUTHORITY_SELECTOR is in this set of
226−-- entries.
227−rIn :: Lens' Rule [Text]
228−rIn
229− = lens _rIn (\ s a -> s{_rIn = a}) . _Default .
230− _Coerce
231−
232−-- | The rule matches if the PRINCIPAL\/AUTHORITY_SELECTOR is not in this set
233−-- of entries. The format for in and not_in entries is the same as for
234−-- members in a Binding (see google\/iam\/v1\/policy.proto).
235−rNotIn :: Lens' Rule [Text]
236−rNotIn
237− = lens _rNotIn (\ s a -> s{_rNotIn = a}) . _Default .
238− _Coerce
239−
240−-- | Additional restrictions that must be met
241−rConditions :: Lens' Rule [Condition]
242−rConditions
243− = lens _rConditions (\ s a -> s{_rConditions = a}) .
244− _Default
245− . _Coerce
246−
247−-- | A permission is a string of form \'..\' (e.g.,
248−-- \'storage.buckets.list\'). A value of \'*\' matches all permissions, and
249−-- a verb part of \'*\' (e.g., \'storage.buckets.*\') matches all verbs.
250−rPermissions :: Lens' Rule [Text]
251−rPermissions
252− = lens _rPermissions (\ s a -> s{_rPermissions = a})
253− . _Default
254− . _Coerce
255−
256−-- | The config returned to callers of tech.iam.IAM.CheckPolicy for any
257−-- entries that match the LOG action.
258−rLogConfig :: Lens' Rule [LogConfig]
259−rLogConfig
260− = lens _rLogConfig (\ s a -> s{_rLogConfig = a}) .
261− _Default
262− . _Coerce
263−
264−-- | Human-readable description of the rule.
265−rDescription :: Lens' Rule (Maybe Text)
266−rDescription
267− = lens _rDescription (\ s a -> s{_rDescription = a})
268−
269−instance FromJSON Rule where
270− parseJSON
271− = withObject "Rule"
272− (\ o ->
273− Rule' <$>
274− (o .:? "action") <*> (o .:? "in" .!= mempty) <*>
275− (o .:? "notIn" .!= mempty)
276− <*> (o .:? "conditions" .!= mempty)
277− <*> (o .:? "permissions" .!= mempty)
278− <*> (o .:? "logConfig" .!= mempty)
279− <*> (o .:? "description"))
280−
281−instance ToJSON Rule where
282− toJSON Rule'{..}
283− = object
284− (catMaybes
285− [("action" .=) <$> _rAction, ("in" .=) <$> _rIn,
286− ("notIn" .=) <$> _rNotIn,
287− ("conditions" .=) <$> _rConditions,
288− ("permissions" .=) <$> _rPermissions,
289− ("logConfig" .=) <$> _rLogConfig,
290− ("description" .=) <$> _rDescription])
204+ ("validBeforeTime" .=) <$> _sakValidBeforeTime,
205+ ("keyAlgorithm" .=) <$> _sakKeyAlgorithm])
291206
292207-- | The service account key create request.
293208--
294209-- /See:/ 'createServiceAccountKeyRequest' smart constructor.
295−newtype CreateServiceAccountKeyRequest = CreateServiceAccountKeyRequest'
296− { _csakrPrivateKeyType :: Maybe Text
210+data CreateServiceAccountKeyRequest = CreateServiceAccountKeyRequest'
211+ { _csakrPrivateKeyType :: !(Maybe Text)
212+ , _csakrKeyAlgorithm :: !(Maybe Text)
297213 } deriving (Eq,Show,Data,Typeable,Generic)
298214
299215-- | Creates a value of 'CreateServiceAccountKeyRequest' with the minimum fields required to make a request.
@@ -301,33 +217,44 @@ newtype CreateServiceAccountKeyRequest = CreateServiceAccountKeyRequest'
301217-- Use one of the following lenses to modify other fields as desired:
302218--
303219-- * 'csakrPrivateKeyType'
220+--
221+-- * 'csakrKeyAlgorithm'
304222createServiceAccountKeyRequest
305223 :: CreateServiceAccountKeyRequest
306224createServiceAccountKeyRequest =
307225 CreateServiceAccountKeyRequest'
308226 { _csakrPrivateKeyType = Nothing
227+ , _csakrKeyAlgorithm = Nothing
309228 }
310229
311−-- | The type of the key requested. GOOGLE_CREDENTIALS is the default key
312−-- type.
230+-- | The output format of the private key. \`GOOGLE_CREDENTIALS_FILE\` is the
231+-- default output format.
313232csakrPrivateKeyType :: Lens' CreateServiceAccountKeyRequest (Maybe Text)
314233csakrPrivateKeyType
315234 = lens _csakrPrivateKeyType
316235 (\ s a -> s{_csakrPrivateKeyType = a})
317236
237+-- | Which type of key and algorithm to use for the key. The default is
238+-- currently a 4K RSA key. However this may change in the future.
239+csakrKeyAlgorithm :: Lens' CreateServiceAccountKeyRequest (Maybe Text)
240+csakrKeyAlgorithm
241+ = lens _csakrKeyAlgorithm
242+ (\ s a -> s{_csakrKeyAlgorithm = a})
243+
318244instance FromJSON CreateServiceAccountKeyRequest
319245 where
320246 parseJSON
321247 = withObject "CreateServiceAccountKeyRequest"
322248 (\ o ->
323249 CreateServiceAccountKeyRequest' <$>
324− (o .:? "privateKeyType"))
250+ (o .:? "privateKeyType") <*> (o .:? "keyAlgorithm"))
325251
326252instance ToJSON CreateServiceAccountKeyRequest where
327253 toJSON CreateServiceAccountKeyRequest'{..}
328254 = object
329255 (catMaybes
330− [("privateKeyType" .=) <$> _csakrPrivateKeyType])
256+ [("privateKeyType" .=) <$> _csakrPrivateKeyType,
257+ ("keyAlgorithm" .=) <$> _csakrKeyAlgorithm])
331258
332259-- | Request message for \`SetIamPolicy\` method.
333260--
@@ -365,6 +292,64 @@ instance ToJSON SetIAMPolicyRequest where
365292 toJSON SetIAMPolicyRequest'{..}
366293 = object (catMaybes [("policy" .=) <$> _siprPolicy])
367294
295+-- | One delta entry for Binding. Each individual change (only one member in
296+-- each entry) to a binding will be a separate entry.
297+--
298+-- /See:/ 'bindingDelta' smart constructor.
299+data BindingDelta = BindingDelta'
300+ { _bdAction :: !(Maybe Text)
301+ , _bdRole :: !(Maybe Text)
302+ , _bdMember :: !(Maybe Text)
303+ } deriving (Eq,Show,Data,Typeable,Generic)
304+
305+-- | Creates a value of 'BindingDelta' with the minimum fields required to make a request.
306+--
307+-- Use one of the following lenses to modify other fields as desired:
308+--
309+-- * 'bdAction'
310+--
311+-- * 'bdRole'
312+--
313+-- * 'bdMember'
314+bindingDelta
315+ :: BindingDelta
316+bindingDelta =
317+ BindingDelta'
318+ { _bdAction = Nothing
319+ , _bdRole = Nothing
320+ , _bdMember = Nothing
321+ }
322+
323+-- | The action that was performed on a Binding. Required
324+bdAction :: Lens' BindingDelta (Maybe Text)
325+bdAction = lens _bdAction (\ s a -> s{_bdAction = a})
326+
327+-- | Role that is assigned to \`members\`. For example, \`roles\/viewer\`,
328+-- \`roles\/editor\`, or \`roles\/owner\`. Required
329+bdRole :: Lens' BindingDelta (Maybe Text)
330+bdRole = lens _bdRole (\ s a -> s{_bdRole = a})
331+
332+-- | A single identity requesting access for a Cloud Platform resource.
333+-- Follows the same format of Binding.members. Required
334+bdMember :: Lens' BindingDelta (Maybe Text)
335+bdMember = lens _bdMember (\ s a -> s{_bdMember = a})
336+
337+instance FromJSON BindingDelta where
338+ parseJSON
339+ = withObject "BindingDelta"
340+ (\ o ->
341+ BindingDelta' <$>
342+ (o .:? "action") <*> (o .:? "role") <*>
343+ (o .:? "member"))
344+
345+instance ToJSON BindingDelta where
346+ toJSON BindingDelta'{..}
347+ = object
348+ (catMaybes
349+ [("action" .=) <$> _bdAction,
350+ ("role" .=) <$> _bdRole,
351+ ("member" .=) <$> _bdMember])
352+
368353-- | The service account sign blob request.
369354--
370355-- /See:/ 'signBlobRequest' smart constructor.
@@ -384,7 +369,7 @@ signBlobRequest =
384369 { _sbrBytesToSign = Nothing
385370 }
386371
387−-- | The bytes to sign
372+-- | The bytes to sign.
388373sbrBytesToSign :: Lens' SignBlobRequest (Maybe ByteString)
389374sbrBytesToSign
390375 = lens _sbrBytesToSign
@@ -439,57 +424,80 @@ instance ToJSON ListServiceAccountKeysResponse where
439424 toJSON ListServiceAccountKeysResponse'{..}
440425 = object (catMaybes [("keys" .=) <$> _lsakrKeys])
441426
442−-- | Write a Cloud Audit log
427+-- | A role in the Identity and Access Management API.
443428--
444−-- /See:/ 'cloudAuditOptions' smart constructor.
445−data CloudAuditOptions =
446− CloudAuditOptions'
447− deriving (Eq,Show,Data,Typeable,Generic)
429+-- /See:/ 'role'' smart constructor.
430+data Role = Role'
431+ { _rName :: !(Maybe Text)
432+ , _rTitle :: !(Maybe Text)
433+ , _rDescription :: !(Maybe Text)
434+ } deriving (Eq,Show,Data,Typeable,Generic)
448435
449−-- | Creates a value of 'CloudAuditOptions' with the minimum fields required to make a request.
436+-- | Creates a value of 'Role' with the minimum fields required to make a request.
450437--
451−cloudAuditOptions
452− :: CloudAuditOptions
453−cloudAuditOptions = CloudAuditOptions'
454−
455−instance FromJSON CloudAuditOptions where
456− parseJSON
457− = withObject "CloudAuditOptions"
458− (\ o -> pure CloudAuditOptions')
459−
460−instance ToJSON CloudAuditOptions where
461− toJSON = const emptyObject
462−
463−-- | Write a Data Access (Gin) log
438+-- Use one of the following lenses to modify other fields as desired:
464439--
465−-- /See:/ 'dataAccessOptions' smart constructor.
466−data DataAccessOptions =
467− DataAccessOptions'
468− deriving (Eq,Show,Data,Typeable,Generic)
469−
470−-- | Creates a value of 'DataAccessOptions' with the minimum fields required to make a request.
440+-- * 'rName'
441+--
442+-- * 'rTitle'
471443--
472−dataAccessOptions
473− :: DataAccessOptions
474−dataAccessOptions = DataAccessOptions'
444+-- * 'rDescription'
445+role'
446+ :: Role
447+role' =
448+ Role'
449+ { _rName = Nothing
450+ , _rTitle = Nothing
451+ , _rDescription = Nothing
452+ }
475453
476−instance FromJSON DataAccessOptions where
454+-- | The name of the role. When Role is used in CreateRole, the role name
455+-- must not be set. When Role is used in output and other input such as
456+-- UpdateRole, the role name is the complete path, e.g.,
457+-- roles\/logging.viewer for curated roles and
458+-- organizations\/{organization-id}\/roles\/logging.viewer for custom
459+-- roles.
460+rName :: Lens' Role (Maybe Text)
461+rName = lens _rName (\ s a -> s{_rName = a})
462+
463+-- | Optional. A human-readable title for the role. Typically this is limited
464+-- to 100 UTF-8 bytes.
465+rTitle :: Lens' Role (Maybe Text)
466+rTitle = lens _rTitle (\ s a -> s{_rTitle = a})
467+
468+-- | Optional. A human-readable description for the role.
469+rDescription :: Lens' Role (Maybe Text)
470+rDescription
471+ = lens _rDescription (\ s a -> s{_rDescription = a})
472+
473+instance FromJSON Role where
477474 parseJSON
478− = withObject "DataAccessOptions"
479− (\ o -> pure DataAccessOptions')
475+ = withObject "Role"
476+ (\ o ->
477+ Role' <$>
478+ (o .:? "name") <*> (o .:? "title") <*>
479+ (o .:? "description"))
480480
481−instance ToJSON DataAccessOptions where
482− toJSON = const emptyObject
481+instance ToJSON Role where
482+ toJSON Role'{..}
483+ = object
484+ (catMaybes
485+ [("name" .=) <$> _rName, ("title" .=) <$> _rTitle,
486+ ("description" .=) <$> _rDescription])
483487
484488-- | A service account in the Identity and Access Management API. To create a
485−-- service account, you specify the project_id and account_id for the
486−-- account. The account_id is unique within the project, and used to
487−-- generate the service account email address and a stable unique id. All
488−-- other methods can identify accounts using the format
489−-- \"projects\/{project}\/serviceAccounts\/{account}\". Using \'-\' as a
490−-- wildcard for the project, will infer the project from the account. The
491−-- account value can be the email address or the unique_id of the service
492−-- account.
489+-- service account, specify the \`project_id\` and the \`account_id\` for
490+-- the account. The \`account_id\` is unique within the project, and is
491+-- used to generate the service account email address and a stable
492+-- \`unique_id\`. If the account already exists, the account\'s resource
493+-- name is returned in util::Status\'s ResourceInfo.resource_name in the
494+-- format of projects\/{project}\/serviceAccounts\/{email}. The caller can
495+-- use the name in other methods to access the account. All other methods
496+-- can identify the service account using the format
497+-- \`projects\/{project}\/serviceAccounts\/{account}\`. Using \`-\` as a
498+-- wildcard for the project will infer the project from the account. The
499+-- \`account\` value can be the \`email\` address or the \`unique_id\` of
500+-- the service account.
493501--
494502-- /See:/ 'serviceAccount' smart constructor.
495503data ServiceAccount = ServiceAccount'
@@ -532,7 +540,7 @@ serviceAccount =
532540 , _saOAuth2ClientId = Nothing
533541 }
534542
535−-- | \'OutputOnly Email address of the service account.
543+-- | \'OutputOnly The email address of the service account.
536544saEmail :: Lens' ServiceAccount (Maybe Text)
537545saEmail = lens _saEmail (\ s a -> s{_saEmail = a})
538546
@@ -542,17 +550,18 @@ saEtag
542550 = lens _saEtag (\ s a -> s{_saEtag = a}) .
543551 mapping _Base64
544552
545−-- | \'OutputOnly unique and stable id of the service account.
553+-- | \'OutputOnly The unique and stable id of the service account.
546554saUniqueId :: Lens' ServiceAccount (Maybe Text)
547555saUniqueId
548556 = lens _saUniqueId (\ s a -> s{_saUniqueId = a})
549557
550−-- | The resource name of the service account in the format
551−-- \"projects\/{project}\/serviceAccounts\/{account}\". In requests using
552−-- \'-\' as a wildcard for the project, will infer the project from the
553−-- account and the account value can be the email address or the unique_id
554−-- of the service account. In responses the resource name will always be in
555−-- the format \"projects\/{project}\/serviceAccounts\/{email}\".
558+-- | The resource name of the service account in the following format:
559+-- \`projects\/{project}\/serviceAccounts\/{account}\`. Requests using
560+-- \`-\` as a wildcard for the project will infer the project from the
561+-- \`account\` and the \`account\` value can be the \`email\` address or
562+-- the \`unique_id\` of the service account. In responses the resource name
563+-- will always be in the format
564+-- \`projects\/{project}\/serviceAccounts\/{email}\`.
556565saName :: Lens' ServiceAccount (Maybe Text)
557566saName = lens _saName (\ s a -> s{_saName = a})
558567
@@ -599,6 +608,43 @@ instance ToJSON ServiceAccount where
599608 ("projectId" .=) <$> _saProjectId,
600609 ("oauth2ClientId" .=) <$> _saOAuth2ClientId])
601610
611+-- | The grantable role query response.
612+--
613+-- /See:/ 'queryGrantableRolesResponse' smart constructor.
614+newtype QueryGrantableRolesResponse = QueryGrantableRolesResponse'
615+ { _qgrrRoles :: Maybe [Role]
616+ } deriving (Eq,Show,Data,Typeable,Generic)
617+
618+-- | Creates a value of 'QueryGrantableRolesResponse' with the minimum fields required to make a request.
619+--
620+-- Use one of the following lenses to modify other fields as desired:
621+--
622+-- * 'qgrrRoles'
623+queryGrantableRolesResponse
624+ :: QueryGrantableRolesResponse
625+queryGrantableRolesResponse =
626+ QueryGrantableRolesResponse'
627+ { _qgrrRoles = Nothing
628+ }
629+
630+-- | The list of matching roles.
631+qgrrRoles :: Lens' QueryGrantableRolesResponse [Role]
632+qgrrRoles
633+ = lens _qgrrRoles (\ s a -> s{_qgrrRoles = a}) .
634+ _Default
635+ . _Coerce
636+
637+instance FromJSON QueryGrantableRolesResponse where
638+ parseJSON
639+ = withObject "QueryGrantableRolesResponse"
640+ (\ o ->
641+ QueryGrantableRolesResponse' <$>
642+ (o .:? "roles" .!= mempty))
643+
644+instance ToJSON QueryGrantableRolesResponse where
645+ toJSON QueryGrantableRolesResponse'{..}
646+ = object (catMaybes [("roles" .=) <$> _qgrrRoles])
647+
602648-- | Request message for \`TestIamPermissions\` method.
603649--
604650-- /See:/ 'testIAMPermissionsRequest' smart constructor.
@@ -620,7 +666,8 @@ testIAMPermissionsRequest =
620666
621667-- | The set of permissions to check for the \`resource\`. Permissions with
622668-- wildcards (such as \'*\' or \'storage.*\') are not allowed. For more
623−-- information see IAM Overview.
669+-- information see [IAM
670+-- Overview](https:\/\/cloud.google.com\/iam\/docs\/overview#permissions).
624671tiprPermissions :: Lens' TestIAMPermissionsRequest [Text]
625672tiprPermissions
626673 = lens _tiprPermissions
@@ -690,7 +737,7 @@ instance ToJSON TestIAMPermissionsResponse where
690737-- \"bindings\": [ { \"role\": \"roles\/owner\", \"members\": [
691738-- \"user:mike\'example.com\", \"group:admins\'example.com\",
692739-- \"domain:google.com\",
693−-- \"serviceAccount:my-other-app\'appspot.gserviceaccount.com\"] }, {
740+-- \"serviceAccount:my-other-app\'appspot.gserviceaccount.com\", ] }, {
694741-- \"role\": \"roles\/viewer\", \"members\": [\"user:sean\'example.com\"] }
695742-- ] } For a description of IAM and its features, see the [IAM developer\'s
696743-- guide](https:\/\/cloud.google.com\/iam).
@@ -698,7 +745,6 @@ instance ToJSON TestIAMPermissionsResponse where
698745-- /See:/ 'policy' smart constructor.
699746data Policy = Policy'
700747 { _pEtag :: !(Maybe Base64)
701− , _pRules :: !(Maybe [Rule])
702748 , _pVersion :: !(Maybe (Textual Int32))
703749 , _pBindings :: !(Maybe [Binding])
704750 } deriving (Eq,Show,Data,Typeable,Generic)
@@ -709,8 +755,6 @@ data Policy = Policy'
709755--
710756-- * 'pEtag'
711757--
712−-- * 'pRules'
713−--
714758-- * 'pVersion'
715759--
716760-- * 'pBindings'
@@ -719,7 +763,6 @@ policy
719763policy =
720764 Policy'
721765 { _pEtag = Nothing
722− , _pRules = Nothing
723766 , _pVersion = Nothing
724767 , _pBindings = Nothing
725768 }
@@ -738,11 +781,6 @@ pEtag
738781 = lens _pEtag (\ s a -> s{_pEtag = a}) .
739782 mapping _Base64
740783
741−pRules :: Lens' Policy [Rule]
742−pRules
743− = lens _pRules (\ s a -> s{_pRules = a}) . _Default .
744− _Coerce
745−
746784-- | Version of the \`Policy\`. The default version is 0.
747785pVersion :: Lens' Policy (Maybe Int32)
748786pVersion
@@ -763,102 +801,96 @@ instance FromJSON Policy where
763801 = withObject "Policy"
764802 (\ o ->
765803 Policy' <$>
766− (o .:? "etag") <*> (o .:? "rules" .!= mempty) <*>
767− (o .:? "version")
768− <*> (o .:? "bindings" .!= mempty))
804+ (o .:? "etag") <*> (o .:? "version") <*>
805+ (o .:? "bindings" .!= mempty))
769806
770807instance ToJSON Policy where
771808 toJSON Policy'{..}
772809 = object
773810 (catMaybes
774− [("etag" .=) <$> _pEtag, ("rules" .=) <$> _pRules,
811+ [("etag" .=) <$> _pEtag,
775812 ("version" .=) <$> _pVersion,
776813 ("bindings" .=) <$> _pBindings])
777814
778−-- | A condition to be met.
815+-- | The difference delta between two policies.
779816--
780−-- /See:/ 'condition' smart constructor.
781−data Condition = Condition'
782− { _cOp :: !(Maybe Text)
783− , _cIAM :: !(Maybe Text)
784− , _cValues :: !(Maybe [Text])
785− , _cValue :: !(Maybe Text)
786− , _cSys :: !(Maybe Text)
787− , _cSvc :: !(Maybe Text)
817+-- /See:/ 'policyDelta' smart constructor.
818+newtype PolicyDelta = PolicyDelta'
819+ { _pdBindingDeltas :: Maybe [BindingDelta]
788820 } deriving (Eq,Show,Data,Typeable,Generic)
789821
790−-- | Creates a value of 'Condition' with the minimum fields required to make a request.
822+-- | Creates a value of 'PolicyDelta' with the minimum fields required to make a request.
791823--
792824-- Use one of the following lenses to modify other fields as desired:
793825--
794−-- * 'cOp'
795−--
796−-- * 'cIAM'
797−--
798−-- * 'cValues'
799−--
800−-- * 'cValue'
801−--
802−-- * 'cSys'
803−--
804−-- * 'cSvc'
805−condition
806− :: Condition
807−condition =
808− Condition'
809− { _cOp = Nothing
810− , _cIAM = Nothing
811− , _cValues = Nothing
812− , _cValue = Nothing
813− , _cSys = Nothing
814− , _cSvc = Nothing
826+-- * 'pdBindingDeltas'
827+policyDelta
828+ :: PolicyDelta
829+policyDelta =
830+ PolicyDelta'
831+ { _pdBindingDeltas = Nothing
815832 }
816833
817−-- | An operator to apply the subject with.
818−cOp :: Lens' Condition (Maybe Text)
819−cOp = lens _cOp (\ s a -> s{_cOp = a})
834+-- | The delta for Bindings between two policies.
835+pdBindingDeltas :: Lens' PolicyDelta [BindingDelta]
836+pdBindingDeltas
837+ = lens _pdBindingDeltas
838+ (\ s a -> s{_pdBindingDeltas = a})
839+ . _Default
840+ . _Coerce
820841
821−-- | Trusted attributes supplied by the IAM system.
822−cIAM :: Lens' Condition (Maybe Text)
823−cIAM = lens _cIAM (\ s a -> s{_cIAM = a})
842+instance FromJSON PolicyDelta where
843+ parseJSON
844+ = withObject "PolicyDelta"
845+ (\ o ->
846+ PolicyDelta' <$> (o .:? "bindingDeltas" .!= mempty))
824847
825−-- | The objects of the condition. This is mutually exclusive with \'value\'.
826−cValues :: Lens' Condition [Text]
827−cValues
828− = lens _cValues (\ s a -> s{_cValues = a}) . _Default
829− . _Coerce
848+instance ToJSON PolicyDelta where
849+ toJSON PolicyDelta'{..}
850+ = object
851+ (catMaybes
852+ [("bindingDeltas" .=) <$> _pdBindingDeltas])
830853
831−-- | The object of the condition. Exactly one of these must be set.
832−cValue :: Lens' Condition (Maybe Text)
833−cValue = lens _cValue (\ s a -> s{_cValue = a})
854+-- | The grantable role query request.
855+--
856+-- /See:/ 'queryGrantableRolesRequest' smart constructor.
857+newtype QueryGrantableRolesRequest = QueryGrantableRolesRequest'
858+ { _qgrrFullResourceName :: Maybe Text
859+ } deriving (Eq,Show,Data,Typeable,Generic)
834860
835−-- | Trusted attributes supplied by any service that owns resources and uses
836−-- the IAM system for access control.
837−cSys :: Lens' Condition (Maybe Text)
838−cSys = lens _cSys (\ s a -> s{_cSys = a})
861+-- | Creates a value of 'QueryGrantableRolesRequest' with the minimum fields required to make a request.
862+--
863+-- Use one of the following lenses to modify other fields as desired:
864+--
865+-- * 'qgrrFullResourceName'
866+queryGrantableRolesRequest
867+ :: QueryGrantableRolesRequest
868+queryGrantableRolesRequest =
869+ QueryGrantableRolesRequest'
870+ { _qgrrFullResourceName = Nothing
871+ }
839872
840−-- | Trusted attributes discharged by the service.
841−cSvc :: Lens' Condition (Maybe Text)
842−cSvc = lens _cSvc (\ s a -> s{_cSvc = a})
873+-- | Required. The full resource name to query from the list of grantable
874+-- roles. The name follows the Google Cloud Platform resource format. For
875+-- example, a Cloud Platform project with id \`my-project\` will be named
876+-- \`\/\/cloudresourcemanager.googleapis.com\/projects\/my-project\`.
877+qgrrFullResourceName :: Lens' QueryGrantableRolesRequest (Maybe Text)
878+qgrrFullResourceName
879+ = lens _qgrrFullResourceName
880+ (\ s a -> s{_qgrrFullResourceName = a})
843881
844−instance FromJSON Condition where
882+instance FromJSON QueryGrantableRolesRequest where
845883 parseJSON
846− = withObject "Condition"
884+ = withObject "QueryGrantableRolesRequest"
847885 (\ o ->
848− Condition' <$>
849− (o .:? "op") <*> (o .:? "iam") <*>
850− (o .:? "values" .!= mempty)
851− <*> (o .:? "value")
852− <*> (o .:? "sys")
853− <*> (o .:? "svc"))
854−
855−instance ToJSON Condition where
856− toJSON Condition'{..}
886+ QueryGrantableRolesRequest' <$>
887+ (o .:? "fullResourceName"))
888+
889+instance ToJSON QueryGrantableRolesRequest where
890+ toJSON QueryGrantableRolesRequest'{..}
857891 = object
858892 (catMaybes
859− [("op" .=) <$> _cOp, ("iam" .=) <$> _cIAM,
860− ("values" .=) <$> _cValues, ("value" .=) <$> _cValue,
861− ("sys" .=) <$> _cSys, ("svc" .=) <$> _cSvc])
893+ [("fullResourceName" .=) <$> _qgrrFullResourceName])
862894
863895-- | The service account sign blob response.
864896--
@@ -931,7 +963,7 @@ listServiceAccountsResponse =
931963 }
932964
933965-- | To retrieve the next page of results, set
934−-- [ListServiceAccountsRequest.page_token] to this value.
966+-- ListServiceAccountsRequest.page_token to this value.
935967lsarNextPageToken :: Lens' ListServiceAccountsResponse (Maybe Text)
936968lsarNextPageToken
937969 = lens _lsarNextPageToken
@@ -959,76 +991,6 @@ instance ToJSON ListServiceAccountsResponse where
959991 [("nextPageToken" .=) <$> _lsarNextPageToken,
960992 ("accounts" .=) <$> _lsarAccounts])
961993
962−-- | Specifies what kind of log the caller must write Increment a streamz
963−-- counter with the specified metric and field names. Metric names should
964−-- start with a \'\/\', generally be lowercase-only, and end in \"_count\".
965−-- Field names should not contain an initial slash. The actual exported
966−-- metric names will have \"\/iam\/policy\" prepended. Field names
967−-- correspond to IAM request parameters and field values are their
968−-- respective values. At present only \"iam_principal\", corresponding to
969−-- IAMContext.principal, is supported. Examples: counter { metric:
970−-- \"\/debug_access_count\" field: \"iam_principal\" } ==> increment
971−-- counter \/iam\/policy\/backend_debug_access_count {iam_principal=[value
972−-- of IAMContext.principal]} At this time we do not support: * multiple
973−-- field names (though this may be supported in the future) * decrementing
974−-- the counter * incrementing it by anything other than 1
975−--
976−-- /See:/ 'logConfig' smart constructor.
977−data LogConfig = LogConfig'
978− { _lcCloudAudit :: !(Maybe CloudAuditOptions)
979− , _lcDataAccess :: !(Maybe DataAccessOptions)
980− , _lcCounter :: !(Maybe CounterOptions)
981− } deriving (Eq,Show,Data,Typeable,Generic)
982−
983−-- | Creates a value of 'LogConfig' with the minimum fields required to make a request.
984−--
985−-- Use one of the following lenses to modify other fields as desired:
986−--
987−-- * 'lcCloudAudit'
988−--
989−-- * 'lcDataAccess'
990−--
991−-- * 'lcCounter'
992−logConfig
993− :: LogConfig
994−logConfig =
995− LogConfig'
996− { _lcCloudAudit = Nothing
997− , _lcDataAccess = Nothing
998− , _lcCounter = Nothing
999− }
1000−
1001−-- | Cloud audit options.
1002−lcCloudAudit :: Lens' LogConfig (Maybe CloudAuditOptions)
1003−lcCloudAudit
1004− = lens _lcCloudAudit (\ s a -> s{_lcCloudAudit = a})
1005−
1006−-- | Data access options.
1007−lcDataAccess :: Lens' LogConfig (Maybe DataAccessOptions)
1008−lcDataAccess
1009− = lens _lcDataAccess (\ s a -> s{_lcDataAccess = a})
1010−
1011−-- | Counter options.
1012−lcCounter :: Lens' LogConfig (Maybe CounterOptions)
1013−lcCounter
1014− = lens _lcCounter (\ s a -> s{_lcCounter = a})
1015−
1016−instance FromJSON LogConfig where
1017− parseJSON
1018− = withObject "LogConfig"
1019− (\ o ->
1020− LogConfig' <$>
1021− (o .:? "cloudAudit") <*> (o .:? "dataAccess") <*>
1022− (o .:? "counter"))
1023−
1024−instance ToJSON LogConfig where
1025− toJSON LogConfig'{..}
1026− = object
1027− (catMaybes
1028− [("cloudAudit" .=) <$> _lcCloudAudit,
1029− ("dataAccess" .=) <$> _lcDataAccess,
1030− ("counter" .=) <$> _lcCounter])
1031−
1032994-- | The service account create request.
1033995--
1034996-- /See:/ 'createServiceAccountRequest' smart constructor.
@@ -1053,7 +1015,7 @@ createServiceAccountRequest =
10531015 }
10541016
10551017-- | The ServiceAccount resource to create. Currently, only the following
1056−-- values are user assignable: display_name .
1018+-- values are user assignable: \`display_name\` .
10571019csarServiceAccount :: Lens' CreateServiceAccountRequest (Maybe ServiceAccount)
10581020csarServiceAccount
10591021 = lens _csarServiceAccount
@@ -1061,8 +1023,8 @@ csarServiceAccount
10611023
10621024-- | Required. The account id that is used to generate the service account
10631025-- email address and a stable unique id. It is unique within a project,
1064−-- must be 1-63 characters long, and match the regular expression
1065−-- [a-z]([-a-z0-9]*[a-z0-9]) to comply with RFC1035.
1026+-- must be 6-30 characters long, and match the regular expression
1027+-- \`[a-z]([-a-z0-9]*[a-z0-9])\` to comply with RFC1035.
10661028csarAccountId :: Lens' CreateServiceAccountRequest (Maybe Text)
10671029csarAccountId
10681030 = lens _csarAccountId