google-apis-securesourcemanager_v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2326 @@
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 SecuresourcemanagerV1
23
+ # Secure Source Manager API
24
+ #
25
+ # Regionally deployed, single-tenant managed source code repository hosted on
26
+ # Google Cloud.
27
+ #
28
+ # @example
29
+ # require 'google/apis/securesourcemanager_v1'
30
+ #
31
+ # Securesourcemanager = Google::Apis::SecuresourcemanagerV1 # Alias the module
32
+ # service = Securesourcemanager::SecureSourceManagerService.new
33
+ #
34
+ # @see https://cloud.google.com/secure-source-manager
35
+ class SecureSourceManagerService < Google::Apis::Core::BaseService
36
+ DEFAULT_ENDPOINT_TEMPLATE = "https://securesourcemanager.$UNIVERSE_DOMAIN$/"
37
+
38
+ # @return [String]
39
+ # API key. Your API key identifies your project and provides you with API access,
40
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
41
+ attr_accessor :key
42
+
43
+ # @return [String]
44
+ # Available to use for quota purposes for server-side applications. Can be any
45
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
46
+ attr_accessor :quota_user
47
+
48
+ def initialize
49
+ super(DEFAULT_ENDPOINT_TEMPLATE, '',
50
+ client_name: 'google-apis-securesourcemanager_v1',
51
+ client_version: Google::Apis::SecuresourcemanagerV1::GEM_VERSION)
52
+ @batch_path = 'batch'
53
+ end
54
+
55
+ # Gets information about a location.
56
+ # @param [String] name
57
+ # Resource name for the location.
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::SecuresourcemanagerV1::Location] parsed result object
68
+ # @yieldparam err [StandardError] error object if request failed
69
+ #
70
+ # @return [Google::Apis::SecuresourcemanagerV1::Location]
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 get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
76
+ command = make_simple_command(:get, 'v1/{+name}', options)
77
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Location::Representation
78
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Location
79
+ command.params['name'] = name unless name.nil?
80
+ command.query['fields'] = fields unless fields.nil?
81
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
82
+ execute_or_queue_command(command, &block)
83
+ end
84
+
85
+ # Lists information about the supported locations for this service.
86
+ # @param [String] name
87
+ # The resource that owns the locations collection, if applicable.
88
+ # @param [Array<String>, String] extra_location_types
89
+ # Optional. A list of extra location types that should be used as conditions for
90
+ # controlling the visibility of the locations.
91
+ # @param [String] filter
92
+ # A filter to narrow down results to a preferred subset. The filtering language
93
+ # accepts strings like `"displayName=tokyo"`, and is documented in more detail
94
+ # in [AIP-160](https://google.aip.dev/160).
95
+ # @param [Fixnum] page_size
96
+ # The maximum number of results to return. If not set, the service selects a
97
+ # default.
98
+ # @param [String] page_token
99
+ # A page token received from the `next_page_token` field in the response. Send
100
+ # that page token to receive the subsequent page.
101
+ # @param [String] fields
102
+ # Selector specifying which fields to include in a partial response.
103
+ # @param [String] quota_user
104
+ # Available to use for quota purposes for server-side applications. Can be any
105
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
106
+ # @param [Google::Apis::RequestOptions] options
107
+ # Request-specific options
108
+ #
109
+ # @yield [result, err] Result & error if block supplied
110
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::ListLocationsResponse] parsed result object
111
+ # @yieldparam err [StandardError] error object if request failed
112
+ #
113
+ # @return [Google::Apis::SecuresourcemanagerV1::ListLocationsResponse]
114
+ #
115
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
116
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
117
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
118
+ def list_project_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
119
+ command = make_simple_command(:get, 'v1/{+name}/locations', options)
120
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::ListLocationsResponse::Representation
121
+ command.response_class = Google::Apis::SecuresourcemanagerV1::ListLocationsResponse
122
+ command.params['name'] = name unless name.nil?
123
+ command.query['extraLocationTypes'] = extra_location_types unless extra_location_types.nil?
124
+ command.query['filter'] = filter unless filter.nil?
125
+ command.query['pageSize'] = page_size unless page_size.nil?
126
+ command.query['pageToken'] = page_token unless page_token.nil?
127
+ command.query['fields'] = fields unless fields.nil?
128
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
129
+ execute_or_queue_command(command, &block)
130
+ end
131
+
132
+ # Creates a new instance in a given project and location.
133
+ # @param [String] parent
134
+ # Required. Value for parent.
135
+ # @param [Google::Apis::SecuresourcemanagerV1::Instance] instance_object
136
+ # @param [String] instance_id
137
+ # Required. ID of the instance to be created.
138
+ # @param [String] request_id
139
+ # Optional. An optional request ID to identify requests. Specify a unique
140
+ # request ID so that if you must retry your request, the server will know to
141
+ # ignore the request if it has already been completed. The server will guarantee
142
+ # that for at least 60 minutes since the first request. For example, consider a
143
+ # situation where you make an initial request and the request times out. If you
144
+ # make the request again with the same request ID, the server can check if
145
+ # original operation with the same request ID was received, and if so, will
146
+ # ignore the second request. This prevents clients from accidentally creating
147
+ # duplicate commitments. The request ID must be a valid UUID with the exception
148
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
149
+ # @param [String] fields
150
+ # Selector specifying which fields to include in a partial response.
151
+ # @param [String] quota_user
152
+ # Available to use for quota purposes for server-side applications. Can be any
153
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
154
+ # @param [Google::Apis::RequestOptions] options
155
+ # Request-specific options
156
+ #
157
+ # @yield [result, err] Result & error if block supplied
158
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
159
+ # @yieldparam err [StandardError] error object if request failed
160
+ #
161
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
162
+ #
163
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
164
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
165
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
166
+ def create_project_location_instance(parent, instance_object = nil, instance_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
167
+ command = make_simple_command(:post, 'v1/{+parent}/instances', options)
168
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::Instance::Representation
169
+ command.request_object = instance_object
170
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
171
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
172
+ command.params['parent'] = parent unless parent.nil?
173
+ command.query['instanceId'] = instance_id unless instance_id.nil?
174
+ command.query['requestId'] = request_id unless request_id.nil?
175
+ command.query['fields'] = fields unless fields.nil?
176
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
177
+ execute_or_queue_command(command, &block)
178
+ end
179
+
180
+ # Deletes a single instance.
181
+ # @param [String] name
182
+ # Required. Name of the resource.
183
+ # @param [String] request_id
184
+ # Optional. An optional request ID to identify requests. Specify a unique
185
+ # request ID so that if you must retry your request, the server will know to
186
+ # ignore the request if it has already been completed. The server will guarantee
187
+ # that for at least 60 minutes after the first request. For example, consider a
188
+ # situation where you make an initial request and the request times out. If you
189
+ # make the request again with the same request ID, the server can check if
190
+ # original operation with the same request ID was received, and if so, will
191
+ # ignore the second request. This prevents clients from accidentally creating
192
+ # duplicate commitments. The request ID must be a valid UUID with the exception
193
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
194
+ # @param [String] fields
195
+ # Selector specifying which fields to include in a partial response.
196
+ # @param [String] quota_user
197
+ # Available to use for quota purposes for server-side applications. Can be any
198
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
199
+ # @param [Google::Apis::RequestOptions] options
200
+ # Request-specific options
201
+ #
202
+ # @yield [result, err] Result & error if block supplied
203
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
204
+ # @yieldparam err [StandardError] error object if request failed
205
+ #
206
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
207
+ #
208
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
209
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
210
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
211
+ def delete_project_location_instance(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
212
+ command = make_simple_command(:delete, 'v1/{+name}', options)
213
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
214
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
215
+ command.params['name'] = name unless name.nil?
216
+ command.query['requestId'] = request_id unless request_id.nil?
217
+ command.query['fields'] = fields unless fields.nil?
218
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
219
+ execute_or_queue_command(command, &block)
220
+ end
221
+
222
+ # Gets details of a single instance.
223
+ # @param [String] name
224
+ # Required. Name of the resource.
225
+ # @param [String] fields
226
+ # Selector specifying which fields to include in a partial response.
227
+ # @param [String] quota_user
228
+ # Available to use for quota purposes for server-side applications. Can be any
229
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
230
+ # @param [Google::Apis::RequestOptions] options
231
+ # Request-specific options
232
+ #
233
+ # @yield [result, err] Result & error if block supplied
234
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Instance] parsed result object
235
+ # @yieldparam err [StandardError] error object if request failed
236
+ #
237
+ # @return [Google::Apis::SecuresourcemanagerV1::Instance]
238
+ #
239
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
240
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
241
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
242
+ def get_project_location_instance(name, fields: nil, quota_user: nil, options: nil, &block)
243
+ command = make_simple_command(:get, 'v1/{+name}', options)
244
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Instance::Representation
245
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Instance
246
+ command.params['name'] = name unless name.nil?
247
+ command.query['fields'] = fields unless fields.nil?
248
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
249
+ execute_or_queue_command(command, &block)
250
+ end
251
+
252
+ # Gets the access control policy for a resource. Returns an empty policy if the
253
+ # resource exists and does not have a policy set.
254
+ # @param [String] resource
255
+ # REQUIRED: The resource for which the policy is being requested. See [Resource
256
+ # names](https://cloud.google.com/apis/design/resource_names) for the
257
+ # appropriate value for this field.
258
+ # @param [Fixnum] options_requested_policy_version
259
+ # Optional. The maximum policy version that will be used to format the policy.
260
+ # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
261
+ # rejected. Requests for policies with any conditional role bindings must
262
+ # specify version 3. Policies with no conditional role bindings may specify any
263
+ # valid value or leave the field unset. The policy in the response might use the
264
+ # policy version that you specified, or it might use a lower policy version. For
265
+ # example, if you specify version 3, but the policy has no conditional role
266
+ # bindings, the response uses version 1. To learn which resources support
267
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
268
+ # google.com/iam/help/conditions/resource-policies).
269
+ # @param [String] fields
270
+ # Selector specifying which fields to include in a partial response.
271
+ # @param [String] quota_user
272
+ # Available to use for quota purposes for server-side applications. Can be any
273
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
274
+ # @param [Google::Apis::RequestOptions] options
275
+ # Request-specific options
276
+ #
277
+ # @yield [result, err] Result & error if block supplied
278
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Policy] parsed result object
279
+ # @yieldparam err [StandardError] error object if request failed
280
+ #
281
+ # @return [Google::Apis::SecuresourcemanagerV1::Policy]
282
+ #
283
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
284
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
285
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
286
+ def get_project_location_instance_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
287
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
288
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Policy::Representation
289
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Policy
290
+ command.params['resource'] = resource unless resource.nil?
291
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
292
+ command.query['fields'] = fields unless fields.nil?
293
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
294
+ execute_or_queue_command(command, &block)
295
+ end
296
+
297
+ # Lists Instances in a given project and location.
298
+ # @param [String] parent
299
+ # Required. Parent value for ListInstancesRequest.
300
+ # @param [String] filter
301
+ # Filter for filtering results.
302
+ # @param [String] order_by
303
+ # Hint for how to order the results.
304
+ # @param [Fixnum] page_size
305
+ # Requested page size. Server may return fewer items than requested. If
306
+ # unspecified, server will pick an appropriate default.
307
+ # @param [String] page_token
308
+ # A token identifying a page of results the server should return.
309
+ # @param [String] fields
310
+ # Selector specifying which fields to include in a partial response.
311
+ # @param [String] quota_user
312
+ # Available to use for quota purposes for server-side applications. Can be any
313
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
314
+ # @param [Google::Apis::RequestOptions] options
315
+ # Request-specific options
316
+ #
317
+ # @yield [result, err] Result & error if block supplied
318
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::ListInstancesResponse] parsed result object
319
+ # @yieldparam err [StandardError] error object if request failed
320
+ #
321
+ # @return [Google::Apis::SecuresourcemanagerV1::ListInstancesResponse]
322
+ #
323
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
324
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
325
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
326
+ def list_project_location_instances(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
327
+ command = make_simple_command(:get, 'v1/{+parent}/instances', options)
328
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::ListInstancesResponse::Representation
329
+ command.response_class = Google::Apis::SecuresourcemanagerV1::ListInstancesResponse
330
+ command.params['parent'] = parent unless parent.nil?
331
+ command.query['filter'] = filter unless filter.nil?
332
+ command.query['orderBy'] = order_by unless order_by.nil?
333
+ command.query['pageSize'] = page_size unless page_size.nil?
334
+ command.query['pageToken'] = page_token unless page_token.nil?
335
+ command.query['fields'] = fields unless fields.nil?
336
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
337
+ execute_or_queue_command(command, &block)
338
+ end
339
+
340
+ # Sets the access control policy on the specified resource. Replaces any
341
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
342
+ # PERMISSION_DENIED` errors.
343
+ # @param [String] resource
344
+ # REQUIRED: The resource for which the policy is being specified. See [Resource
345
+ # names](https://cloud.google.com/apis/design/resource_names) for the
346
+ # appropriate value for this field.
347
+ # @param [Google::Apis::SecuresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object
348
+ # @param [String] fields
349
+ # Selector specifying which fields to include in a partial response.
350
+ # @param [String] quota_user
351
+ # Available to use for quota purposes for server-side applications. Can be any
352
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
353
+ # @param [Google::Apis::RequestOptions] options
354
+ # Request-specific options
355
+ #
356
+ # @yield [result, err] Result & error if block supplied
357
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Policy] parsed result object
358
+ # @yieldparam err [StandardError] error object if request failed
359
+ #
360
+ # @return [Google::Apis::SecuresourcemanagerV1::Policy]
361
+ #
362
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
363
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
364
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
365
+ def set_instance_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
366
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
367
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::SetIamPolicyRequest::Representation
368
+ command.request_object = set_iam_policy_request_object
369
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Policy::Representation
370
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Policy
371
+ command.params['resource'] = resource unless resource.nil?
372
+ command.query['fields'] = fields unless fields.nil?
373
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
374
+ execute_or_queue_command(command, &block)
375
+ end
376
+
377
+ # Returns permissions that a caller has on the specified resource. If the
378
+ # resource does not exist, this will return an empty set of permissions, not a `
379
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
380
+ # permission-aware UIs and command-line tools, not for authorization checking.
381
+ # This operation may "fail open" without warning.
382
+ # @param [String] resource
383
+ # REQUIRED: The resource for which the policy detail is being requested. See [
384
+ # Resource names](https://cloud.google.com/apis/design/resource_names) for the
385
+ # appropriate value for this field.
386
+ # @param [Google::Apis::SecuresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
387
+ # @param [String] fields
388
+ # Selector specifying which fields to include in a partial response.
389
+ # @param [String] quota_user
390
+ # Available to use for quota purposes for server-side applications. Can be any
391
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
392
+ # @param [Google::Apis::RequestOptions] options
393
+ # Request-specific options
394
+ #
395
+ # @yield [result, err] Result & error if block supplied
396
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::TestIamPermissionsResponse] parsed result object
397
+ # @yieldparam err [StandardError] error object if request failed
398
+ #
399
+ # @return [Google::Apis::SecuresourcemanagerV1::TestIamPermissionsResponse]
400
+ #
401
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
402
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
403
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
404
+ def test_instance_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
405
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
406
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::TestIamPermissionsRequest::Representation
407
+ command.request_object = test_iam_permissions_request_object
408
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::TestIamPermissionsResponse::Representation
409
+ command.response_class = Google::Apis::SecuresourcemanagerV1::TestIamPermissionsResponse
410
+ command.params['resource'] = resource unless resource.nil?
411
+ command.query['fields'] = fields unless fields.nil?
412
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
413
+ execute_or_queue_command(command, &block)
414
+ end
415
+
416
+ # Starts asynchronous cancellation on a long-running operation. The server makes
417
+ # a best effort to cancel the operation, but success is not guaranteed. If the
418
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
419
+ # Clients can use Operations.GetOperation or other methods to check whether the
420
+ # cancellation succeeded or whether the operation completed despite cancellation.
421
+ # On successful cancellation, the operation is not deleted; instead, it becomes
422
+ # an operation with an Operation.error value with a google.rpc.Status.code of `1`
423
+ # , corresponding to `Code.CANCELLED`.
424
+ # @param [String] name
425
+ # The name of the operation resource to be cancelled.
426
+ # @param [Google::Apis::SecuresourcemanagerV1::CancelOperationRequest] cancel_operation_request_object
427
+ # @param [String] fields
428
+ # Selector specifying which fields to include in a partial response.
429
+ # @param [String] quota_user
430
+ # Available to use for quota purposes for server-side applications. Can be any
431
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
432
+ # @param [Google::Apis::RequestOptions] options
433
+ # Request-specific options
434
+ #
435
+ # @yield [result, err] Result & error if block supplied
436
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Empty] parsed result object
437
+ # @yieldparam err [StandardError] error object if request failed
438
+ #
439
+ # @return [Google::Apis::SecuresourcemanagerV1::Empty]
440
+ #
441
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
442
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
443
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
444
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
445
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
446
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::CancelOperationRequest::Representation
447
+ command.request_object = cancel_operation_request_object
448
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Empty::Representation
449
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Empty
450
+ command.params['name'] = name unless name.nil?
451
+ command.query['fields'] = fields unless fields.nil?
452
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
453
+ execute_or_queue_command(command, &block)
454
+ end
455
+
456
+ # Deletes a long-running operation. This method indicates that the client is no
457
+ # longer interested in the operation result. It does not cancel the operation.
458
+ # If the server doesn't support this method, it returns `google.rpc.Code.
459
+ # UNIMPLEMENTED`.
460
+ # @param [String] name
461
+ # The name of the operation resource to be deleted.
462
+ # @param [String] fields
463
+ # Selector specifying which fields to include in a partial response.
464
+ # @param [String] quota_user
465
+ # Available to use for quota purposes for server-side applications. Can be any
466
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
467
+ # @param [Google::Apis::RequestOptions] options
468
+ # Request-specific options
469
+ #
470
+ # @yield [result, err] Result & error if block supplied
471
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Empty] parsed result object
472
+ # @yieldparam err [StandardError] error object if request failed
473
+ #
474
+ # @return [Google::Apis::SecuresourcemanagerV1::Empty]
475
+ #
476
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
477
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
478
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
479
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
480
+ command = make_simple_command(:delete, 'v1/{+name}', options)
481
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Empty::Representation
482
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Empty
483
+ command.params['name'] = name unless name.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
+ # Gets the latest state of a long-running operation. Clients can use this method
490
+ # to poll the operation result at intervals as recommended by the API service.
491
+ # @param [String] name
492
+ # The name of the operation resource.
493
+ # @param [String] fields
494
+ # Selector specifying which fields to include in a partial response.
495
+ # @param [String] quota_user
496
+ # Available to use for quota purposes for server-side applications. Can be any
497
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
498
+ # @param [Google::Apis::RequestOptions] options
499
+ # Request-specific options
500
+ #
501
+ # @yield [result, err] Result & error if block supplied
502
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
503
+ # @yieldparam err [StandardError] error object if request failed
504
+ #
505
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
506
+ #
507
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
508
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
509
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
510
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
511
+ command = make_simple_command(:get, 'v1/{+name}', options)
512
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
513
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
514
+ command.params['name'] = name unless name.nil?
515
+ command.query['fields'] = fields unless fields.nil?
516
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
517
+ execute_or_queue_command(command, &block)
518
+ end
519
+
520
+ # Lists operations that match the specified filter in the request. If the server
521
+ # doesn't support this method, it returns `UNIMPLEMENTED`.
522
+ # @param [String] name
523
+ # The name of the operation's parent resource.
524
+ # @param [String] filter
525
+ # The standard list filter.
526
+ # @param [Fixnum] page_size
527
+ # The standard list page size.
528
+ # @param [String] page_token
529
+ # The standard list page token.
530
+ # @param [String] fields
531
+ # Selector specifying which fields to include in a partial response.
532
+ # @param [String] quota_user
533
+ # Available to use for quota purposes for server-side applications. Can be any
534
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
535
+ # @param [Google::Apis::RequestOptions] options
536
+ # Request-specific options
537
+ #
538
+ # @yield [result, err] Result & error if block supplied
539
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::ListOperationsResponse] parsed result object
540
+ # @yieldparam err [StandardError] error object if request failed
541
+ #
542
+ # @return [Google::Apis::SecuresourcemanagerV1::ListOperationsResponse]
543
+ #
544
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
545
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
546
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
547
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
548
+ command = make_simple_command(:get, 'v1/{+name}/operations', options)
549
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::ListOperationsResponse::Representation
550
+ command.response_class = Google::Apis::SecuresourcemanagerV1::ListOperationsResponse
551
+ command.params['name'] = name unless name.nil?
552
+ command.query['filter'] = filter unless filter.nil?
553
+ command.query['pageSize'] = page_size unless page_size.nil?
554
+ command.query['pageToken'] = page_token unless page_token.nil?
555
+ command.query['fields'] = fields unless fields.nil?
556
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
557
+ execute_or_queue_command(command, &block)
558
+ end
559
+
560
+ # Creates a new repository in a given project and location. The Repository.
561
+ # Instance field is required in the request body for requests using the
562
+ # securesourcemanager.googleapis.com endpoint.
563
+ # @param [String] parent
564
+ # Required. The project in which to create the repository. Values are of the
565
+ # form `projects/`project_number`/locations/`location_id``
566
+ # @param [Google::Apis::SecuresourcemanagerV1::Repository] repository_object
567
+ # @param [String] repository_id
568
+ # Required. The ID to use for the repository, which will become the final
569
+ # component of the repository's resource name. This value should be 4-63
570
+ # characters, and valid characters are /a-z-/.
571
+ # @param [String] fields
572
+ # Selector specifying which fields to include in a partial response.
573
+ # @param [String] quota_user
574
+ # Available to use for quota purposes for server-side applications. Can be any
575
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
576
+ # @param [Google::Apis::RequestOptions] options
577
+ # Request-specific options
578
+ #
579
+ # @yield [result, err] Result & error if block supplied
580
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
581
+ # @yieldparam err [StandardError] error object if request failed
582
+ #
583
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
584
+ #
585
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
586
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
587
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
588
+ def create_project_location_repository(parent, repository_object = nil, repository_id: nil, fields: nil, quota_user: nil, options: nil, &block)
589
+ command = make_simple_command(:post, 'v1/{+parent}/repositories', options)
590
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::Repository::Representation
591
+ command.request_object = repository_object
592
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
593
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
594
+ command.params['parent'] = parent unless parent.nil?
595
+ command.query['repositoryId'] = repository_id unless repository_id.nil?
596
+ command.query['fields'] = fields unless fields.nil?
597
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
598
+ execute_or_queue_command(command, &block)
599
+ end
600
+
601
+ # Deletes a Repository.
602
+ # @param [String] name
603
+ # Required. Name of the repository to delete. The format is `projects/`
604
+ # project_number`/locations/`location_id`/repositories/`repository_id``.
605
+ # @param [Boolean] allow_missing
606
+ # Optional. If set to true, and the repository is not found, the request will
607
+ # succeed but no action will be taken on the server.
608
+ # @param [String] fields
609
+ # Selector specifying which fields to include in a partial response.
610
+ # @param [String] quota_user
611
+ # Available to use for quota purposes for server-side applications. Can be any
612
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
613
+ # @param [Google::Apis::RequestOptions] options
614
+ # Request-specific options
615
+ #
616
+ # @yield [result, err] Result & error if block supplied
617
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
618
+ # @yieldparam err [StandardError] error object if request failed
619
+ #
620
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
621
+ #
622
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
623
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
624
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
625
+ def delete_project_location_repository(name, allow_missing: nil, fields: nil, quota_user: nil, options: nil, &block)
626
+ command = make_simple_command(:delete, 'v1/{+name}', options)
627
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
628
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
629
+ command.params['name'] = name unless name.nil?
630
+ command.query['allowMissing'] = allow_missing unless allow_missing.nil?
631
+ command.query['fields'] = fields unless fields.nil?
632
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
633
+ execute_or_queue_command(command, &block)
634
+ end
635
+
636
+ # Fetches a blob from a repository.
637
+ # @param [String] repository
638
+ # Required. The format is `projects/`project_number`/locations/`location_id`/
639
+ # repositories/`repository_id``. Specifies the repository containing the blob.
640
+ # @param [String] sha
641
+ # Required. The SHA-1 hash of the blob to retrieve.
642
+ # @param [String] fields
643
+ # Selector specifying which fields to include in a partial response.
644
+ # @param [String] quota_user
645
+ # Available to use for quota purposes for server-side applications. Can be any
646
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
647
+ # @param [Google::Apis::RequestOptions] options
648
+ # Request-specific options
649
+ #
650
+ # @yield [result, err] Result & error if block supplied
651
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::FetchBlobResponse] parsed result object
652
+ # @yieldparam err [StandardError] error object if request failed
653
+ #
654
+ # @return [Google::Apis::SecuresourcemanagerV1::FetchBlobResponse]
655
+ #
656
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
657
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
658
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
659
+ def fetch_project_location_repository_blob(repository, sha: nil, fields: nil, quota_user: nil, options: nil, &block)
660
+ command = make_simple_command(:get, 'v1/{+repository}:fetchBlob', options)
661
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::FetchBlobResponse::Representation
662
+ command.response_class = Google::Apis::SecuresourcemanagerV1::FetchBlobResponse
663
+ command.params['repository'] = repository unless repository.nil?
664
+ command.query['sha'] = sha unless sha.nil?
665
+ command.query['fields'] = fields unless fields.nil?
666
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
667
+ execute_or_queue_command(command, &block)
668
+ end
669
+
670
+ # Fetches a tree from a repository.
671
+ # @param [String] repository
672
+ # Required. The format is `projects/`project_number`/locations/`location_id`/
673
+ # repositories/`repository_id``. Specifies the repository to fetch the tree from.
674
+ # @param [Fixnum] page_size
675
+ # Optional. Requested page size. Server may return fewer items than requested.
676
+ # If unspecified, at most 10,000 items will be returned.
677
+ # @param [String] page_token
678
+ # Optional. A token identifying a page of results the server should return.
679
+ # @param [Boolean] recursive
680
+ # Optional. If true, include all subfolders and their files in the response. If
681
+ # false, only the immediate children are returned.
682
+ # @param [String] ref
683
+ # Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies which
684
+ # tree to fetch. If not specified, the default branch will be used.
685
+ # @param [String] fields
686
+ # Selector specifying which fields to include in a partial response.
687
+ # @param [String] quota_user
688
+ # Available to use for quota purposes for server-side applications. Can be any
689
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
690
+ # @param [Google::Apis::RequestOptions] options
691
+ # Request-specific options
692
+ #
693
+ # @yield [result, err] Result & error if block supplied
694
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::FetchTreeResponse] parsed result object
695
+ # @yieldparam err [StandardError] error object if request failed
696
+ #
697
+ # @return [Google::Apis::SecuresourcemanagerV1::FetchTreeResponse]
698
+ #
699
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
700
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
701
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
702
+ def fetch_project_location_repository_tree(repository, page_size: nil, page_token: nil, recursive: nil, ref: nil, fields: nil, quota_user: nil, options: nil, &block)
703
+ command = make_simple_command(:get, 'v1/{+repository}:fetchTree', options)
704
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::FetchTreeResponse::Representation
705
+ command.response_class = Google::Apis::SecuresourcemanagerV1::FetchTreeResponse
706
+ command.params['repository'] = repository unless repository.nil?
707
+ command.query['pageSize'] = page_size unless page_size.nil?
708
+ command.query['pageToken'] = page_token unless page_token.nil?
709
+ command.query['recursive'] = recursive unless recursive.nil?
710
+ command.query['ref'] = ref unless ref.nil?
711
+ command.query['fields'] = fields unless fields.nil?
712
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
713
+ execute_or_queue_command(command, &block)
714
+ end
715
+
716
+ # Gets metadata of a repository.
717
+ # @param [String] name
718
+ # Required. Name of the repository to retrieve. The format is `projects/`
719
+ # project_number`/locations/`location_id`/repositories/`repository_id``.
720
+ # @param [String] fields
721
+ # Selector specifying which fields to include in a partial response.
722
+ # @param [String] quota_user
723
+ # Available to use for quota purposes for server-side applications. Can be any
724
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
725
+ # @param [Google::Apis::RequestOptions] options
726
+ # Request-specific options
727
+ #
728
+ # @yield [result, err] Result & error if block supplied
729
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Repository] parsed result object
730
+ # @yieldparam err [StandardError] error object if request failed
731
+ #
732
+ # @return [Google::Apis::SecuresourcemanagerV1::Repository]
733
+ #
734
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
735
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
736
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
737
+ def get_project_location_repository(name, fields: nil, quota_user: nil, options: nil, &block)
738
+ command = make_simple_command(:get, 'v1/{+name}', options)
739
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Repository::Representation
740
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Repository
741
+ command.params['name'] = name unless name.nil?
742
+ command.query['fields'] = fields unless fields.nil?
743
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
744
+ execute_or_queue_command(command, &block)
745
+ end
746
+
747
+ # Get IAM policy for a repository.
748
+ # @param [String] resource
749
+ # REQUIRED: The resource for which the policy is being requested. See [Resource
750
+ # names](https://cloud.google.com/apis/design/resource_names) for the
751
+ # appropriate value for this field.
752
+ # @param [Fixnum] options_requested_policy_version
753
+ # Optional. The maximum policy version that will be used to format the policy.
754
+ # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
755
+ # rejected. Requests for policies with any conditional role bindings must
756
+ # specify version 3. Policies with no conditional role bindings may specify any
757
+ # valid value or leave the field unset. The policy in the response might use the
758
+ # policy version that you specified, or it might use a lower policy version. For
759
+ # example, if you specify version 3, but the policy has no conditional role
760
+ # bindings, the response uses version 1. To learn which resources support
761
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
762
+ # google.com/iam/help/conditions/resource-policies).
763
+ # @param [String] fields
764
+ # Selector specifying which fields to include in a partial response.
765
+ # @param [String] quota_user
766
+ # Available to use for quota purposes for server-side applications. Can be any
767
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
768
+ # @param [Google::Apis::RequestOptions] options
769
+ # Request-specific options
770
+ #
771
+ # @yield [result, err] Result & error if block supplied
772
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Policy] parsed result object
773
+ # @yieldparam err [StandardError] error object if request failed
774
+ #
775
+ # @return [Google::Apis::SecuresourcemanagerV1::Policy]
776
+ #
777
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
778
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
779
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
780
+ def get_project_location_repository_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
781
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
782
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Policy::Representation
783
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Policy
784
+ command.params['resource'] = resource unless resource.nil?
785
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
786
+ command.query['fields'] = fields unless fields.nil?
787
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
788
+ execute_or_queue_command(command, &block)
789
+ end
790
+
791
+ # Lists Repositories in a given project and location. The instance field is
792
+ # required in the query parameter for requests using the securesourcemanager.
793
+ # googleapis.com endpoint.
794
+ # @param [String] parent
795
+ # Required. Parent value for ListRepositoriesRequest.
796
+ # @param [String] filter
797
+ # Optional. Filter results.
798
+ # @param [String] instance
799
+ # Optional. The name of the instance in which the repository is hosted,
800
+ # formatted as `projects/`project_number`/locations/`location_id`/instances/`
801
+ # instance_id``. When listing repositories via securesourcemanager.googleapis.
802
+ # com, this field is required. When listing repositories via *.sourcemanager.dev,
803
+ # this field is ignored.
804
+ # @param [Fixnum] page_size
805
+ # Optional. Requested page size. Server may return fewer items than requested.
806
+ # If unspecified, server will pick an appropriate default.
807
+ # @param [String] page_token
808
+ # A token identifying a page of results the server should return.
809
+ # @param [String] fields
810
+ # Selector specifying which fields to include in a partial response.
811
+ # @param [String] quota_user
812
+ # Available to use for quota purposes for server-side applications. Can be any
813
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
814
+ # @param [Google::Apis::RequestOptions] options
815
+ # Request-specific options
816
+ #
817
+ # @yield [result, err] Result & error if block supplied
818
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::ListRepositoriesResponse] parsed result object
819
+ # @yieldparam err [StandardError] error object if request failed
820
+ #
821
+ # @return [Google::Apis::SecuresourcemanagerV1::ListRepositoriesResponse]
822
+ #
823
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
824
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
825
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
826
+ def list_project_location_repositories(parent, filter: nil, instance: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
827
+ command = make_simple_command(:get, 'v1/{+parent}/repositories', options)
828
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::ListRepositoriesResponse::Representation
829
+ command.response_class = Google::Apis::SecuresourcemanagerV1::ListRepositoriesResponse
830
+ command.params['parent'] = parent unless parent.nil?
831
+ command.query['filter'] = filter unless filter.nil?
832
+ command.query['instance'] = instance unless instance.nil?
833
+ command.query['pageSize'] = page_size unless page_size.nil?
834
+ command.query['pageToken'] = page_token unless page_token.nil?
835
+ command.query['fields'] = fields unless fields.nil?
836
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
837
+ execute_or_queue_command(command, &block)
838
+ end
839
+
840
+ # Updates the metadata of a repository.
841
+ # @param [String] name
842
+ # Optional. A unique identifier for a repository. The name should be of the
843
+ # format: `projects/`project`/locations/`location_id`/repositories/`
844
+ # repository_id``
845
+ # @param [Google::Apis::SecuresourcemanagerV1::Repository] repository_object
846
+ # @param [String] update_mask
847
+ # Optional. Field mask is used to specify the fields to be overwritten in the
848
+ # repository resource by the update. The fields specified in the update_mask are
849
+ # relative to the resource, not the full request. A field will be overwritten if
850
+ # it is in the mask. If the user does not provide a mask then all fields will be
851
+ # overwritten.
852
+ # @param [Boolean] validate_only
853
+ # Optional. False by default. If set to true, the request is validated and the
854
+ # user is provided with an expected result, but no actual change is made.
855
+ # @param [String] fields
856
+ # Selector specifying which fields to include in a partial response.
857
+ # @param [String] quota_user
858
+ # Available to use for quota purposes for server-side applications. Can be any
859
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
860
+ # @param [Google::Apis::RequestOptions] options
861
+ # Request-specific options
862
+ #
863
+ # @yield [result, err] Result & error if block supplied
864
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
865
+ # @yieldparam err [StandardError] error object if request failed
866
+ #
867
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
868
+ #
869
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
870
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
871
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
872
+ def patch_project_location_repository(name, repository_object = nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
873
+ command = make_simple_command(:patch, 'v1/{+name}', options)
874
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::Repository::Representation
875
+ command.request_object = repository_object
876
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
877
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
878
+ command.params['name'] = name unless name.nil?
879
+ command.query['updateMask'] = update_mask unless update_mask.nil?
880
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
881
+ command.query['fields'] = fields unless fields.nil?
882
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
883
+ execute_or_queue_command(command, &block)
884
+ end
885
+
886
+ # Set IAM policy on a repository.
887
+ # @param [String] resource
888
+ # REQUIRED: The resource for which the policy is being specified. See [Resource
889
+ # names](https://cloud.google.com/apis/design/resource_names) for the
890
+ # appropriate value for this field.
891
+ # @param [Google::Apis::SecuresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object
892
+ # @param [String] fields
893
+ # Selector specifying which fields to include in a partial response.
894
+ # @param [String] quota_user
895
+ # Available to use for quota purposes for server-side applications. Can be any
896
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
897
+ # @param [Google::Apis::RequestOptions] options
898
+ # Request-specific options
899
+ #
900
+ # @yield [result, err] Result & error if block supplied
901
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Policy] parsed result object
902
+ # @yieldparam err [StandardError] error object if request failed
903
+ #
904
+ # @return [Google::Apis::SecuresourcemanagerV1::Policy]
905
+ #
906
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
907
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
908
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
909
+ def set_repository_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
910
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
911
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::SetIamPolicyRequest::Representation
912
+ command.request_object = set_iam_policy_request_object
913
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Policy::Representation
914
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Policy
915
+ command.params['resource'] = resource unless resource.nil?
916
+ command.query['fields'] = fields unless fields.nil?
917
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
918
+ execute_or_queue_command(command, &block)
919
+ end
920
+
921
+ # Test IAM permissions on a repository. IAM permission checks are not required
922
+ # on this method.
923
+ # @param [String] resource
924
+ # REQUIRED: The resource for which the policy detail is being requested. See [
925
+ # Resource names](https://cloud.google.com/apis/design/resource_names) for the
926
+ # appropriate value for this field.
927
+ # @param [Google::Apis::SecuresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
928
+ # @param [String] fields
929
+ # Selector specifying which fields to include in a partial response.
930
+ # @param [String] quota_user
931
+ # Available to use for quota purposes for server-side applications. Can be any
932
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
933
+ # @param [Google::Apis::RequestOptions] options
934
+ # Request-specific options
935
+ #
936
+ # @yield [result, err] Result & error if block supplied
937
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::TestIamPermissionsResponse] parsed result object
938
+ # @yieldparam err [StandardError] error object if request failed
939
+ #
940
+ # @return [Google::Apis::SecuresourcemanagerV1::TestIamPermissionsResponse]
941
+ #
942
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
943
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
944
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
945
+ def test_repository_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
946
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
947
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::TestIamPermissionsRequest::Representation
948
+ command.request_object = test_iam_permissions_request_object
949
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::TestIamPermissionsResponse::Representation
950
+ command.response_class = Google::Apis::SecuresourcemanagerV1::TestIamPermissionsResponse
951
+ command.params['resource'] = resource unless resource.nil?
952
+ command.query['fields'] = fields unless fields.nil?
953
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
954
+ execute_or_queue_command(command, &block)
955
+ end
956
+
957
+ # CreateBranchRule creates a branch rule in a given repository.
958
+ # @param [String] parent
959
+ # @param [Google::Apis::SecuresourcemanagerV1::BranchRule] branch_rule_object
960
+ # @param [String] branch_rule_id
961
+ # @param [String] fields
962
+ # Selector specifying which fields to include in a partial response.
963
+ # @param [String] quota_user
964
+ # Available to use for quota purposes for server-side applications. Can be any
965
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
966
+ # @param [Google::Apis::RequestOptions] options
967
+ # Request-specific options
968
+ #
969
+ # @yield [result, err] Result & error if block supplied
970
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
971
+ # @yieldparam err [StandardError] error object if request failed
972
+ #
973
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
974
+ #
975
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
976
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
977
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
978
+ def create_project_location_repository_branch_rule(parent, branch_rule_object = nil, branch_rule_id: nil, fields: nil, quota_user: nil, options: nil, &block)
979
+ command = make_simple_command(:post, 'v1/{+parent}/branchRules', options)
980
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::BranchRule::Representation
981
+ command.request_object = branch_rule_object
982
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
983
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
984
+ command.params['parent'] = parent unless parent.nil?
985
+ command.query['branchRuleId'] = branch_rule_id unless branch_rule_id.nil?
986
+ command.query['fields'] = fields unless fields.nil?
987
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
988
+ execute_or_queue_command(command, &block)
989
+ end
990
+
991
+ # DeleteBranchRule deletes a branch rule.
992
+ # @param [String] name
993
+ # @param [Boolean] allow_missing
994
+ # Optional. If set to true, and the branch rule is not found, the request will
995
+ # succeed but no action will be taken on the server.
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::SecuresourcemanagerV1::Operation] parsed result object
1006
+ # @yieldparam err [StandardError] error object if request failed
1007
+ #
1008
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
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_project_location_repository_branch_rule(name, allow_missing: nil, fields: nil, quota_user: nil, options: nil, &block)
1014
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1015
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
1016
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
1017
+ command.params['name'] = name unless name.nil?
1018
+ command.query['allowMissing'] = allow_missing unless allow_missing.nil?
1019
+ command.query['fields'] = fields unless fields.nil?
1020
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1021
+ execute_or_queue_command(command, &block)
1022
+ end
1023
+
1024
+ # GetBranchRule gets a branch rule.
1025
+ # @param [String] name
1026
+ # Required. Name of the repository to retrieve. The format is `projects/`project`
1027
+ # /locations/`location`/repositories/`repository`/branchRules/`branch_rule``.
1028
+ # @param [String] fields
1029
+ # Selector specifying which fields to include in a partial response.
1030
+ # @param [String] quota_user
1031
+ # Available to use for quota purposes for server-side applications. Can be any
1032
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1033
+ # @param [Google::Apis::RequestOptions] options
1034
+ # Request-specific options
1035
+ #
1036
+ # @yield [result, err] Result & error if block supplied
1037
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::BranchRule] parsed result object
1038
+ # @yieldparam err [StandardError] error object if request failed
1039
+ #
1040
+ # @return [Google::Apis::SecuresourcemanagerV1::BranchRule]
1041
+ #
1042
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1043
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1044
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1045
+ def get_project_location_repository_branch_rule(name, fields: nil, quota_user: nil, options: nil, &block)
1046
+ command = make_simple_command(:get, 'v1/{+name}', options)
1047
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::BranchRule::Representation
1048
+ command.response_class = Google::Apis::SecuresourcemanagerV1::BranchRule
1049
+ command.params['name'] = name unless name.nil?
1050
+ command.query['fields'] = fields unless fields.nil?
1051
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1052
+ execute_or_queue_command(command, &block)
1053
+ end
1054
+
1055
+ # ListBranchRules lists branch rules in a given repository.
1056
+ # @param [String] parent
1057
+ # @param [Fixnum] page_size
1058
+ # @param [String] page_token
1059
+ # @param [String] fields
1060
+ # Selector specifying which fields to include in a partial response.
1061
+ # @param [String] quota_user
1062
+ # Available to use for quota purposes for server-side applications. Can be any
1063
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1064
+ # @param [Google::Apis::RequestOptions] options
1065
+ # Request-specific options
1066
+ #
1067
+ # @yield [result, err] Result & error if block supplied
1068
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::ListBranchRulesResponse] parsed result object
1069
+ # @yieldparam err [StandardError] error object if request failed
1070
+ #
1071
+ # @return [Google::Apis::SecuresourcemanagerV1::ListBranchRulesResponse]
1072
+ #
1073
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1074
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1075
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1076
+ def list_project_location_repository_branch_rules(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1077
+ command = make_simple_command(:get, 'v1/{+parent}/branchRules', options)
1078
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::ListBranchRulesResponse::Representation
1079
+ command.response_class = Google::Apis::SecuresourcemanagerV1::ListBranchRulesResponse
1080
+ command.params['parent'] = parent unless parent.nil?
1081
+ command.query['pageSize'] = page_size unless page_size.nil?
1082
+ command.query['pageToken'] = page_token unless page_token.nil?
1083
+ command.query['fields'] = fields unless fields.nil?
1084
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1085
+ execute_or_queue_command(command, &block)
1086
+ end
1087
+
1088
+ # UpdateBranchRule updates a branch rule.
1089
+ # @param [String] name
1090
+ # Optional. A unique identifier for a BranchRule. The name should be of the
1091
+ # format: `projects/`project`/locations/`location`/repositories/`repository`/
1092
+ # branchRules/`branch_rule``
1093
+ # @param [Google::Apis::SecuresourcemanagerV1::BranchRule] branch_rule_object
1094
+ # @param [String] update_mask
1095
+ # Required. Field mask is used to specify the fields to be overwritten in the
1096
+ # branchRule resource by the update. The fields specified in the update_mask are
1097
+ # relative to the resource, not the full request. A field will be overwritten if
1098
+ # it is in the mask. The special value "*" means full replacement.
1099
+ # @param [Boolean] validate_only
1100
+ # Optional. If set, validate the request and preview the review, but do not
1101
+ # actually post it. (https://google.aip.dev/163, for declarative friendly)
1102
+ # @param [String] fields
1103
+ # Selector specifying which fields to include in a partial response.
1104
+ # @param [String] quota_user
1105
+ # Available to use for quota purposes for server-side applications. Can be any
1106
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1107
+ # @param [Google::Apis::RequestOptions] options
1108
+ # Request-specific options
1109
+ #
1110
+ # @yield [result, err] Result & error if block supplied
1111
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
1112
+ # @yieldparam err [StandardError] error object if request failed
1113
+ #
1114
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
1115
+ #
1116
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1117
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1118
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1119
+ def patch_project_location_repository_branch_rule(name, branch_rule_object = nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
1120
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1121
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::BranchRule::Representation
1122
+ command.request_object = branch_rule_object
1123
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
1124
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
1125
+ command.params['name'] = name unless name.nil?
1126
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1127
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
1128
+ command.query['fields'] = fields unless fields.nil?
1129
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1130
+ execute_or_queue_command(command, &block)
1131
+ end
1132
+
1133
+ # Creates a new hook in a given repository.
1134
+ # @param [String] parent
1135
+ # Required. The repository in which to create the hook. Values are of the form `
1136
+ # projects/`project_number`/locations/`location_id`/repositories/`repository_id``
1137
+ # @param [Google::Apis::SecuresourcemanagerV1::Hook] hook_object
1138
+ # @param [String] hook_id
1139
+ # Required. The ID to use for the hook, which will become the final component of
1140
+ # the hook's resource name. This value restricts to lower-case letters, numbers,
1141
+ # and hyphen, with the first character a letter, the last a letter or a number,
1142
+ # and a 63 character maximum.
1143
+ # @param [String] fields
1144
+ # Selector specifying which fields to include in a partial response.
1145
+ # @param [String] quota_user
1146
+ # Available to use for quota purposes for server-side applications. Can be any
1147
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1148
+ # @param [Google::Apis::RequestOptions] options
1149
+ # Request-specific options
1150
+ #
1151
+ # @yield [result, err] Result & error if block supplied
1152
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
1153
+ # @yieldparam err [StandardError] error object if request failed
1154
+ #
1155
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
1156
+ #
1157
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1158
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1159
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1160
+ def create_project_location_repository_hook(parent, hook_object = nil, hook_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1161
+ command = make_simple_command(:post, 'v1/{+parent}/hooks', options)
1162
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::Hook::Representation
1163
+ command.request_object = hook_object
1164
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
1165
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
1166
+ command.params['parent'] = parent unless parent.nil?
1167
+ command.query['hookId'] = hook_id unless hook_id.nil?
1168
+ command.query['fields'] = fields unless fields.nil?
1169
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1170
+ execute_or_queue_command(command, &block)
1171
+ end
1172
+
1173
+ # Deletes a Hook.
1174
+ # @param [String] name
1175
+ # Required. Name of the hook to delete. The format is `projects/`project_number`/
1176
+ # locations/`location_id`/repositories/`repository_id`/hooks/`hook_id``.
1177
+ # @param [String] fields
1178
+ # Selector specifying which fields to include in a partial response.
1179
+ # @param [String] quota_user
1180
+ # Available to use for quota purposes for server-side applications. Can be any
1181
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1182
+ # @param [Google::Apis::RequestOptions] options
1183
+ # Request-specific options
1184
+ #
1185
+ # @yield [result, err] Result & error if block supplied
1186
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
1187
+ # @yieldparam err [StandardError] error object if request failed
1188
+ #
1189
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
1190
+ #
1191
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1192
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1193
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1194
+ def delete_project_location_repository_hook(name, fields: nil, quota_user: nil, options: nil, &block)
1195
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1196
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
1197
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
1198
+ command.params['name'] = name unless name.nil?
1199
+ command.query['fields'] = fields unless fields.nil?
1200
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1201
+ execute_or_queue_command(command, &block)
1202
+ end
1203
+
1204
+ # Gets metadata of a hook.
1205
+ # @param [String] name
1206
+ # Required. Name of the hook to retrieve. The format is `projects/`
1207
+ # project_number`/locations/`location_id`/repositories/`repository_id`/hooks/`
1208
+ # hook_id``.
1209
+ # @param [String] fields
1210
+ # Selector specifying which fields to include in a partial response.
1211
+ # @param [String] quota_user
1212
+ # Available to use for quota purposes for server-side applications. Can be any
1213
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1214
+ # @param [Google::Apis::RequestOptions] options
1215
+ # Request-specific options
1216
+ #
1217
+ # @yield [result, err] Result & error if block supplied
1218
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Hook] parsed result object
1219
+ # @yieldparam err [StandardError] error object if request failed
1220
+ #
1221
+ # @return [Google::Apis::SecuresourcemanagerV1::Hook]
1222
+ #
1223
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1224
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1225
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1226
+ def get_project_location_repository_hook(name, fields: nil, quota_user: nil, options: nil, &block)
1227
+ command = make_simple_command(:get, 'v1/{+name}', options)
1228
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Hook::Representation
1229
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Hook
1230
+ command.params['name'] = name unless name.nil?
1231
+ command.query['fields'] = fields unless fields.nil?
1232
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1233
+ execute_or_queue_command(command, &block)
1234
+ end
1235
+
1236
+ # Lists hooks in a given repository.
1237
+ # @param [String] parent
1238
+ # Required. Parent value for ListHooksRequest.
1239
+ # @param [Fixnum] page_size
1240
+ # Optional. Requested page size. Server may return fewer items than requested.
1241
+ # If unspecified, server will pick an appropriate default.
1242
+ # @param [String] page_token
1243
+ # Optional. A token identifying a page of results the server should return.
1244
+ # @param [String] fields
1245
+ # Selector specifying which fields to include in a partial response.
1246
+ # @param [String] quota_user
1247
+ # Available to use for quota purposes for server-side applications. Can be any
1248
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1249
+ # @param [Google::Apis::RequestOptions] options
1250
+ # Request-specific options
1251
+ #
1252
+ # @yield [result, err] Result & error if block supplied
1253
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::ListHooksResponse] parsed result object
1254
+ # @yieldparam err [StandardError] error object if request failed
1255
+ #
1256
+ # @return [Google::Apis::SecuresourcemanagerV1::ListHooksResponse]
1257
+ #
1258
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1259
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1260
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1261
+ def list_project_location_repository_hooks(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1262
+ command = make_simple_command(:get, 'v1/{+parent}/hooks', options)
1263
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::ListHooksResponse::Representation
1264
+ command.response_class = Google::Apis::SecuresourcemanagerV1::ListHooksResponse
1265
+ command.params['parent'] = parent unless parent.nil?
1266
+ command.query['pageSize'] = page_size unless page_size.nil?
1267
+ command.query['pageToken'] = page_token unless page_token.nil?
1268
+ command.query['fields'] = fields unless fields.nil?
1269
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1270
+ execute_or_queue_command(command, &block)
1271
+ end
1272
+
1273
+ # Updates the metadata of a hook.
1274
+ # @param [String] name
1275
+ # Identifier. A unique identifier for a Hook. The name should be of the format: `
1276
+ # projects/`project`/locations/`location_id`/repositories/`repository_id`/hooks/`
1277
+ # hook_id``
1278
+ # @param [Google::Apis::SecuresourcemanagerV1::Hook] hook_object
1279
+ # @param [String] update_mask
1280
+ # Required. Field mask is used to specify the fields to be overwritten in the
1281
+ # hook resource by the update. The fields specified in the update_mask are
1282
+ # relative to the resource, not the full request. A field will be overwritten if
1283
+ # it is in the mask. The special value "*" means full replacement.
1284
+ # @param [String] fields
1285
+ # Selector specifying which fields to include in a partial response.
1286
+ # @param [String] quota_user
1287
+ # Available to use for quota purposes for server-side applications. Can be any
1288
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1289
+ # @param [Google::Apis::RequestOptions] options
1290
+ # Request-specific options
1291
+ #
1292
+ # @yield [result, err] Result & error if block supplied
1293
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
1294
+ # @yieldparam err [StandardError] error object if request failed
1295
+ #
1296
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
1297
+ #
1298
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1299
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1300
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1301
+ def patch_project_location_repository_hook(name, hook_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1302
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1303
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::Hook::Representation
1304
+ command.request_object = hook_object
1305
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
1306
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
1307
+ command.params['name'] = name unless name.nil?
1308
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1309
+ command.query['fields'] = fields unless fields.nil?
1310
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1311
+ execute_or_queue_command(command, &block)
1312
+ end
1313
+
1314
+ # Closes an issue.
1315
+ # @param [String] name
1316
+ # Required. Name of the issue to close. The format is `projects/`project_number`/
1317
+ # locations/`location_id`/repositories/`repository_id`/issues/`issue_id``.
1318
+ # @param [Google::Apis::SecuresourcemanagerV1::CloseIssueRequest] close_issue_request_object
1319
+ # @param [String] fields
1320
+ # Selector specifying which fields to include in a partial response.
1321
+ # @param [String] quota_user
1322
+ # Available to use for quota purposes for server-side applications. Can be any
1323
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1324
+ # @param [Google::Apis::RequestOptions] options
1325
+ # Request-specific options
1326
+ #
1327
+ # @yield [result, err] Result & error if block supplied
1328
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
1329
+ # @yieldparam err [StandardError] error object if request failed
1330
+ #
1331
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
1332
+ #
1333
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1334
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1335
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1336
+ def close_issue(name, close_issue_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1337
+ command = make_simple_command(:post, 'v1/{+name}:close', options)
1338
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::CloseIssueRequest::Representation
1339
+ command.request_object = close_issue_request_object
1340
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
1341
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
1342
+ command.params['name'] = name unless name.nil?
1343
+ command.query['fields'] = fields unless fields.nil?
1344
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1345
+ execute_or_queue_command(command, &block)
1346
+ end
1347
+
1348
+ # Creates an issue.
1349
+ # @param [String] parent
1350
+ # Required. The repository in which to create the issue. Format: `projects/`
1351
+ # project_number`/locations/`location_id`/repositories/`repository_id``
1352
+ # @param [Google::Apis::SecuresourcemanagerV1::Issue] issue_object
1353
+ # @param [String] fields
1354
+ # Selector specifying which fields to include in a partial response.
1355
+ # @param [String] quota_user
1356
+ # Available to use for quota purposes for server-side applications. Can be any
1357
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1358
+ # @param [Google::Apis::RequestOptions] options
1359
+ # Request-specific options
1360
+ #
1361
+ # @yield [result, err] Result & error if block supplied
1362
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
1363
+ # @yieldparam err [StandardError] error object if request failed
1364
+ #
1365
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
1366
+ #
1367
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1368
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1369
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1370
+ def create_project_location_repository_issue(parent, issue_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1371
+ command = make_simple_command(:post, 'v1/{+parent}/issues', options)
1372
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::Issue::Representation
1373
+ command.request_object = issue_object
1374
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
1375
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
1376
+ command.params['parent'] = parent unless parent.nil?
1377
+ command.query['fields'] = fields unless fields.nil?
1378
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1379
+ execute_or_queue_command(command, &block)
1380
+ end
1381
+
1382
+ # Deletes an issue.
1383
+ # @param [String] name
1384
+ # Required. Name of the issue to delete. The format is `projects/`project_number`
1385
+ # /locations/`location_id`/repositories/`repository_id`/issues/`issue_id``.
1386
+ # @param [String] etag
1387
+ # Optional. The current etag of the issue. If the etag is provided and does not
1388
+ # match the current etag of the issue, deletion will be blocked and an ABORTED
1389
+ # error will be returned.
1390
+ # @param [String] fields
1391
+ # Selector specifying which fields to include in a partial response.
1392
+ # @param [String] quota_user
1393
+ # Available to use for quota purposes for server-side applications. Can be any
1394
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1395
+ # @param [Google::Apis::RequestOptions] options
1396
+ # Request-specific options
1397
+ #
1398
+ # @yield [result, err] Result & error if block supplied
1399
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
1400
+ # @yieldparam err [StandardError] error object if request failed
1401
+ #
1402
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
1403
+ #
1404
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1405
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1406
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1407
+ def delete_project_location_repository_issue(name, etag: nil, fields: nil, quota_user: nil, options: nil, &block)
1408
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1409
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
1410
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
1411
+ command.params['name'] = name unless name.nil?
1412
+ command.query['etag'] = etag unless etag.nil?
1413
+ command.query['fields'] = fields unless fields.nil?
1414
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1415
+ execute_or_queue_command(command, &block)
1416
+ end
1417
+
1418
+ # Gets an issue.
1419
+ # @param [String] name
1420
+ # Required. Name of the issue to retrieve. The format is `projects/`project`/
1421
+ # locations/`location`/repositories/`repository`/issues/`issue_id``.
1422
+ # @param [String] fields
1423
+ # Selector specifying which fields to include in a partial response.
1424
+ # @param [String] quota_user
1425
+ # Available to use for quota purposes for server-side applications. Can be any
1426
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1427
+ # @param [Google::Apis::RequestOptions] options
1428
+ # Request-specific options
1429
+ #
1430
+ # @yield [result, err] Result & error if block supplied
1431
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Issue] parsed result object
1432
+ # @yieldparam err [StandardError] error object if request failed
1433
+ #
1434
+ # @return [Google::Apis::SecuresourcemanagerV1::Issue]
1435
+ #
1436
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1437
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1438
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1439
+ def get_project_location_repository_issue(name, fields: nil, quota_user: nil, options: nil, &block)
1440
+ command = make_simple_command(:get, 'v1/{+name}', options)
1441
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Issue::Representation
1442
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Issue
1443
+ command.params['name'] = name unless name.nil?
1444
+ command.query['fields'] = fields unless fields.nil?
1445
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1446
+ execute_or_queue_command(command, &block)
1447
+ end
1448
+
1449
+ # Lists issues in a repository.
1450
+ # @param [String] parent
1451
+ # Required. The repository in which to list issues. Format: `projects/`
1452
+ # project_number`/locations/`location_id`/repositories/`repository_id``
1453
+ # @param [String] filter
1454
+ # Optional. Used to filter the resulting issues list.
1455
+ # @param [Fixnum] page_size
1456
+ # Optional. Requested page size. Server may return fewer items than requested.
1457
+ # If unspecified, server will pick an appropriate default.
1458
+ # @param [String] page_token
1459
+ # Optional. A token identifying a page of results the server should return.
1460
+ # @param [String] fields
1461
+ # Selector specifying which fields to include in a partial response.
1462
+ # @param [String] quota_user
1463
+ # Available to use for quota purposes for server-side applications. Can be any
1464
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1465
+ # @param [Google::Apis::RequestOptions] options
1466
+ # Request-specific options
1467
+ #
1468
+ # @yield [result, err] Result & error if block supplied
1469
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::ListIssuesResponse] parsed result object
1470
+ # @yieldparam err [StandardError] error object if request failed
1471
+ #
1472
+ # @return [Google::Apis::SecuresourcemanagerV1::ListIssuesResponse]
1473
+ #
1474
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1475
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1476
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1477
+ def list_project_location_repository_issues(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1478
+ command = make_simple_command(:get, 'v1/{+parent}/issues', options)
1479
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::ListIssuesResponse::Representation
1480
+ command.response_class = Google::Apis::SecuresourcemanagerV1::ListIssuesResponse
1481
+ command.params['parent'] = parent unless parent.nil?
1482
+ command.query['filter'] = filter unless filter.nil?
1483
+ command.query['pageSize'] = page_size unless page_size.nil?
1484
+ command.query['pageToken'] = page_token unless page_token.nil?
1485
+ command.query['fields'] = fields unless fields.nil?
1486
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1487
+ execute_or_queue_command(command, &block)
1488
+ end
1489
+
1490
+ # Opens an issue.
1491
+ # @param [String] name
1492
+ # Required. Name of the issue to open. The format is `projects/`project_number`/
1493
+ # locations/`location_id`/repositories/`repository_id`/issues/`issue_id``.
1494
+ # @param [Google::Apis::SecuresourcemanagerV1::OpenIssueRequest] open_issue_request_object
1495
+ # @param [String] fields
1496
+ # Selector specifying which fields to include in a partial response.
1497
+ # @param [String] quota_user
1498
+ # Available to use for quota purposes for server-side applications. Can be any
1499
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1500
+ # @param [Google::Apis::RequestOptions] options
1501
+ # Request-specific options
1502
+ #
1503
+ # @yield [result, err] Result & error if block supplied
1504
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
1505
+ # @yieldparam err [StandardError] error object if request failed
1506
+ #
1507
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
1508
+ #
1509
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1510
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1511
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1512
+ def open_issue(name, open_issue_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1513
+ command = make_simple_command(:post, 'v1/{+name}:open', options)
1514
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::OpenIssueRequest::Representation
1515
+ command.request_object = open_issue_request_object
1516
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
1517
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
1518
+ command.params['name'] = name unless name.nil?
1519
+ command.query['fields'] = fields unless fields.nil?
1520
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1521
+ execute_or_queue_command(command, &block)
1522
+ end
1523
+
1524
+ # Updates a issue.
1525
+ # @param [String] name
1526
+ # Identifier. Unique identifier for an issue. The issue id is generated by the
1527
+ # server. Format: `projects/`project`/locations/`location`/repositories/`
1528
+ # repository`/issues/`issue_id``
1529
+ # @param [Google::Apis::SecuresourcemanagerV1::Issue] issue_object
1530
+ # @param [String] update_mask
1531
+ # Optional. Field mask is used to specify the fields to be overwritten in the
1532
+ # issue resource by the update. The fields specified in the update_mask are
1533
+ # relative to the resource, not the full request. A field will be overwritten if
1534
+ # it is in the mask. The special value "*" means full replacement.
1535
+ # @param [String] fields
1536
+ # Selector specifying which fields to include in a partial response.
1537
+ # @param [String] quota_user
1538
+ # Available to use for quota purposes for server-side applications. Can be any
1539
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1540
+ # @param [Google::Apis::RequestOptions] options
1541
+ # Request-specific options
1542
+ #
1543
+ # @yield [result, err] Result & error if block supplied
1544
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
1545
+ # @yieldparam err [StandardError] error object if request failed
1546
+ #
1547
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
1548
+ #
1549
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1550
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1551
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1552
+ def patch_project_location_repository_issue(name, issue_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1553
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1554
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::Issue::Representation
1555
+ command.request_object = issue_object
1556
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
1557
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
1558
+ command.params['name'] = name unless name.nil?
1559
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1560
+ command.query['fields'] = fields unless fields.nil?
1561
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1562
+ execute_or_queue_command(command, &block)
1563
+ end
1564
+
1565
+ # Creates an issue comment.
1566
+ # @param [String] parent
1567
+ # Required. The issue in which to create the issue comment. Format: `projects/`
1568
+ # project_number`/locations/`location_id`/repositories/`repository_id`/issues/`
1569
+ # issue_id``
1570
+ # @param [Google::Apis::SecuresourcemanagerV1::IssueComment] issue_comment_object
1571
+ # @param [String] fields
1572
+ # Selector specifying which fields to include in a partial response.
1573
+ # @param [String] quota_user
1574
+ # Available to use for quota purposes for server-side applications. Can be any
1575
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1576
+ # @param [Google::Apis::RequestOptions] options
1577
+ # Request-specific options
1578
+ #
1579
+ # @yield [result, err] Result & error if block supplied
1580
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
1581
+ # @yieldparam err [StandardError] error object if request failed
1582
+ #
1583
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
1584
+ #
1585
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1586
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1587
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1588
+ def create_project_location_repository_issue_issue_comment(parent, issue_comment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1589
+ command = make_simple_command(:post, 'v1/{+parent}/issueComments', options)
1590
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::IssueComment::Representation
1591
+ command.request_object = issue_comment_object
1592
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
1593
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
1594
+ command.params['parent'] = parent unless parent.nil?
1595
+ command.query['fields'] = fields unless fields.nil?
1596
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1597
+ execute_or_queue_command(command, &block)
1598
+ end
1599
+
1600
+ # Deletes an issue comment.
1601
+ # @param [String] name
1602
+ # Required. Name of the issue comment to delete. The format is `projects/`
1603
+ # project_number`/locations/`location_id`/repositories/`repository_id`/issues/`
1604
+ # issue_id`/issueComments/`comment_id``.
1605
+ # @param [String] fields
1606
+ # Selector specifying which fields to include in a partial response.
1607
+ # @param [String] quota_user
1608
+ # Available to use for quota purposes for server-side applications. Can be any
1609
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1610
+ # @param [Google::Apis::RequestOptions] options
1611
+ # Request-specific options
1612
+ #
1613
+ # @yield [result, err] Result & error if block supplied
1614
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
1615
+ # @yieldparam err [StandardError] error object if request failed
1616
+ #
1617
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
1618
+ #
1619
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1620
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1621
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1622
+ def delete_project_location_repository_issue_issue_comment(name, fields: nil, quota_user: nil, options: nil, &block)
1623
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1624
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
1625
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
1626
+ command.params['name'] = name unless name.nil?
1627
+ command.query['fields'] = fields unless fields.nil?
1628
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1629
+ execute_or_queue_command(command, &block)
1630
+ end
1631
+
1632
+ # Gets an issue comment.
1633
+ # @param [String] name
1634
+ # Required. Name of the issue comment to retrieve. The format is `projects/`
1635
+ # project`/locations/`location`/repositories/`repository`/issues/`issue_id`/
1636
+ # issueComments/`comment_id``.
1637
+ # @param [String] fields
1638
+ # Selector specifying which fields to include in a partial response.
1639
+ # @param [String] quota_user
1640
+ # Available to use for quota purposes for server-side applications. Can be any
1641
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1642
+ # @param [Google::Apis::RequestOptions] options
1643
+ # Request-specific options
1644
+ #
1645
+ # @yield [result, err] Result & error if block supplied
1646
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::IssueComment] parsed result object
1647
+ # @yieldparam err [StandardError] error object if request failed
1648
+ #
1649
+ # @return [Google::Apis::SecuresourcemanagerV1::IssueComment]
1650
+ #
1651
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1652
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1653
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1654
+ def get_project_location_repository_issue_issue_comment(name, fields: nil, quota_user: nil, options: nil, &block)
1655
+ command = make_simple_command(:get, 'v1/{+name}', options)
1656
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::IssueComment::Representation
1657
+ command.response_class = Google::Apis::SecuresourcemanagerV1::IssueComment
1658
+ command.params['name'] = name unless name.nil?
1659
+ command.query['fields'] = fields unless fields.nil?
1660
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1661
+ execute_or_queue_command(command, &block)
1662
+ end
1663
+
1664
+ # Lists comments in an issue.
1665
+ # @param [String] parent
1666
+ # Required. The issue in which to list the comments. Format: `projects/`
1667
+ # project_number`/locations/`location_id`/repositories/`repository_id`/issues/`
1668
+ # issue_id``
1669
+ # @param [Fixnum] page_size
1670
+ # Optional. Requested page size. Server may return fewer items than requested.
1671
+ # If unspecified, server will pick an appropriate default.
1672
+ # @param [String] page_token
1673
+ # Optional. A token identifying a page of results the server should return.
1674
+ # @param [String] fields
1675
+ # Selector specifying which fields to include in a partial response.
1676
+ # @param [String] quota_user
1677
+ # Available to use for quota purposes for server-side applications. Can be any
1678
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1679
+ # @param [Google::Apis::RequestOptions] options
1680
+ # Request-specific options
1681
+ #
1682
+ # @yield [result, err] Result & error if block supplied
1683
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::ListIssueCommentsResponse] parsed result object
1684
+ # @yieldparam err [StandardError] error object if request failed
1685
+ #
1686
+ # @return [Google::Apis::SecuresourcemanagerV1::ListIssueCommentsResponse]
1687
+ #
1688
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1689
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1690
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1691
+ def list_project_location_repository_issue_issue_comments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1692
+ command = make_simple_command(:get, 'v1/{+parent}/issueComments', options)
1693
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::ListIssueCommentsResponse::Representation
1694
+ command.response_class = Google::Apis::SecuresourcemanagerV1::ListIssueCommentsResponse
1695
+ command.params['parent'] = parent unless parent.nil?
1696
+ command.query['pageSize'] = page_size unless page_size.nil?
1697
+ command.query['pageToken'] = page_token unless page_token.nil?
1698
+ command.query['fields'] = fields unless fields.nil?
1699
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1700
+ execute_or_queue_command(command, &block)
1701
+ end
1702
+
1703
+ # Updates an issue comment.
1704
+ # @param [String] name
1705
+ # Identifier. Unique identifier for an issue comment. The comment id is
1706
+ # generated by the server. Format: `projects/`project`/locations/`location`/
1707
+ # repositories/`repository`/issues/`issue`/issueComments/`comment_id``
1708
+ # @param [Google::Apis::SecuresourcemanagerV1::IssueComment] issue_comment_object
1709
+ # @param [String] update_mask
1710
+ # Optional. Field mask is used to specify the fields to be overwritten in the
1711
+ # issue comment resource by the update. The fields specified in the update_mask
1712
+ # are relative to the resource, not the full request. A field will be
1713
+ # overwritten if it is in the mask. The special value "*" means full replacement.
1714
+ # @param [String] fields
1715
+ # Selector specifying which fields to include in a partial response.
1716
+ # @param [String] quota_user
1717
+ # Available to use for quota purposes for server-side applications. Can be any
1718
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1719
+ # @param [Google::Apis::RequestOptions] options
1720
+ # Request-specific options
1721
+ #
1722
+ # @yield [result, err] Result & error if block supplied
1723
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
1724
+ # @yieldparam err [StandardError] error object if request failed
1725
+ #
1726
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
1727
+ #
1728
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1729
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1730
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1731
+ def patch_project_location_repository_issue_issue_comment(name, issue_comment_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1732
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1733
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::IssueComment::Representation
1734
+ command.request_object = issue_comment_object
1735
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
1736
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
1737
+ command.params['name'] = name unless name.nil?
1738
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1739
+ command.query['fields'] = fields unless fields.nil?
1740
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1741
+ execute_or_queue_command(command, &block)
1742
+ end
1743
+
1744
+ # Closes a pull request without merging.
1745
+ # @param [String] name
1746
+ # Required. The pull request to close. Format: `projects/`project_number`/
1747
+ # locations/`location_id`/repositories/`repository_id`/pullRequests/`
1748
+ # pull_request_id``
1749
+ # @param [Google::Apis::SecuresourcemanagerV1::ClosePullRequestRequest] close_pull_request_request_object
1750
+ # @param [String] fields
1751
+ # Selector specifying which fields to include in a partial response.
1752
+ # @param [String] quota_user
1753
+ # Available to use for quota purposes for server-side applications. Can be any
1754
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1755
+ # @param [Google::Apis::RequestOptions] options
1756
+ # Request-specific options
1757
+ #
1758
+ # @yield [result, err] Result & error if block supplied
1759
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
1760
+ # @yieldparam err [StandardError] error object if request failed
1761
+ #
1762
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
1763
+ #
1764
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1765
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1766
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1767
+ def close_pull_request(name, close_pull_request_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1768
+ command = make_simple_command(:post, 'v1/{+name}:close', options)
1769
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::ClosePullRequestRequest::Representation
1770
+ command.request_object = close_pull_request_request_object
1771
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
1772
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
1773
+ command.params['name'] = name unless name.nil?
1774
+ command.query['fields'] = fields unless fields.nil?
1775
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1776
+ execute_or_queue_command(command, &block)
1777
+ end
1778
+
1779
+ # Creates a pull request.
1780
+ # @param [String] parent
1781
+ # Required. The repository that the pull request is created from. Format: `
1782
+ # projects/`project_number`/locations/`location_id`/repositories/`repository_id``
1783
+ # @param [Google::Apis::SecuresourcemanagerV1::PullRequest] pull_request_object
1784
+ # @param [String] fields
1785
+ # Selector specifying which fields to include in a partial response.
1786
+ # @param [String] quota_user
1787
+ # Available to use for quota purposes for server-side applications. Can be any
1788
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1789
+ # @param [Google::Apis::RequestOptions] options
1790
+ # Request-specific options
1791
+ #
1792
+ # @yield [result, err] Result & error if block supplied
1793
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
1794
+ # @yieldparam err [StandardError] error object if request failed
1795
+ #
1796
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
1797
+ #
1798
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1799
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1800
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1801
+ def create_project_location_repository_pull_request(parent, pull_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1802
+ command = make_simple_command(:post, 'v1/{+parent}/pullRequests', options)
1803
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::PullRequest::Representation
1804
+ command.request_object = pull_request_object
1805
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
1806
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
1807
+ command.params['parent'] = parent unless parent.nil?
1808
+ command.query['fields'] = fields unless fields.nil?
1809
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1810
+ execute_or_queue_command(command, &block)
1811
+ end
1812
+
1813
+ # Gets a pull request.
1814
+ # @param [String] name
1815
+ # Required. Name of the pull request to retrieve. The format is `projects/`
1816
+ # project`/locations/`location`/repositories/`repository`/pullRequests/`
1817
+ # pull_request``.
1818
+ # @param [String] fields
1819
+ # Selector specifying which fields to include in a partial response.
1820
+ # @param [String] quota_user
1821
+ # Available to use for quota purposes for server-side applications. Can be any
1822
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1823
+ # @param [Google::Apis::RequestOptions] options
1824
+ # Request-specific options
1825
+ #
1826
+ # @yield [result, err] Result & error if block supplied
1827
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::PullRequest] parsed result object
1828
+ # @yieldparam err [StandardError] error object if request failed
1829
+ #
1830
+ # @return [Google::Apis::SecuresourcemanagerV1::PullRequest]
1831
+ #
1832
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1833
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1834
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1835
+ def get_project_location_repository_pull_request(name, fields: nil, quota_user: nil, options: nil, &block)
1836
+ command = make_simple_command(:get, 'v1/{+name}', options)
1837
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::PullRequest::Representation
1838
+ command.response_class = Google::Apis::SecuresourcemanagerV1::PullRequest
1839
+ command.params['name'] = name unless name.nil?
1840
+ command.query['fields'] = fields unless fields.nil?
1841
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1842
+ execute_or_queue_command(command, &block)
1843
+ end
1844
+
1845
+ # Lists pull requests in a repository.
1846
+ # @param [String] parent
1847
+ # Required. The repository in which to list pull requests. Format: `projects/`
1848
+ # project_number`/locations/`location_id`/repositories/`repository_id``
1849
+ # @param [Fixnum] page_size
1850
+ # Optional. Requested page size. Server may return fewer items than requested.
1851
+ # If unspecified, server will pick an appropriate default.
1852
+ # @param [String] page_token
1853
+ # Optional. A token identifying a page of results the server should return.
1854
+ # @param [String] fields
1855
+ # Selector specifying which fields to include in a partial response.
1856
+ # @param [String] quota_user
1857
+ # Available to use for quota purposes for server-side applications. Can be any
1858
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1859
+ # @param [Google::Apis::RequestOptions] options
1860
+ # Request-specific options
1861
+ #
1862
+ # @yield [result, err] Result & error if block supplied
1863
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::ListPullRequestsResponse] parsed result object
1864
+ # @yieldparam err [StandardError] error object if request failed
1865
+ #
1866
+ # @return [Google::Apis::SecuresourcemanagerV1::ListPullRequestsResponse]
1867
+ #
1868
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1869
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1870
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1871
+ def list_project_location_repository_pull_requests(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1872
+ command = make_simple_command(:get, 'v1/{+parent}/pullRequests', options)
1873
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::ListPullRequestsResponse::Representation
1874
+ command.response_class = Google::Apis::SecuresourcemanagerV1::ListPullRequestsResponse
1875
+ command.params['parent'] = parent unless parent.nil?
1876
+ command.query['pageSize'] = page_size unless page_size.nil?
1877
+ command.query['pageToken'] = page_token unless page_token.nil?
1878
+ command.query['fields'] = fields unless fields.nil?
1879
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1880
+ execute_or_queue_command(command, &block)
1881
+ end
1882
+
1883
+ # Lists a pull request's file diffs.
1884
+ # @param [String] name
1885
+ # Required. The pull request to list file diffs for. Format: `projects/`
1886
+ # project_number`/locations/`location_id`/repositories/`repository_id`/
1887
+ # pullRequests/`pull_request_id``
1888
+ # @param [Fixnum] page_size
1889
+ # Optional. Requested page size. Server may return fewer items than requested.
1890
+ # If unspecified, server will pick an appropriate default.
1891
+ # @param [String] page_token
1892
+ # Optional. A token identifying a page of results the server should return.
1893
+ # @param [String] fields
1894
+ # Selector specifying which fields to include in a partial response.
1895
+ # @param [String] quota_user
1896
+ # Available to use for quota purposes for server-side applications. Can be any
1897
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1898
+ # @param [Google::Apis::RequestOptions] options
1899
+ # Request-specific options
1900
+ #
1901
+ # @yield [result, err] Result & error if block supplied
1902
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::ListPullRequestFileDiffsResponse] parsed result object
1903
+ # @yieldparam err [StandardError] error object if request failed
1904
+ #
1905
+ # @return [Google::Apis::SecuresourcemanagerV1::ListPullRequestFileDiffsResponse]
1906
+ #
1907
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1908
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1909
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1910
+ def list_project_location_repository_pull_request_file_diffs(name, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1911
+ command = make_simple_command(:get, 'v1/{+name}:listFileDiffs', options)
1912
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::ListPullRequestFileDiffsResponse::Representation
1913
+ command.response_class = Google::Apis::SecuresourcemanagerV1::ListPullRequestFileDiffsResponse
1914
+ command.params['name'] = name unless name.nil?
1915
+ command.query['pageSize'] = page_size unless page_size.nil?
1916
+ command.query['pageToken'] = page_token unless page_token.nil?
1917
+ command.query['fields'] = fields unless fields.nil?
1918
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1919
+ execute_or_queue_command(command, &block)
1920
+ end
1921
+
1922
+ # Merges a pull request.
1923
+ # @param [String] name
1924
+ # Required. The pull request to merge. Format: `projects/`project_number`/
1925
+ # locations/`location_id`/repositories/`repository_id`/pullRequests/`
1926
+ # pull_request_id``
1927
+ # @param [Google::Apis::SecuresourcemanagerV1::MergePullRequestRequest] merge_pull_request_request_object
1928
+ # @param [String] fields
1929
+ # Selector specifying which fields to include in a partial response.
1930
+ # @param [String] quota_user
1931
+ # Available to use for quota purposes for server-side applications. Can be any
1932
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1933
+ # @param [Google::Apis::RequestOptions] options
1934
+ # Request-specific options
1935
+ #
1936
+ # @yield [result, err] Result & error if block supplied
1937
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
1938
+ # @yieldparam err [StandardError] error object if request failed
1939
+ #
1940
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
1941
+ #
1942
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1943
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1944
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1945
+ def merge_pull_request(name, merge_pull_request_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1946
+ command = make_simple_command(:post, 'v1/{+name}:merge', options)
1947
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::MergePullRequestRequest::Representation
1948
+ command.request_object = merge_pull_request_request_object
1949
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
1950
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
1951
+ command.params['name'] = name unless name.nil?
1952
+ command.query['fields'] = fields unless fields.nil?
1953
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1954
+ execute_or_queue_command(command, &block)
1955
+ end
1956
+
1957
+ # Opens a pull request.
1958
+ # @param [String] name
1959
+ # Required. The pull request to open. Format: `projects/`project_number`/
1960
+ # locations/`location_id`/repositories/`repository_id`/pullRequests/`
1961
+ # pull_request_id``
1962
+ # @param [Google::Apis::SecuresourcemanagerV1::OpenPullRequestRequest] open_pull_request_request_object
1963
+ # @param [String] fields
1964
+ # Selector specifying which fields to include in a partial response.
1965
+ # @param [String] quota_user
1966
+ # Available to use for quota purposes for server-side applications. Can be any
1967
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1968
+ # @param [Google::Apis::RequestOptions] options
1969
+ # Request-specific options
1970
+ #
1971
+ # @yield [result, err] Result & error if block supplied
1972
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
1973
+ # @yieldparam err [StandardError] error object if request failed
1974
+ #
1975
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
1976
+ #
1977
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1978
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1979
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1980
+ def open_pull_request(name, open_pull_request_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1981
+ command = make_simple_command(:post, 'v1/{+name}:open', options)
1982
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::OpenPullRequestRequest::Representation
1983
+ command.request_object = open_pull_request_request_object
1984
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
1985
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
1986
+ command.params['name'] = name unless name.nil?
1987
+ command.query['fields'] = fields unless fields.nil?
1988
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1989
+ execute_or_queue_command(command, &block)
1990
+ end
1991
+
1992
+ # Updates a pull request.
1993
+ # @param [String] name
1994
+ # Output only. A unique identifier for a PullRequest. The number appended at the
1995
+ # end is generated by the server. Format: `projects/`project`/locations/`
1996
+ # location`/repositories/`repository`/pullRequests/`pull_request_id``
1997
+ # @param [Google::Apis::SecuresourcemanagerV1::PullRequest] pull_request_object
1998
+ # @param [String] update_mask
1999
+ # Optional. Field mask is used to specify the fields to be overwritten in the
2000
+ # pull request resource by the update. The fields specified in the update_mask
2001
+ # are relative to the resource, not the full request. A field will be
2002
+ # overwritten if it is in the mask. The special value "*" means full replacement.
2003
+ # @param [String] fields
2004
+ # Selector specifying which fields to include in a partial response.
2005
+ # @param [String] quota_user
2006
+ # Available to use for quota purposes for server-side applications. Can be any
2007
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2008
+ # @param [Google::Apis::RequestOptions] options
2009
+ # Request-specific options
2010
+ #
2011
+ # @yield [result, err] Result & error if block supplied
2012
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
2013
+ # @yieldparam err [StandardError] error object if request failed
2014
+ #
2015
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
2016
+ #
2017
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2018
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2019
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2020
+ def patch_project_location_repository_pull_request(name, pull_request_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
2021
+ command = make_simple_command(:patch, 'v1/{+name}', options)
2022
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::PullRequest::Representation
2023
+ command.request_object = pull_request_object
2024
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
2025
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
2026
+ command.params['name'] = name unless name.nil?
2027
+ command.query['updateMask'] = update_mask unless update_mask.nil?
2028
+ command.query['fields'] = fields unless fields.nil?
2029
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2030
+ execute_or_queue_command(command, &block)
2031
+ end
2032
+
2033
+ # Batch creates pull request comments.
2034
+ # @param [String] parent
2035
+ # Required. The pull request in which to create the pull request comments.
2036
+ # Format: `projects/`project_number`/locations/`location_id`/repositories/`
2037
+ # repository_id`/pullRequests/`pull_request_id``
2038
+ # @param [Google::Apis::SecuresourcemanagerV1::BatchCreatePullRequestCommentsRequest] batch_create_pull_request_comments_request_object
2039
+ # @param [String] fields
2040
+ # Selector specifying which fields to include in a partial response.
2041
+ # @param [String] quota_user
2042
+ # Available to use for quota purposes for server-side applications. Can be any
2043
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2044
+ # @param [Google::Apis::RequestOptions] options
2045
+ # Request-specific options
2046
+ #
2047
+ # @yield [result, err] Result & error if block supplied
2048
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
2049
+ # @yieldparam err [StandardError] error object if request failed
2050
+ #
2051
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
2052
+ #
2053
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2054
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2055
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2056
+ def batch_create_pull_request_comments(parent, batch_create_pull_request_comments_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2057
+ command = make_simple_command(:post, 'v1/{+parent}/pullRequestComments:batchCreate', options)
2058
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::BatchCreatePullRequestCommentsRequest::Representation
2059
+ command.request_object = batch_create_pull_request_comments_request_object
2060
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
2061
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
2062
+ command.params['parent'] = parent unless parent.nil?
2063
+ command.query['fields'] = fields unless fields.nil?
2064
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2065
+ execute_or_queue_command(command, &block)
2066
+ end
2067
+
2068
+ # Creates a pull request comment.
2069
+ # @param [String] parent
2070
+ # Required. The pull request in which to create the pull request comment. Format:
2071
+ # `projects/`project_number`/locations/`location_id`/repositories/`
2072
+ # repository_id`/pullRequests/`pull_request_id``
2073
+ # @param [Google::Apis::SecuresourcemanagerV1::PullRequestComment] pull_request_comment_object
2074
+ # @param [String] fields
2075
+ # Selector specifying which fields to include in a partial response.
2076
+ # @param [String] quota_user
2077
+ # Available to use for quota purposes for server-side applications. Can be any
2078
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2079
+ # @param [Google::Apis::RequestOptions] options
2080
+ # Request-specific options
2081
+ #
2082
+ # @yield [result, err] Result & error if block supplied
2083
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
2084
+ # @yieldparam err [StandardError] error object if request failed
2085
+ #
2086
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
2087
+ #
2088
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2089
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2090
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2091
+ def create_project_location_repository_pull_request_pull_request_comment(parent, pull_request_comment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2092
+ command = make_simple_command(:post, 'v1/{+parent}/pullRequestComments', options)
2093
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::PullRequestComment::Representation
2094
+ command.request_object = pull_request_comment_object
2095
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
2096
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
2097
+ command.params['parent'] = parent unless parent.nil?
2098
+ command.query['fields'] = fields unless fields.nil?
2099
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2100
+ execute_or_queue_command(command, &block)
2101
+ end
2102
+
2103
+ # Deletes a pull request comment.
2104
+ # @param [String] name
2105
+ # Required. Name of the pull request comment to delete. The format is `projects/`
2106
+ # project_number`/locations/`location_id`/repositories/`repository_id`/
2107
+ # pullRequests/`pull_request_id`/pullRequestComments/`comment_id``.
2108
+ # @param [String] fields
2109
+ # Selector specifying which fields to include in a partial response.
2110
+ # @param [String] quota_user
2111
+ # Available to use for quota purposes for server-side applications. Can be any
2112
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2113
+ # @param [Google::Apis::RequestOptions] options
2114
+ # Request-specific options
2115
+ #
2116
+ # @yield [result, err] Result & error if block supplied
2117
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
2118
+ # @yieldparam err [StandardError] error object if request failed
2119
+ #
2120
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
2121
+ #
2122
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2123
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2124
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2125
+ def delete_project_location_repository_pull_request_pull_request_comment(name, fields: nil, quota_user: nil, options: nil, &block)
2126
+ command = make_simple_command(:delete, 'v1/{+name}', options)
2127
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
2128
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
2129
+ command.params['name'] = name unless name.nil?
2130
+ command.query['fields'] = fields unless fields.nil?
2131
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2132
+ execute_or_queue_command(command, &block)
2133
+ end
2134
+
2135
+ # Gets a pull request comment.
2136
+ # @param [String] name
2137
+ # Required. Name of the pull request comment to retrieve. The format is `
2138
+ # projects/`project_number`/locations/`location_id`/repositories/`repository_id`/
2139
+ # pullRequests/`pull_request_id`/pullRequestComments/`comment_id``.
2140
+ # @param [String] fields
2141
+ # Selector specifying which fields to include in a partial response.
2142
+ # @param [String] quota_user
2143
+ # Available to use for quota purposes for server-side applications. Can be any
2144
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2145
+ # @param [Google::Apis::RequestOptions] options
2146
+ # Request-specific options
2147
+ #
2148
+ # @yield [result, err] Result & error if block supplied
2149
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::PullRequestComment] parsed result object
2150
+ # @yieldparam err [StandardError] error object if request failed
2151
+ #
2152
+ # @return [Google::Apis::SecuresourcemanagerV1::PullRequestComment]
2153
+ #
2154
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2155
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2156
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2157
+ def get_project_location_repository_pull_request_pull_request_comment(name, fields: nil, quota_user: nil, options: nil, &block)
2158
+ command = make_simple_command(:get, 'v1/{+name}', options)
2159
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::PullRequestComment::Representation
2160
+ command.response_class = Google::Apis::SecuresourcemanagerV1::PullRequestComment
2161
+ command.params['name'] = name unless name.nil?
2162
+ command.query['fields'] = fields unless fields.nil?
2163
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2164
+ execute_or_queue_command(command, &block)
2165
+ end
2166
+
2167
+ # Lists pull request comments.
2168
+ # @param [String] parent
2169
+ # Required. The pull request in which to list pull request comments. Format: `
2170
+ # projects/`project_number`/locations/`location_id`/repositories/`repository_id`/
2171
+ # pullRequests/`pull_request_id``
2172
+ # @param [Fixnum] page_size
2173
+ # Optional. Requested page size. If unspecified, at most 100 pull request
2174
+ # comments will be returned. The maximum value is 100; values above 100 will be
2175
+ # coerced to 100.
2176
+ # @param [String] page_token
2177
+ # Optional. A token identifying a page of results the server should return.
2178
+ # @param [String] fields
2179
+ # Selector specifying which fields to include in a partial response.
2180
+ # @param [String] quota_user
2181
+ # Available to use for quota purposes for server-side applications. Can be any
2182
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2183
+ # @param [Google::Apis::RequestOptions] options
2184
+ # Request-specific options
2185
+ #
2186
+ # @yield [result, err] Result & error if block supplied
2187
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::ListPullRequestCommentsResponse] parsed result object
2188
+ # @yieldparam err [StandardError] error object if request failed
2189
+ #
2190
+ # @return [Google::Apis::SecuresourcemanagerV1::ListPullRequestCommentsResponse]
2191
+ #
2192
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2193
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2194
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2195
+ def list_project_location_repository_pull_request_pull_request_comments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2196
+ command = make_simple_command(:get, 'v1/{+parent}/pullRequestComments', options)
2197
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::ListPullRequestCommentsResponse::Representation
2198
+ command.response_class = Google::Apis::SecuresourcemanagerV1::ListPullRequestCommentsResponse
2199
+ command.params['parent'] = parent unless parent.nil?
2200
+ command.query['pageSize'] = page_size unless page_size.nil?
2201
+ command.query['pageToken'] = page_token unless page_token.nil?
2202
+ command.query['fields'] = fields unless fields.nil?
2203
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2204
+ execute_or_queue_command(command, &block)
2205
+ end
2206
+
2207
+ # Updates a pull request comment.
2208
+ # @param [String] name
2209
+ # Identifier. Unique identifier for the pull request comment. The comment id is
2210
+ # generated by the server. Format: `projects/`project`/locations/`location`/
2211
+ # repositories/`repository`/pullRequests/`pull_request`/pullRequestComments/`
2212
+ # comment_id``
2213
+ # @param [Google::Apis::SecuresourcemanagerV1::PullRequestComment] pull_request_comment_object
2214
+ # @param [String] update_mask
2215
+ # Optional. Field mask is used to specify the fields to be overwritten in the
2216
+ # pull request comment resource by the update. Updatable fields are `body`.
2217
+ # @param [String] fields
2218
+ # Selector specifying which fields to include in a partial response.
2219
+ # @param [String] quota_user
2220
+ # Available to use for quota purposes for server-side applications. Can be any
2221
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2222
+ # @param [Google::Apis::RequestOptions] options
2223
+ # Request-specific options
2224
+ #
2225
+ # @yield [result, err] Result & error if block supplied
2226
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
2227
+ # @yieldparam err [StandardError] error object if request failed
2228
+ #
2229
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
2230
+ #
2231
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2232
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2233
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2234
+ def patch_project_location_repository_pull_request_pull_request_comment(name, pull_request_comment_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
2235
+ command = make_simple_command(:patch, 'v1/{+name}', options)
2236
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::PullRequestComment::Representation
2237
+ command.request_object = pull_request_comment_object
2238
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
2239
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
2240
+ command.params['name'] = name unless name.nil?
2241
+ command.query['updateMask'] = update_mask unless update_mask.nil?
2242
+ command.query['fields'] = fields unless fields.nil?
2243
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2244
+ execute_or_queue_command(command, &block)
2245
+ end
2246
+
2247
+ # Resolves pull request comments.
2248
+ # @param [String] parent
2249
+ # Required. The pull request in which to resolve the pull request comments.
2250
+ # Format: `projects/`project_number`/locations/`location_id`/repositories/`
2251
+ # repository_id`/pullRequests/`pull_request_id``
2252
+ # @param [Google::Apis::SecuresourcemanagerV1::ResolvePullRequestCommentsRequest] resolve_pull_request_comments_request_object
2253
+ # @param [String] fields
2254
+ # Selector specifying which fields to include in a partial response.
2255
+ # @param [String] quota_user
2256
+ # Available to use for quota purposes for server-side applications. Can be any
2257
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2258
+ # @param [Google::Apis::RequestOptions] options
2259
+ # Request-specific options
2260
+ #
2261
+ # @yield [result, err] Result & error if block supplied
2262
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
2263
+ # @yieldparam err [StandardError] error object if request failed
2264
+ #
2265
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
2266
+ #
2267
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2268
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2269
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2270
+ def resolve_pull_request_comments(parent, resolve_pull_request_comments_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2271
+ command = make_simple_command(:post, 'v1/{+parent}/pullRequestComments:resolve', options)
2272
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::ResolvePullRequestCommentsRequest::Representation
2273
+ command.request_object = resolve_pull_request_comments_request_object
2274
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
2275
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
2276
+ command.params['parent'] = parent unless parent.nil?
2277
+ command.query['fields'] = fields unless fields.nil?
2278
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2279
+ execute_or_queue_command(command, &block)
2280
+ end
2281
+
2282
+ # Unresolves pull request comment.
2283
+ # @param [String] parent
2284
+ # Required. The pull request in which to resolve the pull request comments.
2285
+ # Format: `projects/`project_number`/locations/`location_id`/repositories/`
2286
+ # repository_id`/pullRequests/`pull_request_id``
2287
+ # @param [Google::Apis::SecuresourcemanagerV1::UnresolvePullRequestCommentsRequest] unresolve_pull_request_comments_request_object
2288
+ # @param [String] fields
2289
+ # Selector specifying which fields to include in a partial response.
2290
+ # @param [String] quota_user
2291
+ # Available to use for quota purposes for server-side applications. Can be any
2292
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2293
+ # @param [Google::Apis::RequestOptions] options
2294
+ # Request-specific options
2295
+ #
2296
+ # @yield [result, err] Result & error if block supplied
2297
+ # @yieldparam result [Google::Apis::SecuresourcemanagerV1::Operation] parsed result object
2298
+ # @yieldparam err [StandardError] error object if request failed
2299
+ #
2300
+ # @return [Google::Apis::SecuresourcemanagerV1::Operation]
2301
+ #
2302
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2303
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2304
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2305
+ def unresolve_pull_request_comments(parent, unresolve_pull_request_comments_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2306
+ command = make_simple_command(:post, 'v1/{+parent}/pullRequestComments:unresolve', options)
2307
+ command.request_representation = Google::Apis::SecuresourcemanagerV1::UnresolvePullRequestCommentsRequest::Representation
2308
+ command.request_object = unresolve_pull_request_comments_request_object
2309
+ command.response_representation = Google::Apis::SecuresourcemanagerV1::Operation::Representation
2310
+ command.response_class = Google::Apis::SecuresourcemanagerV1::Operation
2311
+ command.params['parent'] = parent unless parent.nil?
2312
+ command.query['fields'] = fields unless fields.nil?
2313
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2314
+ execute_or_queue_command(command, &block)
2315
+ end
2316
+
2317
+ protected
2318
+
2319
+ def apply_command_defaults(command)
2320
+ command.query['key'] = key unless key.nil?
2321
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2322
+ end
2323
+ end
2324
+ end
2325
+ end
2326
+ end