google-cloud-eventarc-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: 6f6205c69d371af141f001c1023f78c0c94ff3f6df0873ad185510b046fc0681
4
- data.tar.gz: 1a13d45409741574d6369c5dbd0e2569fa16b00b360858abb27d79e29d33a134
3
+ metadata.gz: e0e45e020e72d4a821ed7fb83a246f1f93aeac23538c3864be64ea90fab48b82
4
+ data.tar.gz: 97b1f2e1fb949f218104cda5d075010793c351bce4c31b90e08dd2e6ba324467
5
5
  SHA512:
6
- metadata.gz: 7a2932d746d531e00382afea439302bb43c7e65ec7266f4e37837de1fb43d9b900f680019e38f0cbc46fe77f44befbe503663f2a46f69c1a0e371e7d74127603
7
- data.tar.gz: d3a5b9c519c999347b72dbaa0fb2a536eea3cd623ef012c989b6836066a1e72e690fea2856685cfb01b7aac9d18714b58cbd674e7c4dfaada0f288ca414e5fef
6
+ metadata.gz: 112df6afd3da7943518c68e8589d6a6f8523833bb80b268934fe0ef64cf3cd09e4e635c56490bdbe20652d778b7bdc02ac2d925ed8b7a73939c9878c55df0bac
7
+ data.tar.gz: 561d3574124a16384d6c67606bb15420cf91d7377a5ac7b4694a04805c1223498fd216eb2182815bbd5d9252f36e736f2a7101e79ef08bcc9517e0d1fe9913cd
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Eventarc V1 API
2
2
 
3
- API Client library for the Eventarc V1 API
3
+ Build event-driven applications on Google Cloud Platform.
4
4
 
5
5
  Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution.
6
6
 
@@ -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,183 @@
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 Eventarc
24
+ ##
25
+ # @example Loading just the REST part of this package, including all its services, and instantiating a REST client
26
+ #
27
+ # require "google/cloud/eventarc/v1/rest"
28
+ # client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
29
+ #
30
+ module V1
31
+ ##
32
+ # @private
33
+ # Initialize the mixin bindings configuration
34
+ #
35
+ def self.configure
36
+ @configure ||= begin
37
+ namespace = ["Google", "Cloud", "Eventarc"]
38
+ parent_config = while namespace.any?
39
+ parent_name = namespace.join "::"
40
+ parent_const = const_get parent_name
41
+ break parent_const.configure if parent_const.respond_to? :configure
42
+ namespace.pop
43
+ end
44
+
45
+ default_config = Configuration.new parent_config
46
+ default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [
47
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
48
+ uri_method: :get,
49
+ uri_template: "/v1/{name}",
50
+ matches: [
51
+ ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
52
+ ],
53
+ body: nil
54
+ )
55
+ ]
56
+ default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [
57
+
58
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
59
+ uri_method: :get,
60
+ uri_template: "/v1/{name}/locations",
61
+ matches: [
62
+ ["name", %r{^projects/[^/]+/?$}, false]
63
+ ],
64
+ body: nil
65
+ )
66
+ ]
67
+ default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [
68
+
69
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
70
+ uri_method: :get,
71
+ uri_template: "/v1/{resource}:getIamPolicy",
72
+ matches: [
73
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false]
74
+ ],
75
+ body: nil
76
+ ),
77
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
78
+ uri_method: :get,
79
+ uri_template: "/v1/{resource}:getIamPolicy",
80
+ matches: [
81
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false]
82
+ ],
83
+ body: nil
84
+ ),
85
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
86
+ uri_method: :get,
87
+ uri_template: "/v1/{resource}:getIamPolicy",
88
+ matches: [
89
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false]
90
+ ],
91
+ body: nil
92
+ )
93
+ ]
94
+ default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [
95
+
96
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
97
+ uri_method: :post,
98
+ uri_template: "/v1/{resource}:setIamPolicy",
99
+ matches: [
100
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false]
101
+ ],
102
+ body: "*"
103
+ ),
104
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
105
+ uri_method: :post,
106
+ uri_template: "/v1/{resource}:setIamPolicy",
107
+ matches: [
108
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false]
109
+ ],
110
+ body: "*"
111
+ ),
112
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
113
+ uri_method: :post,
114
+ uri_template: "/v1/{resource}:setIamPolicy",
115
+ matches: [
116
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false]
117
+ ],
118
+ body: "*"
119
+ )
120
+ ]
121
+ default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [
122
+
123
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
124
+ uri_method: :post,
125
+ uri_template: "/v1/{resource}:testIamPermissions",
126
+ matches: [
127
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false]
128
+ ],
129
+ body: "*"
130
+ ),
131
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
132
+ uri_method: :post,
133
+ uri_template: "/v1/{resource}:testIamPermissions",
134
+ matches: [
135
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false]
136
+ ],
137
+ body: "*"
138
+ ),
139
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
140
+ uri_method: :post,
141
+ uri_template: "/v1/{resource}:testIamPermissions",
142
+ matches: [
143
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false]
144
+ ],
145
+ body: "*"
146
+ )
147
+ ]
148
+ default_config
149
+ end
150
+ yield @configure if block_given?
151
+ @configure
152
+ end
153
+
154
+ ##
155
+ # @private
156
+ # Configuration class for the google.cloud.eventarc.v1 package.
157
+ #
158
+ # This class contains common configuration for all services
159
+ # of the google.cloud.eventarc.v1 package.
160
+ #
161
+ # This configuration is for internal use of the client library classes,
162
+ # and it is not intended that the end-users will read or change it.
163
+ #
164
+ class Configuration
165
+ extend ::Gapic::Config
166
+
167
+ # @private
168
+ # Overrides for http bindings for the RPC of the mixins for this package.
169
+ # Services in this package should use these when creating clients for the mixin services.
170
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
171
+ config_attr :bindings_override, {}, ::Hash, nil
172
+
173
+ # @private
174
+ def initialize parent_config = nil
175
+ @parent_config = parent_config unless parent_config.nil?
176
+
177
+ yield self if block_given?
178
+ end
179
+ end
180
+ end
181
+ end
182
+ end
183
+ 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/v1/channel_connection.proto
3
4
 
