google-cloud-eventarc-publishing-v1 0.5.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1cdcb2e874e05cf09dd69f84e3604118e44b456b147fad16ef9526bb277502e
4
- data.tar.gz: 14aea5174d436dc118e1b12a6c36287dee213510301a326d7fdce6b758bf675b
3
+ metadata.gz: b83eaae630be0ad69114780b93acea0ffcf3043060d4cc6ea55aeb2aad5ffad4
4
+ data.tar.gz: d0279772753db2247c2049cfa22655e2db223b36d6f299855a92fa6158452228
5
5
  SHA512:
6
- metadata.gz: 0a7cccf450d2290badd9d068869945f4d5d033eefa5908d4315bc80a1af2afe450565ccc1896aa1f2e76538d62fe7d970bb94b41541fa859ee6ba61cce75046f
7
- data.tar.gz: 8156b65ac5ef65f9da12a890606581cdbdc0571da3f7bf73e3bb3e05104edacc43969f31a270f3f36a9e9d87dfdc86973de9e25aa0f04bc55e2d09a2f16ffc47
6
+ metadata.gz: ac2cae6787284ed00b1498a08988c88010bc8866ce1a5238d8af9cf46eb567ab58b398e8b1e037232335a699de4c9f7702c862240205c324e555df806ab4b5df
7
+ data.tar.gz: fca45f51e618f9394fcab6abda13fa13ab39316082302d22913960999feeddc583d50dfb573ebe09100b8888aae178506a485357905389becee00e9847cf0875
data/README.md CHANGED
@@ -47,7 +47,7 @@ for general usage information.
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
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://googleapis.dev/ruby/google-cloud-logging/latest)
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
 
@@ -147,7 +147,7 @@ module Google
147
147
  credentials = @config.credentials
148
148
  # Use self-signed JWT if the endpoint is unchanged from default,
149
149
  # but only if the default endpoint does not have a region prefix.
150
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
150
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
151
151
  !@config.endpoint.split(".").first.include?("-")
152
152
  credentials ||= Credentials.default scope: @config.scope,
153
153
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -162,7 +162,8 @@ module Google
162
162
  credentials: credentials,
163
163
  endpoint: @config.endpoint,
164
164
  channel_args: @config.channel_args,
165
- interceptors: @config.interceptors
165
+ interceptors: @config.interceptors,
166
+ channel_pool_config: @config.channel_pool
166
167
  )
167
168
  end
168
169
 
@@ -396,9 +397,9 @@ module Google
396
397
  # * (`String`) The path to a service account key file in JSON format
397
398
  # * (`Hash`) A service account key as a Hash
398
399
  # * (`Google::Auth::Credentials`) A googleauth credentials object
399
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
400
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
400
401
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
401
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
402
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
402
403
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
403
404
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
404
405
  # * (`nil`) indicating no credentials
@@ -440,7 +441,9 @@ module Google
440
441
  class Configuration
441
442
  extend ::Gapic::Config
442
443
 
443
- config_attr :endpoint, "eventarcpublishing.googleapis.com", ::String
444
+ DEFAULT_ENDPOINT = "eventarcpublishing.googleapis.com"
445
+
446
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
444
447
  config_attr :credentials, nil do |value|
445
448
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
446
449
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -475,6 +478,14 @@ module Google
475
478
  end
476
479
  end
477
480
 
481
+ ##
482
+ # Configuration for the channel pool
483
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
484
+ #
485
+ def channel_pool
486
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
487
+ end
488
+
478
489
  ##
479
490
  # Configuration RPC class for the Publisher API.
480
491
  #
@@ -143,7 +143,7 @@ module Google
143
143
  credentials = @config.credentials
144
144
  # Use self-signed JWT if the endpoint is unchanged from default,
145
145
  # but only if the default endpoint does not have a region prefix.
146
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
146
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
147
147
  !@config.endpoint.split(".").first.include?("-")
148
148
  credentials ||= Credentials.default scope: @config.scope,
149
149
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -196,6 +196,22 @@ module Google
196
196
  # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse]
197
197
  #
198
198
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
199
+ #
200
+ # @example Basic example
201
+ # require "google/cloud/eventarc/publishing/v1"
202
+ #
203
+ # # Create a client object. The client can be reused for multiple calls.
204
+ # client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new
205
+ #
206
+ # # Create a request. To set request fields, pass in keyword arguments.
207
+ # request = Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new
208
+ #
209
+ # # Call the publish_channel_connection_events method.
210
+ # result = client.publish_channel_connection_events request
211
+ #
212
+ # # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse.
213
+ # p result
214
+ #
199
215
  def publish_channel_connection_events request, options = nil
