google-cloud-filestore-v1 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0dda529b13b339aab951e233f494c412e31546bc2f5e8d81ac44a006defddb9a
4
- data.tar.gz: 5ddd5c42d945d468fb210ec8755bfb6b63e006f02786b083c5074ba9e5b0572a
3
+ metadata.gz: 1fd249cb1ff389cb8a6d83a368bac9c0a0a64362f2adb4ef35bf1712896d2a65
4
+ data.tar.gz: bc118f54ef79f82972722647146864fa316702cfa09a49639e8021b6126116c5
5
5
  SHA512:
6
- metadata.gz: 5b8a9aef1de0303cda8d0271ac33f9abf50f7613b207e8b38868ea3d4f0bc3d4b3a78ef6a00699855a7cd7b78f3f3678c4ec567a87928b6971c4f574db75d35e
7
- data.tar.gz: 2fe764ad69c6ef2f1ef7d945f8ac19acafd5f37298f5ced429e21d0069512f3e00c70578c271aefb965db2a35e8781ca73206867a03136f4604e1c719d14cda9
6
+ metadata.gz: 863bcf857962dec776b3ecd4ab8a333c1c15642625955aea01bd1820d86796a30223a921c539ef8eb81d58485f8e2360701ea57381594ead3395c462ca45cc9f
7
+ data.tar.gz: 0ac7a719775491b3941e51b21ce069bbdd974bc733fe613c29082213d478987b5084d7099eb169eae86c9b542f8b8899c22108dbc7b86a90d6c65718fc05416a
@@ -251,6 +251,27 @@ module Google
251
251
  #
252
252
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
253
253
  #
254
+ # @example Basic example
255
+ # require "google/cloud/filestore/v1"
256
+ #
257
+ # # Create a client object. The client can be reused for multiple calls.
258
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
259
+ #
260
+ # # Create a request. To set request fields, pass in keyword arguments.
261
+ # request = Google::Cloud::Filestore::V1::ListInstancesRequest.new
262
+ #
263
+ # # Call the list_instances method.
264
+ # result = client.list_instances request
265
+ #
266
+ # # The returned object is of type Gapic::PagedEnumerable. You can
267
+ # # iterate over all elements by calling #each, and the enumerable
268
+ # # will lazily make API calls to fetch subsequent pages. Other
269
+ # # methods are also available for managing paging directly.
270
+ # result.each do |response|
271
+ # # Each element is of type ::Google::Cloud::Filestore::V1::Instance.
272
+ # p response
273
+ # end
274
+ #
254
275
  def list_instances request, options = nil
255
276
  raise ::ArgumentError, "request must be provided" if request.nil?
256
277
 
@@ -268,9 +289,11 @@ module Google
268
289
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
269
290
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
270
291
 
271
- header_params = {
272
- "parent" => request.parent
273
- }
292
+ header_params = {}
293
+ if request.parent
294
+ header_params["parent"] = request.parent
295
+ end
296
+
274
297
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
275
298
  metadata[:"x-goog-request-params"] ||= request_params_header
276
299
 
@@ -321,6 +344,21 @@ module Google
321
344
  #
322
345
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
323
346
  #
347
+ # @example Basic example
348
+ # require "google/cloud/filestore/v1"
349
+ #
350
+ # # Create a client object. The client can be reused for multiple calls.
351
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
352
+ #
353
+ # # Create a request. To set request fields, pass in keyword arguments.
354
+ # request = Google::Cloud::Filestore::V1::GetInstanceRequest.new
355
+ #
356
+ # # Call the get_instance method.
357
+ # result = client.get_instance request
358
+ #
359
+ # # The returned object is of type Google::Cloud::Filestore::V1::Instance.
360
+ # p result
361
+ #
324
362
  def get_instance request, options = nil
325
363
  raise ::ArgumentError, "request must be provided" if request.nil?
326
364
 
@@ -338,9 +376,11 @@ module Google
338
376
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
339
377
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
340
378
 