@@ -7,17 +8,32 @@ require 'google/api/field_behavior_pb'
7
8
  require 'google/api/resource_pb'
8
9
  require 'google/protobuf/timestamp_pb'
9
10
 
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("google/cloud/eventarc/v1/channel_connection.proto", :syntax => :proto3) do
12
- add_message "google.cloud.eventarc.v1.ChannelConnection" do
13
- optional :name, :string, 1
14
- optional :uid, :string, 2
15
- optional :channel, :string, 5
16
- optional :create_time, :message, 6, "google.protobuf.Timestamp"
17
- optional :update_time, :message, 7, "google.protobuf.Timestamp"
18
- optional :activation_token, :string, 8
11
+
12
+ descriptor_data = "\n1google/cloud/eventarc/v1/channel_connection.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa7\x03\n\x11\x43hannelConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x38\n\x07\x63hannel\x18\x05 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x65ventarc.googleapis.com/Channel\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1d\n\x10\x61\x63tivation_token\x18\x08 \x01(\tB\x03\xe0\x41\x04:\xa7\x01\xea\x41\xa3\x01\n)eventarc.googleapis.com/ChannelConnection\x12Oprojects/{project}/locations/{location}/channelConnections/{channel_connection}*\x12\x63hannelConnections2\x11\x63hannelConnectionB\xc6\x01\n\x1c\x63om.google.cloud.eventarc.v1B\x16\x43hannelConnectionProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::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.Timestamp", "google/protobuf/timestamp.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}"
19
33
  end
20
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."
21
37
  end
22
38
 
23
39
  module Google
@@ -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/v1/channel.proto
3
4
 
@@ -7,28 +8,32 @@ require 'google/api/field_behavior_pb'
7
8
  require 'google/api/resource_pb'
8
9
  require 'google/protobuf/timestamp_pb'
