google-apis-memcache_v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,547 @@
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 MemcacheV1
23
+ # Cloud Memorystore for Memcached API
24
+ #
25
+ # Google Cloud Memorystore for Memcached API is used for creating and managing
26
+ # Memcached instances in GCP.
27
+ #
28
+ # @example
29
+ # require 'google/apis/memcache_v1'
30
+ #
31
+ # Memcache = Google::Apis::MemcacheV1 # Alias the module
32
+ # service = Memcache::CloudMemorystoreforMemcachedService.new
33
+ #
34
+ # @see https://cloud.google.com/memorystore/
35
+ class CloudMemorystoreforMemcachedService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://memcache.googleapis.com/', '',
48
+ client_name: 'google-apis-memcache_v1',
49
+ client_version: Google::Apis::MemcacheV1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Gets information about a location.
54
+ # @param [String] name
55
+ # Resource name for the location.
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::MemcacheV1::Location] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::MemcacheV1::Location]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:get, 'v1/{+name}', options)
75
+ command.response_representation = Google::Apis::MemcacheV1::Location::Representation
76
+ command.response_class = Google::Apis::MemcacheV1::Location
77
+ command.params['name'] = name unless name.nil?
78
+ command.query['fields'] = fields unless fields.nil?
79
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
80
+ execute_or_queue_command(command, &block)
81
+ end
82
+
83
+ # Lists information about the supported locations for this service.
84
+ # @param [String] name
85
+ # The resource that owns the locations collection, if applicable.
86
+ # @param [String] filter
87
+ # The standard list filter.
88
+ # @param [Fixnum] page_size
89
+ # The standard list page size.
90
+ # @param [String] page_token
91
+ # The standard list page token.
92
+ # @param [String] fields
93
+ # Selector specifying which fields to include in a partial response.
94
+ # @param [String] quota_user
95
+ # Available to use for quota purposes for server-side applications. Can be any
96
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
97
+ # @param [Google::Apis::RequestOptions] options
98
+ # Request-specific options
99
+ #
100
+ # @yield [result, err] Result & error if block supplied
101
+ # @yieldparam result [Google::Apis::MemcacheV1::ListLocationsResponse] parsed result object
102
+ # @yieldparam err [StandardError] error object if request failed
103
+ #
104
+ # @return [Google::Apis::MemcacheV1::ListLocationsResponse]
105
+ #
106
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
107
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
108
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
109
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
110
+ command = make_simple_command(:get, 'v1/{+name}/locations', options)
111
+ command.response_representation = Google::Apis::MemcacheV1::ListLocationsResponse::Representation
112
+ command.response_class = Google::Apis::MemcacheV1::ListLocationsResponse
113
+ command.params['name'] = name unless name.nil?
114
+ command.query['filter'] = filter unless filter.nil?
115
+ command.query['pageSize'] = page_size unless page_size.nil?
116
+ command.query['pageToken'] = page_token unless page_token.nil?
117
+ command.query['fields'] = fields unless fields.nil?
118
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
119
+ execute_or_queue_command(command, &block)
120
+ end
121
+
122
+ # ApplyParameters will restart the set of specified nodes in order to update
123
+ # them to the current set of parameters for the Memcached Instance.
124
+ # @param [String] name
125
+ # Required. Resource name of the Memcached instance for which parameter group
126
+ # updates should be applied.
127
+ # @param [Google::Apis::MemcacheV1::ApplyParametersRequest] apply_parameters_request_object
128
+ # @param [String] fields
129
+ # Selector specifying which fields to include in a partial response.
130
+ # @param [String] quota_user
131
+ # Available to use for quota purposes for server-side applications. Can be any
132
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
133
+ # @param [Google::Apis::RequestOptions] options
134
+ # Request-specific options
135
+ #
136
+ # @yield [result, err] Result & error if block supplied
137
+ # @yieldparam result [Google::Apis::MemcacheV1::Operation] parsed result object
138
+ # @yieldparam err [StandardError] error object if request failed
139
+ #
140
+ # @return [Google::Apis::MemcacheV1::Operation]
141
+ #
142
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
143
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
144
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
145
+ def apply_instance_parameters(name, apply_parameters_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
146
+ command = make_simple_command(:post, 'v1/{+name}:applyParameters', options)
147
+ command.request_representation = Google::Apis::MemcacheV1::ApplyParametersRequest::Representation
148
+ command.request_object = apply_parameters_request_object
149
+ command.response_representation = Google::Apis::MemcacheV1::Operation::Representation
150
+ command.response_class = Google::Apis::MemcacheV1::Operation
151
+ command.params['name'] = name unless name.nil?
152
+ command.query['fields'] = fields unless fields.nil?
153
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
154
+ execute_or_queue_command(command, &block)
155
+ end
156
+
157
+ # Creates a new Instance in a given location.
158
+ # @param [String] parent
159
+ # Required. The resource name of the instance location using the form: `projects/
160
+ # `project_id`/locations/`location_id`` where `location_id` refers to a GCP
161
+ # region
162
+ # @param [Google::Apis::MemcacheV1::Instance] instance_object
163
+ # @param [String] instance_id
164
+ # Required. The logical name of the Memcached instance in the user project with
165
+ # the following restrictions: * Must contain only lowercase letters, numbers,
166
+ # and hyphens. * Must start with a letter. * Must be between 1-40 characters. *
167
+ # Must end with a number or a letter. * Must be unique within the user project /
168
+ # location If any of the above are not met, will raise an invalid argument error.
169
+ # @param [String] fields
170
+ # Selector specifying which fields to include in a partial response.
171
+ # @param [String] quota_user
172
+ # Available to use for quota purposes for server-side applications. Can be any
173
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
174
+ # @param [Google::Apis::RequestOptions] options
175
+ # Request-specific options
176
+ #
177
+ # @yield [result, err] Result & error if block supplied
178
+ # @yieldparam result [Google::Apis::MemcacheV1::Operation] parsed result object
179
+ # @yieldparam err [StandardError] error object if request failed
180
+ #
181
+ # @return [Google::Apis::MemcacheV1::Operation]
182
+ #
183
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
184
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
185
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
186
+ def create_project_location_instance(parent, instance_object = nil, instance_id: nil, fields: nil, quota_user: nil, options: nil, &block)
187
+ command = make_simple_command(:post, 'v1/{+parent}/instances', options)
188
+ command.request_representation = Google::Apis::MemcacheV1::Instance::Representation
189
+ command.request_object = instance_object
190
+ command.response_representation = Google::Apis::MemcacheV1::Operation::Representation
191
+ command.response_class = Google::Apis::MemcacheV1::Operation
192
+ command.params['parent'] = parent unless parent.nil?
193
+ command.query['instanceId'] = instance_id unless instance_id.nil?
194
+ command.query['fields'] = fields unless fields.nil?
195
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
196
+ execute_or_queue_command(command, &block)
197
+ end
198
+
199
+ # Deletes a single Instance.
200
+ # @param [String] name
201
+ # Required. Memcached instance resource name in the format: `projects/`
202
+ # project_id`/locations/`location_id`/instances/`instance_id`` where `
203
+ # location_id` refers to a GCP region
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::MemcacheV1::Operation] parsed result object
214
+ # @yieldparam err [StandardError] error object if request failed
215
+ #
216
+ # @return [Google::Apis::MemcacheV1::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 delete_project_location_instance(name, fields: nil, quota_user: nil, options: nil, &block)
222
+ command = make_simple_command(:delete, 'v1/{+name}', options)
223
+ command.response_representation = Google::Apis::MemcacheV1::Operation::Representation
224
+ command.response_class = Google::Apis::MemcacheV1::Operation
225
+ command.params['name'] = name unless name.nil?
226
+ command.query['fields'] = fields unless fields.nil?
227
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
228
+ execute_or_queue_command(command, &block)
229
+ end
230
+
231
+ # Gets details of a single Instance.
232
+ # @param [String] name
233
+ # Required. Memcached instance resource name in the format: `projects/`
234
+ # project_id`/locations/`location_id`/instances/`instance_id`` where `
235
+ # location_id` refers to a GCP region
236
+ # @param [String] fields
237
+ # Selector specifying which fields to include in a partial response.
238
+ # @param [String] quota_user
239
+ # Available to use for quota purposes for server-side applications. Can be any
240
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
241
+ # @param [Google::Apis::RequestOptions] options
242
+ # Request-specific options
243
+ #
244
+ # @yield [result, err] Result & error if block supplied
245
+ # @yieldparam result [Google::Apis::MemcacheV1::Instance] parsed result object
246
+ # @yieldparam err [StandardError] error object if request failed
247
+ #
248
+ # @return [Google::Apis::MemcacheV1::Instance]
249
+ #
250
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
251
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
252
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
253
+ def get_project_location_instance(name, fields: nil, quota_user: nil, options: nil, &block)
254
+ command = make_simple_command(:get, 'v1/{+name}', options)
255
+ command.response_representation = Google::Apis::MemcacheV1::Instance::Representation
256
+ command.response_class = Google::Apis::MemcacheV1::Instance
257
+ command.params['name'] = name unless name.nil?
258
+ command.query['fields'] = fields unless fields.nil?
259
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
260
+ execute_or_queue_command(command, &block)
261
+ end
262
+
263
+ # Lists Instances in a given location.
264
+ # @param [String] parent
265
+ # Required. The resource name of the instance location using the form: `projects/
266
+ # `project_id`/locations/`location_id`` where `location_id` refers to a GCP
267
+ # region
268
+ # @param [String] filter
269
+ # List filter. For example, exclude all Memcached instances with name as my-
270
+ # instance by specifying "name != my-instance".
271
+ # @param [String] order_by
272
+ # Sort results. Supported values are "name", "name desc" or "" (unsorted).
273
+ # @param [Fixnum] page_size
274
+ # The maximum number of items to return. If not specified, a default value of
275
+ # 1000 will be used by the service. Regardless of the page_size value, the
276
+ # response may include a partial list and a caller should only rely on response'
277
+ # s next_page_token to determine if there are more instances left to be queried.
278
+ # @param [String] page_token
279
+ # The next_page_token value returned from a previous List request, if any.
280
+ # @param [String] fields
281
+ # Selector specifying which fields to include in a partial response.
282
+ # @param [String] quota_user
283
+ # Available to use for quota purposes for server-side applications. Can be any
284
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
285
+ # @param [Google::Apis::RequestOptions] options
286
+ # Request-specific options
287
+ #
288
+ # @yield [result, err] Result & error if block supplied
289
+ # @yieldparam result [Google::Apis::MemcacheV1::ListInstancesResponse] parsed result object
290
+ # @yieldparam err [StandardError] error object if request failed
291
+ #
292
+ # @return [Google::Apis::MemcacheV1::ListInstancesResponse]
293
+ #
294
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
295
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
296
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
297
+ def list_project_location_instances(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
298
+ command = make_simple_command(:get, 'v1/{+parent}/instances', options)
299
+ command.response_representation = Google::Apis::MemcacheV1::ListInstancesResponse::Representation
300
+ command.response_class = Google::Apis::MemcacheV1::ListInstancesResponse
301
+ command.params['parent'] = parent unless parent.nil?
302
+ command.query['filter'] = filter unless filter.nil?
303
+ command.query['orderBy'] = order_by unless order_by.nil?
304
+ command.query['pageSize'] = page_size unless page_size.nil?
305
+ command.query['pageToken'] = page_token unless page_token.nil?
306
+ command.query['fields'] = fields unless fields.nil?
307
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
308
+ execute_or_queue_command(command, &block)
309
+ end
310
+
311
+ # Updates an existing Instance in a given project and location.
312
+ # @param [String] name
313
+ # Required. Unique name of the resource in this scope including project and
314
+ # location using the form: `projects/`project_id`/locations/`location_id`/
315
+ # instances/`instance_id`` Note: Memcached instances are managed and addressed
316
+ # at regional level so location_id here refers to a GCP region; however, users
317
+ # may choose which zones Memcached nodes within an instances should be
318
+ # provisioned in. Refer to [zones] field for more details.
319
+ # @param [Google::Apis::MemcacheV1::Instance] instance_object
320
+ # @param [String] update_mask
321
+ # Required. Mask of fields to update. * `displayName`
322
+ # @param [String] fields
323
+ # Selector specifying which fields to include in a partial response.
324
+ # @param [String] quota_user
325
+ # Available to use for quota purposes for server-side applications. Can be any
326
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
327
+ # @param [Google::Apis::RequestOptions] options
328
+ # Request-specific options
329
+ #
330
+ # @yield [result, err] Result & error if block supplied
331
+ # @yieldparam result [Google::Apis::MemcacheV1::Operation] parsed result object
332
+ # @yieldparam err [StandardError] error object if request failed
333
+ #
334
+ # @return [Google::Apis::MemcacheV1::Operation]
335
+ #
336
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
337
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
338
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
339
+ def patch_project_location_instance(name, instance_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
340
+ command = make_simple_command(:patch, 'v1/{+name}', options)
341
+ command.request_representation = Google::Apis::MemcacheV1::Instance::Representation
342
+ command.request_object = instance_object
343
+ command.response_representation = Google::Apis::MemcacheV1::Operation::Representation
344
+ command.response_class = Google::Apis::MemcacheV1::Operation
345
+ command.params['name'] = name unless name.nil?
346
+ command.query['updateMask'] = update_mask unless update_mask.nil?
347
+ command.query['fields'] = fields unless fields.nil?
348
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
349
+ execute_or_queue_command(command, &block)
350
+ end
351
+
352
+ # Updates the defined Memcached Parameters for an existing Instance. This method
353
+ # only stages the parameters, it must be followed by ApplyParameters to apply
354
+ # the parameters to nodes of the Memcached Instance.
355
+ # @param [String] name
356
+ # Required. Resource name of the Memcached instance for which the parameters
357
+ # should be updated.
358
+ # @param [Google::Apis::MemcacheV1::UpdateParametersRequest] update_parameters_request_object
359
+ # @param [String] fields
360
+ # Selector specifying which fields to include in a partial response.
361
+ # @param [String] quota_user
362
+ # Available to use for quota purposes for server-side applications. Can be any
363
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
364
+ # @param [Google::Apis::RequestOptions] options
365
+ # Request-specific options
366
+ #
367
+ # @yield [result, err] Result & error if block supplied
368
+ # @yieldparam result [Google::Apis::MemcacheV1::Operation] parsed result object
369
+ # @yieldparam err [StandardError] error object if request failed
370
+ #
371
+ # @return [Google::Apis::MemcacheV1::Operation]
372
+ #
373
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
374
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
375
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
376
+ def update_instance_parameters(name, update_parameters_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
377
+ command = make_simple_command(:patch, 'v1/{+name}:updateParameters', options)
378
+ command.request_representation = Google::Apis::MemcacheV1::UpdateParametersRequest::Representation
379
+ command.request_object = update_parameters_request_object
380
+ command.response_representation = Google::Apis::MemcacheV1::Operation::Representation
381
+ command.response_class = Google::Apis::MemcacheV1::Operation
382
+ command.params['name'] = name unless name.nil?
383
+ command.query['fields'] = fields unless fields.nil?
384
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
385
+ execute_or_queue_command(command, &block)
386
+ end
387
+
388
+ # Starts asynchronous cancellation on a long-running operation. The server makes
389
+ # a best effort to cancel the operation, but success is not guaranteed. If the
390
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
391
+ # Clients can use Operations.GetOperation or other methods to check whether the
392
+ # cancellation succeeded or whether the operation completed despite cancellation.
393
+ # On successful cancellation, the operation is not deleted; instead, it becomes
394
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
395
+ # corresponding to `Code.CANCELLED`.
396
+ # @param [String] name
397
+ # The name of the operation resource to be cancelled.
398
+ # @param [Google::Apis::MemcacheV1::CancelOperationRequest] cancel_operation_request_object
399
+ # @param [String] fields
400
+ # Selector specifying which fields to include in a partial response.
401
+ # @param [String] quota_user
402
+ # Available to use for quota purposes for server-side applications. Can be any
403
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
404
+ # @param [Google::Apis::RequestOptions] options
405
+ # Request-specific options
406
+ #
407
+ # @yield [result, err] Result & error if block supplied
408
+ # @yieldparam result [Google::Apis::MemcacheV1::Empty] parsed result object
409
+ # @yieldparam err [StandardError] error object if request failed
410
+ #
411
+ # @return [Google::Apis::MemcacheV1::Empty]
412
+ #
413
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
414
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
415
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
416
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
417
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
418
+ command.request_representation = Google::Apis::MemcacheV1::CancelOperationRequest::Representation
419
+ command.request_object = cancel_operation_request_object
420
+ command.response_representation = Google::Apis::MemcacheV1::Empty::Representation
421
+ command.response_class = Google::Apis::MemcacheV1::Empty
422
+ command.params['name'] = name unless name.nil?
423
+ command.query['fields'] = fields unless fields.nil?
424
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
425
+ execute_or_queue_command(command, &block)
426
+ end
427
+
428
+ # Deletes a long-running operation. This method indicates that the client is no
429
+ # longer interested in the operation result. It does not cancel the operation.
430
+ # If the server doesn't support this method, it returns `google.rpc.Code.
431
+ # UNIMPLEMENTED`.
432
+ # @param [String] name
433
+ # The name of the operation resource to be deleted.
434
+ # @param [String] fields
435
+ # Selector specifying which fields to include in a partial response.
436
+ # @param [String] quota_user
437
+ # Available to use for quota purposes for server-side applications. Can be any
438
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
439
+ # @param [Google::Apis::RequestOptions] options
440
+ # Request-specific options
441
+ #
442
+ # @yield [result, err] Result & error if block supplied
443
+ # @yieldparam result [Google::Apis::MemcacheV1::Empty] parsed result object
444
+ # @yieldparam err [StandardError] error object if request failed
445
+ #
446
+ # @return [Google::Apis::MemcacheV1::Empty]
447
+ #
448
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
449
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
450
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
451
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
452
+ command = make_simple_command(:delete, 'v1/{+name}', options)
453
+ command.response_representation = Google::Apis::MemcacheV1::Empty::Representation
454
+ command.response_class = Google::Apis::MemcacheV1::Empty
455
+ command.params['name'] = name unless name.nil?
456
+ command.query['fields'] = fields unless fields.nil?
457
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
458
+ execute_or_queue_command(command, &block)
459
+ end
460
+
461
+ # Gets the latest state of a long-running operation. Clients can use this method
462
+ # to poll the operation result at intervals as recommended by the API service.
463
+ # @param [String] name
464
+ # The name of the operation resource.
465
+ # @param [String] fields
466
+ # Selector specifying which fields to include in a partial response.
467
+ # @param [String] quota_user
468
+ # Available to use for quota purposes for server-side applications. Can be any
469
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
470
+ # @param [Google::Apis::RequestOptions] options
471
+ # Request-specific options
472
+ #
473
+ # @yield [result, err] Result & error if block supplied
474
+ # @yieldparam result [Google::Apis::MemcacheV1::Operation] parsed result object
475
+ # @yieldparam err [StandardError] error object if request failed
476
+ #
477
+ # @return [Google::Apis::MemcacheV1::Operation]
478
+ #
479
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
480
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
481
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
482
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
483
+ command = make_simple_command(:get, 'v1/{+name}', options)
484
+ command.response_representation = Google::Apis::MemcacheV1::Operation::Representation
485
+ command.response_class = Google::Apis::MemcacheV1::Operation
486
+ command.params['name'] = name unless name.nil?
487
+ command.query['fields'] = fields unless fields.nil?
488
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
489
+ execute_or_queue_command(command, &block)
490
+ end
491
+
492
+ # Lists operations that match the specified filter in the request. If the server
493
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
494
+ # binding allows API services to override the binding to use different resource
495
+ # name schemes, such as `users/*/operations`. To override the binding, API
496
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
497
+ # service configuration. For backwards compatibility, the default name includes
498
+ # the operations collection id, however overriding users must ensure the name
499
+ # binding is the parent resource, without the operations collection id.
500
+ # @param [String] name
501
+ # The name of the operation's parent resource.
502
+ # @param [String] filter
503
+ # The standard list filter.
504
+ # @param [Fixnum] page_size
505
+ # The standard list page size.
506
+ # @param [String] page_token
507
+ # The standard list page token.
508
+ # @param [String] fields
509
+ # Selector specifying which fields to include in a partial response.
510
+ # @param [String] quota_user
511
+ # Available to use for quota purposes for server-side applications. Can be any
512
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
513
+ # @param [Google::Apis::RequestOptions] options
514
+ # Request-specific options
515
+ #
516
+ # @yield [result, err] Result & error if block supplied
517
+ # @yieldparam result [Google::Apis::MemcacheV1::ListOperationsResponse] parsed result object
518
+ # @yieldparam err [StandardError] error object if request failed
519
+ #
520
+ # @return [Google::Apis::MemcacheV1::ListOperationsResponse]
521
+ #
522
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
523
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
524
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
525
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
526
+ command = make_simple_command(:get, 'v1/{+name}/operations', options)
527
+ command.response_representation = Google::Apis::MemcacheV1::ListOperationsResponse::Representation
528
+ command.response_class = Google::Apis::MemcacheV1::ListOperationsResponse
529
+ command.params['name'] = name unless name.nil?
530
+ command.query['filter'] = filter unless filter.nil?
531
+ command.query['pageSize'] = page_size unless page_size.nil?
532
+ command.query['pageToken'] = page_token unless page_token.nil?
533
+ command.query['fields'] = fields unless fields.nil?
534
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
535
+ execute_or_queue_command(command, &block)
536
+ end
537
+
538
+ protected
539
+
540
+ def apply_command_defaults(command)
541
+ command.query['key'] = key unless key.nil?
542
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
543
+ end
544
+ end
545
+ end
546
+ end
547
+ end