341
- header_params = {
342
- "name" => request.name
343
- }
379
+ header_params = {}
380
+ if request.name
381
+ header_params["name"] = request.name
382
+ end
383
+
344
384
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
345
385
  metadata[:"x-goog-request-params"] ||= request_params_header
346
386
 
@@ -399,6 +439,28 @@ module Google
399
439
  #
400
440
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
401
441
  #
442
+ # @example Basic example
443
+ # require "google/cloud/filestore/v1"
444
+ #
445
+ # # Create a client object. The client can be reused for multiple calls.
446
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
447
+ #
448
+ # # Create a request. To set request fields, pass in keyword arguments.
449
+ # request = Google::Cloud::Filestore::V1::CreateInstanceRequest.new
450
+ #
451
+ # # Call the create_instance method.
452
+ # result = client.create_instance request
453
+ #
454
+ # # The returned object is of type Gapic::Operation. You can use this
455
+ # # object to check the status of an operation, cancel it, or wait
456
+ # # for results. Here is how to block until completion:
457
+ # result.wait_until_done! timeout: 60
458
+ # if result.response?
459
+ # p result.response
460
+ # else
461
+ # puts "Error!"
462
+ # end
463
+ #
402
464
  def create_instance request, options = nil
403
465
  raise ::ArgumentError, "request must be provided" if request.nil?
404
466
 
@@ -416,9 +478,11 @@ module Google
416
478
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
417
479
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
418
480
 
419
- header_params = {
420
- "parent" => request.parent
421
- }
481
+ header_params = {}
482
+ if request.parent
483
+ header_params["parent"] = request.parent
484
+ end
485
+
422
486
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
423
487
  metadata[:"x-goog-request-params"] ||= request_params_header
424
488
 
@@ -476,6 +540,28 @@ module Google
476
540
  #
477
541
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
478
542
  #
543
+ # @example Basic example
544
+ # require "google/cloud/filestore/v1"
545
+ #
546
+ # # Create a client object. The client can be reused for multiple calls.
547
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
548
+ #
549
+ # # Create a request. To set request fields, pass in keyword arguments.
550
+ # request = Google::Cloud::Filestore::V1::UpdateInstanceRequest.new
551
+ #
552
+ # # Call the update_instance method.
553
+ # result = client.update_instance request
554
+ #
555
+ # # The returned object is of type Gapic::Operation. You can use this
556
+ # # object to check the status of an operation, cancel it, or wait
557
+ # # for results. Here is how to block until completion:
558
+ # result.wait_until_done! timeout: 60
559
+ # if result.response?
560
+ # p result.response
561
+ # else
562
+ # puts "Error!"
563
+ # end
564
+ #
479
565
  def update_instance request, options = nil
480
566
  raise ::ArgumentError, "request must be provided" if request.nil?
481
567
 
@@ -493,9 +579,11 @@ module Google
493
579
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
494
580
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
495
581
 
496
- header_params = {
497
- "instance.name" => request.instance.name
498
- }
582
+ header_params = {}
583
+ if request.instance&.name
584
+ header_params["instance.name"] = request.instance.name
585
+ end
586
+
499
587
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
500
588
  metadata[:"x-goog-request-params"] ||= request_params_header
501
589
 
@@ -556,6 +644,28 @@ module Google
556
644
  #
557
645
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
558
646
  #
647
+ # @example Basic example
648
+ # require "google/cloud/filestore/v1"
649
+ #
650
+ # # Create a client object. The client can be reused for multiple calls.
651
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
652
+ #
653
+ # # Create a request. To set request fields, pass in keyword arguments.
654
+ # request = Google::Cloud::Filestore::V1::RestoreInstanceRequest.new
655
+ #
656
+ # # Call the restore_instance method.
657
+ # result = client.restore_instance request
658
+ #
659
+ # # The returned object is of type Gapic::Operation. You can use this
660
+ # # object to check the status of an operation, cancel it, or wait
661
+ # # for results. Here is how to block until completion:
662
+ # result.wait_until_done! timeout: 60
663
+ # if result.response?
664
+ # p result.response
665
+ # else
666
+ # puts "Error!"
667
+ # end
668
+ #
559
669
  def restore_instance request, options = nil