9
10
 
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("google/cloud/eventarc/v1/channel.proto", :syntax => :proto3) do
12
- add_message "google.cloud.eventarc.v1.Channel" do
13
- optional :name, :string, 1
14
- optional :uid, :string, 2
15
- optional :create_time, :message, 5, "google.protobuf.Timestamp"
16
- optional :update_time, :message, 6, "google.protobuf.Timestamp"
17
- optional :provider, :string, 7
18
- optional :state, :enum, 9, "google.cloud.eventarc.v1.Channel.State"
19
- optional :activation_token, :string, 10
20
- optional :crypto_key_name, :string, 11
21
- oneof :transport do
22
- optional :pubsub_topic, :string, 8
23
- end
24
- end
25
- add_enum "google.cloud.eventarc.v1.Channel.State" do
26
- value :STATE_UNSPECIFIED, 0
27
- value :PENDING, 1
28
- value :ACTIVE, 2
29
- value :INACTIVE, 3
11
+
12
+ descriptor_data = "\n&google/cloud/eventarc/v1/channel.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb2\x04\n\x07\x43hannel\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x10\n\x08provider\x18\x07 \x01(\t\x12\x1b\n\x0cpubsub_topic\x18\x08 \x01(\tB\x03\xe0\x41\x03H\x00\x12;\n\x05state\x18\t \x01(\x0e\x32\'.google.cloud.eventarc.v1.Channel.StateB\x03\xe0\x41\x03\x12\x1d\n\x10\x61\x63tivation_token\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x0f\x63rypto_key_name\x18\x0b \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08INACTIVE\x10\x03:s\xea\x41p\n\x1f\x65ventarc.googleapis.com/Channel\x12:projects/{project}/locations/{location}/channels/{channel}*\x08\x63hannels2\x07\x63hannelB\x0b\n\ttransportB\xbc\x01\n\x1c\x63om.google.cloud.eventarc.v1B\x0c\x43hannelProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::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.Timestamp", "google/protobuf/timestamp.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}"
30
33
  end
31
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."
32
37
  end
33
38
 
34
39
  module Google
@@ -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/v1/discovery.proto
3
4
 
@@ -6,26 +7,31 @@ require 'google/protobuf'
6
7
  require 'google/api/field_behavior_pb'
7
8
  require 'google/api/resource_pb'
8
9
 
9
- Google::Protobuf::DescriptorPool.generated_pool.build do
10
- add_file("google/cloud/eventarc/v1/discovery.proto", :syntax => :proto3) do
11
- add_message "google.cloud.eventarc.v1.Provider" do
12
- optional :name, :string, 1
13
- optional :display_name, :string, 2
14
- repeated :event_types, :message, 3, "google.cloud.eventarc.v1.EventType"
15
- end
16
- add_message "google.cloud.eventarc.v1.EventType" do
17
- optional :type, :string, 1
18
- optional :description, :string, 2
19
- repeated :filtering_attributes, :message, 3, "google.cloud.eventarc.v1.FilteringAttribute"
20
- optional :event_schema_uri, :string, 4
21
- end
22
- add_message "google.cloud.eventarc.v1.FilteringAttribute" do
23
- optional :attribute, :string, 1
24
- optional :description, :string, 2
25
- optional :required, :bool, 3
26
- optional :path_pattern_supported, :bool, 4
10
+
11
+ descriptor_data = "\n(google/cloud/eventarc/v1/discovery.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf1\x01\n\x08Provider\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x0b\x65vent_types\x18\x03 \x03(\x0b\x32#.google.cloud.eventarc.v1.EventTypeB\x03\xe0\x41\x03:x\xea\x41u\n eventarc.googleapis.com/Provider\x12<projects/{project}/locations/{location}/providers/{provider}*\tproviders2\x08provider\"\xa8\x01\n\tEventType\x12\x11\n\x04type\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12O\n\x14\x66iltering_attributes\x18\x03 \x03(\x0b\x32,.google.cloud.eventarc.v1.FilteringAttributeB\x03\xe0\x41\x03\x12\x1d\n\x10\x65vent_schema_uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\x82\x01\n\x12\x46ilteringAttribute\x12\x16\n\tattribute\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08required\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12#\n\x16path_pattern_supported\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x42j\n\x1c\x63om.google.cloud.eventarc.v1B\x0e\x44iscoveryProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpbb\x06proto3"
12
+
13
+ pool = Google::Protobuf::DescriptorPool.generated_pool
14
+
15
+ begin
16
+ pool.add_serialized_file(descriptor_data)
17
+ rescue TypeError => e
18
+ # Compatibility code: will be removed in the next major version.
19
+ require 'google/protobuf/descriptor_pb'
20
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
21
+ parsed.clear_dependency
22
+ serialized = parsed.class.encode(parsed)
23
+ file = pool.add_serialized_file(serialized)
24
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
25
+ imports = [
26
+ ]
27
+ imports.each do |type_name, expected_filename|
28
+ import_file = pool.lookup(type_name).file_descriptor
29
+ if import_file.name != expected_filename
30
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
27
31
  end
