google-cloud-eventarc-v1 1.0.1 → 1.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.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -20
  3. data/lib/google/cloud/eventarc/v1/bindings_override.rb +96 -0
  4. data/lib/google/cloud/eventarc/v1/channel_pb.rb +1 -1
  5. data/lib/google/cloud/eventarc/v1/enrollment_pb.rb +47 -0
  6. data/lib/google/cloud/eventarc/v1/eventarc/client.rb +2595 -187
  7. data/lib/google/cloud/eventarc/v1/eventarc/operations.rb +12 -15
  8. data/lib/google/cloud/eventarc/v1/eventarc/paths.rb +112 -0
  9. data/lib/google/cloud/eventarc/v1/eventarc/rest/client.rb +2442 -193
  10. data/lib/google/cloud/eventarc/v1/eventarc/rest/operations.rb +43 -38
  11. data/lib/google/cloud/eventarc/v1/eventarc/rest/service_stub.rb +1602 -265
  12. data/lib/google/cloud/eventarc/v1/eventarc_pb.rb +35 -1
  13. data/lib/google/cloud/eventarc/v1/eventarc_services_pb.rb +42 -0
  14. data/lib/google/cloud/eventarc/v1/google_api_source_pb.rb +50 -0
  15. data/lib/google/cloud/eventarc/v1/logging_config_pb.rb +45 -0
  16. data/lib/google/cloud/eventarc/v1/message_bus_pb.rb +49 -0
  17. data/lib/google/cloud/eventarc/v1/network_config_pb.rb +45 -0
  18. data/lib/google/cloud/eventarc/v1/pipeline_pb.rb +65 -0
  19. data/lib/google/cloud/eventarc/v1/trigger_pb.rb +4 -1
  20. data/lib/google/cloud/eventarc/v1/version.rb +1 -1
  21. data/proto_docs/google/api/client.rb +39 -0
  22. data/proto_docs/google/api/field_info.rb +88 -0
  23. data/proto_docs/google/cloud/eventarc/v1/channel.rb +5 -1
  24. data/proto_docs/google/cloud/eventarc/v1/discovery.rb +8 -7
  25. data/proto_docs/google/cloud/eventarc/v1/enrollment.rb +95 -0
  26. data/proto_docs/google/cloud/eventarc/v1/eventarc.rb +522 -8
  27. data/proto_docs/google/cloud/eventarc/v1/google_api_source.rb +95 -0
  28. data/proto_docs/google/cloud/eventarc/v1/logging_config.rb +78 -0
  29. data/proto_docs/google/cloud/eventarc/v1/message_bus.rb +94 -0
  30. data/proto_docs/google/cloud/eventarc/v1/network_config.rb +37 -0
  31. data/proto_docs/google/cloud/eventarc/v1/pipeline.rb +583 -0
  32. data/proto_docs/google/cloud/eventarc/v1/trigger.rb +76 -35
  33. data/proto_docs/google/longrunning/operations.rb +19 -14
  34. metadata +18 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c950c7edd373ef20a9de474f7f740f8b967e489a0fdc5a76932a023c592394af
4
- data.tar.gz: 30a80c8d959086627fc8273ec2e56e57221bc4e2f85607689a84f8ea54df0c4d
3
+ metadata.gz: 86d93924ce883c8db4d6590366f3f5e431468cf21ad7dc9294adbc35064de493
4
+ data.tar.gz: c06c5631fd616f21f603b91fd6ebb628f22caee0da2e0b45ceff3b0953066023
5
5
  SHA512:
