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,514 @@
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 ConnectorsV2
24
+
25
+ # Action message contains metadata information about a single action present in
26
+ # the external system.
27
+ class Action
28
+ include Google::Apis::Core::Hashable
29
+
30
+ # List containing input parameter metadata.
31
+ # Corresponds to the JSON property `inputParameters`
32
+ # @return [Array<Google::Apis::ConnectorsV2::InputParameter>]
33
+ attr_accessor :input_parameters
34
+
35
+ # Name of the action.
36
+ # Corresponds to the JSON property `name`
37
+ # @return [String]
38
+ attr_accessor :name
39
+
40
+ # List containing the metadata of result fields.
41
+ # Corresponds to the JSON property `resultMetadata`
42
+ # @return [Array<Google::Apis::ConnectorsV2::ResultMetadata>]
43
+ attr_accessor :result_metadata
44
+
45
+ def initialize(**args)
46
+ update!(**args)
47
+ end
48
+
49
+ # Update properties of this object
50
+ def update!(**args)
51
+ @input_parameters = args[:input_parameters] if args.key?(:input_parameters)
52
+ @name = args[:name] if args.key?(:name)
53
+ @result_metadata = args[:result_metadata] if args.key?(:result_metadata)
54
+ end
55
+ end
56
+
57
+ # A generic empty message that you can re-use to avoid defining duplicated empty
58
+ # messages in your APIs. A typical example is to use it as the request or the
59
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
60
+ # protobuf.Empty) returns (google.protobuf.Empty); `
61
+ class Empty
62
+ include Google::Apis::Core::Hashable
63
+
64
+ def initialize(**args)
65
+ update!(**args)
66
+ end
67
+
68
+ # Update properties of this object
69
+ def update!(**args)
70
+ end
71
+ end
72
+
73
+ # 'Entity row'/ 'Entity' refers to a single row of an entity type.
74
+ class Entity
75
+ include Google::Apis::Core::Hashable
76
+
77
+ # Fields of the entity. The key is name of the field and the value contains the
78
+ # applicable `google.protobuf.Value` entry for this field.
79
+ # Corresponds to the JSON property `fields`
80
+ # @return [Hash<String,Object>]
81
+ attr_accessor :fields
82
+
83
+ # Output only. Resource name of the Entity. Format: projects/`project`/locations/
84
+ # `location`/connections/`connection`/entityTypes/`type`/entities/`id`
85
+ # Corresponds to the JSON property `name`
86
+ # @return [String]
87
+ attr_accessor :name
88
+
89
+ def initialize(**args)
90
+ update!(**args)
91
+ end
92
+
93
+ # Update properties of this object
94
+ def update!(**args)
95
+ @fields = args[:fields] if args.key?(:fields)
96
+ @name = args[:name] if args.key?(:name)
97
+ end
98
+ end
99
+
100
+ # EntityType message contains metadata information about a single entity type
101
+ # present in the external system.
102
+ class EntityType
103
+ include Google::Apis::Core::Hashable
104
+
105
+ # List containing metadata information about each field of the entity type.
106
+ # Corresponds to the JSON property `fields`
107
+ # @return [Array<Google::Apis::ConnectorsV2::Field>]
108
+ attr_accessor :fields
109
+
110
+ # The name of the entity type.
111
+ # Corresponds to the JSON property `name`
112
+ # @return [String]
113
+ attr_accessor :name
114
+
115
+ def initialize(**args)
116
+ update!(**args)
117
+ end
118
+
119
+ # Update properties of this object
120
+ def update!(**args)
121
+ @fields = args[:fields] if args.key?(:fields)
122
+ @name = args[:name] if args.key?(:name)
123
+ end
124
+ end
125
+
126
+ # Request message for ActionService.ExecuteAction
127
+ class ExecuteActionRequest
128
+ include Google::Apis::Core::Hashable
129
+
130
+ # Parameters for executing the action. The parameters can be key/value pairs or
131
+ # nested structs.
132
+ # Corresponds to the JSON property `parameters`
133
+ # @return [Hash<String,Object>]
134
+ attr_accessor :parameters
135
+
136
+ def initialize(**args)
137
+ update!(**args)
138
+ end
139
+
140
+ # Update properties of this object
141
+ def update!(**args)
142
+ @parameters = args[:parameters] if args.key?(:parameters)
143
+ end
144
+ end
145
+
146
+ # Response message for ActionService.ExecuteAction
147
+ class ExecuteActionResponse
148
+ include Google::Apis::Core::Hashable
149
+
150
+ # In the case of successful invocation of the specified action, the results
151
+ # Struct contains values based on the response of the action invoked. 1. If the
152
+ # action execution produces any entities as a result, they are returned as an
153
+ # array of Structs with the 'key' being the field name and the 'value' being the
154
+ # value of that field in each result row. ` 'results': [`'key': 'value'`, ...] `
155
+ # Corresponds to the JSON property `results`
156
+ # @return [Array<Hash<String,Object>>]
157
+ attr_accessor :results
158
+
159
+ def initialize(**args)
160
+ update!(**args)
161
+ end
162
+
163
+ # Update properties of this object
164
+ def update!(**args)
165
+ @results = args[:results] if args.key?(:results)
166
+ end
167
+ end
168
+
169
+ # An execute sql query request containing the query and the connection to
170
+ # execute it on.
171
+ class ExecuteSqlQueryRequest
172
+ include Google::Apis::Core::Hashable
173
+
174
+ # A wrapper around the SQL query statement. This is needed so that the JSON
175
+ # representation of ExecuteSqlQueryRequest has the following format: ``"query":"
176
+ # select *"``.
177
+ # Corresponds to the JSON property `query`
178
+ # @return [Google::Apis::ConnectorsV2::Query]
179
+ attr_accessor :query
180
+
181
+ def initialize(**args)
182
+ update!(**args)
183
+ end
184
+
185
+ # Update properties of this object
186
+ def update!(**args)
187
+ @query = args[:query] if args.key?(:query)
188
+ end
189
+ end
190
+
191
+ # A response returned by the connection after executing the sql query.
192
+ class ExecuteSqlQueryResponse
193
+ include Google::Apis::Core::Hashable
194
+
195
+ # In the case of successful execution of the query the response contains results
196
+ # returned by the external system. For example, the result rows of the query are
197
+ # contained in the 'results' Struct list - "results": [ ` "field1": "val1", "
198
+ # field2": "val2",.. `,.. ] Each Struct row can contain fields any type of like
199
+ # nested Structs or lists.
200
+ # Corresponds to the JSON property `results`
201
+ # @return [Array<Hash<String,Object>>]
202
+ attr_accessor :results
203
+
204
+ def initialize(**args)
205
+ update!(**args)
206
+ end
207
+
208
+ # Update properties of this object
209
+ def update!(**args)
210
+ @results = args[:results] if args.key?(:results)
211
+ end
212
+ end
213
+
214
+ # Message contains EntityType's Field metadata.
215
+ class Field
216
+ include Google::Apis::Core::Hashable
217
+
218
+ # The following map contains fields that are not explicitly mentioned above,this
219
+ # give connectors the flexibility to add new metadata fields.
220
+ # Corresponds to the JSON property `additionalDetails`
221
+ # @return [Hash<String,Object>]
222
+ attr_accessor :additional_details
223
+
224
+ # The data type of the Field.
225
+ # Corresponds to the JSON property `dataType`
226
+ # @return [String]
227
+ attr_accessor :data_type
228
+
229
+ # The following field specifies the default value of the Field provided by the
230
+ # external system if a value is not provided.
231
+ # Corresponds to the JSON property `defaultValue`
232
+ # @return [Object]
233
+ attr_accessor :default_value
234
+
235
+ # A brief description of the Field.
236
+ # Corresponds to the JSON property `description`
237
+ # @return [String]
238
+ attr_accessor :description
239
+
240
+ # The following boolean field specifies if the current Field acts as a primary
241
+ # key or id if the parent is of type entity.
242
+ # Corresponds to the JSON property `key`
243
+ # @return [Boolean]
244
+ attr_accessor :key
245
+ alias_method :key?, :key
246
+
247
+ # Name of the Field.
248
+ # Corresponds to the JSON property `name`
249
+ # @return [String]
250
+ attr_accessor :name
251
+
252
+ # Specifies whether a null value is allowed.
253
+ # Corresponds to the JSON property `nullable`
254
+ # @return [Boolean]
255
+ attr_accessor :nullable
256
+ alias_method :nullable?, :nullable
257
+
258
+ # Reference captures the association between two different entity types. Value
259
+ # links to the reference of another entity type.
260
+ # Corresponds to the JSON property `reference`
261
+ # @return [Google::Apis::ConnectorsV2::Reference]
262
+ attr_accessor :reference
263
+
264
+ def initialize(**args)
265
+ update!(**args)
266
+ end
267
+
268
+ # Update properties of this object
269
+ def update!(**args)
270
+ @additional_details = args[:additional_details] if args.key?(:additional_details)
271
+ @data_type = args[:data_type] if args.key?(:data_type)
272
+ @default_value = args[:default_value] if args.key?(:default_value)
273
+ @description = args[:description] if args.key?(:description)
274
+ @key = args[:key] if args.key?(:key)
275
+ @name = args[:name] if args.key?(:name)
276
+ @nullable = args[:nullable] if args.key?(:nullable)
277
+ @reference = args[:reference] if args.key?(:reference)
278
+ end
279
+ end
280
+
281
+ # Input Parameter message contains metadata about the parameters required for
282
+ # executing an Action.
283
+ class InputParameter
284
+ include Google::Apis::Core::Hashable
285
+
286
+ # The data type of the Parameter
287
+ # Corresponds to the JSON property `dataType`
288
+ # @return [String]
289
+ attr_accessor :data_type
290
+
291
+ # The following field specifies the default value of the Parameter provided by
292
+ # the external system if a value is not provided.
293
+ # Corresponds to the JSON property `defaultValue`
294
+ # @return [Object]
295
+ attr_accessor :default_value
296
+
297
+ # A brief description of the Parameter.
298
+ # Corresponds to the JSON property `description`
299
+ # @return [String]
300
+ attr_accessor :description
301
+
302
+ # Name of the Parameter.
303
+ # Corresponds to the JSON property `name`
304
+ # @return [String]
305
+ attr_accessor :name
306
+
307
+ # Specifies whether a null value is allowed.
308
+ # Corresponds to the JSON property `nullable`
309
+ # @return [Boolean]
310
+ attr_accessor :nullable
311
+ alias_method :nullable?, :nullable
312
+
313
+ def initialize(**args)
314
+ update!(**args)
315
+ end
316
+
317
+ # Update properties of this object
318
+ def update!(**args)
319
+ @data_type = args[:data_type] if args.key?(:data_type)
320
+ @default_value = args[:default_value] if args.key?(:default_value)
321
+ @description = args[:description] if args.key?(:description)
322
+ @name = args[:name] if args.key?(:name)
323
+ @nullable = args[:nullable] if args.key?(:nullable)
324
+ end
325
+ end
326
+
327
+ # Response message for ActionService.ListActions
328
+ class ListActionsResponse
329
+ include Google::Apis::Core::Hashable
330
+
331
+ # List of action metadata.
332
+ # Corresponds to the JSON property `actions`
333
+ # @return [Array<Google::Apis::ConnectorsV2::Action>]
334
+ attr_accessor :actions
335
+
336
+ # Next page token if more actions available.
337
+ # Corresponds to the JSON property `nextPageToken`
338
+ # @return [String]
339
+ attr_accessor :next_page_token
340
+
341
+ # List of actions which contain unsupported Datatypes. Check datatype.proto for
342
+ # more information.
343
+ # Corresponds to the JSON property `unsupportedActionNames`
344
+ # @return [Array<String>]
345
+ attr_accessor :unsupported_action_names
346
+
347
+ def initialize(**args)
348
+ update!(**args)
349
+ end
350
+
351
+ # Update properties of this object
352
+ def update!(**args)
353
+ @actions = args[:actions] if args.key?(:actions)
354
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
355
+ @unsupported_action_names = args[:unsupported_action_names] if args.key?(:unsupported_action_names)
356
+ end
357
+ end
358
+
359
+ # Response message for EntityService.ListEntities
360
+ class ListEntitiesResponse
361
+ include Google::Apis::Core::Hashable
362
+
363
+ # List containing entity rows.
364
+ # Corresponds to the JSON property `entities`
365
+ # @return [Array<Google::Apis::ConnectorsV2::Entity>]
366
+ attr_accessor :entities
367
+
368
+ # Next page token if more records are available.
369
+ # Corresponds to the JSON property `nextPageToken`
370
+ # @return [String]
371
+ attr_accessor :next_page_token
372
+
373
+ def initialize(**args)
374
+ update!(**args)
375
+ end
376
+
377
+ # Update properties of this object
378
+ def update!(**args)
379
+ @entities = args[:entities] if args.key?(:entities)
380
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
381
+ end
382
+ end
383
+
384
+ # Response message for EntityService.ListEntityTypes
385
+ class ListEntityTypesResponse
386
+ include Google::Apis::Core::Hashable
387
+
388
+ # Next page token if more entity types available.
389
+ # Corresponds to the JSON property `nextPageToken`
390
+ # @return [String]
391
+ attr_accessor :next_page_token
392
+
393
+ # List of metadata related to all entity types.
394
+ # Corresponds to the JSON property `types`
395
+ # @return [Array<Google::Apis::ConnectorsV2::EntityType>]
396
+ attr_accessor :types
397
+
398
+ # List of entity type names which contain unsupported Datatypes. Check datatype.
399
+ # proto for more information.
400
+ # Corresponds to the JSON property `unsupportedTypeNames`
401
+ # @return [Array<String>]
402
+ attr_accessor :unsupported_type_names
403
+
404
+ def initialize(**args)
405
+ update!(**args)
406
+ end
407
+
408
+ # Update properties of this object
409
+ def update!(**args)
410
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
411
+ @types = args[:types] if args.key?(:types)
412
+ @unsupported_type_names = args[:unsupported_type_names] if args.key?(:unsupported_type_names)
413
+ end
414
+ end
415
+
416
+ # A wrapper around the SQL query statement. This is needed so that the JSON
417
+ # representation of ExecuteSqlQueryRequest has the following format: ``"query":"
418
+ # select *"``.
419
+ class Query
420
+ include Google::Apis::Core::Hashable
421
+
422
+ # Required. Sql query to execute.
423
+ # Corresponds to the JSON property `query`
424
+ # @return [String]
425
+ attr_accessor :query
426
+
427
+ def initialize(**args)
428
+ update!(**args)
429
+ end
430
+
431
+ # Update properties of this object
432
+ def update!(**args)
433
+ @query = args[:query] if args.key?(:query)
434
+ end
435
+ end
436
+
437
+ #
438
+ class Reference
439
+ include Google::Apis::Core::Hashable
440
+
441
+ # Name of the reference field.
442
+ # Corresponds to the JSON property `name`
443
+ # @return [String]
444
+ attr_accessor :name
445
+
446
+ # Name of reference entity type.
447
+ # Corresponds to the JSON property `type`
448
+ # @return [String]
449
+ attr_accessor :type
450
+
451
+ def initialize(**args)
452
+ update!(**args)
453
+ end
454
+
455
+ # Update properties of this object
456
+ def update!(**args)
457
+ @name = args[:name] if args.key?(:name)
458
+ @type = args[:type] if args.key?(:type)
459
+ end
460
+ end
461
+
462
+ # Result Metadata message contains metadata about the result returned after
463
+ # executing an Action.
464
+ class ResultMetadata
465
+ include Google::Apis::Core::Hashable
466
+
467
+ # The data type of the metadata field
468
+ # Corresponds to the JSON property `dataType`
469
+ # @return [String]
470
+ attr_accessor :data_type
471
+
472
+ # A brief description of the metadata field.
473
+ # Corresponds to the JSON property `description`
474
+ # @return [String]
475
+ attr_accessor :description
476
+
477
+ # Name of the metadata field.
478
+ # Corresponds to the JSON property `name`
479
+ # @return [String]
480
+ attr_accessor :name
481
+
482
+ def initialize(**args)
483
+ update!(**args)
484
+ end
485
+
486
+ # Update properties of this object
487
+ def update!(**args)
488
+ @data_type = args[:data_type] if args.key?(:data_type)
489
+ @description = args[:description] if args.key?(:description)
490
+ @name = args[:name] if args.key?(:name)
491
+ end
492
+ end
493
+
494
+ # Response message for EntityService.UpdateEntitiesWithConditions
495
+ class UpdateEntitiesWithConditionsResponse
496
+ include Google::Apis::Core::Hashable
497
+
498
+ # Response returned by the external system.
499
+ # Corresponds to the JSON property `response`
500
+ # @return [Hash<String,Object>]
501
+ attr_accessor :response
502
+
503
+ def initialize(**args)
504
+ update!(**args)
505
+ end
506
+
507
+ # Update properties of this object
508
+ def update!(**args)
509
+ @response = args[:response] if args.key?(:response)
510
+ end
511
+ end
512
+ end
513
+ end
514
+ end
@@ -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 ConnectorsV2
18
+ # Version of the google-apis-connectors_v2 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.9.0"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20220808"
26
+ end
27
+ end
28
+ end