28
32
  end
33
+ warn "Each proto file must use a consistent fully-qualified name."
34
+ warn "This will become an error in the next major version."
29
35
  end
30
36
 
31
37
  module Google
@@ -126,7 +126,7 @@ module Google
126
126
  credentials = @config.credentials
127
127
  # Use self-signed JWT if the endpoint is unchanged from default,
128
128
  # but only if the default endpoint does not have a region prefix.
129
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
129
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
130
130
  !@config.endpoint.split(".").first.include?("-")
131
131
  credentials ||= Credentials.default scope: @config.scope,
132
132
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -331,13 +331,11 @@ module Google
331
331
  # # Call the list_triggers method.
332
332
  # result = client.list_triggers request
333
333
  #
334
- # # The returned object is of type Gapic::PagedEnumerable. You can
335
- # # iterate over all elements by calling #each, and the enumerable
336
- # # will lazily make API calls to fetch subsequent pages. Other
337
- # # methods are also available for managing paging directly.
338
- # result.each do |response|
334
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
335
+ # # over elements, and API calls will be issued to fetch pages as needed.
336
+ # result.each do |item|
339
337
  # # Each element is of type ::Google::Cloud::Eventarc::V1::Trigger.
340
- # p response
338
+ # p item
341
339
  # end
342
340
  #
343
341
  def list_triggers request, options = nil
@@ -430,14 +428,14 @@ module Google
430
428
  # # Call the create_trigger method.
431
429
  # result = client.create_trigger request
432
430
  #
433
- # # The returned object is of type Gapic::Operation. You can use this
434
- # # object to check the status of an operation, cancel it, or wait
435
- # # for results. Here is how to block until completion:
431
+ # # The returned object is of type Gapic::Operation. You can use it to
432
+ # # check the status of an operation, cancel it, or wait for results.
433
+ # # Here is how to wait for a response.
436
434
  # result.wait_until_done! timeout: 60
437
435
  # if result.response?
438
436
  # p result.response
439
437
  # else
440
- # puts "Error!"
438
+ # puts "No response received."
441
439
  # end
442
440
  #
443
441
  def create_trigger request, options = nil
@@ -533,14 +531,14 @@ module Google
533
531
  # # Call the update_trigger method.
534
532
  # result = client.update_trigger request
535
533
  #
536
- # # The returned object is of type Gapic::Operation. You can use this
537
- # # object to check the status of an operation, cancel it, or wait
538
- # # for results. Here is how to block until completion:
534
+ # # The returned object is of type Gapic::Operation. You can use it to
535
+ # # check the status of an operation, cancel it, or wait for results.
536
+ # # Here is how to wait for a response.
539
537
  # result.wait_until_done! timeout: 60
540
538
  # if result.response?
541
539
  # p result.response
542
540
  # else
543
- # puts "Error!"
541
+ # puts "No response received."
544
542
  # end
545
543
  #
546
544
  def update_trigger request, options = nil
@@ -635,14 +633,14 @@ module Google
635
633
  # # Call the delete_trigger method.
636
634
  # result = client.delete_trigger request
637
635
  #