560
670
  raise ::ArgumentError, "request must be provided" if request.nil?
561
671
 
@@ -573,9 +683,11 @@ module Google
573
683
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
574
684
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
575
685
 
576
- header_params = {
577
- "name" => request.name
578
- }
686
+ header_params = {}
687
+ if request.name
688
+ header_params["name"] = request.name
689
+ end
690
+
579
691
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
580
692
  metadata[:"x-goog-request-params"] ||= request_params_header
581
693
 
@@ -626,6 +738,28 @@ module Google
626
738
  #
627
739
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
628
740
  #
741
+ # @example Basic example
742
+ # require "google/cloud/filestore/v1"
743
+ #
744
+ # # Create a client object. The client can be reused for multiple calls.
745
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
746
+ #
747
+ # # Create a request. To set request fields, pass in keyword arguments.
748
+ # request = Google::Cloud::Filestore::V1::DeleteInstanceRequest.new
749
+ #
750
+ # # Call the delete_instance method.
751
+ # result = client.delete_instance request
752
+ #
753
+ # # The returned object is of type Gapic::Operation. You can use this
754
+ # # object to check the status of an operation, cancel it, or wait
755
+ # # for results. Here is how to block until completion:
756
+ # result.wait_until_done! timeout: 60
757
+ # if result.response?
758
+ # p result.response
759
+ # else
760
+ # puts "Error!"
761
+ # end
762
+ #
629
763
  def delete_instance request, options = nil
630
764
  raise ::ArgumentError, "request must be provided" if request.nil?
631
765
 
@@ -643,9 +777,11 @@ module Google
643
777
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
644
778
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
645
779
 
646
- header_params = {
647
- "name" => request.name
648
- }
780
+ header_params = {}
781
+ if request.name
782
+ header_params["name"] = request.name
783
+ end
784
+
649
785
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
650
786
  metadata[:"x-goog-request-params"] ||= request_params_header
651
787
 
@@ -710,6 +846,27 @@ module Google
710
846
  #
711
847
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
712
848
  #
849
+ # @example Basic example
850
+ # require "google/cloud/filestore/v1"
851
+ #
852
+ # # Create a client object. The client can be reused for multiple calls.
853
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
854
+ #
855
+ # # Create a request. To set request fields, pass in keyword arguments.
856
+ # request = Google::Cloud::Filestore::V1::ListBackupsRequest.new
857
+ #
858
+ # # Call the list_backups method.
859
+ # result = client.list_backups request
860
+ #
861
+ # # The returned object is of type Gapic::PagedEnumerable. You can
862
+ # # iterate over all elements by calling #each, and the enumerable
863
+ # # will lazily make API calls to fetch subsequent pages. Other
864
+ # # methods are also available for managing paging directly.
865
+ # result.each do |response|
866
+ # # Each element is of type ::Google::Cloud::Filestore::V1::Backup.
867
+ # p response
868
+ # end
869
+ #
713
870
  def list_backups request, options = nil
714
871
  raise ::ArgumentError, "request must be provided" if request.nil?
715
872
 
@@ -727,9 +884,11 @@ module Google
727
884
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
728
885
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
729
886
 
730
- header_params = {
731
- "parent" => request.parent
732
- }
887
+ header_params = {}
888
+ if request.parent
889
+ header_params["parent"] = request.parent
890
+ end
891
+
733
892
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
734
893
  metadata[:"x-goog-request-params"] ||= request_params_header
735
894
 
@@ -780,6 +939,21 @@ module Google
780
939
  #
781
940
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
782
941
  #
