google-cloud-filestore-v1 0.5.0 → 0.7.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.
- checksums.yaml +4 -4
- data/lib/google/cloud/filestore/v1/bindings_override.rb +102 -0
- data/lib/google/cloud/filestore/v1/cloud_filestore_manager/client.rb +130 -1
- data/lib/google/cloud/filestore/v1/cloud_filestore_manager/operations.rb +10 -1
- data/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/client.rb +459 -0
- data/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/operations.rb +75 -0
- data/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/service_stub.rb +60 -0
- data/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest.rb +1 -0
- data/lib/google/cloud/filestore/v1/cloud_filestore_service_pb.rb +2 -1
- data/lib/google/cloud/filestore/v1/cloud_filestore_service_services_pb.rb +2 -0
- data/lib/google/cloud/filestore/v1/rest.rb +1 -0
- data/lib/google/cloud/filestore/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +13 -0
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/filestore/v1/cloud_filestore_service.rb +42 -1
- metadata +26 -5
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/filestore/v1/cloud_filestore_service_pb"
|
21
21
|
require "google/cloud/filestore/v1/cloud_filestore_manager/rest/service_stub"
|
22
|
+
require "google/cloud/location/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -188,6 +189,13 @@ module Google
|
|
188
189
|
config.endpoint = @config.endpoint
|
189
190
|
end
|
190
191
|
|
192
|
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
193
|
+
config.credentials = credentials
|
194
|
+
config.quota_project = @quota_project_id
|
195
|
+
config.endpoint = @config.endpoint
|
196
|
+
config.bindings_override = @config.bindings_override
|
197
|
+
end
|
198
|
+
|
191
199
|
@cloud_filestore_manager_stub = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
192
200
|
end
|
193
201
|
|
@@ -198,6 +206,13 @@ module Google
|
|
198
206
|
#
|
199
207
|
attr_reader :operations_client
|
200
208
|
|
209
|
+
##
|
210
|
+
# Get the associated client for mix-in of the Locations.
|
211
|
+
#
|
212
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
213
|
+
#
|
214
|
+
attr_reader :location_client
|
215
|
+
|
201
216
|
# Service calls
|
202
217
|
|
203
218
|
##
|
@@ -242,6 +257,26 @@ module Google
|
|
242
257
|
# @return [::Google::Cloud::Filestore::V1::ListInstancesResponse]
|
243
258
|
#
|
244
259
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
260
|
+
#
|
261
|
+
# @example Basic example
|
262
|
+
# require "google/cloud/filestore/v1"
|
263
|
+
#
|
264
|
+
# # Create a client object. The client can be reused for multiple calls.
|
265
|
+
# client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
|
266
|
+
#
|
267
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
268
|
+
# request = Google::Cloud::Filestore::V1::ListInstancesRequest.new
|
269
|
+
#
|
270
|
+
# # Call the list_instances method.
|
271
|
+
# result = client.list_instances request
|
272
|
+
#
|
273
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
274
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
275
|
+
# result.each do |item|
|
276
|
+
# # Each element is of type ::Google::Cloud::Filestore::V1::Instance.
|
277
|
+
# p item
|
278
|
+
# end
|
279
|
+
#
|
245
280
|
def list_instances request, options = nil
|
246
281
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
247
282
|
|
@@ -305,6 +340,22 @@ module Google
|
|
305
340
|
# @return [::Google::Cloud::Filestore::V1::Instance]
|
306
341
|
#
|
307
342
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
343
|
+
#
|
344
|
+
# @example Basic example
|
345
|
+
# require "google/cloud/filestore/v1"
|
346
|
+
#
|
347
|
+
# # Create a client object. The client can be reused for multiple calls.
|
348
|
+
# client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
|
349
|
+
#
|
350
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
351
|
+
# request = Google::Cloud::Filestore::V1::GetInstanceRequest.new
|
352
|
+
#
|
353
|
+
# # Call the get_instance method.
|
354
|
+
# result = client.get_instance request
|
355
|
+
#
|
356
|
+
# # The returned object is of type Google::Cloud::Filestore::V1::Instance.
|
357
|
+
# p result
|
358
|
+
#
|
308
359
|
def get_instance request, options = nil
|
309
360
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
310
361
|
|
@@ -377,6 +428,29 @@ module Google
|
|
377
428
|
# @return [::Gapic::Operation]
|
378
429
|
#
|
379
430
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
431
|
+
#
|
432
|
+
# @example Basic example
|
433
|
+
# require "google/cloud/filestore/v1"
|
434
|
+
#
|
435
|
+
# # Create a client object. The client can be reused for multiple calls.
|
436
|
+
# client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
|
437
|
+
#
|
438
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
439
|
+
# request = Google::Cloud::Filestore::V1::CreateInstanceRequest.new
|
440
|
+
#
|
441
|
+
# # Call the create_instance method.
|
442
|
+
# result = client.create_instance request
|
443
|
+
#
|
444
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
445
|
+
# # check the status of an operation, cancel it, or wait for results.
|
446
|
+
# # Here is how to wait for a response.
|
447
|
+
# result.wait_until_done! timeout: 60
|
448
|
+
# if result.response?
|
449
|
+
# p result.response
|
450
|
+
# else
|
451
|
+
# puts "No response received."
|
452
|
+
# end
|
453
|
+
#
|
380
454
|
def create_instance request, options = nil
|
381
455
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
382
456
|
|
@@ -448,6 +522,29 @@ module Google
|
|
448
522
|
# @return [::Gapic::Operation]
|
449
523
|
#
|
450
524
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
525
|
+
#
|
526
|
+
# @example Basic example
|
527
|
+
# require "google/cloud/filestore/v1"
|
528
|
+
#
|
529
|
+
# # Create a client object. The client can be reused for multiple calls.
|
530
|
+
# client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
|
531
|
+
#
|
532
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
533
|
+
# request = Google::Cloud::Filestore::V1::UpdateInstanceRequest.new
|
534
|
+
#
|
535
|
+
# # Call the update_instance method.
|
536
|
+
# result = client.update_instance request
|
537
|
+
#
|
538
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
539
|
+
# # check the status of an operation, cancel it, or wait for results.
|
540
|
+
# # Here is how to wait for a response.
|
541
|
+
# result.wait_until_done! timeout: 60
|
542
|
+
# if result.response?
|
543
|
+
# p result.response
|
544
|
+
# else
|
545
|
+
# puts "No response received."
|
546
|
+
# end
|
547
|
+
#
|
451
548
|
def update_instance request, options = nil
|
452
549
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
453
550
|
|
@@ -522,6 +619,29 @@ module Google
|
|
522
619
|
# @return [::Gapic::Operation]
|
523
620
|
#
|
524
621
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
622
|
+
#
|
623
|
+
# @example Basic example
|
624
|
+
# require "google/cloud/filestore/v1"
|
625
|
+
#
|
626
|
+
# # Create a client object. The client can be reused for multiple calls.
|
627
|
+
# client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
|
628
|
+
#
|
629
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
630
|
+
# request = Google::Cloud::Filestore::V1::RestoreInstanceRequest.new
|
631
|
+
#
|
632
|
+
# # Call the restore_instance method.
|
633
|
+
# result = client.restore_instance request
|
634
|
+
#
|
635
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
636
|
+
# # check the status of an operation, cancel it, or wait for results.
|
637
|
+
# # Here is how to wait for a response.
|
638
|
+
# result.wait_until_done! timeout: 60
|
639
|
+
# if result.response?
|
640
|
+
# p result.response
|
641
|
+
# else
|
642
|
+
# puts "No response received."
|
643
|
+
# end
|
644
|
+
#
|
525
645
|
def restore_instance request, options = nil
|
526
646
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
527
647
|
|
@@ -558,6 +678,98 @@ module Google
|
|
558
678
|
raise ::Google::Cloud::Error.from_error(e)
|
559
679
|
end
|
560
680
|
|
681
|
+
##
|
682
|
+
# Revert an existing instance's file system to a specified snapshot.
|
683
|
+
#
|
684
|
+
# @overload revert_instance(request, options = nil)
|
685
|
+
# Pass arguments to `revert_instance` via a request object, either of type
|
686
|
+
# {::Google::Cloud::Filestore::V1::RevertInstanceRequest} or an equivalent Hash.
|
687
|
+
#
|
688
|
+
# @param request [::Google::Cloud::Filestore::V1::RevertInstanceRequest, ::Hash]
|
689
|
+
# A request object representing the call parameters. Required. To specify no
|
690
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
691
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
692
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
693
|
+
#
|
694
|
+
# @overload revert_instance(name: nil, target_snapshot_id: nil)
|
695
|
+
# Pass arguments to `revert_instance` via keyword arguments. Note that at
|
696
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
697
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
698
|
+
#
|
699
|
+
# @param name [::String]
|
700
|
+
# Required.
|
701
|
+
# `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
|
702
|
+
# The resource name of the instance, in the format
|
703
|
+
# @param target_snapshot_id [::String]
|
704
|
+
# Required. The snapshot resource ID, in the format 'my-snapshot', where the
|
705
|
+
# specified ID is the \\{snapshot_id} of the fully qualified name like
|
706
|
+
# `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`
|
707
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
708
|
+
# @yieldparam result [::Gapic::Operation]
|
709
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
710
|
+
#
|
711
|
+
# @return [::Gapic::Operation]
|
712
|
+
#
|
713
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
714
|
+
#
|
715
|
+
# @example Basic example
|
716
|
+
# require "google/cloud/filestore/v1"
|
717
|
+
#
|
718
|
+
# # Create a client object. The client can be reused for multiple calls.
|
719
|
+
# client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
|
720
|
+
#
|
721
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
722
|
+
# request = Google::Cloud::Filestore::V1::RevertInstanceRequest.new
|
723
|
+
#
|
724
|
+
# # Call the revert_instance method.
|
725
|
+
# result = client.revert_instance request
|
726
|
+
#
|
727
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
728
|
+
# # check the status of an operation, cancel it, or wait for results.
|
729
|
+
# # Here is how to wait for a response.
|
730
|
+
# result.wait_until_done! timeout: 60
|
731
|
+
# if result.response?
|
732
|
+
# p result.response
|
733
|
+
# else
|
734
|
+
# puts "No response received."
|
735
|
+
# end
|
736
|
+
#
|
737
|
+
def revert_instance request, options = nil
|
738
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
739
|
+
|
740
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::RevertInstanceRequest
|
741
|
+
|
742
|
+
# Converts hash and nil to an options object
|
743
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
744
|
+
|
745
|
+
# Customize the options with defaults
|
746
|
+
call_metadata = @config.rpcs.revert_instance.metadata.to_h
|
747
|
+
|
748
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
749
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
750
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
751
|
+
gapic_version: ::Google::Cloud::Filestore::V1::VERSION,
|
752
|
+
transports_version_send: [:rest]
|
753
|
+
|
754
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
755
|
+
|
756
|
+
options.apply_defaults timeout: @config.rpcs.revert_instance.timeout,
|
757
|
+
metadata: call_metadata,
|
758
|
+
retry_policy: @config.rpcs.revert_instance.retry_policy
|
759
|
+
|
760
|
+
options.apply_defaults timeout: @config.timeout,
|
761
|
+
metadata: @config.metadata,
|
762
|
+
retry_policy: @config.retry_policy
|
763
|
+
|
764
|
+
@cloud_filestore_manager_stub.revert_instance request, options do |result, operation|
|
765
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
766
|
+
yield result, operation if block_given?
|
767
|
+
return result
|
768
|
+
end
|
769
|
+
rescue ::Gapic::Rest::Error => e
|
770
|
+
raise ::Google::Cloud::Error.from_error(e)
|
771
|
+
end
|
772
|
+
|
561
773
|
##
|
562
774
|
# Deletes an instance.
|
563
775
|
#
|
@@ -589,6 +801,29 @@ module Google
|
|
589
801
|
# @return [::Gapic::Operation]
|
590
802
|
#
|
591
803
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
804
|
+
#
|
805
|
+
# @example Basic example
|
806
|
+
# require "google/cloud/filestore/v1"
|
807
|
+
#
|
808
|
+
# # Create a client object. The client can be reused for multiple calls.
|
809
|
+
# client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
|
810
|
+
#
|
811
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
812
|
+
# request = Google::Cloud::Filestore::V1::DeleteInstanceRequest.new
|
813
|
+
#
|
814
|
+
# # Call the delete_instance method.
|
815
|
+
# result = client.delete_instance request
|
816
|
+
#
|
817
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
818
|
+
# # check the status of an operation, cancel it, or wait for results.
|
819
|
+
# # Here is how to wait for a response.
|
820
|
+
# result.wait_until_done! timeout: 60
|
821
|
+
# if result.response?
|
822
|
+
# p result.response
|
823
|
+
# else
|
824
|
+
# puts "No response received."
|
825
|
+
# end
|
826
|
+
#
|
592
827
|
def delete_instance request, options = nil
|
593
828
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
594
829
|
|
@@ -664,6 +899,26 @@ module Google
|
|
664
899
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Filestore::V1::Snapshot>]
|
665
900
|
#
|
666
901
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
902
|
+
#
|
903
|
+
# @example Basic example
|
904
|
+
# require "google/cloud/filestore/v1"
|
905
|
+
#
|
906
|
+
# # Create a client object. The client can be reused for multiple calls.
|
907
|
+
# client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
|
908
|
+
#
|
909
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
910
|
+
# request = Google::Cloud::Filestore::V1::ListSnapshotsRequest.new
|
911
|
+
#
|
912
|
+
# # Call the list_snapshots method.
|
913
|
+
# result = client.list_snapshots request
|
914
|
+
#
|
915
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
916
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
917
|
+
# result.each do |item|
|
918
|
+
# # Each element is of type ::Google::Cloud::Filestore::V1::Snapshot.
|
919
|
+
# p item
|
920
|
+
# end
|
921
|
+
#
|
667
922
|
def list_snapshots request, options = nil
|
668
923
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
669
924
|
|
@@ -728,6 +983,22 @@ module Google
|
|
728
983
|
# @return [::Google::Cloud::Filestore::V1::Snapshot]
|
729
984
|
#
|
730
985
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
986
|
+
#
|
987
|
+
# @example Basic example
|
988
|
+
# require "google/cloud/filestore/v1"
|
989
|
+
#
|
990
|
+
# # Create a client object. The client can be reused for multiple calls.
|
991
|
+
# client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
|
992
|
+
#
|
993
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
994
|
+
# request = Google::Cloud::Filestore::V1::GetSnapshotRequest.new
|
995
|
+
#
|
996
|
+
# # Call the get_snapshot method.
|
997
|
+
# result = client.get_snapshot request
|
998
|
+
#
|
999
|
+
# # The returned object is of type Google::Cloud::Filestore::V1::Snapshot.
|
1000
|
+
# p result
|
1001
|
+
#
|
731
1002
|
def get_snapshot request, options = nil
|
732
1003
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
733
1004
|
|
@@ -799,6 +1070,29 @@ module Google
|
|
799
1070
|
# @return [::Gapic::Operation]
|
800
1071
|
#
|
801
1072
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1073
|
+
#
|
1074
|
+
# @example Basic example
|
1075
|
+
# require "google/cloud/filestore/v1"
|
1076
|
+
#
|
1077
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1078
|
+
# client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
|
1079
|
+
#
|
1080
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1081
|
+
# request = Google::Cloud::Filestore::V1::CreateSnapshotRequest.new
|
1082
|
+
#
|
1083
|
+
# # Call the create_snapshot method.
|
1084
|
+
# result = client.create_snapshot request
|
1085
|
+
#
|
1086
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1087
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1088
|
+
# # Here is how to wait for a response.
|
1089
|
+
# result.wait_until_done! timeout: 60
|
1090
|
+
# if result.response?
|
1091
|
+
# p result.response
|
1092
|
+
# else
|
1093
|
+
# puts "No response received."
|
1094
|
+
# end
|
1095
|
+
#
|
802
1096
|
def create_snapshot request, options = nil
|
803
1097
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
804
1098
|
|
@@ -863,6 +1157,29 @@ module Google
|
|
863
1157
|
# @return [::Gapic::Operation]
|
864
1158
|
#
|
865
1159
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1160
|
+
#
|
1161
|
+
# @example Basic example
|
1162
|
+
# require "google/cloud/filestore/v1"
|
1163
|
+
#
|
1164
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1165
|
+
# client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
|
1166
|
+
#
|
1167
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1168
|
+
# request = Google::Cloud::Filestore::V1::DeleteSnapshotRequest.new
|
1169
|
+
#
|
1170
|
+
# # Call the delete_snapshot method.
|
1171
|
+
# result = client.delete_snapshot request
|
1172
|
+
#
|
1173
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1174
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1175
|
+
# # Here is how to wait for a response.
|
1176
|
+
# result.wait_until_done! timeout: 60
|
1177
|
+
# if result.response?
|
1178
|
+
# p result.response
|
1179
|
+
# else
|
1180
|
+
# puts "No response received."
|
1181
|
+
# end
|
1182
|
+
#
|
866
1183
|
def delete_snapshot request, options = nil
|
867
1184
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
868
1185
|
|
@@ -929,6 +1246,29 @@ module Google
|
|
929
1246
|
# @return [::Gapic::Operation]
|
930
1247
|
#
|
931
1248
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1249
|
+
#
|
1250
|
+
# @example Basic example
|
1251
|
+
# require "google/cloud/filestore/v1"
|
1252
|
+
#
|
1253
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1254
|
+
# client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
|
1255
|
+
#
|
1256
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1257
|
+
# request = Google::Cloud::Filestore::V1::UpdateSnapshotRequest.new
|
1258
|
+
#
|
1259
|
+
# # Call the update_snapshot method.
|
1260
|
+
# result = client.update_snapshot request
|
1261
|
+
#
|
1262
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1263
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1264
|
+
# # Here is how to wait for a response.
|
1265
|
+
# result.wait_until_done! timeout: 60
|
1266
|
+
# if result.response?
|
1267
|
+
# p result.response
|
1268
|
+
# else
|
1269
|
+
# puts "No response received."
|
1270
|
+
# end
|
1271
|
+
#
|
932
1272
|
def update_snapshot request, options = nil
|
933
1273
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
934
1274
|
|
@@ -1007,6 +1347,26 @@ module Google
|
|
1007
1347
|
# @return [::Google::Cloud::Filestore::V1::ListBackupsResponse]
|
1008
1348
|
#
|
1009
1349
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1350
|
+
#
|
1351
|
+
# @example Basic example
|
1352
|
+
# require "google/cloud/filestore/v1"
|
1353
|
+
#
|
1354
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1355
|
+
# client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
|
1356
|
+
#
|
1357
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1358
|
+
# request = Google::Cloud::Filestore::V1::ListBackupsRequest.new
|
1359
|
+
#
|
1360
|
+
# # Call the list_backups method.
|
1361
|
+
# result = client.list_backups request
|
1362
|
+
#
|
1363
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1364
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1365
|
+
# result.each do |item|
|
1366
|
+
# # Each element is of type ::Google::Cloud::Filestore::V1::Backup.
|
1367
|
+
# p item
|
1368
|
+
# end
|
1369
|
+
#
|
1010
1370
|
def list_backups request, options = nil
|
1011
1371
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1012
1372
|
|
@@ -1070,6 +1430,22 @@ module Google
|
|
1070
1430
|
# @return [::Google::Cloud::Filestore::V1::Backup]
|
1071
1431
|
#
|
1072
1432
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1433
|
+
#
|
1434
|
+
# @example Basic example
|
1435
|
+
# require "google/cloud/filestore/v1"
|
1436
|
+
#
|
1437
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1438
|
+
# client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
|
1439
|
+
#
|
1440
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1441
|
+
# request = Google::Cloud::Filestore::V1::GetBackupRequest.new
|
1442
|
+
#
|
1443
|
+
# # Call the get_backup method.
|
1444
|
+
# result = client.get_backup request
|
1445
|
+
#
|
1446
|
+
# # The returned object is of type Google::Cloud::Filestore::V1::Backup.
|
1447
|
+
# p result
|
1448
|
+
#
|
1073
1449
|
def get_backup request, options = nil
|
1074
1450
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1075
1451
|
|
@@ -1144,6 +1520,29 @@ module Google
|
|
1144
1520
|
# @return [::Gapic::Operation]
|
1145
1521
|
#
|
1146
1522
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1523
|
+
#
|
1524
|
+
# @example Basic example
|
1525
|
+
# require "google/cloud/filestore/v1"
|
1526
|
+
#
|
1527
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1528
|
+
# client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
|
1529
|
+
#
|
1530
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1531
|
+
# request = Google::Cloud::Filestore::V1::CreateBackupRequest.new
|
1532
|
+
#
|
1533
|
+
# # Call the create_backup method.
|
1534
|
+
# result = client.create_backup request
|
1535
|
+
#
|
1536
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1537
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1538
|
+
# # Here is how to wait for a response.
|
1539
|
+
# result.wait_until_done! timeout: 60
|
1540
|
+
# if result.response?
|
1541
|
+
# p result.response
|
1542
|
+
# else
|
1543
|
+
# puts "No response received."
|
1544
|
+
# end
|
1545
|
+
#
|
1147
1546
|
def create_backup request, options = nil
|
1148
1547
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1149
1548
|
|
@@ -1208,6 +1607,29 @@ module Google
|
|
1208
1607
|
# @return [::Gapic::Operation]
|
1209
1608
|
#
|
1210
1609
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1610
|
+
#
|
1611
|
+
# @example Basic example
|
1612
|
+
# require "google/cloud/filestore/v1"
|
1613
|
+
#
|
1614
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1615
|
+
# client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
|
1616
|
+
#
|
1617
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1618
|
+
# request = Google::Cloud::Filestore::V1::DeleteBackupRequest.new
|
1619
|
+
#
|
1620
|
+
# # Call the delete_backup method.
|
1621
|
+
# result = client.delete_backup request
|
1622
|
+
#
|
1623
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1624
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1625
|
+
# # Here is how to wait for a response.
|
1626
|
+
# result.wait_until_done! timeout: 60
|
1627
|
+
# if result.response?
|
1628
|
+
# p result.response
|
1629
|
+
# else
|
1630
|
+
# puts "No response received."
|
1631
|
+
# end
|
1632
|
+
#
|
1211
1633
|
def delete_backup request, options = nil
|
1212
1634
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1213
1635
|
|
@@ -1274,6 +1696,29 @@ module Google
|
|
1274
1696
|
# @return [::Gapic::Operation]
|
1275
1697
|
#
|
1276
1698
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1699
|
+
#
|
1700
|
+
# @example Basic example
|
1701
|
+
# require "google/cloud/filestore/v1"
|
1702
|
+
#
|
1703
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1704
|
+
# client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
|
1705
|
+
#
|
1706
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1707
|
+
# request = Google::Cloud::Filestore::V1::UpdateBackupRequest.new
|
1708
|
+
#
|
1709
|
+
# # Call the update_backup method.
|
1710
|
+
# result = client.update_backup request
|
1711
|
+
#
|
1712
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1713
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1714
|
+
# # Here is how to wait for a response.
|
1715
|
+
# result.wait_until_done! timeout: 60
|
1716
|
+
# if result.response?
|
1717
|
+
# p result.response
|
1718
|
+
# else
|
1719
|
+
# puts "No response received."
|
1720
|
+
# end
|
1721
|
+
#
|
1277
1722
|
def update_backup request, options = nil
|
1278
1723
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1279
1724
|
|
@@ -1398,6 +1843,13 @@ module Google
|
|
1398
1843
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1399
1844
|
config_attr :quota_project, nil, ::String, nil
|
1400
1845
|
|
1846
|
+
# @private
|
1847
|
+
# Overrides for http bindings for the RPCs of this service
|
1848
|
+
# are only used when this service is used as mixin, and only
|
1849
|
+
# by the host service.
|
1850
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
1851
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
1852
|
+
|
1401
1853
|
# @private
|
1402
1854
|
def initialize parent_config = nil
|
1403
1855
|
@parent_config = parent_config unless parent_config.nil?
|
@@ -1461,6 +1913,11 @@ module Google
|
|
1461
1913
|
#
|
1462
1914
|
attr_reader :restore_instance
|
1463
1915
|
##
|
1916
|
+
# RPC-specific configuration for `revert_instance`
|
1917
|
+
# @return [::Gapic::Config::Method]
|
1918
|
+
#
|
1919
|
+
attr_reader :revert_instance
|
1920
|
+
##
|
1464
1921
|
# RPC-specific configuration for `delete_instance`
|
1465
1922
|
# @return [::Gapic::Config::Method]
|
1466
1923
|
#
|
@@ -1528,6 +1985,8 @@ module Google
|
|
1528
1985
|
@update_instance = ::Gapic::Config::Method.new update_instance_config
|
1529
1986
|
restore_instance_config = parent_rpcs.restore_instance if parent_rpcs.respond_to? :restore_instance
|
1530
1987
|
@restore_instance = ::Gapic::Config::Method.new restore_instance_config
|
1988
|
+
revert_instance_config = parent_rpcs.revert_instance if parent_rpcs.respond_to? :revert_instance
|
1989
|
+
@revert_instance = ::Gapic::Config::Method.new revert_instance_config
|
1531
1990
|
delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance
|
1532
1991
|
@delete_instance = ::Gapic::Config::Method.new delete_instance_config
|
1533
1992
|
list_snapshots_config = parent_rpcs.list_snapshots if parent_rpcs.respond_to? :list_snapshots
|