google-apis-containeranalysis_v1alpha1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1311 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module ContaineranalysisV1alpha1
23
+ # Container Analysis API
24
+ #
25
+ # An implementation of the Grafeas API, which stores, and enables querying and
26
+ # retrieval of critical metadata about all of your software artifacts.
27
+ #
28
+ # @example
29
+ # require 'google/apis/containeranalysis_v1alpha1'
30
+ #
31
+ # Containeranalysis = Google::Apis::ContaineranalysisV1alpha1 # Alias the module
32
+ # service = Containeranalysis::ContainerAnalysisService.new
33
+ #
34
+ # @see https://cloud.google.com/container-analysis/api/reference/rest/
35
+ class ContainerAnalysisService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://containeranalysis.googleapis.com/', '',
48
+ client_name: 'google-apis-containeranalysis_v1alpha1',
49
+ client_version: Google::Apis::ContaineranalysisV1alpha1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Creates a new `Note`.
54
+ # @param [String] parent
55
+ # This field contains the project Id for example: "projects/`project_id`
56
+ # @param [Google::Apis::ContaineranalysisV1alpha1::Note] note_object
57
+ # @param [String] name
58
+ # The name of the project. Should be of the form "providers/`provider_id`". @
59
+ # Deprecated
60
+ # @param [String] note_id
61
+ # The ID to use for this note.
62
+ # @param [String] fields
63
+ # Selector specifying which fields to include in a partial response.
64
+ # @param [String] quota_user
65
+ # Available to use for quota purposes for server-side applications. Can be any
66
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
67
+ # @param [Google::Apis::RequestOptions] options
68
+ # Request-specific options
69
+ #
70
+ # @yield [result, err] Result & error if block supplied
71
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Note] parsed result object
72
+ # @yieldparam err [StandardError] error object if request failed
73
+ #
74
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Note]
75
+ #
76
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
77
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
78
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
79
+ def create_project_note(parent, note_object = nil, name: nil, note_id: nil, fields: nil, quota_user: nil, options: nil, &block)
80
+ command = make_simple_command(:post, 'v1alpha1/{+parent}/notes', options)
81
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::Note::Representation
82
+ command.request_object = note_object
83
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Note::Representation
84
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Note
85
+ command.params['parent'] = parent unless parent.nil?
86
+ command.query['name'] = name unless name.nil?
87
+ command.query['noteId'] = note_id unless note_id.nil?
88
+ command.query['fields'] = fields unless fields.nil?
89
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
90
+ execute_or_queue_command(command, &block)
91
+ end
92
+
93
+ # Deletes the given `Note` from the system.
94
+ # @param [String] name
95
+ # The name of the note in the form of "providers/`provider_id`/notes/`NOTE_ID`"
96
+ # @param [String] fields
97
+ # Selector specifying which fields to include in a partial response.
98
+ # @param [String] quota_user
99
+ # Available to use for quota purposes for server-side applications. Can be any
100
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
101
+ # @param [Google::Apis::RequestOptions] options
102
+ # Request-specific options
103
+ #
104
+ # @yield [result, err] Result & error if block supplied
105
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Empty] parsed result object
106
+ # @yieldparam err [StandardError] error object if request failed
107
+ #
108
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Empty]
109
+ #
110
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
111
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
112
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
113
+ def delete_project_note(name, fields: nil, quota_user: nil, options: nil, &block)
114
+ command = make_simple_command(:delete, 'v1alpha1/{+name}', options)
115
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Empty::Representation
116
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Empty
117
+ command.params['name'] = name unless name.nil?
118
+ command.query['fields'] = fields unless fields.nil?
119
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
120
+ execute_or_queue_command(command, &block)
121
+ end
122
+
123
+ # Returns the requested `Note`.
124
+ # @param [String] name
125
+ # The name of the note in the form of "providers/`provider_id`/notes/`NOTE_ID`"
126
+ # @param [String] fields
127
+ # Selector specifying which fields to include in a partial response.
128
+ # @param [String] quota_user
129
+ # Available to use for quota purposes for server-side applications. Can be any
130
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
131
+ # @param [Google::Apis::RequestOptions] options
132
+ # Request-specific options
133
+ #
134
+ # @yield [result, err] Result & error if block supplied
135
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Note] parsed result object
136
+ # @yieldparam err [StandardError] error object if request failed
137
+ #
138
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Note]
139
+ #
140
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
141
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
142
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
143
+ def get_project_note(name, fields: nil, quota_user: nil, options: nil, &block)
144
+ command = make_simple_command(:get, 'v1alpha1/{+name}', options)
145
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Note::Representation
146
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Note
147
+ command.params['name'] = name unless name.nil?
148
+ command.query['fields'] = fields unless fields.nil?
149
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
150
+ execute_or_queue_command(command, &block)
151
+ end
152
+
153
+ # Gets the access control policy for a note or an `Occurrence` resource.
154
+ # Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.
155
+ # occurrences.setIamPolicy` permission if the resource is a note or occurrence,
156
+ # respectively. Attempting to call this method on a resource without the
157
+ # required permission will result in a `PERMISSION_DENIED` error. Attempting to
158
+ # call this method on a non-existent resource will result in a `NOT_FOUND` error
159
+ # if the user has list permission on the project, or a `PERMISSION_DENIED` error
160
+ # otherwise. The resource takes the following formats: `projects/`PROJECT_ID`/
161
+ # occurrences/`OCCURRENCE_ID`` for occurrences and projects/`PROJECT_ID`/notes/`
162
+ # NOTE_ID` for notes
163
+ # @param [String] resource
164
+ # REQUIRED: The resource for which the policy is being requested. See the
165
+ # operation documentation for the appropriate value for this field.
166
+ # @param [Google::Apis::ContaineranalysisV1alpha1::GetIamPolicyRequest] get_iam_policy_request_object
167
+ # @param [String] fields
168
+ # Selector specifying which fields to include in a partial response.
169
+ # @param [String] quota_user
170
+ # Available to use for quota purposes for server-side applications. Can be any
171
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
172
+ # @param [Google::Apis::RequestOptions] options
173
+ # Request-specific options
174
+ #
175
+ # @yield [result, err] Result & error if block supplied
176
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Policy] parsed result object
177
+ # @yieldparam err [StandardError] error object if request failed
178
+ #
179
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Policy]
180
+ #
181
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
182
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
183
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
184
+ def get_project_note_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
185
+ command = make_simple_command(:post, 'v1alpha1/{+resource}:getIamPolicy', options)
186
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::GetIamPolicyRequest::Representation
187
+ command.request_object = get_iam_policy_request_object
188
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Policy::Representation
189
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Policy
190
+ command.params['resource'] = resource unless resource.nil?
191
+ command.query['fields'] = fields unless fields.nil?
192
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
193
+ execute_or_queue_command(command, &block)
194
+ end
195
+
196
+ # Lists all `Notes` for a given project.
197
+ # @param [String] parent
198
+ # This field contains the project Id for example: "projects/`PROJECT_ID`".
199
+ # @param [String] filter
200
+ # The filter expression.
201
+ # @param [String] name
202
+ # The name field will contain the project Id for example: "providers/`
203
+ # provider_id` @Deprecated
204
+ # @param [Fixnum] page_size
205
+ # Number of notes to return in the list.
206
+ # @param [String] page_token
207
+ # Token to provide to skip to a particular spot in the list.
208
+ # @param [String] fields
209
+ # Selector specifying which fields to include in a partial response.
210
+ # @param [String] quota_user
211
+ # Available to use for quota purposes for server-side applications. Can be any
212
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
213
+ # @param [Google::Apis::RequestOptions] options
214
+ # Request-specific options
215
+ #
216
+ # @yield [result, err] Result & error if block supplied
217
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::ListNotesResponse] parsed result object
218
+ # @yieldparam err [StandardError] error object if request failed
219
+ #
220
+ # @return [Google::Apis::ContaineranalysisV1alpha1::ListNotesResponse]
221
+ #
222
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
223
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
224
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
225
+ def list_project_notes(parent, filter: nil, name: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
226
+ command = make_simple_command(:get, 'v1alpha1/{+parent}/notes', options)
227
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::ListNotesResponse::Representation
228
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::ListNotesResponse
229
+ command.params['parent'] = parent unless parent.nil?
230
+ command.query['filter'] = filter unless filter.nil?
231
+ command.query['name'] = name unless name.nil?
232
+ command.query['pageSize'] = page_size unless page_size.nil?
233
+ command.query['pageToken'] = page_token unless page_token.nil?
234
+ command.query['fields'] = fields unless fields.nil?
235
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
236
+ execute_or_queue_command(command, &block)
237
+ end
238
+
239
+ # Updates an existing `Note`.
240
+ # @param [String] name
241
+ # The name of the note. Should be of the form "projects/`provider_id`/notes/`
242
+ # note_id`".
243
+ # @param [Google::Apis::ContaineranalysisV1alpha1::Note] note_object
244
+ # @param [String] update_mask
245
+ # The fields to update.
246
+ # @param [String] fields
247
+ # Selector specifying which fields to include in a partial response.
248
+ # @param [String] quota_user
249
+ # Available to use for quota purposes for server-side applications. Can be any
250
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
251
+ # @param [Google::Apis::RequestOptions] options
252
+ # Request-specific options
253
+ #
254
+ # @yield [result, err] Result & error if block supplied
255
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Note] parsed result object
256
+ # @yieldparam err [StandardError] error object if request failed
257
+ #
258
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Note]
259
+ #
260
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
261
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
262
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
263
+ def patch_project_note(name, note_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
264
+ command = make_simple_command(:patch, 'v1alpha1/{+name}', options)
265
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::Note::Representation
266
+ command.request_object = note_object
267
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Note::Representation
268
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Note
269
+ command.params['name'] = name unless name.nil?
270
+ command.query['updateMask'] = update_mask unless update_mask.nil?
271
+ command.query['fields'] = fields unless fields.nil?
272
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
273
+ execute_or_queue_command(command, &block)
274
+ end
275
+
276
+ # Sets the access control policy on the specified `Note` or `Occurrence`.
277
+ # Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.
278
+ # occurrences.setIamPolicy` permission if the resource is a `Note` or an `
279
+ # Occurrence`, respectively. Attempting to call this method without these
280
+ # permissions will result in a ` `PERMISSION_DENIED` error. Attempting to call
281
+ # this method on a non-existent resource will result in a `NOT_FOUND` error if
282
+ # the user has `containeranalysis.notes.list` permission on a `Note` or `
283
+ # containeranalysis.occurrences.list` on an `Occurrence`, or a `
284
+ # PERMISSION_DENIED` error otherwise. The resource takes the following formats: `
285
+ # projects/`projectid`/occurrences/`occurrenceid`` for occurrences and projects/`
286
+ # projectid`/notes/`noteid` for notes
287
+ # @param [String] resource
288
+ # REQUIRED: The resource for which the policy is being specified. See the
289
+ # operation documentation for the appropriate value for this field.
290
+ # @param [Google::Apis::ContaineranalysisV1alpha1::SetIamPolicyRequest] set_iam_policy_request_object
291
+ # @param [String] fields
292
+ # Selector specifying which fields to include in a partial response.
293
+ # @param [String] quota_user
294
+ # Available to use for quota purposes for server-side applications. Can be any
295
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
296
+ # @param [Google::Apis::RequestOptions] options
297
+ # Request-specific options
298
+ #
299
+ # @yield [result, err] Result & error if block supplied
300
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Policy] parsed result object
301
+ # @yieldparam err [StandardError] error object if request failed
302
+ #
303
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Policy]
304
+ #
305
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
306
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
307
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
308
+ def set_project_note_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
309
+ command = make_simple_command(:post, 'v1alpha1/{+resource}:setIamPolicy', options)
310
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::SetIamPolicyRequest::Representation
311
+ command.request_object = set_iam_policy_request_object
312
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Policy::Representation
313
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Policy
314
+ command.params['resource'] = resource unless resource.nil?
315
+ command.query['fields'] = fields unless fields.nil?
316
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
317
+ execute_or_queue_command(command, &block)
318
+ end
319
+
320
+ # Returns the permissions that a caller has on the specified note or occurrence
321
+ # resource. Requires list permission on the project (for example, "storage.
322
+ # objects.list" on the containing bucket for testing permission of an object).
323
+ # Attempting to call this method on a non-existent resource will result in a `
324
+ # NOT_FOUND` error if the user has list permission on the project, or a `
325
+ # PERMISSION_DENIED` error otherwise. The resource takes the following formats: `
326
+ # projects/`PROJECT_ID`/occurrences/`OCCURRENCE_ID`` for `Occurrences` and `
327
+ # projects/`PROJECT_ID`/notes/`NOTE_ID`` for `Notes`
328
+ # @param [String] resource
329
+ # REQUIRED: The resource for which the policy detail is being requested. See the
330
+ # operation documentation for the appropriate value for this field.
331
+ # @param [Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsRequest] test_iam_permissions_request_object
332
+ # @param [String] fields
333
+ # Selector specifying which fields to include in a partial response.
334
+ # @param [String] quota_user
335
+ # Available to use for quota purposes for server-side applications. Can be any
336
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
337
+ # @param [Google::Apis::RequestOptions] options
338
+ # Request-specific options
339
+ #
340
+ # @yield [result, err] Result & error if block supplied
341
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsResponse] parsed result object
342
+ # @yieldparam err [StandardError] error object if request failed
343
+ #
344
+ # @return [Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsResponse]
345
+ #
346
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
347
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
348
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
349
+ def test_project_note_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
350
+ command = make_simple_command(:post, 'v1alpha1/{+resource}:testIamPermissions', options)
351
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsRequest::Representation
352
+ command.request_object = test_iam_permissions_request_object
353
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsResponse::Representation
354
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsResponse
355
+ command.params['resource'] = resource unless resource.nil?
356
+ command.query['fields'] = fields unless fields.nil?
357
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
358
+ execute_or_queue_command(command, &block)
359
+ end
360
+
361
+ # Lists `Occurrences` referencing the specified `Note`. Use this method to get
362
+ # all occurrences referencing your `Note` across all your customer projects.
363
+ # @param [String] name
364
+ # The name field will contain the note name for example: "provider/`provider_id`/
365
+ # notes/`note_id`"
366
+ # @param [String] filter
367
+ # The filter expression.
368
+ # @param [Fixnum] page_size
369
+ # Number of notes to return in the list.
370
+ # @param [String] page_token
371
+ # Token to provide to skip to a particular spot in the list.
372
+ # @param [String] fields
373
+ # Selector specifying which fields to include in a partial response.
374
+ # @param [String] quota_user
375
+ # Available to use for quota purposes for server-side applications. Can be any
376
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
377
+ # @param [Google::Apis::RequestOptions] options
378
+ # Request-specific options
379
+ #
380
+ # @yield [result, err] Result & error if block supplied
381
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::ListNoteOccurrencesResponse] parsed result object
382
+ # @yieldparam err [StandardError] error object if request failed
383
+ #
384
+ # @return [Google::Apis::ContaineranalysisV1alpha1::ListNoteOccurrencesResponse]
385
+ #
386
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
387
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
388
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
389
+ def list_project_note_occurrences(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
390
+ command = make_simple_command(:get, 'v1alpha1/{+name}/occurrences', options)
391
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::ListNoteOccurrencesResponse::Representation
392
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::ListNoteOccurrencesResponse
393
+ command.params['name'] = name unless name.nil?
394
+ command.query['filter'] = filter unless filter.nil?
395
+ command.query['pageSize'] = page_size unless page_size.nil?
396
+ command.query['pageToken'] = page_token unless page_token.nil?
397
+ command.query['fields'] = fields unless fields.nil?
398
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
399
+ execute_or_queue_command(command, &block)
400
+ end
401
+
402
+ # Creates a new `Occurrence`. Use this method to create `Occurrences` for a
403
+ # resource.
404
+ # @param [String] parent
405
+ # This field contains the project Id for example: "projects/`project_id`"
406
+ # @param [Google::Apis::ContaineranalysisV1alpha1::Occurrence] occurrence_object
407
+ # @param [String] name
408
+ # The name of the project. Should be of the form "projects/`project_id`". @
409
+ # Deprecated
410
+ # @param [String] fields
411
+ # Selector specifying which fields to include in a partial response.
412
+ # @param [String] quota_user
413
+ # Available to use for quota purposes for server-side applications. Can be any
414
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
415
+ # @param [Google::Apis::RequestOptions] options
416
+ # Request-specific options
417
+ #
418
+ # @yield [result, err] Result & error if block supplied
419
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Occurrence] parsed result object
420
+ # @yieldparam err [StandardError] error object if request failed
421
+ #
422
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Occurrence]
423
+ #
424
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
425
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
426
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
427
+ def create_project_occurrence(parent, occurrence_object = nil, name: nil, fields: nil, quota_user: nil, options: nil, &block)
428
+ command = make_simple_command(:post, 'v1alpha1/{+parent}/occurrences', options)
429
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::Occurrence::Representation
430
+ command.request_object = occurrence_object
431
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Occurrence::Representation
432
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Occurrence
433
+ command.params['parent'] = parent unless parent.nil?
434
+ command.query['name'] = name unless name.nil?
435
+ command.query['fields'] = fields unless fields.nil?
436
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
437
+ execute_or_queue_command(command, &block)
438
+ end
439
+
440
+ # Deletes the given `Occurrence` from the system. Use this when an `Occurrence`
441
+ # is no longer applicable for the given resource.
442
+ # @param [String] name
443
+ # The name of the occurrence in the form of "projects/`project_id`/occurrences/`
444
+ # OCCURRENCE_ID`"
445
+ # @param [String] fields
446
+ # Selector specifying which fields to include in a partial response.
447
+ # @param [String] quota_user
448
+ # Available to use for quota purposes for server-side applications. Can be any
449
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
450
+ # @param [Google::Apis::RequestOptions] options
451
+ # Request-specific options
452
+ #
453
+ # @yield [result, err] Result & error if block supplied
454
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Empty] parsed result object
455
+ # @yieldparam err [StandardError] error object if request failed
456
+ #
457
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Empty]
458
+ #
459
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
460
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
461
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
462
+ def delete_project_occurrence(name, fields: nil, quota_user: nil, options: nil, &block)
463
+ command = make_simple_command(:delete, 'v1alpha1/{+name}', options)
464
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Empty::Representation
465
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Empty
466
+ command.params['name'] = name unless name.nil?
467
+ command.query['fields'] = fields unless fields.nil?
468
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
469
+ execute_or_queue_command(command, &block)
470
+ end
471
+
472
+ # Returns the requested `Occurrence`.
473
+ # @param [String] name
474
+ # The name of the occurrence of the form "projects/`project_id`/occurrences/`
475
+ # OCCURRENCE_ID`"
476
+ # @param [String] fields
477
+ # Selector specifying which fields to include in a partial response.
478
+ # @param [String] quota_user
479
+ # Available to use for quota purposes for server-side applications. Can be any
480
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
481
+ # @param [Google::Apis::RequestOptions] options
482
+ # Request-specific options
483
+ #
484
+ # @yield [result, err] Result & error if block supplied
485
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Occurrence] parsed result object
486
+ # @yieldparam err [StandardError] error object if request failed
487
+ #
488
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Occurrence]
489
+ #
490
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
491
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
492
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
493
+ def get_project_occurrence(name, fields: nil, quota_user: nil, options: nil, &block)
494
+ command = make_simple_command(:get, 'v1alpha1/{+name}', options)
495
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Occurrence::Representation
496
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Occurrence
497
+ command.params['name'] = name unless name.nil?
498
+ command.query['fields'] = fields unless fields.nil?
499
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
500
+ execute_or_queue_command(command, &block)
501
+ end
502
+
503
+ # Gets the access control policy for a note or an `Occurrence` resource.
504
+ # Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.
505
+ # occurrences.setIamPolicy` permission if the resource is a note or occurrence,
506
+ # respectively. Attempting to call this method on a resource without the
507
+ # required permission will result in a `PERMISSION_DENIED` error. Attempting to
508
+ # call this method on a non-existent resource will result in a `NOT_FOUND` error
509
+ # if the user has list permission on the project, or a `PERMISSION_DENIED` error
510
+ # otherwise. The resource takes the following formats: `projects/`PROJECT_ID`/
511
+ # occurrences/`OCCURRENCE_ID`` for occurrences and projects/`PROJECT_ID`/notes/`
512
+ # NOTE_ID` for notes
513
+ # @param [String] resource
514
+ # REQUIRED: The resource for which the policy is being requested. See the
515
+ # operation documentation for the appropriate value for this field.
516
+ # @param [Google::Apis::ContaineranalysisV1alpha1::GetIamPolicyRequest] get_iam_policy_request_object
517
+ # @param [String] fields
518
+ # Selector specifying which fields to include in a partial response.
519
+ # @param [String] quota_user
520
+ # Available to use for quota purposes for server-side applications. Can be any
521
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
522
+ # @param [Google::Apis::RequestOptions] options
523
+ # Request-specific options
524
+ #
525
+ # @yield [result, err] Result & error if block supplied
526
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Policy] parsed result object
527
+ # @yieldparam err [StandardError] error object if request failed
528
+ #
529
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Policy]
530
+ #
531
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
532
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
533
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
534
+ def get_occurrence_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
535
+ command = make_simple_command(:post, 'v1alpha1/{+resource}:getIamPolicy', options)
536
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::GetIamPolicyRequest::Representation
537
+ command.request_object = get_iam_policy_request_object
538
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Policy::Representation
539
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Policy
540
+ command.params['resource'] = resource unless resource.nil?
541
+ command.query['fields'] = fields unless fields.nil?
542
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
543
+ execute_or_queue_command(command, &block)
544
+ end
545
+
546
+ # Gets the `Note` attached to the given `Occurrence`.
547
+ # @param [String] name
548
+ # The name of the occurrence in the form "projects/`project_id`/occurrences/`
549
+ # OCCURRENCE_ID`"
550
+ # @param [String] fields
551
+ # Selector specifying which fields to include in a partial response.
552
+ # @param [String] quota_user
553
+ # Available to use for quota purposes for server-side applications. Can be any
554
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
555
+ # @param [Google::Apis::RequestOptions] options
556
+ # Request-specific options
557
+ #
558
+ # @yield [result, err] Result & error if block supplied
559
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Note] parsed result object
560
+ # @yieldparam err [StandardError] error object if request failed
561
+ #
562
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Note]
563
+ #
564
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
565
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
566
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
567
+ def get_project_occurrence_notes(name, fields: nil, quota_user: nil, options: nil, &block)
568
+ command = make_simple_command(:get, 'v1alpha1/{+name}/notes', options)
569
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Note::Representation
570
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Note
571
+ command.params['name'] = name unless name.nil?
572
+ command.query['fields'] = fields unless fields.nil?
573
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
574
+ execute_or_queue_command(command, &block)
575
+ end
576
+
577
+ # Gets a summary of the number and severity of occurrences.
578
+ # @param [String] parent
579
+ # This contains the project Id for example: projects/`project_id`
580
+ # @param [String] filter
581
+ # The filter expression.
582
+ # @param [String] fields
583
+ # Selector specifying which fields to include in a partial response.
584
+ # @param [String] quota_user
585
+ # Available to use for quota purposes for server-side applications. Can be any
586
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
587
+ # @param [Google::Apis::RequestOptions] options
588
+ # Request-specific options
589
+ #
590
+ # @yield [result, err] Result & error if block supplied
591
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::GetVulnzOccurrencesSummaryResponse] parsed result object
592
+ # @yieldparam err [StandardError] error object if request failed
593
+ #
594
+ # @return [Google::Apis::ContaineranalysisV1alpha1::GetVulnzOccurrencesSummaryResponse]
595
+ #
596
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
597
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
598
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
599
+ def get_project_occurrence_vulnerability_summary(parent, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
600
+ command = make_simple_command(:get, 'v1alpha1/{+parent}/occurrences:vulnerabilitySummary', options)
601
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::GetVulnzOccurrencesSummaryResponse::Representation
602
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::GetVulnzOccurrencesSummaryResponse
603
+ command.params['parent'] = parent unless parent.nil?
604
+ command.query['filter'] = filter unless filter.nil?
605
+ command.query['fields'] = fields unless fields.nil?
606
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
607
+ execute_or_queue_command(command, &block)
608
+ end
609
+
610
+ # Lists active `Occurrences` for a given project matching the filters.
611
+ # @param [String] parent
612
+ # This contains the project Id for example: projects/`project_id`.
613
+ # @param [String] filter
614
+ # The filter expression.
615
+ # @param [String] kind
616
+ # The kind of occurrences to filter on.
617
+ # @param [String] name
618
+ # The name field contains the project Id. For example: "projects/`project_id` @
619
+ # Deprecated
620
+ # @param [Fixnum] page_size
621
+ # Number of occurrences to return in the list.
622
+ # @param [String] page_token
623
+ # Token to provide to skip to a particular spot in the list.
624
+ # @param [String] fields
625
+ # Selector specifying which fields to include in a partial response.
626
+ # @param [String] quota_user
627
+ # Available to use for quota purposes for server-side applications. Can be any
628
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
629
+ # @param [Google::Apis::RequestOptions] options
630
+ # Request-specific options
631
+ #
632
+ # @yield [result, err] Result & error if block supplied
633
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::ListOccurrencesResponse] parsed result object
634
+ # @yieldparam err [StandardError] error object if request failed
635
+ #
636
+ # @return [Google::Apis::ContaineranalysisV1alpha1::ListOccurrencesResponse]
637
+ #
638
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
639
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
640
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
641
+ def list_project_occurrences(parent, filter: nil, kind: nil, name: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
642
+ command = make_simple_command(:get, 'v1alpha1/{+parent}/occurrences', options)
643
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::ListOccurrencesResponse::Representation
644
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::ListOccurrencesResponse
645
+ command.params['parent'] = parent unless parent.nil?
646
+ command.query['filter'] = filter unless filter.nil?
647
+ command.query['kind'] = kind unless kind.nil?
648
+ command.query['name'] = name unless name.nil?
649
+ command.query['pageSize'] = page_size unless page_size.nil?
650
+ command.query['pageToken'] = page_token unless page_token.nil?
651
+ command.query['fields'] = fields unless fields.nil?
652
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
653
+ execute_or_queue_command(command, &block)
654
+ end
655
+
656
+ # Updates an existing occurrence.
657
+ # @param [String] name
658
+ # The name of the occurrence. Should be of the form "projects/`project_id`/
659
+ # occurrences/`OCCURRENCE_ID`".
660
+ # @param [Google::Apis::ContaineranalysisV1alpha1::Occurrence] occurrence_object
661
+ # @param [String] update_mask
662
+ # The fields to update.
663
+ # @param [String] fields
664
+ # Selector specifying which fields to include in a partial response.
665
+ # @param [String] quota_user
666
+ # Available to use for quota purposes for server-side applications. Can be any
667
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
668
+ # @param [Google::Apis::RequestOptions] options
669
+ # Request-specific options
670
+ #
671
+ # @yield [result, err] Result & error if block supplied
672
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Occurrence] parsed result object
673
+ # @yieldparam err [StandardError] error object if request failed
674
+ #
675
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Occurrence]
676
+ #
677
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
678
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
679
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
680
+ def patch_project_occurrence(name, occurrence_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
681
+ command = make_simple_command(:patch, 'v1alpha1/{+name}', options)
682
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::Occurrence::Representation
683
+ command.request_object = occurrence_object
684
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Occurrence::Representation
685
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Occurrence
686
+ command.params['name'] = name unless name.nil?
687
+ command.query['updateMask'] = update_mask unless update_mask.nil?
688
+ command.query['fields'] = fields unless fields.nil?
689
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
690
+ execute_or_queue_command(command, &block)
691
+ end
692
+
693
+ # Sets the access control policy on the specified `Note` or `Occurrence`.
694
+ # Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.
695
+ # occurrences.setIamPolicy` permission if the resource is a `Note` or an `
696
+ # Occurrence`, respectively. Attempting to call this method without these
697
+ # permissions will result in a ` `PERMISSION_DENIED` error. Attempting to call
698
+ # this method on a non-existent resource will result in a `NOT_FOUND` error if
699
+ # the user has `containeranalysis.notes.list` permission on a `Note` or `
700
+ # containeranalysis.occurrences.list` on an `Occurrence`, or a `
701
+ # PERMISSION_DENIED` error otherwise. The resource takes the following formats: `
702
+ # projects/`projectid`/occurrences/`occurrenceid`` for occurrences and projects/`
703
+ # projectid`/notes/`noteid` for notes
704
+ # @param [String] resource
705
+ # REQUIRED: The resource for which the policy is being specified. See the
706
+ # operation documentation for the appropriate value for this field.
707
+ # @param [Google::Apis::ContaineranalysisV1alpha1::SetIamPolicyRequest] set_iam_policy_request_object
708
+ # @param [String] fields
709
+ # Selector specifying which fields to include in a partial response.
710
+ # @param [String] quota_user
711
+ # Available to use for quota purposes for server-side applications. Can be any
712
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
713
+ # @param [Google::Apis::RequestOptions] options
714
+ # Request-specific options
715
+ #
716
+ # @yield [result, err] Result & error if block supplied
717
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Policy] parsed result object
718
+ # @yieldparam err [StandardError] error object if request failed
719
+ #
720
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Policy]
721
+ #
722
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
723
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
724
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
725
+ def set_occurrence_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
726
+ command = make_simple_command(:post, 'v1alpha1/{+resource}:setIamPolicy', options)
727
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::SetIamPolicyRequest::Representation
728
+ command.request_object = set_iam_policy_request_object
729
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Policy::Representation
730
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Policy
731
+ command.params['resource'] = resource unless resource.nil?
732
+ command.query['fields'] = fields unless fields.nil?
733
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
734
+ execute_or_queue_command(command, &block)
735
+ end
736
+
737
+ # Returns the permissions that a caller has on the specified note or occurrence
738
+ # resource. Requires list permission on the project (for example, "storage.
739
+ # objects.list" on the containing bucket for testing permission of an object).
740
+ # Attempting to call this method on a non-existent resource will result in a `
741
+ # NOT_FOUND` error if the user has list permission on the project, or a `
742
+ # PERMISSION_DENIED` error otherwise. The resource takes the following formats: `
743
+ # projects/`PROJECT_ID`/occurrences/`OCCURRENCE_ID`` for `Occurrences` and `
744
+ # projects/`PROJECT_ID`/notes/`NOTE_ID`` for `Notes`
745
+ # @param [String] resource
746
+ # REQUIRED: The resource for which the policy detail is being requested. See the
747
+ # operation documentation for the appropriate value for this field.
748
+ # @param [Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsRequest] test_iam_permissions_request_object
749
+ # @param [String] fields
750
+ # Selector specifying which fields to include in a partial response.
751
+ # @param [String] quota_user
752
+ # Available to use for quota purposes for server-side applications. Can be any
753
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
754
+ # @param [Google::Apis::RequestOptions] options
755
+ # Request-specific options
756
+ #
757
+ # @yield [result, err] Result & error if block supplied
758
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsResponse] parsed result object
759
+ # @yieldparam err [StandardError] error object if request failed
760
+ #
761
+ # @return [Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsResponse]
762
+ #
763
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
764
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
765
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
766
+ def test_occurrence_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
767
+ command = make_simple_command(:post, 'v1alpha1/{+resource}:testIamPermissions', options)
768
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsRequest::Representation
769
+ command.request_object = test_iam_permissions_request_object
770
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsResponse::Representation
771
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsResponse
772
+ command.params['resource'] = resource unless resource.nil?
773
+ command.query['fields'] = fields unless fields.nil?
774
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
775
+ execute_or_queue_command(command, &block)
776
+ end
777
+
778
+ # Creates a new `Operation`.
779
+ # @param [String] parent
780
+ # The project Id that this operation should be created under.
781
+ # @param [Google::Apis::ContaineranalysisV1alpha1::CreateOperationRequest] create_operation_request_object
782
+ # @param [String] fields
783
+ # Selector specifying which fields to include in a partial response.
784
+ # @param [String] quota_user
785
+ # Available to use for quota purposes for server-side applications. Can be any
786
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
787
+ # @param [Google::Apis::RequestOptions] options
788
+ # Request-specific options
789
+ #
790
+ # @yield [result, err] Result & error if block supplied
791
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Operation] parsed result object
792
+ # @yieldparam err [StandardError] error object if request failed
793
+ #
794
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Operation]
795
+ #
796
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
797
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
798
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
799
+ def create_operation(parent, create_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
800
+ command = make_simple_command(:post, 'v1alpha1/{+parent}/operations', options)
801
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::CreateOperationRequest::Representation
802
+ command.request_object = create_operation_request_object
803
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Operation::Representation
804
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Operation
805
+ command.params['parent'] = parent unless parent.nil?
806
+ command.query['fields'] = fields unless fields.nil?
807
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
808
+ execute_or_queue_command(command, &block)
809
+ end
810
+
811
+ # Updates an existing operation returns an error if operation does not exist.
812
+ # The only valid operations are to update mark the done bit change the result.
813
+ # @param [String] name
814
+ # The name of the Operation. Should be of the form "projects/`provider_id`/
815
+ # operations/`operation_id`".
816
+ # @param [Google::Apis::ContaineranalysisV1alpha1::UpdateOperationRequest] update_operation_request_object
817
+ # @param [String] fields
818
+ # Selector specifying which fields to include in a partial response.
819
+ # @param [String] quota_user
820
+ # Available to use for quota purposes for server-side applications. Can be any
821
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
822
+ # @param [Google::Apis::RequestOptions] options
823
+ # Request-specific options
824
+ #
825
+ # @yield [result, err] Result & error if block supplied
826
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Operation] parsed result object
827
+ # @yieldparam err [StandardError] error object if request failed
828
+ #
829
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Operation]
830
+ #
831
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
832
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
833
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
834
+ def patch_project_operation(name, update_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
835
+ command = make_simple_command(:patch, 'v1alpha1/{+name}', options)
836
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::UpdateOperationRequest::Representation
837
+ command.request_object = update_operation_request_object
838
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Operation::Representation
839
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Operation
840
+ command.params['name'] = name unless name.nil?
841
+ command.query['fields'] = fields unless fields.nil?
842
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
843
+ execute_or_queue_command(command, &block)
844
+ end
845
+
846
+ # Gets a specific scan configuration for a project.
847
+ # @param [String] name
848
+ # The name of the ScanConfig in the form projects/`project_id`/scanConfigs/`
849
+ # scan_config_id`
850
+ # @param [String] fields
851
+ # Selector specifying which fields to include in a partial response.
852
+ # @param [String] quota_user
853
+ # Available to use for quota purposes for server-side applications. Can be any
854
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
855
+ # @param [Google::Apis::RequestOptions] options
856
+ # Request-specific options
857
+ #
858
+ # @yield [result, err] Result & error if block supplied
859
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::ScanConfig] parsed result object
860
+ # @yieldparam err [StandardError] error object if request failed
861
+ #
862
+ # @return [Google::Apis::ContaineranalysisV1alpha1::ScanConfig]
863
+ #
864
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
865
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
866
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
867
+ def get_project_scan_config(name, fields: nil, quota_user: nil, options: nil, &block)
868
+ command = make_simple_command(:get, 'v1alpha1/{+name}', options)
869
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::ScanConfig::Representation
870
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::ScanConfig
871
+ command.params['name'] = name unless name.nil?
872
+ command.query['fields'] = fields unless fields.nil?
873
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
874
+ execute_or_queue_command(command, &block)
875
+ end
876
+
877
+ # Lists scan configurations for a project.
878
+ # @param [String] parent
879
+ # This containers the project Id i.e.: projects/`project_id`
880
+ # @param [String] filter
881
+ # The filter expression.
882
+ # @param [Fixnum] page_size
883
+ # The number of items to return.
884
+ # @param [String] page_token
885
+ # The page token to use for the next request.
886
+ # @param [String] fields
887
+ # Selector specifying which fields to include in a partial response.
888
+ # @param [String] quota_user
889
+ # Available to use for quota purposes for server-side applications. Can be any
890
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
891
+ # @param [Google::Apis::RequestOptions] options
892
+ # Request-specific options
893
+ #
894
+ # @yield [result, err] Result & error if block supplied
895
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::ListScanConfigsResponse] parsed result object
896
+ # @yieldparam err [StandardError] error object if request failed
897
+ #
898
+ # @return [Google::Apis::ContaineranalysisV1alpha1::ListScanConfigsResponse]
899
+ #
900
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
901
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
902
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
903
+ def list_project_scan_configs(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
904
+ command = make_simple_command(:get, 'v1alpha1/{+parent}/scanConfigs', options)
905
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::ListScanConfigsResponse::Representation
906
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::ListScanConfigsResponse
907
+ command.params['parent'] = parent unless parent.nil?
908
+ command.query['filter'] = filter unless filter.nil?
909
+ command.query['pageSize'] = page_size unless page_size.nil?
910
+ command.query['pageToken'] = page_token unless page_token.nil?
911
+ command.query['fields'] = fields unless fields.nil?
912
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
913
+ execute_or_queue_command(command, &block)
914
+ end
915
+
916
+ # Updates the scan configuration to a new value.
917
+ # @param [String] name
918
+ # The scan config to update of the form projects/`project_id`/scanConfigs/`
919
+ # scan_config_id`.
920
+ # @param [Google::Apis::ContaineranalysisV1alpha1::ScanConfig] scan_config_object
921
+ # @param [String] update_mask
922
+ # The fields to update.
923
+ # @param [String] fields
924
+ # Selector specifying which fields to include in a partial response.
925
+ # @param [String] quota_user
926
+ # Available to use for quota purposes for server-side applications. Can be any
927
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
928
+ # @param [Google::Apis::RequestOptions] options
929
+ # Request-specific options
930
+ #
931
+ # @yield [result, err] Result & error if block supplied
932
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::ScanConfig] parsed result object
933
+ # @yieldparam err [StandardError] error object if request failed
934
+ #
935
+ # @return [Google::Apis::ContaineranalysisV1alpha1::ScanConfig]
936
+ #
937
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
938
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
939
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
940
+ def patch_project_scan_config(name, scan_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
941
+ command = make_simple_command(:patch, 'v1alpha1/{+name}', options)
942
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::ScanConfig::Representation
943
+ command.request_object = scan_config_object
944
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::ScanConfig::Representation
945
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::ScanConfig
946
+ command.params['name'] = name unless name.nil?
947
+ command.query['updateMask'] = update_mask unless update_mask.nil?
948
+ command.query['fields'] = fields unless fields.nil?
949
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
950
+ execute_or_queue_command(command, &block)
951
+ end
952
+
953
+ # Creates a new `Note`.
954
+ # @param [String] name
955
+ # The name of the project. Should be of the form "providers/`provider_id`". @
956
+ # Deprecated
957
+ # @param [Google::Apis::ContaineranalysisV1alpha1::Note] note_object
958
+ # @param [String] note_id
959
+ # The ID to use for this note.
960
+ # @param [String] parent
961
+ # This field contains the project Id for example: "projects/`project_id`
962
+ # @param [String] fields
963
+ # Selector specifying which fields to include in a partial response.
964
+ # @param [String] quota_user
965
+ # Available to use for quota purposes for server-side applications. Can be any
966
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
967
+ # @param [Google::Apis::RequestOptions] options
968
+ # Request-specific options
969
+ #
970
+ # @yield [result, err] Result & error if block supplied
971
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Note] parsed result object
972
+ # @yieldparam err [StandardError] error object if request failed
973
+ #
974
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Note]
975
+ #
976
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
977
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
978
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
979
+ def create_provider_note(name, note_object = nil, note_id: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
980
+ command = make_simple_command(:post, 'v1alpha1/{+name}/notes', options)
981
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::Note::Representation
982
+ command.request_object = note_object
983
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Note::Representation
984
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Note
985
+ command.params['name'] = name unless name.nil?
986
+ command.query['noteId'] = note_id unless note_id.nil?
987
+ command.query['parent'] = parent unless parent.nil?
988
+ command.query['fields'] = fields unless fields.nil?
989
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
990
+ execute_or_queue_command(command, &block)
991
+ end
992
+
993
+ # Deletes the given `Note` from the system.
994
+ # @param [String] name
995
+ # The name of the note in the form of "providers/`provider_id`/notes/`NOTE_ID`"
996
+ # @param [String] fields
997
+ # Selector specifying which fields to include in a partial response.
998
+ # @param [String] quota_user
999
+ # Available to use for quota purposes for server-side applications. Can be any
1000
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1001
+ # @param [Google::Apis::RequestOptions] options
1002
+ # Request-specific options
1003
+ #
1004
+ # @yield [result, err] Result & error if block supplied
1005
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Empty] parsed result object
1006
+ # @yieldparam err [StandardError] error object if request failed
1007
+ #
1008
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Empty]
1009
+ #
1010
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1011
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1012
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1013
+ def delete_provider_note(name, fields: nil, quota_user: nil, options: nil, &block)
1014
+ command = make_simple_command(:delete, 'v1alpha1/{+name}', options)
1015
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Empty::Representation
1016
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Empty
1017
+ command.params['name'] = name unless name.nil?
1018
+ command.query['fields'] = fields unless fields.nil?
1019
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1020
+ execute_or_queue_command(command, &block)
1021
+ end
1022
+
1023
+ # Returns the requested `Note`.
1024
+ # @param [String] name
1025
+ # The name of the note in the form of "providers/`provider_id`/notes/`NOTE_ID`"
1026
+ # @param [String] fields
1027
+ # Selector specifying which fields to include in a partial response.
1028
+ # @param [String] quota_user
1029
+ # Available to use for quota purposes for server-side applications. Can be any
1030
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1031
+ # @param [Google::Apis::RequestOptions] options
1032
+ # Request-specific options
1033
+ #
1034
+ # @yield [result, err] Result & error if block supplied
1035
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Note] parsed result object
1036
+ # @yieldparam err [StandardError] error object if request failed
1037
+ #
1038
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Note]
1039
+ #
1040
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1041
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1042
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1043
+ def get_provider_note(name, fields: nil, quota_user: nil, options: nil, &block)
1044
+ command = make_simple_command(:get, 'v1alpha1/{+name}', options)
1045
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Note::Representation
1046
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Note
1047
+ command.params['name'] = name unless name.nil?
1048
+ command.query['fields'] = fields unless fields.nil?
1049
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1050
+ execute_or_queue_command(command, &block)
1051
+ end
1052
+
1053
+ # Gets the access control policy for a note or an `Occurrence` resource.
1054
+ # Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.
1055
+ # occurrences.setIamPolicy` permission if the resource is a note or occurrence,
1056
+ # respectively. Attempting to call this method on a resource without the
1057
+ # required permission will result in a `PERMISSION_DENIED` error. Attempting to
1058
+ # call this method on a non-existent resource will result in a `NOT_FOUND` error
1059
+ # if the user has list permission on the project, or a `PERMISSION_DENIED` error
1060
+ # otherwise. The resource takes the following formats: `projects/`PROJECT_ID`/
1061
+ # occurrences/`OCCURRENCE_ID`` for occurrences and projects/`PROJECT_ID`/notes/`
1062
+ # NOTE_ID` for notes
1063
+ # @param [String] resource
1064
+ # REQUIRED: The resource for which the policy is being requested. See the
1065
+ # operation documentation for the appropriate value for this field.
1066
+ # @param [Google::Apis::ContaineranalysisV1alpha1::GetIamPolicyRequest] get_iam_policy_request_object
1067
+ # @param [String] fields
1068
+ # Selector specifying which fields to include in a partial response.
1069
+ # @param [String] quota_user
1070
+ # Available to use for quota purposes for server-side applications. Can be any
1071
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1072
+ # @param [Google::Apis::RequestOptions] options
1073
+ # Request-specific options
1074
+ #
1075
+ # @yield [result, err] Result & error if block supplied
1076
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Policy] parsed result object
1077
+ # @yieldparam err [StandardError] error object if request failed
1078
+ #
1079
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Policy]
1080
+ #
1081
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1082
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1083
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1084
+ def get_provider_note_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1085
+ command = make_simple_command(:post, 'v1alpha1/{+resource}:getIamPolicy', options)
1086
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::GetIamPolicyRequest::Representation
1087
+ command.request_object = get_iam_policy_request_object
1088
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Policy::Representation
1089
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Policy
1090
+ command.params['resource'] = resource unless resource.nil?
1091
+ command.query['fields'] = fields unless fields.nil?
1092
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1093
+ execute_or_queue_command(command, &block)
1094
+ end
1095
+
1096
+ # Lists all `Notes` for a given project.
1097
+ # @param [String] name
1098
+ # The name field will contain the project Id for example: "providers/`
1099
+ # provider_id` @Deprecated
1100
+ # @param [String] filter
1101
+ # The filter expression.
1102
+ # @param [Fixnum] page_size
1103
+ # Number of notes to return in the list.
1104
+ # @param [String] page_token
1105
+ # Token to provide to skip to a particular spot in the list.
1106
+ # @param [String] parent
1107
+ # This field contains the project Id for example: "projects/`PROJECT_ID`".
1108
+ # @param [String] fields
1109
+ # Selector specifying which fields to include in a partial response.
1110
+ # @param [String] quota_user
1111
+ # Available to use for quota purposes for server-side applications. Can be any
1112
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1113
+ # @param [Google::Apis::RequestOptions] options
1114
+ # Request-specific options
1115
+ #
1116
+ # @yield [result, err] Result & error if block supplied
1117
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::ListNotesResponse] parsed result object
1118
+ # @yieldparam err [StandardError] error object if request failed
1119
+ #
1120
+ # @return [Google::Apis::ContaineranalysisV1alpha1::ListNotesResponse]
1121
+ #
1122
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1123
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1124
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1125
+ def list_provider_notes(name, filter: nil, page_size: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
1126
+ command = make_simple_command(:get, 'v1alpha1/{+name}/notes', options)
1127
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::ListNotesResponse::Representation
1128
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::ListNotesResponse
1129
+ command.params['name'] = name unless name.nil?
1130
+ command.query['filter'] = filter unless filter.nil?
1131
+ command.query['pageSize'] = page_size unless page_size.nil?
1132
+ command.query['pageToken'] = page_token unless page_token.nil?
1133
+ command.query['parent'] = parent unless parent.nil?
1134
+ command.query['fields'] = fields unless fields.nil?
1135
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1136
+ execute_or_queue_command(command, &block)
1137
+ end
1138
+
1139
+ # Updates an existing `Note`.
1140
+ # @param [String] name
1141
+ # The name of the note. Should be of the form "projects/`provider_id`/notes/`
1142
+ # note_id`".
1143
+ # @param [Google::Apis::ContaineranalysisV1alpha1::Note] note_object
1144
+ # @param [String] update_mask
1145
+ # The fields to update.
1146
+ # @param [String] fields
1147
+ # Selector specifying which fields to include in a partial response.
1148
+ # @param [String] quota_user
1149
+ # Available to use for quota purposes for server-side applications. Can be any
1150
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1151
+ # @param [Google::Apis::RequestOptions] options
1152
+ # Request-specific options
1153
+ #
1154
+ # @yield [result, err] Result & error if block supplied
1155
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Note] parsed result object
1156
+ # @yieldparam err [StandardError] error object if request failed
1157
+ #
1158
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Note]
1159
+ #
1160
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1161
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1162
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1163
+ def patch_provider_note(name, note_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1164
+ command = make_simple_command(:patch, 'v1alpha1/{+name}', options)
1165
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::Note::Representation
1166
+ command.request_object = note_object
1167
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Note::Representation
1168
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Note
1169
+ command.params['name'] = name unless name.nil?
1170
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1171
+ command.query['fields'] = fields unless fields.nil?
1172
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1173
+ execute_or_queue_command(command, &block)
1174
+ end
1175
+
1176
+ # Sets the access control policy on the specified `Note` or `Occurrence`.
1177
+ # Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.
1178
+ # occurrences.setIamPolicy` permission if the resource is a `Note` or an `
1179
+ # Occurrence`, respectively. Attempting to call this method without these
1180
+ # permissions will result in a ` `PERMISSION_DENIED` error. Attempting to call
1181
+ # this method on a non-existent resource will result in a `NOT_FOUND` error if
1182
+ # the user has `containeranalysis.notes.list` permission on a `Note` or `
1183
+ # containeranalysis.occurrences.list` on an `Occurrence`, or a `
1184
+ # PERMISSION_DENIED` error otherwise. The resource takes the following formats: `
1185
+ # projects/`projectid`/occurrences/`occurrenceid`` for occurrences and projects/`
1186
+ # projectid`/notes/`noteid` for notes
1187
+ # @param [String] resource
1188
+ # REQUIRED: The resource for which the policy is being specified. See the
1189
+ # operation documentation for the appropriate value for this field.
1190
+ # @param [Google::Apis::ContaineranalysisV1alpha1::SetIamPolicyRequest] set_iam_policy_request_object
1191
+ # @param [String] fields
1192
+ # Selector specifying which fields to include in a partial response.
1193
+ # @param [String] quota_user
1194
+ # Available to use for quota purposes for server-side applications. Can be any
1195
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1196
+ # @param [Google::Apis::RequestOptions] options
1197
+ # Request-specific options
1198
+ #
1199
+ # @yield [result, err] Result & error if block supplied
1200
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::Policy] parsed result object
1201
+ # @yieldparam err [StandardError] error object if request failed
1202
+ #
1203
+ # @return [Google::Apis::ContaineranalysisV1alpha1::Policy]
1204
+ #
1205
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1206
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1207
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1208
+ def set_provider_note_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1209
+ command = make_simple_command(:post, 'v1alpha1/{+resource}:setIamPolicy', options)
1210
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::SetIamPolicyRequest::Representation
1211
+ command.request_object = set_iam_policy_request_object
1212
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::Policy::Representation
1213
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::Policy
1214
+ command.params['resource'] = resource unless resource.nil?
1215
+ command.query['fields'] = fields unless fields.nil?
1216
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1217
+ execute_or_queue_command(command, &block)
1218
+ end
1219
+
1220
+ # Returns the permissions that a caller has on the specified note or occurrence
1221
+ # resource. Requires list permission on the project (for example, "storage.
1222
+ # objects.list" on the containing bucket for testing permission of an object).
1223
+ # Attempting to call this method on a non-existent resource will result in a `
1224
+ # NOT_FOUND` error if the user has list permission on the project, or a `
1225
+ # PERMISSION_DENIED` error otherwise. The resource takes the following formats: `
1226
+ # projects/`PROJECT_ID`/occurrences/`OCCURRENCE_ID`` for `Occurrences` and `
1227
+ # projects/`PROJECT_ID`/notes/`NOTE_ID`` for `Notes`
1228
+ # @param [String] resource
1229
+ # REQUIRED: The resource for which the policy detail is being requested. See the
1230
+ # operation documentation for the appropriate value for this field.
1231
+ # @param [Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsRequest] test_iam_permissions_request_object
1232
+ # @param [String] fields
1233
+ # Selector specifying which fields to include in a partial response.
1234
+ # @param [String] quota_user
1235
+ # Available to use for quota purposes for server-side applications. Can be any
1236
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1237
+ # @param [Google::Apis::RequestOptions] options
1238
+ # Request-specific options
1239
+ #
1240
+ # @yield [result, err] Result & error if block supplied
1241
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsResponse] parsed result object
1242
+ # @yieldparam err [StandardError] error object if request failed
1243
+ #
1244
+ # @return [Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsResponse]
1245
+ #
1246
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1247
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1248
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1249
+ def test_provider_note_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1250
+ command = make_simple_command(:post, 'v1alpha1/{+resource}:testIamPermissions', options)
1251
+ command.request_representation = Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsRequest::Representation
1252
+ command.request_object = test_iam_permissions_request_object
1253
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsResponse::Representation
1254
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::TestIamPermissionsResponse
1255
+ command.params['resource'] = resource unless resource.nil?
1256
+ command.query['fields'] = fields unless fields.nil?
1257
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1258
+ execute_or_queue_command(command, &block)
1259
+ end
1260
+
1261
+ # Lists `Occurrences` referencing the specified `Note`. Use this method to get
1262
+ # all occurrences referencing your `Note` across all your customer projects.
1263
+ # @param [String] name
1264
+ # The name field will contain the note name for example: "provider/`provider_id`/
1265
+ # notes/`note_id`"
1266
+ # @param [String] filter
1267
+ # The filter expression.
1268
+ # @param [Fixnum] page_size
1269
+ # Number of notes to return in the list.
1270
+ # @param [String] page_token
1271
+ # Token to provide to skip to a particular spot in the list.
1272
+ # @param [String] fields
1273
+ # Selector specifying which fields to include in a partial response.
1274
+ # @param [String] quota_user
1275
+ # Available to use for quota purposes for server-side applications. Can be any
1276
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1277
+ # @param [Google::Apis::RequestOptions] options
1278
+ # Request-specific options
1279
+ #
1280
+ # @yield [result, err] Result & error if block supplied
1281
+ # @yieldparam result [Google::Apis::ContaineranalysisV1alpha1::ListNoteOccurrencesResponse] parsed result object
1282
+ # @yieldparam err [StandardError] error object if request failed
1283
+ #
1284
+ # @return [Google::Apis::ContaineranalysisV1alpha1::ListNoteOccurrencesResponse]
1285
+ #
1286
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1287
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1288
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1289
+ def list_provider_note_occurrences(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1290
+ command = make_simple_command(:get, 'v1alpha1/{+name}/occurrences', options)
1291
+ command.response_representation = Google::Apis::ContaineranalysisV1alpha1::ListNoteOccurrencesResponse::Representation
1292
+ command.response_class = Google::Apis::ContaineranalysisV1alpha1::ListNoteOccurrencesResponse
1293
+ command.params['name'] = name unless name.nil?
1294
+ command.query['filter'] = filter unless filter.nil?
1295
+ command.query['pageSize'] = page_size unless page_size.nil?
1296
+ command.query['pageToken'] = page_token unless page_token.nil?
1297
+ command.query['fields'] = fields unless fields.nil?
1298
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1299
+ execute_or_queue_command(command, &block)
1300
+ end
1301
+
1302
+ protected
1303
+
1304
+ def apply_command_defaults(command)
1305
+ command.query['key'] = key unless key.nil?
1306
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1307
+ end
1308
+ end
1309
+ end
1310
+ end
1311
+ end