google-cloud-filestore-v1 0.1.1 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0dda529b13b339aab951e233f494c412e31546bc2f5e8d81ac44a006defddb9a
4
- data.tar.gz: 5ddd5c42d945d468fb210ec8755bfb6b63e006f02786b083c5074ba9e5b0572a
3
+ metadata.gz: c8e835ec00127e7323977e718266ba78ff3b9f4840567e8c36dc6f9e87d1cff2
4
+ data.tar.gz: 430ab144ff5ef136544cb2cd9cb351929554a830ef37aaba4f0cdc979bad2774
5
5
  SHA512:
6
- metadata.gz: 5b8a9aef1de0303cda8d0271ac33f9abf50f7613b207e8b38868ea3d4f0bc3d4b3a78ef6a00699855a7cd7b78f3f3678c4ec567a87928b6971c4f574db75d35e
7
- data.tar.gz: 2fe764ad69c6ef2f1ef7d945f8ac19acafd5f37298f5ced429e21d0069512f3e00c70578c271aefb965db2a35e8781ca73206867a03136f4604e1c719d14cda9
6
+ metadata.gz: 9e490e9ef17d32fa6356328940072769ab9e7ed2a3692a19bec13f23a052fce6021d87b0ae9400a9d776fd421b893fc9760cbfaadaa4c48757e3096647115ae7
7
+ data.tar.gz: d7c89714e6d3fa323472dadd20b58b69f9ed3907c4bbc736698536a6a27816a34e91cbe112076c9d8986012c1c7233dbe9aa890d3c7671bab468f30d6445a43f
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Filestore V1 API
2
+ --title="Filestore V1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -118,15 +118,6 @@ To configure your system for this, simply:
118
118
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
119
119
  *should* only be used during development.
120
120
 
121
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
122
- [dev-console]: https://console.cloud.google.com/project
123
-
124
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
125
-
126
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
127
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
128
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
129
-
130
121
  ## Creating a Service Account
131
122
 
132
123
  Google Cloud requires **Service Account Credentials** to
@@ -137,31 +128,22 @@ If you are not running this client within
137
128
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
138
129
  need a Google Developers service account.
139
130
 
140
- 1. Visit the [Google Developers Console][dev-console].
131
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
141
132
  2. Create a new project or click on an existing project.
142
- 3. Activate the slide-out navigation tray and select **API Manager**. From
133
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
143
134
  here, you will enable the APIs that your application requires.
144
135
 
145
- ![Enable the APIs that your application requires][enable-apis]
146
-
147
136
  *Note: You may need to enable billing in order to use these services.*
148
137
 
149
138
  4. Select **Credentials** from the side navigation.
150
139
 
151
- You should see a screen like one of the following.
152
-
153
- ![Create a new service account][create-new-service-account]
154
-
155
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
156
-
157
- Find the "Add credentials" drop down and select "Service account" to be
158
- guided through downloading a new JSON key file.
140
+ Find the "Create credentials" drop down near the top of the page, and select
141
+ "Service account" to be guided through downloading a new JSON key file.
159
142
 
160
143
  If you want to re-use an existing service account, you can easily generate a
161
- new key file. Just select the account you wish to re-use, and click "Generate
162
- new JSON key":
163
-
164
- ![Re-use an existing service account][reuse-service-account]
144
+ new key file. Just select the account you wish to re-use, click the pencil
145
+ tool on the right side to edit the service account, select the **Keys** tab,
146
+ and then select **Add Key**.
165
147
 
166
148
  The key file you download will be used by this library to authenticate API
167
149
  requests and should be stored in a secure location.
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::Filestore::V1::ListInstancesRequest.new # (request fi
37
37
  response = client.list_instances request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-filestore-v1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-filestore-v1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/filestore/)
@@ -69,16 +69,21 @@ module GRPC
69
69
  end