200
216
  raise ::ArgumentError, "request must be provided" if request.nil?
201
217
 
@@ -268,6 +284,22 @@ module Google
268
284
  # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse]
269
285
  #
270
286
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
287
+ #
288
+ # @example Basic example
289
+ # require "google/cloud/eventarc/publishing/v1"
290
+ #
291
+ # # Create a client object. The client can be reused for multiple calls.
292
+ # client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new
293
+ #
294
+ # # Create a request. To set request fields, pass in keyword arguments.
295
+ # request = Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest.new
296
+ #
297
+ # # Call the publish_events method.
298
+ # result = client.publish_events request
299
+ #
300
+ # # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse.
301
+ # p result
302
+ #
271
303
  def publish_events request, options = nil
272
304
  raise ::ArgumentError, "request must be provided" if request.nil?
273
305
 
@@ -341,9 +373,9 @@ module Google
341
373
  # * (`String`) The path to a service account key file in JSON format
342
374
  # * (`Hash`) A service account key as a Hash
343
375
  # * (`Google::Auth::Credentials`) A googleauth credentials object
344
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
376
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
345
377
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
346
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
378
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
347
379
  # * (`nil`) indicating no credentials
348
380
  # @return [::Object]
349
381
  # @!attribute [rw] scope
@@ -376,7 +408,9 @@ module Google
376
408
  class Configuration
377
409
  extend ::Gapic::Config
378
410
 
379
- config_attr :endpoint, "eventarcpublishing.googleapis.com", ::String
411
+ DEFAULT_ENDPOINT = "eventarcpublishing.googleapis.com"
412
+
413
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
380
414
  config_attr :credentials, nil do |value|
381
415
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
382
416
  allowed.any? { |klass| klass === value }
@@ -60,7 +60,7 @@ module Google
60
60
 
61
61
  verb, uri, query_string_params, body = ServiceStub.transcode_publish_channel_connection_events_request request_pb
62
62
  query_string_params = if query_string_params.any?
63
- query_string_params.to_h { |p| p.split("=", 2) }
63
+ query_string_params.to_h { |p| p.split "=", 2 }
64
64
  else
65
65
  {}
66
66
  end
@@ -98,7 +98,7 @@ module Google
98
98
 
99
99
  verb, uri, query_string_params, body = ServiceStub.transcode_publish_events_request request_pb
100
100
  query_string_params = if query_string_params.any?
101
- query_string_params.to_h { |p| p.split("=", 2) }
101
+ query_string_params.to_h { |p| p.split "=", 2 }
102
102
  else
103
103
  {}
104
104
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/eventarc/publishing/v1/publisher.proto
3
4
 
@@ -7,23 +8,32 @@ require 'google/api/annotations_pb'
7
8
  require 'google/api/client_pb'
8
9
  require 'google/protobuf/any_pb'
9
10
 
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("google/cloud/eventarc/publishing/v1/publisher.proto", :syntax => :proto3) do
12
- add_message "google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest" do
13
- optional :channel_connection, :string, 1
14
- repeated :events, :message, 2, "google.protobuf.Any"
15
- repeated :text_events, :string, 3
16
- end
17
- add_message "google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse" do
18
- end
19
- add_message "google.cloud.eventarc.publishing.v1.PublishEventsRequest" do
20
- optional :channel, :string, 1
21
- repeated :events, :message, 2, "google.protobuf.Any"
22
- repeated :text_events, :string, 3
23
- end
24
- add_message "google.cloud.eventarc.publishing.v1.PublishEventsResponse" do
11
+
12
+ descriptor_data = "\n3google/cloud/eventarc/publishing/v1/publisher.proto\x12#google.cloud.eventarc.publishing.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x19google/protobuf/any.proto\"~\n%PublishChannelConnectionEventsRequest\x12\x1a\n\x12\x63hannel_connection\x18\x01 \x01(\t\x12$\n\x06\x65vents\x18\x02 \x03(\x0b\x32\x14.google.protobuf.Any\x12\x13\n\x0btext_events\x18\x03 \x03(\t\"(\n&PublishChannelConnectionEventsResponse\"b\n\x14PublishEventsRequest\x12\x0f\n\x07\x63hannel\x18\x01 \x01(\t\x12$\n\x06\x65vents\x18\x02 \x03(\x0b\x32\x14.google.protobuf.Any\x12\x13\n\x0btext_events\x18\x03 \x03(\t\"\x17\n\x15PublishEventsResponse2\xd0\x04\n\tPublisher\x12\x98\x02\n\x1ePublishChannelConnectionEvents\x12J.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest\x1aK.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse\"]\x82\xd3\xe4\x93\x02W\"R/v1/{channel_connection=projects/*/locations/*/channelConnections/*}:publishEvents:\x01*\x12\xd0\x01\n\rPublishEvents\x12\x39.google.cloud.eventarc.publishing.v1.PublishEventsRequest\x1a:.google.cloud.eventarc.publishing.v1.PublishEventsResponse\"H\x82\xd3\xe4\x93\x02\x42\"=/v1/{channel=projects/*/locations/*/channels/*}:publishEvents:\x01*\x1aU\xca\x41!eventarcpublishing.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xfa\x01\n\'com.google.cloud.eventarc.publishing.v1B\x0ePublisherProtoP\x01ZGcloud.google.com/go/eventarc/publishing/apiv1/publishingpb;publishingpb\xaa\x02#Google.Cloud.Eventarc.Publishing.V1\xca\x02#Google\\Cloud\\Eventarc\\Publishing\\V1\xea\x02\'Google::Cloud::Eventarc::Publishing::V1b\x06proto3"
13
+
14
+ pool = Google::Protobuf::DescriptorPool.generated_pool
15
+
16
+ begin
17
+ pool.add_serialized_file(descriptor_data)
18
+ rescue TypeError => e
19
+ # Compatibility code: will be removed in the next major version.
20
+ require 'google/protobuf/descriptor_pb'
21
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
22
+ parsed.clear_dependency
23
+ serialized = parsed.class.encode(parsed)
24
+ file = pool.add_serialized_file(serialized)
25
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
26
+ imports = [
27
+ ["google.protobuf.Any", "google/protobuf/any.proto"],
28
+ ]
29
+ imports.each do |type_name, expected_filename|
30
+ import_file = pool.lookup(type_name).file_descriptor
31
+ if import_file.name != expected_filename
32
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
25
33
  end
