google-apis-domains_v1alpha2 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,807 @@
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 DomainsV1alpha2
23
+ # Cloud Domains API
24
+ #
25
+ # Enables management and configuration of domain names.
26
+ #
27
+ # @example
28
+ # require 'google/apis/domains_v1alpha2'
29
+ #
30
+ # Domains = Google::Apis::DomainsV1alpha2 # Alias the module
31
+ # service = Domains::CloudDomainsService.new
32
+ #
33
+ # @see https://cloud.google.com/domains/
34
+ class CloudDomainsService < 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://domains.googleapis.com/', '',
47
+ client_name: 'google-apis-domains_v1alpha2',
48
+ client_version: Google::Apis::DomainsV1alpha2::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Gets information about a location.
53
+ # @param [String] name
54
+ # Resource name for the location.
55
+ # @param [String] fields
56
+ # Selector specifying which fields to include in a partial response.
57
+ # @param [String] quota_user
58
+ # Available to use for quota purposes for server-side applications. Can be any
59
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
60
+ # @param [Google::Apis::RequestOptions] options
61
+ # Request-specific options
62
+ #
63
+ # @yield [result, err] Result & error if block supplied
64
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::Location] parsed result object
65
+ # @yieldparam err [StandardError] error object if request failed
66
+ #
67
+ # @return [Google::Apis::DomainsV1alpha2::Location]
68
+ #
69
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
70
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
71
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
72
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
73
+ command = make_simple_command(:get, 'v1alpha2/{+name}', options)
74
+ command.response_representation = Google::Apis::DomainsV1alpha2::Location::Representation
75
+ command.response_class = Google::Apis::DomainsV1alpha2::Location
76
+ command.params['name'] = name unless name.nil?
77
+ command.query['fields'] = fields unless fields.nil?
78
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
79
+ execute_or_queue_command(command, &block)
80
+ end
81
+
82
+ # Lists information about the supported locations for this service.
83
+ # @param [String] name
84
+ # The resource that owns the locations collection, if applicable.
85
+ # @param [String] filter
86
+ # The standard list filter.
87
+ # @param [Fixnum] page_size
88
+ # The standard list page size.
89
+ # @param [String] page_token
90
+ # The standard list page token.
91
+ # @param [String] fields
92
+ # Selector specifying which fields to include in a partial response.
93
+ # @param [String] quota_user
94
+ # Available to use for quota purposes for server-side applications. Can be any
95
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
96
+ # @param [Google::Apis::RequestOptions] options
97
+ # Request-specific options
98
+ #
99
+ # @yield [result, err] Result & error if block supplied
100
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::ListLocationsResponse] parsed result object
101
+ # @yieldparam err [StandardError] error object if request failed
102
+ #
103
+ # @return [Google::Apis::DomainsV1alpha2::ListLocationsResponse]
104
+ #
105
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
106
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
107
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
108
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
109
+ command = make_simple_command(:get, 'v1alpha2/{+name}/locations', options)
110
+ command.response_representation = Google::Apis::DomainsV1alpha2::ListLocationsResponse::Representation
111
+ command.response_class = Google::Apis::DomainsV1alpha2::ListLocationsResponse
112
+ command.params['name'] = name unless name.nil?
113
+ command.query['filter'] = filter unless filter.nil?
114
+ command.query['pageSize'] = page_size unless page_size.nil?
115
+ command.query['pageToken'] = page_token unless page_token.nil?
116
+ command.query['fields'] = fields unless fields.nil?
117
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
118
+ execute_or_queue_command(command, &block)
119
+ end
120
+
121
+ # Gets the latest state of a long-running operation. Clients can use this method
122
+ # to poll the operation result at intervals as recommended by the API service.
123
+ # @param [String] name
124
+ # The name of the operation resource.
125
+ # @param [String] fields
126
+ # Selector specifying which fields to include in a partial response.
127
+ # @param [String] quota_user
128
+ # Available to use for quota purposes for server-side applications. Can be any
129
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
130
+ # @param [Google::Apis::RequestOptions] options
131
+ # Request-specific options
132
+ #
133
+ # @yield [result, err] Result & error if block supplied
134
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::Operation] parsed result object
135
+ # @yieldparam err [StandardError] error object if request failed
136
+ #
137
+ # @return [Google::Apis::DomainsV1alpha2::Operation]
138
+ #
139
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
140
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
141
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
142
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
143
+ command = make_simple_command(:get, 'v1alpha2/{+name}', options)
144
+ command.response_representation = Google::Apis::DomainsV1alpha2::Operation::Representation
145
+ command.response_class = Google::Apis::DomainsV1alpha2::Operation
146
+ command.params['name'] = name unless name.nil?
147
+ command.query['fields'] = fields unless fields.nil?
148
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
149
+ execute_or_queue_command(command, &block)
150
+ end
151
+
152
+ # Lists operations that match the specified filter in the request. If the server
153
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
154
+ # binding allows API services to override the binding to use different resource
155
+ # name schemes, such as `users/*/operations`. To override the binding, API
156
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
157
+ # service configuration. For backwards compatibility, the default name includes
158
+ # the operations collection id, however overriding users must ensure the name
159
+ # binding is the parent resource, without the operations collection id.
160
+ # @param [String] name
161
+ # The name of the operation's parent resource.
162
+ # @param [String] filter
163
+ # The standard list filter.
164
+ # @param [Fixnum] page_size
165
+ # The standard list page size.
166
+ # @param [String] page_token
167
+ # The standard list page token.
168
+ # @param [String] fields
169
+ # Selector specifying which fields to include in a partial response.
170
+ # @param [String] quota_user
171
+ # Available to use for quota purposes for server-side applications. Can be any
172
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
173
+ # @param [Google::Apis::RequestOptions] options
174
+ # Request-specific options
175
+ #
176
+ # @yield [result, err] Result & error if block supplied
177
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::ListOperationsResponse] parsed result object
178
+ # @yieldparam err [StandardError] error object if request failed
179
+ #
180
+ # @return [Google::Apis::DomainsV1alpha2::ListOperationsResponse]
181
+ #
182
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
183
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
184
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
185
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
186
+ command = make_simple_command(:get, 'v1alpha2/{+name}/operations', options)
187
+ command.response_representation = Google::Apis::DomainsV1alpha2::ListOperationsResponse::Representation
188
+ command.response_class = Google::Apis::DomainsV1alpha2::ListOperationsResponse
189
+ command.params['name'] = name unless name.nil?
190
+ command.query['filter'] = filter unless filter.nil?
191
+ command.query['pageSize'] = page_size unless page_size.nil?
192
+ command.query['pageToken'] = page_token unless page_token.nil?
193
+ command.query['fields'] = fields unless fields.nil?
194
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
195
+ execute_or_queue_command(command, &block)
196
+ end
197
+
198
+ # Updates a `Registration`'s contact settings. Some changes require confirmation
199
+ # by the domain's registrant contact .
200
+ # @param [String] registration
201
+ # Required. The name of the `Registration` whose contact settings are being
202
+ # updated, in the format `projects/*/locations/*/registrations/*`.
203
+ # @param [Google::Apis::DomainsV1alpha2::ConfigureContactSettingsRequest] configure_contact_settings_request_object
204
+ # @param [String] fields
205
+ # Selector specifying which fields to include in a partial response.
206
+ # @param [String] quota_user
207
+ # Available to use for quota purposes for server-side applications. Can be any
208
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
209
+ # @param [Google::Apis::RequestOptions] options
210
+ # Request-specific options
211
+ #
212
+ # @yield [result, err] Result & error if block supplied
213
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::Operation] parsed result object
214
+ # @yieldparam err [StandardError] error object if request failed
215
+ #
216
+ # @return [Google::Apis::DomainsV1alpha2::Operation]
217
+ #
218
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
219
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
220
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
221
+ def configure_registration_contact_settings(registration, configure_contact_settings_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
222
+ command = make_simple_command(:post, 'v1alpha2/{+registration}:configureContactSettings', options)
223
+ command.request_representation = Google::Apis::DomainsV1alpha2::ConfigureContactSettingsRequest::Representation
224
+ command.request_object = configure_contact_settings_request_object
225
+ command.response_representation = Google::Apis::DomainsV1alpha2::Operation::Representation
226
+ command.response_class = Google::Apis::DomainsV1alpha2::Operation
227
+ command.params['registration'] = registration unless registration.nil?
228
+ command.query['fields'] = fields unless fields.nil?
229
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
230
+ execute_or_queue_command(command, &block)
231
+ end
232
+
233
+ # Updates a `Registration`'s DNS settings.
234
+ # @param [String] registration
235
+ # Required. The name of the `Registration` whose DNS settings are being updated,
236
+ # in the format `projects/*/locations/*/registrations/*`.
237
+ # @param [Google::Apis::DomainsV1alpha2::ConfigureDnsSettingsRequest] configure_dns_settings_request_object
238
+ # @param [String] fields
239
+ # Selector specifying which fields to include in a partial response.
240
+ # @param [String] quota_user
241
+ # Available to use for quota purposes for server-side applications. Can be any
242
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
243
+ # @param [Google::Apis::RequestOptions] options
244
+ # Request-specific options
245
+ #
246
+ # @yield [result, err] Result & error if block supplied
247
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::Operation] parsed result object
248
+ # @yieldparam err [StandardError] error object if request failed
249
+ #
250
+ # @return [Google::Apis::DomainsV1alpha2::Operation]
251
+ #
252
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
253
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
254
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
255
+ def configure_registration_dns_settings(registration, configure_dns_settings_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
256
+ command = make_simple_command(:post, 'v1alpha2/{+registration}:configureDnsSettings', options)
257
+ command.request_representation = Google::Apis::DomainsV1alpha2::ConfigureDnsSettingsRequest::Representation
258
+ command.request_object = configure_dns_settings_request_object
259
+ command.response_representation = Google::Apis::DomainsV1alpha2::Operation::Representation
260
+ command.response_class = Google::Apis::DomainsV1alpha2::Operation
261
+ command.params['registration'] = registration unless registration.nil?
262
+ command.query['fields'] = fields unless fields.nil?
263
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
264
+ execute_or_queue_command(command, &block)
265
+ end
266
+
267
+ # Updates a `Registration`'s management settings.
268
+ # @param [String] registration
269
+ # Required. The name of the `Registration` whose management settings are being
270
+ # updated, in the format `projects/*/locations/*/registrations/*`.
271
+ # @param [Google::Apis::DomainsV1alpha2::ConfigureManagementSettingsRequest] configure_management_settings_request_object
272
+ # @param [String] fields
273
+ # Selector specifying which fields to include in a partial response.
274
+ # @param [String] quota_user
275
+ # Available to use for quota purposes for server-side applications. Can be any
276
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
277
+ # @param [Google::Apis::RequestOptions] options
278
+ # Request-specific options
279
+ #
280
+ # @yield [result, err] Result & error if block supplied
281
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::Operation] parsed result object
282
+ # @yieldparam err [StandardError] error object if request failed
283
+ #
284
+ # @return [Google::Apis::DomainsV1alpha2::Operation]
285
+ #
286
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
287
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
288
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
289
+ def configure_registration_management_settings(registration, configure_management_settings_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
290
+ command = make_simple_command(:post, 'v1alpha2/{+registration}:configureManagementSettings', options)
291
+ command.request_representation = Google::Apis::DomainsV1alpha2::ConfigureManagementSettingsRequest::Representation
292
+ command.request_object = configure_management_settings_request_object
293
+ command.response_representation = Google::Apis::DomainsV1alpha2::Operation::Representation
294
+ command.response_class = Google::Apis::DomainsV1alpha2::Operation
295
+ command.params['registration'] = registration unless registration.nil?
296
+ command.query['fields'] = fields unless fields.nil?
297
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
298
+ execute_or_queue_command(command, &block)
299
+ end
300
+
301
+ # Deletes a `Registration` resource. This method only works on resources in one
302
+ # of the following states: * `state` is `EXPORTED` with `expire_time` in the
303
+ # past * `state` is `REGISTRATION_FAILED`
304
+ # @param [String] name
305
+ # Required. The name of the `Registration` to delete, in the format `projects/*/
306
+ # locations/*/registrations/*`.
307
+ # @param [String] fields
308
+ # Selector specifying which fields to include in a partial response.
309
+ # @param [String] quota_user
310
+ # Available to use for quota purposes for server-side applications. Can be any
311
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
312
+ # @param [Google::Apis::RequestOptions] options
313
+ # Request-specific options
314
+ #
315
+ # @yield [result, err] Result & error if block supplied
316
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::Operation] parsed result object
317
+ # @yieldparam err [StandardError] error object if request failed
318
+ #
319
+ # @return [Google::Apis::DomainsV1alpha2::Operation]
320
+ #
321
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
322
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
323
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
324
+ def delete_project_location_registration(name, fields: nil, quota_user: nil, options: nil, &block)
325
+ command = make_simple_command(:delete, 'v1alpha2/{+name}', options)
326
+ command.response_representation = Google::Apis::DomainsV1alpha2::Operation::Representation
327
+ command.response_class = Google::Apis::DomainsV1alpha2::Operation
328
+ command.params['name'] = name unless name.nil?
329
+ command.query['fields'] = fields unless fields.nil?
330
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
331
+ execute_or_queue_command(command, &block)
332
+ end
333
+
334
+ # Exports a `Registration` that you no longer want to use with Cloud Domains.
335
+ # You can continue to use the domain in [Google Domains](https://domains.google/)
336
+ # until it expires. If the export is successful: * The resource's `state`
337
+ # becomes `EXPORTED`, meaning that it is no longer managed by Cloud Domains *
338
+ # Because individual users can own domains in Google Domains, the calling user
339
+ # becomes the domain's sole owner. Permissions for the domain are subsequently
340
+ # managed in Google Domains. * Without further action, the domain does not renew
341
+ # automatically. The new owner can set up billing in Google Domains to renew the
342
+ # domain if needed.
343
+ # @param [String] name
344
+ # Required. The name of the `Registration` to export, in the format `projects/*/
345
+ # locations/*/registrations/*`.
346
+ # @param [Google::Apis::DomainsV1alpha2::ExportRegistrationRequest] export_registration_request_object
347
+ # @param [String] fields
348
+ # Selector specifying which fields to include in a partial response.
349
+ # @param [String] quota_user
350
+ # Available to use for quota purposes for server-side applications. Can be any
351
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
352
+ # @param [Google::Apis::RequestOptions] options
353
+ # Request-specific options
354
+ #
355
+ # @yield [result, err] Result & error if block supplied
356
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::Operation] parsed result object
357
+ # @yieldparam err [StandardError] error object if request failed
358
+ #
359
+ # @return [Google::Apis::DomainsV1alpha2::Operation]
360
+ #
361
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
362
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
363
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
364
+ def export_registration(name, export_registration_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
365
+ command = make_simple_command(:post, 'v1alpha2/{+name}:export', options)
366
+ command.request_representation = Google::Apis::DomainsV1alpha2::ExportRegistrationRequest::Representation
367
+ command.request_object = export_registration_request_object
368
+ command.response_representation = Google::Apis::DomainsV1alpha2::Operation::Representation
369
+ command.response_class = Google::Apis::DomainsV1alpha2::Operation
370
+ command.params['name'] = name unless name.nil?
371
+ command.query['fields'] = fields unless fields.nil?
372
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
373
+ execute_or_queue_command(command, &block)
374
+ end
375
+
376
+ # Gets the details of a `Registration` resource.
377
+ # @param [String] name
378
+ # Required. The name of the `Registration` to get, in the format `projects/*/
379
+ # locations/*/registrations/*`.
380
+ # @param [String] fields
381
+ # Selector specifying which fields to include in a partial response.
382
+ # @param [String] quota_user
383
+ # Available to use for quota purposes for server-side applications. Can be any
384
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
385
+ # @param [Google::Apis::RequestOptions] options
386
+ # Request-specific options
387
+ #
388
+ # @yield [result, err] Result & error if block supplied
389
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::Registration] parsed result object
390
+ # @yieldparam err [StandardError] error object if request failed
391
+ #
392
+ # @return [Google::Apis::DomainsV1alpha2::Registration]
393
+ #
394
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
395
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
396
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
397
+ def get_project_location_registration(name, fields: nil, quota_user: nil, options: nil, &block)
398
+ command = make_simple_command(:get, 'v1alpha2/{+name}', options)
399
+ command.response_representation = Google::Apis::DomainsV1alpha2::Registration::Representation
400
+ command.response_class = Google::Apis::DomainsV1alpha2::Registration
401
+ command.params['name'] = name unless name.nil?
402
+ command.query['fields'] = fields unless fields.nil?
403
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
404
+ execute_or_queue_command(command, &block)
405
+ end
406
+
407
+ # Gets the access control policy for a resource. Returns an empty policy if the
408
+ # resource exists and does not have a policy set.
409
+ # @param [String] resource
410
+ # REQUIRED: The resource for which the policy is being requested. See the
411
+ # operation documentation for the appropriate value for this field.
412
+ # @param [Fixnum] options_requested_policy_version
413
+ # Optional. The policy format version to be returned. Valid values are 0, 1, and
414
+ # 3. Requests specifying an invalid value will be rejected. Requests for
415
+ # policies with any conditional bindings must specify version 3. Policies
416
+ # without any conditional bindings may specify any valid value or leave the
417
+ # field unset. To learn which resources support conditions in their IAM policies,
418
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
419
+ # resource-policies).
420
+ # @param [String] fields
421
+ # Selector specifying which fields to include in a partial response.
422
+ # @param [String] quota_user
423
+ # Available to use for quota purposes for server-side applications. Can be any
424
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
425
+ # @param [Google::Apis::RequestOptions] options
426
+ # Request-specific options
427
+ #
428
+ # @yield [result, err] Result & error if block supplied
429
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::Policy] parsed result object
430
+ # @yieldparam err [StandardError] error object if request failed
431
+ #
432
+ # @return [Google::Apis::DomainsV1alpha2::Policy]
433
+ #
434
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
435
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
436
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
437
+ def get_project_location_registration_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
438
+ command = make_simple_command(:get, 'v1alpha2/{+resource}:getIamPolicy', options)
439
+ command.response_representation = Google::Apis::DomainsV1alpha2::Policy::Representation
440
+ command.response_class = Google::Apis::DomainsV1alpha2::Policy
441
+ command.params['resource'] = resource unless resource.nil?
442
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
443
+ command.query['fields'] = fields unless fields.nil?
444
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
445
+ execute_or_queue_command(command, &block)
446
+ end
447
+
448
+ # Lists the `Registration` resources in a project.
449
+ # @param [String] parent
450
+ # Required. The project and location from which to list `Registration`s,
451
+ # specified in the format `projects/*/locations/*`.
452
+ # @param [String] filter
453
+ # Filter expression to restrict the `Registration`s returned. The expression
454
+ # must specify the field name, a comparison operator, and the value that you
455
+ # want to use for filtering. The value must be a string, a number, a boolean, or
456
+ # an enum value. The comparison operator should be one of =, !=, >, <, >=, <=,
457
+ # or : for prefix or wildcard matches. For example, to filter to a specific
458
+ # domain name, use an expression like `domainName="example.com"`. You can also
459
+ # check for the existence of a field; for example, to find domains using custom
460
+ # DNS settings, use an expression like `dnsSettings.customDns:*`. You can also
461
+ # create compound filters by combining expressions with the `AND` and `OR`
462
+ # operators. For example, to find domains that are suspended or have specific
463
+ # issues flagged, use an expression like `(state=SUSPENDED) OR (issue:*)`.
464
+ # @param [Fixnum] page_size
465
+ # Maximum number of results to return.
466
+ # @param [String] page_token
467
+ # When set to the `next_page_token` from a prior response, provides the next
468
+ # page of results.
469
+ # @param [String] fields
470
+ # Selector specifying which fields to include in a partial response.
471
+ # @param [String] quota_user
472
+ # Available to use for quota purposes for server-side applications. Can be any
473
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
474
+ # @param [Google::Apis::RequestOptions] options
475
+ # Request-specific options
476
+ #
477
+ # @yield [result, err] Result & error if block supplied
478
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::ListRegistrationsResponse] parsed result object
479
+ # @yieldparam err [StandardError] error object if request failed
480
+ #
481
+ # @return [Google::Apis::DomainsV1alpha2::ListRegistrationsResponse]
482
+ #
483
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
484
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
485
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
486
+ def list_project_location_registrations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
487
+ command = make_simple_command(:get, 'v1alpha2/{+parent}/registrations', options)
488
+ command.response_representation = Google::Apis::DomainsV1alpha2::ListRegistrationsResponse::Representation
489
+ command.response_class = Google::Apis::DomainsV1alpha2::ListRegistrationsResponse
490
+ command.params['parent'] = parent unless parent.nil?
491
+ command.query['filter'] = filter unless filter.nil?
492
+ command.query['pageSize'] = page_size unless page_size.nil?
493
+ command.query['pageToken'] = page_token unless page_token.nil?
494
+ command.query['fields'] = fields unless fields.nil?
495
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
496
+ execute_or_queue_command(command, &block)
497
+ end
498
+
499
+ # Updates select fields of a `Registration` resource, notably `labels`. To
500
+ # update other fields, use the appropriate custom update method: * To update
501
+ # management settings, see `ConfigureManagementSettings` * To update DNS
502
+ # configuration, see `ConfigureDnsSettings` * To update contact information, see
503
+ # `ConfigureContactSettings`
504
+ # @param [String] name
505
+ # Output only. Name of the `Registration` resource, in the format `projects/*/
506
+ # locations/*/registrations/`.
507
+ # @param [Google::Apis::DomainsV1alpha2::Registration] registration_object
508
+ # @param [String] update_mask
509
+ # Required. The field mask describing which fields to update as a comma-
510
+ # separated list. For example, if only the labels are being updated, the `
511
+ # update_mask` would be `"labels"`.
512
+ # @param [String] fields
513
+ # Selector specifying which fields to include in a partial response.
514
+ # @param [String] quota_user
515
+ # Available to use for quota purposes for server-side applications. Can be any
516
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
517
+ # @param [Google::Apis::RequestOptions] options
518
+ # Request-specific options
519
+ #
520
+ # @yield [result, err] Result & error if block supplied
521
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::Operation] parsed result object
522
+ # @yieldparam err [StandardError] error object if request failed
523
+ #
524
+ # @return [Google::Apis::DomainsV1alpha2::Operation]
525
+ #
526
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
527
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
528
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
529
+ def patch_project_location_registration(name, registration_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
530
+ command = make_simple_command(:patch, 'v1alpha2/{+name}', options)
531
+ command.request_representation = Google::Apis::DomainsV1alpha2::Registration::Representation
532
+ command.request_object = registration_object
533
+ command.response_representation = Google::Apis::DomainsV1alpha2::Operation::Representation
534
+ command.response_class = Google::Apis::DomainsV1alpha2::Operation
535
+ command.params['name'] = name unless name.nil?
536
+ command.query['updateMask'] = update_mask unless update_mask.nil?
537
+ command.query['fields'] = fields unless fields.nil?
538
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
539
+ execute_or_queue_command(command, &block)
540
+ end
541
+
542
+ # Registers a new domain name and creates a corresponding `Registration`
543
+ # resource. Call `RetrieveRegisterParameters` first to check availability of the
544
+ # domain name and determine parameters like price that are needed to build a
545
+ # call to this method. A successful call creates a `Registration` resource in
546
+ # state `REGISTRATION_PENDING`, which resolves to `ACTIVE` within 1-2 minutes,
547
+ # indicating that the domain was successfully registered. If the resource ends
548
+ # up in state `REGISTRATION_FAILED`, it indicates that the domain was not
549
+ # registered successfully, and you can safely delete the resource and retry
550
+ # registration.
551
+ # @param [String] parent
552
+ # Required. The parent resource of the `Registration`. Must be in the format `
553
+ # projects/*/locations/*`.
554
+ # @param [Google::Apis::DomainsV1alpha2::RegisterDomainRequest] register_domain_request_object
555
+ # @param [String] fields
556
+ # Selector specifying which fields to include in a partial response.
557
+ # @param [String] quota_user
558
+ # Available to use for quota purposes for server-side applications. Can be any
559
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
560
+ # @param [Google::Apis::RequestOptions] options
561
+ # Request-specific options
562
+ #
563
+ # @yield [result, err] Result & error if block supplied
564
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::Operation] parsed result object
565
+ # @yieldparam err [StandardError] error object if request failed
566
+ #
567
+ # @return [Google::Apis::DomainsV1alpha2::Operation]
568
+ #
569
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
570
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
571
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
572
+ def register_registration_domain(parent, register_domain_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
573
+ command = make_simple_command(:post, 'v1alpha2/{+parent}/registrations:register', options)
574
+ command.request_representation = Google::Apis::DomainsV1alpha2::RegisterDomainRequest::Representation
575
+ command.request_object = register_domain_request_object
576
+ command.response_representation = Google::Apis::DomainsV1alpha2::Operation::Representation
577
+ command.response_class = Google::Apis::DomainsV1alpha2::Operation
578
+ command.params['parent'] = parent unless parent.nil?
579
+ command.query['fields'] = fields unless fields.nil?
580
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
581
+ execute_or_queue_command(command, &block)
582
+ end
583
+
584
+ # Resets the authorization code of the `Registration` to a new random string.
585
+ # You can call this method only after 60 days have elapsed since the initial
586
+ # domain registration.
587
+ # @param [String] registration
588
+ # Required. The name of the `Registration` whose authorization code is being
589
+ # reset, in the format `projects/*/locations/*/registrations/*`.
590
+ # @param [Google::Apis::DomainsV1alpha2::ResetAuthorizationCodeRequest] reset_authorization_code_request_object
591
+ # @param [String] fields
592
+ # Selector specifying which fields to include in a partial response.
593
+ # @param [String] quota_user
594
+ # Available to use for quota purposes for server-side applications. Can be any
595
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
596
+ # @param [Google::Apis::RequestOptions] options
597
+ # Request-specific options
598
+ #
599
+ # @yield [result, err] Result & error if block supplied
600
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::AuthorizationCode] parsed result object
601
+ # @yieldparam err [StandardError] error object if request failed
602
+ #
603
+ # @return [Google::Apis::DomainsV1alpha2::AuthorizationCode]
604
+ #
605
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
606
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
607
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
608
+ def reset_registration_authorization_code(registration, reset_authorization_code_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
609
+ command = make_simple_command(:post, 'v1alpha2/{+registration}:resetAuthorizationCode', options)
610
+ command.request_representation = Google::Apis::DomainsV1alpha2::ResetAuthorizationCodeRequest::Representation
611
+ command.request_object = reset_authorization_code_request_object
612
+ command.response_representation = Google::Apis::DomainsV1alpha2::AuthorizationCode::Representation
613
+ command.response_class = Google::Apis::DomainsV1alpha2::AuthorizationCode
614
+ command.params['registration'] = registration unless registration.nil?
615
+ command.query['fields'] = fields unless fields.nil?
616
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
617
+ execute_or_queue_command(command, &block)
618
+ end
619
+
620
+ # Gets the authorization code of the `Registration` for the purpose of
621
+ # transferring the domain to another registrar. You can call this method only
622
+ # after 60 days have elapsed since the initial domain registration.
623
+ # @param [String] registration
624
+ # Required. The name of the `Registration` whose authorization code is being
625
+ # retrieved, in the format `projects/*/locations/*/registrations/*`.
626
+ # @param [String] fields
627
+ # Selector specifying which fields to include in a partial response.
628
+ # @param [String] quota_user
629
+ # Available to use for quota purposes for server-side applications. Can be any
630
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
631
+ # @param [Google::Apis::RequestOptions] options
632
+ # Request-specific options
633
+ #
634
+ # @yield [result, err] Result & error if block supplied
635
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::AuthorizationCode] parsed result object
636
+ # @yieldparam err [StandardError] error object if request failed
637
+ #
638
+ # @return [Google::Apis::DomainsV1alpha2::AuthorizationCode]
639
+ #
640
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
641
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
642
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
643
+ def retrieve_project_location_registration_authorization_code(registration, fields: nil, quota_user: nil, options: nil, &block)
644
+ command = make_simple_command(:get, 'v1alpha2/{+registration}:retrieveAuthorizationCode', options)
645
+ command.response_representation = Google::Apis::DomainsV1alpha2::AuthorizationCode::Representation
646
+ command.response_class = Google::Apis::DomainsV1alpha2::AuthorizationCode
647
+ command.params['registration'] = registration unless registration.nil?
648
+ command.query['fields'] = fields unless fields.nil?
649
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
650
+ execute_or_queue_command(command, &block)
651
+ end
652
+
653
+ # Gets parameters needed to register a new domain name, including price and up-
654
+ # to-date availability. Use the returned values to call `RegisterDomain`.
655
+ # @param [String] location
656
+ # Required. The location. Must be in the format `projects/*/locations/*`.
657
+ # @param [String] domain_name
658
+ # Required. The domain name. Unicode domain names must be expressed in Punycode
659
+ # format.
660
+ # @param [String] fields
661
+ # Selector specifying which fields to include in a partial response.
662
+ # @param [String] quota_user
663
+ # Available to use for quota purposes for server-side applications. Can be any
664
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
665
+ # @param [Google::Apis::RequestOptions] options
666
+ # Request-specific options
667
+ #
668
+ # @yield [result, err] Result & error if block supplied
669
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::RetrieveRegisterParametersResponse] parsed result object
670
+ # @yieldparam err [StandardError] error object if request failed
671
+ #
672
+ # @return [Google::Apis::DomainsV1alpha2::RetrieveRegisterParametersResponse]
673
+ #
674
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
675
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
676
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
677
+ def retrieve_project_location_registration_register_parameters(location, domain_name: nil, fields: nil, quota_user: nil, options: nil, &block)
678
+ command = make_simple_command(:get, 'v1alpha2/{+location}/registrations:retrieveRegisterParameters', options)
679
+ command.response_representation = Google::Apis::DomainsV1alpha2::RetrieveRegisterParametersResponse::Representation
680
+ command.response_class = Google::Apis::DomainsV1alpha2::RetrieveRegisterParametersResponse
681
+ command.params['location'] = location unless location.nil?
682
+ command.query['domainName'] = domain_name unless domain_name.nil?
683
+ command.query['fields'] = fields unless fields.nil?
684
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
685
+ execute_or_queue_command(command, &block)
686
+ end
687
+
688
+ # Searches for available domain names similar to the provided query.
689
+ # Availability results from this method are approximate; call `
690
+ # RetrieveRegisterParameters` on a domain before registering to confirm
691
+ # availability.
692
+ # @param [String] location
693
+ # Required. The location. Must be in the format `projects/*/locations/*`.
694
+ # @param [String] query
695
+ # Required. String used to search for available domain names.
696
+ # @param [String] fields
697
+ # Selector specifying which fields to include in a partial response.
698
+ # @param [String] quota_user
699
+ # Available to use for quota purposes for server-side applications. Can be any
700
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
701
+ # @param [Google::Apis::RequestOptions] options
702
+ # Request-specific options
703
+ #
704
+ # @yield [result, err] Result & error if block supplied
705
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::SearchDomainsResponse] parsed result object
706
+ # @yieldparam err [StandardError] error object if request failed
707
+ #
708
+ # @return [Google::Apis::DomainsV1alpha2::SearchDomainsResponse]
709
+ #
710
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
711
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
712
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
713
+ def search_project_location_registration_domains(location, query: nil, fields: nil, quota_user: nil, options: nil, &block)
714
+ command = make_simple_command(:get, 'v1alpha2/{+location}/registrations:searchDomains', options)
715
+ command.response_representation = Google::Apis::DomainsV1alpha2::SearchDomainsResponse::Representation
716
+ command.response_class = Google::Apis::DomainsV1alpha2::SearchDomainsResponse
717
+ command.params['location'] = location unless location.nil?
718
+ command.query['query'] = query unless query.nil?
719
+ command.query['fields'] = fields unless fields.nil?
720
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
721
+ execute_or_queue_command(command, &block)
722
+ end
723
+
724
+ # Sets the access control policy on the specified resource. Replaces any
725
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
726
+ # PERMISSION_DENIED` errors.
727
+ # @param [String] resource
728
+ # REQUIRED: The resource for which the policy is being specified. See the
729
+ # operation documentation for the appropriate value for this field.
730
+ # @param [Google::Apis::DomainsV1alpha2::SetIamPolicyRequest] set_iam_policy_request_object
731
+ # @param [String] fields
732
+ # Selector specifying which fields to include in a partial response.
733
+ # @param [String] quota_user
734
+ # Available to use for quota purposes for server-side applications. Can be any
735
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
736
+ # @param [Google::Apis::RequestOptions] options
737
+ # Request-specific options
738
+ #
739
+ # @yield [result, err] Result & error if block supplied
740
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::Policy] parsed result object
741
+ # @yieldparam err [StandardError] error object if request failed
742
+ #
743
+ # @return [Google::Apis::DomainsV1alpha2::Policy]
744
+ #
745
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
746
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
747
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
748
+ def set_registration_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
749
+ command = make_simple_command(:post, 'v1alpha2/{+resource}:setIamPolicy', options)
750
+ command.request_representation = Google::Apis::DomainsV1alpha2::SetIamPolicyRequest::Representation
751
+ command.request_object = set_iam_policy_request_object
752
+ command.response_representation = Google::Apis::DomainsV1alpha2::Policy::Representation
753
+ command.response_class = Google::Apis::DomainsV1alpha2::Policy
754
+ command.params['resource'] = resource unless resource.nil?
755
+ command.query['fields'] = fields unless fields.nil?
756
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
757
+ execute_or_queue_command(command, &block)
758
+ end
759
+
760
+ # Returns permissions that a caller has on the specified resource. If the
761
+ # resource does not exist, this will return an empty set of permissions, not a `
762
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
763
+ # permission-aware UIs and command-line tools, not for authorization checking.
764
+ # This operation may "fail open" without warning.
765
+ # @param [String] resource
766
+ # REQUIRED: The resource for which the policy detail is being requested. See the
767
+ # operation documentation for the appropriate value for this field.
768
+ # @param [Google::Apis::DomainsV1alpha2::TestIamPermissionsRequest] test_iam_permissions_request_object
769
+ # @param [String] fields
770
+ # Selector specifying which fields to include in a partial response.
771
+ # @param [String] quota_user
772
+ # Available to use for quota purposes for server-side applications. Can be any
773
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
774
+ # @param [Google::Apis::RequestOptions] options
775
+ # Request-specific options
776
+ #
777
+ # @yield [result, err] Result & error if block supplied
778
+ # @yieldparam result [Google::Apis::DomainsV1alpha2::TestIamPermissionsResponse] parsed result object
779
+ # @yieldparam err [StandardError] error object if request failed
780
+ #
781
+ # @return [Google::Apis::DomainsV1alpha2::TestIamPermissionsResponse]
782
+ #
783
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
784
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
785
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
786
+ def test_registration_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
787
+ command = make_simple_command(:post, 'v1alpha2/{+resource}:testIamPermissions', options)
788
+ command.request_representation = Google::Apis::DomainsV1alpha2::TestIamPermissionsRequest::Representation
789
+ command.request_object = test_iam_permissions_request_object
790
+ command.response_representation = Google::Apis::DomainsV1alpha2::TestIamPermissionsResponse::Representation
791
+ command.response_class = Google::Apis::DomainsV1alpha2::TestIamPermissionsResponse
792
+ command.params['resource'] = resource unless resource.nil?
793
+ command.query['fields'] = fields unless fields.nil?
794
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
795
+ execute_or_queue_command(command, &block)
796
+ end
797
+
798
+ protected
799
+
800
+ def apply_command_defaults(command)
801
+ command.query['key'] = key unless key.nil?
802
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
803
+ end
804
+ end
805
+ end
806
+ end
807
+ end