google-apis-connectors_v2 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,490 @@
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 ConnectorsV2
23
+ # Connectors API
24
+ #
25
+ # Enables users to create and manage connections to Google Cloud services and
26
+ # third-party business applications using the Connectors interface.
27
+ #
28
+ # @example
29
+ # require 'google/apis/connectors_v2'
30
+ #
31
+ # Connectors = Google::Apis::ConnectorsV2 # Alias the module
32
+ # service = Connectors::ConnectorsService.new
33
+ #
34
+ # @see https://cloud.google.com/apigee/docs/api-platform/connectors/about-connectors
35
+ class ConnectorsService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://connectors.googleapis.com/', '',
48
+ client_name: 'google-apis-connectors_v2',
49
+ client_version: Google::Apis::ConnectorsV2::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Executes a SQL statement specified in the body of the request. An example of
54
+ # this SQL statement in the case of Salesforce connector would be 'select * from
55
+ # Account a, Order o where a.Id = o.AccountId'.
56
+ # @param [String] connection
57
+ # Required. Resource name of the Connection. Format: projects/`project`/
58
+ # locations/`location`/connections/`connection`
59
+ # @param [Google::Apis::ConnectorsV2::ExecuteSqlQueryRequest] execute_sql_query_request_object
60
+ # @param [String] fields
61
+ # Selector specifying which fields to include in a partial response.
62
+ # @param [String] quota_user
63
+ # Available to use for quota purposes for server-side applications. Can be any
64
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
65
+ # @param [Google::Apis::RequestOptions] options
66
+ # Request-specific options
67
+ #
68
+ # @yield [result, err] Result & error if block supplied
69
+ # @yieldparam result [Google::Apis::ConnectorsV2::ExecuteSqlQueryResponse] parsed result object
70
+ # @yieldparam err [StandardError] error object if request failed
71
+ #
72
+ # @return [Google::Apis::ConnectorsV2::ExecuteSqlQueryResponse]
73
+ #
74
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
75
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
76
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
77
+ def execute_connection_sql_query(connection, execute_sql_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
78
+ command = make_simple_command(:post, 'v2/{+connection}:executeSqlQuery', options)
79
+ command.request_representation = Google::Apis::ConnectorsV2::ExecuteSqlQueryRequest::Representation
80
+ command.request_object = execute_sql_query_request_object
81
+ command.response_representation = Google::Apis::ConnectorsV2::ExecuteSqlQueryResponse::Representation
82
+ command.response_class = Google::Apis::ConnectorsV2::ExecuteSqlQueryResponse
83
+ command.params['connection'] = connection unless connection.nil?
84
+ command.query['fields'] = fields unless fields.nil?
85
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
86
+ execute_or_queue_command(command, &block)
87
+ end
88
+
89
+ # Executes an action with the name specified in the request. The input
90
+ # parameters for executing the action are passed through the body of the
91
+ # ExecuteAction request.
92
+ # @param [String] name
93
+ # Required. Resource name of the Action. Format: projects/`project`/locations/`
94
+ # location`/connections/`connection`/actions/`action`
95
+ # @param [Google::Apis::ConnectorsV2::ExecuteActionRequest] execute_action_request_object
96
+ # @param [String] fields
97
+ # Selector specifying which fields to include in a partial response.
98
+ # @param [String] quota_user
99
+ # Available to use for quota purposes for server-side applications. Can be any
100
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
101
+ # @param [Google::Apis::RequestOptions] options
102
+ # Request-specific options
103
+ #
104
+ # @yield [result, err] Result & error if block supplied
105
+ # @yieldparam result [Google::Apis::ConnectorsV2::ExecuteActionResponse] parsed result object
106
+ # @yieldparam err [StandardError] error object if request failed
107
+ #
108
+ # @return [Google::Apis::ConnectorsV2::ExecuteActionResponse]
109
+ #
110
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
111
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
112
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
113
+ def execute_action(name, execute_action_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
114
+ command = make_simple_command(:post, 'v2/{+name}:execute', options)
115
+ command.request_representation = Google::Apis::ConnectorsV2::ExecuteActionRequest::Representation
116
+ command.request_object = execute_action_request_object
117
+ command.response_representation = Google::Apis::ConnectorsV2::ExecuteActionResponse::Representation
118
+ command.response_class = Google::Apis::ConnectorsV2::ExecuteActionResponse
119
+ command.params['name'] = name unless name.nil?
120
+ command.query['fields'] = fields unless fields.nil?
121
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
122
+ execute_or_queue_command(command, &block)
123
+ end
124
+
125
+ # Gets the schema of all the actions supported by the connector.
126
+ # @param [String] parent
127
+ # Required. Parent resource name of the Action. Format: projects/`project`/
128
+ # locations/`location`/connections/`connection`
129
+ # @param [Fixnum] page_size
130
+ # Number of Actions to return. Defaults to 25.
131
+ # @param [String] page_token
132
+ # Page token, return from a previous ListActions call, that can be used retrieve
133
+ # the next page of content. If unspecified, the request returns the first page
134
+ # of actions.
135
+ # @param [String] fields
136
+ # Selector specifying which fields to include in a partial response.
137
+ # @param [String] quota_user
138
+ # Available to use for quota purposes for server-side applications. Can be any
139
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
140
+ # @param [Google::Apis::RequestOptions] options
141
+ # Request-specific options
142
+ #
143
+ # @yield [result, err] Result & error if block supplied
144
+ # @yieldparam result [Google::Apis::ConnectorsV2::ListActionsResponse] parsed result object
145
+ # @yieldparam err [StandardError] error object if request failed
146
+ #
147
+ # @return [Google::Apis::ConnectorsV2::ListActionsResponse]
148
+ #
149
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
150
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
151
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
152
+ def list_project_location_connection_actions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
153
+ command = make_simple_command(:get, 'v2/{+parent}/actions', options)
154
+ command.response_representation = Google::Apis::ConnectorsV2::ListActionsResponse::Representation
155
+ command.response_class = Google::Apis::ConnectorsV2::ListActionsResponse
156
+ command.params['parent'] = parent unless parent.nil?
157
+ command.query['pageSize'] = page_size unless page_size.nil?
158
+ command.query['pageToken'] = page_token unless page_token.nil?
159
+ command.query['fields'] = fields unless fields.nil?
160
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
161
+ execute_or_queue_command(command, &block)
162
+ end
163
+
164
+ # Lists metadata related to all entity types present in the external system.
165
+ # @param [String] parent
166
+ # Required. Resource name of the Entity Type. Format: projects/`project`/
167
+ # locations/`location`/connections/`connection`
168
+ # @param [Fixnum] page_size
169
+ # Number of entity types to return. Defaults to 25.
170
+ # @param [String] page_token
171
+ # Page token, return from a previous ListEntityTypes call, that can be used
172
+ # retrieve the next page of content. If unspecified, the request returns the
173
+ # first page of entity types.
174
+ # @param [String] fields
175
+ # Selector specifying which fields to include in a partial response.
176
+ # @param [String] quota_user
177
+ # Available to use for quota purposes for server-side applications. Can be any
178
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
179
+ # @param [Google::Apis::RequestOptions] options
180
+ # Request-specific options
181
+ #
182
+ # @yield [result, err] Result & error if block supplied
183
+ # @yieldparam result [Google::Apis::ConnectorsV2::ListEntityTypesResponse] parsed result object
184
+ # @yieldparam err [StandardError] error object if request failed
185
+ #
186
+ # @return [Google::Apis::ConnectorsV2::ListEntityTypesResponse]
187
+ #
188
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
189
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
190
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
191
+ def list_project_location_connection_entity_types(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
192
+ command = make_simple_command(:get, 'v2/{+parent}/entityTypes', options)
193
+ command.response_representation = Google::Apis::ConnectorsV2::ListEntityTypesResponse::Representation
194
+ command.response_class = Google::Apis::ConnectorsV2::ListEntityTypesResponse
195
+ command.params['parent'] = parent unless parent.nil?
196
+ command.query['pageSize'] = page_size unless page_size.nil?
197
+ command.query['pageToken'] = page_token unless page_token.nil?
198
+ command.query['fields'] = fields unless fields.nil?
199
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
200
+ execute_or_queue_command(command, &block)
201
+ end
202
+
203
+ # Creates a new entity row of the specified entity type in the external system.
204
+ # The field values for creating the row are contained in the body of the request.
205
+ # The response message contains a `Entity` message object returned as a
206
+ # response by the external system.
207
+ # @param [String] parent
208
+ # Required. Resource name of the Entity Type. Format: projects/`project`/
209
+ # locations/`location`/connections/`connection`/entityTypes/`type`
210
+ # @param [Google::Apis::ConnectorsV2::Entity] entity_object
211
+ # @param [String] fields
212
+ # Selector specifying which fields to include in a partial response.
213
+ # @param [String] quota_user
214
+ # Available to use for quota purposes for server-side applications. Can be any
215
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
216
+ # @param [Google::Apis::RequestOptions] options
217
+ # Request-specific options
218
+ #
219
+ # @yield [result, err] Result & error if block supplied
220
+ # @yieldparam result [Google::Apis::ConnectorsV2::Entity] parsed result object
221
+ # @yieldparam err [StandardError] error object if request failed
222
+ #
223
+ # @return [Google::Apis::ConnectorsV2::Entity]
224
+ #
225
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
226
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
227
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
228
+ def create_project_location_connection_entity_type_entity(parent, entity_object = nil, fields: nil, quota_user: nil, options: nil, &block)
229
+ command = make_simple_command(:post, 'v2/{+parent}/entities', options)
230
+ command.request_representation = Google::Apis::ConnectorsV2::Entity::Representation
231
+ command.request_object = entity_object
232
+ command.response_representation = Google::Apis::ConnectorsV2::Entity::Representation
233
+ command.response_class = Google::Apis::ConnectorsV2::Entity
234
+ command.params['parent'] = parent unless parent.nil?
235
+ command.query['fields'] = fields unless fields.nil?
236
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
237
+ execute_or_queue_command(command, &block)
238
+ end
239
+
240
+ # Deletes an existing entity row matching the entity type and entity id
241
+ # specified in the request.
242
+ # @param [String] name
243
+ # Required. Resource name of the Entity Type. Format: projects/`project`/
244
+ # locations/`location`/connections/`connection`/entityTypes/`type`/entities/`id`
245
+ # @param [String] fields
246
+ # Selector specifying which fields to include in a partial response.
247
+ # @param [String] quota_user
248
+ # Available to use for quota purposes for server-side applications. Can be any
249
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
250
+ # @param [Google::Apis::RequestOptions] options
251
+ # Request-specific options
252
+ #
253
+ # @yield [result, err] Result & error if block supplied
254
+ # @yieldparam result [Google::Apis::ConnectorsV2::Empty] parsed result object
255
+ # @yieldparam err [StandardError] error object if request failed
256
+ #
257
+ # @return [Google::Apis::ConnectorsV2::Empty]
258
+ #
259
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
260
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
261
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
262
+ def delete_project_location_connection_entity_type_entity(name, fields: nil, quota_user: nil, options: nil, &block)
263
+ command = make_simple_command(:delete, 'v2/{+name}', options)
264
+ command.response_representation = Google::Apis::ConnectorsV2::Empty::Representation
265
+ command.response_class = Google::Apis::ConnectorsV2::Empty
266
+ command.params['name'] = name unless name.nil?
267
+ command.query['fields'] = fields unless fields.nil?
268
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
269
+ execute_or_queue_command(command, &block)
270
+ end
271
+
272
+ # Deletes entities based on conditions specified in the request and not on
273
+ # entity id.
274
+ # @param [String] entity_type
275
+ # Required. Resource name of the Entity Type. Format: projects/`project`/
276
+ # locations/`location`/connections/`connection`/entityTypes/`type`
277
+ # @param [String] conditions
278
+ # Required. Conditions to be used when deleting entities. From a proto
279
+ # standpoint, There are no restrictions on what can be passed using this field.
280
+ # The connector documentation should have information about what format of
281
+ # filters/conditions are supported. Note: If this conditions field is left empty,
282
+ # an exception is thrown. We don't want to consider 'empty conditions' to be a
283
+ # match-all case. Connector developers can determine and document what a match-
284
+ # all case constraint would be.
285
+ # @param [String] fields
286
+ # Selector specifying which fields to include in a partial response.
287
+ # @param [String] quota_user
288
+ # Available to use for quota purposes for server-side applications. Can be any
289
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
290
+ # @param [Google::Apis::RequestOptions] options
291
+ # Request-specific options
292
+ #
293
+ # @yield [result, err] Result & error if block supplied
294
+ # @yieldparam result [Google::Apis::ConnectorsV2::Empty] parsed result object
295
+ # @yieldparam err [StandardError] error object if request failed
296
+ #
297
+ # @return [Google::Apis::ConnectorsV2::Empty]
298
+ #
299
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
300
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
301
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
302
+ def delete_project_location_connection_entity_type_entity_entities_with_conditions(entity_type, conditions: nil, fields: nil, quota_user: nil, options: nil, &block)
303
+ command = make_simple_command(:post, 'v2/{+entityType}/entities:deleteEntitiesWithConditions', options)
304
+ command.response_representation = Google::Apis::ConnectorsV2::Empty::Representation
305
+ command.response_class = Google::Apis::ConnectorsV2::Empty
306
+ command.params['entityType'] = entity_type unless entity_type.nil?
307
+ command.query['conditions'] = conditions unless conditions.nil?
308
+ command.query['fields'] = fields unless fields.nil?
309
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
310
+ execute_or_queue_command(command, &block)
311
+ end
312
+
313
+ # Gets a single entity row matching the entity type and entity id specified in
314
+ # the request.
315
+ # @param [String] name
316
+ # Required. Resource name of the Entity Type. Format: projects/`project`/
317
+ # locations/`location`/connections/`connection`/entityTypes/`type`/entities/`id`
318
+ # @param [String] fields
319
+ # Selector specifying which fields to include in a partial response.
320
+ # @param [String] quota_user
321
+ # Available to use for quota purposes for server-side applications. Can be any
322
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
323
+ # @param [Google::Apis::RequestOptions] options
324
+ # Request-specific options
325
+ #
326
+ # @yield [result, err] Result & error if block supplied
327
+ # @yieldparam result [Google::Apis::ConnectorsV2::Entity] parsed result object
328
+ # @yieldparam err [StandardError] error object if request failed
329
+ #
330
+ # @return [Google::Apis::ConnectorsV2::Entity]
331
+ #
332
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
333
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
334
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
335
+ def get_project_location_connection_entity_type_entity(name, fields: nil, quota_user: nil, options: nil, &block)
336
+ command = make_simple_command(:get, 'v2/{+name}', options)
337
+ command.response_representation = Google::Apis::ConnectorsV2::Entity::Representation
338
+ command.response_class = Google::Apis::ConnectorsV2::Entity
339
+ command.params['name'] = name unless name.nil?
340
+ command.query['fields'] = fields unless fields.nil?
341
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
342
+ execute_or_queue_command(command, &block)
343
+ end
344
+
345
+ # Lists entity rows of a particular entity type contained in the request. Note:
346
+ # 1. Currently, only max of one 'sort_by' column is supported. 2. If no 'sort_by'
347
+ # column is provided, the primary key of the table is used. If zero or more
348
+ # than one primary key is available, we default to the unpaginated list entities
349
+ # logic which only returns the first page. 3. The values of the 'sort_by'
350
+ # columns must uniquely identify an entity row, otherwise undefined behaviors
351
+ # may be observed during pagination. 4. Since transactions are not supported,
352
+ # any updates, inserts or deletes during pagination can lead to stale data being
353
+ # returned or other unexpected behaviors.
354
+ # @param [String] parent
355
+ # Required. Resource name of the Entity Type. Format: projects/`project`/
356
+ # locations/`location`/connections/`connection`/entityTypes/`type`
357
+ # @param [String] conditions
358
+ # Conditions to be used when listing entities. From a proto standpoint, There
359
+ # are no restrictions on what can be passed using this field. The connector
360
+ # documentation should have information about what format of filters/conditions
361
+ # are supported.
362
+ # @param [Fixnum] page_size
363
+ # Number of entity rows to return. Defaults page size = 25. Max page size = 200.
364
+ # @param [String] page_token
365
+ # Page token value if available from a previous request.
366
+ # @param [Array<String>, String] sort_by
367
+ # List of 'sort_by' columns to use when returning the results.
368
+ # @param [String] fields
369
+ # Selector specifying which fields to include in a partial response.
370
+ # @param [String] quota_user
371
+ # Available to use for quota purposes for server-side applications. Can be any
372
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
373
+ # @param [Google::Apis::RequestOptions] options
374
+ # Request-specific options
375
+ #
376
+ # @yield [result, err] Result & error if block supplied
377
+ # @yieldparam result [Google::Apis::ConnectorsV2::ListEntitiesResponse] parsed result object
378
+ # @yieldparam err [StandardError] error object if request failed
379
+ #
380
+ # @return [Google::Apis::ConnectorsV2::ListEntitiesResponse]
381
+ #
382
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
383
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
384
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
385
+ def list_project_location_connection_entity_type_entities(parent, conditions: nil, page_size: nil, page_token: nil, sort_by: nil, fields: nil, quota_user: nil, options: nil, &block)
386
+ command = make_simple_command(:get, 'v2/{+parent}/entities', options)
387
+ command.response_representation = Google::Apis::ConnectorsV2::ListEntitiesResponse::Representation
388
+ command.response_class = Google::Apis::ConnectorsV2::ListEntitiesResponse
389
+ command.params['parent'] = parent unless parent.nil?
390
+ command.query['conditions'] = conditions unless conditions.nil?
391
+ command.query['pageSize'] = page_size unless page_size.nil?
392
+ command.query['pageToken'] = page_token unless page_token.nil?
393
+ command.query['sortBy'] = sort_by unless sort_by.nil?
394
+ command.query['fields'] = fields unless fields.nil?
395
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
396
+ execute_or_queue_command(command, &block)
397
+ end
398
+
399
+ # Updates an existing entity row matching the entity type and entity id
400
+ # specified in the request. The fields in the entity row that need to be
401
+ # modified are contained in the body of the request. All unspecified fields are
402
+ # left unchanged. The response message contains a `Entity` message object
403
+ # returned as a response by the external system.
404
+ # @param [String] name
405
+ # Output only. Resource name of the Entity. Format: projects/`project`/locations/
406
+ # `location`/connections/`connection`/entityTypes/`type`/entities/`id`
407
+ # @param [Google::Apis::ConnectorsV2::Entity] entity_object
408
+ # @param [String] fields
409
+ # Selector specifying which fields to include in a partial response.
410
+ # @param [String] quota_user
411
+ # Available to use for quota purposes for server-side applications. Can be any
412
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
413
+ # @param [Google::Apis::RequestOptions] options
414
+ # Request-specific options
415
+ #
416
+ # @yield [result, err] Result & error if block supplied
417
+ # @yieldparam result [Google::Apis::ConnectorsV2::Entity] parsed result object
418
+ # @yieldparam err [StandardError] error object if request failed
419
+ #
420
+ # @return [Google::Apis::ConnectorsV2::Entity]
421
+ #
422
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
423
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
424
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
425
+ def patch_project_location_connection_entity_type_entity(name, entity_object = nil, fields: nil, quota_user: nil, options: nil, &block)
426
+ command = make_simple_command(:patch, 'v2/{+name}', options)
427
+ command.request_representation = Google::Apis::ConnectorsV2::Entity::Representation
428
+ command.request_object = entity_object
429
+ command.response_representation = Google::Apis::ConnectorsV2::Entity::Representation
430
+ command.response_class = Google::Apis::ConnectorsV2::Entity
431
+ command.params['name'] = name unless name.nil?
432
+ command.query['fields'] = fields unless fields.nil?
433
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
434
+ execute_or_queue_command(command, &block)
435
+ end
436
+
437
+ # Updates entities based on conditions specified in the request and not on
438
+ # entity id.
439
+ # @param [String] entity_type
440
+ # Required. Resource name of the Entity Type. Format: projects/`project`/
441
+ # locations/`location`/connections/`connection`/entityTypes/`type`
442
+ # @param [Google::Apis::ConnectorsV2::Entity] entity_object
443
+ # @param [String] conditions
444
+ # Required. Conditions to be used when updating entities. From a proto
445
+ # standpoint, There are no restrictions on what can be passed using this field.
446
+ # The connector documentation should have information about what format of
447
+ # filters/conditions are supported. Note: If this conditions field is left empty,
448
+ # an exception is thrown. We don't want to consider 'empty conditions' to be a
449
+ # match-all case. Connector developers can determine and document what a match-
450
+ # all case constraint would be.
451
+ # @param [String] fields
452
+ # Selector specifying which fields to include in a partial response.
453
+ # @param [String] quota_user
454
+ # Available to use for quota purposes for server-side applications. Can be any
455
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
456
+ # @param [Google::Apis::RequestOptions] options
457
+ # Request-specific options
458
+ #
459
+ # @yield [result, err] Result & error if block supplied
460
+ # @yieldparam result [Google::Apis::ConnectorsV2::UpdateEntitiesWithConditionsResponse] parsed result object
461
+ # @yieldparam err [StandardError] error object if request failed
462
+ #
463
+ # @return [Google::Apis::ConnectorsV2::UpdateEntitiesWithConditionsResponse]
464
+ #
465
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
466
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
467
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
468
+ def update_project_location_connection_entity_type_entity_entities_with_conditions(entity_type, entity_object = nil, conditions: nil, fields: nil, quota_user: nil, options: nil, &block)
469
+ command = make_simple_command(:post, 'v2/{+entityType}/entities:updateEntitiesWithConditions', options)
470
+ command.request_representation = Google::Apis::ConnectorsV2::Entity::Representation
471
+ command.request_object = entity_object
472
+ command.response_representation = Google::Apis::ConnectorsV2::UpdateEntitiesWithConditionsResponse::Representation
473
+ command.response_class = Google::Apis::ConnectorsV2::UpdateEntitiesWithConditionsResponse
474
+ command.params['entityType'] = entity_type unless entity_type.nil?
475
+ command.query['conditions'] = conditions unless conditions.nil?
476
+ command.query['fields'] = fields unless fields.nil?
477
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
478
+ execute_or_queue_command(command, &block)
479
+ end
480
+
481
+ protected
482
+
483
+ def apply_command_defaults(command)
484
+ command.query['key'] = key unless key.nil?
485
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
486
+ end
487
+ end
488
+ end
489
+ end
490
+ end
@@ -0,0 +1,37 @@
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/connectors_v2/service.rb'
16
+ require 'google/apis/connectors_v2/classes.rb'
17
+ require 'google/apis/connectors_v2/representations.rb'
18
+ require 'google/apis/connectors_v2/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Connectors API
23
+ #
24
+ # Enables users to create and manage connections to Google Cloud services and
25
+ # third-party business applications using the Connectors interface.
26
+ #
27
+ # @see https://cloud.google.com/apigee/docs/api-platform/connectors/about-connectors
28
+ module ConnectorsV2
29
+ # Version of the Connectors API this client connects to.
30
+ # This is NOT the gem version.
31
+ VERSION = 'V2'
32
+
33
+ # See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
34
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,15 @@
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/connectors_v2"
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google-apis-connectors_v2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Google LLC
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-08-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: google-apis-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.7'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 2.a
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.7'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 2.a
33
+ description: This is the simple REST client for Connectors API V2. Simple REST clients
34
+ are Ruby client libraries that provide access to Google services via their HTTP
35
+ REST API endpoints. These libraries are generated and updated automatically based
36
+ on the discovery documents published by the service, and they handle most concerns
37
+ such as authentication, pagination, retry, timeouts, and logging. You can use this
38
+ client to access the Connectors API, but note that some services may provide a separate
39
+ modern client that is easier to use.
40
+ email: googleapis-packages@google.com
41
+ executables: []
42
+ extensions: []
43
+ extra_rdoc_files: []
44
+ files:
45
+ - ".yardopts"
46
+ - CHANGELOG.md
47
+ - LICENSE.md
48
+ - OVERVIEW.md
49
+ - lib/google-apis-connectors_v2.rb
50
+ - lib/google/apis/connectors_v2.rb
51
+ - lib/google/apis/connectors_v2/classes.rb
52
+ - lib/google/apis/connectors_v2/gem_version.rb
53
+ - lib/google/apis/connectors_v2/representations.rb
54
+ - lib/google/apis/connectors_v2/service.rb
55
+ homepage: https://github.com/google/google-api-ruby-client
56
+ licenses:
57
+ - Apache-2.0
58
+ metadata:
59
+ bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
+ changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-connectors_v2/CHANGELOG.md
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-connectors_v2/v0.1.0
62
+ source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-connectors_v2
63
+ post_install_message:
64
+ rdoc_options: []
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '2.5'
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubygems_version: 3.3.14
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: Simple REST client for Connectors API V2
82
+ test_files: []