google-apis-dns_v1beta2 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1091 @@
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 DnsV1beta2
23
+ # Cloud DNS API
24
+ #
25
+ #
26
+ #
27
+ # @example
28
+ # require 'google/apis/dns_v1beta2'
29
+ #
30
+ # Dns = Google::Apis::DnsV1beta2 # Alias the module
31
+ # service = Dns::DnsService.new
32
+ #
33
+ # @see https://cloud.google.com/dns/docs
34
+ class DnsService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://dns.googleapis.com/', '',
47
+ client_name: 'google-apis-dns_v1beta2',
48
+ client_version: Google::Apis::DnsV1beta2::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Atomically update the ResourceRecordSet collection.
53
+ # @param [String] project
54
+ # Identifies the project addressed by this request.
55
+ # @param [String] managed_zone
56
+ # Identifies the managed zone addressed by this request. Can be the managed zone
57
+ # name or ID.
58
+ # @param [Google::Apis::DnsV1beta2::Change] change_object
59
+ # @param [String] client_operation_id
60
+ # For mutating operation requests only. An optional identifier specified by the
61
+ # client. Must be unique for operation resources in the Operations collection.
62
+ # @param [String] fields
63
+ # Selector specifying which fields to include in a partial response.
64
+ # @param [String] quota_user
65
+ # Available to use for quota purposes for server-side applications. Can be any
66
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
67
+ # @param [Google::Apis::RequestOptions] options
68
+ # Request-specific options
69
+ #
70
+ # @yield [result, err] Result & error if block supplied
71
+ # @yieldparam result [Google::Apis::DnsV1beta2::Change] parsed result object
72
+ # @yieldparam err [StandardError] error object if request failed
73
+ #
74
+ # @return [Google::Apis::DnsV1beta2::Change]
75
+ #
76
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
77
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
78
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
79
+ def create_change(project, managed_zone, change_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
80
+ command = make_simple_command(:post, 'dns/v1beta2/projects/{project}/managedZones/{managedZone}/changes', options)
81
+ command.request_representation = Google::Apis::DnsV1beta2::Change::Representation
82
+ command.request_object = change_object
83
+ command.response_representation = Google::Apis::DnsV1beta2::Change::Representation
84
+ command.response_class = Google::Apis::DnsV1beta2::Change
85
+ command.params['project'] = project unless project.nil?
86
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
87
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
88
+ command.query['fields'] = fields unless fields.nil?
89
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
90
+ execute_or_queue_command(command, &block)
91
+ end
92
+
93
+ # Fetch the representation of an existing Change.
94
+ # @param [String] project
95
+ # Identifies the project addressed by this request.
96
+ # @param [String] managed_zone
97
+ # Identifies the managed zone addressed by this request. Can be the managed zone
98
+ # name or ID.
99
+ # @param [String] change_id
100
+ # The identifier of the requested change, from a previous
101
+ # ResourceRecordSetsChangeResponse.
102
+ # @param [String] client_operation_id
103
+ # For mutating operation requests only. An optional identifier specified by the
104
+ # client. Must be unique for operation resources in the Operations collection.
105
+ # @param [String] fields
106
+ # Selector specifying which fields to include in a partial response.
107
+ # @param [String] quota_user
108
+ # Available to use for quota purposes for server-side applications. Can be any
109
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
110
+ # @param [Google::Apis::RequestOptions] options
111
+ # Request-specific options
112
+ #
113
+ # @yield [result, err] Result & error if block supplied
114
+ # @yieldparam result [Google::Apis::DnsV1beta2::Change] parsed result object
115
+ # @yieldparam err [StandardError] error object if request failed
116
+ #
117
+ # @return [Google::Apis::DnsV1beta2::Change]
118
+ #
119
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
120
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
121
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
122
+ def get_change(project, managed_zone, change_id, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
123
+ command = make_simple_command(:get, 'dns/v1beta2/projects/{project}/managedZones/{managedZone}/changes/{changeId}', options)
124
+ command.response_representation = Google::Apis::DnsV1beta2::Change::Representation
125
+ command.response_class = Google::Apis::DnsV1beta2::Change
126
+ command.params['project'] = project unless project.nil?
127
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
128
+ command.params['changeId'] = change_id unless change_id.nil?
129
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
130
+ command.query['fields'] = fields unless fields.nil?
131
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
132
+ execute_or_queue_command(command, &block)
133
+ end
134
+
135
+ # Enumerate Changes to a ResourceRecordSet collection.
136
+ # @param [String] project
137
+ # Identifies the project addressed by this request.
138
+ # @param [String] managed_zone
139
+ # Identifies the managed zone addressed by this request. Can be the managed zone
140
+ # name or ID.
141
+ # @param [Fixnum] max_results
142
+ # Optional. Maximum number of results to be returned. If unspecified, the server
143
+ # will decide how many results to return.
144
+ # @param [String] page_token
145
+ # Optional. A tag returned by a previous list request that was truncated. Use
146
+ # this parameter to continue a previous list request.
147
+ # @param [String] sort_by
148
+ # Sorting criterion. The only supported value is change sequence.
149
+ # @param [String] sort_order
150
+ # Sorting order direction: 'ascending' or 'descending'.
151
+ # @param [String] fields
152
+ # Selector specifying which fields to include in a partial response.
153
+ # @param [String] quota_user
154
+ # Available to use for quota purposes for server-side applications. Can be any
155
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
156
+ # @param [Google::Apis::RequestOptions] options
157
+ # Request-specific options
158
+ #
159
+ # @yield [result, err] Result & error if block supplied
160
+ # @yieldparam result [Google::Apis::DnsV1beta2::ChangesListResponse] parsed result object
161
+ # @yieldparam err [StandardError] error object if request failed
162
+ #
163
+ # @return [Google::Apis::DnsV1beta2::ChangesListResponse]
164
+ #
165
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
166
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
167
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
168
+ def list_changes(project, managed_zone, max_results: nil, page_token: nil, sort_by: nil, sort_order: nil, fields: nil, quota_user: nil, options: nil, &block)
169
+ command = make_simple_command(:get, 'dns/v1beta2/projects/{project}/managedZones/{managedZone}/changes', options)
170
+ command.response_representation = Google::Apis::DnsV1beta2::ChangesListResponse::Representation
171
+ command.response_class = Google::Apis::DnsV1beta2::ChangesListResponse
172
+ command.params['project'] = project unless project.nil?
173
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
174
+ command.query['maxResults'] = max_results unless max_results.nil?
175
+ command.query['pageToken'] = page_token unless page_token.nil?
176
+ command.query['sortBy'] = sort_by unless sort_by.nil?
177
+ command.query['sortOrder'] = sort_order unless sort_order.nil?
178
+ command.query['fields'] = fields unless fields.nil?
179
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
180
+ execute_or_queue_command(command, &block)
181
+ end
182
+
183
+ # Fetch the representation of an existing DnsKey.
184
+ # @param [String] project
185
+ # Identifies the project addressed by this request.
186
+ # @param [String] managed_zone
187
+ # Identifies the managed zone addressed by this request. Can be the managed zone
188
+ # name or ID.
189
+ # @param [String] dns_key_id
190
+ # The identifier of the requested DnsKey.
191
+ # @param [String] client_operation_id
192
+ # For mutating operation requests only. An optional identifier specified by the
193
+ # client. Must be unique for operation resources in the Operations collection.
194
+ # @param [String] digest_type
195
+ # An optional comma-separated list of digest types to compute and display for
196
+ # key signing keys. If omitted, the recommended digest type will be computed and
197
+ # displayed.
198
+ # @param [String] fields
199
+ # Selector specifying which fields to include in a partial response.
200
+ # @param [String] quota_user
201
+ # Available to use for quota purposes for server-side applications. Can be any
202
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
203
+ # @param [Google::Apis::RequestOptions] options
204
+ # Request-specific options
205
+ #
206
+ # @yield [result, err] Result & error if block supplied
207
+ # @yieldparam result [Google::Apis::DnsV1beta2::DnsKey] parsed result object
208
+ # @yieldparam err [StandardError] error object if request failed
209
+ #
210
+ # @return [Google::Apis::DnsV1beta2::DnsKey]
211
+ #
212
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
213
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
214
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
215
+ def get_dns_key(project, managed_zone, dns_key_id, client_operation_id: nil, digest_type: nil, fields: nil, quota_user: nil, options: nil, &block)
216
+ command = make_simple_command(:get, 'dns/v1beta2/projects/{project}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}', options)
217
+ command.response_representation = Google::Apis::DnsV1beta2::DnsKey::Representation
218
+ command.response_class = Google::Apis::DnsV1beta2::DnsKey
219
+ command.params['project'] = project unless project.nil?
220
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
221
+ command.params['dnsKeyId'] = dns_key_id unless dns_key_id.nil?
222
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
223
+ command.query['digestType'] = digest_type unless digest_type.nil?
224
+ command.query['fields'] = fields unless fields.nil?
225
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
226
+ execute_or_queue_command(command, &block)
227
+ end
228
+
229
+ # Enumerate DnsKeys to a ResourceRecordSet collection.
230
+ # @param [String] project
231
+ # Identifies the project addressed by this request.
232
+ # @param [String] managed_zone
233
+ # Identifies the managed zone addressed by this request. Can be the managed zone
234
+ # name or ID.
235
+ # @param [String] digest_type
236
+ # An optional comma-separated list of digest types to compute and display for
237
+ # key signing keys. If omitted, the recommended digest type will be computed and
238
+ # displayed.
239
+ # @param [Fixnum] max_results
240
+ # Optional. Maximum number of results to be returned. If unspecified, the server
241
+ # will decide how many results to return.
242
+ # @param [String] page_token
243
+ # Optional. A tag returned by a previous list request that was truncated. Use
244
+ # this parameter to continue a previous list request.
245
+ # @param [String] fields
246
+ # Selector specifying which fields to include in a partial response.
247
+ # @param [String] quota_user
248
+ # Available to use for quota purposes for server-side applications. Can be any
249
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
250
+ # @param [Google::Apis::RequestOptions] options
251
+ # Request-specific options
252
+ #
253
+ # @yield [result, err] Result & error if block supplied
254
+ # @yieldparam result [Google::Apis::DnsV1beta2::DnsKeysListResponse] parsed result object
255
+ # @yieldparam err [StandardError] error object if request failed
256
+ #
257
+ # @return [Google::Apis::DnsV1beta2::DnsKeysListResponse]
258
+ #
259
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
260
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
261
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
262
+ def list_dns_keys(project, managed_zone, digest_type: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
263
+ command = make_simple_command(:get, 'dns/v1beta2/projects/{project}/managedZones/{managedZone}/dnsKeys', options)
264
+ command.response_representation = Google::Apis::DnsV1beta2::DnsKeysListResponse::Representation
265
+ command.response_class = Google::Apis::DnsV1beta2::DnsKeysListResponse
266
+ command.params['project'] = project unless project.nil?
267
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
268
+ command.query['digestType'] = digest_type unless digest_type.nil?
269
+ command.query['maxResults'] = max_results unless max_results.nil?
270
+ command.query['pageToken'] = page_token unless page_token.nil?
271
+ command.query['fields'] = fields unless fields.nil?
272
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
273
+ execute_or_queue_command(command, &block)
274
+ end
275
+
276
+ # Fetch the representation of an existing Operation.
277
+ # @param [String] project
278
+ # Identifies the project addressed by this request.
279
+ # @param [String] managed_zone
280
+ # Identifies the managed zone addressed by this request.
281
+ # @param [String] operation
282
+ # Identifies the operation addressed by this request.
283
+ # @param [String] client_operation_id
284
+ # For mutating operation requests only. An optional identifier specified by the
285
+ # client. Must be unique for operation resources in the Operations collection.
286
+ # @param [String] fields
287
+ # Selector specifying which fields to include in a partial response.
288
+ # @param [String] quota_user
289
+ # Available to use for quota purposes for server-side applications. Can be any
290
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
291
+ # @param [Google::Apis::RequestOptions] options
292
+ # Request-specific options
293
+ #
294
+ # @yield [result, err] Result & error if block supplied
295
+ # @yieldparam result [Google::Apis::DnsV1beta2::Operation] parsed result object
296
+ # @yieldparam err [StandardError] error object if request failed
297
+ #
298
+ # @return [Google::Apis::DnsV1beta2::Operation]
299
+ #
300
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
301
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
302
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
303
+ def get_managed_zone_operation(project, managed_zone, operation, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
304
+ command = make_simple_command(:get, 'dns/v1beta2/projects/{project}/managedZones/{managedZone}/operations/{operation}', options)
305
+ command.response_representation = Google::Apis::DnsV1beta2::Operation::Representation
306
+ command.response_class = Google::Apis::DnsV1beta2::Operation
307
+ command.params['project'] = project unless project.nil?
308
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
309
+ command.params['operation'] = operation unless operation.nil?
310
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
311
+ command.query['fields'] = fields unless fields.nil?
312
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
313
+ execute_or_queue_command(command, &block)
314
+ end
315
+
316
+ # Enumerate Operations for the given ManagedZone.
317
+ # @param [String] project
318
+ # Identifies the project addressed by this request.
319
+ # @param [String] managed_zone
320
+ # Identifies the managed zone addressed by this request.
321
+ # @param [Fixnum] max_results
322
+ # Optional. Maximum number of results to be returned. If unspecified, the server
323
+ # will decide how many results to return.
324
+ # @param [String] page_token
325
+ # Optional. A tag returned by a previous list request that was truncated. Use
326
+ # this parameter to continue a previous list request.
327
+ # @param [String] sort_by
328
+ # Sorting criterion. The only supported values are START_TIME and ID.
329
+ # @param [String] fields
330
+ # Selector specifying which fields to include in a partial response.
331
+ # @param [String] quota_user
332
+ # Available to use for quota purposes for server-side applications. Can be any
333
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
334
+ # @param [Google::Apis::RequestOptions] options
335
+ # Request-specific options
336
+ #
337
+ # @yield [result, err] Result & error if block supplied
338
+ # @yieldparam result [Google::Apis::DnsV1beta2::ManagedZoneOperationsListResponse] parsed result object
339
+ # @yieldparam err [StandardError] error object if request failed
340
+ #
341
+ # @return [Google::Apis::DnsV1beta2::ManagedZoneOperationsListResponse]
342
+ #
343
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
344
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
345
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
346
+ def list_managed_zone_operations(project, managed_zone, max_results: nil, page_token: nil, sort_by: nil, fields: nil, quota_user: nil, options: nil, &block)
347
+ command = make_simple_command(:get, 'dns/v1beta2/projects/{project}/managedZones/{managedZone}/operations', options)
348
+ command.response_representation = Google::Apis::DnsV1beta2::ManagedZoneOperationsListResponse::Representation
349
+ command.response_class = Google::Apis::DnsV1beta2::ManagedZoneOperationsListResponse
350
+ command.params['project'] = project unless project.nil?
351
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
352
+ command.query['maxResults'] = max_results unless max_results.nil?
353
+ command.query['pageToken'] = page_token unless page_token.nil?
354
+ command.query['sortBy'] = sort_by unless sort_by.nil?
355
+ command.query['fields'] = fields unless fields.nil?
356
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
357
+ execute_or_queue_command(command, &block)
358
+ end
359
+
360
+ # Create a new ManagedZone.
361
+ # @param [String] project
362
+ # Identifies the project addressed by this request.
363
+ # @param [Google::Apis::DnsV1beta2::ManagedZone] managed_zone_object
364
+ # @param [String] client_operation_id
365
+ # For mutating operation requests only. An optional identifier specified by the
366
+ # client. Must be unique for operation resources in the Operations collection.
367
+ # @param [String] fields
368
+ # Selector specifying which fields to include in a partial response.
369
+ # @param [String] quota_user
370
+ # Available to use for quota purposes for server-side applications. Can be any
371
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
372
+ # @param [Google::Apis::RequestOptions] options
373
+ # Request-specific options
374
+ #
375
+ # @yield [result, err] Result & error if block supplied
376
+ # @yieldparam result [Google::Apis::DnsV1beta2::ManagedZone] parsed result object
377
+ # @yieldparam err [StandardError] error object if request failed
378
+ #
379
+ # @return [Google::Apis::DnsV1beta2::ManagedZone]
380
+ #
381
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
382
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
383
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
384
+ def create_managed_zone(project, managed_zone_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
385
+ command = make_simple_command(:post, 'dns/v1beta2/projects/{project}/managedZones', options)
386
+ command.request_representation = Google::Apis::DnsV1beta2::ManagedZone::Representation
387
+ command.request_object = managed_zone_object
388
+ command.response_representation = Google::Apis::DnsV1beta2::ManagedZone::Representation
389
+ command.response_class = Google::Apis::DnsV1beta2::ManagedZone
390
+ command.params['project'] = project unless project.nil?
391
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
392
+ command.query['fields'] = fields unless fields.nil?
393
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
394
+ execute_or_queue_command(command, &block)
395
+ end
396
+
397
+ # Delete a previously created ManagedZone.
398
+ # @param [String] project
399
+ # Identifies the project addressed by this request.
400
+ # @param [String] managed_zone
401
+ # Identifies the managed zone addressed by this request. Can be the managed zone
402
+ # name or ID.
403
+ # @param [String] client_operation_id
404
+ # For mutating operation requests only. An optional identifier specified by the
405
+ # client. Must be unique for operation resources in the Operations collection.
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 [NilClass] No result returned for this method
416
+ # @yieldparam err [StandardError] error object if request failed
417
+ #
418
+ # @return [void]
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 delete_managed_zone(project, managed_zone, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
424
+ command = make_simple_command(:delete, 'dns/v1beta2/projects/{project}/managedZones/{managedZone}', options)
425
+ command.params['project'] = project unless project.nil?
426
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
427
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
428
+ command.query['fields'] = fields unless fields.nil?
429
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
430
+ execute_or_queue_command(command, &block)
431
+ end
432
+
433
+ # Fetch the representation of an existing ManagedZone.
434
+ # @param [String] project
435
+ # Identifies the project addressed by this request.
436
+ # @param [String] managed_zone
437
+ # Identifies the managed zone addressed by this request. Can be the managed zone
438
+ # name or ID.
439
+ # @param [String] client_operation_id
440
+ # For mutating operation requests only. An optional identifier specified by the
441
+ # client. Must be unique for operation resources in the Operations collection.
442
+ # @param [String] fields
443
+ # Selector specifying which fields to include in a partial response.
444
+ # @param [String] quota_user
445
+ # Available to use for quota purposes for server-side applications. Can be any
446
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
447
+ # @param [Google::Apis::RequestOptions] options
448
+ # Request-specific options
449
+ #
450
+ # @yield [result, err] Result & error if block supplied
451
+ # @yieldparam result [Google::Apis::DnsV1beta2::ManagedZone] parsed result object
452
+ # @yieldparam err [StandardError] error object if request failed
453
+ #
454
+ # @return [Google::Apis::DnsV1beta2::ManagedZone]
455
+ #
456
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
457
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
458
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
459
+ def get_managed_zone(project, managed_zone, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
460
+ command = make_simple_command(:get, 'dns/v1beta2/projects/{project}/managedZones/{managedZone}', options)
461
+ command.response_representation = Google::Apis::DnsV1beta2::ManagedZone::Representation
462
+ command.response_class = Google::Apis::DnsV1beta2::ManagedZone
463
+ command.params['project'] = project unless project.nil?
464
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
465
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
466
+ command.query['fields'] = fields unless fields.nil?
467
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
468
+ execute_or_queue_command(command, &block)
469
+ end
470
+
471
+ # Enumerate ManagedZones that have been created but not yet deleted.
472
+ # @param [String] project
473
+ # Identifies the project addressed by this request.
474
+ # @param [String] dns_name
475
+ # Restricts the list to return only zones with this domain name.
476
+ # @param [Fixnum] max_results
477
+ # Optional. Maximum number of results to be returned. If unspecified, the server
478
+ # will decide how many results to return.
479
+ # @param [String] page_token
480
+ # Optional. A tag returned by a previous list request that was truncated. Use
481
+ # this parameter to continue a previous list request.
482
+ # @param [String] fields
483
+ # Selector specifying which fields to include in a partial response.
484
+ # @param [String] quota_user
485
+ # Available to use for quota purposes for server-side applications. Can be any
486
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
487
+ # @param [Google::Apis::RequestOptions] options
488
+ # Request-specific options
489
+ #
490
+ # @yield [result, err] Result & error if block supplied
491
+ # @yieldparam result [Google::Apis::DnsV1beta2::ManagedZonesListResponse] parsed result object
492
+ # @yieldparam err [StandardError] error object if request failed
493
+ #
494
+ # @return [Google::Apis::DnsV1beta2::ManagedZonesListResponse]
495
+ #
496
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
497
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
498
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
499
+ def list_managed_zones(project, dns_name: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
500
+ command = make_simple_command(:get, 'dns/v1beta2/projects/{project}/managedZones', options)
501
+ command.response_representation = Google::Apis::DnsV1beta2::ManagedZonesListResponse::Representation
502
+ command.response_class = Google::Apis::DnsV1beta2::ManagedZonesListResponse
503
+ command.params['project'] = project unless project.nil?
504
+ command.query['dnsName'] = dns_name unless dns_name.nil?
505
+ command.query['maxResults'] = max_results unless max_results.nil?
506
+ command.query['pageToken'] = page_token unless page_token.nil?
507
+ command.query['fields'] = fields unless fields.nil?
508
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
509
+ execute_or_queue_command(command, &block)
510
+ end
511
+
512
+ # Apply a partial update to an existing ManagedZone.
513
+ # @param [String] project
514
+ # Identifies the project addressed by this request.
515
+ # @param [String] managed_zone
516
+ # Identifies the managed zone addressed by this request. Can be the managed zone
517
+ # name or ID.
518
+ # @param [Google::Apis::DnsV1beta2::ManagedZone] managed_zone_object
519
+ # @param [String] client_operation_id
520
+ # For mutating operation requests only. An optional identifier specified by the
521
+ # client. Must be unique for operation resources in the Operations collection.
522
+ # @param [String] fields
523
+ # Selector specifying which fields to include in a partial response.
524
+ # @param [String] quota_user
525
+ # Available to use for quota purposes for server-side applications. Can be any
526
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
527
+ # @param [Google::Apis::RequestOptions] options
528
+ # Request-specific options
529
+ #
530
+ # @yield [result, err] Result & error if block supplied
531
+ # @yieldparam result [Google::Apis::DnsV1beta2::Operation] parsed result object
532
+ # @yieldparam err [StandardError] error object if request failed
533
+ #
534
+ # @return [Google::Apis::DnsV1beta2::Operation]
535
+ #
536
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
537
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
538
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
539
+ def patch_managed_zone(project, managed_zone, managed_zone_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
540
+ command = make_simple_command(:patch, 'dns/v1beta2/projects/{project}/managedZones/{managedZone}', options)
541
+ command.request_representation = Google::Apis::DnsV1beta2::ManagedZone::Representation
542
+ command.request_object = managed_zone_object
543
+ command.response_representation = Google::Apis::DnsV1beta2::Operation::Representation
544
+ command.response_class = Google::Apis::DnsV1beta2::Operation
545
+ command.params['project'] = project unless project.nil?
546
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
547
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
548
+ command.query['fields'] = fields unless fields.nil?
549
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
550
+ execute_or_queue_command(command, &block)
551
+ end
552
+
553
+ # Update an existing ManagedZone.
554
+ # @param [String] project
555
+ # Identifies the project addressed by this request.
556
+ # @param [String] managed_zone
557
+ # Identifies the managed zone addressed by this request. Can be the managed zone
558
+ # name or ID.
559
+ # @param [Google::Apis::DnsV1beta2::ManagedZone] managed_zone_object
560
+ # @param [String] client_operation_id
561
+ # For mutating operation requests only. An optional identifier specified by the
562
+ # client. Must be unique for operation resources in the Operations collection.
563
+ # @param [String] fields
564
+ # Selector specifying which fields to include in a partial response.
565
+ # @param [String] quota_user
566
+ # Available to use for quota purposes for server-side applications. Can be any
567
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
568
+ # @param [Google::Apis::RequestOptions] options
569
+ # Request-specific options
570
+ #
571
+ # @yield [result, err] Result & error if block supplied
572
+ # @yieldparam result [Google::Apis::DnsV1beta2::Operation] parsed result object
573
+ # @yieldparam err [StandardError] error object if request failed
574
+ #
575
+ # @return [Google::Apis::DnsV1beta2::Operation]
576
+ #
577
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
578
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
579
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
580
+ def update_managed_zone(project, managed_zone, managed_zone_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
581
+ command = make_simple_command(:put, 'dns/v1beta2/projects/{project}/managedZones/{managedZone}', options)
582
+ command.request_representation = Google::Apis::DnsV1beta2::ManagedZone::Representation
583
+ command.request_object = managed_zone_object
584
+ command.response_representation = Google::Apis::DnsV1beta2::Operation::Representation
585
+ command.response_class = Google::Apis::DnsV1beta2::Operation
586
+ command.params['project'] = project unless project.nil?
587
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
588
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.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
+ # Create a new Policy
595
+ # @param [String] project
596
+ # Identifies the project addressed by this request.
597
+ # @param [Google::Apis::DnsV1beta2::Policy] policy_object
598
+ # @param [String] client_operation_id
599
+ # For mutating operation requests only. An optional identifier specified by the
600
+ # client. Must be unique for operation resources in the Operations collection.
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::DnsV1beta2::Policy] parsed result object
611
+ # @yieldparam err [StandardError] error object if request failed
612
+ #
613
+ # @return [Google::Apis::DnsV1beta2::Policy]
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 create_policy(project, policy_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
619
+ command = make_simple_command(:post, 'dns/v1beta2/projects/{project}/policies', options)
620
+ command.request_representation = Google::Apis::DnsV1beta2::Policy::Representation
621
+ command.request_object = policy_object
622
+ command.response_representation = Google::Apis::DnsV1beta2::Policy::Representation
623
+ command.response_class = Google::Apis::DnsV1beta2::Policy
624
+ command.params['project'] = project unless project.nil?
625
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
626
+ command.query['fields'] = fields unless fields.nil?
627
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
628
+ execute_or_queue_command(command, &block)
629
+ end
630
+
631
+ # Delete a previously created Policy. Will fail if the policy is still being
632
+ # referenced by a network.
633
+ # @param [String] project
634
+ # Identifies the project addressed by this request.
635
+ # @param [String] policy
636
+ # User given friendly name of the policy addressed by this request.
637
+ # @param [String] client_operation_id
638
+ # For mutating operation requests only. An optional identifier specified by the
639
+ # client. Must be unique for operation resources in the Operations collection.
640
+ # @param [String] fields
641
+ # Selector specifying which fields to include in a partial response.
642
+ # @param [String] quota_user
643
+ # Available to use for quota purposes for server-side applications. Can be any
644
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
645
+ # @param [Google::Apis::RequestOptions] options
646
+ # Request-specific options
647
+ #
648
+ # @yield [result, err] Result & error if block supplied
649
+ # @yieldparam result [NilClass] No result returned for this method
650
+ # @yieldparam err [StandardError] error object if request failed
651
+ #
652
+ # @return [void]
653
+ #
654
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
655
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
656
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
657
+ def delete_policy(project, policy, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
658
+ command = make_simple_command(:delete, 'dns/v1beta2/projects/{project}/policies/{policy}', options)
659
+ command.params['project'] = project unless project.nil?
660
+ command.params['policy'] = policy unless policy.nil?
661
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
662
+ command.query['fields'] = fields unless fields.nil?
663
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
664
+ execute_or_queue_command(command, &block)
665
+ end
666
+
667
+ # Fetch the representation of an existing Policy.
668
+ # @param [String] project
669
+ # Identifies the project addressed by this request.
670
+ # @param [String] policy
671
+ # User given friendly name of the policy addressed by this request.
672
+ # @param [String] client_operation_id
673
+ # For mutating operation requests only. An optional identifier specified by the
674
+ # client. Must be unique for operation resources in the Operations collection.
675
+ # @param [String] fields
676
+ # Selector specifying which fields to include in a partial response.
677
+ # @param [String] quota_user
678
+ # Available to use for quota purposes for server-side applications. Can be any
679
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
680
+ # @param [Google::Apis::RequestOptions] options
681
+ # Request-specific options
682
+ #
683
+ # @yield [result, err] Result & error if block supplied
684
+ # @yieldparam result [Google::Apis::DnsV1beta2::Policy] parsed result object
685
+ # @yieldparam err [StandardError] error object if request failed
686
+ #
687
+ # @return [Google::Apis::DnsV1beta2::Policy]
688
+ #
689
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
690
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
691
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
692
+ def get_policy(project, policy, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
693
+ command = make_simple_command(:get, 'dns/v1beta2/projects/{project}/policies/{policy}', options)
694
+ command.response_representation = Google::Apis::DnsV1beta2::Policy::Representation
695
+ command.response_class = Google::Apis::DnsV1beta2::Policy
696
+ command.params['project'] = project unless project.nil?
697
+ command.params['policy'] = policy unless policy.nil?
698
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
699
+ command.query['fields'] = fields unless fields.nil?
700
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
701
+ execute_or_queue_command(command, &block)
702
+ end
703
+
704
+ # Enumerate all Policies associated with a project.
705
+ # @param [String] project
706
+ # Identifies the project addressed by this request.
707
+ # @param [Fixnum] max_results
708
+ # Optional. Maximum number of results to be returned. If unspecified, the server
709
+ # will decide how many results to return.
710
+ # @param [String] page_token
711
+ # Optional. A tag returned by a previous list request that was truncated. Use
712
+ # this parameter to continue a previous list request.
713
+ # @param [String] fields
714
+ # Selector specifying which fields to include in a partial response.
715
+ # @param [String] quota_user
716
+ # Available to use for quota purposes for server-side applications. Can be any
717
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
718
+ # @param [Google::Apis::RequestOptions] options
719
+ # Request-specific options
720
+ #
721
+ # @yield [result, err] Result & error if block supplied
722
+ # @yieldparam result [Google::Apis::DnsV1beta2::PoliciesListResponse] parsed result object
723
+ # @yieldparam err [StandardError] error object if request failed
724
+ #
725
+ # @return [Google::Apis::DnsV1beta2::PoliciesListResponse]
726
+ #
727
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
728
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
729
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
730
+ def list_policies(project, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
731
+ command = make_simple_command(:get, 'dns/v1beta2/projects/{project}/policies', options)
732
+ command.response_representation = Google::Apis::DnsV1beta2::PoliciesListResponse::Representation
733
+ command.response_class = Google::Apis::DnsV1beta2::PoliciesListResponse
734
+ command.params['project'] = project unless project.nil?
735
+ command.query['maxResults'] = max_results unless max_results.nil?
736
+ command.query['pageToken'] = page_token unless page_token.nil?
737
+ command.query['fields'] = fields unless fields.nil?
738
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
739
+ execute_or_queue_command(command, &block)
740
+ end
741
+
742
+ # Apply a partial update to an existing Policy.
743
+ # @param [String] project
744
+ # Identifies the project addressed by this request.
745
+ # @param [String] policy
746
+ # User given friendly name of the policy addressed by this request.
747
+ # @param [Google::Apis::DnsV1beta2::Policy] policy_object
748
+ # @param [String] client_operation_id
749
+ # For mutating operation requests only. An optional identifier specified by the
750
+ # client. Must be unique for operation resources in the Operations collection.
751
+ # @param [String] fields
752
+ # Selector specifying which fields to include in a partial response.
753
+ # @param [String] quota_user
754
+ # Available to use for quota purposes for server-side applications. Can be any
755
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
756
+ # @param [Google::Apis::RequestOptions] options
757
+ # Request-specific options
758
+ #
759
+ # @yield [result, err] Result & error if block supplied
760
+ # @yieldparam result [Google::Apis::DnsV1beta2::PoliciesPatchResponse] parsed result object
761
+ # @yieldparam err [StandardError] error object if request failed
762
+ #
763
+ # @return [Google::Apis::DnsV1beta2::PoliciesPatchResponse]
764
+ #
765
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
766
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
767
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
768
+ def patch_policy(project, policy, policy_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
769
+ command = make_simple_command(:patch, 'dns/v1beta2/projects/{project}/policies/{policy}', options)
770
+ command.request_representation = Google::Apis::DnsV1beta2::Policy::Representation
771
+ command.request_object = policy_object
772
+ command.response_representation = Google::Apis::DnsV1beta2::PoliciesPatchResponse::Representation
773
+ command.response_class = Google::Apis::DnsV1beta2::PoliciesPatchResponse
774
+ command.params['project'] = project unless project.nil?
775
+ command.params['policy'] = policy unless policy.nil?
776
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
777
+ command.query['fields'] = fields unless fields.nil?
778
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
779
+ execute_or_queue_command(command, &block)
780
+ end
781
+
782
+ # Update an existing Policy.
783
+ # @param [String] project
784
+ # Identifies the project addressed by this request.
785
+ # @param [String] policy
786
+ # User given friendly name of the policy addressed by this request.
787
+ # @param [Google::Apis::DnsV1beta2::Policy] policy_object
788
+ # @param [String] client_operation_id
789
+ # For mutating operation requests only. An optional identifier specified by the
790
+ # client. Must be unique for operation resources in the Operations collection.
791
+ # @param [String] fields
792
+ # Selector specifying which fields to include in a partial response.
793
+ # @param [String] quota_user
794
+ # Available to use for quota purposes for server-side applications. Can be any
795
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
796
+ # @param [Google::Apis::RequestOptions] options
797
+ # Request-specific options
798
+ #
799
+ # @yield [result, err] Result & error if block supplied
800
+ # @yieldparam result [Google::Apis::DnsV1beta2::PoliciesUpdateResponse] parsed result object
801
+ # @yieldparam err [StandardError] error object if request failed
802
+ #
803
+ # @return [Google::Apis::DnsV1beta2::PoliciesUpdateResponse]
804
+ #
805
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
806
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
807
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
808
+ def update_policy(project, policy, policy_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
809
+ command = make_simple_command(:put, 'dns/v1beta2/projects/{project}/policies/{policy}', options)
810
+ command.request_representation = Google::Apis::DnsV1beta2::Policy::Representation
811
+ command.request_object = policy_object
812
+ command.response_representation = Google::Apis::DnsV1beta2::PoliciesUpdateResponse::Representation
813
+ command.response_class = Google::Apis::DnsV1beta2::PoliciesUpdateResponse
814
+ command.params['project'] = project unless project.nil?
815
+ command.params['policy'] = policy unless policy.nil?
816
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
817
+ command.query['fields'] = fields unless fields.nil?
818
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
819
+ execute_or_queue_command(command, &block)
820
+ end
821
+
822
+ # Fetch the representation of an existing Project.
823
+ # @param [String] project
824
+ # Identifies the project addressed by this request.
825
+ # @param [String] client_operation_id
826
+ # For mutating operation requests only. An optional identifier specified by the
827
+ # client. Must be unique for operation resources in the Operations collection.
828
+ # @param [String] fields
829
+ # Selector specifying which fields to include in a partial response.
830
+ # @param [String] quota_user
831
+ # Available to use for quota purposes for server-side applications. Can be any
832
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
833
+ # @param [Google::Apis::RequestOptions] options
834
+ # Request-specific options
835
+ #
836
+ # @yield [result, err] Result & error if block supplied
837
+ # @yieldparam result [Google::Apis::DnsV1beta2::Project] parsed result object
838
+ # @yieldparam err [StandardError] error object if request failed
839
+ #
840
+ # @return [Google::Apis::DnsV1beta2::Project]
841
+ #
842
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
843
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
844
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
845
+ def get_project(project, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
846
+ command = make_simple_command(:get, 'dns/v1beta2/projects/{project}', options)
847
+ command.response_representation = Google::Apis::DnsV1beta2::Project::Representation
848
+ command.response_class = Google::Apis::DnsV1beta2::Project
849
+ command.params['project'] = project unless project.nil?
850
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
851
+ command.query['fields'] = fields unless fields.nil?
852
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
853
+ execute_or_queue_command(command, &block)
854
+ end
855
+
856
+ # Create a new ResourceRecordSet.
857
+ # @param [String] project
858
+ # Identifies the project addressed by this request.
859
+ # @param [String] managed_zone
860
+ # Identifies the managed zone addressed by this request. Can be the managed zone
861
+ # name or ID.
862
+ # @param [Google::Apis::DnsV1beta2::ResourceRecordSet] resource_record_set_object
863
+ # @param [String] client_operation_id
864
+ # For mutating operation requests only. An optional identifier specified by the
865
+ # client. Must be unique for operation resources in the Operations collection.
866
+ # @param [String] fields
867
+ # Selector specifying which fields to include in a partial response.
868
+ # @param [String] quota_user
869
+ # Available to use for quota purposes for server-side applications. Can be any
870
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
871
+ # @param [Google::Apis::RequestOptions] options
872
+ # Request-specific options
873
+ #
874
+ # @yield [result, err] Result & error if block supplied
875
+ # @yieldparam result [Google::Apis::DnsV1beta2::ResourceRecordSet] parsed result object
876
+ # @yieldparam err [StandardError] error object if request failed
877
+ #
878
+ # @return [Google::Apis::DnsV1beta2::ResourceRecordSet]
879
+ #
880
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
881
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
882
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
883
+ def create_project_managed_zone_rrset(project, managed_zone, resource_record_set_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
884
+ command = make_simple_command(:post, 'dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets', options)
885
+ command.request_representation = Google::Apis::DnsV1beta2::ResourceRecordSet::Representation
886
+ command.request_object = resource_record_set_object
887
+ command.response_representation = Google::Apis::DnsV1beta2::ResourceRecordSet::Representation
888
+ command.response_class = Google::Apis::DnsV1beta2::ResourceRecordSet
889
+ command.params['project'] = project unless project.nil?
890
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
891
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
892
+ command.query['fields'] = fields unless fields.nil?
893
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
894
+ execute_or_queue_command(command, &block)
895
+ end
896
+
897
+ # Delete a previously created ResourceRecordSet.
898
+ # @param [String] project
899
+ # Identifies the project addressed by this request.
900
+ # @param [String] managed_zone
901
+ # Identifies the managed zone addressed by this request. Can be the managed zone
902
+ # name or ID.
903
+ # @param [String] name
904
+ # Fully qualified domain name.
905
+ # @param [String] type
906
+ # RRSet type.
907
+ # @param [String] client_operation_id
908
+ # For mutating operation requests only. An optional identifier specified by the
909
+ # client. Must be unique for operation resources in the Operations collection.
910
+ # @param [String] fields
911
+ # Selector specifying which fields to include in a partial response.
912
+ # @param [String] quota_user
913
+ # Available to use for quota purposes for server-side applications. Can be any
914
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
915
+ # @param [Google::Apis::RequestOptions] options
916
+ # Request-specific options
917
+ #
918
+ # @yield [result, err] Result & error if block supplied
919
+ # @yieldparam result [Google::Apis::DnsV1beta2::ResourceRecordSetsDeleteResponse] parsed result object
920
+ # @yieldparam err [StandardError] error object if request failed
921
+ #
922
+ # @return [Google::Apis::DnsV1beta2::ResourceRecordSetsDeleteResponse]
923
+ #
924
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
925
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
926
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
927
+ def delete_project_managed_zone_rrset(project, managed_zone, name, type, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
928
+ command = make_simple_command(:delete, 'dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}', options)
929
+ command.response_representation = Google::Apis::DnsV1beta2::ResourceRecordSetsDeleteResponse::Representation
930
+ command.response_class = Google::Apis::DnsV1beta2::ResourceRecordSetsDeleteResponse
931
+ command.params['project'] = project unless project.nil?
932
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
933
+ command.params['name'] = name unless name.nil?
934
+ command.params['type'] = type unless type.nil?
935
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
936
+ command.query['fields'] = fields unless fields.nil?
937
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
938
+ execute_or_queue_command(command, &block)
939
+ end
940
+
941
+ # Fetch the representation of an existing ResourceRecordSet.
942
+ # @param [String] project
943
+ # Identifies the project addressed by this request.
944
+ # @param [String] managed_zone
945
+ # Identifies the managed zone addressed by this request. Can be the managed zone
946
+ # name or ID.
947
+ # @param [String] name
948
+ # Fully qualified domain name.
949
+ # @param [String] type
950
+ # RRSet type.
951
+ # @param [String] client_operation_id
952
+ # For mutating operation requests only. An optional identifier specified by the
953
+ # client. Must be unique for operation resources in the Operations collection.
954
+ # @param [String] fields
955
+ # Selector specifying which fields to include in a partial response.
956
+ # @param [String] quota_user
957
+ # Available to use for quota purposes for server-side applications. Can be any
958
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
959
+ # @param [Google::Apis::RequestOptions] options
960
+ # Request-specific options
961
+ #
962
+ # @yield [result, err] Result & error if block supplied
963
+ # @yieldparam result [Google::Apis::DnsV1beta2::ResourceRecordSet] parsed result object
964
+ # @yieldparam err [StandardError] error object if request failed
965
+ #
966
+ # @return [Google::Apis::DnsV1beta2::ResourceRecordSet]
967
+ #
968
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
969
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
970
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
971
+ def get_project_managed_zone_rrset(project, managed_zone, name, type, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
972
+ command = make_simple_command(:get, 'dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}', options)
973
+ command.response_representation = Google::Apis::DnsV1beta2::ResourceRecordSet::Representation
974
+ command.response_class = Google::Apis::DnsV1beta2::ResourceRecordSet
975
+ command.params['project'] = project unless project.nil?
976
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
977
+ command.params['name'] = name unless name.nil?
978
+ command.params['type'] = type unless type.nil?
979
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
980
+ command.query['fields'] = fields unless fields.nil?
981
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
982
+ execute_or_queue_command(command, &block)
983
+ end
984
+
985
+ # Apply a partial update to an existing ResourceRecordSet.
986
+ # @param [String] project
987
+ # Identifies the project addressed by this request.
988
+ # @param [String] managed_zone
989
+ # Identifies the managed zone addressed by this request. Can be the managed zone
990
+ # name or ID.
991
+ # @param [String] name
992
+ # Fully qualified domain name.
993
+ # @param [String] type
994
+ # RRSet type.
995
+ # @param [Google::Apis::DnsV1beta2::ResourceRecordSet] resource_record_set_object
996
+ # @param [String] client_operation_id
997
+ # For mutating operation requests only. An optional identifier specified by the
998
+ # client. Must be unique for operation resources in the Operations collection.
999
+ # @param [String] fields
1000
+ # Selector specifying which fields to include in a partial response.
1001
+ # @param [String] quota_user
1002
+ # Available to use for quota purposes for server-side applications. Can be any
1003
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1004
+ # @param [Google::Apis::RequestOptions] options
1005
+ # Request-specific options
1006
+ #
1007
+ # @yield [result, err] Result & error if block supplied
1008
+ # @yieldparam result [Google::Apis::DnsV1beta2::ResourceRecordSet] parsed result object
1009
+ # @yieldparam err [StandardError] error object if request failed
1010
+ #
1011
+ # @return [Google::Apis::DnsV1beta2::ResourceRecordSet]
1012
+ #
1013
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1014
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1015
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1016
+ def patch_project_managed_zone_rrset(project, managed_zone, name, type, resource_record_set_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1017
+ command = make_simple_command(:patch, 'dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}', options)
1018
+ command.request_representation = Google::Apis::DnsV1beta2::ResourceRecordSet::Representation
1019
+ command.request_object = resource_record_set_object
1020
+ command.response_representation = Google::Apis::DnsV1beta2::ResourceRecordSet::Representation
1021
+ command.response_class = Google::Apis::DnsV1beta2::ResourceRecordSet
1022
+ command.params['project'] = project unless project.nil?
1023
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
1024
+ command.params['name'] = name unless name.nil?
1025
+ command.params['type'] = type unless type.nil?
1026
+ command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil?
1027
+ command.query['fields'] = fields unless fields.nil?
1028
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1029
+ execute_or_queue_command(command, &block)
1030
+ end
1031
+
1032
+ # Enumerate ResourceRecordSets that have been created but not yet deleted.
1033
+ # @param [String] project
1034
+ # Identifies the project addressed by this request.
1035
+ # @param [String] managed_zone
1036
+ # Identifies the managed zone addressed by this request. Can be the managed zone
1037
+ # name or ID.
1038
+ # @param [Fixnum] max_results
1039
+ # Optional. Maximum number of results to be returned. If unspecified, the server
1040
+ # will decide how many results to return.
1041
+ # @param [String] name
1042
+ # Restricts the list to return only records with this fully qualified domain
1043
+ # name.
1044
+ # @param [String] page_token
1045
+ # Optional. A tag returned by a previous list request that was truncated. Use
1046
+ # this parameter to continue a previous list request.
1047
+ # @param [String] type
1048
+ # Restricts the list to return only records of this type. If present, the "name"
1049
+ # parameter must also be present.
1050
+ # @param [String] fields
1051
+ # Selector specifying which fields to include in a partial response.
1052
+ # @param [String] quota_user
1053
+ # Available to use for quota purposes for server-side applications. Can be any
1054
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1055
+ # @param [Google::Apis::RequestOptions] options
1056
+ # Request-specific options
1057
+ #
1058
+ # @yield [result, err] Result & error if block supplied
1059
+ # @yieldparam result [Google::Apis::DnsV1beta2::ResourceRecordSetsListResponse] parsed result object
1060
+ # @yieldparam err [StandardError] error object if request failed
1061
+ #
1062
+ # @return [Google::Apis::DnsV1beta2::ResourceRecordSetsListResponse]
1063
+ #
1064
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1065
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1066
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1067
+ def list_resource_record_sets(project, managed_zone, max_results: nil, name: nil, page_token: nil, type: nil, fields: nil, quota_user: nil, options: nil, &block)
1068
+ command = make_simple_command(:get, 'dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets', options)
1069
+ command.response_representation = Google::Apis::DnsV1beta2::ResourceRecordSetsListResponse::Representation
1070
+ command.response_class = Google::Apis::DnsV1beta2::ResourceRecordSetsListResponse
1071
+ command.params['project'] = project unless project.nil?
1072
+ command.params['managedZone'] = managed_zone unless managed_zone.nil?
1073
+ command.query['maxResults'] = max_results unless max_results.nil?
1074
+ command.query['name'] = name unless name.nil?
1075
+ command.query['pageToken'] = page_token unless page_token.nil?
1076
+ command.query['type'] = type unless type.nil?
1077
+ command.query['fields'] = fields unless fields.nil?
1078
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1079
+ execute_or_queue_command(command, &block)
1080
+ end
1081
+
1082
+ protected
1083
+
1084
+ def apply_command_defaults(command)
1085
+ command.query['key'] = key unless key.nil?
1086
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1087
+ end
1088
+ end
1089
+ end
1090
+ end
1091
+ end