google-apis-eventarc_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,28 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Google
16
+ module Apis
17
+ module EventarcV1
18
+ # Version of the google-apis-eventarc_v1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.1.2"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20210113"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,380 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module EventarcV1
24
+
25
+ class AuditConfig
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class AuditLogConfig
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class Binding
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class CloudRun
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class Destination
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class Empty
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class EventFilter
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class Expr
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class GoogleLongrunningCancelOperationRequest
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class GoogleLongrunningListOperationsResponse
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class GoogleLongrunningOperation
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class GoogleRpcStatus
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class ListLocationsResponse
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class ListTriggersResponse
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class Location
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class OperationMetadata
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class Policy
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class Pubsub
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class SetIamPolicyRequest
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class TestIamPermissionsRequest
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class TestIamPermissionsResponse
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
151
+ class Transport
152
+ class Representation < Google::Apis::Core::JsonRepresentation; end
153
+
154
+ include Google::Apis::Core::JsonObjectSupport
155
+ end
156
+
157
+ class Trigger
158
+ class Representation < Google::Apis::Core::JsonRepresentation; end
159
+
160
+ include Google::Apis::Core::JsonObjectSupport
161
+ end
162
+
163
+ class AuditConfig
164
+ # @private
165
+ class Representation < Google::Apis::Core::JsonRepresentation
166
+ collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::EventarcV1::AuditLogConfig, decorator: Google::Apis::EventarcV1::AuditLogConfig::Representation
167
+
168
+ property :service, as: 'service'
169
+ end
170
+ end
171
+
172
+ class AuditLogConfig
173
+ # @private
174
+ class Representation < Google::Apis::Core::JsonRepresentation
175
+ collection :exempted_members, as: 'exemptedMembers'
176
+ property :log_type, as: 'logType'
177
+ end
178
+ end
179
+
180
+ class Binding
181
+ # @private
182
+ class Representation < Google::Apis::Core::JsonRepresentation
183
+ property :condition, as: 'condition', class: Google::Apis::EventarcV1::Expr, decorator: Google::Apis::EventarcV1::Expr::Representation
184
+
185
+ collection :members, as: 'members'
186
+ property :role, as: 'role'
187
+ end
188
+ end
189
+
190
+ class CloudRun
191
+ # @private
192
+ class Representation < Google::Apis::Core::JsonRepresentation
193
+ property :path, as: 'path'
194
+ property :region, as: 'region'
195
+ property :service, as: 'service'
196
+ end
197
+ end
198
+
199
+ class Destination
200
+ # @private
201
+ class Representation < Google::Apis::Core::JsonRepresentation
202
+ property :cloud_run, as: 'cloudRun', class: Google::Apis::EventarcV1::CloudRun, decorator: Google::Apis::EventarcV1::CloudRun::Representation
203
+
204
+ end
205
+ end
206
+
207
+ class Empty
208
+ # @private
209
+ class Representation < Google::Apis::Core::JsonRepresentation
210
+ end
211
+ end
212
+
213
+ class EventFilter
214
+ # @private
215
+ class Representation < Google::Apis::Core::JsonRepresentation
216
+ property :attribute, as: 'attribute'
217
+ property :value, as: 'value'
218
+ end
219
+ end
220
+
221
+ class Expr
222
+ # @private
223
+ class Representation < Google::Apis::Core::JsonRepresentation
224
+ property :description, as: 'description'
225
+ property :expression, as: 'expression'
226
+ property :location, as: 'location'
227
+ property :title, as: 'title'
228
+ end
229
+ end
230
+
231
+ class GoogleLongrunningCancelOperationRequest
232
+ # @private
233
+ class Representation < Google::Apis::Core::JsonRepresentation
234
+ end
235
+ end
236
+
237
+ class GoogleLongrunningListOperationsResponse
238
+ # @private
239
+ class Representation < Google::Apis::Core::JsonRepresentation
240
+ property :next_page_token, as: 'nextPageToken'
241
+ collection :operations, as: 'operations', class: Google::Apis::EventarcV1::GoogleLongrunningOperation, decorator: Google::Apis::EventarcV1::GoogleLongrunningOperation::Representation
242
+
243
+ end
244
+ end
245
+
246
+ class GoogleLongrunningOperation
247
+ # @private
248
+ class Representation < Google::Apis::Core::JsonRepresentation
249
+ property :done, as: 'done'
250
+ property :error, as: 'error', class: Google::Apis::EventarcV1::GoogleRpcStatus, decorator: Google::Apis::EventarcV1::GoogleRpcStatus::Representation
251
+
252
+ hash :metadata, as: 'metadata'
253
+ property :name, as: 'name'
254
+ hash :response, as: 'response'
255
+ end
256
+ end
257
+
258
+ class GoogleRpcStatus
259
+ # @private
260
+ class Representation < Google::Apis::Core::JsonRepresentation
261
+ property :code, as: 'code'
262
+ collection :details, as: 'details'
263
+ property :message, as: 'message'
264
+ end
265
+ end
266
+
267
+ class ListLocationsResponse
268
+ # @private
269
+ class Representation < Google::Apis::Core::JsonRepresentation
270
+ collection :locations, as: 'locations', class: Google::Apis::EventarcV1::Location, decorator: Google::Apis::EventarcV1::Location::Representation
271
+
272
+ property :next_page_token, as: 'nextPageToken'
273
+ end
274
+ end
275
+
276
+ class ListTriggersResponse
277
+ # @private
278
+ class Representation < Google::Apis::Core::JsonRepresentation
279
+ property :next_page_token, as: 'nextPageToken'
280
+ collection :triggers, as: 'triggers', class: Google::Apis::EventarcV1::Trigger, decorator: Google::Apis::EventarcV1::Trigger::Representation
281
+
282
+ collection :unreachable, as: 'unreachable'
283
+ end
284
+ end
285
+
286
+ class Location
287
+ # @private
288
+ class Representation < Google::Apis::Core::JsonRepresentation
289
+ property :display_name, as: 'displayName'
290
+ hash :labels, as: 'labels'
291
+ property :location_id, as: 'locationId'
292
+ hash :metadata, as: 'metadata'
293
+ property :name, as: 'name'
294
+ end
295
+ end
296
+
297
+ class OperationMetadata
298
+ # @private
299
+ class Representation < Google::Apis::Core::JsonRepresentation
300
+ property :api_version, as: 'apiVersion'
301
+ property :create_time, as: 'createTime'
302
+ property :end_time, as: 'endTime'
303
+ property :requested_cancellation, as: 'requestedCancellation'
304
+ property :status_message, as: 'statusMessage'
305
+ property :target, as: 'target'
306
+ property :verb, as: 'verb'
307
+ end
308
+ end
309
+
310
+ class Policy
311
+ # @private
312
+ class Representation < Google::Apis::Core::JsonRepresentation
313
+ collection :audit_configs, as: 'auditConfigs', class: Google::Apis::EventarcV1::AuditConfig, decorator: Google::Apis::EventarcV1::AuditConfig::Representation
314
+
315
+ collection :bindings, as: 'bindings', class: Google::Apis::EventarcV1::Binding, decorator: Google::Apis::EventarcV1::Binding::Representation
316
+
317
+ property :etag, :base64 => true, as: 'etag'
318
+ property :version, as: 'version'
319
+ end
320
+ end
321
+
322
+ class Pubsub
323
+ # @private
324
+ class Representation < Google::Apis::Core::JsonRepresentation
325
+ property :subscription, as: 'subscription'
326
+ property :topic, as: 'topic'
327
+ end
328
+ end
329
+
330
+ class SetIamPolicyRequest
331
+ # @private
332
+ class Representation < Google::Apis::Core::JsonRepresentation
333
+ property :policy, as: 'policy', class: Google::Apis::EventarcV1::Policy, decorator: Google::Apis::EventarcV1::Policy::Representation
334
+
335
+ property :update_mask, as: 'updateMask'
336
+ end
337
+ end
338
+
339
+ class TestIamPermissionsRequest
340
+ # @private
341
+ class Representation < Google::Apis::Core::JsonRepresentation
342
+ collection :permissions, as: 'permissions'
343
+ end
344
+ end
345
+
346
+ class TestIamPermissionsResponse
347
+ # @private
348
+ class Representation < Google::Apis::Core::JsonRepresentation
349
+ collection :permissions, as: 'permissions'
350
+ end
351
+ end
352
+
353
+ class Transport
354
+ # @private
355
+ class Representation < Google::Apis::Core::JsonRepresentation
356
+ property :pubsub, as: 'pubsub', class: Google::Apis::EventarcV1::Pubsub, decorator: Google::Apis::EventarcV1::Pubsub::Representation
357
+
358
+ end
359
+ end
360
+
361
+ class Trigger
362
+ # @private
363
+ class Representation < Google::Apis::Core::JsonRepresentation
364
+ property :create_time, as: 'createTime'
365
+ property :destination, as: 'destination', class: Google::Apis::EventarcV1::Destination, decorator: Google::Apis::EventarcV1::Destination::Representation
366
+
367
+ property :etag, as: 'etag'
368
+ collection :event_filters, as: 'eventFilters', class: Google::Apis::EventarcV1::EventFilter, decorator: Google::Apis::EventarcV1::EventFilter::Representation
369
+
370
+ property :name, as: 'name'
371
+ property :service_account, as: 'serviceAccount'
372
+ property :transport, as: 'transport', class: Google::Apis::EventarcV1::Transport, decorator: Google::Apis::EventarcV1::Transport::Representation
373
+
374
+ property :uid, as: 'uid'
375
+ property :update_time, as: 'updateTime'
376
+ end
377
+ end
378
+ end
379
+ end
380
+ end
@@ -0,0 +1,601 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module EventarcV1
23
+ # Eventarc API
24
+ #
25
+ #
26
+ #
27
+ # @example
28
+ # require 'google/apis/eventarc_v1'
29
+ #
30
+ # Eventarc = Google::Apis::EventarcV1 # Alias the module
31
+ # service = Eventarc::EventarcService.new
32
+ #
33
+ # @see https://cloud.google.com/eventarc
34
+ class EventarcService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://eventarc.googleapis.com/', '',
47
+ client_name: 'google-apis-eventarc_v1',
48
+ client_version: Google::Apis::EventarcV1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Gets information about a location.
53
+ # @param [String] name
54
+ # Resource name for the location.
55
+ # @param [String] fields
56
+ # Selector specifying which fields to include in a partial response.
57
+ # @param [String] quota_user
58
+ # Available to use for quota purposes for server-side applications. Can be any
59
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
60
+ # @param [Google::Apis::RequestOptions] options
61
+ # Request-specific options
62
+ #
63
+ # @yield [result, err] Result & error if block supplied
64
+ # @yieldparam result [Google::Apis::EventarcV1::Location] parsed result object
65
+ # @yieldparam err [StandardError] error object if request failed
66
+ #
67
+ # @return [Google::Apis::EventarcV1::Location]
68
+ #
69
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
70
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
71
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
72
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
73
+ command = make_simple_command(:get, 'v1/{+name}', options)
74
+ command.response_representation = Google::Apis::EventarcV1::Location::Representation
75
+ command.response_class = Google::Apis::EventarcV1::Location
76
+ command.params['name'] = name unless name.nil?
77
+ command.query['fields'] = fields unless fields.nil?
78
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
79
+ execute_or_queue_command(command, &block)
80
+ end
81
+
82
+ # Lists information about the supported locations for this service.
83
+ # @param [String] name
84
+ # The resource that owns the locations collection, if applicable.
85
+ # @param [String] filter
86
+ # The standard list filter.
87
+ # @param [Fixnum] page_size
88
+ # The standard list page size.
89
+ # @param [String] page_token
90
+ # The standard list page token.
91
+ # @param [String] fields
92
+ # Selector specifying which fields to include in a partial response.
93
+ # @param [String] quota_user
94
+ # Available to use for quota purposes for server-side applications. Can be any
95
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
96
+ # @param [Google::Apis::RequestOptions] options
97
+ # Request-specific options
98
+ #
99
+ # @yield [result, err] Result & error if block supplied
100
+ # @yieldparam result [Google::Apis::EventarcV1::ListLocationsResponse] parsed result object
101
+ # @yieldparam err [StandardError] error object if request failed
102
+ #
103
+ # @return [Google::Apis::EventarcV1::ListLocationsResponse]
104
+ #
105
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
106
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
107
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
108
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
109
+ command = make_simple_command(:get, 'v1/{+name}/locations', options)
110
+ command.response_representation = Google::Apis::EventarcV1::ListLocationsResponse::Representation
111
+ command.response_class = Google::Apis::EventarcV1::ListLocationsResponse
112
+ command.params['name'] = name unless name.nil?
113
+ command.query['filter'] = filter unless filter.nil?
114
+ command.query['pageSize'] = page_size unless page_size.nil?
115
+ command.query['pageToken'] = page_token unless page_token.nil?
116
+ command.query['fields'] = fields unless fields.nil?
117
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
118
+ execute_or_queue_command(command, &block)
119
+ end
120
+
121
+ # Starts asynchronous cancellation on a long-running operation. The server makes
122
+ # a best effort to cancel the operation, but success is not guaranteed. If the
123
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
124
+ # Clients can use Operations.GetOperation or other methods to check whether the
125
+ # cancellation succeeded or whether the operation completed despite cancellation.
126
+ # On successful cancellation, the operation is not deleted; instead, it becomes
127
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
128
+ # corresponding to `Code.CANCELLED`.
129
+ # @param [String] name
130
+ # The name of the operation resource to be cancelled.
131
+ # @param [Google::Apis::EventarcV1::GoogleLongrunningCancelOperationRequest] google_longrunning_cancel_operation_request_object
132
+ # @param [String] fields
133
+ # Selector specifying which fields to include in a partial response.
134
+ # @param [String] quota_user
135
+ # Available to use for quota purposes for server-side applications. Can be any
136
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
137
+ # @param [Google::Apis::RequestOptions] options
138
+ # Request-specific options
139
+ #
140
+ # @yield [result, err] Result & error if block supplied
141
+ # @yieldparam result [Google::Apis::EventarcV1::Empty] parsed result object
142
+ # @yieldparam err [StandardError] error object if request failed
143
+ #
144
+ # @return [Google::Apis::EventarcV1::Empty]
145
+ #
146
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
147
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
148
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
149
+ def cancel_project_location_operation(name, google_longrunning_cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
150
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
151
+ command.request_representation = Google::Apis::EventarcV1::GoogleLongrunningCancelOperationRequest::Representation
152
+ command.request_object = google_longrunning_cancel_operation_request_object
153
+ command.response_representation = Google::Apis::EventarcV1::Empty::Representation
154
+ command.response_class = Google::Apis::EventarcV1::Empty
155
+ command.params['name'] = name unless name.nil?
156
+ command.query['fields'] = fields unless fields.nil?
157
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
158
+ execute_or_queue_command(command, &block)
159
+ end
160
+
161
+ # Deletes a long-running operation. This method indicates that the client is no
162
+ # longer interested in the operation result. It does not cancel the operation.
163
+ # If the server doesn't support this method, it returns `google.rpc.Code.
164
+ # UNIMPLEMENTED`.
165
+ # @param [String] name
166
+ # The name of the operation resource to be deleted.
167
+ # @param [String] fields
168
+ # Selector specifying which fields to include in a partial response.
169
+ # @param [String] quota_user
170
+ # Available to use for quota purposes for server-side applications. Can be any
171
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
172
+ # @param [Google::Apis::RequestOptions] options
173
+ # Request-specific options
174
+ #
175
+ # @yield [result, err] Result & error if block supplied
176
+ # @yieldparam result [Google::Apis::EventarcV1::Empty] parsed result object
177
+ # @yieldparam err [StandardError] error object if request failed
178
+ #
179
+ # @return [Google::Apis::EventarcV1::Empty]
180
+ #
181
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
182
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
183
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
184
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
185
+ command = make_simple_command(:delete, 'v1/{+name}', options)
186
+ command.response_representation = Google::Apis::EventarcV1::Empty::Representation
187
+ command.response_class = Google::Apis::EventarcV1::Empty
188
+ command.params['name'] = name unless name.nil?
189
+ command.query['fields'] = fields unless fields.nil?
190
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
191
+ execute_or_queue_command(command, &block)
192
+ end
193
+
194
+ # Gets the latest state of a long-running operation. Clients can use this method
195
+ # to poll the operation result at intervals as recommended by the API service.
196
+ # @param [String] name
197
+ # The name of the operation resource.
198
+ # @param [String] fields
199
+ # Selector specifying which fields to include in a partial response.
200
+ # @param [String] quota_user
201
+ # Available to use for quota purposes for server-side applications. Can be any
202
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
203
+ # @param [Google::Apis::RequestOptions] options
204
+ # Request-specific options
205
+ #
206
+ # @yield [result, err] Result & error if block supplied
207
+ # @yieldparam result [Google::Apis::EventarcV1::GoogleLongrunningOperation] parsed result object
208
+ # @yieldparam err [StandardError] error object if request failed
209
+ #
210
+ # @return [Google::Apis::EventarcV1::GoogleLongrunningOperation]
211
+ #
212
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
213
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
214
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
215
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
216
+ command = make_simple_command(:get, 'v1/{+name}', options)
217
+ command.response_representation = Google::Apis::EventarcV1::GoogleLongrunningOperation::Representation
218
+ command.response_class = Google::Apis::EventarcV1::GoogleLongrunningOperation
219
+ command.params['name'] = name unless name.nil?
220
+ command.query['fields'] = fields unless fields.nil?
221
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
222
+ execute_or_queue_command(command, &block)
223
+ end
224
+
225
+ # Lists operations that match the specified filter in the request. If the server
226
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
227
+ # binding allows API services to override the binding to use different resource
228
+ # name schemes, such as `users/*/operations`. To override the binding, API
229
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
230
+ # service configuration. For backwards compatibility, the default name includes
231
+ # the operations collection id, however overriding users must ensure the name
232
+ # binding is the parent resource, without the operations collection id.
233
+ # @param [String] name
234
+ # The name of the operation's parent resource.
235
+ # @param [String] filter
236
+ # The standard list filter.
237
+ # @param [Fixnum] page_size
238
+ # The standard list page size.
239
+ # @param [String] page_token
240
+ # The standard list page token.
241
+ # @param [String] fields
242
+ # Selector specifying which fields to include in a partial response.
243
+ # @param [String] quota_user
244
+ # Available to use for quota purposes for server-side applications. Can be any
245
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
246
+ # @param [Google::Apis::RequestOptions] options
247
+ # Request-specific options
248
+ #
249
+ # @yield [result, err] Result & error if block supplied
250
+ # @yieldparam result [Google::Apis::EventarcV1::GoogleLongrunningListOperationsResponse] parsed result object
251
+ # @yieldparam err [StandardError] error object if request failed
252
+ #
253
+ # @return [Google::Apis::EventarcV1::GoogleLongrunningListOperationsResponse]
254
+ #
255
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
256
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
257
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
258
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
259
+ command = make_simple_command(:get, 'v1/{+name}/operations', options)
260
+ command.response_representation = Google::Apis::EventarcV1::GoogleLongrunningListOperationsResponse::Representation
261
+ command.response_class = Google::Apis::EventarcV1::GoogleLongrunningListOperationsResponse
262
+ command.params['name'] = name unless name.nil?
263
+ command.query['filter'] = filter unless filter.nil?
264
+ command.query['pageSize'] = page_size unless page_size.nil?
265
+ command.query['pageToken'] = page_token unless page_token.nil?
266
+ command.query['fields'] = fields unless fields.nil?
267
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
268
+ execute_or_queue_command(command, &block)
269
+ end
270
+
271
+ # Create a new trigger in a particular project and location.
272
+ # @param [String] parent
273
+ # Required. The parent collection in which to add this trigger.
274
+ # @param [Google::Apis::EventarcV1::Trigger] trigger_object
275
+ # @param [String] trigger_id
276
+ # Required. The user-provided ID to be assigned to the trigger.
277
+ # @param [Boolean] validate_only
278
+ # Required. If set, validate the request and preview the review, but do not
279
+ # actually post it.
280
+ # @param [String] fields
281
+ # Selector specifying which fields to include in a partial response.
282
+ # @param [String] quota_user
283
+ # Available to use for quota purposes for server-side applications. Can be any
284
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
285
+ # @param [Google::Apis::RequestOptions] options
286
+ # Request-specific options
287
+ #
288
+ # @yield [result, err] Result & error if block supplied
289
+ # @yieldparam result [Google::Apis::EventarcV1::GoogleLongrunningOperation] parsed result object
290
+ # @yieldparam err [StandardError] error object if request failed
291
+ #
292
+ # @return [Google::Apis::EventarcV1::GoogleLongrunningOperation]
293
+ #
294
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
295
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
296
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
297
+ def create_project_location_trigger(parent, trigger_object = nil, trigger_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
298
+ command = make_simple_command(:post, 'v1/{+parent}/triggers', options)
299
+ command.request_representation = Google::Apis::EventarcV1::Trigger::Representation
300
+ command.request_object = trigger_object
301
+ command.response_representation = Google::Apis::EventarcV1::GoogleLongrunningOperation::Representation
302
+ command.response_class = Google::Apis::EventarcV1::GoogleLongrunningOperation
303
+ command.params['parent'] = parent unless parent.nil?
304
+ command.query['triggerId'] = trigger_id unless trigger_id.nil?
305
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
306
+ command.query['fields'] = fields unless fields.nil?
307
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
308
+ execute_or_queue_command(command, &block)
309
+ end
310
+
311
+ # Delete a single trigger.
312
+ # @param [String] name
313
+ # Required. The name of the trigger to be deleted.
314
+ # @param [Boolean] allow_missing
315
+ # If set to true, and the trigger is not found, the request will succeed but no
316
+ # action will be taken on the server.
317
+ # @param [String] etag
318
+ # If provided, the trigger will only be deleted if the etag matches the current
319
+ # etag on the resource.
320
+ # @param [Boolean] validate_only
321
+ # Required. If set, validate the request and preview the review, but do not
322
+ # actually post it.
323
+ # @param [String] fields
324
+ # Selector specifying which fields to include in a partial response.
325
+ # @param [String] quota_user
326
+ # Available to use for quota purposes for server-side applications. Can be any
327
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
328
+ # @param [Google::Apis::RequestOptions] options
329
+ # Request-specific options
330
+ #
331
+ # @yield [result, err] Result & error if block supplied
332
+ # @yieldparam result [Google::Apis::EventarcV1::GoogleLongrunningOperation] parsed result object
333
+ # @yieldparam err [StandardError] error object if request failed
334
+ #
335
+ # @return [Google::Apis::EventarcV1::GoogleLongrunningOperation]
336
+ #
337
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
338
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
339
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
340
+ def delete_project_location_trigger(name, allow_missing: nil, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
341
+ command = make_simple_command(:delete, 'v1/{+name}', options)
342
+ command.response_representation = Google::Apis::EventarcV1::GoogleLongrunningOperation::Representation
343
+ command.response_class = Google::Apis::EventarcV1::GoogleLongrunningOperation
344
+ command.params['name'] = name unless name.nil?
345
+ command.query['allowMissing'] = allow_missing unless allow_missing.nil?
346
+ command.query['etag'] = etag unless etag.nil?
347
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
348
+ command.query['fields'] = fields unless fields.nil?
349
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
350
+ execute_or_queue_command(command, &block)
351
+ end
352
+
353
+ # Get a single trigger.
354
+ # @param [String] name
355
+ # Required. The name of the trigger to get.
356
+ # @param [String] fields
357
+ # Selector specifying which fields to include in a partial response.
358
+ # @param [String] quota_user
359
+ # Available to use for quota purposes for server-side applications. Can be any
360
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
361
+ # @param [Google::Apis::RequestOptions] options
362
+ # Request-specific options
363
+ #
364
+ # @yield [result, err] Result & error if block supplied
365
+ # @yieldparam result [Google::Apis::EventarcV1::Trigger] parsed result object
366
+ # @yieldparam err [StandardError] error object if request failed
367
+ #
368
+ # @return [Google::Apis::EventarcV1::Trigger]
369
+ #
370
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
371
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
372
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
373
+ def get_project_location_trigger(name, fields: nil, quota_user: nil, options: nil, &block)
374
+ command = make_simple_command(:get, 'v1/{+name}', options)
375
+ command.response_representation = Google::Apis::EventarcV1::Trigger::Representation
376
+ command.response_class = Google::Apis::EventarcV1::Trigger
377
+ command.params['name'] = name unless name.nil?
378
+ command.query['fields'] = fields unless fields.nil?
379
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
380
+ execute_or_queue_command(command, &block)
381
+ end
382
+
383
+ # Gets the access control policy for a resource. Returns an empty policy if the
384
+ # resource exists and does not have a policy set.
385
+ # @param [String] resource
386
+ # REQUIRED: The resource for which the policy is being requested. See the
387
+ # operation documentation for the appropriate value for this field.
388
+ # @param [Fixnum] options_requested_policy_version
389
+ # Optional. The policy format version to be returned. Valid values are 0, 1, and
390
+ # 3. Requests specifying an invalid value will be rejected. Requests for
391
+ # policies with any conditional bindings must specify version 3. Policies
392
+ # without any conditional bindings may specify any valid value or leave the
393
+ # field unset. To learn which resources support conditions in their IAM policies,
394
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
395
+ # resource-policies).
396
+ # @param [String] fields
397
+ # Selector specifying which fields to include in a partial response.
398
+ # @param [String] quota_user
399
+ # Available to use for quota purposes for server-side applications. Can be any
400
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
401
+ # @param [Google::Apis::RequestOptions] options
402
+ # Request-specific options
403
+ #
404
+ # @yield [result, err] Result & error if block supplied
405
+ # @yieldparam result [Google::Apis::EventarcV1::Policy] parsed result object
406
+ # @yieldparam err [StandardError] error object if request failed
407
+ #
408
+ # @return [Google::Apis::EventarcV1::Policy]
409
+ #
410
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
411
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
412
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
413
+ def get_project_location_trigger_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
414
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
415
+ command.response_representation = Google::Apis::EventarcV1::Policy::Representation
416
+ command.response_class = Google::Apis::EventarcV1::Policy
417
+ command.params['resource'] = resource unless resource.nil?
418
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
419
+ command.query['fields'] = fields unless fields.nil?
420
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
421
+ execute_or_queue_command(command, &block)
422
+ end
423
+
424
+ # List triggers.
425
+ # @param [String] parent
426
+ # Required. The parent collection to list triggers on.
427
+ # @param [String] order_by
428
+ # The sorting order of the resources returned. Value should be a comma separated
429
+ # list of fields. The default sorting oder is ascending. To specify descending
430
+ # order for a field, append a ` desc` suffix; for example: `name desc,
431
+ # trigger_id`.
432
+ # @param [Fixnum] page_size
433
+ # The maximum number of triggers to return on each page. Note: The service may
434
+ # send fewer.
435
+ # @param [String] page_token
436
+ # The page token; provide the value from the `next_page_token` field in a
437
+ # previous `ListTriggers` call to retrieve the subsequent page. When paginating,
438
+ # all other parameters provided to `ListTriggers` must match the call that
439
+ # provided the page token.
440
+ # @param [String] fields
441
+ # Selector specifying which fields to include in a partial response.
442
+ # @param [String] quota_user
443
+ # Available to use for quota purposes for server-side applications. Can be any
444
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
445
+ # @param [Google::Apis::RequestOptions] options
446
+ # Request-specific options
447
+ #
448
+ # @yield [result, err] Result & error if block supplied
449
+ # @yieldparam result [Google::Apis::EventarcV1::ListTriggersResponse] parsed result object
450
+ # @yieldparam err [StandardError] error object if request failed
451
+ #
452
+ # @return [Google::Apis::EventarcV1::ListTriggersResponse]
453
+ #
454
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
455
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
456
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
457
+ def list_project_location_triggers(parent, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
458
+ command = make_simple_command(:get, 'v1/{+parent}/triggers', options)
459
+ command.response_representation = Google::Apis::EventarcV1::ListTriggersResponse::Representation
460
+ command.response_class = Google::Apis::EventarcV1::ListTriggersResponse
461
+ command.params['parent'] = parent unless parent.nil?
462
+ command.query['orderBy'] = order_by unless order_by.nil?
463
+ command.query['pageSize'] = page_size unless page_size.nil?
464
+ command.query['pageToken'] = page_token unless page_token.nil?
465
+ command.query['fields'] = fields unless fields.nil?
466
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
467
+ execute_or_queue_command(command, &block)
468
+ end
469
+
470
+ # Update a single trigger.
471
+ # @param [String] name
472
+ # Required. The resource name of the trigger. Must be unique within the location
473
+ # on the project and must be in `projects/`project`/locations/`location`/
474
+ # triggers/`trigger`` format.
475
+ # @param [Google::Apis::EventarcV1::Trigger] trigger_object
476
+ # @param [Boolean] allow_missing
477
+ # If set to true, and the trigger is not found, a new trigger will be created.
478
+ # In this situation, `update_mask` is ignored.
479
+ # @param [String] update_mask
480
+ # The fields to be updated; only fields explicitly provided will be updated. If
481
+ # no field mask is provided, all provided fields in the request will be updated.
482
+ # To update all fields, provide a field mask of "*".
483
+ # @param [Boolean] validate_only
484
+ # Required. If set, validate the request and preview the review, but do not
485
+ # actually post it.
486
+ # @param [String] fields
487
+ # Selector specifying which fields to include in a partial response.
488
+ # @param [String] quota_user
489
+ # Available to use for quota purposes for server-side applications. Can be any
490
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
491
+ # @param [Google::Apis::RequestOptions] options
492
+ # Request-specific options
493
+ #
494
+ # @yield [result, err] Result & error if block supplied
495
+ # @yieldparam result [Google::Apis::EventarcV1::GoogleLongrunningOperation] parsed result object
496
+ # @yieldparam err [StandardError] error object if request failed
497
+ #
498
+ # @return [Google::Apis::EventarcV1::GoogleLongrunningOperation]
499
+ #
500
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
501
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
502
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
503
+ def patch_project_location_trigger(name, trigger_object = nil, allow_missing: nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
504
+ command = make_simple_command(:patch, 'v1/{+name}', options)
505
+ command.request_representation = Google::Apis::EventarcV1::Trigger::Representation
506
+ command.request_object = trigger_object
507
+ command.response_representation = Google::Apis::EventarcV1::GoogleLongrunningOperation::Representation
508
+ command.response_class = Google::Apis::EventarcV1::GoogleLongrunningOperation
509
+ command.params['name'] = name unless name.nil?
510
+ command.query['allowMissing'] = allow_missing unless allow_missing.nil?
511
+ command.query['updateMask'] = update_mask unless update_mask.nil?
512
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
513
+ command.query['fields'] = fields unless fields.nil?
514
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
515
+ execute_or_queue_command(command, &block)
516
+ end
517
+
518
+ # Sets the access control policy on the specified resource. Replaces any
519
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
520
+ # PERMISSION_DENIED` errors.
521
+ # @param [String] resource
522
+ # REQUIRED: The resource for which the policy is being specified. See the
523
+ # operation documentation for the appropriate value for this field.
524
+ # @param [Google::Apis::EventarcV1::SetIamPolicyRequest] set_iam_policy_request_object
525
+ # @param [String] fields
526
+ # Selector specifying which fields to include in a partial response.
527
+ # @param [String] quota_user
528
+ # Available to use for quota purposes for server-side applications. Can be any
529
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
530
+ # @param [Google::Apis::RequestOptions] options
531
+ # Request-specific options
532
+ #
533
+ # @yield [result, err] Result & error if block supplied
534
+ # @yieldparam result [Google::Apis::EventarcV1::Policy] parsed result object
535
+ # @yieldparam err [StandardError] error object if request failed
536
+ #
537
+ # @return [Google::Apis::EventarcV1::Policy]
538
+ #
539
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
540
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
541
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
542
+ def set_trigger_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
543
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
544
+ command.request_representation = Google::Apis::EventarcV1::SetIamPolicyRequest::Representation
545
+ command.request_object = set_iam_policy_request_object
546
+ command.response_representation = Google::Apis::EventarcV1::Policy::Representation
547
+ command.response_class = Google::Apis::EventarcV1::Policy
548
+ command.params['resource'] = resource unless resource.nil?
549
+ command.query['fields'] = fields unless fields.nil?
550
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
551
+ execute_or_queue_command(command, &block)
552
+ end
553
+
554
+ # Returns permissions that a caller has on the specified resource. If the
555
+ # resource does not exist, this will return an empty set of permissions, not a `
556
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
557
+ # permission-aware UIs and command-line tools, not for authorization checking.
558
+ # This operation may "fail open" without warning.
559
+ # @param [String] resource
560
+ # REQUIRED: The resource for which the policy detail is being requested. See the
561
+ # operation documentation for the appropriate value for this field.
562
+ # @param [Google::Apis::EventarcV1::TestIamPermissionsRequest] test_iam_permissions_request_object
563
+ # @param [String] fields
564
+ # Selector specifying which fields to include in a partial response.
565
+ # @param [String] quota_user
566
+ # Available to use for quota purposes for server-side applications. Can be any
567
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
568
+ # @param [Google::Apis::RequestOptions] options
569
+ # Request-specific options
570
+ #
571
+ # @yield [result, err] Result & error if block supplied
572
+ # @yieldparam result [Google::Apis::EventarcV1::TestIamPermissionsResponse] parsed result object
573
+ # @yieldparam err [StandardError] error object if request failed
574
+ #
575
+ # @return [Google::Apis::EventarcV1::TestIamPermissionsResponse]
576
+ #
577
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
578
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
579
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
580
+ def test_trigger_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
581
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
582
+ command.request_representation = Google::Apis::EventarcV1::TestIamPermissionsRequest::Representation
583
+ command.request_object = test_iam_permissions_request_object
584
+ command.response_representation = Google::Apis::EventarcV1::TestIamPermissionsResponse::Representation
585
+ command.response_class = Google::Apis::EventarcV1::TestIamPermissionsResponse
586
+ command.params['resource'] = resource unless resource.nil?
587
+ command.query['fields'] = fields unless fields.nil?
588
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
589
+ execute_or_queue_command(command, &block)
590
+ end
591
+
592
+ protected
593
+
594
+ def apply_command_defaults(command)
595
+ command.query['key'] = key unless key.nil?
596
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
597
+ end
598
+ end
599
+ end
600
+ end
601
+ end