6
- metadata.gz: '08ae30df40e50878c225fe2a2eca2933c70ca36231a03c36a87234a3beb0528d13c7494cbd4114697d0c0b244b2704e96fe93f668ced99a9b1eb3854a8a78400'
7
- data.tar.gz: '0414802680c9be034d74d2aecba9eda09bc26e42fc192eda30c788e9e390f2f621ed2f478e95fb0f4ea390571dcb90a774b9080a7037746d794b77bc8b417e5c'
6
+ metadata.gz: f94a2eaff5761d4a283bcf3ab6928092f0f979fc03fe2a8d37fe7b45f317883cdd9ba03be3bc1d1ef5010325d62cef4e719ada5e5670c7a039008ae68a2ff14f
7
+ data.tar.gz: f26f117f0a3fc611ffedb7cfbaf85e8f522582a1d79adcfe9904babacf7d7cadef0c66bee4906603cde655a54c1de9782459442876d23c8b0cf2cebd1a9d8bd7
data/README.md CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/eventarc/)
44
44
  for general usage information.
45
45
 
46
- ## Enabling Logging
47
-
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/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
- 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
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
-
54
- Configuring a Ruby stdlib logger:
46
+ ## Debug Logging
47
+
48
+ This library comes with opt-in Debug Logging that can help you troubleshoot
49
+ your application's integration with the API. When logging is activated, key
50
+ events such as requests and responses, along with data payloads and metadata
51
+ such as headers and client configuration, are logged to the standard error
52
+ stream.
53
+
54
+ **WARNING:** Client Library Debug Logging includes your data payloads in
55
+ plaintext, which could include sensitive data such as PII for yourself or your
56
+ customers, private keys, or other security data that could be compromising if
57
+ leaked. Always practice good data hygiene with your application logs, and follow
58
+ the principle of least access. Google also recommends that Client Library Debug
59
+ Logging be enabled only temporarily during active debugging, and not used
60
+ permanently in production.
61
+
62
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
64
+ list of client library gem names. This will select the default logging behavior,
65
+ which writes logs to the standard error stream. On a local workstation, this may
66
+ result in logs appearing on the console. When running on a Google Cloud hosting
67
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
+ results in logs appearing alongside your application logs in the
69
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
+
71
+ You can customize logging by modifying the `logger` configuration when
72
+ constructing a client object. For example:
55
73
 
56
74
  ```ruby
75
+ require "google/cloud/eventarc/v1"
57
76
  require "logger"
58
77
 
59
- module MyLogger
60
- LOGGER = Logger.new $stderr, level: Logger::WARN
61
- def logger
62
- LOGGER
63
- end
64
- end
65
-
66
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
67
- module GRPC
68
- extend MyLogger
78
+ client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config|
79
+ config.logger = Logger.new "my-app.log"
69
80
  end
70
81
  ```
71
82
 
72
-
73
83
  ## Google Cloud Samples
74
84
 
75
85
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
@@ -89,6 +89,38 @@ module Google
89
89
  ["resource", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false]
90
90
  ],
91
91
  body: nil
92
+ ),
93
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
94
+ uri_method: :get,
95
+ uri_template: "/v1/{resource}:getIamPolicy",
96
+ matches: [
97
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false]
98
+ ],
99
+ body: nil
100
+ ),
101
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
102
+ uri_method: :get,
103
+ uri_template: "/v1/{resource}:getIamPolicy",
104
+ matches: [
105
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/enrollments/[^/]+/?$}, false]
106
+ ],
107
+ body: nil
108
+ ),
109
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
110
+ uri_method: :get,
111
+ uri_template: "/v1/{resource}:getIamPolicy",
112
+ matches: [
113
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/pipelines/[^/]+/?$}, false]
114
+ ],
115
+ body: nil
116
+ ),
117
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
118
+ uri_method: :get,
119
+ uri_template: "/v1/{resource}:getIamPolicy",
120
+ matches: [
121
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+/?$}, false]
122
+ ],
123
+ body: nil
92
124
  )
93
125
  ]
94
126
  default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [
@@ -116,6 +148,38 @@ module Google
116
148
  ["resource", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false]
117
149
  ],
118
150
  body: "*"