26
34
  end
35
+ warn "Each proto file must use a consistent fully-qualified name."
36
+ warn "This will become an error in the next major version."
27
37
  end
28
38
 
29
39
  module Google
@@ -22,7 +22,7 @@ module Google
22
22
  module Eventarc
23
23
  module Publishing
24
24
  module V1
25
- VERSION = "0.5.0"
25
+ VERSION = "0.7.0"
26
26
  end
27
27
  end
28
28
  end
@@ -35,7 +35,9 @@ module Google
35
35
  # Details about how and where to publish client libraries.
36
36
  # @!attribute [rw] version
37
37
  # @return [::String]
38
- # Version of the API to apply these settings to.
38
+ # Version of the API to apply these settings to. This is the full protobuf
39
+ # package for the API, ending in the version element.
40
+ # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
39
41
  # @!attribute [rw] launch_stage
40
42
  # @return [::Google::Api::LaunchStage]
41
43
  # Launch stage of this version of the API.
@@ -81,7 +83,7 @@ module Google
81
83
  # long-running operation pattern.
82
84
  # @!attribute [rw] new_issue_uri
83
85
  # @return [::String]
84
- # Link to a place that API users can report issues. Example:
86
+ # Link to a *public* URI where users can report issues. Example:
85
87
  # https://issuetracker.google.com/issues/new?component=190865&template=1161103
86
88
  # @!attribute [rw] documentation_uri
87
89
  # @return [::String]
@@ -111,6 +113,10 @@ module Google
111
113
  # Client library settings. If the same version string appears multiple
112
114
  # times in this list, then the last one wins. Settings from earlier
113
115
  # settings with the same version string are discarded.
116
+ # @!attribute [rw] proto_reference_documentation_uri
117
+ # @return [::String]
118
+ # Optional link to proto reference documentation. Example:
119
+ # https://cloud.google.com/pubsub/lite/docs/reference/rpc
114
120
  class Publishing
115
121
  include ::Google::Protobuf::MessageExts
116
122
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -203,9 +209,57 @@ module Google
203
209
  # @!attribute [rw] common
204
210
  # @return [::Google::Api::CommonLanguageSettings]
205
211
  # Some settings.