70
70
  ```
71
71
 
72
+
73
+ ## Google Cloud Samples
74
+
75
+ To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
76
+
72
77
  ## Supported Ruby Versions
73
78
 
74
- This library is supported on Ruby 2.5+.
79
+ This library is supported on Ruby 2.6+.
75
80
 
76
81
  Google provides official support for Ruby versions that are actively supported
77
82
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
78
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
79
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
80
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
81
- about the Ruby support schedule.
83
+ in security maintenance, and not end of life. Older versions of Ruby _may_
84
+ still work, but are unsupported and not recommended. See
85
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
86
+ support schedule.
82
87
 
83
88
  ## Which client should I use?
84
89
 
@@ -187,6 +187,7 @@ module Google
187
187
 
188
188
  @operations_client = Operations.new do |config|
189
189
  config.credentials = credentials
190
+ config.quota_project = @quota_project_id
190
191
  config.endpoint = @config.endpoint
191
192
  end
192
193
 
@@ -251,6 +252,27 @@ module Google
251
252
  #
252
253
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
253
254
  #
255
+ # @example Basic example
256
+ # require "google/cloud/filestore/v1"
257
+ #
258
+ # # Create a client object. The client can be reused for multiple calls.
259
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
260
+ #
261
+ # # Create a request. To set request fields, pass in keyword arguments.
262
+ # request = Google::Cloud::Filestore::V1::ListInstancesRequest.new
263
+ #
264
+ # # Call the list_instances method.
265
+ # result = client.list_instances request
266
+ #
267
+ # # The returned object is of type Gapic::PagedEnumerable. You can
268
+ # # iterate over all elements by calling #each, and the enumerable
269
+ # # will lazily make API calls to fetch subsequent pages. Other
270
+ # # methods are also available for managing paging directly.
271
+ # result.each do |response|
272
+ # # Each element is of type ::Google::Cloud::Filestore::V1::Instance.
273
+ # p response
274
+ # end
275
+ #
254
276
  def list_instances request, options = nil
255
277
  raise ::ArgumentError, "request must be provided" if request.nil?
256
278
 
@@ -268,9 +290,11 @@ module Google
268
290
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
269
291
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
270
292
 
271
- header_params = {
272
- "parent" => request.parent
273
- }
293
+ header_params = {}
294
+ if request.parent
295
+ header_params["parent"] = request.parent
296
+ end
297
+
274
298
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
275
299
  metadata[:"x-goog-request-params"] ||= request_params_header
276
300
 
@@ -321,6 +345,21 @@ module Google
321
345
  #
322
346
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
323
347
  #
348
+ # @example Basic example
349
+ # require "google/cloud/filestore/v1"
350
+ #
351
+ # # Create a client object. The client can be reused for multiple calls.
352
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
353
+ #
354
+ # # Create a request. To set request fields, pass in keyword arguments.
355
+ # request = Google::Cloud::Filestore::V1::GetInstanceRequest.new
356
+ #
357
+ # # Call the get_instance method.
358
+ # result = client.get_instance request
359
+ #
360
+ # # The returned object is of type Google::Cloud::Filestore::V1::Instance.
361
+ # p result
362
+ #
324
363
  def get_instance request, options = nil
325
364
  raise ::ArgumentError, "request must be provided" if request.nil?
326
365
 
@@ -338,9 +377,11 @@ module Google
338
377
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
339
378
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
340
379
 
341
- header_params = {
342
- "name" => request.name
343
- }
380
+ header_params = {}
381
+ if request.name
382
+ header_params["name"] = request.name
383
+ end
384
+
344
385
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
345
386
  metadata[:"x-goog-request-params"] ||= request_params_header
346
387
 
@@ -399,6 +440,28 @@ module Google
399
440
  #
400
441
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
401
442
  #
443
+ # @example Basic example
444
+ # require "google/cloud/filestore/v1"
445
+ #
446
+ # # Create a client object. The client can be reused for multiple calls.
447
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
448
+ #
449
+ # # Create a request. To set request fields, pass in keyword arguments.
450
+ # request = Google::Cloud::Filestore::V1::CreateInstanceRequest.new
451
+ #
452
+ # # Call the create_instance method.
453
+ # result = client.create_instance request
454
+ #
455
+ # # The returned object is of type Gapic::Operation. You can use this
456
+ # # object to check the status of an operation, cancel it, or wait
457
+ # # for results. Here is how to block until completion:
458
+ # result.wait_until_done! timeout: 60
459
+ # if result.response?
460
+ # p result.response
461
+ # else
462
+ # puts "Error!"
463
+ # end
464
+ #
402
465
  def create_instance request, options = nil
403
466
  raise ::ArgumentError, "request must be provided" if request.nil?
404
467
 
@@ -416,9 +479,11 @@ module Google
416
479
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
417
480
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
418
481
 
419
- header_params = {
420
- "parent" => request.parent
421
- }
482
+ header_params = {}
483
+ if request.parent
484
+ header_params["parent"] = request.parent
485
+ end
486
+
422
487
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
423
488
  metadata[:"x-goog-request-params"] ||= request_params_header
424
489
 
@@ -476,6 +541,28 @@ module Google
476
541
  #
477
542
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
478
543
  #
544
+ # @example Basic example
545
+ # require "google/cloud/filestore/v1"
546
+ #
547
+ # # Create a client object. The client can be reused for multiple calls.
548
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
549
+ #
550
+ # # Create a request. To set request fields, pass in keyword arguments.
551
+ # request = Google::Cloud::Filestore::V1::UpdateInstanceRequest.new
552
+ #
553
+ # # Call the update_instance method.
554
+ # result = client.update_instance request
555
+ #
556
+ # # The returned object is of type Gapic::Operation. You can use this
557
+ # # object to check the status of an operation, cancel it, or wait
558
+ # # for results. Here is how to block until completion:
559
+ # result.wait_until_done! timeout: 60
560
+ # if result.response?
561
+ # p result.response
562
+ # else
563
+ # puts "Error!"
564
+ # end
565
+ #
479
566
  def update_instance request, options = nil
480
567
  raise ::ArgumentError, "request must be provided" if request.nil?
481
568
 
@@ -493,9 +580,11 @@ module Google
493
580
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
494
581
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
495
582
 
496
- header_params = {
497
- "instance.name" => request.instance.name
498
- }
583
+ header_params = {}
584
+ if request.instance&.name
585
+ header_params["instance.name"] = request.instance.name
586
+ end
587
+
499
588
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
500
589
  metadata[:"x-goog-request-params"] ||= request_params_header
501
590
 
@@ -556,6 +645,28 @@ module Google
556
645
  #
557
646
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
558
647
  #
648
+ # @example Basic example
649
+ # require "google/cloud/filestore/v1"
650
+ #
651
+ # # Create a client object. The client can be reused for multiple calls.
652
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
653
+ #
654
+ # # Create a request. To set request fields, pass in keyword arguments.
655
+ # request = Google::Cloud::Filestore::V1::RestoreInstanceRequest.new
656
+ #
657
+ # # Call the restore_instance method.
658
+ # result = client.restore_instance request
659
+ #
660
+ # # The returned object is of type Gapic::Operation. You can use this
661
+ # # object to check the status of an operation, cancel it, or wait
662
+ # # for results. Here is how to block until completion:
663
+ # result.wait_until_done! timeout: 60
664
+ # if result.response?
665
+ # p result.response
666
+ # else
667
+ # puts "Error!"
668
+ # end
669
+ #
559
670
  def restore_instance request, options = nil
560
671
  raise ::ArgumentError, "request must be provided" if request.nil?
561
672
 
@@ -573,9 +684,11 @@ module Google
573
684
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
574
685
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
575
686
 
576
- header_params = {
577
- "name" => request.name
578
- }
687
+ header_params = {}
688
+ if request.name
689
+ header_params["name"] = request.name
690
+ end
691
+
579
692
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
580
693
  metadata[:"x-goog-request-params"] ||= request_params_header
581
694
 
@@ -626,6 +739,28 @@ module Google
626
739
  #
627
740
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
628
741
  #
742
+ # @example Basic example
743
+ # require "google/cloud/filestore/v1"
744
+ #
745
+ # # Create a client object. The client can be reused for multiple calls.
746
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
747
+ #
748
+ # # Create a request. To set request fields, pass in keyword arguments.
749
+ # request = Google::Cloud::Filestore::V1::DeleteInstanceRequest.new
750
+ #
751
+ # # Call the delete_instance method.
752
+ # result = client.delete_instance request
753
+ #
754
+ # # The returned object is of type Gapic::Operation. You can use this
755
+ # # object to check the status of an operation, cancel it, or wait
756
+ # # for results. Here is how to block until completion:
757
+ # result.wait_until_done! timeout: 60
758
+ # if result.response?
759
+ # p result.response
760
+ # else
761
+ # puts "Error!"
762
+ # end
763
+ #
629
764
  def delete_instance request, options = nil
630
765
  raise ::ArgumentError, "request must be provided" if request.nil?
631
766
 
@@ -643,9 +778,11 @@ module Google
643
778
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
644
779
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
645
780
 
646
- header_params = {
647
- "name" => request.name
648
- }
781
+ header_params = {}
782
+ if request.name
783
+ header_params["name"] = request.name
784
+ end
785
+
649
786
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
650
787
  metadata[:"x-goog-request-params"] ||= request_params_header
651
788
 
@@ -710,6 +847,27 @@ module Google
710
847
  #
711
848
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
712
849
  #
850
+ # @example Basic example
851
+ # require "google/cloud/filestore/v1"
852
+ #
853
+ # # Create a client object. The client can be reused for multiple calls.
854
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
855
+ #
856
+ # # Create a request. To set request fields, pass in keyword arguments.
857
+ # request = Google::Cloud::Filestore::V1::ListBackupsRequest.new
858
+ #
859
+ # # Call the list_backups method.
860
+ # result = client.list_backups request
861
+ #
862
+ # # The returned object is of type Gapic::PagedEnumerable. You can
863
+ # # iterate over all elements by calling #each, and the enumerable
864
+ # # will lazily make API calls to fetch subsequent pages. Other
865
+ # # methods are also available for managing paging directly.
866
+ # result.each do |response|
867
+ # # Each element is of type ::Google::Cloud::Filestore::V1::Backup.
868
+ # p response
869
+ # end
870
+ #
713
871
  def list_backups request, options = nil
714
872
  raise ::ArgumentError, "request must be provided" if request.nil?
715
873
 
@@ -727,9 +885,11 @@ module Google
727
885
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
728
886
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
729
887
 
730
- header_params = {
731
- "parent" => request.parent
732
- }
888
+ header_params = {}
889
+ if request.parent
890
+ header_params["parent"] = request.parent
891
+ end
892
+
733
893
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
734
894
  metadata[:"x-goog-request-params"] ||= request_params_header
735
895
 
@@ -780,6 +940,21 @@ module Google
780
940
  #
781
941
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
782
942
  #
943
+ # @example Basic example
944
+ # require "google/cloud/filestore/v1"
945
+ #
946
+ # # Create a client object. The client can be reused for multiple calls.
947
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
948
+ #
949
+ # # Create a request. To set request fields, pass in keyword arguments.
950
+ # request = Google::Cloud::Filestore::V1::GetBackupRequest.new
951
+ #
952
+ # # Call the get_backup method.
953
+ # result = client.get_backup request
954
+ #
955
+ # # The returned object is of type Google::Cloud::Filestore::V1::Backup.
956
+ # p result
957
+ #
783
958
  def get_backup request, options = nil
784
959
  raise ::ArgumentError, "request must be provided" if request.nil?
785
960
 
@@ -797,9 +972,11 @@ module Google
797
972
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
798
973
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
799
974
 
800
- header_params = {
801
- "name" => request.name
802
- }
975
+ header_params = {}
976
+ if request.name
977
+ header_params["name"] = request.name
978
+ end
979
+
803
980
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
804
981
  metadata[:"x-goog-request-params"] ||= request_params_header
805
982
 
@@ -860,6 +1037,28 @@ module Google
860
1037
  #
861
1038
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
862
1039
  #
1040
+ # @example Basic example
1041
+ # require "google/cloud/filestore/v1"
1042
+ #
1043
+ # # Create a client object. The client can be reused for multiple calls.
1044
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
1045
+ #
1046
+ # # Create a request. To set request fields, pass in keyword arguments.
1047
+ # request = Google::Cloud::Filestore::V1::CreateBackupRequest.new
1048
+ #
1049
+ # # Call the create_backup method.
1050
+ # result = client.create_backup request
1051
+ #
1052
+ # # The returned object is of type Gapic::Operation. You can use this
1053
+ # # object to check the status of an operation, cancel it, or wait
1054
+ # # for results. Here is how to block until completion:
1055
+ # result.wait_until_done! timeout: 60
1056
+ # if result.response?
1057
+ # p result.response
1058
+ # else
1059
+ # puts "Error!"
1060
+ # end
1061
+ #
863
1062
  def create_backup request, options = nil
864
1063
  raise ::ArgumentError, "request must be provided" if request.nil?
865
1064
 
@@ -877,9 +1076,11 @@ module Google
877
1076
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
878
1077
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
879
1078
 
880
- header_params = {
881
- "parent" => request.parent
882
- }
1079
+ header_params = {}
1080
+ if request.parent
1081
+ header_params["parent"] = request.parent
1082
+ end
1083
+
883
1084
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
884
1085
  metadata[:"x-goog-request-params"] ||= request_params_header
885
1086
 
@@ -930,6 +1131,28 @@ module Google
930
1131
  #
931
1132
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
932
1133
  #
1134
+ # @example Basic example
1135
+ # require "google/cloud/filestore/v1"
1136
+ #
1137
+ # # Create a client object. The client can be reused for multiple calls.
1138
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
1139
+ #
1140
+ # # Create a request. To set request fields, pass in keyword arguments.
1141
+ # request = Google::Cloud::Filestore::V1::DeleteBackupRequest.new
1142
+ #
1143
+ # # Call the delete_backup method.
1144
+ # result = client.delete_backup request
1145
+ #
1146
+ # # The returned object is of type Gapic::Operation. You can use this
1147
+ # # object to check the status of an operation, cancel it, or wait
1148
+ # # for results. Here is how to block until completion:
1149
+ # result.wait_until_done! timeout: 60
1150
+ # if result.response?
1151
+ # p result.response
1152
+ # else
1153
+ # puts "Error!"
1154
+ # end
1155
+ #
933
1156
  def delete_backup request, options = nil
934
1157
  raise ::ArgumentError, "request must be provided" if request.nil?
935
1158
 
@@ -947,9 +1170,11 @@ module Google
947
1170
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
948
1171
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
949
1172
 
950
- header_params = {
951
- "name" => request.name
952
- }
1173
+ header_params = {}
1174
+ if request.name
1175
+ header_params["name"] = request.name
1176
+ end
1177
+
953
1178
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
954
1179
  metadata[:"x-goog-request-params"] ||= request_params_header
955
1180
 
@@ -1002,6 +1227,28 @@ module Google
1002
1227
  #
1003
1228
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1004
1229
  #
1230
+ # @example Basic example
1231
+ # require "google/cloud/filestore/v1"
1232
+ #
1233
+ # # Create a client object. The client can be reused for multiple calls.
1234
+ # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
1235
+ #
1236
+ # # Create a request. To set request fields, pass in keyword arguments.
1237
+ # request = Google::Cloud::Filestore::V1::UpdateBackupRequest.new
1238
+ #
1239
+ # # Call the update_backup method.
1240
+ # result = client.update_backup request
1241
+ #
1242
+ # # The returned object is of type Gapic::Operation. You can use this
1243
+ # # object to check the status of an operation, cancel it, or wait
1244
+ # # for results. Here is how to block until completion:
1245
+ # result.wait_until_done! timeout: 60
1246
+ # if result.response?
1247
+ # p result.response
1248
+ # else
1249
+ # puts "Error!"
1250
+ # end
1251
+ #
1005
1252
  def update_backup request, options = nil
1006
1253
  raise ::ArgumentError, "request must be provided" if request.nil?
1007
1254
 
@@ -1019,9 +1266,11 @@ module Google
1019
1266
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
1020
1267
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1021
1268
 
1022
- header_params = {
1023
- "backup.name" => request.backup.name
1024
- }
1269
+ header_params = {}
1270
+ if request.backup&.name
1271
+ header_params["backup.name"] = request.backup.name
1272
+ end
1273
+
1025
1274
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1026
1275
  metadata[:"x-goog-request-params"] ||= request_params_header
1027
1276
 
@@ -95,6 +95,9 @@ module Google
95
95
  channel_args: @config.channel_args,
96
96
  interceptors: @config.interceptors
97
97
  )
98
+
99
+ # Used by an LRO wrapper for some methods of this service
100
+ @operations_client = self
98
101
  end
99
102
 
100
103
  # Service calls
@@ -143,6 +146,27 @@ module Google
143
146
  #
144
147
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
148
  #
149
+ # @example Basic example
150
+ # require "google/longrunning"
151
+ #
152
+ # # Create a client object. The client can be reused for multiple calls.
153
+ # client = Google::Longrunning::Operations::Client.new
154
+ #
155
+ # # Create a request. To set request fields, pass in keyword arguments.
156
+ # request = Google::Longrunning::ListOperationsRequest.new
157
+ #
158
+ # # Call the list_operations method.
159
+ # result = client.list_operations request
160
+ #
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can
162
+ # # iterate over all elements by calling #each, and the enumerable
163
+ # # will lazily make API calls to fetch subsequent pages. Other
164
+ # # methods are also available for managing paging directly.
165
+ # result.each do |response|
166
+ # # Each element is of type ::Google::Longrunning::Operation.
167
+ # p response
168
+ # end
169
+ #
146
170
  def list_operations request, options = nil
147
171
  raise ::ArgumentError, "request must be provided" if request.nil?
148
172
 
@@ -160,9 +184,11 @@ module Google
160
184
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
161
185
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
162
186
 
163
- header_params = {
164
- "name" => request.name
165
- }
187
+ header_params = {}
188
+ if request.name
189
+ header_params["name"] = request.name
190
+ end
191
+
166
192
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
167
193
  metadata[:"x-goog-request-params"] ||= request_params_header
168
194
 
@@ -215,6 +241,28 @@ module Google
215
241
  #
216
242
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
217
243
  #
244
+ # @example Basic example
245
+ # require "google/longrunning"
246
+ #
247
+ # # Create a client object. The client can be reused for multiple calls.
248
+ # client = Google::Longrunning::Operations::Client.new
249
+ #
250
+ # # Create a request. To set request fields, pass in keyword arguments.
251
+ # request = Google::Longrunning::GetOperationRequest.new
252
+ #
253
+ # # Call the get_operation method.
254
+ # result = client.get_operation request
255
+ #
256
+ # # The returned object is of type Gapic::Operation. You can use this
257
+ # # object to check the status of an operation, cancel it, or wait
258
+ # # for results. Here is how to block until completion:
259
+ # result.wait_until_done! timeout: 60
260
+ # if result.response?
261
+ # p result.response
262
+ # else
263
+ # puts "Error!"
264
+ # end
265
+ #
218
266
  def get_operation request, options = nil
219
267
  raise ::ArgumentError, "request must be provided" if request.nil?
220
268
 
@@ -232,9 +280,11 @@ module Google
232
280
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
233
281
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
282
 
235
- header_params = {
236
- "name" => request.name
237
- }
283
+ header_params = {}
284
+ if request.name
285
+ header_params["name"] = request.name
286
+ end
287
+
238
288
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
239
289
  metadata[:"x-goog-request-params"] ||= request_params_header
240
290
 
@@ -287,6 +337,21 @@ module Google
287
337
  #
288
338
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
289
339
  #
340
+ # @example Basic example
341
+ # require "google/longrunning"
342
+ #
343
+ # # Create a client object. The client can be reused for multiple calls.
344
+ # client = Google::Longrunning::Operations::Client.new
345
+ #
346
+ # # Create a request. To set request fields, pass in keyword arguments.
347
+ # request = Google::Longrunning::DeleteOperationRequest.new
348
+ #
349
+ # # Call the delete_operation method.
350
+ # result = client.delete_operation request
351
+ #
352
+ # # The returned object is of type Google::Protobuf::Empty.
353
+ # p result
354
+ #
290
355
  def delete_operation request, options = nil
291
356
  raise ::ArgumentError, "request must be provided" if request.nil?
292
357
 
@@ -304,9 +369,11 @@ module Google
304
369
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
305
370
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
306
371
 
307
- header_params = {
308
- "name" => request.name
309
- }
372
+ header_params = {}
373
+ if request.name
374
+ header_params["name"] = request.name
375
+ end
376
+
310
377
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
311
378
  metadata[:"x-goog-request-params"] ||= request_params_header
312
379
 
@@ -364,6 +431,21 @@ module Google
364
431
  #
365
432
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
366
433
  #
434
+ # @example Basic example
435
+ # require "google/longrunning"
436
+ #
437
+ # # Create a client object. The client can be reused for multiple calls.
438
+ # client = Google::Longrunning::Operations::Client.new
439
+ #
440
+ # # Create a request. To set request fields, pass in keyword arguments.
441
+ # request = Google::Longrunning::CancelOperationRequest.new
442
+ #
443
+ # # Call the cancel_operation method.
444
+ # result = client.cancel_operation request
445
+ #
446
+ # # The returned object is of type Google::Protobuf::Empty.
447
+ # p result
448
+ #
367
449
  def cancel_operation request, options = nil
368
450
  raise ::ArgumentError, "request must be provided" if request.nil?
369
451
 
@@ -381,9 +463,11 @@ module Google
381
463
  gapic_version: ::Google::Cloud::Filestore::V1::VERSION
382
464
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
383
465
 
384
- header_params = {
385
- "name" => request.name
386
- }
466
+ header_params = {}
467
+ if request.name
468
+ header_params["name"] = request.name
469
+ end
470
+
387
471
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
388
472
  metadata[:"x-goog-request-params"] ||= request_params_header
389
473
 
@@ -444,6 +528,28 @@ module Google
444
528
  #
445
529
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
446
530
  #
531
+ # @example Basic example
532
+ # require "google/longrunning"
533
+ #
534
+ # # Create a client object. The client can be reused for multiple calls.
535
+ # client = Google::Longrunning::Operations::Client.new
536
+ #
537
+ # # Create a request. To set request fields, pass in keyword arguments.
538
+ # request = Google::Longrunning::WaitOperationRequest.new
539
+ #
540
+ # # Call the wait_operation method.
541
+ # result = client.wait_operation request
542
+ #
543
+ # # The returned object is of type Gapic::Operation. You can use this
544
+ # # object to check the status of an operation, cancel it, or wait
545
+ # # for results. Here is how to block until completion:
546
+ # result.wait_until_done! timeout: 60
547
+ # if result.response?
548
+ # p result.response
549
+ # else
550
+ # puts "Error!"
551
+ # end
552
+ #
447
553
  def wait_operation request, options = nil
448
554
  raise ::ArgumentError, "request must be provided" if request.nil?
449
555
 
@@ -1,6 +1,8 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/filestore/v1/cloud_filestore_service.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/api/field_behavior_pb'
@@ -10,7 +12,6 @@ require 'google/longrunning/operations_pb'
10
12
  require 'google/protobuf/field_mask_pb'
11
13
  require 'google/protobuf/timestamp_pb'
12
14
  require 'google/protobuf/wrappers_pb'
13
- require 'google/protobuf'
14
15
 
15
16
  Google::Protobuf::DescriptorPool.generated_pool.build do
16
17
  add_file("google/cloud/filestore/v1/cloud_filestore_service.proto", :syntax => :proto3) do
@@ -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.2.0"
25
25
  end
26
26
  end
27
27
  end
@@ -25,6 +25,8 @@ module Google
25
25
  ##
26
26
  # To load this package, including all its services, and instantiate a client:
27
27
  #
28
+ # @example
29
+ #
28
30
  # require "google/cloud/filestore/v1"
29
31
  # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
30
32
  #
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
@@ -44,7 +44,7 @@ module Google
44
44
  # foo = any.unpack(Foo.class);
45
45
  # }
46
46
  #
47
- # Example 3: Pack and unpack a message in Python.
47
+ # Example 3: Pack and unpack a message in Python.
48
48
  #
49
49
  # foo = Foo(...)
50
50
  # any = Any()
@@ -54,7 +54,7 @@ module Google
54
54
  # any.Unpack(foo)
55
55
  # ...
56
56
  #
57
- # Example 4: Pack and unpack a message in Go
57
+ # Example 4: Pack and unpack a message in Go
58
58
  #
59
59
  # foo := &pb.Foo{...}
60
60
  # any, err := anypb.New(foo)
@@ -75,7 +75,7 @@ module Google
75
75
  #
76
76
  #
77
77
  # JSON
78
- # ====
78
+ #
79
79
  # The JSON representation of an `Any` value uses the regular
80
80
  # representation of the deserialized, embedded message, with an
81
81
  # additional field `@type` which contains the type URL. Example:
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.2.0
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: 2022-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.7'
19
+ version: '0.10'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.7'
29
+ version: '0.10'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -64,28 +64,28 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: 1.25.1
67
+ version: 1.26.1
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: 1.25.1
74
+ version: 1.26.1
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: minitest
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '5.14'
81
+ version: '5.16'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '5.14'
88
+ version: '5.16'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: minitest-focus
91
91
  requirement: !ruby/object:Gem::Requirement
@@ -120,14 +120,14 @@ dependencies:
120
120
  requirements:
121
121
  - - ">="
122
122
  - !ruby/object:Gem::Version
123
- version: '12.0'
123
+ version: '13.0'
124
124
  type: :development
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - ">="
129
129
  - !ruby/object:Gem::Version
130
- version: '12.0'
130
+ version: '13.0'
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: redcarpet
133
133
  requirement: !ruby/object:Gem::Requirement
@@ -219,14 +219,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - ">="
221
221
  - !ruby/object:Gem::Version
222
- version: '2.5'
222
+ version: '2.6'
223
223
  required_rubygems_version: !ruby/object:Gem::Requirement
224
224
  requirements:
225
225
  - - ">="
226
226
  - !ruby/object:Gem::Version
227
227
  version: '0'
228
228
  requirements: []
229
- rubygems_version: 3.2.17
229
+ rubygems_version: 3.3.14
230
230
  signing_key:
231
231
  specification_version: 4
232
232
  summary: API Client library for the Filestore V1 API