File: classes.rb

package info (click to toggle)
ruby-google-api-client 0.53.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 75,020 kB
  • sloc: ruby: 626,567; makefile: 4
file content (481 lines) | stat: -rw-r--r-- 16,667 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'

module Google
  module Apis
    module Area120tablesV1alpha1
      
      # Request message for TablesService.BatchCreateRows.
      class BatchCreateRowsRequest
        include Google::Apis::Core::Hashable
      
        # Required. The request message specifying the rows to create. A maximum of 500
        # rows can be created in a single batch.
        # Corresponds to the JSON property `requests`
        # @return [Array<Google::Apis::Area120tablesV1alpha1::CreateRowRequest>]
        attr_accessor :requests
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @requests = args[:requests] if args.key?(:requests)
        end
      end
      
      # Response message for TablesService.BatchCreateRows.
      class BatchCreateRowsResponse
        include Google::Apis::Core::Hashable
      
        # The created rows.
        # Corresponds to the JSON property `rows`
        # @return [Array<Google::Apis::Area120tablesV1alpha1::Row>]
        attr_accessor :rows
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @rows = args[:rows] if args.key?(:rows)
        end
      end
      
      # Request message for TablesService.BatchUpdateRows.
      class BatchUpdateRowsRequest
        include Google::Apis::Core::Hashable
      
        # Required. The request messages specifying the rows to update. A maximum of 500
        # rows can be modified in a single batch.
        # Corresponds to the JSON property `requests`
        # @return [Array<Google::Apis::Area120tablesV1alpha1::UpdateRowRequest>]
        attr_accessor :requests
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @requests = args[:requests] if args.key?(:requests)
        end
      end
      
      # Response message for TablesService.BatchUpdateRows.
      class BatchUpdateRowsResponse
        include Google::Apis::Core::Hashable
      
        # The updated rows.
        # Corresponds to the JSON property `rows`
        # @return [Array<Google::Apis::Area120tablesV1alpha1::Row>]
        attr_accessor :rows
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @rows = args[:rows] if args.key?(:rows)
        end
      end
      
      # Details on a column in the table.
      class ColumnDescription
        include Google::Apis::Core::Hashable
      
        # Data type of the column Supported types are auto_id, boolean, boolean_list,
        # creator, create_timestamp, date, dropdown, location, integer, integer_list,
        # number, number_list, person, person_list, tags, check_list, text, text_list,
        # update_timestamp, updater, relationship, file_attachment_list. These types
        # directly map to the column types supported on Tables website.
        # Corresponds to the JSON property `dataType`
        # @return [String]
        attr_accessor :data_type
      
        # Internal id for a column.
        # Corresponds to the JSON property `id`
        # @return [String]
        attr_accessor :id
      
        # Optional. Range of labeled values for the column. Some columns like tags and
        # drop-downs limit the values to a set of possible values. We return the range
        # of values in such cases to help clients implement better user data validation.
        # Corresponds to the JSON property `labels`
        # @return [Array<Google::Apis::Area120tablesV1alpha1::LabeledItem>]
        attr_accessor :labels
      
        # Details about a lookup column whose value comes from the associated
        # relationship.
        # Corresponds to the JSON property `lookupDetails`
        # @return [Google::Apis::Area120tablesV1alpha1::LookupDetails]
        attr_accessor :lookup_details
      
        # column name
        # Corresponds to the JSON property `name`
        # @return [String]
        attr_accessor :name
      
        # Details about a relationship column.
        # Corresponds to the JSON property `relationshipDetails`
        # @return [Google::Apis::Area120tablesV1alpha1::RelationshipDetails]
        attr_accessor :relationship_details
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @data_type = args[:data_type] if args.key?(:data_type)
          @id = args[:id] if args.key?(:id)
          @labels = args[:labels] if args.key?(:labels)
          @lookup_details = args[:lookup_details] if args.key?(:lookup_details)
          @name = args[:name] if args.key?(:name)
          @relationship_details = args[:relationship_details] if args.key?(:relationship_details)
        end
      end
      
      # Request message for TablesService.CreateRow.
      class CreateRowRequest
        include Google::Apis::Core::Hashable
      
        # Required. The parent table where this row will be created. Format: tables/`
        # table`
        # Corresponds to the JSON property `parent`
        # @return [String]
        attr_accessor :parent
      
        # A single row in a table.
        # Corresponds to the JSON property `row`
        # @return [Google::Apis::Area120tablesV1alpha1::Row]
        attr_accessor :row
      
        # Optional. Column key to use for values in the row. Defaults to user entered
        # name.
        # Corresponds to the JSON property `view`
        # @return [String]
        attr_accessor :view
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @parent = args[:parent] if args.key?(:parent)
          @row = args[:row] if args.key?(:row)
          @view = args[:view] if args.key?(:view)
        end
      end
      
      # A generic empty message that you can re-use to avoid defining duplicated empty
      # messages in your APIs. A typical example is to use it as the request or the
      # response type of an API method. For instance: service Foo ` rpc Bar(google.
      # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
      # `Empty` is empty JSON object ````.
      class Empty
        include Google::Apis::Core::Hashable
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
        end
      end
      
      # A single item in a labeled column.
      class LabeledItem
        include Google::Apis::Core::Hashable
      
        # Internal id associated with the item.
        # Corresponds to the JSON property `id`
        # @return [String]
        attr_accessor :id
      
        # Display string as entered by user.
        # Corresponds to the JSON property `name`
        # @return [String]
        attr_accessor :name
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @id = args[:id] if args.key?(:id)
          @name = args[:name] if args.key?(:name)
        end
      end
      
      # Response message for TablesService.ListRows.
      class ListRowsResponse
        include Google::Apis::Core::Hashable
      
        # A token, which can be sent as `page_token` to retrieve the next page. If this
        # field is empty, there are no subsequent pages.
        # Corresponds to the JSON property `nextPageToken`
        # @return [String]
        attr_accessor :next_page_token
      
        # The rows from the specified table.
        # Corresponds to the JSON property `rows`
        # @return [Array<Google::Apis::Area120tablesV1alpha1::Row>]
        attr_accessor :rows
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
          @rows = args[:rows] if args.key?(:rows)
        end
      end
      
      # Response message for TablesService.ListTables.
      class ListTablesResponse
        include Google::Apis::Core::Hashable
      
        # A token, which can be sent as `page_token` to retrieve the next page. If this
        # field is empty, there are no subsequent pages.
        # Corresponds to the JSON property `nextPageToken`
        # @return [String]
        attr_accessor :next_page_token
      
        # The list of tables.
        # Corresponds to the JSON property `tables`
        # @return [Array<Google::Apis::Area120tablesV1alpha1::Table>]
        attr_accessor :tables
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
          @tables = args[:tables] if args.key?(:tables)
        end
      end
      
      # Response message for TablesService.ListWorkspaces.
      class ListWorkspacesResponse
        include Google::Apis::Core::Hashable
      
        # A token, which can be sent as `page_token` to retrieve the next page. If this
        # field is empty, there are no subsequent pages.
        # Corresponds to the JSON property `nextPageToken`
        # @return [String]
        attr_accessor :next_page_token
      
        # The list of workspaces.
        # Corresponds to the JSON property `workspaces`
        # @return [Array<Google::Apis::Area120tablesV1alpha1::Workspace>]
        attr_accessor :workspaces
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
          @workspaces = args[:workspaces] if args.key?(:workspaces)
        end
      end
      
      # Details about a lookup column whose value comes from the associated
      # relationship.
      class LookupDetails
        include Google::Apis::Core::Hashable
      
        # The name of the relationship column associated with the lookup.
        # Corresponds to the JSON property `relationshipColumn`
        # @return [String]
        attr_accessor :relationship_column
      
        # The id of the relationship column.
        # Corresponds to the JSON property `relationshipColumnId`
        # @return [String]
        attr_accessor :relationship_column_id
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @relationship_column = args[:relationship_column] if args.key?(:relationship_column)
          @relationship_column_id = args[:relationship_column_id] if args.key?(:relationship_column_id)
        end
      end
      
      # Details about a relationship column.
      class RelationshipDetails
        include Google::Apis::Core::Hashable
      
        # The name of the table this relationship is linked to.
        # Corresponds to the JSON property `linkedTable`
        # @return [String]
        attr_accessor :linked_table
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @linked_table = args[:linked_table] if args.key?(:linked_table)
        end
      end
      
      # A single row in a table.
      class Row
        include Google::Apis::Core::Hashable
      
        # The resource name of the row. Row names have the form `tables/`table`/rows/`
        # row``. The name is ignored when creating a row.
        # Corresponds to the JSON property `name`
        # @return [String]
        attr_accessor :name
      
        # The values of the row. This is a map of column key to value. Key is user
        # entered name(default) or the internal column id based on the view in the
        # request.
        # Corresponds to the JSON property `values`
        # @return [Hash<String,Object>]
        attr_accessor :values
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @name = args[:name] if args.key?(:name)
          @values = args[:values] if args.key?(:values)
        end
      end
      
      # A single table.
      class Table
        include Google::Apis::Core::Hashable
      
        # List of columns in this table. Order of columns matches the display order.
        # Corresponds to the JSON property `columns`
        # @return [Array<Google::Apis::Area120tablesV1alpha1::ColumnDescription>]
        attr_accessor :columns
      
        # The human readable title of the table.
        # Corresponds to the JSON property `displayName`
        # @return [String]
        attr_accessor :display_name
      
        # The resource name of the table. Table names have the form `tables/`table``.
        # Corresponds to the JSON property `name`
        # @return [String]
        attr_accessor :name
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @columns = args[:columns] if args.key?(:columns)
          @display_name = args[:display_name] if args.key?(:display_name)
          @name = args[:name] if args.key?(:name)
        end
      end
      
      # Request message for TablesService.UpdateRow.
      class UpdateRowRequest
        include Google::Apis::Core::Hashable
      
        # A single row in a table.
        # Corresponds to the JSON property `row`
        # @return [Google::Apis::Area120tablesV1alpha1::Row]
        attr_accessor :row
      
        # The list of fields to update.
        # Corresponds to the JSON property `updateMask`
        # @return [String]
        attr_accessor :update_mask
      
        # Optional. Column key to use for values in the row. Defaults to user entered
        # name.
        # Corresponds to the JSON property `view`
        # @return [String]
        attr_accessor :view
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @row = args[:row] if args.key?(:row)
          @update_mask = args[:update_mask] if args.key?(:update_mask)
          @view = args[:view] if args.key?(:view)
        end
      end
      
      # A single workspace.
      class Workspace
        include Google::Apis::Core::Hashable
      
        # The human readable title of the workspace.
        # Corresponds to the JSON property `displayName`
        # @return [String]
        attr_accessor :display_name
      
        # The resource name of the workspace. Workspace names have the form `workspaces/`
        # workspace``.
        # Corresponds to the JSON property `name`
        # @return [String]
        attr_accessor :name
      
        # The list of tables in the workspace.
        # Corresponds to the JSON property `tables`
        # @return [Array<Google::Apis::Area120tablesV1alpha1::Table>]
        attr_accessor :tables
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @display_name = args[:display_name] if args.key?(:display_name)
          @name = args[:name] if args.key?(:name)
          @tables = args[:tables] if args.key?(:tables)
        end
      end
    end
  end
end