942
+ # @example Basic example
943
+ # require "google/cloud/filestore/v1"
944
+ #
945
+ # # Create a client object. The client can be reused for multiple calls.
946
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
947
+ #
948
+ # # Create a request. To set request fields, pass in keyword arguments.
949
+ # request = Google::Cloud::Filestore::V1::GetBackupRequest.new
950
+ #
951
+ # # Call the get_backup method.
952
+ # result = client.get_backup request
953
+ #
954
+ # # The returned object is of type Google::Cloud::Filestore::V1::Backup.
955
+ # p result
956
+ #
783
957
  def get_backup request, options = nil
784
958
  raise ::ArgumentError, "request must be provided" if request.nil?
785
959
 
@@ -797,9 +971,11 @@ module Google
797
971
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
798
972
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
799
973
 
800
- header_params = {
801
- "name" => request.name
802
- }
974
+ header_params = {}
975
+ if request.name
976
+ header_params["name"] = request.name
977
+ end
978
+
803
979
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
804
980
  metadata[:"x-goog-request-params"] ||= request_params_header
805
981
 
@@ -860,6 +1036,28 @@ module Google
860
1036
  #
861
1037
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
862
1038
  #
1039
+ # @example Basic example
1040
+ # require "google/cloud/filestore/v1"
1041
+ #
1042
+ # # Create a client object. The client can be reused for multiple calls.
1043
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
1044
+ #
1045
+ # # Create a request. To set request fields, pass in keyword arguments.
1046
+ # request = Google::Cloud::Filestore::V1::CreateBackupRequest.new
1047
+ #
1048
+ # # Call the create_backup method.
1049
+ # result = client.create_backup request
1050
+ #
1051
+ # # The returned object is of type Gapic::Operation. You can use this
1052
+ # # object to check the status of an operation, cancel it, or wait
1053
+ # # for results. Here is how to block until completion:
1054
+ # result.wait_until_done! timeout: 60
1055
+ # if result.response?
1056
+ # p result.response
1057
+ # else
1058
+ # puts "Error!"
1059
+ # end
1060
+ #
863
1061
  def create_backup request, options = nil
864
1062
  raise ::ArgumentError, "request must be provided" if request.nil?
865
1063
 
@@ -877,9 +1075,11 @@ module Google
877
1075
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
878
1076
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
879
1077
 
880
- header_params = {
881
- "parent" => request.parent
882
- }
1078
+ header_params = {}
1079
+ if request.parent
1080
+ header_params["parent"] = request.parent
1081
+ end
1082
+
883
1083
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
884
1084
  metadata[:"x-goog-request-params"] ||= request_params_header
885
1085
 
@@ -930,6 +1130,28 @@ module Google
930
1130
  #
931
1131
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
932
1132
  #
1133
+ # @example Basic example
1134
+ # require "google/cloud/filestore/v1"
1135
+ #
1136
+ # # Create a client object. The client can be reused for multiple calls.
1137
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
1138
+ #
1139
+ # # Create a request. To set request fields, pass in keyword arguments.
1140
+ # request = Google::Cloud::Filestore::V1::DeleteBackupRequest.new
1141
+ #
1142
+ # # Call the delete_backup method.
1143
+ # result = client.delete_backup request
1144
+ #
1145
+ # # The returned object is of type Gapic::Operation. You can use this
1146
+ # # object to check the status of an operation, cancel it, or wait
1147
+ # # for results. Here is how to block until completion:
1148
+ # result.wait_until_done! timeout: 60
1149
+ # if result.response?
1150
+ # p result.response
1151
+ # else
1152
+ # puts "Error!"
1153
+ # end
1154
+ #
933
1155
  def delete_backup request, options = nil
934
1156
  raise ::ArgumentError, "request must be provided" if request.nil?
935
1157
 
@@ -947,9 +1169,11 @@ module Google
947
1169
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
948
1170
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
949
1171
 
950
- header_params = {
951
- "name" => request.name
952
- }
1172
+ header_params = {}
1173
+ if request.name
1174
+ header_params["name"] = request.name
1175
+ end
1176
+
953
1177
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
954
1178
  metadata[:"x-goog-request-params"] ||= request_params_header