151
+ ),
152
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
153
+ uri_method: :post,
154
+ uri_template: "/v1/{resource}:setIamPolicy",
155
+ matches: [
156
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false]
157
+ ],
158
+ body: "*"
159
+ ),
160
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
161
+ uri_method: :post,
162
+ uri_template: "/v1/{resource}:setIamPolicy",
163
+ matches: [
164
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/enrollments/[^/]+/?$}, false]
165
+ ],
166
+ body: "*"
167
+ ),
168
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
169
+ uri_method: :post,
170
+ uri_template: "/v1/{resource}:setIamPolicy",
171
+ matches: [
172
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/pipelines/[^/]+/?$}, false]
173
+ ],
174
+ body: "*"
175
+ ),
176
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
177
+ uri_method: :post,
178
+ uri_template: "/v1/{resource}:setIamPolicy",
179
+ matches: [
180
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+/?$}, false]
181
+ ],
182
+ body: "*"
119
183
  )
120
184
  ]
121
185
  default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [
@@ -143,6 +207,38 @@ module Google
143
207
  ["resource", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false]
144
208
  ],
145
209
  body: "*"
210
+ ),
211
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
212
+ uri_method: :post,
213
+ uri_template: "/v1/{resource}:testIamPermissions",
214
+ matches: [
215
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false]
216
+ ],
217
+ body: "*"
218
+ ),
219
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
220
+ uri_method: :post,
221
+ uri_template: "/v1/{resource}:testIamPermissions",
222
+ matches: [
223
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/enrollments/[^/]+/?$}, false]
224
+ ],
225
+ body: "*"
226
+ ),
227
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
228
+ uri_method: :post,
229
+ uri_template: "/v1/{resource}:testIamPermissions",
230
+ matches: [
231
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/pipelines/[^/]+/?$}, false]
232
+ ],
233
+ body: "*"
234
+ ),
235
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
236
+ uri_method: :post,
237
+ uri_template: "/v1/{resource}:testIamPermissions",
238
+ matches: [
239
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+/?$}, false]
240
+ ],
241
+ body: "*"
146
242
  )
147
243
  ]
148
244
  default_config
@@ -9,7 +9,7 @@ require 'google/api/resource_pb'
9
9
  require 'google/protobuf/timestamp_pb'
10
10
 
11
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"
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\"\xcb\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?\n\x0f\x63rypto_key_name\x18\x0b \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x1a\n\rsatisfies_pzs\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\"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
13
 
14
14
  pool = Google::Protobuf::DescriptorPool.generated_pool
15
15
 
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/cloud/eventarc/v1/enrollment.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/field_behavior_pb'
8
+ require 'google/api/resource_pb'
9
+ require 'google/protobuf/timestamp_pb'
10
+
11
+
12
+ descriptor_data = "\n)google/cloud/eventarc/v1/enrollment.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbe\x05\n\nEnrollment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x45\n\x06labels\x18\x06 \x03(\x0b\x32\x30.google.cloud.eventarc.v1.Enrollment.LabelsEntryB\x03\xe0\x41\x01\x12O\n\x0b\x61nnotations\x18\x07 \x03(\x0b\x32\x35.google.cloud.eventarc.v1.Enrollment.AnnotationsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tcel_match\x18\t \x01(\tB\x03\xe0\x41\x02\x12?\n\x0bmessage_bus\x18\n \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"eventarc.googleapis.com/MessageBus\x12\x18\n\x0b\x64\x65stination\x18\x0b \x01(\tB\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x82\x01\xea\x41\x7f\n\"eventarc.googleapis.com/Enrollment\x12@projects/{project}/locations/{location}/enrollments/{enrollment}*\x0b\x65nrollments2\nenrollmentB\xbf\x01\n\x1c\x63om.google.cloud.eventarc.v1B\x0f\x45nrollmentProtoP\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
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}"
33
+ end
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."
37
+ end
38
+
39
+ module Google
40
+ module Cloud
41
+ module Eventarc
42
+ module V1
43
+ Enrollment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.Enrollment").msgclass
44
+ end
45
+ end
46
+ end
47
+ end