google-apis-containeranalysis_v1beta1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,925 @@
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 ContaineranalysisV1beta1
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_v1beta1'
30
+ #
31
+ # Containeranalysis = Google::Apis::ContaineranalysisV1beta1 # 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_v1beta1',
49
+ client_version: Google::Apis::ContaineranalysisV1beta1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Creates new notes in batch.
54
+ # @param [String] parent
55
+ # Required. The name of the project in the form of `projects/[PROJECT_ID]`,
56
+ # under which the notes are to be created.
57
+ # @param [Google::Apis::ContaineranalysisV1beta1::BatchCreateNotesRequest] batch_create_notes_request_object
58
+ # @param [String] fields
59
+ # Selector specifying which fields to include in a partial response.
60
+ # @param [String] quota_user
61
+ # Available to use for quota purposes for server-side applications. Can be any
62
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
63
+ # @param [Google::Apis::RequestOptions] options
64
+ # Request-specific options
65
+ #
66
+ # @yield [result, err] Result & error if block supplied
67
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::BatchCreateNotesResponse] parsed result object
68
+ # @yieldparam err [StandardError] error object if request failed
69
+ #
70
+ # @return [Google::Apis::ContaineranalysisV1beta1::BatchCreateNotesResponse]
71
+ #
72
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
73
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
74
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
75
+ def batch_create_notes(parent, batch_create_notes_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
76
+ command = make_simple_command(:post, 'v1beta1/{+parent}/notes:batchCreate', options)
77
+ command.request_representation = Google::Apis::ContaineranalysisV1beta1::BatchCreateNotesRequest::Representation
78
+ command.request_object = batch_create_notes_request_object
79
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::BatchCreateNotesResponse::Representation
80
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::BatchCreateNotesResponse
81
+ command.params['parent'] = parent unless parent.nil?
82
+ command.query['fields'] = fields unless fields.nil?
83
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
84
+ execute_or_queue_command(command, &block)
85
+ end
86
+
87
+ # Creates a new note.
88
+ # @param [String] parent
89
+ # Required. The name of the project in the form of `projects/[PROJECT_ID]`,
90
+ # under which the note is to be created.
91
+ # @param [Google::Apis::ContaineranalysisV1beta1::Note] note_object
92
+ # @param [String] note_id
93
+ # Required. The ID to use for this note.
94
+ # @param [String] fields
95
+ # Selector specifying which fields to include in a partial response.
96
+ # @param [String] quota_user
97
+ # Available to use for quota purposes for server-side applications. Can be any
98
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
99
+ # @param [Google::Apis::RequestOptions] options
100
+ # Request-specific options
101
+ #
102
+ # @yield [result, err] Result & error if block supplied
103
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::Note] parsed result object
104
+ # @yieldparam err [StandardError] error object if request failed
105
+ #
106
+ # @return [Google::Apis::ContaineranalysisV1beta1::Note]
107
+ #
108
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
109
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
110
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
111
+ def create_project_note(parent, note_object = nil, note_id: nil, fields: nil, quota_user: nil, options: nil, &block)
112
+ command = make_simple_command(:post, 'v1beta1/{+parent}/notes', options)
113
+ command.request_representation = Google::Apis::ContaineranalysisV1beta1::Note::Representation
114
+ command.request_object = note_object
115
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::Note::Representation
116
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::Note
117
+ command.params['parent'] = parent unless parent.nil?
118
+ command.query['noteId'] = note_id unless note_id.nil?
119
+ command.query['fields'] = fields unless fields.nil?
120
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
121
+ execute_or_queue_command(command, &block)
122
+ end
123
+
124
+ # Deletes the specified note.
125
+ # @param [String] name
126
+ # Required. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[
127
+ # NOTE_ID]`.
128
+ # @param [String] fields
129
+ # Selector specifying which fields to include in a partial response.
130
+ # @param [String] quota_user
131
+ # Available to use for quota purposes for server-side applications. Can be any
132
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
133
+ # @param [Google::Apis::RequestOptions] options
134
+ # Request-specific options
135
+ #
136
+ # @yield [result, err] Result & error if block supplied
137
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::Empty] parsed result object
138
+ # @yieldparam err [StandardError] error object if request failed
139
+ #
140
+ # @return [Google::Apis::ContaineranalysisV1beta1::Empty]
141
+ #
142
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
143
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
144
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
145
+ def delete_project_note(name, fields: nil, quota_user: nil, options: nil, &block)
146
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
147
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::Empty::Representation
148
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::Empty
149
+ command.params['name'] = name unless name.nil?
150
+ command.query['fields'] = fields unless fields.nil?
151
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
152
+ execute_or_queue_command(command, &block)
153
+ end
154
+
155
+ # Gets the specified note.
156
+ # @param [String] name
157
+ # Required. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[
158
+ # NOTE_ID]`.
159
+ # @param [String] fields
160
+ # Selector specifying which fields to include in a partial response.
161
+ # @param [String] quota_user
162
+ # Available to use for quota purposes for server-side applications. Can be any
163
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
164
+ # @param [Google::Apis::RequestOptions] options
165
+ # Request-specific options
166
+ #
167
+ # @yield [result, err] Result & error if block supplied
168
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::Note] parsed result object
169
+ # @yieldparam err [StandardError] error object if request failed
170
+ #
171
+ # @return [Google::Apis::ContaineranalysisV1beta1::Note]
172
+ #
173
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
174
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
175
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
176
+ def get_project_note(name, fields: nil, quota_user: nil, options: nil, &block)
177
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
178
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::Note::Representation
179
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::Note
180
+ command.params['name'] = name unless name.nil?
181
+ command.query['fields'] = fields unless fields.nil?
182
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
183
+ execute_or_queue_command(command, &block)
184
+ end
185
+
186
+ # Gets the access control policy for a note or an occurrence resource. Requires `
187
+ # containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.
188
+ # setIamPolicy` permission if the resource is a note or occurrence, respectively.
189
+ # The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
190
+ # notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.
191
+ # @param [String] resource
192
+ # REQUIRED: The resource for which the policy is being requested. See the
193
+ # operation documentation for the appropriate value for this field.
194
+ # @param [Google::Apis::ContaineranalysisV1beta1::GetIamPolicyRequest] get_iam_policy_request_object
195
+ # @param [String] fields
196
+ # Selector specifying which fields to include in a partial response.
197
+ # @param [String] quota_user
198
+ # Available to use for quota purposes for server-side applications. Can be any
199
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
200
+ # @param [Google::Apis::RequestOptions] options
201
+ # Request-specific options
202
+ #
203
+ # @yield [result, err] Result & error if block supplied
204
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::Policy] parsed result object
205
+ # @yieldparam err [StandardError] error object if request failed
206
+ #
207
+ # @return [Google::Apis::ContaineranalysisV1beta1::Policy]
208
+ #
209
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
210
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
211
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
212
+ def get_note_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
213
+ command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options)
214
+ command.request_representation = Google::Apis::ContaineranalysisV1beta1::GetIamPolicyRequest::Representation
215
+ command.request_object = get_iam_policy_request_object
216
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::Policy::Representation
217
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::Policy
218
+ command.params['resource'] = resource unless resource.nil?
219
+ command.query['fields'] = fields unless fields.nil?
220
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
221
+ execute_or_queue_command(command, &block)
222
+ end
223
+
224
+ # Lists notes for the specified project.
225
+ # @param [String] parent
226
+ # Required. The name of the project to list notes for in the form of `projects/[
227
+ # PROJECT_ID]`.
228
+ # @param [String] filter
229
+ # The filter expression.
230
+ # @param [Fixnum] page_size
231
+ # Number of notes to return in the list. Must be positive. Max allowed page size
232
+ # is 1000. If not specified, page size defaults to 20.
233
+ # @param [String] page_token
234
+ # Token to provide to skip to a particular spot in the list.
235
+ # @param [String] fields
236
+ # Selector specifying which fields to include in a partial response.
237
+ # @param [String] quota_user
238
+ # Available to use for quota purposes for server-side applications. Can be any
239
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
240
+ # @param [Google::Apis::RequestOptions] options
241
+ # Request-specific options
242
+ #
243
+ # @yield [result, err] Result & error if block supplied
244
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::ListNotesResponse] parsed result object
245
+ # @yieldparam err [StandardError] error object if request failed
246
+ #
247
+ # @return [Google::Apis::ContaineranalysisV1beta1::ListNotesResponse]
248
+ #
249
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
250
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
251
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
252
+ def list_project_notes(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
253
+ command = make_simple_command(:get, 'v1beta1/{+parent}/notes', options)
254
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::ListNotesResponse::Representation
255
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::ListNotesResponse
256
+ command.params['parent'] = parent unless parent.nil?
257
+ command.query['filter'] = filter unless filter.nil?
258
+ command.query['pageSize'] = page_size unless page_size.nil?
259
+ command.query['pageToken'] = page_token unless page_token.nil?
260
+ command.query['fields'] = fields unless fields.nil?
261
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
262
+ execute_or_queue_command(command, &block)
263
+ end
264
+
265
+ # Updates the specified note.
266
+ # @param [String] name
267
+ # Required. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[
268
+ # NOTE_ID]`.
269
+ # @param [Google::Apis::ContaineranalysisV1beta1::Note] note_object
270
+ # @param [String] update_mask
271
+ # The fields to update.
272
+ # @param [String] fields
273
+ # Selector specifying which fields to include in a partial response.
274
+ # @param [String] quota_user
275
+ # Available to use for quota purposes for server-side applications. Can be any
276
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
277
+ # @param [Google::Apis::RequestOptions] options
278
+ # Request-specific options
279
+ #
280
+ # @yield [result, err] Result & error if block supplied
281
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::Note] parsed result object
282
+ # @yieldparam err [StandardError] error object if request failed
283
+ #
284
+ # @return [Google::Apis::ContaineranalysisV1beta1::Note]
285
+ #
286
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
287
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
288
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
289
+ def patch_project_note(name, note_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
290
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
291
+ command.request_representation = Google::Apis::ContaineranalysisV1beta1::Note::Representation
292
+ command.request_object = note_object
293
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::Note::Representation
294
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::Note
295
+ command.params['name'] = name unless name.nil?
296
+ command.query['updateMask'] = update_mask unless update_mask.nil?
297
+ command.query['fields'] = fields unless fields.nil?
298
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
299
+ execute_or_queue_command(command, &block)
300
+ end
301
+
302
+ # Sets the access control policy on the specified note or occurrence. Requires `
303
+ # containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.
304
+ # setIamPolicy` permission if the resource is a note or an occurrence,
305
+ # respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[
306
+ # NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`
307
+ # for occurrences.
308
+ # @param [String] resource
309
+ # REQUIRED: The resource for which the policy is being specified. See the
310
+ # operation documentation for the appropriate value for this field.
311
+ # @param [Google::Apis::ContaineranalysisV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
312
+ # @param [String] fields
313
+ # Selector specifying which fields to include in a partial response.
314
+ # @param [String] quota_user
315
+ # Available to use for quota purposes for server-side applications. Can be any
316
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
317
+ # @param [Google::Apis::RequestOptions] options
318
+ # Request-specific options
319
+ #
320
+ # @yield [result, err] Result & error if block supplied
321
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::Policy] parsed result object
322
+ # @yieldparam err [StandardError] error object if request failed
323
+ #
324
+ # @return [Google::Apis::ContaineranalysisV1beta1::Policy]
325
+ #
326
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
327
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
328
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
329
+ def set_note_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
330
+ command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
331
+ command.request_representation = Google::Apis::ContaineranalysisV1beta1::SetIamPolicyRequest::Representation
332
+ command.request_object = set_iam_policy_request_object
333
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::Policy::Representation
334
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::Policy
335
+ command.params['resource'] = resource unless resource.nil?
336
+ command.query['fields'] = fields unless fields.nil?
337
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
338
+ execute_or_queue_command(command, &block)
339
+ end
340
+
341
+ # Returns the permissions that a caller has on the specified note or occurrence.
342
+ # Requires list permission on the project (for example, `containeranalysis.notes.
343
+ # list`). The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]`
344
+ # for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
345
+ # occurrences.
346
+ # @param [String] resource
347
+ # REQUIRED: The resource for which the policy detail is being requested. See the
348
+ # operation documentation for the appropriate value for this field.
349
+ # @param [Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
350
+ # @param [String] fields
351
+ # Selector specifying which fields to include in a partial response.
352
+ # @param [String] quota_user
353
+ # Available to use for quota purposes for server-side applications. Can be any
354
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
355
+ # @param [Google::Apis::RequestOptions] options
356
+ # Request-specific options
357
+ #
358
+ # @yield [result, err] Result & error if block supplied
359
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsResponse] parsed result object
360
+ # @yieldparam err [StandardError] error object if request failed
361
+ #
362
+ # @return [Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsResponse]
363
+ #
364
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
365
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
366
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
367
+ def test_note_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
368
+ command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
369
+ command.request_representation = Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsRequest::Representation
370
+ command.request_object = test_iam_permissions_request_object
371
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsResponse::Representation
372
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsResponse
373
+ command.params['resource'] = resource unless resource.nil?
374
+ command.query['fields'] = fields unless fields.nil?
375
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
376
+ execute_or_queue_command(command, &block)
377
+ end
378
+
379
+ # Lists occurrences referencing the specified note. Provider projects can use
380
+ # this method to get all occurrences across consumer projects referencing the
381
+ # specified note.
382
+ # @param [String] name
383
+ # Required. The name of the note to list occurrences for in the form of `
384
+ # projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
385
+ # @param [String] filter
386
+ # The filter expression.
387
+ # @param [Fixnum] page_size
388
+ # Number of occurrences to return in the list.
389
+ # @param [String] page_token
390
+ # Token to provide to skip to a particular spot in the list.
391
+ # @param [String] fields
392
+ # Selector specifying which fields to include in a partial response.
393
+ # @param [String] quota_user
394
+ # Available to use for quota purposes for server-side applications. Can be any
395
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
396
+ # @param [Google::Apis::RequestOptions] options
397
+ # Request-specific options
398
+ #
399
+ # @yield [result, err] Result & error if block supplied
400
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::ListNoteOccurrencesResponse] parsed result object
401
+ # @yieldparam err [StandardError] error object if request failed
402
+ #
403
+ # @return [Google::Apis::ContaineranalysisV1beta1::ListNoteOccurrencesResponse]
404
+ #
405
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
406
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
407
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
408
+ def list_project_note_occurrences(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
409
+ command = make_simple_command(:get, 'v1beta1/{+name}/occurrences', options)
410
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::ListNoteOccurrencesResponse::Representation
411
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::ListNoteOccurrencesResponse
412
+ command.params['name'] = name unless name.nil?
413
+ command.query['filter'] = filter unless filter.nil?
414
+ command.query['pageSize'] = page_size unless page_size.nil?
415
+ command.query['pageToken'] = page_token unless page_token.nil?
416
+ command.query['fields'] = fields unless fields.nil?
417
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
418
+ execute_or_queue_command(command, &block)
419
+ end
420
+
421
+ # Creates new occurrences in batch.
422
+ # @param [String] parent
423
+ # Required. The name of the project in the form of `projects/[PROJECT_ID]`,
424
+ # under which the occurrences are to be created.
425
+ # @param [Google::Apis::ContaineranalysisV1beta1::BatchCreateOccurrencesRequest] batch_create_occurrences_request_object
426
+ # @param [String] fields
427
+ # Selector specifying which fields to include in a partial response.
428
+ # @param [String] quota_user
429
+ # Available to use for quota purposes for server-side applications. Can be any
430
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
431
+ # @param [Google::Apis::RequestOptions] options
432
+ # Request-specific options
433
+ #
434
+ # @yield [result, err] Result & error if block supplied
435
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::BatchCreateOccurrencesResponse] parsed result object
436
+ # @yieldparam err [StandardError] error object if request failed
437
+ #
438
+ # @return [Google::Apis::ContaineranalysisV1beta1::BatchCreateOccurrencesResponse]
439
+ #
440
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
441
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
442
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
443
+ def batch_create_occurrences(parent, batch_create_occurrences_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
444
+ command = make_simple_command(:post, 'v1beta1/{+parent}/occurrences:batchCreate', options)
445
+ command.request_representation = Google::Apis::ContaineranalysisV1beta1::BatchCreateOccurrencesRequest::Representation
446
+ command.request_object = batch_create_occurrences_request_object
447
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::BatchCreateOccurrencesResponse::Representation
448
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::BatchCreateOccurrencesResponse
449
+ command.params['parent'] = parent unless parent.nil?
450
+ command.query['fields'] = fields unless fields.nil?
451
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
452
+ execute_or_queue_command(command, &block)
453
+ end
454
+
455
+ # Creates a new occurrence.
456
+ # @param [String] parent
457
+ # Required. The name of the project in the form of `projects/[PROJECT_ID]`,
458
+ # under which the occurrence is to be created.
459
+ # @param [Google::Apis::ContaineranalysisV1beta1::Occurrence] occurrence_object
460
+ # @param [String] fields
461
+ # Selector specifying which fields to include in a partial response.
462
+ # @param [String] quota_user
463
+ # Available to use for quota purposes for server-side applications. Can be any
464
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
465
+ # @param [Google::Apis::RequestOptions] options
466
+ # Request-specific options
467
+ #
468
+ # @yield [result, err] Result & error if block supplied
469
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::Occurrence] parsed result object
470
+ # @yieldparam err [StandardError] error object if request failed
471
+ #
472
+ # @return [Google::Apis::ContaineranalysisV1beta1::Occurrence]
473
+ #
474
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
475
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
476
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
477
+ def create_project_occurrence(parent, occurrence_object = nil, fields: nil, quota_user: nil, options: nil, &block)
478
+ command = make_simple_command(:post, 'v1beta1/{+parent}/occurrences', options)
479
+ command.request_representation = Google::Apis::ContaineranalysisV1beta1::Occurrence::Representation
480
+ command.request_object = occurrence_object
481
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::Occurrence::Representation
482
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::Occurrence
483
+ command.params['parent'] = parent unless parent.nil?
484
+ command.query['fields'] = fields unless fields.nil?
485
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
486
+ execute_or_queue_command(command, &block)
487
+ end
488
+
489
+ # Deletes the specified occurrence. For example, use this method to delete an
490
+ # occurrence when the occurrence is no longer applicable for the given resource.
491
+ # @param [String] name
492
+ # Required. The name of the occurrence in the form of `projects/[PROJECT_ID]/
493
+ # occurrences/[OCCURRENCE_ID]`.
494
+ # @param [String] fields
495
+ # Selector specifying which fields to include in a partial response.
496
+ # @param [String] quota_user
497
+ # Available to use for quota purposes for server-side applications. Can be any
498
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
499
+ # @param [Google::Apis::RequestOptions] options
500
+ # Request-specific options
501
+ #
502
+ # @yield [result, err] Result & error if block supplied
503
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::Empty] parsed result object
504
+ # @yieldparam err [StandardError] error object if request failed
505
+ #
506
+ # @return [Google::Apis::ContaineranalysisV1beta1::Empty]
507
+ #
508
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
509
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
510
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
511
+ def delete_project_occurrence(name, fields: nil, quota_user: nil, options: nil, &block)
512
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
513
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::Empty::Representation
514
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::Empty
515
+ command.params['name'] = name unless name.nil?
516
+ command.query['fields'] = fields unless fields.nil?
517
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
518
+ execute_or_queue_command(command, &block)
519
+ end
520
+
521
+ # Gets the specified occurrence.
522
+ # @param [String] name
523
+ # Required. The name of the occurrence in the form of `projects/[PROJECT_ID]/
524
+ # occurrences/[OCCURRENCE_ID]`.
525
+ # @param [String] fields
526
+ # Selector specifying which fields to include in a partial response.
527
+ # @param [String] quota_user
528
+ # Available to use for quota purposes for server-side applications. Can be any
529
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
530
+ # @param [Google::Apis::RequestOptions] options
531
+ # Request-specific options
532
+ #
533
+ # @yield [result, err] Result & error if block supplied
534
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::Occurrence] parsed result object
535
+ # @yieldparam err [StandardError] error object if request failed
536
+ #
537
+ # @return [Google::Apis::ContaineranalysisV1beta1::Occurrence]
538
+ #
539
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
540
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
541
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
542
+ def get_project_occurrence(name, fields: nil, quota_user: nil, options: nil, &block)
543
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
544
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::Occurrence::Representation
545
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::Occurrence
546
+ command.params['name'] = name unless name.nil?
547
+ command.query['fields'] = fields unless fields.nil?
548
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
549
+ execute_or_queue_command(command, &block)
550
+ end
551
+
552
+ # Gets the access control policy for a note or an occurrence resource. Requires `
553
+ # containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.
554
+ # setIamPolicy` permission if the resource is a note or occurrence, respectively.
555
+ # The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
556
+ # notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.
557
+ # @param [String] resource
558
+ # REQUIRED: The resource for which the policy is being requested. See the
559
+ # operation documentation for the appropriate value for this field.
560
+ # @param [Google::Apis::ContaineranalysisV1beta1::GetIamPolicyRequest] get_iam_policy_request_object
561
+ # @param [String] fields
562
+ # Selector specifying which fields to include in a partial response.
563
+ # @param [String] quota_user
564
+ # Available to use for quota purposes for server-side applications. Can be any
565
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
566
+ # @param [Google::Apis::RequestOptions] options
567
+ # Request-specific options
568
+ #
569
+ # @yield [result, err] Result & error if block supplied
570
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::Policy] parsed result object
571
+ # @yieldparam err [StandardError] error object if request failed
572
+ #
573
+ # @return [Google::Apis::ContaineranalysisV1beta1::Policy]
574
+ #
575
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
576
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
577
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
578
+ def get_occurrence_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
579
+ command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options)
580
+ command.request_representation = Google::Apis::ContaineranalysisV1beta1::GetIamPolicyRequest::Representation
581
+ command.request_object = get_iam_policy_request_object
582
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::Policy::Representation
583
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::Policy
584
+ command.params['resource'] = resource unless resource.nil?
585
+ command.query['fields'] = fields unless fields.nil?
586
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
587
+ execute_or_queue_command(command, &block)
588
+ end
589
+
590
+ # Gets the note attached to the specified occurrence. Consumer projects can use
591
+ # this method to get a note that belongs to a provider project.
592
+ # @param [String] name
593
+ # Required. The name of the occurrence in the form of `projects/[PROJECT_ID]/
594
+ # occurrences/[OCCURRENCE_ID]`.
595
+ # @param [String] fields
596
+ # Selector specifying which fields to include in a partial response.
597
+ # @param [String] quota_user
598
+ # Available to use for quota purposes for server-side applications. Can be any
599
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
600
+ # @param [Google::Apis::RequestOptions] options
601
+ # Request-specific options
602
+ #
603
+ # @yield [result, err] Result & error if block supplied
604
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::Note] parsed result object
605
+ # @yieldparam err [StandardError] error object if request failed
606
+ #
607
+ # @return [Google::Apis::ContaineranalysisV1beta1::Note]
608
+ #
609
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
610
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
611
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
612
+ def get_project_occurrence_notes(name, fields: nil, quota_user: nil, options: nil, &block)
613
+ command = make_simple_command(:get, 'v1beta1/{+name}/notes', options)
614
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::Note::Representation
615
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::Note
616
+ command.params['name'] = name unless name.nil?
617
+ command.query['fields'] = fields unless fields.nil?
618
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
619
+ execute_or_queue_command(command, &block)
620
+ end
621
+
622
+ # Gets a summary of the number and severity of occurrences.
623
+ # @param [String] parent
624
+ # Required. The name of the project to get a vulnerability summary for in the
625
+ # form of `projects/[PROJECT_ID]`.
626
+ # @param [String] filter
627
+ # The filter expression.
628
+ # @param [String] fields
629
+ # Selector specifying which fields to include in a partial response.
630
+ # @param [String] quota_user
631
+ # Available to use for quota purposes for server-side applications. Can be any
632
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
633
+ # @param [Google::Apis::RequestOptions] options
634
+ # Request-specific options
635
+ #
636
+ # @yield [result, err] Result & error if block supplied
637
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::VulnerabilityOccurrencesSummary] parsed result object
638
+ # @yieldparam err [StandardError] error object if request failed
639
+ #
640
+ # @return [Google::Apis::ContaineranalysisV1beta1::VulnerabilityOccurrencesSummary]
641
+ #
642
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
643
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
644
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
645
+ def get_project_occurrence_vulnerability_summary(parent, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
646
+ command = make_simple_command(:get, 'v1beta1/{+parent}/occurrences:vulnerabilitySummary', options)
647
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::VulnerabilityOccurrencesSummary::Representation
648
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::VulnerabilityOccurrencesSummary
649
+ command.params['parent'] = parent unless parent.nil?
650
+ command.query['filter'] = filter unless filter.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
+ # Lists occurrences for the specified project.
657
+ # @param [String] parent
658
+ # Required. The name of the project to list occurrences for in the form of `
659
+ # projects/[PROJECT_ID]`.
660
+ # @param [String] filter
661
+ # The filter expression.
662
+ # @param [Fixnum] page_size
663
+ # Number of occurrences to return in the list. Must be positive. Max allowed
664
+ # page size is 1000. If not specified, page size defaults to 20.
665
+ # @param [String] page_token
666
+ # Token to provide to skip to a particular spot in the list.
667
+ # @param [String] fields
668
+ # Selector specifying which fields to include in a partial response.
669
+ # @param [String] quota_user
670
+ # Available to use for quota purposes for server-side applications. Can be any
671
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
672
+ # @param [Google::Apis::RequestOptions] options
673
+ # Request-specific options
674
+ #
675
+ # @yield [result, err] Result & error if block supplied
676
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::ListOccurrencesResponse] parsed result object
677
+ # @yieldparam err [StandardError] error object if request failed
678
+ #
679
+ # @return [Google::Apis::ContaineranalysisV1beta1::ListOccurrencesResponse]
680
+ #
681
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
682
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
683
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
684
+ def list_project_occurrences(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
685
+ command = make_simple_command(:get, 'v1beta1/{+parent}/occurrences', options)
686
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::ListOccurrencesResponse::Representation
687
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::ListOccurrencesResponse
688
+ command.params['parent'] = parent unless parent.nil?
689
+ command.query['filter'] = filter unless filter.nil?
690
+ command.query['pageSize'] = page_size unless page_size.nil?
691
+ command.query['pageToken'] = page_token unless page_token.nil?
692
+ command.query['fields'] = fields unless fields.nil?
693
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
694
+ execute_or_queue_command(command, &block)
695
+ end
696
+
697
+ # Updates the specified occurrence.
698
+ # @param [String] name
699
+ # Required. The name of the occurrence in the form of `projects/[PROJECT_ID]/
700
+ # occurrences/[OCCURRENCE_ID]`.
701
+ # @param [Google::Apis::ContaineranalysisV1beta1::Occurrence] occurrence_object
702
+ # @param [String] update_mask
703
+ # The fields to update.
704
+ # @param [String] fields
705
+ # Selector specifying which fields to include in a partial response.
706
+ # @param [String] quota_user
707
+ # Available to use for quota purposes for server-side applications. Can be any
708
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
709
+ # @param [Google::Apis::RequestOptions] options
710
+ # Request-specific options
711
+ #
712
+ # @yield [result, err] Result & error if block supplied
713
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::Occurrence] parsed result object
714
+ # @yieldparam err [StandardError] error object if request failed
715
+ #
716
+ # @return [Google::Apis::ContaineranalysisV1beta1::Occurrence]
717
+ #
718
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
719
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
720
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
721
+ def patch_project_occurrence(name, occurrence_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
722
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
723
+ command.request_representation = Google::Apis::ContaineranalysisV1beta1::Occurrence::Representation
724
+ command.request_object = occurrence_object
725
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::Occurrence::Representation
726
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::Occurrence
727
+ command.params['name'] = name unless name.nil?
728
+ command.query['updateMask'] = update_mask unless update_mask.nil?
729
+ command.query['fields'] = fields unless fields.nil?
730
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
731
+ execute_or_queue_command(command, &block)
732
+ end
733
+
734
+ # Sets the access control policy on the specified note or occurrence. Requires `
735
+ # containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.
736
+ # setIamPolicy` permission if the resource is a note or an occurrence,
737
+ # respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[
738
+ # NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`
739
+ # for occurrences.
740
+ # @param [String] resource
741
+ # REQUIRED: The resource for which the policy is being specified. See the
742
+ # operation documentation for the appropriate value for this field.
743
+ # @param [Google::Apis::ContaineranalysisV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
744
+ # @param [String] fields
745
+ # Selector specifying which fields to include in a partial response.
746
+ # @param [String] quota_user
747
+ # Available to use for quota purposes for server-side applications. Can be any
748
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
749
+ # @param [Google::Apis::RequestOptions] options
750
+ # Request-specific options
751
+ #
752
+ # @yield [result, err] Result & error if block supplied
753
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::Policy] parsed result object
754
+ # @yieldparam err [StandardError] error object if request failed
755
+ #
756
+ # @return [Google::Apis::ContaineranalysisV1beta1::Policy]
757
+ #
758
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
759
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
760
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
761
+ def set_occurrence_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
762
+ command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
763
+ command.request_representation = Google::Apis::ContaineranalysisV1beta1::SetIamPolicyRequest::Representation
764
+ command.request_object = set_iam_policy_request_object
765
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::Policy::Representation
766
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::Policy
767
+ command.params['resource'] = resource unless resource.nil?
768
+ command.query['fields'] = fields unless fields.nil?
769
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
770
+ execute_or_queue_command(command, &block)
771
+ end
772
+
773
+ # Returns the permissions that a caller has on the specified note or occurrence.
774
+ # Requires list permission on the project (for example, `containeranalysis.notes.
775
+ # list`). The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]`
776
+ # for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
777
+ # occurrences.
778
+ # @param [String] resource
779
+ # REQUIRED: The resource for which the policy detail is being requested. See the
780
+ # operation documentation for the appropriate value for this field.
781
+ # @param [Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsRequest] test_iam_permissions_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::ContaineranalysisV1beta1::TestIamPermissionsResponse] parsed result object
792
+ # @yieldparam err [StandardError] error object if request failed
793
+ #
794
+ # @return [Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsResponse]
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 test_occurrence_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
800
+ command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
801
+ command.request_representation = Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsRequest::Representation
802
+ command.request_object = test_iam_permissions_request_object
803
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsResponse::Representation
804
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsResponse
805
+ command.params['resource'] = resource unless resource.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
+ # Gets the specified scan configuration.
812
+ # @param [String] name
813
+ # Required. The name of the scan configuration in the form of `projects/[
814
+ # PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.
815
+ # @param [String] fields
816
+ # Selector specifying which fields to include in a partial response.
817
+ # @param [String] quota_user
818
+ # Available to use for quota purposes for server-side applications. Can be any
819
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
820
+ # @param [Google::Apis::RequestOptions] options
821
+ # Request-specific options
822
+ #
823
+ # @yield [result, err] Result & error if block supplied
824
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::ScanConfig] parsed result object
825
+ # @yieldparam err [StandardError] error object if request failed
826
+ #
827
+ # @return [Google::Apis::ContaineranalysisV1beta1::ScanConfig]
828
+ #
829
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
830
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
831
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
832
+ def get_project_scan_config(name, fields: nil, quota_user: nil, options: nil, &block)
833
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
834
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::ScanConfig::Representation
835
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::ScanConfig
836
+ command.params['name'] = name unless name.nil?
837
+ command.query['fields'] = fields unless fields.nil?
838
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
839
+ execute_or_queue_command(command, &block)
840
+ end
841
+
842
+ # Lists scan configurations for the specified project.
843
+ # @param [String] parent
844
+ # Required. The name of the project to list scan configurations for in the form
845
+ # of `projects/[PROJECT_ID]`.
846
+ # @param [String] filter
847
+ # Required. The filter expression.
848
+ # @param [Fixnum] page_size
849
+ # The number of scan configs to return in the list.
850
+ # @param [String] page_token
851
+ # Token to provide to skip to a particular spot in the list.
852
+ # @param [String] fields
853
+ # Selector specifying which fields to include in a partial response.
854
+ # @param [String] quota_user
855
+ # Available to use for quota purposes for server-side applications. Can be any
856
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
857
+ # @param [Google::Apis::RequestOptions] options
858
+ # Request-specific options
859
+ #
860
+ # @yield [result, err] Result & error if block supplied
861
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::ListScanConfigsResponse] parsed result object
862
+ # @yieldparam err [StandardError] error object if request failed
863
+ #
864
+ # @return [Google::Apis::ContaineranalysisV1beta1::ListScanConfigsResponse]
865
+ #
866
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
867
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
868
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
869
+ def list_project_scan_configs(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
870
+ command = make_simple_command(:get, 'v1beta1/{+parent}/scanConfigs', options)
871
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::ListScanConfigsResponse::Representation
872
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::ListScanConfigsResponse
873
+ command.params['parent'] = parent unless parent.nil?
874
+ command.query['filter'] = filter unless filter.nil?
875
+ command.query['pageSize'] = page_size unless page_size.nil?
876
+ command.query['pageToken'] = page_token unless page_token.nil?
877
+ command.query['fields'] = fields unless fields.nil?
878
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
879
+ execute_or_queue_command(command, &block)
880
+ end
881
+
882
+ # Updates the specified scan configuration.
883
+ # @param [String] name
884
+ # Required. The name of the scan configuration in the form of `projects/[
885
+ # PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.
886
+ # @param [Google::Apis::ContaineranalysisV1beta1::ScanConfig] scan_config_object
887
+ # @param [String] fields
888
+ # Selector specifying which fields to include in a partial response.
889
+ # @param [String] quota_user
890
+ # Available to use for quota purposes for server-side applications. Can be any
891
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
892
+ # @param [Google::Apis::RequestOptions] options
893
+ # Request-specific options
894
+ #
895
+ # @yield [result, err] Result & error if block supplied
896
+ # @yieldparam result [Google::Apis::ContaineranalysisV1beta1::ScanConfig] parsed result object
897
+ # @yieldparam err [StandardError] error object if request failed
898
+ #
899
+ # @return [Google::Apis::ContaineranalysisV1beta1::ScanConfig]
900
+ #
901
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
902
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
903
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
904
+ def update_project_scan_config(name, scan_config_object = nil, fields: nil, quota_user: nil, options: nil, &block)
905
+ command = make_simple_command(:put, 'v1beta1/{+name}', options)
906
+ command.request_representation = Google::Apis::ContaineranalysisV1beta1::ScanConfig::Representation
907
+ command.request_object = scan_config_object
908
+ command.response_representation = Google::Apis::ContaineranalysisV1beta1::ScanConfig::Representation
909
+ command.response_class = Google::Apis::ContaineranalysisV1beta1::ScanConfig
910
+ command.params['name'] = name unless name.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
+ protected
917
+
918
+ def apply_command_defaults(command)
919
+ command.query['key'] = key unless key.nil?
920
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
921
+ end
922
+ end
923
+ end
924
+ end
925
+ end