955
1179
 
@@ -1002,6 +1226,28 @@ module Google
1002
1226
  #
1003
1227
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1004
1228
  #
1229
+ # @example Basic example
1230
+ # require "google/cloud/filestore/v1"
1231
+ #
1232
+ # # Create a client object. The client can be reused for multiple calls.
1233
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
1234
+ #
1235
+ # # Create a request. To set request fields, pass in keyword arguments.
1236
+ # request = Google::Cloud::Filestore::V1::UpdateBackupRequest.new
1237
+ #
1238
+ # # Call the update_backup method.
1239
+ # result = client.update_backup request
1240
+ #
1241
+ # # The returned object is of type Gapic::Operation. You can use this
1242
+ # # object to check the status of an operation, cancel it, or wait
1243
+ # # for results. Here is how to block until completion:
1244
+ # result.wait_until_done! timeout: 60
1245
+ # if result.response?
1246
+ # p result.response
1247
+ # else
1248
+ # puts "Error!"
1249
+ # end
1250
+ #
1005
1251
  def update_backup request, options = nil
1006
1252
  raise ::ArgumentError, "request must be provided" if request.nil?
1007
1253
 
@@ -1019,9 +1265,11 @@ module Google
1019
1265
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
1020
1266
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1021
1267
 
1022
- header_params = {
1023
- "backup.name" => request.backup.name
1024
- }
1268
+ header_params = {}
1269
+ if request.backup&.name
1270
+ header_params["backup.name"] = request.backup.name
1271
+ end
1272
+
1025
1273
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1026
1274
  metadata[:"x-goog-request-params"] ||= request_params_header
1027
1275
 
@@ -143,6 +143,27 @@ module Google
143
143
  #
144
144
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
145
  #
146
+ # @example Basic example
147
+ # require "google/longrunning"
148
+ #
149
+ # # Create a client object. The client can be reused for multiple calls.
150
+ # client = Google::Longrunning::Operations::Client.new
151
+ #
152
+ # # Create a request. To set request fields, pass in keyword arguments.
153
+ # request = Google::Longrunning::ListOperationsRequest.new
154
+ #
155
+ # # Call the list_operations method.
156
+ # result = client.list_operations request
157
+ #
158
+ # # The returned object is of type Gapic::PagedEnumerable. You can
159
+ # # iterate over all elements by calling #each, and the enumerable
160
+ # # will lazily make API calls to fetch subsequent pages. Other
161
+ # # methods are also available for managing paging directly.
162
+ # result.each do |response|
163
+ # # Each element is of type ::Google::Longrunning::Operation.
164
+ # p response
165
+ # end
166
+ #
146
167
  def list_operations request, options = nil
147
168
  raise ::ArgumentError, "request must be provided" if request.nil?
148
169
 
@@ -160,9 +181,11 @@ module Google
160
181
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
161
182
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
162
183
 
163
- header_params = {
164
- "name" => request.name
165
- }
184
+ header_params = {}
185
+ if request.name
186
+ header_params["name"] = request.name
187
+ end
188
+
166
189
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
167
190
  metadata[:"x-goog-request-params"] ||= request_params_header
168
191
 
@@ -215,6 +238,28 @@ module Google
215
238
  #
216
239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
217
240
  #
241
+ # @example Basic example
242
+ # require "google/longrunning"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Longrunning::Operations::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Longrunning::GetOperationRequest.new
249
+ #
250
+ # # Call the get_operation method.
251
+ # result = client.get_operation request
252
+ #
253
+ # # The returned object is of type Gapic::Operation. You can use this
254
+ # # object to check the status of an operation, cancel it, or wait
255
+ # # for results. Here is how to block until completion:
256
+ # result.wait_until_done! timeout: 60
257
+ # if result.response?
258
+ # p result.response
259
+ # else
260
+ # puts "Error!"
261
+ # end
262
+ #
218
263
  def get_operation request, options = nil
