google-apis-servicenetworking_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,946 @@
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 ServicenetworkingV1
23
+ # Service Networking API
24
+ #
25
+ # Provides automatic management of network configurations necessary for certain
26
+ # services.
27
+ #
28
+ # @example
29
+ # require 'google/apis/servicenetworking_v1'
30
+ #
31
+ # Servicenetworking = Google::Apis::ServicenetworkingV1 # Alias the module
32
+ # service = Servicenetworking::ServiceNetworkingService.new
33
+ #
34
+ # @see https://cloud.google.com/service-infrastructure/docs/service-networking/getting-started
35
+ class ServiceNetworkingService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://servicenetworking.googleapis.com/', '',
48
+ client_name: 'google-apis-servicenetworking_v1',
49
+ client_version: Google::Apis::ServicenetworkingV1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Starts asynchronous cancellation on a long-running operation. The server makes
54
+ # a best effort to cancel the operation, but success is not guaranteed. If the
55
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
56
+ # Clients can use Operations.GetOperation or other methods to check whether the
57
+ # cancellation succeeded or whether the operation completed despite cancellation.
58
+ # On successful cancellation, the operation is not deleted; instead, it becomes
59
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
60
+ # corresponding to `Code.CANCELLED`.
61
+ # @param [String] name
62
+ # The name of the operation resource to be cancelled.
63
+ # @param [Google::Apis::ServicenetworkingV1::CancelOperationRequest] cancel_operation_request_object
64
+ # @param [String] fields
65
+ # Selector specifying which fields to include in a partial response.
66
+ # @param [String] quota_user
67
+ # Available to use for quota purposes for server-side applications. Can be any
68
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
69
+ # @param [Google::Apis::RequestOptions] options
70
+ # Request-specific options
71
+ #
72
+ # @yield [result, err] Result & error if block supplied
73
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Empty] parsed result object
74
+ # @yieldparam err [StandardError] error object if request failed
75
+ #
76
+ # @return [Google::Apis::ServicenetworkingV1::Empty]
77
+ #
78
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
79
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
80
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
81
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
82
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
83
+ command.request_representation = Google::Apis::ServicenetworkingV1::CancelOperationRequest::Representation
84
+ command.request_object = cancel_operation_request_object
85
+ command.response_representation = Google::Apis::ServicenetworkingV1::Empty::Representation
86
+ command.response_class = Google::Apis::ServicenetworkingV1::Empty
87
+ command.params['name'] = name unless name.nil?
88
+ command.query['fields'] = fields unless fields.nil?
89
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
90
+ execute_or_queue_command(command, &block)
91
+ end
92
+
93
+ # Deletes a long-running operation. This method indicates that the client is no
94
+ # longer interested in the operation result. It does not cancel the operation.
95
+ # If the server doesn't support this method, it returns `google.rpc.Code.
96
+ # UNIMPLEMENTED`.
97
+ # @param [String] name
98
+ # The name of the operation resource to be deleted.
99
+ # @param [String] fields
100
+ # Selector specifying which fields to include in a partial response.
101
+ # @param [String] quota_user
102
+ # Available to use for quota purposes for server-side applications. Can be any
103
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
104
+ # @param [Google::Apis::RequestOptions] options
105
+ # Request-specific options
106
+ #
107
+ # @yield [result, err] Result & error if block supplied
108
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Empty] parsed result object
109
+ # @yieldparam err [StandardError] error object if request failed
110
+ #
111
+ # @return [Google::Apis::ServicenetworkingV1::Empty]
112
+ #
113
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
114
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
115
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
116
+ def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block)
117
+ command = make_simple_command(:delete, 'v1/{+name}', options)
118
+ command.response_representation = Google::Apis::ServicenetworkingV1::Empty::Representation
119
+ command.response_class = Google::Apis::ServicenetworkingV1::Empty
120
+ command.params['name'] = name unless name.nil?
121
+ command.query['fields'] = fields unless fields.nil?
122
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
123
+ execute_or_queue_command(command, &block)
124
+ end
125
+
126
+ # Gets the latest state of a long-running operation. Clients can use this method
127
+ # to poll the operation result at intervals as recommended by the API service.
128
+ # @param [String] name
129
+ # The name of the operation resource.
130
+ # @param [String] fields
131
+ # Selector specifying which fields to include in a partial response.
132
+ # @param [String] quota_user
133
+ # Available to use for quota purposes for server-side applications. Can be any
134
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
135
+ # @param [Google::Apis::RequestOptions] options
136
+ # Request-specific options
137
+ #
138
+ # @yield [result, err] Result & error if block supplied
139
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Operation] parsed result object
140
+ # @yieldparam err [StandardError] error object if request failed
141
+ #
142
+ # @return [Google::Apis::ServicenetworkingV1::Operation]
143
+ #
144
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
145
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
146
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
147
+ def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
148
+ command = make_simple_command(:get, 'v1/{+name}', options)
149
+ command.response_representation = Google::Apis::ServicenetworkingV1::Operation::Representation
150
+ command.response_class = Google::Apis::ServicenetworkingV1::Operation
151
+ command.params['name'] = name unless name.nil?
152
+ command.query['fields'] = fields unless fields.nil?
153
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
154
+ execute_or_queue_command(command, &block)
155
+ end
156
+
157
+ # Lists operations that match the specified filter in the request. If the server
158
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
159
+ # binding allows API services to override the binding to use different resource
160
+ # name schemes, such as `users/*/operations`. To override the binding, API
161
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
162
+ # service configuration. For backwards compatibility, the default name includes
163
+ # the operations collection id, however overriding users must ensure the name
164
+ # binding is the parent resource, without the operations collection id.
165
+ # @param [String] name
166
+ # The name of the operation's parent resource.
167
+ # @param [String] filter
168
+ # The standard list filter.
169
+ # @param [Fixnum] page_size
170
+ # The standard list page size.
171
+ # @param [String] page_token
172
+ # The standard list page token.
173
+ # @param [String] fields
174
+ # Selector specifying which fields to include in a partial response.
175
+ # @param [String] quota_user
176
+ # Available to use for quota purposes for server-side applications. Can be any
177
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
178
+ # @param [Google::Apis::RequestOptions] options
179
+ # Request-specific options
180
+ #
181
+ # @yield [result, err] Result & error if block supplied
182
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::ListOperationsResponse] parsed result object
183
+ # @yieldparam err [StandardError] error object if request failed
184
+ #
185
+ # @return [Google::Apis::ServicenetworkingV1::ListOperationsResponse]
186
+ #
187
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
188
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
189
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
190
+ def list_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
191
+ command = make_simple_command(:get, 'v1/{+name}', options)
192
+ command.response_representation = Google::Apis::ServicenetworkingV1::ListOperationsResponse::Representation
193
+ command.response_class = Google::Apis::ServicenetworkingV1::ListOperationsResponse
194
+ command.params['name'] = name unless name.nil?
195
+ command.query['filter'] = filter unless filter.nil?
196
+ command.query['pageSize'] = page_size unless page_size.nil?
197
+ command.query['pageToken'] = page_token unless page_token.nil?
198
+ command.query['fields'] = fields unless fields.nil?
199
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
200
+ execute_or_queue_command(command, &block)
201
+ end
202
+
203
+ # For service producers, provisions a new subnet in a peered service's shared
204
+ # VPC network in the requested region and with the requested size that's
205
+ # expressed as a CIDR range (number of leading bits of ipV4 network mask). The
206
+ # method checks against the assigned allocated ranges to find a non-conflicting
207
+ # IP address range. The method will reuse a subnet if subsequent calls contain
208
+ # the same subnet name, region, and prefix length. This method will make
209
+ # producer's tenant project to be a shared VPC service project as needed.
210
+ # @param [String] parent
211
+ # Required. A tenant project in the service producer organization, in the
212
+ # following format: services/`service`/`collection-id`/`resource-id`. `
213
+ # collection-id` is the cloud resource collection type that represents the
214
+ # tenant project. Only `projects` are supported. `resource-id` is the tenant
215
+ # project numeric id, such as `123456`. `service` the name of the peering
216
+ # service, such as `service-peering.example.com`. This service must already be
217
+ # enabled in the service consumer's project.
218
+ # @param [Google::Apis::ServicenetworkingV1::AddSubnetworkRequest] add_subnetwork_request_object
219
+ # @param [String] fields
220
+ # Selector specifying which fields to include in a partial response.
221
+ # @param [String] quota_user
222
+ # Available to use for quota purposes for server-side applications. Can be any
223
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
224
+ # @param [Google::Apis::RequestOptions] options
225
+ # Request-specific options
226
+ #
227
+ # @yield [result, err] Result & error if block supplied
228
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Operation] parsed result object
229
+ # @yieldparam err [StandardError] error object if request failed
230
+ #
231
+ # @return [Google::Apis::ServicenetworkingV1::Operation]
232
+ #
233
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
234
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
235
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
236
+ def add_service_subnetwork(parent, add_subnetwork_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
237
+ command = make_simple_command(:post, 'v1/{+parent}:addSubnetwork', options)
238
+ command.request_representation = Google::Apis::ServicenetworkingV1::AddSubnetworkRequest::Representation
239
+ command.request_object = add_subnetwork_request_object
240
+ command.response_representation = Google::Apis::ServicenetworkingV1::Operation::Representation
241
+ command.response_class = Google::Apis::ServicenetworkingV1::Operation
242
+ command.params['parent'] = parent unless parent.nil?
243
+ command.query['fields'] = fields unless fields.nil?
244
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
245
+ execute_or_queue_command(command, &block)
246
+ end
247
+
248
+ # Disables VPC service controls for a connection.
249
+ # @param [String] parent
250
+ # The service that is managing peering connectivity for a service producer's
251
+ # organization. For Google services that support this functionality, this value
252
+ # is `services/servicenetworking.googleapis.com`.
253
+ # @param [Google::Apis::ServicenetworkingV1::DisableVpcServiceControlsRequest] disable_vpc_service_controls_request_object
254
+ # @param [String] fields
255
+ # Selector specifying which fields to include in a partial response.
256
+ # @param [String] quota_user
257
+ # Available to use for quota purposes for server-side applications. Can be any
258
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
259
+ # @param [Google::Apis::RequestOptions] options
260
+ # Request-specific options
261
+ #
262
+ # @yield [result, err] Result & error if block supplied
263
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Operation] parsed result object
264
+ # @yieldparam err [StandardError] error object if request failed
265
+ #
266
+ # @return [Google::Apis::ServicenetworkingV1::Operation]
267
+ #
268
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
269
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
270
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
271
+ def disable_vpc_service_controls(parent, disable_vpc_service_controls_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
272
+ command = make_simple_command(:patch, 'v1/{+parent}:disableVpcServiceControls', options)
273
+ command.request_representation = Google::Apis::ServicenetworkingV1::DisableVpcServiceControlsRequest::Representation
274
+ command.request_object = disable_vpc_service_controls_request_object
275
+ command.response_representation = Google::Apis::ServicenetworkingV1::Operation::Representation
276
+ command.response_class = Google::Apis::ServicenetworkingV1::Operation
277
+ command.params['parent'] = parent unless parent.nil?
278
+ command.query['fields'] = fields unless fields.nil?
279
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
280
+ execute_or_queue_command(command, &block)
281
+ end
282
+
283
+ # Enables VPC service controls for a connection.
284
+ # @param [String] parent
285
+ # The service that is managing peering connectivity for a service producer's
286
+ # organization. For Google services that support this functionality, this value
287
+ # is `services/servicenetworking.googleapis.com`.
288
+ # @param [Google::Apis::ServicenetworkingV1::EnableVpcServiceControlsRequest] enable_vpc_service_controls_request_object
289
+ # @param [String] fields
290
+ # Selector specifying which fields to include in a partial response.
291
+ # @param [String] quota_user
292
+ # Available to use for quota purposes for server-side applications. Can be any
293
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
294
+ # @param [Google::Apis::RequestOptions] options
295
+ # Request-specific options
296
+ #
297
+ # @yield [result, err] Result & error if block supplied
298
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Operation] parsed result object
299
+ # @yieldparam err [StandardError] error object if request failed
300
+ #
301
+ # @return [Google::Apis::ServicenetworkingV1::Operation]
302
+ #
303
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
304
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
305
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
306
+ def enable_vpc_service_controls(parent, enable_vpc_service_controls_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
307
+ command = make_simple_command(:patch, 'v1/{+parent}:enableVpcServiceControls', options)
308
+ command.request_representation = Google::Apis::ServicenetworkingV1::EnableVpcServiceControlsRequest::Representation
309
+ command.request_object = enable_vpc_service_controls_request_object
310
+ command.response_representation = Google::Apis::ServicenetworkingV1::Operation::Representation
311
+ command.response_class = Google::Apis::ServicenetworkingV1::Operation
312
+ command.params['parent'] = parent unless parent.nil?
313
+ command.query['fields'] = fields unless fields.nil?
314
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
315
+ execute_or_queue_command(command, &block)
316
+ end
317
+
318
+ # Service producers can use this method to find a currently unused range within
319
+ # consumer allocated ranges. This returned range is not reserved, and not
320
+ # guaranteed to remain unused. It will validate previously provided allocated
321
+ # ranges, find non-conflicting sub-range of requested size (expressed in number
322
+ # of leading bits of ipv4 network mask, as in CIDR range notation).
323
+ # @param [String] parent
324
+ # Required. This is in a form services/`service`. `service` the name of the
325
+ # private access management service, for example 'service-peering.example.com'.
326
+ # @param [Google::Apis::ServicenetworkingV1::SearchRangeRequest] search_range_request_object
327
+ # @param [String] fields
328
+ # Selector specifying which fields to include in a partial response.
329
+ # @param [String] quota_user
330
+ # Available to use for quota purposes for server-side applications. Can be any
331
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
332
+ # @param [Google::Apis::RequestOptions] options
333
+ # Request-specific options
334
+ #
335
+ # @yield [result, err] Result & error if block supplied
336
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Operation] parsed result object
337
+ # @yieldparam err [StandardError] error object if request failed
338
+ #
339
+ # @return [Google::Apis::ServicenetworkingV1::Operation]
340
+ #
341
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
342
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
343
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
344
+ def search_service_range(parent, search_range_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
345
+ command = make_simple_command(:post, 'v1/{+parent}:searchRange', options)
346
+ command.request_representation = Google::Apis::ServicenetworkingV1::SearchRangeRequest::Representation
347
+ command.request_object = search_range_request_object
348
+ command.response_representation = Google::Apis::ServicenetworkingV1::Operation::Representation
349
+ command.response_class = Google::Apis::ServicenetworkingV1::Operation
350
+ command.params['parent'] = parent unless parent.nil?
351
+ command.query['fields'] = fields unless fields.nil?
352
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
353
+ execute_or_queue_command(command, &block)
354
+ end
355
+
356
+ # Service producers use this method to validate if the consumer provided network,
357
+ # project and requested range are valid. This allows them to use a fail-fast
358
+ # mechanism for consumer requests, and not have to wait for AddSubnetwork
359
+ # operation completion to determine if user request is invalid.
360
+ # @param [String] parent
361
+ # Required. This is in a form services/`service` where `service` is the name of
362
+ # the private access management service. For example 'service-peering.example.
363
+ # com'.
364
+ # @param [Google::Apis::ServicenetworkingV1::ValidateConsumerConfigRequest] validate_consumer_config_request_object
365
+ # @param [String] fields
366
+ # Selector specifying which fields to include in a partial response.
367
+ # @param [String] quota_user
368
+ # Available to use for quota purposes for server-side applications. Can be any
369
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
370
+ # @param [Google::Apis::RequestOptions] options
371
+ # Request-specific options
372
+ #
373
+ # @yield [result, err] Result & error if block supplied
374
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::ValidateConsumerConfigResponse] parsed result object
375
+ # @yieldparam err [StandardError] error object if request failed
376
+ #
377
+ # @return [Google::Apis::ServicenetworkingV1::ValidateConsumerConfigResponse]
378
+ #
379
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
380
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
381
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
382
+ def validate_service_consumer_config(parent, validate_consumer_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
383
+ command = make_simple_command(:post, 'v1/{+parent}:validate', options)
384
+ command.request_representation = Google::Apis::ServicenetworkingV1::ValidateConsumerConfigRequest::Representation
385
+ command.request_object = validate_consumer_config_request_object
386
+ command.response_representation = Google::Apis::ServicenetworkingV1::ValidateConsumerConfigResponse::Representation
387
+ command.response_class = Google::Apis::ServicenetworkingV1::ValidateConsumerConfigResponse
388
+ command.params['parent'] = parent unless parent.nil?
389
+ command.query['fields'] = fields unless fields.nil?
390
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
391
+ execute_or_queue_command(command, &block)
392
+ end
393
+
394
+ # Creates a private connection that establishes a VPC Network Peering connection
395
+ # to a VPC network in the service producer's organization. The administrator of
396
+ # the service consumer's VPC network invokes this method. The administrator must
397
+ # assign one or more allocated IP ranges for provisioning subnetworks in the
398
+ # service producer's VPC network. This connection is used for all supported
399
+ # services in the service producer's organization, so it only needs to be
400
+ # invoked once.
401
+ # @param [String] parent
402
+ # The service that is managing peering connectivity for a service producer's
403
+ # organization. For Google services that support this functionality, this value
404
+ # is `services/servicenetworking.googleapis.com`.
405
+ # @param [Google::Apis::ServicenetworkingV1::Connection] connection_object
406
+ # @param [String] fields
407
+ # Selector specifying which fields to include in a partial response.
408
+ # @param [String] quota_user
409
+ # Available to use for quota purposes for server-side applications. Can be any
410
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
411
+ # @param [Google::Apis::RequestOptions] options
412
+ # Request-specific options
413
+ #
414
+ # @yield [result, err] Result & error if block supplied
415
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Operation] parsed result object
416
+ # @yieldparam err [StandardError] error object if request failed
417
+ #
418
+ # @return [Google::Apis::ServicenetworkingV1::Operation]
419
+ #
420
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
421
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
422
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
423
+ def create_service_connection(parent, connection_object = nil, fields: nil, quota_user: nil, options: nil, &block)
424
+ command = make_simple_command(:post, 'v1/{+parent}/connections', options)
425
+ command.request_representation = Google::Apis::ServicenetworkingV1::Connection::Representation
426
+ command.request_object = connection_object
427
+ command.response_representation = Google::Apis::ServicenetworkingV1::Operation::Representation
428
+ command.response_class = Google::Apis::ServicenetworkingV1::Operation
429
+ command.params['parent'] = parent unless parent.nil?
430
+ command.query['fields'] = fields unless fields.nil?
431
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
432
+ execute_or_queue_command(command, &block)
433
+ end
434
+
435
+ # List the private connections that are configured in a service consumer's VPC
436
+ # network.
437
+ # @param [String] parent
438
+ # The service that is managing peering connectivity for a service producer's
439
+ # organization. For Google services that support this functionality, this value
440
+ # is `services/servicenetworking.googleapis.com`. If you specify `services/-` as
441
+ # the parameter value, all configured peering services are listed.
442
+ # @param [String] network
443
+ # The name of service consumer's VPC network that's connected with service
444
+ # producer network through a private connection. The network name must be in the
445
+ # following format: `projects/`project`/global/networks/`network``. `project` is
446
+ # a project number, such as in `12345` that includes the VPC service consumer's
447
+ # VPC network. `network` is the name of the service consumer's VPC network.
448
+ # @param [String] fields
449
+ # Selector specifying which fields to include in a partial response.
450
+ # @param [String] quota_user
451
+ # Available to use for quota purposes for server-side applications. Can be any
452
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
453
+ # @param [Google::Apis::RequestOptions] options
454
+ # Request-specific options
455
+ #
456
+ # @yield [result, err] Result & error if block supplied
457
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::ListConnectionsResponse] parsed result object
458
+ # @yieldparam err [StandardError] error object if request failed
459
+ #
460
+ # @return [Google::Apis::ServicenetworkingV1::ListConnectionsResponse]
461
+ #
462
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
463
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
464
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
465
+ def list_service_connections(parent, network: nil, fields: nil, quota_user: nil, options: nil, &block)
466
+ command = make_simple_command(:get, 'v1/{+parent}/connections', options)
467
+ command.response_representation = Google::Apis::ServicenetworkingV1::ListConnectionsResponse::Representation
468
+ command.response_class = Google::Apis::ServicenetworkingV1::ListConnectionsResponse
469
+ command.params['parent'] = parent unless parent.nil?
470
+ command.query['network'] = network unless network.nil?
471
+ command.query['fields'] = fields unless fields.nil?
472
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
473
+ execute_or_queue_command(command, &block)
474
+ end
475
+
476
+ # Updates the allocated ranges that are assigned to a connection.
477
+ # @param [String] name
478
+ # The private service connection that connects to a service producer
479
+ # organization. The name includes both the private service name and the VPC
480
+ # network peering name in the format of `services/`peering_service_name`/
481
+ # connections/`vpc_peering_name``. For Google services that support this
482
+ # functionality, this is `services/servicenetworking.googleapis.com/connections/
483
+ # servicenetworking-googleapis-com`.
484
+ # @param [Google::Apis::ServicenetworkingV1::Connection] connection_object
485
+ # @param [Boolean] force
486
+ # If a previously defined allocated range is removed, force flag must be set to
487
+ # true.
488
+ # @param [String] update_mask
489
+ # The update mask. If this is omitted, it defaults to "*". You can only update
490
+ # the listed peering ranges.
491
+ # @param [String] fields
492
+ # Selector specifying which fields to include in a partial response.
493
+ # @param [String] quota_user
494
+ # Available to use for quota purposes for server-side applications. Can be any
495
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
496
+ # @param [Google::Apis::RequestOptions] options
497
+ # Request-specific options
498
+ #
499
+ # @yield [result, err] Result & error if block supplied
500
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Operation] parsed result object
501
+ # @yieldparam err [StandardError] error object if request failed
502
+ #
503
+ # @return [Google::Apis::ServicenetworkingV1::Operation]
504
+ #
505
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
506
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
507
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
508
+ def patch_service_connection(name, connection_object = nil, force: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
509
+ command = make_simple_command(:patch, 'v1/{+name}', options)
510
+ command.request_representation = Google::Apis::ServicenetworkingV1::Connection::Representation
511
+ command.request_object = connection_object
512
+ command.response_representation = Google::Apis::ServicenetworkingV1::Operation::Representation
513
+ command.response_class = Google::Apis::ServicenetworkingV1::Operation
514
+ command.params['name'] = name unless name.nil?
515
+ command.query['force'] = force unless force.nil?
516
+ command.query['updateMask'] = update_mask unless update_mask.nil?
517
+ command.query['fields'] = fields unless fields.nil?
518
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
519
+ execute_or_queue_command(command, &block)
520
+ end
521
+
522
+ # Service producers can use this method to add DNS record sets to private DNS
523
+ # zones in the shared producer host project.
524
+ # @param [String] parent
525
+ # Required. The service that is managing peering connectivity for a service
526
+ # producer's organization. For Google services that support this functionality,
527
+ # this value is `services/servicenetworking.googleapis.com`.
528
+ # @param [Google::Apis::ServicenetworkingV1::AddDnsRecordSetRequest] add_dns_record_set_request_object
529
+ # @param [String] fields
530
+ # Selector specifying which fields to include in a partial response.
531
+ # @param [String] quota_user
532
+ # Available to use for quota purposes for server-side applications. Can be any
533
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
534
+ # @param [Google::Apis::RequestOptions] options
535
+ # Request-specific options
536
+ #
537
+ # @yield [result, err] Result & error if block supplied
538
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Operation] parsed result object
539
+ # @yieldparam err [StandardError] error object if request failed
540
+ #
541
+ # @return [Google::Apis::ServicenetworkingV1::Operation]
542
+ #
543
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
544
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
545
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
546
+ def add_dns_record_set(parent, add_dns_record_set_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
547
+ command = make_simple_command(:post, 'v1/{+parent}/dnsRecordSets:add', options)
548
+ command.request_representation = Google::Apis::ServicenetworkingV1::AddDnsRecordSetRequest::Representation
549
+ command.request_object = add_dns_record_set_request_object
550
+ command.response_representation = Google::Apis::ServicenetworkingV1::Operation::Representation
551
+ command.response_class = Google::Apis::ServicenetworkingV1::Operation
552
+ command.params['parent'] = parent unless parent.nil?
553
+ command.query['fields'] = fields unless fields.nil?
554
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
555
+ execute_or_queue_command(command, &block)
556
+ end
557
+
558
+ # Service producers can use this method to remove DNS record sets from private
559
+ # DNS zones in the shared producer host project.
560
+ # @param [String] parent
561
+ # Required. The service that is managing peering connectivity for a service
562
+ # producer's organization. For Google services that support this functionality,
563
+ # this value is `services/servicenetworking.googleapis.com`.
564
+ # @param [Google::Apis::ServicenetworkingV1::RemoveDnsRecordSetRequest] remove_dns_record_set_request_object
565
+ # @param [String] fields
566
+ # Selector specifying which fields to include in a partial response.
567
+ # @param [String] quota_user
568
+ # Available to use for quota purposes for server-side applications. Can be any
569
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
570
+ # @param [Google::Apis::RequestOptions] options
571
+ # Request-specific options
572
+ #
573
+ # @yield [result, err] Result & error if block supplied
574
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Operation] parsed result object
575
+ # @yieldparam err [StandardError] error object if request failed
576
+ #
577
+ # @return [Google::Apis::ServicenetworkingV1::Operation]
578
+ #
579
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
580
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
581
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
582
+ def remove_dns_record_set(parent, remove_dns_record_set_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
583
+ command = make_simple_command(:post, 'v1/{+parent}/dnsRecordSets:remove', options)
584
+ command.request_representation = Google::Apis::ServicenetworkingV1::RemoveDnsRecordSetRequest::Representation
585
+ command.request_object = remove_dns_record_set_request_object
586
+ command.response_representation = Google::Apis::ServicenetworkingV1::Operation::Representation
587
+ command.response_class = Google::Apis::ServicenetworkingV1::Operation
588
+ command.params['parent'] = parent unless parent.nil?
589
+ command.query['fields'] = fields unless fields.nil?
590
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
591
+ execute_or_queue_command(command, &block)
592
+ end
593
+
594
+ # Service producers can use this method to update DNS record sets from private
595
+ # DNS zones in the shared producer host project.
596
+ # @param [String] parent
597
+ # Required. The service that is managing peering connectivity for a service
598
+ # producer's organization. For Google services that support this functionality,
599
+ # this value is `services/servicenetworking.googleapis.com`.
600
+ # @param [Google::Apis::ServicenetworkingV1::UpdateDnsRecordSetRequest] update_dns_record_set_request_object
601
+ # @param [String] fields
602
+ # Selector specifying which fields to include in a partial response.
603
+ # @param [String] quota_user
604
+ # Available to use for quota purposes for server-side applications. Can be any
605
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
606
+ # @param [Google::Apis::RequestOptions] options
607
+ # Request-specific options
608
+ #
609
+ # @yield [result, err] Result & error if block supplied
610
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Operation] parsed result object
611
+ # @yieldparam err [StandardError] error object if request failed
612
+ #
613
+ # @return [Google::Apis::ServicenetworkingV1::Operation]
614
+ #
615
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
616
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
617
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
618
+ def update_dns_record_set(parent, update_dns_record_set_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
619
+ command = make_simple_command(:post, 'v1/{+parent}/dnsRecordSets:update', options)
620
+ command.request_representation = Google::Apis::ServicenetworkingV1::UpdateDnsRecordSetRequest::Representation
621
+ command.request_object = update_dns_record_set_request_object
622
+ command.response_representation = Google::Apis::ServicenetworkingV1::Operation::Representation
623
+ command.response_class = Google::Apis::ServicenetworkingV1::Operation
624
+ command.params['parent'] = parent unless parent.nil?
625
+ command.query['fields'] = fields unless fields.nil?
626
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
627
+ execute_or_queue_command(command, &block)
628
+ end
629
+
630
+ # Service producers can use this method to add private DNS zones in the shared
631
+ # producer host project and matching peering zones in the consumer project.
632
+ # @param [String] parent
633
+ # Required. The service that is managing peering connectivity for a service
634
+ # producer's organization. For Google services that support this functionality,
635
+ # this value is `services/servicenetworking.googleapis.com`.
636
+ # @param [Google::Apis::ServicenetworkingV1::AddDnsZoneRequest] add_dns_zone_request_object
637
+ # @param [String] fields
638
+ # Selector specifying which fields to include in a partial response.
639
+ # @param [String] quota_user
640
+ # Available to use for quota purposes for server-side applications. Can be any
641
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
642
+ # @param [Google::Apis::RequestOptions] options
643
+ # Request-specific options
644
+ #
645
+ # @yield [result, err] Result & error if block supplied
646
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Operation] parsed result object
647
+ # @yieldparam err [StandardError] error object if request failed
648
+ #
649
+ # @return [Google::Apis::ServicenetworkingV1::Operation]
650
+ #
651
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
652
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
653
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
654
+ def add_dns_zone(parent, add_dns_zone_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
655
+ command = make_simple_command(:post, 'v1/{+parent}/dnsZones:add', options)
656
+ command.request_representation = Google::Apis::ServicenetworkingV1::AddDnsZoneRequest::Representation
657
+ command.request_object = add_dns_zone_request_object
658
+ command.response_representation = Google::Apis::ServicenetworkingV1::Operation::Representation
659
+ command.response_class = Google::Apis::ServicenetworkingV1::Operation
660
+ command.params['parent'] = parent unless parent.nil?
661
+ command.query['fields'] = fields unless fields.nil?
662
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
663
+ execute_or_queue_command(command, &block)
664
+ end
665
+
666
+ # Service producers can use this method to remove private DNS zones in the
667
+ # shared producer host project and matching peering zones in the consumer
668
+ # project.
669
+ # @param [String] parent
670
+ # Required. The service that is managing peering connectivity for a service
671
+ # producer's organization. For Google services that support this functionality,
672
+ # this value is `services/servicenetworking.googleapis.com`.
673
+ # @param [Google::Apis::ServicenetworkingV1::RemoveDnsZoneRequest] remove_dns_zone_request_object
674
+ # @param [String] fields
675
+ # Selector specifying which fields to include in a partial response.
676
+ # @param [String] quota_user
677
+ # Available to use for quota purposes for server-side applications. Can be any
678
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
679
+ # @param [Google::Apis::RequestOptions] options
680
+ # Request-specific options
681
+ #
682
+ # @yield [result, err] Result & error if block supplied
683
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Operation] parsed result object
684
+ # @yieldparam err [StandardError] error object if request failed
685
+ #
686
+ # @return [Google::Apis::ServicenetworkingV1::Operation]
687
+ #
688
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
689
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
690
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
691
+ def remove_dns_zone(parent, remove_dns_zone_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
692
+ command = make_simple_command(:post, 'v1/{+parent}/dnsZones:remove', options)
693
+ command.request_representation = Google::Apis::ServicenetworkingV1::RemoveDnsZoneRequest::Representation
694
+ command.request_object = remove_dns_zone_request_object
695
+ command.response_representation = Google::Apis::ServicenetworkingV1::Operation::Representation
696
+ command.response_class = Google::Apis::ServicenetworkingV1::Operation
697
+ command.params['parent'] = parent unless parent.nil?
698
+ command.query['fields'] = fields unless fields.nil?
699
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
700
+ execute_or_queue_command(command, &block)
701
+ end
702
+
703
+ # Service producers use this method to get the configuration of their connection
704
+ # including the import/export of custom routes and subnetwork routes with public
705
+ # IP.
706
+ # @param [String] name
707
+ # Required. Name of the consumer config to retrieve in the format: `services/`
708
+ # service`/projects/`project`/global/networks/`network``. `service` is the
709
+ # peering service that is managing connectivity for the service producer's
710
+ # organization. For Google services that support this functionality, this value
711
+ # is `servicenetworking.googleapis.com`. `project` is a project number e.g. `
712
+ # 12345` that contains the service consumer's VPC network. `network` is the name
713
+ # of the service consumer's VPC network.
714
+ # @param [String] fields
715
+ # Selector specifying which fields to include in a partial response.
716
+ # @param [String] quota_user
717
+ # Available to use for quota purposes for server-side applications. Can be any
718
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
719
+ # @param [Google::Apis::RequestOptions] options
720
+ # Request-specific options
721
+ #
722
+ # @yield [result, err] Result & error if block supplied
723
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::ConsumerConfig] parsed result object
724
+ # @yieldparam err [StandardError] error object if request failed
725
+ #
726
+ # @return [Google::Apis::ServicenetworkingV1::ConsumerConfig]
727
+ #
728
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
729
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
730
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
731
+ def get_service_project_global_network(name, fields: nil, quota_user: nil, options: nil, &block)
732
+ command = make_simple_command(:get, 'v1/{+name}', options)
733
+ command.response_representation = Google::Apis::ServicenetworkingV1::ConsumerConfig::Representation
734
+ command.response_class = Google::Apis::ServicenetworkingV1::ConsumerConfig
735
+ command.params['name'] = name unless name.nil?
736
+ command.query['fields'] = fields unless fields.nil?
737
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
738
+ execute_or_queue_command(command, &block)
739
+ end
740
+
741
+ # Service producers use this method to update the configuration of their
742
+ # connection including the import/export of custom routes and subnetwork routes
743
+ # with public IP.
744
+ # @param [String] parent
745
+ # Required. Parent resource identifying the connection for which the consumer
746
+ # config is being updated in the format: `services/`service`/projects/`project`/
747
+ # global/networks/`network`` `service` is the peering service that is managing
748
+ # connectivity for the service producer's organization. For Google services that
749
+ # support this functionality, this value is `servicenetworking.googleapis.com`. `
750
+ # project` is the number of the project that contains the service consumer's VPC
751
+ # network e.g. `12345`. `network` is the name of the service consumer's VPC
752
+ # network.
753
+ # @param [Google::Apis::ServicenetworkingV1::UpdateConsumerConfigRequest] update_consumer_config_request_object
754
+ # @param [String] fields
755
+ # Selector specifying which fields to include in a partial response.
756
+ # @param [String] quota_user
757
+ # Available to use for quota purposes for server-side applications. Can be any
758
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
759
+ # @param [Google::Apis::RequestOptions] options
760
+ # Request-specific options
761
+ #
762
+ # @yield [result, err] Result & error if block supplied
763
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Operation] parsed result object
764
+ # @yieldparam err [StandardError] error object if request failed
765
+ #
766
+ # @return [Google::Apis::ServicenetworkingV1::Operation]
767
+ #
768
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
769
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
770
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
771
+ def update_network_consumer_config(parent, update_consumer_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
772
+ command = make_simple_command(:patch, 'v1/{+parent}:updateConsumerConfig', options)
773
+ command.request_representation = Google::Apis::ServicenetworkingV1::UpdateConsumerConfigRequest::Representation
774
+ command.request_object = update_consumer_config_request_object
775
+ command.response_representation = Google::Apis::ServicenetworkingV1::Operation::Representation
776
+ command.response_class = Google::Apis::ServicenetworkingV1::Operation
777
+ command.params['parent'] = parent unless parent.nil?
778
+ command.query['fields'] = fields unless fields.nil?
779
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
780
+ execute_or_queue_command(command, &block)
781
+ end
782
+
783
+ # Creates a peered DNS domain which sends requests for records in given
784
+ # namespace originating in the service producer VPC network to the consumer VPC
785
+ # network to be resolved.
786
+ # @param [String] parent
787
+ # Required. Parent resource identifying the connection for which the peered DNS
788
+ # domain will be created in the format: `services/`service`/projects/`project`/
789
+ # global/networks/`network`` `service` is the peering service that is managing
790
+ # connectivity for the service producer's organization. For Google services that
791
+ # support this functionality, this value is `servicenetworking.googleapis.com`. `
792
+ # project` is the number of the project that contains the service consumer's VPC
793
+ # network e.g. `12345`. `network` is the name of the service consumer's VPC
794
+ # network.
795
+ # @param [Google::Apis::ServicenetworkingV1::PeeredDnsDomain] peered_dns_domain_object
796
+ # @param [String] fields
797
+ # Selector specifying which fields to include in a partial response.
798
+ # @param [String] quota_user
799
+ # Available to use for quota purposes for server-side applications. Can be any
800
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
801
+ # @param [Google::Apis::RequestOptions] options
802
+ # Request-specific options
803
+ #
804
+ # @yield [result, err] Result & error if block supplied
805
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Operation] parsed result object
806
+ # @yieldparam err [StandardError] error object if request failed
807
+ #
808
+ # @return [Google::Apis::ServicenetworkingV1::Operation]
809
+ #
810
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
811
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
812
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
813
+ def create_service_project_global_network_peered_dns_domain(parent, peered_dns_domain_object = nil, fields: nil, quota_user: nil, options: nil, &block)
814
+ command = make_simple_command(:post, 'v1/{+parent}/peeredDnsDomains', options)
815
+ command.request_representation = Google::Apis::ServicenetworkingV1::PeeredDnsDomain::Representation
816
+ command.request_object = peered_dns_domain_object
817
+ command.response_representation = Google::Apis::ServicenetworkingV1::Operation::Representation
818
+ command.response_class = Google::Apis::ServicenetworkingV1::Operation
819
+ command.params['parent'] = parent unless parent.nil?
820
+ command.query['fields'] = fields unless fields.nil?
821
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
822
+ execute_or_queue_command(command, &block)
823
+ end
824
+
825
+ # Deletes a peered DNS domain.
826
+ # @param [String] name
827
+ # Required. The name of the peered DNS domain to delete in the format: `services/
828
+ # `service`/projects/`project`/global/networks/`network`/peeredDnsDomains/`name``
829
+ # . `service` is the peering service that is managing connectivity for the
830
+ # service producer's organization. For Google services that support this
831
+ # functionality, this value is `servicenetworking.googleapis.com`. `project` is
832
+ # the number of the project that contains the service consumer's VPC network e.g.
833
+ # `12345`. `network` is the name of the service consumer's VPC network. `name`
834
+ # is the name of the peered DNS domain.
835
+ # @param [String] fields
836
+ # Selector specifying which fields to include in a partial response.
837
+ # @param [String] quota_user
838
+ # Available to use for quota purposes for server-side applications. Can be any
839
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
840
+ # @param [Google::Apis::RequestOptions] options
841
+ # Request-specific options
842
+ #
843
+ # @yield [result, err] Result & error if block supplied
844
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Operation] parsed result object
845
+ # @yieldparam err [StandardError] error object if request failed
846
+ #
847
+ # @return [Google::Apis::ServicenetworkingV1::Operation]
848
+ #
849
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
850
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
851
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
852
+ def delete_service_project_global_network_peered_dns_domain(name, fields: nil, quota_user: nil, options: nil, &block)
853
+ command = make_simple_command(:delete, 'v1/{+name}', options)
854
+ command.response_representation = Google::Apis::ServicenetworkingV1::Operation::Representation
855
+ command.response_class = Google::Apis::ServicenetworkingV1::Operation
856
+ command.params['name'] = name unless name.nil?
857
+ command.query['fields'] = fields unless fields.nil?
858
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
859
+ execute_or_queue_command(command, &block)
860
+ end
861
+
862
+ # Lists peered DNS domains for a connection.
863
+ # @param [String] parent
864
+ # Required. Parent resource identifying the connection which owns this
865
+ # collection of peered DNS domains in the format: `services/`service`/projects/`
866
+ # project`/global/networks/`network``. `service` is the peering service that is
867
+ # managing connectivity for the service producer's organization. For Google
868
+ # services that support this functionality, this value is `servicenetworking.
869
+ # googleapis.com`. `project` is a project number e.g. `12345` that contains the
870
+ # service consumer's VPC network. `network` is the name of the service consumer'
871
+ # s VPC network.
872
+ # @param [String] fields
873
+ # Selector specifying which fields to include in a partial response.
874
+ # @param [String] quota_user
875
+ # Available to use for quota purposes for server-side applications. Can be any
876
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
877
+ # @param [Google::Apis::RequestOptions] options
878
+ # Request-specific options
879
+ #
880
+ # @yield [result, err] Result & error if block supplied
881
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::ListPeeredDnsDomainsResponse] parsed result object
882
+ # @yieldparam err [StandardError] error object if request failed
883
+ #
884
+ # @return [Google::Apis::ServicenetworkingV1::ListPeeredDnsDomainsResponse]
885
+ #
886
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
887
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
888
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
889
+ def list_service_project_global_network_peered_dns_domains(parent, fields: nil, quota_user: nil, options: nil, &block)
890
+ command = make_simple_command(:get, 'v1/{+parent}/peeredDnsDomains', options)
891
+ command.response_representation = Google::Apis::ServicenetworkingV1::ListPeeredDnsDomainsResponse::Representation
892
+ command.response_class = Google::Apis::ServicenetworkingV1::ListPeeredDnsDomainsResponse
893
+ command.params['parent'] = parent unless parent.nil?
894
+ command.query['fields'] = fields unless fields.nil?
895
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
896
+ execute_or_queue_command(command, &block)
897
+ end
898
+
899
+ # Service producers can use this method to add roles in the shared VPC host
900
+ # project. Each role is bound to the provided member. Each role must be selected
901
+ # from within an allowlisted set of roles. Each role is applied at only the
902
+ # granularity specified in the allowlist.
903
+ # @param [String] parent
904
+ # Required. This is in a form services/`service` where `service` is the name of
905
+ # the private access management service. For example 'service-peering.example.
906
+ # com'.
907
+ # @param [Google::Apis::ServicenetworkingV1::AddRolesRequest] add_roles_request_object
908
+ # @param [String] fields
909
+ # Selector specifying which fields to include in a partial response.
910
+ # @param [String] quota_user
911
+ # Available to use for quota purposes for server-side applications. Can be any
912
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
913
+ # @param [Google::Apis::RequestOptions] options
914
+ # Request-specific options
915
+ #
916
+ # @yield [result, err] Result & error if block supplied
917
+ # @yieldparam result [Google::Apis::ServicenetworkingV1::Operation] parsed result object
918
+ # @yieldparam err [StandardError] error object if request failed
919
+ #
920
+ # @return [Google::Apis::ServicenetworkingV1::Operation]
921
+ #
922
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
923
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
924
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
925
+ def add_roles(parent, add_roles_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
926
+ command = make_simple_command(:post, 'v1/{+parent}/roles:add', options)
927
+ command.request_representation = Google::Apis::ServicenetworkingV1::AddRolesRequest::Representation
928
+ command.request_object = add_roles_request_object
929
+ command.response_representation = Google::Apis::ServicenetworkingV1::Operation::Representation
930
+ command.response_class = Google::Apis::ServicenetworkingV1::Operation
931
+ command.params['parent'] = parent unless parent.nil?
932
+ command.query['fields'] = fields unless fields.nil?
933
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
934
+ execute_or_queue_command(command, &block)
935
+ end
936
+
937
+ protected
938
+
939
+ def apply_command_defaults(command)
940
+ command.query['key'] = key unless key.nil?
941
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
942
+ end
943
+ end
944
+ end
945
+ end
946
+ end