638
- # # The returned object is of type Gapic::Operation. You can use this
639
- # # object to check the status of an operation, cancel it, or wait
640
- # # for results. Here is how to block until completion:
636
+ # # The returned object is of type Gapic::Operation. You can use it to
637
+ # # check the status of an operation, cancel it, or wait for results.
638
+ # # Here is how to wait for a response.
641
639
  # result.wait_until_done! timeout: 60
642
640
  # if result.response?
643
641
  # p result.response
644
642
  # else
645
- # puts "Error!"
643
+ # puts "No response received."
646
644
  # end
647
645
  #
648
646
  def delete_trigger request, options = nil
@@ -828,13 +826,11 @@ module Google
828
826
  # # Call the list_channels method.
829
827
  # result = client.list_channels request
830
828
  #
831
- # # The returned object is of type Gapic::PagedEnumerable. You can
832
- # # iterate over all elements by calling #each, and the enumerable
833
- # # will lazily make API calls to fetch subsequent pages. Other
834
- # # methods are also available for managing paging directly.
835
- # result.each do |response|
829
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
830
+ # # over elements, and API calls will be issued to fetch pages as needed.
831
+ # result.each do |item|
836
832
  # # Each element is of type ::Google::Cloud::Eventarc::V1::Channel.
837
- # p response
833
+ # p item
838
834
  # end
839
835
  #
840
836
  def list_channels request, options = nil
@@ -927,14 +923,14 @@ module Google
927
923
  # # Call the create_channel method.
928
924
  # result = client.create_channel request
929
925
  #
930
- # # The returned object is of type Gapic::Operation. You can use this
931
- # # object to check the status of an operation, cancel it, or wait
932
- # # for results. Here is how to block until completion:
926
+ # # The returned object is of type Gapic::Operation. You can use it to
927
+ # # check the status of an operation, cancel it, or wait for results.
928
+ # # Here is how to wait for a response.
933
929
  # result.wait_until_done! timeout: 60
934
930
  # if result.response?
935
931
  # p result.response
936
932
  # else
937
- # puts "Error!"
933
+ # puts "No response received."
938
934
  # end
939
935
  #
940
936
  def create_channel request, options = nil
@@ -1027,14 +1023,14 @@ module Google
1027
1023
  # # Call the update_channel method.
1028
1024
  # result = client.update_channel request
1029
1025
  #
1030
- # # The returned object is of type Gapic::Operation. You can use this
1031
- # # object to check the status of an operation, cancel it, or wait
1032
- # # for results. Here is how to block until completion:
1026
+ # # The returned object is of type Gapic::Operation. You can use it to
1027
+ # # check the status of an operation, cancel it, or wait for results.
1028
+ # # Here is how to wait for a response.
1033
1029
  # result.wait_until_done! timeout: 60
1034
1030
  # if result.response?
1035
1031
  # p result.response
1036
1032
  # else
1037
- # puts "Error!"
1033
+ # puts "No response received."
1038
1034
  # end
1039
1035
  #
1040
1036
  def update_channel request, options = nil
@@ -1123,14 +1119,14 @@ module Google
1123
1119
  # # Call the delete_channel method.
1124
1120
  # result = client.delete_channel request
1125
1121
  #
1126
- # # The returned object is of type Gapic::Operation. You can use this
1127
- # # object to check the status of an operation, cancel it, or wait
1128
- # # for results. Here is how to block until completion:
1122
+ # # The returned object is of type Gapic::Operation. You can use it to
1123
+ # # check the status of an operation, cancel it, or wait for results.
1124
+ # # Here is how to wait for a response.
1129
1125
  # result.wait_until_done! timeout: 60
1130
1126
  # if result.response?
1131
1127
  # p result.response
1132
1128
  # else
1133
- # puts "Error!"
1129
+ # puts "No response received."
1134
1130
  # end
1135
1131
  #
1136
1132
  def delete_channel request, options = nil
@@ -1316,13 +1312,11 @@ module Google
1316
1312
  # # Call the list_providers method.
1317
1313
  # result = client.list_providers request
1318
1314
  #