219
264
  raise ::ArgumentError, "request must be provided" if request.nil?
220
265
 
@@ -232,9 +277,11 @@ module Google
232
277
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
233
278
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
279
 
235
- header_params = {
236
- "name" => request.name
237
- }
280
+ header_params = {}
281
+ if request.name
282
+ header_params["name"] = request.name
283
+ end
284
+
238
285
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
239
286
  metadata[:"x-goog-request-params"] ||= request_params_header
240
287
 
@@ -287,6 +334,21 @@ module Google
287
334
  #
288
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
289
336
  #
337
+ # @example Basic example
338
+ # require "google/longrunning"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Longrunning::Operations::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Longrunning::DeleteOperationRequest.new
345
+ #
346
+ # # Call the delete_operation method.
347
+ # result = client.delete_operation request
348
+ #
349
+ # # The returned object is of type Google::Protobuf::Empty.
350
+ # p result
351
+ #
290
352
  def delete_operation request, options = nil
291
353
  raise ::ArgumentError, "request must be provided" if request.nil?
292
354
 
@@ -304,9 +366,11 @@ module Google
304
366
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
305
367
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
306
368
 
307
- header_params = {
308
- "name" => request.name
309
- }
369
+ header_params = {}
370
+ if request.name
371
+ header_params["name"] = request.name
372
+ end
373
+
310
374
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
311
375
  metadata[:"x-goog-request-params"] ||= request_params_header
312
376
 
@@ -364,6 +428,21 @@ module Google
364
428
  #
365
429
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
366
430
  #
431
+ # @example Basic example
432
+ # require "google/longrunning"
433
+ #
434
+ # # Create a client object. The client can be reused for multiple calls.
435
+ # client = Google::Longrunning::Operations::Client.new
436
+ #
437
+ # # Create a request. To set request fields, pass in keyword arguments.
438
+ # request = Google::Longrunning::CancelOperationRequest.new
439
+ #
440
+ # # Call the cancel_operation method.
441
+ # result = client.cancel_operation request
442
+ #
443
+ # # The returned object is of type Google::Protobuf::Empty.
444
+ # p result
445
+ #
367
446
  def cancel_operation request, options = nil
368
447
  raise ::ArgumentError, "request must be provided" if request.nil?
369
448
 
@@ -381,9 +460,11 @@ module Google
381
460
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
382
461
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
383
462
 
384
- header_params = {
385
- "name" => request.name
386
- }
463
+ header_params = {}
464
+ if request.name
465
+ header_params["name"] = request.name
466
+ end
467
+
387
468
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
388
469
  metadata[:"x-goog-request-params"] ||= request_params_header
389
470
 
@@ -444,6 +525,28 @@ module Google
444
525
  #
445
526
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
446
527
  #
528
+ # @example Basic example
529
+ # require "google/longrunning"
530
+ #
531
+ # # Create a client object. The client can be reused for multiple calls.
532
+ # client = Google::Longrunning::Operations::Client.new
533
+ #
534
+ # # Create a request. To set request fields, pass in keyword arguments.
535
+ # request = Google::Longrunning::WaitOperationRequest.new
536
+ #
537
+ # # Call the wait_operation method.
538
+ # result = client.wait_operation request
539
+ #
540
+ # # The returned object is of type Gapic::Operation. You can use this
541
+ # # object to check the status of an operation, cancel it, or wait
542
+ # # for results. Here is how to block until completion:
543
+ # result.wait_until_done! timeout: 60
544
+ # if result.response?
545
+ # p result.response
546
+ # else
547
+ # puts "Error!"
548
+ # end
549
+ #
447
550
  def wait_operation request, options = nil
448
551
  raise ::ArgumentError, "request must be provided" if request.nil?
449
552
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Filestore
23
23
  module V1
24
- VERSION = "0.1.1"
24
+ VERSION = "0.1.2"
25
25
  end
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-filestore-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-28 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common