google-cloud-video-live_stream-v1 0.2.0 → 0.4.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.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +2 -2
  4. data/lib/google/cloud/video/live_stream/v1/bindings_override.rb +104 -0
  5. data/lib/google/cloud/video/live_stream/v1/livestream_service/client.rb +81 -61
  6. data/lib/google/cloud/video/live_stream/v1/livestream_service/operations.rb +14 -16
  7. data/lib/google/cloud/video/live_stream/v1/livestream_service/paths.rb +19 -0
  8. data/lib/google/cloud/video/live_stream/v1/livestream_service/rest/client.rb +1731 -0
  9. data/lib/google/cloud/video/live_stream/v1/livestream_service/rest/operations.rb +795 -0
  10. data/lib/google/cloud/video/live_stream/v1/livestream_service/rest/service_stub.rb +1001 -0
  11. data/lib/google/cloud/video/live_stream/v1/livestream_service/rest.rb +60 -0
  12. data/lib/google/cloud/video/live_stream/v1/livestream_service.rb +7 -1
  13. data/lib/google/cloud/video/live_stream/v1/rest.rb +40 -0
  14. data/lib/google/cloud/video/live_stream/v1/version.rb +1 -1
  15. data/lib/google/cloud/video/live_stream/v1.rb +7 -2
  16. data/lib/google/cloud/video/livestream/v1/outputs_pb.rb +23 -0
  17. data/lib/google/cloud/video/livestream/v1/resources_pb.rb +77 -0
  18. data/proto_docs/google/api/client.rb +324 -0
  19. data/proto_docs/google/api/launch_stage.rb +71 -0
  20. data/proto_docs/google/cloud/video/livestream/v1/outputs.rb +108 -26
  21. data/proto_docs/google/cloud/video/livestream/v1/resources.rb +218 -16
  22. data/proto_docs/google/cloud/video/livestream/v1/service.rb +21 -9
  23. data/proto_docs/google/protobuf/empty.rb +0 -2
  24. data/proto_docs/google/rpc/status.rb +4 -2
  25. data/proto_docs/google/type/datetime.rb +99 -0
  26. metadata +36 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8d45c11cb22727fac334c4ce14ee63344d584da5f9c086d0a1b3675c4c06e98
4
- data.tar.gz: bf76494ca24bf2b8b075c556e4658441a225c9f065c131c4aaf519bf7c51e53d
3
+ metadata.gz: 258c051b3100fe1c7d72dc4dfe5478640e7b13666f9c2bf07397b6c7cd8de2ef
4
+ data.tar.gz: c0318c2e52322e47def2ea9c41c81ec82dfd1caf51f828d7068f537880318227
5
5
  SHA512:
6
- metadata.gz: 547f1c4cb01ed5d7eccb0daf33dedfbbbf9f3981ee4807b51ecc9ff4f5d5bb90147535b8b4cfd65fbbab7a9d0039aa854fd2775b51297ad677b56aa6af5cd6e6
7
- data.tar.gz: 787e346868943c39decc492a257fd60452014430c0d04450618f295ce72acf559168337b0e6dc56e4eac3e449bd69074c536f482c4ffbb2ff7b5572b21059716
6
+ metadata.gz: 222805d85ed7a84a32d7a2a03e660ffa9e05ce816f8b72fb4ee3e7a08f0a6b5674654a6c59a62ad963a7ce2858efde724658fa42dd1991588384b713cb081e2d
7
+ data.tar.gz: 1c3421034ab538d5f38f199963de1c0da62296a017479b2527a43c05086759305648aa417722703543ed35de9e27048e22724d4c52f2e81ba3666ea40898509f
data/AUTHENTICATION.md CHANGED
@@ -112,7 +112,7 @@ credentials are discovered.
112
112
  To configure your system for this, simply:
113
113
 
114
114
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
115
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
115
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
116
116
  3. Write code as if already authenticated.
117
117
 
118
118
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -46,8 +46,8 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
+ or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
53
 