1319
- # # The returned object is of type Gapic::PagedEnumerable. You can
1320
- # # iterate over all elements by calling #each, and the enumerable
1321
- # # will lazily make API calls to fetch subsequent pages. Other
1322
- # # methods are also available for managing paging directly.
1323
- # result.each do |response|
1315
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1316
+ # # over elements, and API calls will be issued to fetch pages as needed.
1317
+ # result.each do |item|
1324
1318
  # # Each element is of type ::Google::Cloud::Eventarc::V1::Provider.
1325
- # p response
1319
+ # p item
1326
1320
  # end
1327
1321
  #
1328
1322
  def list_providers request, options = nil
@@ -1503,13 +1497,11 @@ module Google
1503
1497
  # # Call the list_channel_connections method.
1504
1498
  # result = client.list_channel_connections request
1505
1499
  #
1506
- # # The returned object is of type Gapic::PagedEnumerable. You can
1507
- # # iterate over all elements by calling #each, and the enumerable
1508
- # # will lazily make API calls to fetch subsequent pages. Other
1509
- # # methods are also available for managing paging directly.
1510
- # result.each do |response|
1500
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1501
+ # # over elements, and API calls will be issued to fetch pages as needed.
1502
+ # result.each do |item|
1511
1503
  # # Each element is of type ::Google::Cloud::Eventarc::V1::ChannelConnection.
1512
- # p response
1504
+ # p item
1513
1505
  # end
1514
1506
  #
1515
1507
  def list_channel_connections request, options = nil
@@ -1599,14 +1591,14 @@ module Google
1599
1591
  # # Call the create_channel_connection method.
1600
1592
  # result = client.create_channel_connection request
1601
1593
  #
1602
- # # The returned object is of type Gapic::Operation. You can use this
1603
- # # object to check the status of an operation, cancel it, or wait
1604
- # # for results. Here is how to block until completion:
1594
+ # # The returned object is of type Gapic::Operation. You can use it to
1595
+ # # check the status of an operation, cancel it, or wait for results.
1596
+ # # Here is how to wait for a response.
1605
1597
  # result.wait_until_done! timeout: 60
1606
1598
  # if result.response?
1607
1599
  # p result.response
1608
1600
  # else
1609
- # puts "Error!"
1601
+ # puts "No response received."
1610
1602
  # end
1611
1603
  #
1612
1604
  def create_channel_connection request, options = nil
@@ -1692,14 +1684,14 @@ module Google
1692
1684
  # # Call the delete_channel_connection method.
1693
1685
  # result = client.delete_channel_connection request
1694
1686
  #
1695
- # # The returned object is of type Gapic::Operation. You can use this
1696
- # # object to check the status of an operation, cancel it, or wait
1697
- # # for results. Here is how to block until completion:
1687
+ # # The returned object is of type Gapic::Operation. You can use it to
1688
+ # # check the status of an operation, cancel it, or wait for results.
1689
+ # # Here is how to wait for a response.
1698
1690
  # result.wait_until_done! timeout: 60
1699
1691
  # if result.response?
1700
1692
  # p result.response
1701
1693
  # else
1702
- # puts "Error!"
1694
+ # puts "No response received."
1703
1695
  # end
1704
1696
  #
1705
1697
  def delete_channel_connection request, options = nil
@@ -1956,9 +1948,9 @@ module Google
1956
1948
  # * (`String`) The path to a service account key file in JSON format
1957
1949
  # * (`Hash`) A service account key as a Hash
1958
1950
  # * (`Google::Auth::Credentials`) A googleauth credentials object
1959
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1951
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1960
1952
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1961
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1953
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1962
1954
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1963
1955
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1964
1956
  # * (`nil`) indicating no credentials
@@ -2000,7 +1992,9 @@ module Google
2000
1992
  class Configuration
2001
1993
  extend ::Gapic::Config
2002
1994
 
2003
- config_attr :endpoint, "eventarc.googleapis.com", ::String
1995
+ DEFAULT_ENDPOINT = "eventarc.googleapis.com"
1996
+
1997
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2004
1998
  config_attr :credentials, nil do |value|
2005
1999
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2006
2000
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC