@@ -20,51 +20,6 @@ module Network.Google.KnowledgeGraphSearch.Types.Product where
20import Network.Google.KnowledgeGraphSearch.Types.Sum
20import Network.Google.KnowledgeGraphSearch.Types.Sum
21import Network.Google.Prelude
21import Network.Google.Prelude
23−-- | Options for counters
25−-- /See:/ 'counterOptions' smart constructor.
26−data CounterOptions = CounterOptions'
27− { _coField :: !(Maybe Text)
28− , _coMetric :: !(Maybe Text)
29− } deriving (Eq,Show,Data,Typeable,Generic)
31−-- | Creates a value of 'CounterOptions' with the minimum fields required to make a request.
33−-- Use one of the following lenses to modify other fields as desired:
43− , _coMetric = Nothing
46−-- | The field value to attribute.
47−coField :: Lens' CounterOptions (Maybe Text)
48−coField = lens _coField (\ s a -> s{_coField = a})
50−-- | The metric to update.
51−coMetric :: Lens' CounterOptions (Maybe Text)
52−coMetric = lens _coMetric (\ s a -> s{_coMetric = a})
54−instance FromJSON CounterOptions where
56− = withObject "CounterOptions"
59− (o .:? "field") <*> (o .:? "metric"))
61−instance ToJSON CounterOptions where
62− toJSON CounterOptions'{..}
65− [("field" .=) <$> _coField,
66− ("metric" .=) <$> _coMetric])
68-- | A generic empty message that you can re-use to avoid defining duplicated
23-- | A generic empty message that you can re-use to avoid defining duplicated
69-- empty messages in your APIs. A typical example is to use it as the
24-- empty messages in your APIs. A typical example is to use it as the
70-- request or the response type of an API method. For instance: service Foo
25-- request or the response type of an API method. For instance: service Foo
@@ -88,17 +43,62 @@ instance FromJSON Empty where
88instance ToJSON Empty where
43instance ToJSON Empty where
89 toJSON = const emptyObject
44 toJSON = const emptyObject
46+-- | Audit log information specific to Cloud IAM. This message is serialized
47+-- as an \`Any\` type in the \`ServiceData\` message of an \`AuditLog\`
50+-- /See:/ 'auditData' smart constructor.
51+newtype AuditData = AuditData'
52+ { _adPolicyDelta :: Maybe PolicyDelta
53+ } deriving (Eq,Show,Data,Typeable,Generic)
55+-- | Creates a value of 'AuditData' with the minimum fields required to make a request.
57+-- Use one of the following lenses to modify other fields as desired:
64+ { _adPolicyDelta = Nothing
67+-- | Policy delta between the original policy and the newly set policy.
68+adPolicyDelta :: Lens' AuditData (Maybe PolicyDelta)
70+ = lens _adPolicyDelta
71+ (\ s a -> s{_adPolicyDelta = a})
73+instance FromJSON AuditData where
75+ = withObject "AuditData"
76+ (\ o -> AuditData' <$> (o .:? "policyDelta"))
78+instance ToJSON AuditData where
79+ toJSON AuditData'{..}
81+ (catMaybes [("policyDelta" .=) <$> _adPolicyDelta])
91−-- | Represents a service account key. A service account can have 0 or more
83+-- | Represents a service account key. A service account has two sets of
92−-- key pairs. The private keys for these are not stored by Google.
84+-- key-pairs: user-managed, and system-managed. User-managed key-pairs can
93−-- ServiceAccountKeys are immutable.
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.
95-- /See:/ 'serviceAccountKey' smart constructor.
93-- /See:/ 'serviceAccountKey' smart constructor.
96data ServiceAccountKey = ServiceAccountKey'
94data ServiceAccountKey = ServiceAccountKey'
97 { _sakValidAfterTime :: !(Maybe Text)
95 { _sakValidAfterTime :: !(Maybe Text)
98 , _sakPrivateKeyData :: !(Maybe Base64)
96 , _sakPrivateKeyData :: !(Maybe Base64)
97+ , _sakPublicKeyData :: !(Maybe Base64)
99 , _sakName :: !(Maybe Text)
98 , _sakName :: !(Maybe Text)
100 , _sakPrivateKeyType :: !(Maybe Text)
99 , _sakPrivateKeyType :: !(Maybe Text)
101 , _sakValidBeforeTime :: !(Maybe Text)
100 , _sakValidBeforeTime :: !(Maybe Text)
101+ , _sakKeyAlgorithm :: !(Maybe Text)
102 } deriving (Eq,Show,Data,Typeable,Generic)
102 } deriving (Eq,Show,Data,Typeable,Generic)
104-- | Creates a value of 'ServiceAccountKey' with the minimum fields required to make a request.
104-- | Creates a value of 'ServiceAccountKey' with the minimum fields required to make a request.
@@ -109,20 +109,26 @@ data ServiceAccountKey = ServiceAccountKey'
110-- * 'sakPrivateKeyData'
110-- * 'sakPrivateKeyData'
112+-- * 'sakPublicKeyData'
112-- * 'sakName'
114-- * 'sakName'
114-- * 'sakPrivateKeyType'
116-- * 'sakPrivateKeyType'
116-- * 'sakValidBeforeTime'
118-- * 'sakValidBeforeTime'
120+-- * 'sakKeyAlgorithm'
117serviceAccountKey
121serviceAccountKey
118 :: ServiceAccountKey
122 :: ServiceAccountKey
119serviceAccountKey =
123serviceAccountKey =
120 ServiceAccountKey'
124 ServiceAccountKey'
121 { _sakValidAfterTime = Nothing
125 { _sakValidAfterTime = Nothing
122 , _sakPrivateKeyData = Nothing
126 , _sakPrivateKeyData = Nothing
127+ , _sakPublicKeyData = Nothing
123 , _sakName = Nothing
128 , _sakName = Nothing
124 , _sakPrivateKeyType = Nothing
129 , _sakPrivateKeyType = Nothing
125 , _sakValidBeforeTime = Nothing
130 , _sakValidBeforeTime = Nothing
131+ , _sakKeyAlgorithm = Nothing
128-- | The key can be used after this timestamp.
134-- | The key can be used after this timestamp.
@@ -131,19 +137,32 @@ sakValidAfterTime
131 = lens _sakValidAfterTime
137 = lens _sakValidAfterTime
132 (\ s a -> s{_sakValidAfterTime = a})
138 (\ s a -> s{_sakValidAfterTime = a})
134−-- | The key data.
140+-- | The private key data. Only provided in \`CreateServiceAccountKey\`
135sakPrivateKeyData :: Lens' ServiceAccountKey (Maybe ByteString)
142sakPrivateKeyData :: Lens' ServiceAccountKey (Maybe ByteString)
136sakPrivateKeyData
143sakPrivateKeyData
137 = lens _sakPrivateKeyData
144 = lens _sakPrivateKeyData
138 (\ s a -> s{_sakPrivateKeyData = a})
145 (\ s a -> s{_sakPrivateKeyData = a})
139 . mapping _Base64
146 . mapping _Base64
148+-- | The public key data. Only provided in \`GetServiceAccountKey\`
150+sakPublicKeyData :: Lens' ServiceAccountKey (Maybe ByteString)
152+ = lens _sakPublicKeyData
153+ (\ s a -> s{_sakPublicKeyData = a})
141−-- | The resource name of the service account key in the format
156+-- | The resource name of the service account key in the following format
142−-- \"projects\/{project}\/serviceAccounts\/{email}\/keys\/{key}\".
157+-- \`projects\/{project}\/serviceAccounts\/{account}\/keys\/{key}\`.
143sakName :: Lens' ServiceAccountKey (Maybe Text)
158sakName :: Lens' ServiceAccountKey (Maybe Text)
144sakName = lens _sakName (\ s a -> s{_sakName = a})
159sakName = lens _sakName (\ s a -> s{_sakName = a})
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
147sakPrivateKeyType :: Lens' ServiceAccountKey (Maybe Text)
166sakPrivateKeyType :: Lens' ServiceAccountKey (Maybe Text)
148sakPrivateKeyType
167sakPrivateKeyType
149 = lens _sakPrivateKeyType
168 = lens _sakPrivateKeyType
@@ -155,15 +174,23 @@ sakValidBeforeTime
155 = lens _sakValidBeforeTime
174 = lens _sakValidBeforeTime
156 (\ s a -> s{_sakValidBeforeTime = a})
175 (\ s a -> s{_sakValidBeforeTime = a})
177+-- | Specifies the algorithm (and possibly key size) for the key.
178+sakKeyAlgorithm :: Lens' ServiceAccountKey (Maybe Text)
180+ = lens _sakKeyAlgorithm
181+ (\ s a -> s{_sakKeyAlgorithm = a})
158instance FromJSON ServiceAccountKey where
183instance FromJSON ServiceAccountKey where
159 parseJSON
184 parseJSON
160 = withObject "ServiceAccountKey"
185 = withObject "ServiceAccountKey"
162 ServiceAccountKey' <$>
187 ServiceAccountKey' <$>
163 (o .:? "validAfterTime") <*> (o .:? "privateKeyData")
188 (o .:? "validAfterTime") <*> (o .:? "privateKeyData")
189+ <*> (o .:? "publicKeyData")
164 <*> (o .:? "name")
190 <*> (o .:? "name")
165 <*> (o .:? "privateKeyType")
191 <*> (o .:? "privateKeyType")
166− <*> (o .:? "validBeforeTime"))
192+ <*> (o .:? "validBeforeTime")
193+ <*> (o .:? "keyAlgorithm"))
168instance ToJSON ServiceAccountKey where
195instance ToJSON ServiceAccountKey where
169 toJSON ServiceAccountKey'{..}
196 toJSON ServiceAccountKey'{..}
@@ -171,129 +198,18 @@ instance ToJSON ServiceAccountKey where
171 (catMaybes
198 (catMaybes
172 [("validAfterTime" .=) <$> _sakValidAfterTime,
199 [("validAfterTime" .=) <$> _sakValidAfterTime,
173 ("privateKeyData" .=) <$> _sakPrivateKeyData,
200 ("privateKeyData" .=) <$> _sakPrivateKeyData,
201+ ("publicKeyData" .=) <$> _sakPublicKeyData,
174 ("name" .=) <$> _sakName,
202 ("name" .=) <$> _sakName,
175 ("privateKeyType" .=) <$> _sakPrivateKeyType,
203 ("privateKeyType" .=) <$> _sakPrivateKeyType,
176− ("validBeforeTime" .=) <$> _sakValidBeforeTime])
204+ ("validBeforeTime" .=) <$> _sakValidBeforeTime,
177−
205+ ("keyAlgorithm" .=) <$> _sakKeyAlgorithm])
178−-- | A rule to be applied in a Policy.
180−-- /See:/ 'rule' smart constructor.
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)
191−-- | Creates a value of 'Rule' with the minimum fields required to make a request.
193−-- Use one of the following lenses to modify other fields as desired:
212− { _rAction = Nothing
215− , _rConditions = Nothing
216− , _rPermissions = Nothing
217− , _rLogConfig = Nothing
218− , _rDescription = Nothing
222−rAction :: Lens' Rule (Maybe Text)
223−rAction = lens _rAction (\ s a -> s{_rAction = a})
225−-- | The rule matches if the PRINCIPAL\/AUTHORITY_SELECTOR is in this set of
227−rIn :: Lens' Rule [Text]
229− = lens _rIn (\ s a -> s{_rIn = a}) . _Default .
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]
237− = lens _rNotIn (\ s a -> s{_rNotIn = a}) . _Default .
240−-- | Additional restrictions that must be met
241−rConditions :: Lens' Rule [Condition]
243− = lens _rConditions (\ s a -> s{_rConditions = a}) .
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]
252− = lens _rPermissions (\ s a -> s{_rPermissions = a})
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]
260− = lens _rLogConfig (\ s a -> s{_rLogConfig = a}) .
264−-- | Human-readable description of the rule.
265−rDescription :: Lens' Rule (Maybe Text)
267− = lens _rDescription (\ s a -> s{_rDescription = a})
269−instance FromJSON Rule where
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"))
281−instance ToJSON Rule where
285− [("action" .=) <$> _rAction, ("in" .=) <$> _rIn,
286− ("notIn" .=) <$> _rNotIn,
287− ("conditions" .=) <$> _rConditions,
288− ("permissions" .=) <$> _rPermissions,
289− ("logConfig" .=) <$> _rLogConfig,
290− ("description" .=) <$> _rDescription])
292-- | The service account key create request.
207-- | The service account key create request.
294-- /See:/ 'createServiceAccountKeyRequest' smart constructor.
209-- /See:/ 'createServiceAccountKeyRequest' smart constructor.
295−newtype CreateServiceAccountKeyRequest = CreateServiceAccountKeyRequest'
210+data CreateServiceAccountKeyRequest = CreateServiceAccountKeyRequest'
296− { _csakrPrivateKeyType :: Maybe Text
211+ { _csakrPrivateKeyType :: !(Maybe Text)
212+ , _csakrKeyAlgorithm :: !(Maybe Text)
297 } deriving (Eq,Show,Data,Typeable,Generic)
213 } deriving (Eq,Show,Data,Typeable,Generic)
299-- | Creates a value of 'CreateServiceAccountKeyRequest' with the minimum fields required to make a request.
215-- | Creates a value of 'CreateServiceAccountKeyRequest' with the minimum fields required to make a request.
@@ -301,33 +217,44 @@ newtype CreateServiceAccountKeyRequest = CreateServiceAccountKeyRequest'
301-- Use one of the following lenses to modify other fields as desired:
217-- Use one of the following lenses to modify other fields as desired:
303-- * 'csakrPrivateKeyType'
219-- * 'csakrPrivateKeyType'
221+-- * 'csakrKeyAlgorithm'
304createServiceAccountKeyRequest
222createServiceAccountKeyRequest
305 :: CreateServiceAccountKeyRequest
223 :: CreateServiceAccountKeyRequest
306createServiceAccountKeyRequest =
224createServiceAccountKeyRequest =
307 CreateServiceAccountKeyRequest'
225 CreateServiceAccountKeyRequest'
308 { _csakrPrivateKeyType = Nothing
226 { _csakrPrivateKeyType = Nothing
227+ , _csakrKeyAlgorithm = Nothing
311−-- | The type of the key requested. GOOGLE_CREDENTIALS is the default key
230+-- | The output format of the private key. \`GOOGLE_CREDENTIALS_FILE\` is the
312−-- type.
231+-- default output format.
313csakrPrivateKeyType :: Lens' CreateServiceAccountKeyRequest (Maybe Text)
232csakrPrivateKeyType :: Lens' CreateServiceAccountKeyRequest (Maybe Text)
314csakrPrivateKeyType
233csakrPrivateKeyType
315 = lens _csakrPrivateKeyType
234 = lens _csakrPrivateKeyType
316 (\ s a -> s{_csakrPrivateKeyType = a})
235 (\ s a -> s{_csakrPrivateKeyType = a})
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)
241+ = lens _csakrKeyAlgorithm
242+ (\ s a -> s{_csakrKeyAlgorithm = a})
318instance FromJSON CreateServiceAccountKeyRequest
244instance FromJSON CreateServiceAccountKeyRequest
320 parseJSON
246 parseJSON
321 = withObject "CreateServiceAccountKeyRequest"
247 = withObject "CreateServiceAccountKeyRequest"
323 CreateServiceAccountKeyRequest' <$>
249 CreateServiceAccountKeyRequest' <$>
324− (o .:? "privateKeyType"))
250+ (o .:? "privateKeyType") <*> (o .:? "keyAlgorithm"))
326instance ToJSON CreateServiceAccountKeyRequest where
252instance ToJSON CreateServiceAccountKeyRequest where
327 toJSON CreateServiceAccountKeyRequest'{..}
253 toJSON CreateServiceAccountKeyRequest'{..}
329 (catMaybes
255 (catMaybes
330− [("privateKeyType" .=) <$> _csakrPrivateKeyType])
256+ [("privateKeyType" .=) <$> _csakrPrivateKeyType,
257+ ("keyAlgorithm" .=) <$> _csakrKeyAlgorithm])
332-- | Request message for \`SetIamPolicy\` method.
259-- | Request message for \`SetIamPolicy\` method.
@@ -365,6 +292,64 @@ instance ToJSON SetIAMPolicyRequest where
365 toJSON SetIAMPolicyRequest'{..}
292 toJSON SetIAMPolicyRequest'{..}
366 = object (catMaybes [("policy" .=) <$> _siprPolicy])
293 = object (catMaybes [("policy" .=) <$> _siprPolicy])
295+-- | One delta entry for Binding. Each individual change (only one member in
296+-- each entry) to a binding will be a separate entry.
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)
305+-- | Creates a value of 'BindingDelta' with the minimum fields required to make a request.
307+-- Use one of the following lenses to modify other fields as desired:
318+ { _bdAction = Nothing
320+ , _bdMember = Nothing
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})
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})
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})
337+instance FromJSON BindingDelta where
339+ = withObject "BindingDelta"
342+ (o .:? "action") <*> (o .:? "role") <*>
345+instance ToJSON BindingDelta where
346+ toJSON BindingDelta'{..}
349+ [("action" .=) <$> _bdAction,
350+ ("role" .=) <$> _bdRole,
351+ ("member" .=) <$> _bdMember])
368-- | The service account sign blob request.
353-- | The service account sign blob request.
370-- /See:/ 'signBlobRequest' smart constructor.
355-- /See:/ 'signBlobRequest' smart constructor.
@@ -384,7 +369,7 @@ signBlobRequest =
384 { _sbrBytesToSign = Nothing
369 { _sbrBytesToSign = Nothing
387−-- | The bytes to sign
372+-- | The bytes to sign.
388sbrBytesToSign :: Lens' SignBlobRequest (Maybe ByteString)
373sbrBytesToSign :: Lens' SignBlobRequest (Maybe ByteString)
389sbrBytesToSign
374sbrBytesToSign
390 = lens _sbrBytesToSign
375 = lens _sbrBytesToSign
@@ -439,57 +424,80 @@ instance ToJSON ListServiceAccountKeysResponse where
439 toJSON ListServiceAccountKeysResponse'{..}
424 toJSON ListServiceAccountKeysResponse'{..}
440 = object (catMaybes [("keys" .=) <$> _lsakrKeys])
425 = object (catMaybes [("keys" .=) <$> _lsakrKeys])
442−-- | Write a Cloud Audit log
427+-- | A role in the Identity and Access Management API.
444−-- /See:/ 'cloudAuditOptions' smart constructor.
429+-- /See:/ 'role'' smart constructor.
445−data CloudAuditOptions =
430+data Role = Role'
446− CloudAuditOptions'
431+ { _rName :: !(Maybe Text)
432+ , _rTitle :: !(Maybe Text)
433+ , _rDescription :: !(Maybe Text)
447− deriving (Eq,Show,Data,Typeable,Generic)
434+ } deriving (Eq,Show,Data,Typeable,Generic)
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.
451−cloudAuditOptions
438+-- Use one of the following lenses to modify other fields as desired:
452− :: CloudAuditOptions
453−cloudAuditOptions = CloudAuditOptions'
455−instance FromJSON CloudAuditOptions where
457− = withObject "CloudAuditOptions"
458− (\ o -> pure CloudAuditOptions')
460−instance ToJSON CloudAuditOptions where
461− toJSON = const emptyObject
463−-- | Write a Data Access (Gin) log
465−-- /See:/ 'dataAccessOptions' smart constructor.
440+-- * 'rName'
466−data DataAccessOptions =
441+--
467− DataAccessOptions'
442+-- * 'rTitle'
468− deriving (Eq,Show,Data,Typeable,Generic)
470−-- | Creates a value of 'DataAccessOptions' with the minimum fields required to make a request.
472−dataAccessOptions
444+-- * 'rDescription'
473− :: DataAccessOptions
445+role'
474−dataAccessOptions = DataAccessOptions'
446+ :: Role
451+ , _rDescription = Nothing
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
460+rName :: Lens' Role (Maybe Text)
461+rName = lens _rName (\ s a -> s{_rName = a})
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})
468+-- | Optional. A human-readable description for the role.
469+rDescription :: Lens' Role (Maybe Text)
471+ = lens _rDescription (\ s a -> s{_rDescription = a})
476−instance FromJSON DataAccessOptions where
473+instance FromJSON Role where
477 parseJSON
474 parseJSON
478− = withObject "DataAccessOptions"
475+ = withObject "Role"
479− (\ o -> pure DataAccessOptions')
476+ (\ o ->
478+ (o .:? "name") <*> (o .:? "title") <*>
479+ (o .:? "description"))
481−instance ToJSON DataAccessOptions where
481+instance ToJSON Role where
482− toJSON = const emptyObject
482+ toJSON Role'{..}
485+ [("name" .=) <$> _rName, ("title" .=) <$> _rTitle,
486+ ("description" .=) <$> _rDescription])
484-- | A service account in the Identity and Access Management API. To create a
488-- | 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
489+-- service account, specify the \`project_id\` and the \`account_id\` for
486−-- account. The account_id is unique within the project, and used to
490+-- the account. The \`account_id\` is unique within the project, and is
487−-- generate the service account email address and a stable unique id. All
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
488−-- other methods can identify accounts using the format
496+-- can identify the service account using the format
489−-- \"projects\/{project}\/serviceAccounts\/{account}\". Using \'-\' as a
497+-- \`projects\/{project}\/serviceAccounts\/{account}\`. Using \`-\` as a
490−-- wildcard for the project, will infer the project from the account. The
498+-- 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
499+-- \`account\` value can be the \`email\` address or the \`unique_id\` of
492−-- account.
500+-- the service account.
494-- /See:/ 'serviceAccount' smart constructor.
502-- /See:/ 'serviceAccount' smart constructor.
495data ServiceAccount = ServiceAccount'
503data ServiceAccount = ServiceAccount'
@@ -532,7 +540,7 @@ serviceAccount =
532 , _saOAuth2ClientId = Nothing
540 , _saOAuth2ClientId = Nothing
535−-- | \'OutputOnly Email address of the service account.
543+-- | \'OutputOnly The email address of the service account.
536saEmail :: Lens' ServiceAccount (Maybe Text)
544saEmail :: Lens' ServiceAccount (Maybe Text)
537saEmail = lens _saEmail (\ s a -> s{_saEmail = a})
545saEmail = lens _saEmail (\ s a -> s{_saEmail = a})
@@ -542,17 +550,18 @@ saEtag
542 = lens _saEtag (\ s a -> s{_saEtag = a}) .
550 = lens _saEtag (\ s a -> s{_saEtag = a}) .
543 mapping _Base64
551 mapping _Base64
545−-- | \'OutputOnly unique and stable id of the service account.
553+-- | \'OutputOnly The unique and stable id of the service account.
546saUniqueId :: Lens' ServiceAccount (Maybe Text)
554saUniqueId :: Lens' ServiceAccount (Maybe Text)
547saUniqueId
555saUniqueId
548 = lens _saUniqueId (\ s a -> s{_saUniqueId = a})
556 = lens _saUniqueId (\ s a -> s{_saUniqueId = a})
550−-- | The resource name of the service account in the format
558+-- | The resource name of the service account in the following format:
551−-- \"projects\/{project}\/serviceAccounts\/{account}\". In requests using
559+-- \`projects\/{project}\/serviceAccounts\/{account}\`. Requests using
552−-- \'-\' as a wildcard for the project, will infer the project from the
560+-- \`-\` 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
561+-- \`account\` and the \`account\` value can be the \`email\` address or
554−-- of the service account. In responses the resource name will always be in
562+-- the \`unique_id\` of the service account. In responses the resource name
563+-- will always be in the format
555−-- the format \"projects\/{project}\/serviceAccounts\/{email}\".
564+-- \`projects\/{project}\/serviceAccounts\/{email}\`.
556saName :: Lens' ServiceAccount (Maybe Text)
565saName :: Lens' ServiceAccount (Maybe Text)
557saName = lens _saName (\ s a -> s{_saName = a})
566saName = lens _saName (\ s a -> s{_saName = a})
@@ -599,6 +608,43 @@ instance ToJSON ServiceAccount where
599 ("projectId" .=) <$> _saProjectId,
608 ("projectId" .=) <$> _saProjectId,
600 ("oauth2ClientId" .=) <$> _saOAuth2ClientId])
609 ("oauth2ClientId" .=) <$> _saOAuth2ClientId])
611+-- | The grantable role query response.
613+-- /See:/ 'queryGrantableRolesResponse' smart constructor.
614+newtype QueryGrantableRolesResponse = QueryGrantableRolesResponse'
615+ { _qgrrRoles :: Maybe [Role]
616+ } deriving (Eq,Show,Data,Typeable,Generic)
618+-- | Creates a value of 'QueryGrantableRolesResponse' with the minimum fields required to make a request.
620+-- Use one of the following lenses to modify other fields as desired:
623+queryGrantableRolesResponse
624+ :: QueryGrantableRolesResponse
625+queryGrantableRolesResponse =
626+ QueryGrantableRolesResponse'
627+ { _qgrrRoles = Nothing
630+-- | The list of matching roles.
631+qgrrRoles :: Lens' QueryGrantableRolesResponse [Role]
633+ = lens _qgrrRoles (\ s a -> s{_qgrrRoles = a}) .
637+instance FromJSON QueryGrantableRolesResponse where
639+ = withObject "QueryGrantableRolesResponse"
641+ QueryGrantableRolesResponse' <$>
642+ (o .:? "roles" .!= mempty))
644+instance ToJSON QueryGrantableRolesResponse where
645+ toJSON QueryGrantableRolesResponse'{..}
646+ = object (catMaybes [("roles" .=) <$> _qgrrRoles])
602-- | Request message for \`TestIamPermissions\` method.
648-- | Request message for \`TestIamPermissions\` method.
604-- /See:/ 'testIAMPermissionsRequest' smart constructor.
650-- /See:/ 'testIAMPermissionsRequest' smart constructor.
@@ -620,7 +666,8 @@ testIAMPermissionsRequest =
621-- | The set of permissions to check for the \`resource\`. Permissions with
667-- | The set of permissions to check for the \`resource\`. Permissions with
622-- wildcards (such as \'*\' or \'storage.*\') are not allowed. For more
668-- 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).
624tiprPermissions :: Lens' TestIAMPermissionsRequest [Text]
671tiprPermissions :: Lens' TestIAMPermissionsRequest [Text]
625tiprPermissions
672tiprPermissions
626 = lens _tiprPermissions
673 = lens _tiprPermissions
@@ -690,7 +737,7 @@ instance ToJSON TestIAMPermissionsResponse where
690-- \"bindings\": [ { \"role\": \"roles\/owner\", \"members\": [
737-- \"bindings\": [ { \"role\": \"roles\/owner\", \"members\": [
691-- \"user:mike\'example.com\", \"group:admins\'example.com\",
738-- \"user:mike\'example.com\", \"group:admins\'example.com\",
692-- \"domain:google.com\",
739-- \"domain:google.com\",
693−-- \"serviceAccount:my-other-app\'appspot.gserviceaccount.com\"] }, {
740+-- \"serviceAccount:my-other-app\'appspot.gserviceaccount.com\", ] }, {
694-- \"role\": \"roles\/viewer\", \"members\": [\"user:sean\'example.com\"] }
741-- \"role\": \"roles\/viewer\", \"members\": [\"user:sean\'example.com\"] }
695-- ] } For a description of IAM and its features, see the [IAM developer\'s
742-- ] } For a description of IAM and its features, see the [IAM developer\'s
696-- guide](https:\/\/cloud.google.com\/iam).
743-- guide](https:\/\/cloud.google.com\/iam).
@@ -698,7 +745,6 @@ instance ToJSON TestIAMPermissionsResponse where
698-- /See:/ 'policy' smart constructor.
745-- /See:/ 'policy' smart constructor.
699data Policy = Policy'
746data Policy = Policy'
700 { _pEtag :: !(Maybe Base64)
747 { _pEtag :: !(Maybe Base64)
701− , _pRules :: !(Maybe [Rule])
702 , _pVersion :: !(Maybe (Textual Int32))
748 , _pVersion :: !(Maybe (Textual Int32))
703 , _pBindings :: !(Maybe [Binding])
749 , _pBindings :: !(Maybe [Binding])
704 } deriving (Eq,Show,Data,Typeable,Generic)
750 } deriving (Eq,Show,Data,Typeable,Generic)
@@ -709,8 +755,6 @@ data Policy = Policy'
710-- * 'pEtag'
756-- * 'pEtag'
714-- * 'pVersion'
758-- * 'pVersion'
716-- * 'pBindings'
760-- * 'pBindings'
@@ -719,7 +763,6 @@ policy
721 { _pEtag = Nothing
765 { _pEtag = Nothing
723 , _pVersion = Nothing
766 , _pVersion = Nothing
724 , _pBindings = Nothing
767 , _pBindings = Nothing
@@ -738,11 +781,6 @@ pEtag
738 = lens _pEtag (\ s a -> s{_pEtag = a}) .
781 = lens _pEtag (\ s a -> s{_pEtag = a}) .
739 mapping _Base64
782 mapping _Base64
741−pRules :: Lens' Policy [Rule]
743− = lens _pRules (\ s a -> s{_pRules = a}) . _Default .
746-- | Version of the \`Policy\`. The default version is 0.
784-- | Version of the \`Policy\`. The default version is 0.
747pVersion :: Lens' Policy (Maybe Int32)
785pVersion :: Lens' Policy (Maybe Int32)
@@ -763,102 +801,96 @@ instance FromJSON Policy where
763 = withObject "Policy"
801 = withObject "Policy"
765 Policy' <$>
803 Policy' <$>
766− (o .:? "etag") <*> (o .:? "rules" .!= mempty) <*>
767− (o .:? "version")
804+ (o .:? "etag") <*> (o .:? "version") <*>
768− <*> (o .:? "bindings" .!= mempty))
805+ (o .:? "bindings" .!= mempty))
770instance ToJSON Policy where
807instance ToJSON Policy where
771 toJSON Policy'{..}
808 toJSON Policy'{..}
773 (catMaybes
810 (catMaybes
774− [("etag" .=) <$> _pEtag, ("rules" .=) <$> _pRules,
811+ [("etag" .=) <$> _pEtag,
775 ("version" .=) <$> _pVersion,
812 ("version" .=) <$> _pVersion,
776 ("bindings" .=) <$> _pBindings])
813 ("bindings" .=) <$> _pBindings])
778−-- | A condition to be met.
815+-- | The difference delta between two policies.
780−-- /See:/ 'condition' smart constructor.
817+-- /See:/ 'policyDelta' smart constructor.
781−data Condition = Condition'
818+newtype PolicyDelta = PolicyDelta'
782− { _cOp :: !(Maybe Text)
819+ { _pdBindingDeltas :: Maybe [BindingDelta]
783− , _cIAM :: !(Maybe Text)
784− , _cValues :: !(Maybe [Text])
785− , _cValue :: !(Maybe Text)
786− , _cSys :: !(Maybe Text)
787− , _cSvc :: !(Maybe Text)
788 } deriving (Eq,Show,Data,Typeable,Generic)
820 } deriving (Eq,Show,Data,Typeable,Generic)
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.
792-- Use one of the following lenses to modify other fields as desired:
824-- Use one of the following lenses to modify other fields as desired:
794−-- * 'cOp'
826+-- * 'pdBindingDeltas'
796−-- * 'cIAM'
828+ :: PolicyDelta
798−-- * 'cValues'
830+ PolicyDelta'
811− , _cValues = Nothing
814− , _cSvc = Nothing
831+ { _pdBindingDeltas = Nothing
817−-- | An operator to apply the subject with.
834+-- | The delta for Bindings between two policies.
818−cOp :: Lens' Condition (Maybe Text)
835+pdBindingDeltas :: Lens' PolicyDelta [BindingDelta]
819−cOp = lens _cOp (\ s a -> s{_cOp = a})
836+pdBindingDeltas
837+ = lens _pdBindingDeltas
838+ (\ s a -> s{_pdBindingDeltas = a})
821−-- | Trusted attributes supplied by the IAM system.
842+instance FromJSON PolicyDelta where
822−cIAM :: Lens' Condition (Maybe Text)
843+ parseJSON
823−cIAM = lens _cIAM (\ s a -> s{_cIAM = a})
844+ = withObject "PolicyDelta"
846+ PolicyDelta' <$> (o .:? "bindingDeltas" .!= mempty))
825−-- | The objects of the condition. This is mutually exclusive with \'value\'.
848+instance ToJSON PolicyDelta where
826−cValues :: Lens' Condition [Text]
849+ toJSON PolicyDelta'{..}
828− = lens _cValues (\ s a -> s{_cValues = a}) . _Default
851+ (catMaybes
829− . _Coerce
852+ [("bindingDeltas" .=) <$> _pdBindingDeltas])
831−-- | The object of the condition. Exactly one of these must be set.
854+-- | The grantable role query request.
832−cValue :: Lens' Condition (Maybe Text)
855+--
833−cValue = lens _cValue (\ s a -> s{_cValue = a})
856+-- /See:/ 'queryGrantableRolesRequest' smart constructor.
857+newtype QueryGrantableRolesRequest = QueryGrantableRolesRequest'
858+ { _qgrrFullResourceName :: Maybe Text
859+ } deriving (Eq,Show,Data,Typeable,Generic)
835−-- | Trusted attributes supplied by any service that owns resources and uses
861+-- | Creates a value of 'QueryGrantableRolesRequest' with the minimum fields required to make a request.
836−-- the IAM system for access control.
862+--
837−cSys :: Lens' Condition (Maybe Text)
863+-- Use one of the following lenses to modify other fields as desired:
838−cSys = lens _cSys (\ s a -> s{_cSys = a})
864+--
865+-- * 'qgrrFullResourceName'
866+queryGrantableRolesRequest
867+ :: QueryGrantableRolesRequest
868+queryGrantableRolesRequest =
869+ QueryGrantableRolesRequest'
870+ { _qgrrFullResourceName = Nothing
840−-- | Trusted attributes discharged by the service.
873+-- | Required. The full resource name to query from the list of grantable
841−cSvc :: Lens' Condition (Maybe Text)
874+-- roles. The name follows the Google Cloud Platform resource format. For
842−cSvc = lens _cSvc (\ s a -> s{_cSvc = a})
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)
879+ = lens _qgrrFullResourceName
880+ (\ s a -> s{_qgrrFullResourceName = a})
844−instance FromJSON Condition where
882+instance FromJSON QueryGrantableRolesRequest where
845 parseJSON
883 parseJSON
846− = withObject "Condition"
884+ = withObject "QueryGrantableRolesRequest"
848− Condition' <$>
886+ QueryGrantableRolesRequest' <$>
849− (o .:? "op") <*> (o .:? "iam") <*>
887+ (o .:? "fullResourceName"))
850− (o .:? "values" .!= mempty)
888+
855−instance ToJSON Condition where
889+instance ToJSON QueryGrantableRolesRequest where
856− toJSON Condition'{..}
890+ toJSON QueryGrantableRolesRequest'{..}
858 (catMaybes
892 (catMaybes
859− [("op" .=) <$> _cOp, ("iam" .=) <$> _cIAM,
893+ [("fullResourceName" .=) <$> _qgrrFullResourceName])
860− ("values" .=) <$> _cValues, ("value" .=) <$> _cValue,
861− ("sys" .=) <$> _cSys, ("svc" .=) <$> _cSvc])
863-- | The service account sign blob response.
895-- | The service account sign blob response.
@@ -931,7 +963,7 @@ listServiceAccountsResponse =
933-- | To retrieve the next page of results, set
965-- | To retrieve the next page of results, set
934−-- [ListServiceAccountsRequest.page_token] to this value.
966+-- ListServiceAccountsRequest.page_token to this value.
935lsarNextPageToken :: Lens' ListServiceAccountsResponse (Maybe Text)
967lsarNextPageToken :: Lens' ListServiceAccountsResponse (Maybe Text)
936lsarNextPageToken
968lsarNextPageToken
937 = lens _lsarNextPageToken
969 = lens _lsarNextPageToken
@@ -959,76 +991,6 @@ instance ToJSON ListServiceAccountsResponse where
959 [("nextPageToken" .=) <$> _lsarNextPageToken,
991 [("nextPageToken" .=) <$> _lsarNextPageToken,
960 ("accounts" .=) <$> _lsarAccounts])
992 ("accounts" .=) <$> _lsarAccounts])
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
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)
983−-- | Creates a value of 'LogConfig' with the minimum fields required to make a request.
985−-- Use one of the following lenses to modify other fields as desired:
996− { _lcCloudAudit = Nothing
997− , _lcDataAccess = Nothing
998− , _lcCounter = Nothing
1001−-- | Cloud audit options.
1002−lcCloudAudit :: Lens' LogConfig (Maybe CloudAuditOptions)
1004− = lens _lcCloudAudit (\ s a -> s{_lcCloudAudit = a})
1006−-- | Data access options.
1007−lcDataAccess :: Lens' LogConfig (Maybe DataAccessOptions)
1009− = lens _lcDataAccess (\ s a -> s{_lcDataAccess = a})
1011−-- | Counter options.
1012−lcCounter :: Lens' LogConfig (Maybe CounterOptions)
1014− = lens _lcCounter (\ s a -> s{_lcCounter = a})
1016−instance FromJSON LogConfig where
1018− = withObject "LogConfig"
1021− (o .:? "cloudAudit") <*> (o .:? "dataAccess") <*>
1024−instance ToJSON LogConfig where
1025− toJSON LogConfig'{..}
1028− [("cloudAudit" .=) <$> _lcCloudAudit,
1029− ("dataAccess" .=) <$> _lcDataAccess,
1030− ("counter" .=) <$> _lcCounter])
1032-- | The service account create request.
994-- | The service account create request.
1034-- /See:/ 'createServiceAccountRequest' smart constructor.
996-- /See:/ 'createServiceAccountRequest' smart constructor.
@@ -1053,7 +1015,7 @@ createServiceAccountRequest =
1055-- | The ServiceAccount resource to create. Currently, only the following
1017-- | The ServiceAccount resource to create. Currently, only the following
1056−-- values are user assignable: display_name .
1018+-- values are user assignable: \`display_name\` .
1057csarServiceAccount :: Lens' CreateServiceAccountRequest (Maybe ServiceAccount)
1019csarServiceAccount :: Lens' CreateServiceAccountRequest (Maybe ServiceAccount)
1058csarServiceAccount
1020csarServiceAccount
1059 = lens _csarServiceAccount
1021 = lens _csarServiceAccount
@@ -1061,8 +1023,8 @@ csarServiceAccount
1062-- | Required. The account id that is used to generate the service account
1024-- | Required. The account id that is used to generate the service account
1063-- email address and a stable unique id. It is unique within a project,
1025-- 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
1026+-- must be 6-30 characters long, and match the regular expression
1065−-- [a-z]([-a-z0-9]*[a-z0-9]) to comply with RFC1035.
1027+-- \`[a-z]([-a-z0-9]*[a-z0-9])\` to comply with RFC1035.
1066csarAccountId :: Lens' CreateServiceAccountRequest (Maybe Text)
1028csarAccountId :: Lens' CreateServiceAccountRequest (Maybe Text)
1067csarAccountId
1029csarAccountId
1068 = lens _csarAccountId
1030 = lens _csarAccountId