@@ -0,0 +1,104 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/config"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Video
24
+ module LiveStream
25
+ ##
26
+ # @example Loading just the REST part of this package, including all its services, and instantiating a REST client
27
+ #
28
+ # require "google/cloud/video/live_stream/v1/rest"
29
+ # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
30
+ #
31
+ module V1
32
+ ##
33
+ # @private
34
+ # Initialize the mixin bindings configuration
35
+ #
36
+ def self.configure
37
+ @configure ||= begin
38
+ namespace = ["Google", "Cloud", "Video", "LiveStream"]
39
+ parent_config = while namespace.any?
40
+ parent_name = namespace.join "::"
41
+ parent_const = const_get parent_name
42
+ break parent_const.configure if parent_const.respond_to? :configure
43
+ namespace.pop
44
+ end
45
+
46
+ default_config = Configuration.new parent_config
47
+ default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [
48
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
49
+ uri_method: :get,
50
+ uri_template: "/v1/{name}",
51
+ matches: [
52
+ ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
53
+ ],
54
+ body: nil
55
+ )
56
+ ]
57
+ default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [
58
+
59
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
60
+ uri_method: :get,
61
+ uri_template: "/v1/{name}/locations",
62
+ matches: [
63
+ ["name", %r{^projects/[^/]+/?$}, false]
64
+ ],
65
+ body: nil
66
+ )
67
+ ]
68
+ default_config
69
+ end
70
+ yield @configure if block_given?
71
+ @configure
72
+ end
73
+
74
+ ##
75
+ # @private
76
+ # Configuration class for the google.cloud.video.livestream.v1 package.
77
+ #
78
+ # This class contains common configuration for all services
79
+ # of the google.cloud.video.livestream.v1 package.
80
+ #
81
+ # This configuration is for internal use of the client library classes,
82
+ # and it is not intended that the end-users will read or change it.
83
+ #
84
+ class Configuration
85
+ extend ::Gapic::Config
86
+
87
+ # @private
88
+ # Overrides for http bindings for the RPC of the mixins for this package.
89
+ # Services in this package should use these when creating clients for the mixin services.
90
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
91
+ config_attr :bindings_override, {}, ::Hash, nil
92
+
93
+ # @private
94
+ def initialize parent_config = nil
95
+ @parent_config = parent_config unless parent_config.nil?
96
+
97
+ yield self if block_given?
98
+ end
99
+ end
100
+ end
101
+ end
102
+ end
103
+ end
104
+ end
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/video/livestream/v1/service_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -194,6 +195,12 @@ module Google
194
195
  config.endpoint = @config.endpoint
195
196
  end
196
197
 
198
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
199
+ config.credentials = credentials
200
+ config.quota_project = @quota_project_id
201
+ config.endpoint = @config.endpoint
202
+ end
203
+
197
204
  @livestream_service_stub = ::Gapic::ServiceStub.new(
198
205
  ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Stub,
199
206
  credentials: credentials,
@@ -210,6 +217,13 @@ module Google
210
217
  #
211
218
  attr_reader :operations_client
212
219
 
220
+ ##
221
+ # Get the associated client for mix-in of the Locations.
222
+ #
223
+ # @return [Google::Cloud::Location::Locations::Client]
224
+ #
225
+ attr_reader :location_client
226
+
213
227
  # Service calls
214
228
 
215
229
  ##
@@ -275,14 +289,14 @@ module Google
275
289
  # # Call the create_channel method.
276
290
  # result = client.create_channel request
277
291
  #
278
- # # The returned object is of type Gapic::Operation. You can use this
279
- # # object to check the status of an operation, cancel it, or wait
280
- # # for results. Here is how to block until completion:
292
+ # # The returned object is of type Gapic::Operation. You can use it to
293
+ # # check the status of an operation, cancel it, or wait for results.
294
+ # # Here is how to wait for a response.
281
295
  # result.wait_until_done! timeout: 60
282
296
  # if result.response?
283
297
  # p result.response
284
298
  # else
285
- # puts "Error!"
299
+ # puts "No response received."
286
300
  # end
287
301
  #
288
302
  def create_channel request, options = nil
@@ -352,8 +366,8 @@ module Google
352
366
  # The maximum number of items to return. If unspecified, server
353
367
  # will pick an appropriate default. Server may return fewer items than
354
368
  # requested. A caller should only rely on response's
355
- # {::Google::Cloud::Video::LiveStream::V1::ListChannelsResponse#next_page_token next_page_token} to
356
- # determine if there are more items left to be queried.
369
+ # {::Google::Cloud::Video::LiveStream::V1::ListChannelsResponse#next_page_token next_page_token}
370
+ # to determine if there are more items left to be queried.
357
371
  # @param page_token [::String]
358
372
  # The next_page_token value returned from a previous List request, if any.
359
373
  # @param filter [::String]
@@ -382,13 +396,11 @@ module Google
382
396
  # # Call the list_channels method.
383
397
  # result = client.list_channels request
384
398
  #
385
- # # The returned object is of type Gapic::PagedEnumerable. You can
386
- # # iterate over all elements by calling #each, and the enumerable
387
- # # will lazily make API calls to fetch subsequent pages. Other
388
- # # methods are also available for managing paging directly.
389
- # result.each do |response|
399
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
400
+ # # over elements, and API calls will be issued to fetch pages as needed.
401
+ # result.each do |item|
390
402
  # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Channel.
391
- # p response
403
+ # p item
392
404
  # end
393
405
  #
394
406
  def list_channels request, options = nil
@@ -580,14 +592,14 @@ module Google
580
592
  # # Call the delete_channel method.
581
593
  # result = client.delete_channel request
582
594
  #
583
- # # The returned object is of type Gapic::Operation. You can use this
584
- # # object to check the status of an operation, cancel it, or wait
585
- # # for results. Here is how to block until completion:
595
+ # # The returned object is of type Gapic::Operation. You can use it to
596
+ # # check the status of an operation, cancel it, or wait for results.
597
+ # # Here is how to wait for a response.
586
598
  # result.wait_until_done! timeout: 60
587
599
  # if result.response?
588
600
  # p result.response
589
601
  # else
590
- # puts "Error!"
602
+ # puts "No response received."
591
603
  # end
592
604
  #
593
605
  def delete_channel request, options = nil
@@ -655,14 +667,22 @@ module Google
655
667
  # resource by the update. You can only update the following fields:
656
668
  #
657
669
  # * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment)
670
+ # * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig)
658
671
  # * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output)
659
- # * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#ElementaryStream)
672
+ # * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream)
660
673
  # * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream)
661
- # * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#Manifest)
662
- # * [`spritesheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet)
674
+ # * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest)
675
+ # * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet)
676
+ # * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig)
677
+ # * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig)
678
+ # * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption)
663
679
  #
664
680
  # The fields specified in the update_mask are relative to the resource, not
665
681
  # the full request. A field will be overwritten if it is in the mask.
682
+ #
683
+ # If the mask is not present, then each field from the list above is updated
684
+ # if the field appears in the request payload. To unset a field, add the
685
+ # field to the update mask and remove it from the request payload.
666
686
  # @param channel [::Google::Cloud::Video::LiveStream::V1::Channel, ::Hash]
667
687
  # Required. The channel resource to be updated.
668
688
  # @param request_id [::String]
@@ -700,14 +720,14 @@ module Google
700
720
  # # Call the update_channel method.
701
721
  # result = client.update_channel request
702
722
  #
703
- # # The returned object is of type Gapic::Operation. You can use this
704
- # # object to check the status of an operation, cancel it, or wait
705
- # # for results. Here is how to block until completion:
723
+ # # The returned object is of type Gapic::Operation. You can use it to
724
+ # # check the status of an operation, cancel it, or wait for results.
725
+ # # Here is how to wait for a response.
706
726
  # result.wait_until_done! timeout: 60
707
727
  # if result.response?
708
728
  # p result.response
709
729
  # else
710
- # puts "Error!"
730
+ # puts "No response received."
711
731
  # end
712
732
  #
713
733
  def update_channel request, options = nil
@@ -809,14 +829,14 @@ module Google
809
829
  # # Call the start_channel method.
810
830
  # result = client.start_channel request
811
831
  #
812
- # # The returned object is of type Gapic::Operation. You can use this
813
- # # object to check the status of an operation, cancel it, or wait
814
- # # for results. Here is how to block until completion:
832
+ # # The returned object is of type Gapic::Operation. You can use it to
833
+ # # check the status of an operation, cancel it, or wait for results.
834
+ # # Here is how to wait for a response.
815
835
  # result.wait_until_done! timeout: 60
816
836
  # if result.response?
817
837
  # p result.response
818
838
  # else
819
- # puts "Error!"
839
+ # puts "No response received."
820
840
  # end
821
841
  #
822
842
  def start_channel request, options = nil
@@ -918,14 +938,14 @@ module Google
918
938
  # # Call the stop_channel method.
919
939
  # result = client.stop_channel request
920
940
  #
921
- # # The returned object is of type Gapic::Operation. You can use this
922
- # # object to check the status of an operation, cancel it, or wait
923
- # # for results. Here is how to block until completion:
941
+ # # The returned object is of type Gapic::Operation. You can use it to
942
+ # # check the status of an operation, cancel it, or wait for results.
943
+ # # Here is how to wait for a response.
924
944
  # result.wait_until_done! timeout: 60
925
945
  # if result.response?
926
946
  # p result.response
927
947
  # else
928
- # puts "Error!"
948
+ # puts "No response received."
929
949
  # end
930
950
  #
931
951
  def stop_channel request, options = nil
@@ -1032,14 +1052,14 @@ module Google
1032
1052
  # # Call the create_input method.
1033
1053
  # result = client.create_input request
1034
1054
  #
1035
- # # The returned object is of type Gapic::Operation. You can use this
1036
- # # object to check the status of an operation, cancel it, or wait
1037
- # # for results. Here is how to block until completion:
1055
+ # # The returned object is of type Gapic::Operation. You can use it to
1056
+ # # check the status of an operation, cancel it, or wait for results.
1057
+ # # Here is how to wait for a response.
1038
1058
  # result.wait_until_done! timeout: 60
1039
1059
  # if result.response?
1040
1060
  # p result.response
1041
1061
  # else
1042
- # puts "Error!"
1062
+ # puts "No response received."
1043
1063
  # end
1044
1064
  #
1045
1065
  def create_input request, options = nil
@@ -1109,8 +1129,8 @@ module Google
1109
1129
  # The maximum number of items to return. If unspecified, server
1110
1130
  # will pick an appropriate default. Server may return fewer items than
1111
1131
  # requested. A caller should only rely on response's
1112
- # {::Google::Cloud::Video::LiveStream::V1::ListInputsResponse#next_page_token next_page_token} to
1113
- # determine if there are more items left to be queried.
1132
+ # {::Google::Cloud::Video::LiveStream::V1::ListInputsResponse#next_page_token next_page_token}
1133
+ # to determine if there are more items left to be queried.
1114
1134
  # @param page_token [::String]
1115
1135
  # The next_page_token value returned from a previous List request, if any.
1116
1136
  # @param filter [::String]
@@ -1139,13 +1159,11 @@ module Google
1139
1159
  # # Call the list_inputs method.
1140
1160
  # result = client.list_inputs request
1141
1161
  #
1142
- # # The returned object is of type Gapic::PagedEnumerable. You can
1143
- # # iterate over all elements by calling #each, and the enumerable
1144
- # # will lazily make API calls to fetch subsequent pages. Other
1145
- # # methods are also available for managing paging directly.
1146
- # result.each do |response|
1162
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1163
+ # # over elements, and API calls will be issued to fetch pages as needed.
1164
+ # result.each do |item|
1147
1165
  # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Input.
1148
- # p response
1166
+ # p item
1149
1167
  # end
1150
1168
  #
1151
1169
  def list_inputs request, options = nil
@@ -1332,14 +1350,14 @@ module Google
1332
1350
  # # Call the delete_input method.
1333
1351
  # result = client.delete_input request
1334
1352
  #
1335
- # # The returned object is of type Gapic::Operation. You can use this
1336
- # # object to check the status of an operation, cancel it, or wait
1337
- # # for results. Here is how to block until completion:
1353
+ # # The returned object is of type Gapic::Operation. You can use it to
1354
+ # # check the status of an operation, cancel it, or wait for results.
1355
+ # # Here is how to wait for a response.
1338
1356
  # result.wait_until_done! timeout: 60
1339
1357
  # if result.response?
1340
1358
  # p result.response
1341
1359
  # else
1342
- # puts "Error!"
1360
+ # puts "No response received."
1343
1361
  # end
1344
1362
  #
1345
1363
  def delete_input request, options = nil
@@ -1411,6 +1429,10 @@ module Google
1411
1429
  #
1412
1430
  # The fields specified in the update_mask are relative to the resource, not
1413
1431
  # the full request. A field will be overwritten if it is in the mask.
1432
+ #
1433
+ # If the mask is not present, then each field from the list above is updated
1434
+ # if the field appears in the request payload. To unset a field, add the
1435
+ # field to the update mask and remove it from the request payload.
1414
1436
  # @param input [::Google::Cloud::Video::LiveStream::V1::Input, ::Hash]
1415
1437
  # Required. The input resource to be updated.
1416
1438
  # @param request_id [::String]
@@ -1448,14 +1470,14 @@ module Google
1448
1470
  # # Call the update_input method.
1449
1471
  # result = client.update_input request
1450
1472
  #
1451
- # # The returned object is of type Gapic::Operation. You can use this
1452
- # # object to check the status of an operation, cancel it, or wait
1453
- # # for results. Here is how to block until completion:
1473
+ # # The returned object is of type Gapic::Operation. You can use it to
1474
+ # # check the status of an operation, cancel it, or wait for results.
1475
+ # # Here is how to wait for a response.
1454
1476
  # result.wait_until_done! timeout: 60
1455
1477
  # if result.response?
1456
1478
  # p result.response
1457
1479
  # else
1458
- # puts "Error!"
1480
+ # puts "No response received."
1459
1481
  # end
1460
1482
  #
1461
1483
  def update_input request, options = nil
@@ -1631,8 +1653,8 @@ module Google
1631
1653
  # The maximum number of items to return. If unspecified, server
1632
1654
  # will pick an appropriate default. Server may return fewer items than
1633
1655
  # requested. A caller should only rely on response's
1634
- # {::Google::Cloud::Video::LiveStream::V1::ListEventsResponse#next_page_token next_page_token} to
1635
- # determine if there are more items left to be queried.
1656
+ # {::Google::Cloud::Video::LiveStream::V1::ListEventsResponse#next_page_token next_page_token}
1657
+ # to determine if there are more items left to be queried.
1636
1658
  # @param page_token [::String]
1637
1659
  # The next_page_token value returned from a previous List request, if any.
1638
1660
  # @param filter [::String]
@@ -1661,13 +1683,11 @@ module Google
1661
1683
  # # Call the list_events method.
1662
1684
  # result = client.list_events request
1663
1685
  #
1664
- # # The returned object is of type Gapic::PagedEnumerable. You can
1665
- # # iterate over all elements by calling #each, and the enumerable
1666
- # # will lazily make API calls to fetch subsequent pages. Other
1667
- # # methods are also available for managing paging directly.
1668
- # result.each do |response|
1686
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1687
+ # # over elements, and API calls will be issued to fetch pages as needed.
1688
+ # result.each do |item|
1669
1689
  # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Event.
1670
- # p response
1690
+ # p item
1671
1691
  # end
1672
1692
  #
1673
1693
  def list_events request, options = nil
@@ -1936,9 +1956,9 @@ module Google
1936
1956
  # * (`String`) The path to a service account key file in JSON format
1937
1957
  # * (`Hash`) A service account key as a Hash
1938
1958
  # * (`Google::Auth::Credentials`) A googleauth credentials object
1939
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1959
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1940
1960
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1941
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1961
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1942
1962
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1943
1963
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1944
1964
  # * (`nil`) indicating no credentials
@@ -159,13 +159,11 @@ module Google
159
159
  # # Call the list_operations method.
160
160
  # result = client.list_operations request
161
161
  #
162
- # # The returned object is of type Gapic::PagedEnumerable. You can
163
- # # iterate over all elements by calling #each, and the enumerable
164
- # # will lazily make API calls to fetch subsequent pages. Other
165
- # # methods are also available for managing paging directly.
166
- # result.each do |response|
162
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
163
+ # # over elements, and API calls will be issued to fetch pages as needed.
164
+ # result.each do |item|
167
165
  # # Each element is of type ::Google::Longrunning::Operation.
168
- # p response
166
+ # p item
169
167
  # end
170
168
  #
171
169
  def list_operations request, options = nil
@@ -254,14 +252,14 @@ module Google
254
252
  # # Call the get_operation method.
255
253
  # result = client.get_operation request
256
254
  #
257
- # # The returned object is of type Gapic::Operation. You can use this
258
- # # object to check the status of an operation, cancel it, or wait
259
- # # for results. Here is how to block until completion:
255
+ # # The returned object is of type Gapic::Operation. You can use it to
256
+ # # check the status of an operation, cancel it, or wait for results.
257
+ # # Here is how to wait for a response.
260
258
  # result.wait_until_done! timeout: 60
261
259
  # if result.response?
262
260
  # p result.response
263
261
  # else
264
- # puts "Error!"
262
+ # puts "No response received."
265
263
  # end
266
264
  #
267
265
  def get_operation request, options = nil
@@ -541,14 +539,14 @@ module Google
541
539
  # # Call the wait_operation method.
542
540
  # result = client.wait_operation request
543
541
  #
544
- # # The returned object is of type Gapic::Operation. You can use this
545
- # # object to check the status of an operation, cancel it, or wait
546
- # # for results. Here is how to block until completion:
542
+ # # The returned object is of type Gapic::Operation. You can use it to
543
+ # # check the status of an operation, cancel it, or wait for results.
544
+ # # Here is how to wait for a response.
547
545
  # result.wait_until_done! timeout: 60
548
546
  # if result.response?
549
547
  # p result.response
550
548
  # else
551
- # puts "Error!"
549
+ # puts "No response received."
552
550
  # end
553
551
  #
554
552
  def wait_operation request, options = nil
@@ -623,9 +621,9 @@ module Google
623
621
  # * (`String`) The path to a service account key file in JSON format
624
622
  # * (`Hash`) A service account key as a Hash
625
623
  # * (`Google::Auth::Credentials`) A googleauth credentials object
626
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
624
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
627
625
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
628
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
626
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
629
627
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
630
628
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
631
629
  # * (`nil`) indicating no credentials
@@ -101,6 +101,25 @@ module Google
101
101
  "projects/#{project}/locations/#{location}"
102
102
  end
103
103
 
104
+ ##
105
+ # Create a fully-qualified SecretVersion resource string.
106
+ #
107
+ # The resource will be in the following format:
108
+ #
109
+ # `projects/{project}/secrets/{secret}/versions/{version}`
110
+ #
111
+ # @param project [String]
112
+ # @param secret [String]
113
+ # @param version [String]
114
+ #
115
+ # @return [::String]
116
+ def secret_version_path project:, secret:, version:
117
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
118
+ raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/"
119
+
120
+ "projects/#{project}/secrets/#{secret}/versions/#{version}"
121
+ end
122
+
104
123
  extend self
105
124
  end
106
125
  end