212
+ # @!attribute [rw] renamed_services
213
+ # @return [::Google::Protobuf::Map{::String => ::String}]
214
+ # Map from original service names to renamed versions.
215
+ # This is used when the default generated types
216
+ # would cause a naming conflict. (Neither name is
217
+ # fully-qualified.)
218
+ # Example: Subscriber to SubscriberServiceApi.
219
+ # @!attribute [rw] renamed_resources
220
+ # @return [::Google::Protobuf::Map{::String => ::String}]
221
+ # Map from full resource types to the effective short name
222
+ # for the resource. This is used when otherwise resource
223
+ # named from different services would cause naming collisions.
224
+ # Example entry:
225
+ # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
226
+ # @!attribute [rw] ignored_resources
227
+ # @return [::Array<::String>]
228
+ # List of full resource types to ignore during generation.
229
+ # This is typically used for API-specific Location resources,
230
+ # which should be handled by the generator as if they were actually
231
+ # the common Location resources.
232
+ # Example entry: "documentai.googleapis.com/Location"
233
+ # @!attribute [rw] forced_namespace_aliases
234
+ # @return [::Array<::String>]
235
+ # Namespaces which must be aliased in snippets due to
236
+ # a known (but non-generator-predictable) naming collision
237
+ # @!attribute [rw] handwritten_signatures
238
+ # @return [::Array<::String>]
239
+ # Method signatures (in the form "service.method(signature)")
240
+ # which are provided separately, so shouldn't be generated.
241
+ # Snippets *calling* these methods are still generated, however.
206
242
  class DotnetSettings
207
243
  include ::Google::Protobuf::MessageExts
208
244
  extend ::Google::Protobuf::MessageExts::ClassMethods
245
+
246
+ # @!attribute [rw] key
247
+ # @return [::String]
248
+ # @!attribute [rw] value
249
+ # @return [::String]
250
+ class RenamedServicesEntry
251
+ include ::Google::Protobuf::MessageExts
252
+ extend ::Google::Protobuf::MessageExts::ClassMethods
253
+ end
254
+
255
+ # @!attribute [rw] key
256
+ # @return [::String]
257
+ # @!attribute [rw] value
258
+ # @return [::String]
259
+ class RenamedResourcesEntry
260
+ include ::Google::Protobuf::MessageExts
261
+ extend ::Google::Protobuf::MessageExts::ClassMethods
262
+ end
209
263
  end
210
264
 
211
265
  # Settings for Ruby client libraries.
@@ -240,8 +294,8 @@ module Google
240
294
  # Example of a YAML configuration::
241
295
  #
242
296
  # publishing:
243
- # method_behavior:
244
- # - selector: CreateAdDomain
297
+ # method_settings:
298
+ # - selector: google.cloud.speech.v2.Speech.BatchRecognize
245
299
  # long_running:
246
300
  # initial_poll_delay:
247
301
  # seconds: 60 # 1 minute
@@ -299,6 +353,15 @@ module Google
299
353
 
300
354
  # Street View Org.
301
355
  STREET_VIEW = 4
356
+
357
+ # Shopping Org.
358
+ SHOPPING = 5
359
+
360
+ # Geo Org.
361
+ GEO = 6
362
+
363
+ # Generative AI - https://developers.generativeai.google
364
+ GENERATIVE_AI = 7
302
365
  end
303
366
 
304
367
  # To where should client libraries be published?
@@ -43,8 +43,12 @@ module Google
43
43
  # if (any.is(Foo.class)) {
44
44
  # foo = any.unpack(Foo.class);
45
45
  # }
46
+ # // or ...
47
+ # if (any.isSameTypeAs(Foo.getDefaultInstance())) {
48
+ # foo = any.unpack(Foo.getDefaultInstance());
49
+ # }
46
50
  #
47
- # Example 3: Pack and unpack a message in Python.
51
+ # Example 3: Pack and unpack a message in Python.
48
52
  #
49
53
  # foo = Foo(...)
50
54
  # any = Any()
@@ -54,7 +58,7 @@ module Google
54
58
  # any.Unpack(foo)
55
59
  # ...
56
60
  #
57
- # Example 4: Pack and unpack a message in Go
61
+ # Example 4: Pack and unpack a message in Go
58
62
  #
59
63
  # foo := &pb.Foo{...}
60
64
  # any, err := anypb.New(foo)
@@ -73,9 +77,8 @@ module Google
73
77
  # in the type URL, for example "foo.bar.com/x/y.z" will yield type
74
78
  # name "y.z".
75
79
  #
76
- #
77
80
  # JSON
78
- #
81
+ # ====
79
82
  # The JSON representation of an `Any` value uses the regular
80
83
  # representation of the deserialized, embedded message, with an
81
84
  # 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-eventarc-publishing-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.7.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: 2023-03-08 00:00:00.000000000 Z
11
+ date: 2023-09-12 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.18.0
19
+ version: 0.20.0
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.18.0
29
+ version: 0.20.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
210
  - !ruby/object:Gem::Version
211
211
  version: '0'
212
212
  requirements: []
213
- rubygems_version: 3.4.2
213
+ rubygems_version: 3.4.19
214
214
  signing_key:
215
215
  specification_version: 4
216
216
  summary: API Client library for the Eventarc Publishing V1 API