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.
- checksums.yaml +4 -4
- data/README.md +30 -20
- 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 +2595 -187
- data/lib/google/cloud/eventarc/v1/eventarc/operations.rb +12 -15
- data/lib/google/cloud/eventarc/v1/eventarc/paths.rb +112 -0
- data/lib/google/cloud/eventarc/v1/eventarc/rest/client.rb +2442 -193
- data/lib/google/cloud/eventarc/v1/eventarc/rest/operations.rb +43 -38
- data/lib/google/cloud/eventarc/v1/eventarc/rest/service_stub.rb +1602 -265
- 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 +39 -0
- data/proto_docs/google/api/field_info.rb +88 -0
- 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
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +18 -5
@@ -73,6 +73,138 @@ module Google
|
|
73
73
|
end
|
74
74
|
default_config = Client::Configuration.new parent_config
|
75
75
|
|
76
|
+
default_config.rpcs.get_trigger.timeout = 60.0
|
77
|
+
default_config.rpcs.get_trigger.retry_policy = {
|
78
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
79
|
+
}
|
80
|
+
|
81
|
+
default_config.rpcs.list_triggers.timeout = 60.0
|
82
|
+
default_config.rpcs.list_triggers.retry_policy = {
|
83
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
84
|
+
}
|
85
|
+
|
86
|
+
default_config.rpcs.create_trigger.timeout = 60.0
|
87
|
+
|
88
|
+
default_config.rpcs.update_trigger.timeout = 60.0
|
89
|
+
|
90
|
+
default_config.rpcs.delete_trigger.timeout = 60.0
|
91
|
+
|
92
|
+
default_config.rpcs.get_channel.timeout = 60.0
|
93
|
+
default_config.rpcs.get_channel.retry_policy = {
|
94
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
95
|
+
}
|
96
|
+
|
97
|
+
default_config.rpcs.list_channels.timeout = 60.0
|
98
|
+
default_config.rpcs.list_channels.retry_policy = {
|
99
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
100
|
+
}
|
101
|
+
|
102
|
+
default_config.rpcs.create_channel.timeout = 60.0
|
103
|
+
|
104
|
+
default_config.rpcs.update_channel.timeout = 60.0
|
105
|
+
|
106
|
+
default_config.rpcs.delete_channel.timeout = 60.0
|
107
|
+
|
108
|
+
default_config.rpcs.get_provider.timeout = 60.0
|
109
|
+
default_config.rpcs.get_provider.retry_policy = {
|
110
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
111
|
+
}
|
112
|
+
|
113
|
+
default_config.rpcs.list_providers.timeout = 60.0
|
114
|
+
default_config.rpcs.list_providers.retry_policy = {
|
115
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
116
|
+
}
|
117
|
+
|
118
|
+
default_config.rpcs.get_channel_connection.timeout = 60.0
|
119
|
+
default_config.rpcs.get_channel_connection.retry_policy = {
|
120
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
121
|
+
}
|
122
|
+
|
123
|
+
default_config.rpcs.list_channel_connections.timeout = 60.0
|
124
|
+
default_config.rpcs.list_channel_connections.retry_policy = {
|
125
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
126
|
+
}
|
127
|
+
|
128
|
+
default_config.rpcs.create_channel_connection.timeout = 60.0
|
129
|
+
|
130
|
+
default_config.rpcs.delete_channel_connection.timeout = 60.0
|
131
|
+
|
132
|
+
default_config.rpcs.get_google_channel_config.timeout = 60.0
|
133
|
+
default_config.rpcs.get_google_channel_config.retry_policy = {
|
134
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
135
|
+
}
|
136
|
+
|
137
|
+
default_config.rpcs.update_google_channel_config.timeout = 60.0
|
138
|
+
|
139
|
+
default_config.rpcs.get_message_bus.timeout = 60.0
|
140
|
+
default_config.rpcs.get_message_bus.retry_policy = {
|
141
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
142
|
+
}
|
143
|
+
|
144
|
+
default_config.rpcs.list_message_buses.timeout = 60.0
|
145
|
+
default_config.rpcs.list_message_buses.retry_policy = {
|
146
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
147
|
+
}
|
148
|
+
|
149
|
+
default_config.rpcs.list_message_bus_enrollments.timeout = 60.0
|
150
|
+
default_config.rpcs.list_message_bus_enrollments.retry_policy = {
|
151
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
152
|
+
}
|
153
|
+
|
154
|
+
default_config.rpcs.create_message_bus.timeout = 60.0
|
155
|
+
|
156
|
+
default_config.rpcs.update_message_bus.timeout = 60.0
|
157
|
+
|
158
|
+
default_config.rpcs.delete_message_bus.timeout = 60.0
|
159
|
+
|
160
|
+
default_config.rpcs.get_enrollment.timeout = 60.0
|
161
|
+
default_config.rpcs.get_enrollment.retry_policy = {
|
162
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
163
|
+
}
|
164
|
+
|
165
|
+
default_config.rpcs.list_enrollments.timeout = 60.0
|
166
|
+
default_config.rpcs.list_enrollments.retry_policy = {
|
167
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
168
|
+
}
|
169
|
+
|
170
|
+
default_config.rpcs.create_enrollment.timeout = 60.0
|
171
|
+
|
172
|
+
default_config.rpcs.update_enrollment.timeout = 60.0
|
173
|
+
|
174
|
+
default_config.rpcs.delete_enrollment.timeout = 60.0
|
175
|
+
|
176
|
+
default_config.rpcs.get_pipeline.timeout = 60.0
|
177
|
+
default_config.rpcs.get_pipeline.retry_policy = {
|
178
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
179
|
+
}
|
180
|
+
|
181
|
+
default_config.rpcs.list_pipelines.timeout = 60.0
|
182
|
+
default_config.rpcs.list_pipelines.retry_policy = {
|
183
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
184
|
+
}
|
185
|
+
|
186
|
+
default_config.rpcs.create_pipeline.timeout = 60.0
|
187
|
+
|
188
|
+
default_config.rpcs.update_pipeline.timeout = 60.0
|
189
|
+
|
190
|
+
default_config.rpcs.delete_pipeline.timeout = 60.0
|
191
|
+
|
192
|
+
default_config.rpcs.get_google_api_source.timeout = 60.0
|
193
|
+
default_config.rpcs.get_google_api_source.retry_policy = {
|
194
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
195
|
+
}
|
196
|
+
|
197
|
+
default_config.rpcs.list_google_api_sources.timeout = 60.0
|
198
|
+
default_config.rpcs.list_google_api_sources.retry_policy = {
|
199
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
200
|
+
}
|
201
|
+
|
202
|
+
default_config.rpcs.create_google_api_source.timeout = 60.0
|
203
|
+
|
204
|
+
default_config.rpcs.update_google_api_source.timeout = 60.0
|
205
|
+
|
206
|
+
default_config.rpcs.delete_google_api_source.timeout = 60.0
|
207
|
+
|
76
208
|
default_config
|
77
209
|
end
|
78
210
|
yield @configure if block_given?
|
@@ -167,14 +299,26 @@ module Google
|
|
167
299
|
universe_domain: @config.universe_domain,
|
168
300
|
channel_args: @config.channel_args,
|
169
301
|
interceptors: @config.interceptors,
|
170
|
-
channel_pool_config: @config.channel_pool
|
302
|
+
channel_pool_config: @config.channel_pool,
|
303
|
+
logger: @config.logger
|
171
304
|
)
|
172
305
|
|
306
|
+
@eventarc_stub.stub_logger&.info do |entry|
|
307
|
+
entry.set_system_name
|
308
|
+
entry.set_service
|
309
|
+
entry.message = "Created client for #{entry.service}"
|
310
|
+
entry.set_credentials_fields credentials
|
311
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
312
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
313
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
314
|
+
end
|
315
|
+
|
173
316
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
174
317
|
config.credentials = credentials
|
175
318
|
config.quota_project = @quota_project_id
|
176
319
|
config.endpoint = @eventarc_stub.endpoint
|
177
320
|
config.universe_domain = @eventarc_stub.universe_domain
|
321
|
+
config.logger = @eventarc_stub.logger if config.respond_to? :logger=
|
178
322
|
end
|
179
323
|
|
180
324
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -182,6 +326,7 @@ module Google
|
|
182
326
|
config.quota_project = @quota_project_id
|
183
327
|
config.endpoint = @eventarc_stub.endpoint
|
184
328
|
config.universe_domain = @eventarc_stub.universe_domain
|
329
|
+
config.logger = @eventarc_stub.logger if config.respond_to? :logger=
|
185
330
|
end
|
186
331
|
end
|
187
332
|
|
@@ -206,6 +351,15 @@ module Google
|
|
206
351
|
#
|
207
352
|
attr_reader :iam_policy_client
|
208
353
|
|
354
|
+
##
|
355
|
+
# The logger used for request/response debug logging.
|
356
|
+
#
|
357
|
+
# @return [Logger]
|
358
|
+
#
|
359
|
+
def logger
|
360
|
+
@eventarc_stub.logger
|
361
|
+
end
|
362
|
+
|
209
363
|
# Service calls
|
210
364
|
|
211
365
|
##
|
@@ -288,7 +442,6 @@ module Google
|
|
288
442
|
|
289
443
|
@eventarc_stub.call_rpc :get_trigger, request, options: options do |response, operation|
|
290
444
|
yield response, operation if block_given?
|
291
|
-
return response
|
292
445
|
end
|
293
446
|
rescue ::GRPC::BadStatus => e
|
294
447
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -398,7 +551,7 @@ module Google
|
|
398
551
|
@eventarc_stub.call_rpc :list_triggers, request, options: options do |response, operation|
|
399
552
|
response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_triggers, request, response, operation, options
|
400
553
|
yield response, operation if block_given?
|
401
|
-
|
554
|
+
throw :response, response
|
402
555
|
end
|
403
556
|
rescue ::GRPC::BadStatus => e
|
404
557
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -429,7 +582,7 @@ module Google
|
|
429
582
|
# @param trigger_id [::String]
|
430
583
|
# Required. The user-provided ID to be assigned to the trigger.
|
431
584
|
# @param validate_only [::Boolean]
|
432
|
-
#
|
585
|
+
# Optional. If set, validate the request and preview the review, but do not
|
433
586
|
# post it.
|
434
587
|
#
|
435
588
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -499,7 +652,7 @@ module Google
|
|
499
652
|
@eventarc_stub.call_rpc :create_trigger, request, options: options do |response, operation|
|
500
653
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
501
654
|
yield response, operation if block_given?
|
502
|
-
|
655
|
+
throw :response, response
|
503
656
|
end
|
504
657
|
rescue ::GRPC::BadStatus => e
|
505
658
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -533,7 +686,7 @@ module Google
|
|
533
686
|
# If set to true, and the trigger is not found, a new trigger will be
|
534
687
|
# created. In this situation, `update_mask` is ignored.
|
535
688
|
# @param validate_only [::Boolean]
|
536
|
-
#
|
689
|
+
# Optional. If set, validate the request and preview the review, but do not
|
537
690
|
# post it.
|
538
691
|
#
|
539
692
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -603,7 +756,7 @@ module Google
|
|
603
756
|
@eventarc_stub.call_rpc :update_trigger, request, options: options do |response, operation|
|
604
757
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
605
758
|
yield response, operation if block_given?
|
606
|
-
|
759
|
+
throw :response, response
|
607
760
|
end
|
608
761
|
rescue ::GRPC::BadStatus => e
|
609
762
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -636,7 +789,7 @@ module Google
|
|
636
789
|
# If set to true, and the trigger is not found, the request will succeed
|
637
790
|
# but no action will be taken on the server.
|
638
791
|
# @param validate_only [::Boolean]
|
639
|
-
#
|
792
|
+
# Optional. If set, validate the request and preview the review, but do not
|
640
793
|
# post it.
|
641
794
|
#
|
642
795
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -706,7 +859,7 @@ module Google
|
|
706
859
|
@eventarc_stub.call_rpc :delete_trigger, request, options: options do |response, operation|
|
707
860
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
708
861
|
yield response, operation if block_given?
|
709
|
-
|
862
|
+
throw :response, response
|
710
863
|
end
|
711
864
|
rescue ::GRPC::BadStatus => e
|
712
865
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -792,7 +945,6 @@ module Google
|
|
792
945
|
|
793
946
|
@eventarc_stub.call_rpc :get_channel, request, options: options do |response, operation|
|
794
947
|
yield response, operation if block_given?
|
795
|
-
return response
|
796
948
|
end
|
797
949
|
rescue ::GRPC::BadStatus => e
|
798
950
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -898,7 +1050,7 @@ module Google
|
|
898
1050
|
@eventarc_stub.call_rpc :list_channels, request, options: options do |response, operation|
|
899
1051
|
response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_channels, request, response, operation, options
|
900
1052
|
yield response, operation if block_given?
|
901
|
-
|
1053
|
+
throw :response, response
|
902
1054
|
end
|
903
1055
|
rescue ::GRPC::BadStatus => e
|
904
1056
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -929,7 +1081,7 @@ module Google
|
|
929
1081
|
# @param channel_id [::String]
|
930
1082
|
# Required. The user-provided ID to be assigned to the channel.
|
931
1083
|
# @param validate_only [::Boolean]
|
932
|
-
#
|
1084
|
+
# Optional. If set, validate the request and preview the review, but do not
|
933
1085
|
# post it.
|
934
1086
|
#
|
935
1087
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -999,7 +1151,7 @@ module Google
|
|
999
1151
|
@eventarc_stub.call_rpc :create_channel, request, options: options do |response, operation|
|
1000
1152
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1001
1153
|
yield response, operation if block_given?
|
1002
|
-
|
1154
|
+
throw :response, response
|
1003
1155
|
end
|
1004
1156
|
rescue ::GRPC::BadStatus => e
|
1005
1157
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1030,7 +1182,7 @@ module Google
|
|
1030
1182
|
# If no field mask is provided, all provided fields in the request are
|
1031
1183
|
# updated. To update all fields, provide a field mask of "*".
|
1032
1184
|
# @param validate_only [::Boolean]
|
1033
|
-
#
|
1185
|
+
# Optional. If set, validate the request and preview the review, but do not
|
1034
1186
|
# post it.
|
1035
1187
|
#
|
1036
1188
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -1100,7 +1252,7 @@ module Google
|
|
1100
1252
|
@eventarc_stub.call_rpc :update_channel, request, options: options do |response, operation|
|
1101
1253
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1102
1254
|
yield response, operation if block_given?
|
1103
|
-
|
1255
|
+
throw :response, response
|
1104
1256
|
end
|
1105
1257
|
rescue ::GRPC::BadStatus => e
|
1106
1258
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1127,7 +1279,7 @@ module Google
|
|
1127
1279
|
# @param name [::String]
|
1128
1280
|
# Required. The name of the channel to be deleted.
|
1129
1281
|
# @param validate_only [::Boolean]
|
1130
|
-
#
|
1282
|
+
# Optional. If set, validate the request and preview the review, but do not
|
1131
1283
|
# post it.
|
1132
1284
|
#
|
1133
1285
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -1197,7 +1349,7 @@ module Google
|
|
1197
1349
|
@eventarc_stub.call_rpc :delete_channel, request, options: options do |response, operation|
|
1198
1350
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1199
1351
|
yield response, operation if block_given?
|
1200
|
-
|
1352
|
+
throw :response, response
|
1201
1353
|
end
|
1202
1354
|
rescue ::GRPC::BadStatus => e
|
1203
1355
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1283,7 +1435,6 @@ module Google
|
|
1283
1435
|
|
1284
1436
|
@eventarc_stub.call_rpc :get_provider, request, options: options do |response, operation|
|
1285
1437
|
yield response, operation if block_given?
|
1286
|
-
return response
|
1287
1438
|
end
|
1288
1439
|
rescue ::GRPC::BadStatus => e
|
1289
1440
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1389,7 +1540,7 @@ module Google
|
|
1389
1540
|
@eventarc_stub.call_rpc :list_providers, request, options: options do |response, operation|
|
1390
1541
|
response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_providers, request, response, operation, options
|
1391
1542
|
yield response, operation if block_given?
|
1392
|
-
|
1543
|
+
throw :response, response
|
1393
1544
|
end
|
1394
1545
|
rescue ::GRPC::BadStatus => e
|
1395
1546
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1475,7 +1626,6 @@ module Google
|
|
1475
1626
|
|
1476
1627
|
@eventarc_stub.call_rpc :get_channel_connection, request, options: options do |response, operation|
|
1477
1628
|
yield response, operation if block_given?
|
1478
|
-
return response
|
1479
1629
|
end
|
1480
1630
|
rescue ::GRPC::BadStatus => e
|
1481
1631
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1576,7 +1726,7 @@ module Google
|
|
1576
1726
|
@eventarc_stub.call_rpc :list_channel_connections, request, options: options do |response, operation|
|
1577
1727
|
response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_channel_connections, request, response, operation, options
|
1578
1728
|
yield response, operation if block_given?
|
1579
|
-
|
1729
|
+
throw :response, response
|
1580
1730
|
end
|
1581
1731
|
rescue ::GRPC::BadStatus => e
|
1582
1732
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1674,7 +1824,7 @@ module Google
|
|
1674
1824
|
@eventarc_stub.call_rpc :create_channel_connection, request, options: options do |response, operation|
|
1675
1825
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1676
1826
|
yield response, operation if block_given?
|
1677
|
-
|
1827
|
+
throw :response, response
|
1678
1828
|
end
|
1679
1829
|
rescue ::GRPC::BadStatus => e
|
1680
1830
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1768,7 +1918,7 @@ module Google
|
|
1768
1918
|
@eventarc_stub.call_rpc :delete_channel_connection, request, options: options do |response, operation|
|
1769
1919
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1770
1920
|
yield response, operation if block_given?
|
1771
|
-
|
1921
|
+
throw :response, response
|
1772
1922
|
end
|
1773
1923
|
rescue ::GRPC::BadStatus => e
|
1774
1924
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1854,7 +2004,6 @@ module Google
|
|
1854
2004
|
|
1855
2005
|
@eventarc_stub.call_rpc :get_google_channel_config, request, options: options do |response, operation|
|
1856
2006
|
yield response, operation if block_given?
|
1857
|
-
return response
|
1858
2007
|
end
|
1859
2008
|
rescue ::GRPC::BadStatus => e
|
1860
2009
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1944,191 +2093,2303 @@ module Google
|
|
1944
2093
|
|
1945
2094
|
@eventarc_stub.call_rpc :update_google_channel_config, request, options: options do |response, operation|
|
1946
2095
|
yield response, operation if block_given?
|
1947
|
-
return response
|
1948
2096
|
end
|
1949
2097
|
rescue ::GRPC::BadStatus => e
|
1950
2098
|
raise ::Google::Cloud::Error.from_error(e)
|
1951
2099
|
end
|
1952
2100
|
|
1953
2101
|
##
|
1954
|
-
#
|
2102
|
+
# Get a single MessageBus.
|
1955
2103
|
#
|
1956
|
-
#
|
1957
|
-
#
|
1958
|
-
#
|
1959
|
-
# applied individually to specific RPCs. See
|
1960
|
-
# {::Google::Cloud::Eventarc::V1::Eventarc::Client::Configuration::Rpcs}
|
1961
|
-
# for a list of RPCs that can be configured independently.
|
2104
|
+
# @overload get_message_bus(request, options = nil)
|
2105
|
+
# Pass arguments to `get_message_bus` via a request object, either of type
|
2106
|
+
# {::Google::Cloud::Eventarc::V1::GetMessageBusRequest} or an equivalent Hash.
|
1962
2107
|
#
|
1963
|
-
#
|
1964
|
-
#
|
2108
|
+
# @param request [::Google::Cloud::Eventarc::V1::GetMessageBusRequest, ::Hash]
|
2109
|
+
# A request object representing the call parameters. Required. To specify no
|
2110
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2111
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2112
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1965
2113
|
#
|
1966
|
-
# @
|
2114
|
+
# @overload get_message_bus(name: nil)
|
2115
|
+
# Pass arguments to `get_message_bus` via keyword arguments. Note that at
|
2116
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2117
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1967
2118
|
#
|
1968
|
-
#
|
1969
|
-
#
|
1970
|
-
# # and all remaining timeouts to 10 seconds.
|
1971
|
-
# ::Google::Cloud::Eventarc::V1::Eventarc::Client.configure do |config|
|
1972
|
-
# config.timeout = 10.0
|
1973
|
-
# config.rpcs.get_trigger.timeout = 20.0
|
1974
|
-
# end
|
2119
|
+
# @param name [::String]
|
2120
|
+
# Required. The name of the message bus to get.
|
1975
2121
|
#
|
1976
|
-
#
|
1977
|
-
#
|
1978
|
-
#
|
1979
|
-
# config.rpcs.get_trigger.timeout = 20.0
|
1980
|
-
# end
|
2122
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2123
|
+
# @yieldparam response [::Google::Cloud::Eventarc::V1::MessageBus]
|
2124
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1981
2125
|
#
|
1982
|
-
#
|
1983
|
-
# A custom service endpoint, as a hostname or hostname:port. The default is
|
1984
|
-
# nil, indicating to use the default endpoint in the current universe domain.
|
1985
|
-
# @return [::String,nil]
|
1986
|
-
# @!attribute [rw] credentials
|
1987
|
-
# Credentials to send with calls. You may provide any of the following types:
|
1988
|
-
# * (`String`) The path to a service account key file in JSON format
|
1989
|
-
# * (`Hash`) A service account key as a Hash
|
1990
|
-
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1991
|
-
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1992
|
-
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1993
|
-
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1994
|
-
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1995
|
-
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1996
|
-
# * (`nil`) indicating no credentials
|
1997
|
-
# @return [::Object]
|
1998
|
-
# @!attribute [rw] scope
|
1999
|
-
# The OAuth scopes
|
2000
|
-
# @return [::Array<::String>]
|
2001
|
-
# @!attribute [rw] lib_name
|
2002
|
-
# The library name as recorded in instrumentation and logging
|
2003
|
-
# @return [::String]
|
2004
|
-
# @!attribute [rw] lib_version
|
2005
|
-
# The library version as recorded in instrumentation and logging
|
2006
|
-
# @return [::String]
|
2007
|
-
# @!attribute [rw] channel_args
|
2008
|
-
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
2009
|
-
# `GRPC::Core::Channel` object is provided as the credential.
|
2010
|
-
# @return [::Hash]
|
2011
|
-
# @!attribute [rw] interceptors
|
2012
|
-
# An array of interceptors that are run before calls are executed.
|
2013
|
-
# @return [::Array<::GRPC::ClientInterceptor>]
|
2014
|
-
# @!attribute [rw] timeout
|
2015
|
-
# The call timeout in seconds.
|
2016
|
-
# @return [::Numeric]
|
2017
|
-
# @!attribute [rw] metadata
|
2018
|
-
# Additional gRPC headers to be sent with the call.
|
2019
|
-
# @return [::Hash{::Symbol=>::String}]
|
2020
|
-
# @!attribute [rw] retry_policy
|
2021
|
-
# The retry policy. The value is a hash with the following keys:
|
2022
|
-
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
2023
|
-
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
2024
|
-
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
2025
|
-
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
2026
|
-
# trigger a retry.
|
2027
|
-
# @return [::Hash]
|
2028
|
-
# @!attribute [rw] quota_project
|
2029
|
-
# A separate project against which to charge quota.
|
2030
|
-
# @return [::String]
|
2031
|
-
# @!attribute [rw] universe_domain
|
2032
|
-
# The universe domain within which to make requests. This determines the
|
2033
|
-
# default endpoint URL. The default value of nil uses the environment
|
2034
|
-
# universe (usually the default "googleapis.com" universe).
|
2035
|
-
# @return [::String,nil]
|
2126
|
+
# @return [::Google::Cloud::Eventarc::V1::MessageBus]
|
2036
2127
|
#
|
2037
|
-
|
2038
|
-
|
2128
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2129
|
+
#
|
2130
|
+
# @example Basic example
|
2131
|
+
# require "google/cloud/eventarc/v1"
|
2132
|
+
#
|
2133
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2134
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
2135
|
+
#
|
2136
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2137
|
+
# request = Google::Cloud::Eventarc::V1::GetMessageBusRequest.new
|
2138
|
+
#
|
2139
|
+
# # Call the get_message_bus method.
|
2140
|
+
# result = client.get_message_bus request
|
2141
|
+
#
|
2142
|
+
# # The returned object is of type Google::Cloud::Eventarc::V1::MessageBus.
|
2143
|
+
# p result
|
2144
|
+
#
|
2145
|
+
def get_message_bus request, options = nil
|
2146
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2039
2147
|
|
2040
|
-
|
2041
|
-
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
2042
|
-
DEFAULT_ENDPOINT = "eventarc.googleapis.com"
|
2148
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetMessageBusRequest
|
2043
2149
|
|
2044
|
-
|
2045
|
-
|
2046
|
-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
2047
|
-
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
2048
|
-
allowed.any? { |klass| klass === value }
|
2049
|
-
end
|
2050
|
-
config_attr :scope, nil, ::String, ::Array, nil
|
2051
|
-
config_attr :lib_name, nil, ::String, nil
|
2052
|
-
config_attr :lib_version, nil, ::String, nil
|
2053
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
2054
|
-
config_attr :interceptors, nil, ::Array, nil
|
2055
|
-
config_attr :timeout, nil, ::Numeric, nil
|
2056
|
-
config_attr :metadata, nil, ::Hash, nil
|
2057
|
-
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2058
|
-
config_attr :quota_project, nil, ::String, nil
|
2059
|
-
config_attr :universe_domain, nil, ::String, nil
|
2150
|
+
# Converts hash and nil to an options object
|
2151
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2060
2152
|
|
2061
|
-
#
|
2062
|
-
|
2063
|
-
@parent_config = parent_config unless parent_config.nil?
|
2153
|
+
# Customize the options with defaults
|
2154
|
+
metadata = @config.rpcs.get_message_bus.metadata.to_h
|
2064
2155
|
|
2065
|
-
|
2066
|
-
|
2156
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2157
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2158
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2159
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
2160
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2161
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2067
2162
|
|
2068
|
-
|
2069
|
-
|
2070
|
-
|
2071
|
-
#
|
2072
|
-
def rpcs
|
2073
|
-
@rpcs ||= begin
|
2074
|
-
parent_rpcs = nil
|
2075
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
2076
|
-
Rpcs.new parent_rpcs
|
2077
|
-
end
|
2163
|
+
header_params = {}
|
2164
|
+
if request.name
|
2165
|
+
header_params["name"] = request.name
|
2078
2166
|
end
|
2079
2167
|
|
2080
|
-
|
2081
|
-
|
2082
|
-
|
2083
|
-
|
2084
|
-
|
2085
|
-
|
2168
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2169
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2170
|
+
|
2171
|
+
options.apply_defaults timeout: @config.rpcs.get_message_bus.timeout,
|
2172
|
+
metadata: metadata,
|
2173
|
+
retry_policy: @config.rpcs.get_message_bus.retry_policy
|
2174
|
+
|
2175
|
+
options.apply_defaults timeout: @config.timeout,
|
2176
|
+
metadata: @config.metadata,
|
2177
|
+
retry_policy: @config.retry_policy
|
2178
|
+
|
2179
|
+
@eventarc_stub.call_rpc :get_message_bus, request, options: options do |response, operation|
|
2180
|
+
yield response, operation if block_given?
|
2086
2181
|
end
|
2182
|
+
rescue ::GRPC::BadStatus => e
|
2183
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2184
|
+
end
|
2087
2185
|
|
2088
|
-
|
2089
|
-
|
2090
|
-
|
2091
|
-
|
2092
|
-
|
2093
|
-
|
2094
|
-
|
2095
|
-
|
2096
|
-
|
2097
|
-
|
2098
|
-
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2103
|
-
|
2104
|
-
|
2105
|
-
|
2106
|
-
|
2107
|
-
|
2108
|
-
|
2109
|
-
|
2110
|
-
|
2111
|
-
|
2112
|
-
|
2113
|
-
|
2114
|
-
|
2115
|
-
|
2116
|
-
|
2117
|
-
|
2118
|
-
|
2119
|
-
|
2120
|
-
|
2121
|
-
|
2122
|
-
|
2123
|
-
|
2124
|
-
|
2125
|
-
|
2126
|
-
|
2127
|
-
|
2128
|
-
|
2129
|
-
|
2130
|
-
|
2131
|
-
|
2186
|
+
##
|
2187
|
+
# List message buses.
|
2188
|
+
#
|
2189
|
+
# @overload list_message_buses(request, options = nil)
|
2190
|
+
# Pass arguments to `list_message_buses` via a request object, either of type
|
2191
|
+
# {::Google::Cloud::Eventarc::V1::ListMessageBusesRequest} or an equivalent Hash.
|
2192
|
+
#
|
2193
|
+
# @param request [::Google::Cloud::Eventarc::V1::ListMessageBusesRequest, ::Hash]
|
2194
|
+
# A request object representing the call parameters. Required. To specify no
|
2195
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2196
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2197
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2198
|
+
#
|
2199
|
+
# @overload list_message_buses(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
|
2200
|
+
# Pass arguments to `list_message_buses` via keyword arguments. Note that at
|
2201
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2202
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2203
|
+
#
|
2204
|
+
# @param parent [::String]
|
2205
|
+
# Required. The parent collection to list triggers on.
|
2206
|
+
# @param page_size [::Integer]
|
2207
|
+
# Optional. The maximum number of results to return on each page.
|
2208
|
+
#
|
2209
|
+
# Note: The service may send fewer.
|
2210
|
+
# @param page_token [::String]
|
2211
|
+
# Optional. The page token; provide the value from the `next_page_token`
|
2212
|
+
# field in a previous call to retrieve the subsequent page.
|
2213
|
+
#
|
2214
|
+
# When paginating, all other parameters provided must match
|
2215
|
+
# the previous call that provided the page token.
|
2216
|
+
# @param order_by [::String]
|
2217
|
+
# Optional. The sorting order of the resources returned. Value should be a
|
2218
|
+
# comma-separated list of fields. The default sorting order is ascending. To
|
2219
|
+
# specify descending order for a field, append a `desc` suffix; for example:
|
2220
|
+
# `name desc, update_time`.
|
2221
|
+
# @param filter [::String]
|
2222
|
+
# Optional. The filter field that the list request will filter on.
|
2223
|
+
# Possible filtersare described in https://google.aip.dev/160.
|
2224
|
+
#
|
2225
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2226
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::MessageBus>]
|
2227
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2228
|
+
#
|
2229
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::MessageBus>]
|
2230
|
+
#
|
2231
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2232
|
+
#
|
2233
|
+
# @example Basic example
|
2234
|
+
# require "google/cloud/eventarc/v1"
|
2235
|
+
#
|
2236
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2237
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
2238
|
+
#
|
2239
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2240
|
+
# request = Google::Cloud::Eventarc::V1::ListMessageBusesRequest.new
|
2241
|
+
#
|
2242
|
+
# # Call the list_message_buses method.
|
2243
|
+
# result = client.list_message_buses request
|
2244
|
+
#
|
2245
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2246
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2247
|
+
# result.each do |item|
|
2248
|
+
# # Each element is of type ::Google::Cloud::Eventarc::V1::MessageBus.
|
2249
|
+
# p item
|
2250
|
+
# end
|
2251
|
+
#
|
2252
|
+
def list_message_buses request, options = nil
|
2253
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2254
|
+
|
2255
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListMessageBusesRequest
|
2256
|
+
|
2257
|
+
# Converts hash and nil to an options object
|
2258
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2259
|
+
|
2260
|
+
# Customize the options with defaults
|
2261
|
+
metadata = @config.rpcs.list_message_buses.metadata.to_h
|
2262
|
+
|
2263
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2264
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2265
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2266
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
2267
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2268
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2269
|
+
|
2270
|
+
header_params = {}
|
2271
|
+
if request.parent
|
2272
|
+
header_params["parent"] = request.parent
|
2273
|
+
end
|
2274
|
+
|
2275
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2276
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2277
|
+
|
2278
|
+
options.apply_defaults timeout: @config.rpcs.list_message_buses.timeout,
|
2279
|
+
metadata: metadata,
|
2280
|
+
retry_policy: @config.rpcs.list_message_buses.retry_policy
|
2281
|
+
|
2282
|
+
options.apply_defaults timeout: @config.timeout,
|
2283
|
+
metadata: @config.metadata,
|
2284
|
+
retry_policy: @config.retry_policy
|
2285
|
+
|
2286
|
+
@eventarc_stub.call_rpc :list_message_buses, request, options: options do |response, operation|
|
2287
|
+
response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_message_buses, request, response, operation, options
|
2288
|
+
yield response, operation if block_given?
|
2289
|
+
throw :response, response
|
2290
|
+
end
|
2291
|
+
rescue ::GRPC::BadStatus => e
|
2292
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2293
|
+
end
|
2294
|
+
|
2295
|
+
##
|
2296
|
+
# List message bus enrollments.
|
2297
|
+
#
|
2298
|
+
# @overload list_message_bus_enrollments(request, options = nil)
|
2299
|
+
# Pass arguments to `list_message_bus_enrollments` via a request object, either of type
|
2300
|
+
# {::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest} or an equivalent Hash.
|
2301
|
+
#
|
2302
|
+
# @param request [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest, ::Hash]
|
2303
|
+
# A request object representing the call parameters. Required. To specify no
|
2304
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2305
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2306
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2307
|
+
#
|
2308
|
+
# @overload list_message_bus_enrollments(parent: nil, page_size: nil, page_token: nil)
|
2309
|
+
# Pass arguments to `list_message_bus_enrollments` via keyword arguments. Note that at
|
2310
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2311
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2312
|
+
#
|
2313
|
+
# @param parent [::String]
|
2314
|
+
# Required. The parent message bus to list enrollments on.
|
2315
|
+
# @param page_size [::Integer]
|
2316
|
+
# Optional. The maximum number of results to return on each page.
|
2317
|
+
#
|
2318
|
+
# Note: The service may send fewer.
|
2319
|
+
# @param page_token [::String]
|
2320
|
+
# Optional. The page token; provide the value from the `next_page_token`
|
2321
|
+
# field in a previous call to retrieve the subsequent page.
|
2322
|
+
#
|
2323
|
+
# When paginating, all other parameters provided must match
|
2324
|
+
# the previous call that provided the page token.
|
2325
|
+
#
|
2326
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2327
|
+
# @yieldparam response [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse]
|
2328
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2329
|
+
#
|
2330
|
+
# @return [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse]
|
2331
|
+
#
|
2332
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2333
|
+
#
|
2334
|
+
# @example Basic example
|
2335
|
+
# require "google/cloud/eventarc/v1"
|
2336
|
+
#
|
2337
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2338
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
2339
|
+
#
|
2340
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2341
|
+
# request = Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest.new
|
2342
|
+
#
|
2343
|
+
# # Call the list_message_bus_enrollments method.
|
2344
|
+
# result = client.list_message_bus_enrollments request
|
2345
|
+
#
|
2346
|
+
# # The returned object is of type Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse.
|
2347
|
+
# p result
|
2348
|
+
#
|
2349
|
+
def list_message_bus_enrollments request, options = nil
|
2350
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2351
|
+
|
2352
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest
|
2353
|
+
|
2354
|
+
# Converts hash and nil to an options object
|
2355
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2356
|
+
|
2357
|
+
# Customize the options with defaults
|
2358
|
+
metadata = @config.rpcs.list_message_bus_enrollments.metadata.to_h
|
2359
|
+
|
2360
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2361
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2362
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2363
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
2364
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2365
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2366
|
+
|
2367
|
+
header_params = {}
|
2368
|
+
if request.parent
|
2369
|
+
header_params["parent"] = request.parent
|
2370
|
+
end
|
2371
|
+
|
2372
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2373
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2374
|
+
|
2375
|
+
options.apply_defaults timeout: @config.rpcs.list_message_bus_enrollments.timeout,
|
2376
|
+
metadata: metadata,
|
2377
|
+
retry_policy: @config.rpcs.list_message_bus_enrollments.retry_policy
|
2378
|
+
|
2379
|
+
options.apply_defaults timeout: @config.timeout,
|
2380
|
+
metadata: @config.metadata,
|
2381
|
+
retry_policy: @config.retry_policy
|
2382
|
+
|
2383
|
+
@eventarc_stub.call_rpc :list_message_bus_enrollments, request, options: options do |response, operation|
|
2384
|
+
yield response, operation if block_given?
|
2385
|
+
end
|
2386
|
+
rescue ::GRPC::BadStatus => e
|
2387
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2388
|
+
end
|
2389
|
+
|
2390
|
+
##
|
2391
|
+
# Create a new MessageBus in a particular project and location.
|
2392
|
+
#
|
2393
|
+
# @overload create_message_bus(request, options = nil)
|
2394
|
+
# Pass arguments to `create_message_bus` via a request object, either of type
|
2395
|
+
# {::Google::Cloud::Eventarc::V1::CreateMessageBusRequest} or an equivalent Hash.
|
2396
|
+
#
|
2397
|
+
# @param request [::Google::Cloud::Eventarc::V1::CreateMessageBusRequest, ::Hash]
|
2398
|
+
# A request object representing the call parameters. Required. To specify no
|
2399
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2400
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2401
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2402
|
+
#
|
2403
|
+
# @overload create_message_bus(parent: nil, message_bus: nil, message_bus_id: nil, validate_only: nil)
|
2404
|
+
# Pass arguments to `create_message_bus` via keyword arguments. Note that at
|
2405
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2406
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2407
|
+
#
|
2408
|
+
# @param parent [::String]
|
2409
|
+
# Required. The parent collection in which to add this message bus.
|
2410
|
+
# @param message_bus [::Google::Cloud::Eventarc::V1::MessageBus, ::Hash]
|
2411
|
+
# Required. The message bus to create.
|
2412
|
+
# @param message_bus_id [::String]
|
2413
|
+
# Required. The user-provided ID to be assigned to the MessageBus. It should
|
2414
|
+
# match the format (^[a-z]([a-z0-9-]\\{0,61}[a-z0-9])?$)
|
2415
|
+
# @param validate_only [::Boolean]
|
2416
|
+
# Optional. If set, validate the request and preview the review, but do not
|
2417
|
+
# post it.
|
2418
|
+
#
|
2419
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2420
|
+
# @yieldparam response [::Gapic::Operation]
|
2421
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2422
|
+
#
|
2423
|
+
# @return [::Gapic::Operation]
|
2424
|
+
#
|
2425
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2426
|
+
#
|
2427
|
+
# @example Basic example
|
2428
|
+
# require "google/cloud/eventarc/v1"
|
2429
|
+
#
|
2430
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2431
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
2432
|
+
#
|
2433
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2434
|
+
# request = Google::Cloud::Eventarc::V1::CreateMessageBusRequest.new
|
2435
|
+
#
|
2436
|
+
# # Call the create_message_bus method.
|
2437
|
+
# result = client.create_message_bus request
|
2438
|
+
#
|
2439
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2440
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2441
|
+
# # Here is how to wait for a response.
|
2442
|
+
# result.wait_until_done! timeout: 60
|
2443
|
+
# if result.response?
|
2444
|
+
# p result.response
|
2445
|
+
# else
|
2446
|
+
# puts "No response received."
|
2447
|
+
# end
|
2448
|
+
#
|
2449
|
+
def create_message_bus request, options = nil
|
2450
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2451
|
+
|
2452
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateMessageBusRequest
|
2453
|
+
|
2454
|
+
# Converts hash and nil to an options object
|
2455
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2456
|
+
|
2457
|
+
# Customize the options with defaults
|
2458
|
+
metadata = @config.rpcs.create_message_bus.metadata.to_h
|
2459
|
+
|
2460
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2461
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2462
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2463
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
2464
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2465
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2466
|
+
|
2467
|
+
header_params = {}
|
2468
|
+
if request.parent
|
2469
|
+
header_params["parent"] = request.parent
|
2470
|
+
end
|
2471
|
+
|
2472
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2473
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2474
|
+
|
2475
|
+
options.apply_defaults timeout: @config.rpcs.create_message_bus.timeout,
|
2476
|
+
metadata: metadata,
|
2477
|
+
retry_policy: @config.rpcs.create_message_bus.retry_policy
|
2478
|
+
|
2479
|
+
options.apply_defaults timeout: @config.timeout,
|
2480
|
+
metadata: @config.metadata,
|
2481
|
+
retry_policy: @config.retry_policy
|
2482
|
+
|
2483
|
+
@eventarc_stub.call_rpc :create_message_bus, request, options: options do |response, operation|
|
2484
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2485
|
+
yield response, operation if block_given?
|
2486
|
+
throw :response, response
|
2487
|
+
end
|
2488
|
+
rescue ::GRPC::BadStatus => e
|
2489
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2490
|
+
end
|
2491
|
+
|
2492
|
+
##
|
2493
|
+
# Update a single message bus.
|
2494
|
+
#
|
2495
|
+
# @overload update_message_bus(request, options = nil)
|
2496
|
+
# Pass arguments to `update_message_bus` via a request object, either of type
|
2497
|
+
# {::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest} or an equivalent Hash.
|
2498
|
+
#
|
2499
|
+
# @param request [::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest, ::Hash]
|
2500
|
+
# A request object representing the call parameters. Required. To specify no
|
2501
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2502
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2503
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2504
|
+
#
|
2505
|
+
# @overload update_message_bus(message_bus: nil, update_mask: nil, allow_missing: nil, validate_only: nil)
|
2506
|
+
# Pass arguments to `update_message_bus` via keyword arguments. Note that at
|
2507
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2508
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2509
|
+
#
|
2510
|
+
# @param message_bus [::Google::Cloud::Eventarc::V1::MessageBus, ::Hash]
|
2511
|
+
# Required. The MessageBus to be updated.
|
2512
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2513
|
+
# Optional. The fields to be updated; only fields explicitly provided are
|
2514
|
+
# updated. If no field mask is provided, all provided fields in the request
|
2515
|
+
# are updated. To update all fields, provide a field mask of "*".
|
2516
|
+
# @param allow_missing [::Boolean]
|
2517
|
+
# Optional. If set to true, and the MessageBus is not found, a new MessageBus
|
2518
|
+
# will be created. In this situation, `update_mask` is ignored.
|
2519
|
+
# @param validate_only [::Boolean]
|
2520
|
+
# Optional. If set, validate the request and preview the review, but do not
|
2521
|
+
# post it.
|
2522
|
+
#
|
2523
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2524
|
+
# @yieldparam response [::Gapic::Operation]
|
2525
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2526
|
+
#
|
2527
|
+
# @return [::Gapic::Operation]
|
2528
|
+
#
|
2529
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2530
|
+
#
|
2531
|
+
# @example Basic example
|
2532
|
+
# require "google/cloud/eventarc/v1"
|
2533
|
+
#
|
2534
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2535
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
2536
|
+
#
|
2537
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2538
|
+
# request = Google::Cloud::Eventarc::V1::UpdateMessageBusRequest.new
|
2539
|
+
#
|
2540
|
+
# # Call the update_message_bus method.
|
2541
|
+
# result = client.update_message_bus request
|
2542
|
+
#
|
2543
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2544
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2545
|
+
# # Here is how to wait for a response.
|
2546
|
+
# result.wait_until_done! timeout: 60
|
2547
|
+
# if result.response?
|
2548
|
+
# p result.response
|
2549
|
+
# else
|
2550
|
+
# puts "No response received."
|
2551
|
+
# end
|
2552
|
+
#
|
2553
|
+
def update_message_bus request, options = nil
|
2554
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2555
|
+
|
2556
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest
|
2557
|
+
|
2558
|
+
# Converts hash and nil to an options object
|
2559
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2560
|
+
|
2561
|
+
# Customize the options with defaults
|
2562
|
+
metadata = @config.rpcs.update_message_bus.metadata.to_h
|
2563
|
+
|
2564
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2565
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2566
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2567
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
2568
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2569
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2570
|
+
|
2571
|
+
header_params = {}
|
2572
|
+
if request.message_bus&.name
|
2573
|
+
header_params["message_bus.name"] = request.message_bus.name
|
2574
|
+
end
|
2575
|
+
|
2576
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2577
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2578
|
+
|
2579
|
+
options.apply_defaults timeout: @config.rpcs.update_message_bus.timeout,
|
2580
|
+
metadata: metadata,
|
2581
|
+
retry_policy: @config.rpcs.update_message_bus.retry_policy
|
2582
|
+
|
2583
|
+
options.apply_defaults timeout: @config.timeout,
|
2584
|
+
metadata: @config.metadata,
|
2585
|
+
retry_policy: @config.retry_policy
|
2586
|
+
|
2587
|
+
@eventarc_stub.call_rpc :update_message_bus, request, options: options do |response, operation|
|
2588
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2589
|
+
yield response, operation if block_given?
|
2590
|
+
throw :response, response
|
2591
|
+
end
|
2592
|
+
rescue ::GRPC::BadStatus => e
|
2593
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2594
|
+
end
|
2595
|
+
|
2596
|
+
##
|
2597
|
+
# Delete a single message bus.
|
2598
|
+
#
|
2599
|
+
# @overload delete_message_bus(request, options = nil)
|
2600
|
+
# Pass arguments to `delete_message_bus` via a request object, either of type
|
2601
|
+
# {::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest} or an equivalent Hash.
|
2602
|
+
#
|
2603
|
+
# @param request [::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest, ::Hash]
|
2604
|
+
# A request object representing the call parameters. Required. To specify no
|
2605
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2606
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2607
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2608
|
+
#
|
2609
|
+
# @overload delete_message_bus(name: nil, etag: nil, allow_missing: nil, validate_only: nil)
|
2610
|
+
# Pass arguments to `delete_message_bus` via keyword arguments. Note that at
|
2611
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2612
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2613
|
+
#
|
2614
|
+
# @param name [::String]
|
2615
|
+
# Required. The name of the MessageBus to be deleted.
|
2616
|
+
# @param etag [::String]
|
2617
|
+
# Optional. If provided, the MessageBus will only be deleted if the etag
|
2618
|
+
# matches the current etag on the resource.
|
2619
|
+
# @param allow_missing [::Boolean]
|
2620
|
+
# Optional. If set to true, and the MessageBus is not found, the request will
|
2621
|
+
# succeed but no action will be taken on the server.
|
2622
|
+
# @param validate_only [::Boolean]
|
2623
|
+
# Optional. If set, validate the request and preview the review, but do not
|
2624
|
+
# post it.
|
2625
|
+
#
|
2626
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2627
|
+
# @yieldparam response [::Gapic::Operation]
|
2628
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2629
|
+
#
|
2630
|
+
# @return [::Gapic::Operation]
|
2631
|
+
#
|
2632
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2633
|
+
#
|
2634
|
+
# @example Basic example
|
2635
|
+
# require "google/cloud/eventarc/v1"
|
2636
|
+
#
|
2637
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2638
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
2639
|
+
#
|
2640
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2641
|
+
# request = Google::Cloud::Eventarc::V1::DeleteMessageBusRequest.new
|
2642
|
+
#
|
2643
|
+
# # Call the delete_message_bus method.
|
2644
|
+
# result = client.delete_message_bus request
|
2645
|
+
#
|
2646
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2647
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2648
|
+
# # Here is how to wait for a response.
|
2649
|
+
# result.wait_until_done! timeout: 60
|
2650
|
+
# if result.response?
|
2651
|
+
# p result.response
|
2652
|
+
# else
|
2653
|
+
# puts "No response received."
|
2654
|
+
# end
|
2655
|
+
#
|
2656
|
+
def delete_message_bus request, options = nil
|
2657
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2658
|
+
|
2659
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest
|
2660
|
+
|
2661
|
+
# Converts hash and nil to an options object
|
2662
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2663
|
+
|
2664
|
+
# Customize the options with defaults
|
2665
|
+
metadata = @config.rpcs.delete_message_bus.metadata.to_h
|
2666
|
+
|
2667
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2668
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2669
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2670
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
2671
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2672
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2673
|
+
|
2674
|
+
header_params = {}
|
2675
|
+
if request.name
|
2676
|
+
header_params["name"] = request.name
|
2677
|
+
end
|
2678
|
+
|
2679
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2680
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2681
|
+
|
2682
|
+
options.apply_defaults timeout: @config.rpcs.delete_message_bus.timeout,
|
2683
|
+
metadata: metadata,
|
2684
|
+
retry_policy: @config.rpcs.delete_message_bus.retry_policy
|
2685
|
+
|
2686
|
+
options.apply_defaults timeout: @config.timeout,
|
2687
|
+
metadata: @config.metadata,
|
2688
|
+
retry_policy: @config.retry_policy
|
2689
|
+
|
2690
|
+
@eventarc_stub.call_rpc :delete_message_bus, request, options: options do |response, operation|
|
2691
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2692
|
+
yield response, operation if block_given?
|
2693
|
+
throw :response, response
|
2694
|
+
end
|
2695
|
+
rescue ::GRPC::BadStatus => e
|
2696
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2697
|
+
end
|
2698
|
+
|
2699
|
+
##
|
2700
|
+
# Get a single Enrollment.
|
2701
|
+
#
|
2702
|
+
# @overload get_enrollment(request, options = nil)
|
2703
|
+
# Pass arguments to `get_enrollment` via a request object, either of type
|
2704
|
+
# {::Google::Cloud::Eventarc::V1::GetEnrollmentRequest} or an equivalent Hash.
|
2705
|
+
#
|
2706
|
+
# @param request [::Google::Cloud::Eventarc::V1::GetEnrollmentRequest, ::Hash]
|
2707
|
+
# A request object representing the call parameters. Required. To specify no
|
2708
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2709
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2710
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2711
|
+
#
|
2712
|
+
# @overload get_enrollment(name: nil)
|
2713
|
+
# Pass arguments to `get_enrollment` via keyword arguments. Note that at
|
2714
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2715
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2716
|
+
#
|
2717
|
+
# @param name [::String]
|
2718
|
+
# Required. The name of the Enrollment to get.
|
2719
|
+
#
|
2720
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2721
|
+
# @yieldparam response [::Google::Cloud::Eventarc::V1::Enrollment]
|
2722
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2723
|
+
#
|
2724
|
+
# @return [::Google::Cloud::Eventarc::V1::Enrollment]
|
2725
|
+
#
|
2726
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2727
|
+
#
|
2728
|
+
# @example Basic example
|
2729
|
+
# require "google/cloud/eventarc/v1"
|
2730
|
+
#
|
2731
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2732
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
2733
|
+
#
|
2734
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2735
|
+
# request = Google::Cloud::Eventarc::V1::GetEnrollmentRequest.new
|
2736
|
+
#
|
2737
|
+
# # Call the get_enrollment method.
|
2738
|
+
# result = client.get_enrollment request
|
2739
|
+
#
|
2740
|
+
# # The returned object is of type Google::Cloud::Eventarc::V1::Enrollment.
|
2741
|
+
# p result
|
2742
|
+
#
|
2743
|
+
def get_enrollment request, options = nil
|
2744
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2745
|
+
|
2746
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetEnrollmentRequest
|
2747
|
+
|
2748
|
+
# Converts hash and nil to an options object
|
2749
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2750
|
+
|
2751
|
+
# Customize the options with defaults
|
2752
|
+
metadata = @config.rpcs.get_enrollment.metadata.to_h
|
2753
|
+
|
2754
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2755
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2756
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2757
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
2758
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2759
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2760
|
+
|
2761
|
+
header_params = {}
|
2762
|
+
if request.name
|
2763
|
+
header_params["name"] = request.name
|
2764
|
+
end
|
2765
|
+
|
2766
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2767
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2768
|
+
|
2769
|
+
options.apply_defaults timeout: @config.rpcs.get_enrollment.timeout,
|
2770
|
+
metadata: metadata,
|
2771
|
+
retry_policy: @config.rpcs.get_enrollment.retry_policy
|
2772
|
+
|
2773
|
+
options.apply_defaults timeout: @config.timeout,
|
2774
|
+
metadata: @config.metadata,
|
2775
|
+
retry_policy: @config.retry_policy
|
2776
|
+
|
2777
|
+
@eventarc_stub.call_rpc :get_enrollment, request, options: options do |response, operation|
|
2778
|
+
yield response, operation if block_given?
|
2779
|
+
end
|
2780
|
+
rescue ::GRPC::BadStatus => e
|
2781
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2782
|
+
end
|
2783
|
+
|
2784
|
+
##
|
2785
|
+
# List Enrollments.
|
2786
|
+
#
|
2787
|
+
# @overload list_enrollments(request, options = nil)
|
2788
|
+
# Pass arguments to `list_enrollments` via a request object, either of type
|
2789
|
+
# {::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest} or an equivalent Hash.
|
2790
|
+
#
|
2791
|
+
# @param request [::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest, ::Hash]
|
2792
|
+
# A request object representing the call parameters. Required. To specify no
|
2793
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2794
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2795
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2796
|
+
#
|
2797
|
+
# @overload list_enrollments(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
|
2798
|
+
# Pass arguments to `list_enrollments` via keyword arguments. Note that at
|
2799
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2800
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2801
|
+
#
|
2802
|
+
# @param parent [::String]
|
2803
|
+
# Required. The parent collection to list triggers on.
|
2804
|
+
# @param page_size [::Integer]
|
2805
|
+
# Optional. The maximum number of results to return on each page.
|
2806
|
+
#
|
2807
|
+
# Note: The service may send fewer.
|
2808
|
+
# @param page_token [::String]
|
2809
|
+
# Optional. The page token; provide the value from the `next_page_token`
|
2810
|
+
# field in a previous call to retrieve the subsequent page.
|
2811
|
+
#
|
2812
|
+
# When paginating, all other parameters provided must match
|
2813
|
+
# the previous call that provided the page token.
|
2814
|
+
# @param order_by [::String]
|
2815
|
+
# Optional. The sorting order of the resources returned. Value should be a
|
2816
|
+
# comma-separated list of fields. The default sorting order is ascending. To
|
2817
|
+
# specify descending order for a field, append a `desc` suffix; for example:
|
2818
|
+
# `name desc, update_time`.
|
2819
|
+
# @param filter [::String]
|
2820
|
+
# Optional. The filter field that the list request will filter on.
|
2821
|
+
# Possible filtersare described in https://google.aip.dev/160.
|
2822
|
+
#
|
2823
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2824
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Enrollment>]
|
2825
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2826
|
+
#
|
2827
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Enrollment>]
|
2828
|
+
#
|
2829
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2830
|
+
#
|
2831
|
+
# @example Basic example
|
2832
|
+
# require "google/cloud/eventarc/v1"
|
2833
|
+
#
|
2834
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2835
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
2836
|
+
#
|
2837
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2838
|
+
# request = Google::Cloud::Eventarc::V1::ListEnrollmentsRequest.new
|
2839
|
+
#
|
2840
|
+
# # Call the list_enrollments method.
|
2841
|
+
# result = client.list_enrollments request
|
2842
|
+
#
|
2843
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2844
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2845
|
+
# result.each do |item|
|
2846
|
+
# # Each element is of type ::Google::Cloud::Eventarc::V1::Enrollment.
|
2847
|
+
# p item
|
2848
|
+
# end
|
2849
|
+
#
|
2850
|
+
def list_enrollments request, options = nil
|
2851
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2852
|
+
|
2853
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest
|
2854
|
+
|
2855
|
+
# Converts hash and nil to an options object
|
2856
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2857
|
+
|
2858
|
+
# Customize the options with defaults
|
2859
|
+
metadata = @config.rpcs.list_enrollments.metadata.to_h
|
2860
|
+
|
2861
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2862
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2863
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2864
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
2865
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2866
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2867
|
+
|
2868
|
+
header_params = {}
|
2869
|
+
if request.parent
|
2870
|
+
header_params["parent"] = request.parent
|
2871
|
+
end
|
2872
|
+
|
2873
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2874
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2875
|
+
|
2876
|
+
options.apply_defaults timeout: @config.rpcs.list_enrollments.timeout,
|
2877
|
+
metadata: metadata,
|
2878
|
+
retry_policy: @config.rpcs.list_enrollments.retry_policy
|
2879
|
+
|
2880
|
+
options.apply_defaults timeout: @config.timeout,
|
2881
|
+
metadata: @config.metadata,
|
2882
|
+
retry_policy: @config.retry_policy
|
2883
|
+
|
2884
|
+
@eventarc_stub.call_rpc :list_enrollments, request, options: options do |response, operation|
|
2885
|
+
response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_enrollments, request, response, operation, options
|
2886
|
+
yield response, operation if block_given?
|
2887
|
+
throw :response, response
|
2888
|
+
end
|
2889
|
+
rescue ::GRPC::BadStatus => e
|
2890
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2891
|
+
end
|
2892
|
+
|
2893
|
+
##
|
2894
|
+
# Create a new Enrollment in a particular project and location.
|
2895
|
+
#
|
2896
|
+
# @overload create_enrollment(request, options = nil)
|
2897
|
+
# Pass arguments to `create_enrollment` via a request object, either of type
|
2898
|
+
# {::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest} or an equivalent Hash.
|
2899
|
+
#
|
2900
|
+
# @param request [::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest, ::Hash]
|
2901
|
+
# A request object representing the call parameters. Required. To specify no
|
2902
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2903
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2904
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2905
|
+
#
|
2906
|
+
# @overload create_enrollment(parent: nil, enrollment: nil, enrollment_id: nil, validate_only: nil)
|
2907
|
+
# Pass arguments to `create_enrollment` via keyword arguments. Note that at
|
2908
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2909
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2910
|
+
#
|
2911
|
+
# @param parent [::String]
|
2912
|
+
# Required. The parent collection in which to add this enrollment.
|
2913
|
+
# @param enrollment [::Google::Cloud::Eventarc::V1::Enrollment, ::Hash]
|
2914
|
+
# Required. The enrollment to create.
|
2915
|
+
# @param enrollment_id [::String]
|
2916
|
+
# Required. The user-provided ID to be assigned to the Enrollment. It should
|
2917
|
+
# match the format (^[a-z]([a-z0-9-]\\{0,61}[a-z0-9])?$).
|
2918
|
+
# @param validate_only [::Boolean]
|
2919
|
+
# Optional. If set, validate the request and preview the review, but do not
|
2920
|
+
# post it.
|
2921
|
+
#
|
2922
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2923
|
+
# @yieldparam response [::Gapic::Operation]
|
2924
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2925
|
+
#
|
2926
|
+
# @return [::Gapic::Operation]
|
2927
|
+
#
|
2928
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2929
|
+
#
|
2930
|
+
# @example Basic example
|
2931
|
+
# require "google/cloud/eventarc/v1"
|
2932
|
+
#
|
2933
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2934
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
2935
|
+
#
|
2936
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2937
|
+
# request = Google::Cloud::Eventarc::V1::CreateEnrollmentRequest.new
|
2938
|
+
#
|
2939
|
+
# # Call the create_enrollment method.
|
2940
|
+
# result = client.create_enrollment request
|
2941
|
+
#
|
2942
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2943
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2944
|
+
# # Here is how to wait for a response.
|
2945
|
+
# result.wait_until_done! timeout: 60
|
2946
|
+
# if result.response?
|
2947
|
+
# p result.response
|
2948
|
+
# else
|
2949
|
+
# puts "No response received."
|
2950
|
+
# end
|
2951
|
+
#
|
2952
|
+
def create_enrollment request, options = nil
|
2953
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2954
|
+
|
2955
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest
|
2956
|
+
|
2957
|
+
# Converts hash and nil to an options object
|
2958
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2959
|
+
|
2960
|
+
# Customize the options with defaults
|
2961
|
+
metadata = @config.rpcs.create_enrollment.metadata.to_h
|
2962
|
+
|
2963
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2964
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2965
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2966
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
2967
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2968
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2969
|
+
|
2970
|
+
header_params = {}
|
2971
|
+
if request.parent
|
2972
|
+
header_params["parent"] = request.parent
|
2973
|
+
end
|
2974
|
+
|
2975
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2976
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2977
|
+
|
2978
|
+
options.apply_defaults timeout: @config.rpcs.create_enrollment.timeout,
|
2979
|
+
metadata: metadata,
|
2980
|
+
retry_policy: @config.rpcs.create_enrollment.retry_policy
|
2981
|
+
|
2982
|
+
options.apply_defaults timeout: @config.timeout,
|
2983
|
+
metadata: @config.metadata,
|
2984
|
+
retry_policy: @config.retry_policy
|
2985
|
+
|
2986
|
+
@eventarc_stub.call_rpc :create_enrollment, request, options: options do |response, operation|
|
2987
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2988
|
+
yield response, operation if block_given?
|
2989
|
+
throw :response, response
|
2990
|
+
end
|
2991
|
+
rescue ::GRPC::BadStatus => e
|
2992
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2993
|
+
end
|
2994
|
+
|
2995
|
+
##
|
2996
|
+
# Update a single Enrollment.
|
2997
|
+
#
|
2998
|
+
# @overload update_enrollment(request, options = nil)
|
2999
|
+
# Pass arguments to `update_enrollment` via a request object, either of type
|
3000
|
+
# {::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest} or an equivalent Hash.
|
3001
|
+
#
|
3002
|
+
# @param request [::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest, ::Hash]
|
3003
|
+
# A request object representing the call parameters. Required. To specify no
|
3004
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3005
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3006
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3007
|
+
#
|
3008
|
+
# @overload update_enrollment(enrollment: nil, update_mask: nil, allow_missing: nil, validate_only: nil)
|
3009
|
+
# Pass arguments to `update_enrollment` via keyword arguments. Note that at
|
3010
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3011
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3012
|
+
#
|
3013
|
+
# @param enrollment [::Google::Cloud::Eventarc::V1::Enrollment, ::Hash]
|
3014
|
+
# Required. The Enrollment to be updated.
|
3015
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
3016
|
+
# Optional. The fields to be updated; only fields explicitly provided are
|
3017
|
+
# updated. If no field mask is provided, all provided fields in the request
|
3018
|
+
# are updated. To update all fields, provide a field mask of "*".
|
3019
|
+
# @param allow_missing [::Boolean]
|
3020
|
+
# Optional. If set to true, and the Enrollment is not found, a new Enrollment
|
3021
|
+
# will be created. In this situation, `update_mask` is ignored.
|
3022
|
+
# @param validate_only [::Boolean]
|
3023
|
+
# Optional. If set, validate the request and preview the review, but do not
|
3024
|
+
# post it.
|
3025
|
+
#
|
3026
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3027
|
+
# @yieldparam response [::Gapic::Operation]
|
3028
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3029
|
+
#
|
3030
|
+
# @return [::Gapic::Operation]
|
3031
|
+
#
|
3032
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3033
|
+
#
|
3034
|
+
# @example Basic example
|
3035
|
+
# require "google/cloud/eventarc/v1"
|
3036
|
+
#
|
3037
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3038
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
3039
|
+
#
|
3040
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3041
|
+
# request = Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest.new
|
3042
|
+
#
|
3043
|
+
# # Call the update_enrollment method.
|
3044
|
+
# result = client.update_enrollment request
|
3045
|
+
#
|
3046
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3047
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3048
|
+
# # Here is how to wait for a response.
|
3049
|
+
# result.wait_until_done! timeout: 60
|
3050
|
+
# if result.response?
|
3051
|
+
# p result.response
|
3052
|
+
# else
|
3053
|
+
# puts "No response received."
|
3054
|
+
# end
|
3055
|
+
#
|
3056
|
+
def update_enrollment request, options = nil
|
3057
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3058
|
+
|
3059
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest
|
3060
|
+
|
3061
|
+
# Converts hash and nil to an options object
|
3062
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3063
|
+
|
3064
|
+
# Customize the options with defaults
|
3065
|
+
metadata = @config.rpcs.update_enrollment.metadata.to_h
|
3066
|
+
|
3067
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3068
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3069
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3070
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
3071
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3072
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3073
|
+
|
3074
|
+
header_params = {}
|
3075
|
+
if request.enrollment&.name
|
3076
|
+
header_params["enrollment.name"] = request.enrollment.name
|
3077
|
+
end
|
3078
|
+
|
3079
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3080
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3081
|
+
|
3082
|
+
options.apply_defaults timeout: @config.rpcs.update_enrollment.timeout,
|
3083
|
+
metadata: metadata,
|
3084
|
+
retry_policy: @config.rpcs.update_enrollment.retry_policy
|
3085
|
+
|
3086
|
+
options.apply_defaults timeout: @config.timeout,
|
3087
|
+
metadata: @config.metadata,
|
3088
|
+
retry_policy: @config.retry_policy
|
3089
|
+
|
3090
|
+
@eventarc_stub.call_rpc :update_enrollment, request, options: options do |response, operation|
|
3091
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3092
|
+
yield response, operation if block_given?
|
3093
|
+
throw :response, response
|
3094
|
+
end
|
3095
|
+
rescue ::GRPC::BadStatus => e
|
3096
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3097
|
+
end
|
3098
|
+
|
3099
|
+
##
|
3100
|
+
# Delete a single Enrollment.
|
3101
|
+
#
|
3102
|
+
# @overload delete_enrollment(request, options = nil)
|
3103
|
+
# Pass arguments to `delete_enrollment` via a request object, either of type
|
3104
|
+
# {::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest} or an equivalent Hash.
|
3105
|
+
#
|
3106
|
+
# @param request [::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest, ::Hash]
|
3107
|
+
# A request object representing the call parameters. Required. To specify no
|
3108
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3109
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3110
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3111
|
+
#
|
3112
|
+
# @overload delete_enrollment(name: nil, etag: nil, allow_missing: nil, validate_only: nil)
|
3113
|
+
# Pass arguments to `delete_enrollment` via keyword arguments. Note that at
|
3114
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3115
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3116
|
+
#
|
3117
|
+
# @param name [::String]
|
3118
|
+
# Required. The name of the Enrollment to be deleted.
|
3119
|
+
# @param etag [::String]
|
3120
|
+
# Optional. If provided, the Enrollment will only be deleted if the etag
|
3121
|
+
# matches the current etag on the resource.
|
3122
|
+
# @param allow_missing [::Boolean]
|
3123
|
+
# Optional. If set to true, and the Enrollment is not found, the request will
|
3124
|
+
# succeed but no action will be taken on the server.
|
3125
|
+
# @param validate_only [::Boolean]
|
3126
|
+
# Optional. If set, validate the request and preview the review, but do not
|
3127
|
+
# post it.
|
3128
|
+
#
|
3129
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3130
|
+
# @yieldparam response [::Gapic::Operation]
|
3131
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3132
|
+
#
|
3133
|
+
# @return [::Gapic::Operation]
|
3134
|
+
#
|
3135
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3136
|
+
#
|
3137
|
+
# @example Basic example
|
3138
|
+
# require "google/cloud/eventarc/v1"
|
3139
|
+
#
|
3140
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3141
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
3142
|
+
#
|
3143
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3144
|
+
# request = Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest.new
|
3145
|
+
#
|
3146
|
+
# # Call the delete_enrollment method.
|
3147
|
+
# result = client.delete_enrollment request
|
3148
|
+
#
|
3149
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3150
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3151
|
+
# # Here is how to wait for a response.
|
3152
|
+
# result.wait_until_done! timeout: 60
|
3153
|
+
# if result.response?
|
3154
|
+
# p result.response
|
3155
|
+
# else
|
3156
|
+
# puts "No response received."
|
3157
|
+
# end
|
3158
|
+
#
|
3159
|
+
def delete_enrollment request, options = nil
|
3160
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3161
|
+
|
3162
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest
|
3163
|
+
|
3164
|
+
# Converts hash and nil to an options object
|
3165
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3166
|
+
|
3167
|
+
# Customize the options with defaults
|
3168
|
+
metadata = @config.rpcs.delete_enrollment.metadata.to_h
|
3169
|
+
|
3170
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3171
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3172
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3173
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
3174
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3175
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3176
|
+
|
3177
|
+
header_params = {}
|
3178
|
+
if request.name
|
3179
|
+
header_params["name"] = request.name
|
3180
|
+
end
|
3181
|
+
|
3182
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3183
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3184
|
+
|
3185
|
+
options.apply_defaults timeout: @config.rpcs.delete_enrollment.timeout,
|
3186
|
+
metadata: metadata,
|
3187
|
+
retry_policy: @config.rpcs.delete_enrollment.retry_policy
|
3188
|
+
|
3189
|
+
options.apply_defaults timeout: @config.timeout,
|
3190
|
+
metadata: @config.metadata,
|
3191
|
+
retry_policy: @config.retry_policy
|
3192
|
+
|
3193
|
+
@eventarc_stub.call_rpc :delete_enrollment, request, options: options do |response, operation|
|
3194
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3195
|
+
yield response, operation if block_given?
|
3196
|
+
throw :response, response
|
3197
|
+
end
|
3198
|
+
rescue ::GRPC::BadStatus => e
|
3199
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3200
|
+
end
|
3201
|
+
|
3202
|
+
##
|
3203
|
+
# Get a single Pipeline.
|
3204
|
+
#
|
3205
|
+
# @overload get_pipeline(request, options = nil)
|
3206
|
+
# Pass arguments to `get_pipeline` via a request object, either of type
|
3207
|
+
# {::Google::Cloud::Eventarc::V1::GetPipelineRequest} or an equivalent Hash.
|
3208
|
+
#
|
3209
|
+
# @param request [::Google::Cloud::Eventarc::V1::GetPipelineRequest, ::Hash]
|
3210
|
+
# A request object representing the call parameters. Required. To specify no
|
3211
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3212
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3213
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3214
|
+
#
|
3215
|
+
# @overload get_pipeline(name: nil)
|
3216
|
+
# Pass arguments to `get_pipeline` via keyword arguments. Note that at
|
3217
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3218
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3219
|
+
#
|
3220
|
+
# @param name [::String]
|
3221
|
+
# Required. The name of the pipeline to get.
|
3222
|
+
#
|
3223
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3224
|
+
# @yieldparam response [::Google::Cloud::Eventarc::V1::Pipeline]
|
3225
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3226
|
+
#
|
3227
|
+
# @return [::Google::Cloud::Eventarc::V1::Pipeline]
|
3228
|
+
#
|
3229
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3230
|
+
#
|
3231
|
+
# @example Basic example
|
3232
|
+
# require "google/cloud/eventarc/v1"
|
3233
|
+
#
|
3234
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3235
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
3236
|
+
#
|
3237
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3238
|
+
# request = Google::Cloud::Eventarc::V1::GetPipelineRequest.new
|
3239
|
+
#
|
3240
|
+
# # Call the get_pipeline method.
|
3241
|
+
# result = client.get_pipeline request
|
3242
|
+
#
|
3243
|
+
# # The returned object is of type Google::Cloud::Eventarc::V1::Pipeline.
|
3244
|
+
# p result
|
3245
|
+
#
|
3246
|
+
def get_pipeline request, options = nil
|
3247
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3248
|
+
|
3249
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetPipelineRequest
|
3250
|
+
|
3251
|
+
# Converts hash and nil to an options object
|
3252
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3253
|
+
|
3254
|
+
# Customize the options with defaults
|
3255
|
+
metadata = @config.rpcs.get_pipeline.metadata.to_h
|
3256
|
+
|
3257
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3258
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3259
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3260
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
3261
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3262
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3263
|
+
|
3264
|
+
header_params = {}
|
3265
|
+
if request.name
|
3266
|
+
header_params["name"] = request.name
|
3267
|
+
end
|
3268
|
+
|
3269
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3270
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3271
|
+
|
3272
|
+
options.apply_defaults timeout: @config.rpcs.get_pipeline.timeout,
|
3273
|
+
metadata: metadata,
|
3274
|
+
retry_policy: @config.rpcs.get_pipeline.retry_policy
|
3275
|
+
|
3276
|
+
options.apply_defaults timeout: @config.timeout,
|
3277
|
+
metadata: @config.metadata,
|
3278
|
+
retry_policy: @config.retry_policy
|
3279
|
+
|
3280
|
+
@eventarc_stub.call_rpc :get_pipeline, request, options: options do |response, operation|
|
3281
|
+
yield response, operation if block_given?
|
3282
|
+
end
|
3283
|
+
rescue ::GRPC::BadStatus => e
|
3284
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3285
|
+
end
|
3286
|
+
|
3287
|
+
##
|
3288
|
+
# List pipelines.
|
3289
|
+
#
|
3290
|
+
# @overload list_pipelines(request, options = nil)
|
3291
|
+
# Pass arguments to `list_pipelines` via a request object, either of type
|
3292
|
+
# {::Google::Cloud::Eventarc::V1::ListPipelinesRequest} or an equivalent Hash.
|
3293
|
+
#
|
3294
|
+
# @param request [::Google::Cloud::Eventarc::V1::ListPipelinesRequest, ::Hash]
|
3295
|
+
# A request object representing the call parameters. Required. To specify no
|
3296
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3297
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3298
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3299
|
+
#
|
3300
|
+
# @overload list_pipelines(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
|
3301
|
+
# Pass arguments to `list_pipelines` via keyword arguments. Note that at
|
3302
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3303
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3304
|
+
#
|
3305
|
+
# @param parent [::String]
|
3306
|
+
# Required. The parent collection to list pipelines on.
|
3307
|
+
# @param page_size [::Integer]
|
3308
|
+
# Optional. The maximum number of results to return on each page.
|
3309
|
+
#
|
3310
|
+
# Note: The service may send fewer.
|
3311
|
+
# @param page_token [::String]
|
3312
|
+
# Optional. The page token; provide the value from the `next_page_token`
|
3313
|
+
# field in a previous call to retrieve the subsequent page.
|
3314
|
+
#
|
3315
|
+
# When paginating, all other parameters provided must match
|
3316
|
+
# the previous call that provided the page token.
|
3317
|
+
# @param order_by [::String]
|
3318
|
+
# Optional. The sorting order of the resources returned. Value should be a
|
3319
|
+
# comma-separated list of fields. The default sorting order is ascending. To
|
3320
|
+
# specify descending order for a field, append a `desc` suffix; for example:
|
3321
|
+
# `name desc, update_time`.
|
3322
|
+
# @param filter [::String]
|
3323
|
+
# Optional. The filter field that the list request will filter on.
|
3324
|
+
# Possible filters are described in https://google.aip.dev/160.
|
3325
|
+
#
|
3326
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3327
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Pipeline>]
|
3328
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3329
|
+
#
|
3330
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Pipeline>]
|
3331
|
+
#
|
3332
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3333
|
+
#
|
3334
|
+
# @example Basic example
|
3335
|
+
# require "google/cloud/eventarc/v1"
|
3336
|
+
#
|
3337
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3338
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
3339
|
+
#
|
3340
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3341
|
+
# request = Google::Cloud::Eventarc::V1::ListPipelinesRequest.new
|
3342
|
+
#
|
3343
|
+
# # Call the list_pipelines method.
|
3344
|
+
# result = client.list_pipelines request
|
3345
|
+
#
|
3346
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
3347
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
3348
|
+
# result.each do |item|
|
3349
|
+
# # Each element is of type ::Google::Cloud::Eventarc::V1::Pipeline.
|
3350
|
+
# p item
|
3351
|
+
# end
|
3352
|
+
#
|
3353
|
+
def list_pipelines request, options = nil
|
3354
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3355
|
+
|
3356
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListPipelinesRequest
|
3357
|
+
|
3358
|
+
# Converts hash and nil to an options object
|
3359
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3360
|
+
|
3361
|
+
# Customize the options with defaults
|
3362
|
+
metadata = @config.rpcs.list_pipelines.metadata.to_h
|
3363
|
+
|
3364
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3365
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3366
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3367
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
3368
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3369
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3370
|
+
|
3371
|
+
header_params = {}
|
3372
|
+
if request.parent
|
3373
|
+
header_params["parent"] = request.parent
|
3374
|
+
end
|
3375
|
+
|
3376
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3377
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3378
|
+
|
3379
|
+
options.apply_defaults timeout: @config.rpcs.list_pipelines.timeout,
|
3380
|
+
metadata: metadata,
|
3381
|
+
retry_policy: @config.rpcs.list_pipelines.retry_policy
|
3382
|
+
|
3383
|
+
options.apply_defaults timeout: @config.timeout,
|
3384
|
+
metadata: @config.metadata,
|
3385
|
+
retry_policy: @config.retry_policy
|
3386
|
+
|
3387
|
+
@eventarc_stub.call_rpc :list_pipelines, request, options: options do |response, operation|
|
3388
|
+
response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_pipelines, request, response, operation, options
|
3389
|
+
yield response, operation if block_given?
|
3390
|
+
throw :response, response
|
3391
|
+
end
|
3392
|
+
rescue ::GRPC::BadStatus => e
|
3393
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3394
|
+
end
|
3395
|
+
|
3396
|
+
##
|
3397
|
+
# Create a new Pipeline in a particular project and location.
|
3398
|
+
#
|
3399
|
+
# @overload create_pipeline(request, options = nil)
|
3400
|
+
# Pass arguments to `create_pipeline` via a request object, either of type
|
3401
|
+
# {::Google::Cloud::Eventarc::V1::CreatePipelineRequest} or an equivalent Hash.
|
3402
|
+
#
|
3403
|
+
# @param request [::Google::Cloud::Eventarc::V1::CreatePipelineRequest, ::Hash]
|
3404
|
+
# A request object representing the call parameters. Required. To specify no
|
3405
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3406
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3407
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3408
|
+
#
|
3409
|
+
# @overload create_pipeline(parent: nil, pipeline: nil, pipeline_id: nil, validate_only: nil)
|
3410
|
+
# Pass arguments to `create_pipeline` via keyword arguments. Note that at
|
3411
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3412
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3413
|
+
#
|
3414
|
+
# @param parent [::String]
|
3415
|
+
# Required. The parent collection in which to add this pipeline.
|
3416
|
+
# @param pipeline [::Google::Cloud::Eventarc::V1::Pipeline, ::Hash]
|
3417
|
+
# Required. The pipeline to create.
|
3418
|
+
# @param pipeline_id [::String]
|
3419
|
+
# Required. The user-provided ID to be assigned to the Pipeline.
|
3420
|
+
# @param validate_only [::Boolean]
|
3421
|
+
# Optional. If set, validate the request and preview the review, but do not
|
3422
|
+
# post it.
|
3423
|
+
#
|
3424
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3425
|
+
# @yieldparam response [::Gapic::Operation]
|
3426
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3427
|
+
#
|
3428
|
+
# @return [::Gapic::Operation]
|
3429
|
+
#
|
3430
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3431
|
+
#
|
3432
|
+
# @example Basic example
|
3433
|
+
# require "google/cloud/eventarc/v1"
|
3434
|
+
#
|
3435
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3436
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
3437
|
+
#
|
3438
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3439
|
+
# request = Google::Cloud::Eventarc::V1::CreatePipelineRequest.new
|
3440
|
+
#
|
3441
|
+
# # Call the create_pipeline method.
|
3442
|
+
# result = client.create_pipeline request
|
3443
|
+
#
|
3444
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3445
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3446
|
+
# # Here is how to wait for a response.
|
3447
|
+
# result.wait_until_done! timeout: 60
|
3448
|
+
# if result.response?
|
3449
|
+
# p result.response
|
3450
|
+
# else
|
3451
|
+
# puts "No response received."
|
3452
|
+
# end
|
3453
|
+
#
|
3454
|
+
def create_pipeline request, options = nil
|
3455
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3456
|
+
|
3457
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreatePipelineRequest
|
3458
|
+
|
3459
|
+
# Converts hash and nil to an options object
|
3460
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3461
|
+
|
3462
|
+
# Customize the options with defaults
|
3463
|
+
metadata = @config.rpcs.create_pipeline.metadata.to_h
|
3464
|
+
|
3465
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3466
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3467
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3468
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
3469
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3470
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3471
|
+
|
3472
|
+
header_params = {}
|
3473
|
+
if request.parent
|
3474
|
+
header_params["parent"] = request.parent
|
3475
|
+
end
|
3476
|
+
|
3477
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3478
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3479
|
+
|
3480
|
+
options.apply_defaults timeout: @config.rpcs.create_pipeline.timeout,
|
3481
|
+
metadata: metadata,
|
3482
|
+
retry_policy: @config.rpcs.create_pipeline.retry_policy
|
3483
|
+
|
3484
|
+
options.apply_defaults timeout: @config.timeout,
|
3485
|
+
metadata: @config.metadata,
|
3486
|
+
retry_policy: @config.retry_policy
|
3487
|
+
|
3488
|
+
@eventarc_stub.call_rpc :create_pipeline, request, options: options do |response, operation|
|
3489
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3490
|
+
yield response, operation if block_given?
|
3491
|
+
throw :response, response
|
3492
|
+
end
|
3493
|
+
rescue ::GRPC::BadStatus => e
|
3494
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3495
|
+
end
|
3496
|
+
|
3497
|
+
##
|
3498
|
+
# Update a single pipeline.
|
3499
|
+
#
|
3500
|
+
# @overload update_pipeline(request, options = nil)
|
3501
|
+
# Pass arguments to `update_pipeline` via a request object, either of type
|
3502
|
+
# {::Google::Cloud::Eventarc::V1::UpdatePipelineRequest} or an equivalent Hash.
|
3503
|
+
#
|
3504
|
+
# @param request [::Google::Cloud::Eventarc::V1::UpdatePipelineRequest, ::Hash]
|
3505
|
+
# A request object representing the call parameters. Required. To specify no
|
3506
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3507
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3508
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3509
|
+
#
|
3510
|
+
# @overload update_pipeline(pipeline: nil, update_mask: nil, allow_missing: nil, validate_only: nil)
|
3511
|
+
# Pass arguments to `update_pipeline` via keyword arguments. Note that at
|
3512
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3513
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3514
|
+
#
|
3515
|
+
# @param pipeline [::Google::Cloud::Eventarc::V1::Pipeline, ::Hash]
|
3516
|
+
# Required. The Pipeline to be updated.
|
3517
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
3518
|
+
# Optional. The fields to be updated; only fields explicitly provided are
|
3519
|
+
# updated. If no field mask is provided, all provided fields in the request
|
3520
|
+
# are updated. To update all fields, provide a field mask of "*".
|
3521
|
+
# @param allow_missing [::Boolean]
|
3522
|
+
# Optional. If set to true, and the Pipeline is not found, a new Pipeline
|
3523
|
+
# will be created. In this situation, `update_mask` is ignored.
|
3524
|
+
# @param validate_only [::Boolean]
|
3525
|
+
# Optional. If set, validate the request and preview the review, but do not
|
3526
|
+
# post it.
|
3527
|
+
#
|
3528
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3529
|
+
# @yieldparam response [::Gapic::Operation]
|
3530
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3531
|
+
#
|
3532
|
+
# @return [::Gapic::Operation]
|
3533
|
+
#
|
3534
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3535
|
+
#
|
3536
|
+
# @example Basic example
|
3537
|
+
# require "google/cloud/eventarc/v1"
|
3538
|
+
#
|
3539
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3540
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
3541
|
+
#
|
3542
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3543
|
+
# request = Google::Cloud::Eventarc::V1::UpdatePipelineRequest.new
|
3544
|
+
#
|
3545
|
+
# # Call the update_pipeline method.
|
3546
|
+
# result = client.update_pipeline request
|
3547
|
+
#
|
3548
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3549
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3550
|
+
# # Here is how to wait for a response.
|
3551
|
+
# result.wait_until_done! timeout: 60
|
3552
|
+
# if result.response?
|
3553
|
+
# p result.response
|
3554
|
+
# else
|
3555
|
+
# puts "No response received."
|
3556
|
+
# end
|
3557
|
+
#
|
3558
|
+
def update_pipeline request, options = nil
|
3559
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3560
|
+
|
3561
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdatePipelineRequest
|
3562
|
+
|
3563
|
+
# Converts hash and nil to an options object
|
3564
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3565
|
+
|
3566
|
+
# Customize the options with defaults
|
3567
|
+
metadata = @config.rpcs.update_pipeline.metadata.to_h
|
3568
|
+
|
3569
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3570
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3571
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3572
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
3573
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3574
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3575
|
+
|
3576
|
+
header_params = {}
|
3577
|
+
if request.pipeline&.name
|
3578
|
+
header_params["pipeline.name"] = request.pipeline.name
|
3579
|
+
end
|
3580
|
+
|
3581
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3582
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3583
|
+
|
3584
|
+
options.apply_defaults timeout: @config.rpcs.update_pipeline.timeout,
|
3585
|
+
metadata: metadata,
|
3586
|
+
retry_policy: @config.rpcs.update_pipeline.retry_policy
|
3587
|
+
|
3588
|
+
options.apply_defaults timeout: @config.timeout,
|
3589
|
+
metadata: @config.metadata,
|
3590
|
+
retry_policy: @config.retry_policy
|
3591
|
+
|
3592
|
+
@eventarc_stub.call_rpc :update_pipeline, request, options: options do |response, operation|
|
3593
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3594
|
+
yield response, operation if block_given?
|
3595
|
+
throw :response, response
|
3596
|
+
end
|
3597
|
+
rescue ::GRPC::BadStatus => e
|
3598
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3599
|
+
end
|
3600
|
+
|
3601
|
+
##
|
3602
|
+
# Delete a single pipeline.
|
3603
|
+
#
|
3604
|
+
# @overload delete_pipeline(request, options = nil)
|
3605
|
+
# Pass arguments to `delete_pipeline` via a request object, either of type
|
3606
|
+
# {::Google::Cloud::Eventarc::V1::DeletePipelineRequest} or an equivalent Hash.
|
3607
|
+
#
|
3608
|
+
# @param request [::Google::Cloud::Eventarc::V1::DeletePipelineRequest, ::Hash]
|
3609
|
+
# A request object representing the call parameters. Required. To specify no
|
3610
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3611
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3612
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3613
|
+
#
|
3614
|
+
# @overload delete_pipeline(name: nil, etag: nil, allow_missing: nil, validate_only: nil)
|
3615
|
+
# Pass arguments to `delete_pipeline` via keyword arguments. Note that at
|
3616
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3617
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3618
|
+
#
|
3619
|
+
# @param name [::String]
|
3620
|
+
# Required. The name of the Pipeline to be deleted.
|
3621
|
+
# @param etag [::String]
|
3622
|
+
# Optional. If provided, the Pipeline will only be deleted if the etag
|
3623
|
+
# matches the current etag on the resource.
|
3624
|
+
# @param allow_missing [::Boolean]
|
3625
|
+
# Optional. If set to true, and the Pipeline is not found, the request will
|
3626
|
+
# succeed but no action will be taken on the server.
|
3627
|
+
# @param validate_only [::Boolean]
|
3628
|
+
# Optional. If set, validate the request and preview the review, but do not
|
3629
|
+
# post it.
|
3630
|
+
#
|
3631
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3632
|
+
# @yieldparam response [::Gapic::Operation]
|
3633
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3634
|
+
#
|
3635
|
+
# @return [::Gapic::Operation]
|
3636
|
+
#
|
3637
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3638
|
+
#
|
3639
|
+
# @example Basic example
|
3640
|
+
# require "google/cloud/eventarc/v1"
|
3641
|
+
#
|
3642
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3643
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
3644
|
+
#
|
3645
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3646
|
+
# request = Google::Cloud::Eventarc::V1::DeletePipelineRequest.new
|
3647
|
+
#
|
3648
|
+
# # Call the delete_pipeline method.
|
3649
|
+
# result = client.delete_pipeline request
|
3650
|
+
#
|
3651
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3652
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3653
|
+
# # Here is how to wait for a response.
|
3654
|
+
# result.wait_until_done! timeout: 60
|
3655
|
+
# if result.response?
|
3656
|
+
# p result.response
|
3657
|
+
# else
|
3658
|
+
# puts "No response received."
|
3659
|
+
# end
|
3660
|
+
#
|
3661
|
+
def delete_pipeline request, options = nil
|
3662
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3663
|
+
|
3664
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeletePipelineRequest
|
3665
|
+
|
3666
|
+
# Converts hash and nil to an options object
|
3667
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3668
|
+
|
3669
|
+
# Customize the options with defaults
|
3670
|
+
metadata = @config.rpcs.delete_pipeline.metadata.to_h
|
3671
|
+
|
3672
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3673
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3674
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3675
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
3676
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3677
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3678
|
+
|
3679
|
+
header_params = {}
|
3680
|
+
if request.name
|
3681
|
+
header_params["name"] = request.name
|
3682
|
+
end
|
3683
|
+
|
3684
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3685
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3686
|
+
|
3687
|
+
options.apply_defaults timeout: @config.rpcs.delete_pipeline.timeout,
|
3688
|
+
metadata: metadata,
|
3689
|
+
retry_policy: @config.rpcs.delete_pipeline.retry_policy
|
3690
|
+
|
3691
|
+
options.apply_defaults timeout: @config.timeout,
|
3692
|
+
metadata: @config.metadata,
|
3693
|
+
retry_policy: @config.retry_policy
|
3694
|
+
|
3695
|
+
@eventarc_stub.call_rpc :delete_pipeline, request, options: options do |response, operation|
|
3696
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3697
|
+
yield response, operation if block_given?
|
3698
|
+
throw :response, response
|
3699
|
+
end
|
3700
|
+
rescue ::GRPC::BadStatus => e
|
3701
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3702
|
+
end
|
3703
|
+
|
3704
|
+
##
|
3705
|
+
# Get a single GoogleApiSource.
|
3706
|
+
#
|
3707
|
+
# @overload get_google_api_source(request, options = nil)
|
3708
|
+
# Pass arguments to `get_google_api_source` via a request object, either of type
|
3709
|
+
# {::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest} or an equivalent Hash.
|
3710
|
+
#
|
3711
|
+
# @param request [::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest, ::Hash]
|
3712
|
+
# A request object representing the call parameters. Required. To specify no
|
3713
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3714
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3715
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3716
|
+
#
|
3717
|
+
# @overload get_google_api_source(name: nil)
|
3718
|
+
# Pass arguments to `get_google_api_source` via keyword arguments. Note that at
|
3719
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3720
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3721
|
+
#
|
3722
|
+
# @param name [::String]
|
3723
|
+
# Required. The name of the google api source to get.
|
3724
|
+
#
|
3725
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3726
|
+
# @yieldparam response [::Google::Cloud::Eventarc::V1::GoogleApiSource]
|
3727
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3728
|
+
#
|
3729
|
+
# @return [::Google::Cloud::Eventarc::V1::GoogleApiSource]
|
3730
|
+
#
|
3731
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3732
|
+
#
|
3733
|
+
# @example Basic example
|
3734
|
+
# require "google/cloud/eventarc/v1"
|
3735
|
+
#
|
3736
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3737
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
3738
|
+
#
|
3739
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3740
|
+
# request = Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest.new
|
3741
|
+
#
|
3742
|
+
# # Call the get_google_api_source method.
|
3743
|
+
# result = client.get_google_api_source request
|
3744
|
+
#
|
3745
|
+
# # The returned object is of type Google::Cloud::Eventarc::V1::GoogleApiSource.
|
3746
|
+
# p result
|
3747
|
+
#
|
3748
|
+
def get_google_api_source request, options = nil
|
3749
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3750
|
+
|
3751
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest
|
3752
|
+
|
3753
|
+
# Converts hash and nil to an options object
|
3754
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3755
|
+
|
3756
|
+
# Customize the options with defaults
|
3757
|
+
metadata = @config.rpcs.get_google_api_source.metadata.to_h
|
3758
|
+
|
3759
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3760
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3761
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3762
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
3763
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3764
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3765
|
+
|
3766
|
+
header_params = {}
|
3767
|
+
if request.name
|
3768
|
+
header_params["name"] = request.name
|
3769
|
+
end
|
3770
|
+
|
3771
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3772
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3773
|
+
|
3774
|
+
options.apply_defaults timeout: @config.rpcs.get_google_api_source.timeout,
|
3775
|
+
metadata: metadata,
|
3776
|
+
retry_policy: @config.rpcs.get_google_api_source.retry_policy
|
3777
|
+
|
3778
|
+
options.apply_defaults timeout: @config.timeout,
|
3779
|
+
metadata: @config.metadata,
|
3780
|
+
retry_policy: @config.retry_policy
|
3781
|
+
|
3782
|
+
@eventarc_stub.call_rpc :get_google_api_source, request, options: options do |response, operation|
|
3783
|
+
yield response, operation if block_given?
|
3784
|
+
end
|
3785
|
+
rescue ::GRPC::BadStatus => e
|
3786
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3787
|
+
end
|
3788
|
+
|
3789
|
+
##
|
3790
|
+
# List GoogleApiSources.
|
3791
|
+
#
|
3792
|
+
# @overload list_google_api_sources(request, options = nil)
|
3793
|
+
# Pass arguments to `list_google_api_sources` via a request object, either of type
|
3794
|
+
# {::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest} or an equivalent Hash.
|
3795
|
+
#
|
3796
|
+
# @param request [::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest, ::Hash]
|
3797
|
+
# A request object representing the call parameters. Required. To specify no
|
3798
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3799
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3800
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3801
|
+
#
|
3802
|
+
# @overload list_google_api_sources(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
|
3803
|
+
# Pass arguments to `list_google_api_sources` via keyword arguments. Note that at
|
3804
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3805
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3806
|
+
#
|
3807
|
+
# @param parent [::String]
|
3808
|
+
# Required. The parent collection to list GoogleApiSources on.
|
3809
|
+
# @param page_size [::Integer]
|
3810
|
+
# Optional. The maximum number of results to return on each page.
|
3811
|
+
#
|
3812
|
+
# Note: The service may send fewer.
|
3813
|
+
# @param page_token [::String]
|
3814
|
+
# Optional. The page token; provide the value from the `next_page_token`
|
3815
|
+
# field in a previous call to retrieve the subsequent page.
|
3816
|
+
#
|
3817
|
+
# When paginating, all other parameters provided must match
|
3818
|
+
# the previous call that provided the page token.
|
3819
|
+
# @param order_by [::String]
|
3820
|
+
# Optional. The sorting order of the resources returned. Value should be a
|
3821
|
+
# comma-separated list of fields. The default sorting order is ascending. To
|
3822
|
+
# specify descending order for a field, append a `desc` suffix; for example:
|
3823
|
+
# `name desc, update_time`.
|
3824
|
+
# @param filter [::String]
|
3825
|
+
# Optional. The filter field that the list request will filter on.
|
3826
|
+
# Possible filtersare described in https://google.aip.dev/160.
|
3827
|
+
#
|
3828
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3829
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::GoogleApiSource>]
|
3830
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3831
|
+
#
|
3832
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::GoogleApiSource>]
|
3833
|
+
#
|
3834
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3835
|
+
#
|
3836
|
+
# @example Basic example
|
3837
|
+
# require "google/cloud/eventarc/v1"
|
3838
|
+
#
|
3839
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3840
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
3841
|
+
#
|
3842
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3843
|
+
# request = Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest.new
|
3844
|
+
#
|
3845
|
+
# # Call the list_google_api_sources method.
|
3846
|
+
# result = client.list_google_api_sources request
|
3847
|
+
#
|
3848
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
3849
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
3850
|
+
# result.each do |item|
|
3851
|
+
# # Each element is of type ::Google::Cloud::Eventarc::V1::GoogleApiSource.
|
3852
|
+
# p item
|
3853
|
+
# end
|
3854
|
+
#
|
3855
|
+
def list_google_api_sources request, options = nil
|
3856
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3857
|
+
|
3858
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest
|
3859
|
+
|
3860
|
+
# Converts hash and nil to an options object
|
3861
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3862
|
+
|
3863
|
+
# Customize the options with defaults
|
3864
|
+
metadata = @config.rpcs.list_google_api_sources.metadata.to_h
|
3865
|
+
|
3866
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3867
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3868
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3869
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
3870
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3871
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3872
|
+
|
3873
|
+
header_params = {}
|
3874
|
+
if request.parent
|
3875
|
+
header_params["parent"] = request.parent
|
3876
|
+
end
|
3877
|
+
|
3878
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3879
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3880
|
+
|
3881
|
+
options.apply_defaults timeout: @config.rpcs.list_google_api_sources.timeout,
|
3882
|
+
metadata: metadata,
|
3883
|
+
retry_policy: @config.rpcs.list_google_api_sources.retry_policy
|
3884
|
+
|
3885
|
+
options.apply_defaults timeout: @config.timeout,
|
3886
|
+
metadata: @config.metadata,
|
3887
|
+
retry_policy: @config.retry_policy
|
3888
|
+
|
3889
|
+
@eventarc_stub.call_rpc :list_google_api_sources, request, options: options do |response, operation|
|
3890
|
+
response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_google_api_sources, request, response, operation, options
|
3891
|
+
yield response, operation if block_given?
|
3892
|
+
throw :response, response
|
3893
|
+
end
|
3894
|
+
rescue ::GRPC::BadStatus => e
|
3895
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3896
|
+
end
|
3897
|
+
|
3898
|
+
##
|
3899
|
+
# Create a new GoogleApiSource in a particular project and location.
|
3900
|
+
#
|
3901
|
+
# @overload create_google_api_source(request, options = nil)
|
3902
|
+
# Pass arguments to `create_google_api_source` via a request object, either of type
|
3903
|
+
# {::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest} or an equivalent Hash.
|
3904
|
+
#
|
3905
|
+
# @param request [::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest, ::Hash]
|
3906
|
+
# A request object representing the call parameters. Required. To specify no
|
3907
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3908
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3909
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3910
|
+
#
|
3911
|
+
# @overload create_google_api_source(parent: nil, google_api_source: nil, google_api_source_id: nil, validate_only: nil)
|
3912
|
+
# Pass arguments to `create_google_api_source` via keyword arguments. Note that at
|
3913
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3914
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3915
|
+
#
|
3916
|
+
# @param parent [::String]
|
3917
|
+
# Required. The parent collection in which to add this google api source.
|
3918
|
+
# @param google_api_source [::Google::Cloud::Eventarc::V1::GoogleApiSource, ::Hash]
|
3919
|
+
# Required. The google api source to create.
|
3920
|
+
# @param google_api_source_id [::String]
|
3921
|
+
# Required. The user-provided ID to be assigned to the GoogleApiSource. It
|
3922
|
+
# should match the format (^[a-z]([a-z0-9-]\\{0,61}[a-z0-9])?$).
|
3923
|
+
# @param validate_only [::Boolean]
|
3924
|
+
# Optional. If set, validate the request and preview the review, but do not
|
3925
|
+
# post it.
|
3926
|
+
#
|
3927
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3928
|
+
# @yieldparam response [::Gapic::Operation]
|
3929
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3930
|
+
#
|
3931
|
+
# @return [::Gapic::Operation]
|
3932
|
+
#
|
3933
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3934
|
+
#
|
3935
|
+
# @example Basic example
|
3936
|
+
# require "google/cloud/eventarc/v1"
|
3937
|
+
#
|
3938
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3939
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
3940
|
+
#
|
3941
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3942
|
+
# request = Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest.new
|
3943
|
+
#
|
3944
|
+
# # Call the create_google_api_source method.
|
3945
|
+
# result = client.create_google_api_source request
|
3946
|
+
#
|
3947
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3948
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3949
|
+
# # Here is how to wait for a response.
|
3950
|
+
# result.wait_until_done! timeout: 60
|
3951
|
+
# if result.response?
|
3952
|
+
# p result.response
|
3953
|
+
# else
|
3954
|
+
# puts "No response received."
|
3955
|
+
# end
|
3956
|
+
#
|
3957
|
+
def create_google_api_source request, options = nil
|
3958
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3959
|
+
|
3960
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest
|
3961
|
+
|
3962
|
+
# Converts hash and nil to an options object
|
3963
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3964
|
+
|
3965
|
+
# Customize the options with defaults
|
3966
|
+
metadata = @config.rpcs.create_google_api_source.metadata.to_h
|
3967
|
+
|
3968
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3969
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3970
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3971
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
3972
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3973
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3974
|
+
|
3975
|
+
header_params = {}
|
3976
|
+
if request.parent
|
3977
|
+
header_params["parent"] = request.parent
|
3978
|
+
end
|
3979
|
+
|
3980
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3981
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3982
|
+
|
3983
|
+
options.apply_defaults timeout: @config.rpcs.create_google_api_source.timeout,
|
3984
|
+
metadata: metadata,
|
3985
|
+
retry_policy: @config.rpcs.create_google_api_source.retry_policy
|
3986
|
+
|
3987
|
+
options.apply_defaults timeout: @config.timeout,
|
3988
|
+
metadata: @config.metadata,
|
3989
|
+
retry_policy: @config.retry_policy
|
3990
|
+
|
3991
|
+
@eventarc_stub.call_rpc :create_google_api_source, request, options: options do |response, operation|
|
3992
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3993
|
+
yield response, operation if block_given?
|
3994
|
+
throw :response, response
|
3995
|
+
end
|
3996
|
+
rescue ::GRPC::BadStatus => e
|
3997
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3998
|
+
end
|
3999
|
+
|
4000
|
+
##
|
4001
|
+
# Update a single GoogleApiSource.
|
4002
|
+
#
|
4003
|
+
# @overload update_google_api_source(request, options = nil)
|
4004
|
+
# Pass arguments to `update_google_api_source` via a request object, either of type
|
4005
|
+
# {::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest} or an equivalent Hash.
|
4006
|
+
#
|
4007
|
+
# @param request [::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest, ::Hash]
|
4008
|
+
# A request object representing the call parameters. Required. To specify no
|
4009
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4010
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4011
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4012
|
+
#
|
4013
|
+
# @overload update_google_api_source(google_api_source: nil, update_mask: nil, allow_missing: nil, validate_only: nil)
|
4014
|
+
# Pass arguments to `update_google_api_source` via keyword arguments. Note that at
|
4015
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4016
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4017
|
+
#
|
4018
|
+
# @param google_api_source [::Google::Cloud::Eventarc::V1::GoogleApiSource, ::Hash]
|
4019
|
+
# Required. The GoogleApiSource to be updated.
|
4020
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
4021
|
+
# Optional. The fields to be updated; only fields explicitly provided are
|
4022
|
+
# updated. If no field mask is provided, all provided fields in the request
|
4023
|
+
# are updated. To update all fields, provide a field mask of "*".
|
4024
|
+
# @param allow_missing [::Boolean]
|
4025
|
+
# Optional. If set to true, and the GoogleApiSource is not found, a new
|
4026
|
+
# GoogleApiSource will be created. In this situation, `update_mask` is
|
4027
|
+
# ignored.
|
4028
|
+
# @param validate_only [::Boolean]
|
4029
|
+
# Optional. If set, validate the request and preview the review, but do not
|
4030
|
+
# post it.
|
4031
|
+
#
|
4032
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4033
|
+
# @yieldparam response [::Gapic::Operation]
|
4034
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4035
|
+
#
|
4036
|
+
# @return [::Gapic::Operation]
|
4037
|
+
#
|
4038
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4039
|
+
#
|
4040
|
+
# @example Basic example
|
4041
|
+
# require "google/cloud/eventarc/v1"
|
4042
|
+
#
|
4043
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4044
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
4045
|
+
#
|
4046
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4047
|
+
# request = Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest.new
|
4048
|
+
#
|
4049
|
+
# # Call the update_google_api_source method.
|
4050
|
+
# result = client.update_google_api_source request
|
4051
|
+
#
|
4052
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4053
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4054
|
+
# # Here is how to wait for a response.
|
4055
|
+
# result.wait_until_done! timeout: 60
|
4056
|
+
# if result.response?
|
4057
|
+
# p result.response
|
4058
|
+
# else
|
4059
|
+
# puts "No response received."
|
4060
|
+
# end
|
4061
|
+
#
|
4062
|
+
def update_google_api_source request, options = nil
|
4063
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4064
|
+
|
4065
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest
|
4066
|
+
|
4067
|
+
# Converts hash and nil to an options object
|
4068
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4069
|
+
|
4070
|
+
# Customize the options with defaults
|
4071
|
+
metadata = @config.rpcs.update_google_api_source.metadata.to_h
|
4072
|
+
|
4073
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4074
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4075
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4076
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
4077
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4078
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4079
|
+
|
4080
|
+
header_params = {}
|
4081
|
+
if request.google_api_source&.name
|
4082
|
+
header_params["google_api_source.name"] = request.google_api_source.name
|
4083
|
+
end
|
4084
|
+
|
4085
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4086
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4087
|
+
|
4088
|
+
options.apply_defaults timeout: @config.rpcs.update_google_api_source.timeout,
|
4089
|
+
metadata: metadata,
|
4090
|
+
retry_policy: @config.rpcs.update_google_api_source.retry_policy
|
4091
|
+
|
4092
|
+
options.apply_defaults timeout: @config.timeout,
|
4093
|
+
metadata: @config.metadata,
|
4094
|
+
retry_policy: @config.retry_policy
|
4095
|
+
|
4096
|
+
@eventarc_stub.call_rpc :update_google_api_source, request, options: options do |response, operation|
|
4097
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4098
|
+
yield response, operation if block_given?
|
4099
|
+
throw :response, response
|
4100
|
+
end
|
4101
|
+
rescue ::GRPC::BadStatus => e
|
4102
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4103
|
+
end
|
4104
|
+
|
4105
|
+
##
|
4106
|
+
# Delete a single GoogleApiSource.
|
4107
|
+
#
|
4108
|
+
# @overload delete_google_api_source(request, options = nil)
|
4109
|
+
# Pass arguments to `delete_google_api_source` via a request object, either of type
|
4110
|
+
# {::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest} or an equivalent Hash.
|
4111
|
+
#
|
4112
|
+
# @param request [::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest, ::Hash]
|
4113
|
+
# A request object representing the call parameters. Required. To specify no
|
4114
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4115
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4116
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4117
|
+
#
|
4118
|
+
# @overload delete_google_api_source(name: nil, etag: nil, allow_missing: nil, validate_only: nil)
|
4119
|
+
# Pass arguments to `delete_google_api_source` via keyword arguments. Note that at
|
4120
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4121
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4122
|
+
#
|
4123
|
+
# @param name [::String]
|
4124
|
+
# Required. The name of the GoogleApiSource to be deleted.
|
4125
|
+
# @param etag [::String]
|
4126
|
+
# Optional. If provided, the MessageBus will only be deleted if the etag
|
4127
|
+
# matches the current etag on the resource.
|
4128
|
+
# @param allow_missing [::Boolean]
|
4129
|
+
# Optional. If set to true, and the MessageBus is not found, the request will
|
4130
|
+
# succeed but no action will be taken on the server.
|
4131
|
+
# @param validate_only [::Boolean]
|
4132
|
+
# Optional. If set, validate the request and preview the review, but do not
|
4133
|
+
# post it.
|
4134
|
+
#
|
4135
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4136
|
+
# @yieldparam response [::Gapic::Operation]
|
4137
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4138
|
+
#
|
4139
|
+
# @return [::Gapic::Operation]
|
4140
|
+
#
|
4141
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4142
|
+
#
|
4143
|
+
# @example Basic example
|
4144
|
+
# require "google/cloud/eventarc/v1"
|
4145
|
+
#
|
4146
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4147
|
+
# client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
|
4148
|
+
#
|
4149
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4150
|
+
# request = Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest.new
|
4151
|
+
#
|
4152
|
+
# # Call the delete_google_api_source method.
|
4153
|
+
# result = client.delete_google_api_source request
|
4154
|
+
#
|
4155
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4156
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4157
|
+
# # Here is how to wait for a response.
|
4158
|
+
# result.wait_until_done! timeout: 60
|
4159
|
+
# if result.response?
|
4160
|
+
# p result.response
|
4161
|
+
# else
|
4162
|
+
# puts "No response received."
|
4163
|
+
# end
|
4164
|
+
#
|
4165
|
+
def delete_google_api_source request, options = nil
|
4166
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4167
|
+
|
4168
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest
|
4169
|
+
|
4170
|
+
# Converts hash and nil to an options object
|
4171
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4172
|
+
|
4173
|
+
# Customize the options with defaults
|
4174
|
+
metadata = @config.rpcs.delete_google_api_source.metadata.to_h
|
4175
|
+
|
4176
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4177
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4178
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4179
|
+
gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
|
4180
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4181
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4182
|
+
|
4183
|
+
header_params = {}
|
4184
|
+
if request.name
|
4185
|
+
header_params["name"] = request.name
|
4186
|
+
end
|
4187
|
+
|
4188
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4189
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4190
|
+
|
4191
|
+
options.apply_defaults timeout: @config.rpcs.delete_google_api_source.timeout,
|
4192
|
+
metadata: metadata,
|
4193
|
+
retry_policy: @config.rpcs.delete_google_api_source.retry_policy
|
4194
|
+
|
4195
|
+
options.apply_defaults timeout: @config.timeout,
|
4196
|
+
metadata: @config.metadata,
|
4197
|
+
retry_policy: @config.retry_policy
|
4198
|
+
|
4199
|
+
@eventarc_stub.call_rpc :delete_google_api_source, request, options: options do |response, operation|
|
4200
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4201
|
+
yield response, operation if block_given?
|
4202
|
+
throw :response, response
|
4203
|
+
end
|
4204
|
+
rescue ::GRPC::BadStatus => e
|
4205
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4206
|
+
end
|
4207
|
+
|
4208
|
+
##
|
4209
|
+
# Configuration class for the Eventarc API.
|
4210
|
+
#
|
4211
|
+
# This class represents the configuration for Eventarc,
|
4212
|
+
# providing control over timeouts, retry behavior, logging, transport
|
4213
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
4214
|
+
# applied individually to specific RPCs. See
|
4215
|
+
# {::Google::Cloud::Eventarc::V1::Eventarc::Client::Configuration::Rpcs}
|
4216
|
+
# for a list of RPCs that can be configured independently.
|
4217
|
+
#
|
4218
|
+
# Configuration can be applied globally to all clients, or to a single client
|
4219
|
+
# on construction.
|
4220
|
+
#
|
4221
|
+
# @example
|
4222
|
+
#
|
4223
|
+
# # Modify the global config, setting the timeout for
|
4224
|
+
# # get_trigger to 20 seconds,
|
4225
|
+
# # and all remaining timeouts to 10 seconds.
|
4226
|
+
# ::Google::Cloud::Eventarc::V1::Eventarc::Client.configure do |config|
|
4227
|
+
# config.timeout = 10.0
|
4228
|
+
# config.rpcs.get_trigger.timeout = 20.0
|
4229
|
+
# end
|
4230
|
+
#
|
4231
|
+
# # Apply the above configuration only to a new client.
|
4232
|
+
# client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config|
|
4233
|
+
# config.timeout = 10.0
|
4234
|
+
# config.rpcs.get_trigger.timeout = 20.0
|
4235
|
+
# end
|
4236
|
+
#
|
4237
|
+
# @!attribute [rw] endpoint
|
4238
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
4239
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
4240
|
+
# @return [::String,nil]
|
4241
|
+
# @!attribute [rw] credentials
|
4242
|
+
# Credentials to send with calls. You may provide any of the following types:
|
4243
|
+
# * (`String`) The path to a service account key file in JSON format
|
4244
|
+
# * (`Hash`) A service account key as a Hash
|
4245
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
4246
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
4247
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
4248
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
4249
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
4250
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
4251
|
+
# * (`nil`) indicating no credentials
|
4252
|
+
# @return [::Object]
|
4253
|
+
# @!attribute [rw] scope
|
4254
|
+
# The OAuth scopes
|
4255
|
+
# @return [::Array<::String>]
|
4256
|
+
# @!attribute [rw] lib_name
|
4257
|
+
# The library name as recorded in instrumentation and logging
|
4258
|
+
# @return [::String]
|
4259
|
+
# @!attribute [rw] lib_version
|
4260
|
+
# The library version as recorded in instrumentation and logging
|
4261
|
+
# @return [::String]
|
4262
|
+
# @!attribute [rw] channel_args
|
4263
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
4264
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
4265
|
+
# @return [::Hash]
|
4266
|
+
# @!attribute [rw] interceptors
|
4267
|
+
# An array of interceptors that are run before calls are executed.
|
4268
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
4269
|
+
# @!attribute [rw] timeout
|
4270
|
+
# The call timeout in seconds.
|
4271
|
+
# @return [::Numeric]
|
4272
|
+
# @!attribute [rw] metadata
|
4273
|
+
# Additional gRPC headers to be sent with the call.
|
4274
|
+
# @return [::Hash{::Symbol=>::String}]
|
4275
|
+
# @!attribute [rw] retry_policy
|
4276
|
+
# The retry policy. The value is a hash with the following keys:
|
4277
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
4278
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
4279
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
4280
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
4281
|
+
# trigger a retry.
|
4282
|
+
# @return [::Hash]
|
4283
|
+
# @!attribute [rw] quota_project
|
4284
|
+
# A separate project against which to charge quota.
|
4285
|
+
# @return [::String]
|
4286
|
+
# @!attribute [rw] universe_domain
|
4287
|
+
# The universe domain within which to make requests. This determines the
|
4288
|
+
# default endpoint URL. The default value of nil uses the environment
|
4289
|
+
# universe (usually the default "googleapis.com" universe).
|
4290
|
+
# @return [::String,nil]
|
4291
|
+
# @!attribute [rw] logger
|
4292
|
+
# A custom logger to use for request/response debug logging, or the value
|
4293
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
4294
|
+
# explicitly disable logging.
|
4295
|
+
# @return [::Logger,:default,nil]
|
4296
|
+
#
|
4297
|
+
class Configuration
|
4298
|
+
extend ::Gapic::Config
|
4299
|
+
|
4300
|
+
# @private
|
4301
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
4302
|
+
DEFAULT_ENDPOINT = "eventarc.googleapis.com"
|
4303
|
+
|
4304
|
+
config_attr :endpoint, nil, ::String, nil
|
4305
|
+
config_attr :credentials, nil do |value|
|
4306
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
4307
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
4308
|
+
allowed.any? { |klass| klass === value }
|
4309
|
+
end
|
4310
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
4311
|
+
config_attr :lib_name, nil, ::String, nil
|
4312
|
+
config_attr :lib_version, nil, ::String, nil
|
4313
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
4314
|
+
config_attr :interceptors, nil, ::Array, nil
|
4315
|
+
config_attr :timeout, nil, ::Numeric, nil
|
4316
|
+
config_attr :metadata, nil, ::Hash, nil
|
4317
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
4318
|
+
config_attr :quota_project, nil, ::String, nil
|
4319
|
+
config_attr :universe_domain, nil, ::String, nil
|
4320
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
4321
|
+
|
4322
|
+
# @private
|
4323
|
+
def initialize parent_config = nil
|
4324
|
+
@parent_config = parent_config unless parent_config.nil?
|
4325
|
+
|
4326
|
+
yield self if block_given?
|
4327
|
+
end
|
4328
|
+
|
4329
|
+
##
|
4330
|
+
# Configurations for individual RPCs
|
4331
|
+
# @return [Rpcs]
|
4332
|
+
#
|
4333
|
+
def rpcs
|
4334
|
+
@rpcs ||= begin
|
4335
|
+
parent_rpcs = nil
|
4336
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
4337
|
+
Rpcs.new parent_rpcs
|
4338
|
+
end
|
4339
|
+
end
|
4340
|
+
|
4341
|
+
##
|
4342
|
+
# Configuration for the channel pool
|
4343
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
4344
|
+
#
|
4345
|
+
def channel_pool
|
4346
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
4347
|
+
end
|
4348
|
+
|
4349
|
+
##
|
4350
|
+
# Configuration RPC class for the Eventarc API.
|
4351
|
+
#
|
4352
|
+
# Includes fields providing the configuration for each RPC in this service.
|
4353
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
4354
|
+
# the following configuration fields:
|
4355
|
+
#
|
4356
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
4357
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
4358
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
4359
|
+
# include the following keys:
|
4360
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
4361
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
4362
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
4363
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
4364
|
+
# trigger a retry.
|
4365
|
+
#
|
4366
|
+
class Rpcs
|
4367
|
+
##
|
4368
|
+
# RPC-specific configuration for `get_trigger`
|
4369
|
+
# @return [::Gapic::Config::Method]
|
4370
|
+
#
|
4371
|
+
attr_reader :get_trigger
|
4372
|
+
##
|
4373
|
+
# RPC-specific configuration for `list_triggers`
|
4374
|
+
# @return [::Gapic::Config::Method]
|
4375
|
+
#
|
4376
|
+
attr_reader :list_triggers
|
4377
|
+
##
|
4378
|
+
# RPC-specific configuration for `create_trigger`
|
4379
|
+
# @return [::Gapic::Config::Method]
|
4380
|
+
#
|
4381
|
+
attr_reader :create_trigger
|
4382
|
+
##
|
4383
|
+
# RPC-specific configuration for `update_trigger`
|
4384
|
+
# @return [::Gapic::Config::Method]
|
4385
|
+
#
|
4386
|
+
attr_reader :update_trigger
|
4387
|
+
##
|
4388
|
+
# RPC-specific configuration for `delete_trigger`
|
4389
|
+
# @return [::Gapic::Config::Method]
|
4390
|
+
#
|
4391
|
+
attr_reader :delete_trigger
|
4392
|
+
##
|
2132
4393
|
# RPC-specific configuration for `get_channel`
|
2133
4394
|
# @return [::Gapic::Config::Method]
|
2134
4395
|
#
|
@@ -2193,6 +4454,111 @@ module Google
|
|
2193
4454
|
# @return [::Gapic::Config::Method]
|
2194
4455
|
#
|
2195
4456
|
attr_reader :update_google_channel_config
|
4457
|
+
##
|
4458
|
+
# RPC-specific configuration for `get_message_bus`
|
4459
|
+
# @return [::Gapic::Config::Method]
|
4460
|
+
#
|
4461
|
+
attr_reader :get_message_bus
|
4462
|
+
##
|
4463
|
+
# RPC-specific configuration for `list_message_buses`
|
4464
|
+
# @return [::Gapic::Config::Method]
|
4465
|
+
#
|
4466
|
+
attr_reader :list_message_buses
|
4467
|
+
##
|
4468
|
+
# RPC-specific configuration for `list_message_bus_enrollments`
|
4469
|
+
# @return [::Gapic::Config::Method]
|
4470
|
+
#
|
4471
|
+
attr_reader :list_message_bus_enrollments
|
4472
|
+
##
|
4473
|
+
# RPC-specific configuration for `create_message_bus`
|
4474
|
+
# @return [::Gapic::Config::Method]
|
4475
|
+
#
|
4476
|
+
attr_reader :create_message_bus
|
4477
|
+
##
|
4478
|
+
# RPC-specific configuration for `update_message_bus`
|
4479
|
+
# @return [::Gapic::Config::Method]
|
4480
|
+
#
|
4481
|
+
attr_reader :update_message_bus
|
4482
|
+
##
|
4483
|
+
# RPC-specific configuration for `delete_message_bus`
|
4484
|
+
# @return [::Gapic::Config::Method]
|
4485
|
+
#
|
4486
|
+
attr_reader :delete_message_bus
|
4487
|
+
##
|
4488
|
+
# RPC-specific configuration for `get_enrollment`
|
4489
|
+
# @return [::Gapic::Config::Method]
|
4490
|
+
#
|
4491
|
+
attr_reader :get_enrollment
|
4492
|
+
##
|
4493
|
+
# RPC-specific configuration for `list_enrollments`
|
4494
|
+
# @return [::Gapic::Config::Method]
|
4495
|
+
#
|
4496
|
+
attr_reader :list_enrollments
|
4497
|
+
##
|
4498
|
+
# RPC-specific configuration for `create_enrollment`
|
4499
|
+
# @return [::Gapic::Config::Method]
|
4500
|
+
#
|
4501
|
+
attr_reader :create_enrollment
|
4502
|
+
##
|
4503
|
+
# RPC-specific configuration for `update_enrollment`
|
4504
|
+
# @return [::Gapic::Config::Method]
|
4505
|
+
#
|
4506
|
+
attr_reader :update_enrollment
|
4507
|
+
##
|
4508
|
+
# RPC-specific configuration for `delete_enrollment`
|
4509
|
+
# @return [::Gapic::Config::Method]
|
4510
|
+
#
|
4511
|
+
attr_reader :delete_enrollment
|
4512
|
+
##
|
4513
|
+
# RPC-specific configuration for `get_pipeline`
|
4514
|
+
# @return [::Gapic::Config::Method]
|
4515
|
+
#
|
4516
|
+
attr_reader :get_pipeline
|
4517
|
+
##
|
4518
|
+
# RPC-specific configuration for `list_pipelines`
|
4519
|
+
# @return [::Gapic::Config::Method]
|
4520
|
+
#
|
4521
|
+
attr_reader :list_pipelines
|
4522
|
+
##
|
4523
|
+
# RPC-specific configuration for `create_pipeline`
|
4524
|
+
# @return [::Gapic::Config::Method]
|
4525
|
+
#
|
4526
|
+
attr_reader :create_pipeline
|
4527
|
+
##
|
4528
|
+
# RPC-specific configuration for `update_pipeline`
|
4529
|
+
# @return [::Gapic::Config::Method]
|
4530
|
+
#
|
4531
|
+
attr_reader :update_pipeline
|
4532
|
+
##
|
4533
|
+
# RPC-specific configuration for `delete_pipeline`
|
4534
|
+
# @return [::Gapic::Config::Method]
|
4535
|
+
#
|
4536
|
+
attr_reader :delete_pipeline
|
4537
|
+
##
|
4538
|
+
# RPC-specific configuration for `get_google_api_source`
|
4539
|
+
# @return [::Gapic::Config::Method]
|
4540
|
+
#
|
4541
|
+
attr_reader :get_google_api_source
|
4542
|
+
##
|
4543
|
+
# RPC-specific configuration for `list_google_api_sources`
|
4544
|
+
# @return [::Gapic::Config::Method]
|
4545
|
+
#
|
4546
|
+
attr_reader :list_google_api_sources
|
4547
|
+
##
|
4548
|
+
# RPC-specific configuration for `create_google_api_source`
|
4549
|
+
# @return [::Gapic::Config::Method]
|
4550
|
+
#
|
4551
|
+
attr_reader :create_google_api_source
|
4552
|
+
##
|
4553
|
+
# RPC-specific configuration for `update_google_api_source`
|
4554
|
+
# @return [::Gapic::Config::Method]
|
4555
|
+
#
|
4556
|
+
attr_reader :update_google_api_source
|
4557
|
+
##
|
4558
|
+
# RPC-specific configuration for `delete_google_api_source`
|
4559
|
+
# @return [::Gapic::Config::Method]
|
4560
|
+
#
|
4561
|
+
attr_reader :delete_google_api_source
|
2196
4562
|
|
2197
4563
|
# @private
|
2198
4564
|
def initialize parent_rpcs = nil
|
@@ -2232,6 +4598,48 @@ module Google
|
|
2232
4598
|
@get_google_channel_config = ::Gapic::Config::Method.new get_google_channel_config_config
|
2233
4599
|
update_google_channel_config_config = parent_rpcs.update_google_channel_config if parent_rpcs.respond_to? :update_google_channel_config
|
2234
4600
|
@update_google_channel_config = ::Gapic::Config::Method.new update_google_channel_config_config
|
4601
|
+
get_message_bus_config = parent_rpcs.get_message_bus if parent_rpcs.respond_to? :get_message_bus
|
4602
|
+
@get_message_bus = ::Gapic::Config::Method.new get_message_bus_config
|
4603
|
+
list_message_buses_config = parent_rpcs.list_message_buses if parent_rpcs.respond_to? :list_message_buses
|
4604
|
+
@list_message_buses = ::Gapic::Config::Method.new list_message_buses_config
|
4605
|
+
list_message_bus_enrollments_config = parent_rpcs.list_message_bus_enrollments if parent_rpcs.respond_to? :list_message_bus_enrollments
|
4606
|
+
@list_message_bus_enrollments = ::Gapic::Config::Method.new list_message_bus_enrollments_config
|
4607
|
+
create_message_bus_config = parent_rpcs.create_message_bus if parent_rpcs.respond_to? :create_message_bus
|
4608
|
+
@create_message_bus = ::Gapic::Config::Method.new create_message_bus_config
|
4609
|
+
update_message_bus_config = parent_rpcs.update_message_bus if parent_rpcs.respond_to? :update_message_bus
|
4610
|
+
@update_message_bus = ::Gapic::Config::Method.new update_message_bus_config
|
4611
|
+
delete_message_bus_config = parent_rpcs.delete_message_bus if parent_rpcs.respond_to? :delete_message_bus
|
4612
|
+
@delete_message_bus = ::Gapic::Config::Method.new delete_message_bus_config
|
4613
|
+
get_enrollment_config = parent_rpcs.get_enrollment if parent_rpcs.respond_to? :get_enrollment
|
4614
|
+
@get_enrollment = ::Gapic::Config::Method.new get_enrollment_config
|
4615
|
+
list_enrollments_config = parent_rpcs.list_enrollments if parent_rpcs.respond_to? :list_enrollments
|
4616
|
+
@list_enrollments = ::Gapic::Config::Method.new list_enrollments_config
|
4617
|
+
create_enrollment_config = parent_rpcs.create_enrollment if parent_rpcs.respond_to? :create_enrollment
|
4618
|
+
@create_enrollment = ::Gapic::Config::Method.new create_enrollment_config
|
4619
|
+
update_enrollment_config = parent_rpcs.update_enrollment if parent_rpcs.respond_to? :update_enrollment
|
4620
|
+
@update_enrollment = ::Gapic::Config::Method.new update_enrollment_config
|
4621
|
+
delete_enrollment_config = parent_rpcs.delete_enrollment if parent_rpcs.respond_to? :delete_enrollment
|
4622
|
+
@delete_enrollment = ::Gapic::Config::Method.new delete_enrollment_config
|
4623
|
+
get_pipeline_config = parent_rpcs.get_pipeline if parent_rpcs.respond_to? :get_pipeline
|
4624
|
+
@get_pipeline = ::Gapic::Config::Method.new get_pipeline_config
|
4625
|
+
list_pipelines_config = parent_rpcs.list_pipelines if parent_rpcs.respond_to? :list_pipelines
|
4626
|
+
@list_pipelines = ::Gapic::Config::Method.new list_pipelines_config
|
4627
|
+
create_pipeline_config = parent_rpcs.create_pipeline if parent_rpcs.respond_to? :create_pipeline
|
4628
|
+
@create_pipeline = ::Gapic::Config::Method.new create_pipeline_config
|
4629
|
+
update_pipeline_config = parent_rpcs.update_pipeline if parent_rpcs.respond_to? :update_pipeline
|
4630
|
+
@update_pipeline = ::Gapic::Config::Method.new update_pipeline_config
|
4631
|
+
delete_pipeline_config = parent_rpcs.delete_pipeline if parent_rpcs.respond_to? :delete_pipeline
|
4632
|
+
@delete_pipeline = ::Gapic::Config::Method.new delete_pipeline_config
|
4633
|
+
get_google_api_source_config = parent_rpcs.get_google_api_source if parent_rpcs.respond_to? :get_google_api_source
|
4634
|
+
@get_google_api_source = ::Gapic::Config::Method.new get_google_api_source_config
|
4635
|
+
list_google_api_sources_config = parent_rpcs.list_google_api_sources if parent_rpcs.respond_to? :list_google_api_sources
|
4636
|
+
@list_google_api_sources = ::Gapic::Config::Method.new list_google_api_sources_config
|
4637
|
+
create_google_api_source_config = parent_rpcs.create_google_api_source if parent_rpcs.respond_to? :create_google_api_source
|
4638
|
+
@create_google_api_source = ::Gapic::Config::Method.new create_google_api_source_config
|
4639
|
+
update_google_api_source_config = parent_rpcs.update_google_api_source if parent_rpcs.respond_to? :update_google_api_source
|
4640
|
+
@update_google_api_source = ::Gapic::Config::Method.new update_google_api_source_config
|
4641
|
+
delete_google_api_source_config = parent_rpcs.delete_google_api_source if parent_rpcs.respond_to? :delete_google_api_source
|
4642
|
+
@delete_google_api_source = ::Gapic::Config::Method.new delete_google_api_source_config
|
2235
4643
|
|
2236
4644
|
yield self if block_given?
|
2237
4645
|
end
|