google-cloud-eventarc-v1 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/eventarc/v1/bindings_override.rb +96 -0
- data/lib/google/cloud/eventarc/v1/channel_pb.rb +1 -1
- data/lib/google/cloud/eventarc/v1/enrollment_pb.rb +47 -0
- data/lib/google/cloud/eventarc/v1/eventarc/client.rb +2565 -174
- data/lib/google/cloud/eventarc/v1/eventarc/paths.rb +112 -0
- data/lib/google/cloud/eventarc/v1/eventarc/rest/client.rb +2420 -180
- data/lib/google/cloud/eventarc/v1/eventarc/rest/service_stub.rb +1335 -88
- data/lib/google/cloud/eventarc/v1/eventarc_pb.rb +35 -1
- data/lib/google/cloud/eventarc/v1/eventarc_services_pb.rb +42 -0
- data/lib/google/cloud/eventarc/v1/google_api_source_pb.rb +50 -0
- data/lib/google/cloud/eventarc/v1/logging_config_pb.rb +45 -0
- data/lib/google/cloud/eventarc/v1/message_bus_pb.rb +49 -0
- data/lib/google/cloud/eventarc/v1/network_config_pb.rb +45 -0
- data/lib/google/cloud/eventarc/v1/pipeline_pb.rb +65 -0
- data/lib/google/cloud/eventarc/v1/trigger_pb.rb +4 -1
- data/lib/google/cloud/eventarc/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +51 -10
- data/proto_docs/google/api/field_info.rb +88 -0
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/cloud/eventarc/v1/channel.rb +5 -1
- data/proto_docs/google/cloud/eventarc/v1/discovery.rb +8 -7
- data/proto_docs/google/cloud/eventarc/v1/enrollment.rb +95 -0
- data/proto_docs/google/cloud/eventarc/v1/eventarc.rb +522 -8
- data/proto_docs/google/cloud/eventarc/v1/google_api_source.rb +95 -0
- data/proto_docs/google/cloud/eventarc/v1/logging_config.rb +78 -0
- data/proto_docs/google/cloud/eventarc/v1/message_bus.rb +94 -0
- data/proto_docs/google/cloud/eventarc/v1/network_config.rb +37 -0
- data/proto_docs/google/cloud/eventarc/v1/pipeline.rb +583 -0
- data/proto_docs/google/cloud/eventarc/v1/trigger.rb +76 -35
- metadata +16 -3
@@ -0,0 +1,583 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 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
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Eventarc
|
23
|
+
module V1
|
24
|
+
# A representation of the Pipeline resource.
|
25
|
+
# @!attribute [rw] name
|
26
|
+
# @return [::String]
|
27
|
+
# Identifier. The resource name of the Pipeline. Must be unique within the
|
28
|
+
# location of the project and must be in
|
29
|
+
# `projects/{project}/locations/{location}/pipelines/{pipeline}` format.
|
30
|
+
# @!attribute [r] create_time
|
31
|
+
# @return [::Google::Protobuf::Timestamp]
|
32
|
+
# Output only. The creation time.
|
33
|
+
# A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up
|
34
|
+
# to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and
|
35
|
+
# "2014-10-02T15:01:23.045123456Z".
|
36
|
+
# @!attribute [r] update_time
|
37
|
+
# @return [::Google::Protobuf::Timestamp]
|
38
|
+
# Output only. The last-modified time.
|
39
|
+
# A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up
|
40
|
+
# to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and
|
41
|
+
# "2014-10-02T15:01:23.045123456Z".
|
42
|
+
# @!attribute [rw] labels
|
43
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
44
|
+
# Optional. User labels attached to the Pipeline that can be used to group
|
45
|
+
# resources. An object containing a list of "key": value pairs. Example: {
|
46
|
+
# "name": "wrench", "mass": "1.3kg", "count": "3" }.
|
47
|
+
# @!attribute [r] uid
|
48
|
+
# @return [::String]
|
49
|
+
# Output only. Server-assigned unique identifier for the Pipeline. The value
|
50
|
+
# is a UUID4 string and guaranteed to remain unchanged until the resource is
|
51
|
+
# deleted.
|
52
|
+
# @!attribute [rw] annotations
|
53
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
54
|
+
# Optional. User-defined annotations. See
|
55
|
+
# https://google.aip.dev/128#annotations.
|
56
|
+
# @!attribute [rw] display_name
|
57
|
+
# @return [::String]
|
58
|
+
# Optional. Display name of resource.
|
59
|
+
# @!attribute [rw] destinations
|
60
|
+
# @return [::Array<::Google::Cloud::Eventarc::V1::Pipeline::Destination>]
|
61
|
+
# Required. List of destinations to which messages will be forwarded.
|
62
|
+
# Currently, exactly one destination is supported per Pipeline.
|
63
|
+
# @!attribute [rw] mediations
|
64
|
+
# @return [::Array<::Google::Cloud::Eventarc::V1::Pipeline::Mediation>]
|
65
|
+
# Optional. List of mediation operations to be performed on the message.
|
66
|
+
# Currently, only one Transformation operation is allowed in each Pipeline.
|
67
|
+
# @!attribute [rw] crypto_key_name
|
68
|
+
# @return [::String]
|
69
|
+
# Optional. Resource name of a KMS crypto key (managed by the user) used to
|
70
|
+
# encrypt/decrypt the event data. If not set, an internal Google-owned key
|
71
|
+
# will be used to encrypt messages. It must match the pattern
|
72
|
+
# "projects/\\{project}/locations/\\{location}/keyRings/\\{keyring}/cryptoKeys/\\{key}".
|
73
|
+
# @!attribute [rw] input_payload_format
|
74
|
+
# @return [::Google::Cloud::Eventarc::V1::Pipeline::MessagePayloadFormat]
|
75
|
+
# Optional. The payload format expected for the messages received by the
|
76
|
+
# Pipeline. If input_payload_format is set then any messages not matching
|
77
|
+
# this format will be treated as persistent errors. If input_payload_format
|
78
|
+
# is not set, then the message data will be treated as an opaque binary and
|
79
|
+
# no output format can be set on the Pipeline through the
|
80
|
+
# Pipeline.Destination.output_payload_format field. Any Mediations on the
|
81
|
+
# Pipeline that involve access to the data field will fail as persistent
|
82
|
+
# errors.
|
83
|
+
# @!attribute [rw] logging_config
|
84
|
+
# @return [::Google::Cloud::Eventarc::V1::LoggingConfig]
|
85
|
+
# Optional. Config to control Platform Logging for Pipelines.
|
86
|
+
# @!attribute [rw] retry_policy
|
87
|
+
# @return [::Google::Cloud::Eventarc::V1::Pipeline::RetryPolicy]
|
88
|
+
# Optional. The retry policy to use in the pipeline.
|
89
|
+
# @!attribute [rw] etag
|
90
|
+
# @return [::String]
|
91
|
+
# Output only. This checksum is computed by the server based on the value of
|
92
|
+
# other fields, and might be sent only on create requests to ensure that the
|
93
|
+
# client has an up-to-date value before proceeding.
|
94
|
+
class Pipeline
|
95
|
+
include ::Google::Protobuf::MessageExts
|
96
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
97
|
+
|
98
|
+
# Represents the format of message data.
|
99
|
+
# @!attribute [rw] protobuf
|
100
|
+
# @return [::Google::Cloud::Eventarc::V1::Pipeline::MessagePayloadFormat::ProtobufFormat]
|
101
|
+
# Optional. Protobuf format.
|
102
|
+
# @!attribute [rw] avro
|
103
|
+
# @return [::Google::Cloud::Eventarc::V1::Pipeline::MessagePayloadFormat::AvroFormat]
|
104
|
+
# Optional. Avro format.
|
105
|
+
# @!attribute [rw] json
|
106
|
+
# @return [::Google::Cloud::Eventarc::V1::Pipeline::MessagePayloadFormat::JsonFormat]
|
107
|
+
# Optional. JSON format.
|
108
|
+
class MessagePayloadFormat
|
109
|
+
include ::Google::Protobuf::MessageExts
|
110
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
111
|
+
|
112
|
+
# The format of a JSON message payload.
|
113
|
+
class JsonFormat
|
114
|
+
include ::Google::Protobuf::MessageExts
|
115
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
116
|
+
end
|
117
|
+
|
118
|
+
# The format of a Protobuf message payload.
|
119
|
+
# @!attribute [rw] schema_definition
|
120
|
+
# @return [::String]
|
121
|
+
# Optional. The entire schema definition is stored in this field.
|
122
|
+
class ProtobufFormat
|
123
|
+
include ::Google::Protobuf::MessageExts
|
124
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
125
|
+
end
|
126
|
+
|
127
|
+
# The format of an AVRO message payload.
|
128
|
+
# @!attribute [rw] schema_definition
|
129
|
+
# @return [::String]
|
130
|
+
# Optional. The entire schema definition is stored in this field.
|
131
|
+
class AvroFormat
|
132
|
+
include ::Google::Protobuf::MessageExts
|
133
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
# Represents a target of an invocation over HTTP.
|
138
|
+
# @!attribute [rw] network_config
|
139
|
+
# @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::NetworkConfig]
|
140
|
+
# Optional. Network config is used to configure how Pipeline resolves and
|
141
|
+
# connects to a destination.
|
142
|
+
# @!attribute [rw] http_endpoint
|
143
|
+
# @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::HttpEndpoint]
|
144
|
+
# Optional. An HTTP endpoint destination described by an URI.
|
145
|
+
# If a DNS FQDN is provided as the endpoint, Pipeline will create a
|
146
|
+
# peering zone to the consumer VPC and forward DNS requests to the VPC
|
147
|
+
# specified by network config to resolve the service endpoint. See:
|
148
|
+
# https://cloud.google.com/dns/docs/zones/zones-overview#peering_zones
|
149
|
+
# @!attribute [rw] workflow
|
150
|
+
# @return [::String]
|
151
|
+
# Optional. The resource name of the Workflow whose Executions are
|
152
|
+
# triggered by the events. The Workflow resource should be deployed in
|
153
|
+
# the same project as the Pipeline. Format:
|
154
|
+
# `projects/{project}/locations/{location}/workflows/{workflow}`
|
155
|
+
# @!attribute [rw] message_bus
|
156
|
+
# @return [::String]
|
157
|
+
# Optional. The resource name of the Message Bus to which events should
|
158
|
+
# be published. The Message Bus resource should exist in the same project
|
159
|
+
# as the Pipeline. Format:
|
160
|
+
# `projects/{project}/locations/{location}/messageBuses/{message_bus}`
|
161
|
+
# @!attribute [rw] topic
|
162
|
+
# @return [::String]
|
163
|
+
# Optional. The resource name of the Pub/Sub topic to which events should
|
164
|
+
# be published. Format:
|
165
|
+
# `projects/{project}/locations/{location}/topics/{topic}`
|
166
|
+
# @!attribute [rw] authentication_config
|
167
|
+
# @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig]
|
168
|
+
# Optional. An authentication config used to authenticate message requests,
|
169
|
+
# such that destinations can verify the source. For example, this can be
|
170
|
+
# used with private GCP destinations that require GCP credentials to access
|
171
|
+
# like Cloud Run. This field is optional and should be set only by users
|
172
|
+
# interested in authenticated push
|
173
|
+
# @!attribute [rw] output_payload_format
|
174
|
+
# @return [::Google::Cloud::Eventarc::V1::Pipeline::MessagePayloadFormat]
|
175
|
+
# Optional. The message format before it is delivered to the destination.
|
176
|
+
# If not set, the message will be delivered in the format it was originally
|
177
|
+
# delivered to the Pipeline. This field can only be set if
|
178
|
+
# Pipeline.input_payload_format is also set.
|
179
|
+
class Destination
|
180
|
+
include ::Google::Protobuf::MessageExts
|
181
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
182
|
+
|
183
|
+
# Represents a network config to be used for destination resolution and
|
184
|
+
# connectivity.
|
185
|
+
# @!attribute [rw] network_attachment
|
186
|
+
# @return [::String]
|
187
|
+
# Required. Name of the NetworkAttachment that allows access to the
|
188
|
+
# consumer VPC. Format:
|
189
|
+
# `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}`
|
190
|
+
class NetworkConfig
|
191
|
+
include ::Google::Protobuf::MessageExts
|
192
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
193
|
+
end
|
194
|
+
|
195
|
+
# Represents a HTTP endpoint destination.
|
196
|
+
# @!attribute [rw] uri
|
197
|
+
# @return [::String]
|
198
|
+
# Required. The URI of the HTTP enpdoint.
|
199
|
+
#
|
200
|
+
# The value must be a RFC2396 URI string.
|
201
|
+
# Examples: `https://svc.us-central1.p.local:8080/route`.
|
202
|
+
# Only the HTTPS protocol is supported.
|
203
|
+
# @!attribute [rw] message_binding_template
|
204
|
+
# @return [::String]
|
205
|
+
# Optional. The CEL expression used to modify how the destination-bound
|
206
|
+
# HTTP request is constructed.
|
207
|
+
#
|
208
|
+
# If a binding expression is not specified here, the message
|
209
|
+
# is treated as a CloudEvent and is mapped to the HTTP request according
|
210
|
+
# to the CloudEvent HTTP Protocol Binding Binary Content Mode. In this
|
211
|
+
# representation, all fields except the `data` and `datacontenttype`
|
212
|
+
# field on the message are mapped to HTTP request headers with a prefix
|
213
|
+
# of `ce-`.
|
214
|
+
#
|
215
|
+
# To construct the HTTP request payload and the value of the content-type
|
216
|
+
# HTTP header, the payload format is defined as follows:
|
217
|
+
# 1) Use the output_payload_format_type on the Pipeline.Destination if it
|
218
|
+
# is set, else:
|
219
|
+
# 2) Use the input_payload_format_type on the Pipeline if it is set,
|
220
|
+
# else:
|
221
|
+
# 3) Treat the payload as opaque binary data.
|
222
|
+
#
|
223
|
+
# The `data` field of the message is converted to the payload format or
|
224
|
+
# left as-is for case 3) and then attached as the payload of the HTTP
|
225
|
+
# request. The `content-type` header on the HTTP request is set to the
|
226
|
+
# payload format type or left empty for case 3). However, if a mediation
|
227
|
+
# has updated the `datacontenttype` field on the message so that it is
|
228
|
+
# not the same as the payload format type but it is still a prefix of the
|
229
|
+
# payload format type, then the `content-type` header on the HTTP request
|
230
|
+
# is set to this `datacontenttype` value. For example, if the
|
231
|
+
# `datacontenttype` is "application/json" and the payload format type is
|
232
|
+
# "application/json; charset=utf-8", then the `content-type` header on
|
233
|
+
# the HTTP request is set to "application/json; charset=utf-8".
|
234
|
+
#
|
235
|
+
# If a non-empty binding expression is specified then this expression is
|
236
|
+
# used to modify the default CloudEvent HTTP Protocol Binding Binary
|
237
|
+
# Content representation.
|
238
|
+
# The result of the CEL expression must be a map of key/value pairs
|
239
|
+
# which is used as follows:
|
240
|
+
# - If a map named `headers` exists on the result of the expression,
|
241
|
+
# then its key/value pairs are directly mapped to the HTTP request
|
242
|
+
# headers. The headers values are constructed from the corresponding
|
243
|
+
# value type’s canonical representation. If the `headers` field doesn’t
|
244
|
+
# exist then the resulting HTTP request will be the headers of the
|
245
|
+
# CloudEvent HTTP Binding Binary Content Mode representation of the final
|
246
|
+
# message. Note: If the specified binding expression, has updated the
|
247
|
+
# `datacontenttype` field on the message so that it is not the same as
|
248
|
+
# the payload format type but it is still a prefix of the payload format
|
249
|
+
# type, then the `content-type` header in the `headers` map is set to
|
250
|
+
# this `datacontenttype` value.
|
251
|
+
# - If a field named `body` exists on the result of the expression then
|
252
|
+
# its value is directly mapped to the body of the request. If the value
|
253
|
+
# of the `body` field is of type bytes or string then it is used for
|
254
|
+
# the HTTP request body as-is, with no conversion. If the body field is
|
255
|
+
# of any other type then it is converted to a JSON string. If the body
|
256
|
+
# field does not exist then the resulting payload of the HTTP request
|
257
|
+
# will be data value of the CloudEvent HTTP Binding Binary Content Mode
|
258
|
+
# representation of the final message as described earlier.
|
259
|
+
# - Any other fields in the resulting expression will be ignored.
|
260
|
+
#
|
261
|
+
# The CEL expression may access the incoming CloudEvent message in its
|
262
|
+
# definition, as follows:
|
263
|
+
# - The `data` field of the incoming CloudEvent message can be accessed
|
264
|
+
# using the `message.data` value. Subfields of `message.data` may also be
|
265
|
+
# accessed if an input_payload_format has been specified on the Pipeline.
|
266
|
+
# - Each attribute of the incoming CloudEvent message can be accessed
|
267
|
+
# using the `message.<key>` value, where <key> is replaced with the
|
268
|
+
# name of the attribute.
|
269
|
+
# - Existing headers can be accessed in the CEL expression using the
|
270
|
+
# `headers` variable. The `headers` variable defines a map of key/value
|
271
|
+
# pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding
|
272
|
+
# Binary Content Mode representation of the final message as described
|
273
|
+
# earlier. For example, the following CEL expression can be used to
|
274
|
+
# construct an HTTP request by adding an additional header to the HTTP
|
275
|
+
# headers of the CloudEvent HTTP Binding Binary Content Mode
|
276
|
+
# representation of the final message and by overwriting the body of the
|
277
|
+
# request:
|
278
|
+
#
|
279
|
+
# ```
|
280
|
+
# {
|
281
|
+
# "headers": headers.merge(\\{"new-header-key": "new-header-value"}),
|
282
|
+
# "body": "new-body"
|
283
|
+
# }
|
284
|
+
# ```
|
285
|
+
#
|
286
|
+
# Additionally, the following CEL extension functions are provided for
|
287
|
+
# use in this CEL expression:
|
288
|
+
# - toBase64Url:
|
289
|
+
# map.toBase64Url() -> string
|
290
|
+
# - Converts a CelValue to a base64url encoded string
|
291
|
+
# - toJsonString: map.toJsonString() -> string
|
292
|
+
# - Converts a CelValue to a JSON string
|
293
|
+
# - merge:
|
294
|
+
# map1.merge(map2) -> map3
|
295
|
+
# - Merges the passed CEL map with the existing CEL map the
|
296
|
+
# function is applied to.
|
297
|
+
# - If the same key exists in both maps, if the key's value is type
|
298
|
+
# map both maps are merged else the value from the passed map is
|
299
|
+
# used.
|
300
|
+
# - denormalize:
|
301
|
+
# map.denormalize() -> map
|
302
|
+
# - Denormalizes a CEL map such that every value of type map or key
|
303
|
+
# in the map is expanded to return a single level map.
|
304
|
+
# - The resulting keys are "." separated indices of the map keys.
|
305
|
+
# - For example:
|
306
|
+
# {
|
307
|
+
# "a": 1,
|
308
|
+
# "b": {
|
309
|
+
# "c": 2,
|
310
|
+
# "d": 3
|
311
|
+
# }
|
312
|
+
# "e": [4, 5]
|
313
|
+
# }
|
314
|
+
# .denormalize()
|
315
|
+
# -> {
|
316
|
+
# "a": 1,
|
317
|
+
# "b.c": 2,
|
318
|
+
# "b.d": 3,
|
319
|
+
# "e.0": 4,
|
320
|
+
# "e.1": 5
|
321
|
+
# }
|
322
|
+
# - setField:
|
323
|
+
# map.setField(key, value) -> message
|
324
|
+
# - Sets the field of the message with the given key to the
|
325
|
+
# given value.
|
326
|
+
# - If the field is not present it will be added.
|
327
|
+
# - If the field is present it will be overwritten.
|
328
|
+
# - The key can be a dot separated path to set a field in a nested
|
329
|
+
# message.
|
330
|
+
# - Key must be of type string.
|
331
|
+
# - Value may be any valid type.
|
332
|
+
# - removeFields:
|
333
|
+
# map.removeFields([key1, key2, ...]) -> message
|
334
|
+
# - Removes the fields of the map with the given keys.
|
335
|
+
# - The keys can be a dot separated path to remove a field in a
|
336
|
+
# nested message.
|
337
|
+
# - If a key is not found it will be ignored.
|
338
|
+
# - Keys must be of type string.
|
339
|
+
# - toMap:
|
340
|
+
# [map1, map2, ...].toMap() -> map
|
341
|
+
# - Converts a CEL list of CEL maps to a single CEL map
|
342
|
+
# - toDestinationPayloadFormat():
|
343
|
+
# message.data.toDestinationPayloadFormat() -> string or bytes
|
344
|
+
# - Converts the message data to the destination payload format
|
345
|
+
# specified in Pipeline.Destination.output_payload_format
|
346
|
+
# - This function is meant to be applied to the message.data field.
|
347
|
+
# - If the destination payload format is not set, the function will
|
348
|
+
# return the message data unchanged.
|
349
|
+
# - toCloudEventJsonWithPayloadFormat:
|
350
|
+
# message.toCloudEventJsonWithPayloadFormat() -> map
|
351
|
+
# - Converts a message to the corresponding structure of JSON
|
352
|
+
# format for CloudEvents
|
353
|
+
# - This function applies toDestinationPayloadFormat() to the
|
354
|
+
# message data. It also sets the corresponding datacontenttype of
|
355
|
+
# the CloudEvent, as indicated by
|
356
|
+
# Pipeline.Destination.output_payload_format. If no
|
357
|
+
# output_payload_format is set it will use the existing
|
358
|
+
# datacontenttype on the CloudEvent if present, else leave
|
359
|
+
# datacontenttype absent.
|
360
|
+
# - This function expects that the content of the message will
|
361
|
+
# adhere to the standard CloudEvent format. If it doesn’t then this
|
362
|
+
# function will fail.
|
363
|
+
# - The result is a CEL map that corresponds to the JSON
|
364
|
+
# representation of the CloudEvent. To convert that data to a JSON
|
365
|
+
# string it can be chained with the toJsonString function.
|
366
|
+
#
|
367
|
+
# The Pipeline expects that the message it receives adheres to the
|
368
|
+
# standard CloudEvent format. If it doesn’t then the outgoing message
|
369
|
+
# request may fail with a persistent error.
|
370
|
+
class HttpEndpoint
|
371
|
+
include ::Google::Protobuf::MessageExts
|
372
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
373
|
+
end
|
374
|
+
|
375
|
+
# Represents a config used to authenticate message requests.
|
376
|
+
# @!attribute [rw] google_oidc
|
377
|
+
# @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OidcToken]
|
378
|
+
# Optional. This authenticate method will apply Google OIDC tokens
|
379
|
+
# signed by a GCP service account to the requests.
|
380
|
+
# @!attribute [rw] oauth_token
|
381
|
+
# @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OAuthToken]
|
382
|
+
# Optional. If specified, an [OAuth
|
383
|
+
# token](https://developers.google.com/identity/protocols/OAuth2) will
|
384
|
+
# be generated and attached as an `Authorization` header in the HTTP
|
385
|
+
# request.
|
386
|
+
#
|
387
|
+
# This type of authorization should generally only be used when calling
|
388
|
+
# Google APIs hosted on *.googleapis.com.
|
389
|
+
class AuthenticationConfig
|
390
|
+
include ::Google::Protobuf::MessageExts
|
391
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
392
|
+
|
393
|
+
# Represents a config used to authenticate with a Google OIDC token using
|
394
|
+
# a GCP service account. Use this authentication method to invoke your
|
395
|
+
# Cloud Run and Cloud Functions destinations or HTTP endpoints that
|
396
|
+
# support Google OIDC.
|
397
|
+
# @!attribute [rw] service_account
|
398
|
+
# @return [::String]
|
399
|
+
# Required. Service account email used to generate the OIDC Token.
|
400
|
+
# The principal who calls this API must have
|
401
|
+
# iam.serviceAccounts.actAs permission in the service account. See
|
402
|
+
# https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
|
403
|
+
# for more information. Eventarc service agents must have
|
404
|
+
# roles/roles/iam.serviceAccountTokenCreator role to allow the
|
405
|
+
# Pipeline to create OpenID tokens for authenticated requests.
|
406
|
+
# @!attribute [rw] audience
|
407
|
+
# @return [::String]
|
408
|
+
# Optional. Audience to be used to generate the OIDC Token. The
|
409
|
+
# audience claim identifies the recipient that the JWT is intended for.
|
410
|
+
# If unspecified, the destination URI will be used.
|
411
|
+
class OidcToken
|
412
|
+
include ::Google::Protobuf::MessageExts
|
413
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
414
|
+
end
|
415
|
+
|
416
|
+
# Contains information needed for generating an
|
417
|
+
# [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
|
418
|
+
# This type of authorization should generally only be used when calling
|
419
|
+
# Google APIs hosted on *.googleapis.com.
|
420
|
+
# @!attribute [rw] service_account
|
421
|
+
# @return [::String]
|
422
|
+
# Required. Service account email used to generate the [OAuth
|
423
|
+
# token](https://developers.google.com/identity/protocols/OAuth2).
|
424
|
+
# The principal who calls this API must have
|
425
|
+
# iam.serviceAccounts.actAs permission in the service account. See
|
426
|
+
# https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
|
427
|
+
# for more information. Eventarc service agents must have
|
428
|
+
# roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline
|
429
|
+
# to create OAuth2 tokens for authenticated requests.
|
430
|
+
# @!attribute [rw] scope
|
431
|
+
# @return [::String]
|
432
|
+
# Optional. OAuth scope to be used for generating OAuth access token.
|
433
|
+
# If not specified, "https://www.googleapis.com/auth/cloud-platform"
|
434
|
+
# will be used.
|
435
|
+
class OAuthToken
|
436
|
+
include ::Google::Protobuf::MessageExts
|
437
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
438
|
+
end
|
439
|
+
end
|
440
|
+
end
|
441
|
+
|
442
|
+
# Mediation defines different ways to modify the Pipeline.
|
443
|
+
# @!attribute [rw] transformation
|
444
|
+
# @return [::Google::Cloud::Eventarc::V1::Pipeline::Mediation::Transformation]
|
445
|
+
# Optional. How the Pipeline is to transform messages
|
446
|
+
class Mediation
|
447
|
+
include ::Google::Protobuf::MessageExts
|
448
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
449
|
+
|
450
|
+
# Transformation defines the way to transform an incoming message.
|
451
|
+
# @!attribute [rw] transformation_template
|
452
|
+
# @return [::String]
|
453
|
+
# Optional. The CEL expression template to apply to transform messages.
|
454
|
+
# The following CEL extension functions are provided for
|
455
|
+
# use in this CEL expression:
|
456
|
+
# - merge:
|
457
|
+
# map1.merge(map2) -> map3
|
458
|
+
# - Merges the passed CEL map with the existing CEL map the
|
459
|
+
# function is applied to.
|
460
|
+
# - If the same key exists in both maps, if the key's value is type
|
461
|
+
# map both maps are merged else the value from the passed map is
|
462
|
+
# used.
|
463
|
+
# - denormalize:
|
464
|
+
# map.denormalize() -> map
|
465
|
+
# - Denormalizes a CEL map such that every value of type map or key
|
466
|
+
# in the map is expanded to return a single level map.
|
467
|
+
# - The resulting keys are "." separated indices of the map keys.
|
468
|
+
# - For example:
|
469
|
+
# {
|
470
|
+
# "a": 1,
|
471
|
+
# "b": {
|
472
|
+
# "c": 2,
|
473
|
+
# "d": 3
|
474
|
+
# }
|
475
|
+
# "e": [4, 5]
|
476
|
+
# }
|
477
|
+
# .denormalize()
|
478
|
+
# -> {
|
479
|
+
# "a": 1,
|
480
|
+
# "b.c": 2,
|
481
|
+
# "b.d": 3,
|
482
|
+
# "e.0": 4,
|
483
|
+
# "e.1": 5
|
484
|
+
# }
|
485
|
+
# - setField:
|
486
|
+
# map.setField(key, value) -> message
|
487
|
+
# - Sets the field of the message with the given key to the
|
488
|
+
# given value.
|
489
|
+
# - If the field is not present it will be added.
|
490
|
+
# - If the field is present it will be overwritten.
|
491
|
+
# - The key can be a dot separated path to set a field in a nested
|
492
|
+
# message.
|
493
|
+
# - Key must be of type string.
|
494
|
+
# - Value may be any valid type.
|
495
|
+
# - removeFields:
|
496
|
+
# map.removeFields([key1, key2, ...]) -> message
|
497
|
+
# - Removes the fields of the map with the given keys.
|
498
|
+
# - The keys can be a dot separated path to remove a field in a
|
499
|
+
# nested message.
|
500
|
+
# - If a key is not found it will be ignored.
|
501
|
+
# - Keys must be of type string.
|
502
|
+
# - toMap:
|
503
|
+
# [map1, map2, ...].toMap() -> map
|
504
|
+
# - Converts a CEL list of CEL maps to a single CEL map
|
505
|
+
# - toDestinationPayloadFormat():
|
506
|
+
# message.data.toDestinationPayloadFormat() -> string or bytes
|
507
|
+
# - Converts the message data to the destination payload format
|
508
|
+
# specified in Pipeline.Destination.output_payload_format
|
509
|
+
# - This function is meant to be applied to the message.data field.
|
510
|
+
# - If the destination payload format is not set, the function will
|
511
|
+
# return the message data unchanged.
|
512
|
+
# - toCloudEventJsonWithPayloadFormat:
|
513
|
+
# message.toCloudEventJsonWithPayloadFormat() -> map
|
514
|
+
# - Converts a message to the corresponding structure of JSON
|
515
|
+
# format for CloudEvents
|
516
|
+
# - This function applies toDestinationPayloadFormat() to the
|
517
|
+
# message data. It also sets the corresponding datacontenttype of
|
518
|
+
# the CloudEvent, as indicated by
|
519
|
+
# Pipeline.Destination.output_payload_format. If no
|
520
|
+
# output_payload_format is set it will use the existing
|
521
|
+
# datacontenttype on the CloudEvent if present, else leave
|
522
|
+
# datacontenttype absent.
|
523
|
+
# - This function expects that the content of the message will
|
524
|
+
# adhere to the standard CloudEvent format. If it doesn’t then this
|
525
|
+
# function will fail.
|
526
|
+
# - The result is a CEL map that corresponds to the JSON
|
527
|
+
# representation of the CloudEvent. To convert that data to a JSON
|
528
|
+
# string it can be chained with the toJsonString function.
|
529
|
+
class Transformation
|
530
|
+
include ::Google::Protobuf::MessageExts
|
531
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
532
|
+
end
|
533
|
+
end
|
534
|
+
|
535
|
+
# The retry policy configuration for the Pipeline. The pipeline
|
536
|
+
# exponentially backs off in case the destination is non responsive or
|
537
|
+
# returns a retryable error code. The default semantics are as follows:
|
538
|
+
# The backoff starts with a 5 second delay and doubles the
|
539
|
+
# delay after each failed attempt (10 seconds, 20 seconds, 40 seconds, etc.).
|
540
|
+
# The delay is capped at 60 seconds by default.
|
541
|
+
# Please note that if you set the min_retry_delay and max_retry_delay fields
|
542
|
+
# to the same value this will make the duration between retries constant.
|
543
|
+
# @!attribute [rw] max_attempts
|
544
|
+
# @return [::Integer]
|
545
|
+
# Optional. The maximum number of delivery attempts for any message. The
|
546
|
+
# value must be between 1 and 100. The default value for this field is 5.
|
547
|
+
# @!attribute [rw] min_retry_delay
|
548
|
+
# @return [::Google::Protobuf::Duration]
|
549
|
+
# Optional. The minimum amount of seconds to wait between retry attempts.
|
550
|
+
# The value must be between 1 and 600. The default value for this field
|
551
|
+
# is 5.
|
552
|
+
# @!attribute [rw] max_retry_delay
|
553
|
+
# @return [::Google::Protobuf::Duration]
|
554
|
+
# Optional. The maximum amount of seconds to wait between retry attempts.
|
555
|
+
# The value must be between 1 and 600. The default value for this field
|
556
|
+
# is 60.
|
557
|
+
class RetryPolicy
|
558
|
+
include ::Google::Protobuf::MessageExts
|
559
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
560
|
+
end
|
561
|
+
|
562
|
+
# @!attribute [rw] key
|
563
|
+
# @return [::String]
|
564
|
+
# @!attribute [rw] value
|
565
|
+
# @return [::String]
|
566
|
+
class LabelsEntry
|
567
|
+
include ::Google::Protobuf::MessageExts
|
568
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
569
|
+
end
|
570
|
+
|
571
|
+
# @!attribute [rw] key
|
572
|
+
# @return [::String]
|
573
|
+
# @!attribute [rw] value
|
574
|
+
# @return [::String]
|
575
|
+
class AnnotationsEntry
|
576
|
+
include ::Google::Protobuf::MessageExts
|
577
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
578
|
+
end
|
579
|
+
end
|
580
|
+
end
|
581
|
+
end
|
582
|
+
end
|
583
|
+
end
|