google-api-client 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/README.md +34 -0
  4. data/api_names.yaml +3 -0
  5. data/api_names_out.yaml +1058 -20
  6. data/bin/generate-api +1 -1
  7. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  8. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +203 -6
  9. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +78 -0
  10. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +36 -0
  11. data/generated/google/apis/admin_directory_v1.rb +1 -1
  12. data/generated/google/apis/adsense_v1_4.rb +1 -1
  13. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  14. data/generated/google/apis/androidenterprise_v1.rb +2 -3
  15. data/generated/google/apis/androidenterprise_v1/classes.rb +11 -4
  16. data/generated/google/apis/androidenterprise_v1/representations.rb +1 -0
  17. data/generated/google/apis/androidenterprise_v1/service.rb +5 -6
  18. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  19. data/generated/google/apis/androidpublisher_v2/classes.rb +47 -0
  20. data/generated/google/apis/androidpublisher_v2/representations.rb +6 -0
  21. data/generated/google/apis/appengine_v1beta5.rb +2 -3
  22. data/generated/google/apis/appengine_v1beta5/classes.rb +143 -8
  23. data/generated/google/apis/appengine_v1beta5/representations.rb +42 -0
  24. data/generated/google/apis/appengine_v1beta5/service.rb +48 -6
  25. data/generated/google/apis/appstate_v1.rb +1 -1
  26. data/generated/google/apis/bigquery_v2.rb +1 -1
  27. data/generated/google/apis/bigquery_v2/classes.rb +68 -14
  28. data/generated/google/apis/bigquery_v2/representations.rb +30 -0
  29. data/generated/google/apis/books_v1.rb +1 -1
  30. data/generated/google/apis/books_v1/classes.rb +68 -3
  31. data/generated/google/apis/books_v1/representations.rb +21 -0
  32. data/generated/google/apis/calendar_v3.rb +2 -2
  33. data/generated/google/apis/calendar_v3/service.rb +1 -1
  34. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  35. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  36. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  37. data/generated/google/apis/cloudresourcemanager_v1/service.rb +2 -2
  38. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  39. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +2 -2
  40. data/generated/google/apis/clouduseraccounts_beta.rb +1 -1
  41. data/generated/google/apis/clouduseraccounts_beta/classes.rb +1 -1
  42. data/generated/google/apis/compute_beta.rb +1 -1
  43. data/generated/google/apis/compute_beta/classes.rb +138 -108
  44. data/generated/google/apis/compute_beta/representations.rb +16 -18
  45. data/generated/google/apis/compute_beta/service.rb +52 -2
  46. data/generated/google/apis/compute_v1.rb +1 -1
  47. data/generated/google/apis/compute_v1/classes.rb +55 -74
  48. data/generated/google/apis/compute_v1/representations.rb +14 -18
  49. data/generated/google/apis/compute_v1/service.rb +45 -1
  50. data/generated/google/apis/container_v1.rb +3 -3
  51. data/generated/google/apis/container_v1/classes.rb +200 -42
  52. data/generated/google/apis/container_v1/representations.rb +54 -0
  53. data/generated/google/apis/container_v1/service.rb +31 -30
  54. data/generated/google/apis/content_v2.rb +1 -1
  55. data/generated/google/apis/datastore_v1beta2.rb +2 -2
  56. data/generated/google/apis/datastore_v1beta2/service.rb +1 -1
  57. data/generated/google/apis/deploymentmanager_v2.rb +2 -3
  58. data/generated/google/apis/deploymentmanager_v2/classes.rb +7 -1
  59. data/generated/google/apis/deploymentmanager_v2/representations.rb +1 -0
  60. data/generated/google/apis/deploymentmanager_v2/service.rb +26 -27
  61. data/generated/google/apis/dfareporting_v2_3.rb +2 -2
  62. data/generated/google/apis/dfareporting_v2_3/classes.rb +1 -1
  63. data/generated/google/apis/dfareporting_v2_3/service.rb +2 -2
  64. data/generated/google/apis/dns_v1.rb +1 -1
  65. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  66. data/generated/google/apis/doubleclicksearch_v2/classes.rb +6 -4
  67. data/generated/google/apis/drive_v2.rb +1 -1
  68. data/generated/google/apis/drive_v2/classes.rb +10 -4
  69. data/generated/google/apis/drive_v2/representations.rb +1 -0
  70. data/generated/google/apis/drive_v3.rb +1 -1
  71. data/generated/google/apis/drive_v3/classes.rb +7 -0
  72. data/generated/google/apis/drive_v3/representations.rb +1 -0
  73. data/generated/google/apis/fusiontables_v2.rb +1 -1
  74. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  75. data/generated/google/apis/games_management_v1management.rb +1 -1
  76. data/generated/google/apis/games_v1.rb +1 -1
  77. data/generated/google/apis/genomics_v1.rb +2 -2
  78. data/generated/google/apis/genomics_v1/classes.rb +770 -82
  79. data/generated/google/apis/genomics_v1/representations.rb +287 -24
  80. data/generated/google/apis/genomics_v1/service.rb +412 -13
  81. data/generated/google/apis/gmail_v1.rb +1 -1
  82. data/generated/google/apis/groupssettings_v1.rb +1 -1
  83. data/generated/google/apis/groupssettings_v1/classes.rb +13 -6
  84. data/generated/google/apis/groupssettings_v1/representations.rb +1 -0
  85. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  86. data/generated/google/apis/identitytoolkit_v3/classes.rb +50 -0
  87. data/generated/google/apis/identitytoolkit_v3/representations.rb +10 -0
  88. data/generated/google/apis/logging_v2beta1.rb +2 -3
  89. data/generated/google/apis/logging_v2beta1/classes.rb +219 -63
  90. data/generated/google/apis/logging_v2beta1/representations.rb +24 -1
  91. data/generated/google/apis/logging_v2beta1/service.rb +25 -32
  92. data/generated/google/apis/oauth2_v2.rb +2 -2
  93. data/generated/google/apis/oauth2_v2/service.rb +1 -1
  94. data/generated/google/apis/plus_domains_v1.rb +1 -1
  95. data/generated/google/apis/plus_v1.rb +1 -1
  96. data/generated/google/apis/pubsub_v1.rb +1 -1
  97. data/generated/google/apis/pubsub_v1/classes.rb +20 -12
  98. data/generated/google/apis/pubsub_v1/service.rb +32 -35
  99. data/generated/google/apis/reseller_v1.rb +1 -1
  100. data/generated/google/apis/reseller_v1/classes.rb +23 -9
  101. data/generated/google/apis/reseller_v1/representations.rb +2 -0
  102. data/generated/google/apis/sheets_v1.rb +43 -0
  103. data/generated/google/apis/sheets_v1/classes.rb +4542 -0
  104. data/generated/google/apis/sheets_v1/representations.rb +1703 -0
  105. data/generated/google/apis/sheets_v1/service.rb +363 -0
  106. data/generated/google/apis/sqladmin_v1beta4.rb +3 -2
  107. data/generated/google/apis/sqladmin_v1beta4/classes.rb +4 -3
  108. data/generated/google/apis/sqladmin_v1beta4/service.rb +2 -1
  109. data/generated/google/apis/storage_v1.rb +1 -1
  110. data/generated/google/apis/vision_v1.rb +2 -2
  111. data/generated/google/apis/vision_v1/classes.rb +11 -11
  112. data/generated/google/apis/vision_v1/service.rb +1 -1
  113. data/generated/google/apis/webmasters_v3.rb +2 -2
  114. data/generated/google/apis/webmasters_v3/classes.rb +7 -0
  115. data/generated/google/apis/webmasters_v3/representations.rb +1 -0
  116. data/generated/google/apis/webmasters_v3/service.rb +1 -1
  117. data/generated/google/apis/youtube_partner_v1.rb +37 -0
  118. data/generated/google/apis/youtube_partner_v1/classes.rb +3656 -0
  119. data/generated/google/apis/youtube_partner_v1/representations.rb +1452 -0
  120. data/generated/google/apis/youtube_partner_v1/service.rb +3165 -0
  121. data/generated/google/apis/youtube_v3.rb +3 -2
  122. data/generated/google/apis/youtube_v3/classes.rb +100 -3
  123. data/generated/google/apis/youtube_v3/representations.rb +50 -0
  124. data/generated/google/apis/youtube_v3/service.rb +2 -1
  125. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  126. data/generated/google/apis/youtubereporting_v1/classes.rb +17 -0
  127. data/generated/google/apis/youtubereporting_v1/representations.rb +2 -0
  128. data/generated/google/apis/youtubereporting_v1/service.rb +21 -3
  129. data/google-api-client.gemspec +2 -0
  130. data/lib/google/apis.rb +12 -2
  131. data/lib/google/apis/version.rb +1 -1
  132. data/script/generate +5 -2
  133. data/spec/google/apis/logging_spec.rb +55 -0
  134. metadata +12 -4
@@ -107,6 +107,7 @@ module Google
107
107
  class ChangePlanRequest
108
108
  # @private
109
109
  class Representation < Google::Apis::Core::JsonRepresentation
110
+ property :deal_code, as: 'dealCode'
110
111
  property :kind, as: 'kind'
111
112
  property :plan_name, as: 'planName'
112
113
  property :purchase_order_id, as: 'purchaseOrderId'
@@ -155,6 +156,7 @@ module Google
155
156
  property :creation_time, as: 'creationTime'
156
157
  property :customer_domain, as: 'customerDomain'
157
158
  property :customer_id, as: 'customerId'
159
+ property :deal_code, as: 'dealCode'
158
160
  property :kind, as: 'kind'
159
161
  property :plan, as: 'plan', class: Google::Apis::ResellerV1::Subscription::Plan, decorator: Google::Apis::ResellerV1::Subscription::Plan::Representation
160
162
 
@@ -0,0 +1,43 @@
1
+ # Copyright 2015 Google Inc.
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/sheets_v1/service.rb'
16
+ require 'google/apis/sheets_v1/classes.rb'
17
+ require 'google/apis/sheets_v1/representations.rb'
18
+
19
+ module Google
20
+ module Apis
21
+ # Google Sheets API
22
+ #
23
+ # An API for reading and modifying Google Sheets.
24
+ #
25
+ # @see
26
+ module SheetsV1
27
+ VERSION = 'V1'
28
+ REVISION = '20160328'
29
+
30
+ # View the files in your Google Drive
31
+ AUTH_DRIVE_READONLY = 'https://www.googleapis.com/auth/drive.readonly'
32
+
33
+ # View your Google Spreadsheets
34
+ AUTH_SPREADSHEETS_READONLY = 'https://www.googleapis.com/auth/spreadsheets.readonly'
35
+
36
+ # View and manage your spreadsheets in Google Drive
37
+ AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets'
38
+
39
+ # View and manage the files in your Google Drive
40
+ AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,4542 @@
1
+ # Copyright 2015 Google Inc.
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 SheetsV1
24
+
25
+ # The result of moving an embedded object to a sheet.
26
+ class MoveEmbeddedObjectToSheetResponse
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Properties of a sheet.
30
+ # Corresponds to the JSON property `properties`
31
+ # @return [Google::Apis::SheetsV1::SheetProperties]
32
+ attr_accessor :properties
33
+
34
+ def initialize(**args)
35
+ update!(**args)
36
+ end
37
+
38
+ # Update properties of this object
39
+ def update!(**args)
40
+ @properties = args[:properties] if args.key?(:properties)
41
+ end
42
+ end
43
+
44
+ # The result of adding a named range.
45
+ class AddNamedRangeResponse
46
+ include Google::Apis::Core::Hashable
47
+
48
+ # A named range.
49
+ # Corresponds to the JSON property `namedRange`
50
+ # @return [Google::Apis::SheetsV1::NamedRange]
51
+ attr_accessor :named_range
52
+
53
+ def initialize(**args)
54
+ update!(**args)
55
+ end
56
+
57
+ # Update properties of this object
58
+ def update!(**args)
59
+ @named_range = args[:named_range] if args.key?(:named_range)
60
+ end
61
+ end
62
+
63
+ # Updates an existing protected range with the specified protected range id.
64
+ class UpdateProtectedRangeRequest
65
+ include Google::Apis::Core::Hashable
66
+
67
+ # A protected range.
68
+ # Corresponds to the JSON property `protectedRange`
69
+ # @return [Google::Apis::SheetsV1::ProtectedRange]
70
+ attr_accessor :protected_range
71
+
72
+ # The fields that should be updated. At least one field must be specified.
73
+ # The root 'protectedRange' is implied and should not be specified.
74
+ # Corresponds to the JSON property `fields`
75
+ # @return [String]
76
+ attr_accessor :fields
77
+
78
+ def initialize(**args)
79
+ update!(**args)
80
+ end
81
+
82
+ # Update properties of this object
83
+ def update!(**args)
84
+ @protected_range = args[:protected_range] if args.key?(:protected_range)
85
+ @fields = args[:fields] if args.key?(:fields)
86
+ end
87
+ end
88
+
89
+ # The amount of padding around the cell, in pixels.
90
+ # When updating padding, every field must be specified.
91
+ class Padding
92
+ include Google::Apis::Core::Hashable
93
+
94
+ # The left padding of the cell.
95
+ # Corresponds to the JSON property `left`
96
+ # @return [Fixnum]
97
+ attr_accessor :left
98
+
99
+ # The right padding of the cell.
100
+ # Corresponds to the JSON property `right`
101
+ # @return [Fixnum]
102
+ attr_accessor :right
103
+
104
+ # The top padding of the cell.
105
+ # Corresponds to the JSON property `top`
106
+ # @return [Fixnum]
107
+ attr_accessor :top
108
+
109
+ # The bottom padding of the cell.
110
+ # Corresponds to the JSON property `bottom`
111
+ # @return [Fixnum]
112
+ attr_accessor :bottom
113
+
114
+ def initialize(**args)
115
+ update!(**args)
116
+ end
117
+
118
+ # Update properties of this object
119
+ def update!(**args)
120
+ @left = args[:left] if args.key?(:left)
121
+ @right = args[:right] if args.key?(:right)
122
+ @top = args[:top] if args.key?(:top)
123
+ @bottom = args[:bottom] if args.key?(:bottom)
124
+ end
125
+ end
126
+
127
+ # Merges all cells in the range.
128
+ class MergeCellsRequest
129
+ include Google::Apis::Core::Hashable
130
+
131
+ # How the cells should be merged.
132
+ # Corresponds to the JSON property `mergeType`
133
+ # @return [String]
134
+ attr_accessor :merge_type
135
+
136
+ # A range on a sheet.
137
+ # All indexes are 0-based.
138
+ # Indexes are half open, e.g the start index is inclusive
139
+ # and the end index is exclusive -- [start_index, end_index).
140
+ # Missing indexes indicate the range is unbounded on that side.
141
+ # For example, if "Sheet1" is grid ID 0, then:
142
+ # Sheet1!A1:A1 == sheet_id: 0,
143
+ # start_row_index: 0, end_row_index: 1,
144
+ # start_column_index: 0, end_column_index: 1
145
+ # Sheet1!A3:B4 == sheet_id: 0,
146
+ # start_row_index: 2, end_row_index: 4,
147
+ # start_column_index: 0, end_column_index: 2
148
+ # Sheet1!A:B == sheet_id: 0,
149
+ # start_column_index: 0, end_column_index: 2
150
+ # Sheet1!A5:B == sheet_id: 0,
151
+ # start_row_index: 4,
152
+ # start_column_index: 0, end_column_index: 2
153
+ # Sheet1 == sheet_id:0
154
+ # The start index must always be less than or equal to the end index.
155
+ # If the start index equals the end index, then the range is empty.
156
+ # Empty ranges are typically not meaningful and are usually rendered in the
157
+ # UI as "#REF!".
158
+ # Corresponds to the JSON property `range`
159
+ # @return [Google::Apis::SheetsV1::GridRange]
160
+ attr_accessor :range
161
+
162
+ def initialize(**args)
163
+ update!(**args)
164
+ end
165
+
166
+ # Update properties of this object
167
+ def update!(**args)
168
+ @merge_type = args[:merge_type] if args.key?(:merge_type)
169
+ @range = args[:range] if args.key?(:range)
170
+ end
171
+ end
172
+
173
+ # The result of adding a sheet.
174
+ class AddSheetResponse
175
+ include Google::Apis::Core::Hashable
176
+
177
+ # Properties of a sheet.
178
+ # Corresponds to the JSON property `properties`
179
+ # @return [Google::Apis::SheetsV1::SheetProperties]
180
+ attr_accessor :properties
181
+
182
+ def initialize(**args)
183
+ update!(**args)
184
+ end
185
+
186
+ # Update properties of this object
187
+ def update!(**args)
188
+ @properties = args[:properties] if args.key?(:properties)
189
+ end
190
+ end
191
+
192
+ # Updates a conditional format rule at the given index,
193
+ # or moves a conditional format rule to another index.
194
+ class UpdateConditionalFormatRuleRequest
195
+ include Google::Apis::Core::Hashable
196
+
197
+ # The sheet of the rule to move. Required if newIndex is set,
198
+ # unused otherwise.
199
+ # Corresponds to the JSON property `sheetId`
200
+ # @return [Fixnum]
201
+ attr_accessor :sheet_id
202
+
203
+ # The 0-based index of the rule that should be replaced or moved.
204
+ # Corresponds to the JSON property `index`
205
+ # @return [Fixnum]
206
+ attr_accessor :index
207
+
208
+ # A rule describing a conditional format.
209
+ # Corresponds to the JSON property `rule`
210
+ # @return [Google::Apis::SheetsV1::ConditionalFormatRule]
211
+ attr_accessor :rule
212
+
213
+ # The 0-based new index the rule should end up at.
214
+ # Corresponds to the JSON property `newIndex`
215
+ # @return [Fixnum]
216
+ attr_accessor :new_index
217
+
218
+ def initialize(**args)
219
+ update!(**args)
220
+ end
221
+
222
+ # Update properties of this object
223
+ def update!(**args)
224
+ @sheet_id = args[:sheet_id] if args.key?(:sheet_id)
225
+ @index = args[:index] if args.key?(:index)
226
+ @rule = args[:rule] if args.key?(:rule)
227
+ @new_index = args[:new_index] if args.key?(:new_index)
228
+ end
229
+ end
230
+
231
+ # The format of a run of text in a cell.
232
+ # Absent values indicate that the field isn't specified.
233
+ class TextFormat
234
+ include Google::Apis::Core::Hashable
235
+
236
+ # True if the text is bold.
237
+ # Corresponds to the JSON property `bold`
238
+ # @return [Boolean]
239
+ attr_accessor :bold
240
+ alias_method :bold?, :bold
241
+
242
+ # True if the text is italicized.
243
+ # Corresponds to the JSON property `italic`
244
+ # @return [Boolean]
245
+ attr_accessor :italic
246
+ alias_method :italic?, :italic
247
+
248
+ # Represents a color in the RGBA color space. This representation is designed
249
+ # for simplicity of conversion to/from color representations in various
250
+ # languages over compactness; for example, the fields of this representation
251
+ # can be trivially provided to the constructor of "java.awt.Color" in Java; it
252
+ # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
253
+ # method in iOS; and, with just a little work, it can be easily formatted into
254
+ # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
255
+ # Example (Java):
256
+ # import com.google.type.Color;
257
+ # // ...
258
+ # public static java.awt.Color fromProto(Color protocolor) `
259
+ # float alpha = protocolor.hasAlpha()
260
+ # ? protocolor.getAlpha().getValue()
261
+ # : 1.0;
262
+ # return new java.awt.Color(
263
+ # protocolor.getRed(),
264
+ # protocolor.getGreen(),
265
+ # protocolor.getBlue(),
266
+ # alpha);
267
+ # `
268
+ # public static Color toProto(java.awt.Color color) `
269
+ # float red = (float) color.getRed();
270
+ # float green = (float) color.getGreen();
271
+ # float blue = (float) color.getBlue();
272
+ # float denominator = 255.0;
273
+ # Color.Builder resultBuilder =
274
+ # Color
275
+ # .newBuilder()
276
+ # .setRed(red / denominator)
277
+ # .setGreen(green / denominator)
278
+ # .setBlue(blue / denominator);
279
+ # int alpha = color.getAlpha();
280
+ # if (alpha != 255) `
281
+ # result.setAlpha(
282
+ # FloatValue
283
+ # .newBuilder()
284
+ # .setValue(((float) alpha) / denominator)
285
+ # .build());
286
+ # `
287
+ # return resultBuilder.build();
288
+ # `
289
+ # // ...
290
+ # Example (iOS / Obj-C):
291
+ # // ...
292
+ # static UIColor* fromProto(Color* protocolor) `
293
+ # float red = [protocolor red];
294
+ # float green = [protocolor green];
295
+ # float blue = [protocolor blue];
296
+ # FloatValue* alpha_wrapper = [protocolor alpha];
297
+ # float alpha = 1.0;
298
+ # if (alpha_wrapper != nil) `
299
+ # alpha = [alpha_wrapper value];
300
+ # `
301
+ # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
302
+ # `
303
+ # static Color* toProto(UIColor* color) `
304
+ # CGFloat red, green, blue, alpha;
305
+ # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
306
+ # return nil;
307
+ # `
308
+ # Color* result = [Color alloc] init];
309
+ # [result setRed:red];
310
+ # [result setGreen:green];
311
+ # [result setBlue:blue];
312
+ # if (alpha <= 0.9999) `
313
+ # [result setAlpha:floatWrapperWithValue(alpha)];
314
+ # `
315
+ # [result autorelease];
316
+ # return result;
317
+ # `
318
+ # // ...
319
+ # Example (JavaScript):
320
+ # // ...
321
+ # var protoToCssColor = function(rgb_color) `
322
+ # var redFrac = rgb_color.red || 0.0;
323
+ # var greenFrac = rgb_color.green || 0.0;
324
+ # var blueFrac = rgb_color.blue || 0.0;
325
+ # var red = Math.floor(redFrac * 255);
326
+ # var green = Math.floor(greenFrac * 255);
327
+ # var blue = Math.floor(blueFrac * 255);
328
+ # if (!('alpha' in rgb_color)) `
329
+ # return rgbToCssColor_(red, green, blue);
330
+ # `
331
+ # var alphaFrac = rgb_color.alpha.value || 0.0;
332
+ # var rgbParams = [red, green, blue].join(',');
333
+ # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
334
+ # `;
335
+ # var rgbToCssColor_ = function(red, green, blue) `
336
+ # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
337
+ # var hexString = rgbNumber.toString(16);
338
+ # var missingZeros = 6 - hexString.length;
339
+ # var resultBuilder = ['#'];
340
+ # for (var i = 0; i < missingZeros; i++) `
341
+ # resultBuilder.push('0');
342
+ # `
343
+ # resultBuilder.push(hexString);
344
+ # return resultBuilder.join('');
345
+ # `;
346
+ # // ...
347
+ # Corresponds to the JSON property `foregroundColor`
348
+ # @return [Google::Apis::SheetsV1::Color]
349
+ attr_accessor :foreground_color
350
+
351
+ # The font family.
352
+ # Corresponds to the JSON property `fontFamily`
353
+ # @return [String]
354
+ attr_accessor :font_family
355
+
356
+ # True if the text has a strikethrough.
357
+ # Corresponds to the JSON property `strikethrough`
358
+ # @return [Boolean]
359
+ attr_accessor :strikethrough
360
+ alias_method :strikethrough?, :strikethrough
361
+
362
+ # The size of the font.
363
+ # Corresponds to the JSON property `fontSize`
364
+ # @return [Fixnum]
365
+ attr_accessor :font_size
366
+
367
+ # True if the text is underlined.
368
+ # Corresponds to the JSON property `underline`
369
+ # @return [Boolean]
370
+ attr_accessor :underline
371
+ alias_method :underline?, :underline
372
+
373
+ def initialize(**args)
374
+ update!(**args)
375
+ end
376
+
377
+ # Update properties of this object
378
+ def update!(**args)
379
+ @bold = args[:bold] if args.key?(:bold)
380
+ @italic = args[:italic] if args.key?(:italic)
381
+ @foreground_color = args[:foreground_color] if args.key?(:foreground_color)
382
+ @font_family = args[:font_family] if args.key?(:font_family)
383
+ @strikethrough = args[:strikethrough] if args.key?(:strikethrough)
384
+ @font_size = args[:font_size] if args.key?(:font_size)
385
+ @underline = args[:underline] if args.key?(:underline)
386
+ end
387
+ end
388
+
389
+ # A coordinate in a sheet.
390
+ # All indexes are 0-based.
391
+ class GridCoordinate
392
+ include Google::Apis::Core::Hashable
393
+
394
+ # The sheet this coordinate is on.
395
+ # Corresponds to the JSON property `sheetId`
396
+ # @return [Fixnum]
397
+ attr_accessor :sheet_id
398
+
399
+ # The row index of the coordinate.
400
+ # Corresponds to the JSON property `rowIndex`
401
+ # @return [Fixnum]
402
+ attr_accessor :row_index
403
+
404
+ # The column index of the coordinate.
405
+ # Corresponds to the JSON property `columnIndex`
406
+ # @return [Fixnum]
407
+ attr_accessor :column_index
408
+
409
+ def initialize(**args)
410
+ update!(**args)
411
+ end
412
+
413
+ # Update properties of this object
414
+ def update!(**args)
415
+ @sheet_id = args[:sheet_id] if args.key?(:sheet_id)
416
+ @row_index = args[:row_index] if args.key?(:row_index)
417
+ @column_index = args[:column_index] if args.key?(:column_index)
418
+ end
419
+ end
420
+
421
+ # Deletes a particular filter view.
422
+ class DeleteFilterViewRequest
423
+ include Google::Apis::Core::Hashable
424
+
425
+ # The ID of the filter to delete.
426
+ # Corresponds to the JSON property `filterId`
427
+ # @return [Fixnum]
428
+ attr_accessor :filter_id
429
+
430
+ def initialize(**args)
431
+ update!(**args)
432
+ end
433
+
434
+ # Update properties of this object
435
+ def update!(**args)
436
+ @filter_id = args[:filter_id] if args.key?(:filter_id)
437
+ end
438
+ end
439
+
440
+ # Updates properties of the named range with the specified named range id.
441
+ # It is an error to specify read only fields in the field mask.
442
+ class UpdateNamedRangeRequest
443
+ include Google::Apis::Core::Hashable
444
+
445
+ # The fields that should be updated. At least one field must be specified.
446
+ # The root 'namedRange' is implied and should not be specified.
447
+ # Corresponds to the JSON property `fields`
448
+ # @return [String]
449
+ attr_accessor :fields
450
+
451
+ # A named range.
452
+ # Corresponds to the JSON property `namedRange`
453
+ # @return [Google::Apis::SheetsV1::NamedRange]
454
+ attr_accessor :named_range
455
+
456
+ def initialize(**args)
457
+ update!(**args)
458
+ end
459
+
460
+ # Update properties of this object
461
+ def update!(**args)
462
+ @fields = args[:fields] if args.key?(:fields)
463
+ @named_range = args[:named_range] if args.key?(:named_range)
464
+ end
465
+ end
466
+
467
+ # Properties of a spreadsheet.
468
+ class SpreadsheetProperties
469
+ include Google::Apis::Core::Hashable
470
+
471
+ # The time zone of the spreadsheet, in CLDR format such as
472
+ # "America/New_York". If the time zone isn't recognized, this may be a
473
+ # custom time zone such as "GMT-07:00".
474
+ # Corresponds to the JSON property `timeZone`
475
+ # @return [String]
476
+ attr_accessor :time_zone
477
+
478
+ # The amount of time to wait before volatile functions are recalculated.
479
+ # Corresponds to the JSON property `autoRecalc`
480
+ # @return [String]
481
+ attr_accessor :auto_recalc
482
+
483
+ # The locale of the spreadsheet in the format of an ISO 639-1 language code
484
+ # (e.g. "en"), an ISO 639-2 language code (e.g. "fil") if no 639-1 code
485
+ # exists, or a combination of the ISO language code and country code
486
+ # (e.g. "en_US").
487
+ # Note: when updating this field, not all locales/languages are supported.
488
+ # Corresponds to the JSON property `locale`
489
+ # @return [String]
490
+ attr_accessor :locale
491
+
492
+ # The title of the spreadsheet
493
+ # Corresponds to the JSON property `title`
494
+ # @return [String]
495
+ attr_accessor :title
496
+
497
+ # The format of a cell.
498
+ # Corresponds to the JSON property `defaultFormat`
499
+ # @return [Google::Apis::SheetsV1::CellFormat]
500
+ attr_accessor :default_format
501
+
502
+ def initialize(**args)
503
+ update!(**args)
504
+ end
505
+
506
+ # Update properties of this object
507
+ def update!(**args)
508
+ @time_zone = args[:time_zone] if args.key?(:time_zone)
509
+ @auto_recalc = args[:auto_recalc] if args.key?(:auto_recalc)
510
+ @locale = args[:locale] if args.key?(:locale)
511
+ @title = args[:title] if args.key?(:title)
512
+ @default_format = args[:default_format] if args.key?(:default_format)
513
+ end
514
+ end
515
+
516
+ # Data about a specific cell.
517
+ class CellData
518
+ include Google::Apis::Core::Hashable
519
+
520
+ # A hyperlink this cell points to, if any.
521
+ # This field is read-only. (To set it, use a =HYPERLINK formula.)
522
+ # Corresponds to the JSON property `hyperlink`
523
+ # @return [String]
524
+ attr_accessor :hyperlink
525
+
526
+ # The format of a cell.
527
+ # Corresponds to the JSON property `effectiveFormat`
528
+ # @return [Google::Apis::SheetsV1::CellFormat]
529
+ attr_accessor :effective_format
530
+
531
+ # Any note on the cell.
532
+ # Corresponds to the JSON property `note`
533
+ # @return [String]
534
+ attr_accessor :note
535
+
536
+ # The formatted value of the cell.
537
+ # This is the value as it's shown to the user.
538
+ # This field is read-only.
539
+ # Corresponds to the JSON property `formattedValue`
540
+ # @return [String]
541
+ attr_accessor :formatted_value
542
+
543
+ # A data validation rule.
544
+ # Corresponds to the JSON property `dataValidation`
545
+ # @return [Google::Apis::SheetsV1::DataValidationRule]
546
+ attr_accessor :data_validation
547
+
548
+ # Each kind of value a cell in a spreadsheet can have.
549
+ # Corresponds to the JSON property `userEnteredValue`
550
+ # @return [Google::Apis::SheetsV1::ExtendedValue]
551
+ attr_accessor :user_entered_value
552
+
553
+ # The format of a cell.
554
+ # Corresponds to the JSON property `userEnteredFormat`
555
+ # @return [Google::Apis::SheetsV1::CellFormat]
556
+ attr_accessor :user_entered_format
557
+
558
+ # Runs of rich text applied to subsections of the cell.
559
+ # Runs start at specific indexes in the text and continue until the next
560
+ # run. Properties of a run will continue unless explicitly changed
561
+ # in a subsequent run (and properties of the first run will continue
562
+ # the properties of the cell unless explicitly changed).
563
+ # When writing, the new runs will overwrite any prior runs.
564
+ # Corresponds to the JSON property `textFormatRuns`
565
+ # @return [Array<Google::Apis::SheetsV1::TextFormatRun>]
566
+ attr_accessor :text_format_runs
567
+
568
+ # Each kind of value a cell in a spreadsheet can have.
569
+ # Corresponds to the JSON property `effectiveValue`
570
+ # @return [Google::Apis::SheetsV1::ExtendedValue]
571
+ attr_accessor :effective_value
572
+
573
+ def initialize(**args)
574
+ update!(**args)
575
+ end
576
+
577
+ # Update properties of this object
578
+ def update!(**args)
579
+ @hyperlink = args[:hyperlink] if args.key?(:hyperlink)
580
+ @effective_format = args[:effective_format] if args.key?(:effective_format)
581
+ @note = args[:note] if args.key?(:note)
582
+ @formatted_value = args[:formatted_value] if args.key?(:formatted_value)
583
+ @data_validation = args[:data_validation] if args.key?(:data_validation)
584
+ @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value)
585
+ @user_entered_format = args[:user_entered_format] if args.key?(:user_entered_format)
586
+ @text_format_runs = args[:text_format_runs] if args.key?(:text_format_runs)
587
+ @effective_value = args[:effective_value] if args.key?(:effective_value)
588
+ end
589
+ end
590
+
591
+ # Unmerges cells in the given range.
592
+ class UnmergeCellsRequest
593
+ include Google::Apis::Core::Hashable
594
+
595
+ # A range on a sheet.
596
+ # All indexes are 0-based.
597
+ # Indexes are half open, e.g the start index is inclusive
598
+ # and the end index is exclusive -- [start_index, end_index).
599
+ # Missing indexes indicate the range is unbounded on that side.
600
+ # For example, if "Sheet1" is grid ID 0, then:
601
+ # Sheet1!A1:A1 == sheet_id: 0,
602
+ # start_row_index: 0, end_row_index: 1,
603
+ # start_column_index: 0, end_column_index: 1
604
+ # Sheet1!A3:B4 == sheet_id: 0,
605
+ # start_row_index: 2, end_row_index: 4,
606
+ # start_column_index: 0, end_column_index: 2
607
+ # Sheet1!A:B == sheet_id: 0,
608
+ # start_column_index: 0, end_column_index: 2
609
+ # Sheet1!A5:B == sheet_id: 0,
610
+ # start_row_index: 4,
611
+ # start_column_index: 0, end_column_index: 2
612
+ # Sheet1 == sheet_id:0
613
+ # The start index must always be less than or equal to the end index.
614
+ # If the start index equals the end index, then the range is empty.
615
+ # Empty ranges are typically not meaningful and are usually rendered in the
616
+ # UI as "#REF!".
617
+ # Corresponds to the JSON property `range`
618
+ # @return [Google::Apis::SheetsV1::GridRange]
619
+ attr_accessor :range
620
+
621
+ def initialize(**args)
622
+ update!(**args)
623
+ end
624
+
625
+ # Update properties of this object
626
+ def update!(**args)
627
+ @range = args[:range] if args.key?(:range)
628
+ end
629
+ end
630
+
631
+ # Splits a column of text into multiple columns,
632
+ # based on a delimiter in each cell.
633
+ class TextToColumnsRequest
634
+ include Google::Apis::Core::Hashable
635
+
636
+ # The delimiter type to use.
637
+ # Corresponds to the JSON property `delimiterType`
638
+ # @return [String]
639
+ attr_accessor :delimiter_type
640
+
641
+ # The delimiter to use. Used only if delimiterType is CUSTOM.
642
+ # Corresponds to the JSON property `delimiter`
643
+ # @return [String]
644
+ attr_accessor :delimiter
645
+
646
+ # A range on a sheet.
647
+ # All indexes are 0-based.
648
+ # Indexes are half open, e.g the start index is inclusive
649
+ # and the end index is exclusive -- [start_index, end_index).
650
+ # Missing indexes indicate the range is unbounded on that side.
651
+ # For example, if "Sheet1" is grid ID 0, then:
652
+ # Sheet1!A1:A1 == sheet_id: 0,
653
+ # start_row_index: 0, end_row_index: 1,
654
+ # start_column_index: 0, end_column_index: 1
655
+ # Sheet1!A3:B4 == sheet_id: 0,
656
+ # start_row_index: 2, end_row_index: 4,
657
+ # start_column_index: 0, end_column_index: 2
658
+ # Sheet1!A:B == sheet_id: 0,
659
+ # start_column_index: 0, end_column_index: 2
660
+ # Sheet1!A5:B == sheet_id: 0,
661
+ # start_row_index: 4,
662
+ # start_column_index: 0, end_column_index: 2
663
+ # Sheet1 == sheet_id:0
664
+ # The start index must always be less than or equal to the end index.
665
+ # If the start index equals the end index, then the range is empty.
666
+ # Empty ranges are typically not meaningful and are usually rendered in the
667
+ # UI as "#REF!".
668
+ # Corresponds to the JSON property `source`
669
+ # @return [Google::Apis::SheetsV1::GridRange]
670
+ attr_accessor :source
671
+
672
+ def initialize(**args)
673
+ update!(**args)
674
+ end
675
+
676
+ # Update properties of this object
677
+ def update!(**args)
678
+ @delimiter_type = args[:delimiter_type] if args.key?(:delimiter_type)
679
+ @delimiter = args[:delimiter] if args.key?(:delimiter)
680
+ @source = args[:source] if args.key?(:source)
681
+ end
682
+ end
683
+
684
+ # The result of adding a new protected range.
685
+ class AddProtectedRangeResponse
686
+ include Google::Apis::Core::Hashable
687
+
688
+ # A protected range.
689
+ # Corresponds to the JSON property `protectedRange`
690
+ # @return [Google::Apis::SheetsV1::ProtectedRange]
691
+ attr_accessor :protected_range
692
+
693
+ def initialize(**args)
694
+ update!(**args)
695
+ end
696
+
697
+ # Update properties of this object
698
+ def update!(**args)
699
+ @protected_range = args[:protected_range] if args.key?(:protected_range)
700
+ end
701
+ end
702
+
703
+ # A condition that can evaluate to true or false.
704
+ # BooleanConditions are used by conditional formatting,
705
+ # data validation, and the criteria in filters.
706
+ class BooleanCondition
707
+ include Google::Apis::Core::Hashable
708
+
709
+ # The values of the condition. The number of supported values depends
710
+ # on the condition type. Some support zero values, others one or two values,
711
+ # and ONE_OF_LIST supports an arbitrary number of values.
712
+ # Corresponds to the JSON property `values`
713
+ # @return [Array<Google::Apis::SheetsV1::ConditionValue>]
714
+ attr_accessor :values
715
+
716
+ # The type of condition.
717
+ # Corresponds to the JSON property `type`
718
+ # @return [String]
719
+ attr_accessor :type
720
+
721
+ def initialize(**args)
722
+ update!(**args)
723
+ end
724
+
725
+ # Update properties of this object
726
+ def update!(**args)
727
+ @values = args[:values] if args.key?(:values)
728
+ @type = args[:type] if args.key?(:type)
729
+ end
730
+ end
731
+
732
+ # Deletes the protected range with the given id.
733
+ class DeleteProtectedRangeRequest
734
+ include Google::Apis::Core::Hashable
735
+
736
+ # The ID of the protected range to delete.
737
+ # Corresponds to the JSON property `protectedRangeId`
738
+ # @return [Fixnum]
739
+ attr_accessor :protected_range_id
740
+
741
+ def initialize(**args)
742
+ update!(**args)
743
+ end
744
+
745
+ # Update properties of this object
746
+ def update!(**args)
747
+ @protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id)
748
+ end
749
+ end
750
+
751
+ # A range along a single dimension on a sheet.
752
+ # All indexes are 0-based.
753
+ # Indexes are half open, e.g the start index is inclusive
754
+ # and the end index is exclusive -- [start_index, end_index).
755
+ # Missing indexes indicate the range is unbounded on that side.
756
+ class DimensionRange
757
+ include Google::Apis::Core::Hashable
758
+
759
+ # The end (exclusive) of the span, or not set if unbounded.
760
+ # Corresponds to the JSON property `endIndex`
761
+ # @return [Fixnum]
762
+ attr_accessor :end_index
763
+
764
+ # The sheet this span is on.
765
+ # Corresponds to the JSON property `sheetId`
766
+ # @return [Fixnum]
767
+ attr_accessor :sheet_id
768
+
769
+ # The start (inclusive) of the span, or not set if unbounded.
770
+ # Corresponds to the JSON property `startIndex`
771
+ # @return [Fixnum]
772
+ attr_accessor :start_index
773
+
774
+ # The dimension of the span.
775
+ # Corresponds to the JSON property `dimension`
776
+ # @return [String]
777
+ attr_accessor :dimension
778
+
779
+ def initialize(**args)
780
+ update!(**args)
781
+ end
782
+
783
+ # Update properties of this object
784
+ def update!(**args)
785
+ @end_index = args[:end_index] if args.key?(:end_index)
786
+ @sheet_id = args[:sheet_id] if args.key?(:sheet_id)
787
+ @start_index = args[:start_index] if args.key?(:start_index)
788
+ @dimension = args[:dimension] if args.key?(:dimension)
789
+ end
790
+ end
791
+
792
+ # A single response from an update.
793
+ class Response
794
+ include Google::Apis::Core::Hashable
795
+
796
+ # The result of adding a filter view.
797
+ # Corresponds to the JSON property `addFilterView`
798
+ # @return [Google::Apis::SheetsV1::AddFilterViewResponse]
799
+ attr_accessor :add_filter_view
800
+
801
+ # The result of moving an embedded object to a sheet.
802
+ # Corresponds to the JSON property `moveEmbeddedObjectToSheet`
803
+ # @return [Google::Apis::SheetsV1::MoveEmbeddedObjectToSheetResponse]
804
+ attr_accessor :move_embedded_object_to_sheet
805
+
806
+ # The result of adding a sheet.
807
+ # Corresponds to the JSON property `addSheet`
808
+ # @return [Google::Apis::SheetsV1::AddSheetResponse]
809
+ attr_accessor :add_sheet
810
+
811
+ # The result of the find/replace.
812
+ # Corresponds to the JSON property `findReplace`
813
+ # @return [Google::Apis::SheetsV1::FindReplaceResponse]
814
+ attr_accessor :find_replace
815
+
816
+ # The result of adding a new protected range.
817
+ # Corresponds to the JSON property `addProtectedRange`
818
+ # @return [Google::Apis::SheetsV1::AddProtectedRangeResponse]
819
+ attr_accessor :add_protected_range
820
+
821
+ # The result of updating a conditional format rule.
822
+ # Corresponds to the JSON property `updateConditionalFormatRule`
823
+ # @return [Google::Apis::SheetsV1::UpdateConditionalFormatRuleResponse]
824
+ attr_accessor :update_conditional_format_rule
825
+
826
+ # The result of deleting a conditional format rule.
827
+ # Corresponds to the JSON property `deleteConditionalFormatRule`
828
+ # @return [Google::Apis::SheetsV1::DeleteConditionalFormatRuleResponse]
829
+ attr_accessor :delete_conditional_format_rule
830
+
831
+ # The result of duplicating a sheet.
832
+ # Corresponds to the JSON property `duplicateSheet`
833
+ # @return [Google::Apis::SheetsV1::DuplicateSheetResponse]
834
+ attr_accessor :duplicate_sheet
835
+
836
+ # The result of a filter view being duplicated.
837
+ # Corresponds to the JSON property `duplicateFilterView`
838
+ # @return [Google::Apis::SheetsV1::DuplicateFilterViewResponse]
839
+ attr_accessor :duplicate_filter_view
840
+
841
+ # The result of adding a named range.
842
+ # Corresponds to the JSON property `addNamedRange`
843
+ # @return [Google::Apis::SheetsV1::AddNamedRangeResponse]
844
+ attr_accessor :add_named_range
845
+
846
+ def initialize(**args)
847
+ update!(**args)
848
+ end
849
+
850
+ # Update properties of this object
851
+ def update!(**args)
852
+ @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view)
853
+ @move_embedded_object_to_sheet = args[:move_embedded_object_to_sheet] if args.key?(:move_embedded_object_to_sheet)
854
+ @add_sheet = args[:add_sheet] if args.key?(:add_sheet)
855
+ @find_replace = args[:find_replace] if args.key?(:find_replace)
856
+ @add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range)
857
+ @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule)
858
+ @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule)
859
+ @duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet)
860
+ @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view)
861
+ @add_named_range = args[:add_named_range] if args.key?(:add_named_range)
862
+ end
863
+ end
864
+
865
+ # Adds a new conditional format rule at the given index.
866
+ # All subsequent rules' indexes are incremented.
867
+ class AddConditionalFormatRuleRequest
868
+ include Google::Apis::Core::Hashable
869
+
870
+ # The 0-based index where the rule should be inserted.
871
+ # Corresponds to the JSON property `index`
872
+ # @return [Fixnum]
873
+ attr_accessor :index
874
+
875
+ # A rule describing a conditional format.
876
+ # Corresponds to the JSON property `rule`
877
+ # @return [Google::Apis::SheetsV1::ConditionalFormatRule]
878
+ attr_accessor :rule
879
+
880
+ def initialize(**args)
881
+ update!(**args)
882
+ end
883
+
884
+ # Update properties of this object
885
+ def update!(**args)
886
+ @index = args[:index] if args.key?(:index)
887
+ @rule = args[:rule] if args.key?(:rule)
888
+ end
889
+ end
890
+
891
+ # A filter view.
892
+ class FilterView
893
+ include Google::Apis::Core::Hashable
894
+
895
+ # The name of the filter view.
896
+ # Corresponds to the JSON property `title`
897
+ # @return [String]
898
+ attr_accessor :title
899
+
900
+ # The named range this filter view is backed by, if any.
901
+ # When writing, only one of range or namedRangeId may be set.
902
+ # Corresponds to the JSON property `namedRangeId`
903
+ # @return [Fixnum]
904
+ attr_accessor :named_range_id
905
+
906
+ # The sort order per column. Later specifications are used when values
907
+ # are equal in the earlier specifications.
908
+ # Corresponds to the JSON property `sortSpecs`
909
+ # @return [Array<Google::Apis::SheetsV1::SortSpec>]
910
+ attr_accessor :sort_specs
911
+
912
+ # A range on a sheet.
913
+ # All indexes are 0-based.
914
+ # Indexes are half open, e.g the start index is inclusive
915
+ # and the end index is exclusive -- [start_index, end_index).
916
+ # Missing indexes indicate the range is unbounded on that side.
917
+ # For example, if "Sheet1" is grid ID 0, then:
918
+ # Sheet1!A1:A1 == sheet_id: 0,
919
+ # start_row_index: 0, end_row_index: 1,
920
+ # start_column_index: 0, end_column_index: 1
921
+ # Sheet1!A3:B4 == sheet_id: 0,
922
+ # start_row_index: 2, end_row_index: 4,
923
+ # start_column_index: 0, end_column_index: 2
924
+ # Sheet1!A:B == sheet_id: 0,
925
+ # start_column_index: 0, end_column_index: 2
926
+ # Sheet1!A5:B == sheet_id: 0,
927
+ # start_row_index: 4,
928
+ # start_column_index: 0, end_column_index: 2
929
+ # Sheet1 == sheet_id:0
930
+ # The start index must always be less than or equal to the end index.
931
+ # If the start index equals the end index, then the range is empty.
932
+ # Empty ranges are typically not meaningful and are usually rendered in the
933
+ # UI as "#REF!".
934
+ # Corresponds to the JSON property `range`
935
+ # @return [Google::Apis::SheetsV1::GridRange]
936
+ attr_accessor :range
937
+
938
+ # The criteria for showing/hiding values per column.
939
+ # The map's key is the column index, and the value is the criteria for
940
+ # that column.
941
+ # Corresponds to the JSON property `criteria`
942
+ # @return [Hash<String,Google::Apis::SheetsV1::FilterCriteria>]
943
+ attr_accessor :criteria
944
+
945
+ # The ID of the filter view.
946
+ # Corresponds to the JSON property `filterViewId`
947
+ # @return [Fixnum]
948
+ attr_accessor :filter_view_id
949
+
950
+ def initialize(**args)
951
+ update!(**args)
952
+ end
953
+
954
+ # Update properties of this object
955
+ def update!(**args)
956
+ @title = args[:title] if args.key?(:title)
957
+ @named_range_id = args[:named_range_id] if args.key?(:named_range_id)
958
+ @sort_specs = args[:sort_specs] if args.key?(:sort_specs)
959
+ @range = args[:range] if args.key?(:range)
960
+ @criteria = args[:criteria] if args.key?(:criteria)
961
+ @filter_view_id = args[:filter_view_id] if args.key?(:filter_view_id)
962
+ end
963
+ end
964
+
965
+ # Sorts data in rows based on a sort order per column.
966
+ class SortRangeRequest
967
+ include Google::Apis::Core::Hashable
968
+
969
+ # The sort order per column. Later specifications are used when values
970
+ # are equal in the earlier specifications.
971
+ # Corresponds to the JSON property `sortSpecs`
972
+ # @return [Array<Google::Apis::SheetsV1::SortSpec>]
973
+ attr_accessor :sort_specs
974
+
975
+ # A range on a sheet.
976
+ # All indexes are 0-based.
977
+ # Indexes are half open, e.g the start index is inclusive
978
+ # and the end index is exclusive -- [start_index, end_index).
979
+ # Missing indexes indicate the range is unbounded on that side.
980
+ # For example, if "Sheet1" is grid ID 0, then:
981
+ # Sheet1!A1:A1 == sheet_id: 0,
982
+ # start_row_index: 0, end_row_index: 1,
983
+ # start_column_index: 0, end_column_index: 1
984
+ # Sheet1!A3:B4 == sheet_id: 0,
985
+ # start_row_index: 2, end_row_index: 4,
986
+ # start_column_index: 0, end_column_index: 2
987
+ # Sheet1!A:B == sheet_id: 0,
988
+ # start_column_index: 0, end_column_index: 2
989
+ # Sheet1!A5:B == sheet_id: 0,
990
+ # start_row_index: 4,
991
+ # start_column_index: 0, end_column_index: 2
992
+ # Sheet1 == sheet_id:0
993
+ # The start index must always be less than or equal to the end index.
994
+ # If the start index equals the end index, then the range is empty.
995
+ # Empty ranges are typically not meaningful and are usually rendered in the
996
+ # UI as "#REF!".
997
+ # Corresponds to the JSON property `range`
998
+ # @return [Google::Apis::SheetsV1::GridRange]
999
+ attr_accessor :range
1000
+
1001
+ def initialize(**args)
1002
+ update!(**args)
1003
+ end
1004
+
1005
+ # Update properties of this object
1006
+ def update!(**args)
1007
+ @sort_specs = args[:sort_specs] if args.key?(:sort_specs)
1008
+ @range = args[:range] if args.key?(:range)
1009
+ end
1010
+ end
1011
+
1012
+ # A run of a text format. The format of this run continues until explicitly
1013
+ # overridden in the next run.
1014
+ # When updating, all fields must be set.
1015
+ class TextFormatRun
1016
+ include Google::Apis::Core::Hashable
1017
+
1018
+ # The character index where this run starts.
1019
+ # Corresponds to the JSON property `startIndex`
1020
+ # @return [Fixnum]
1021
+ attr_accessor :start_index
1022
+
1023
+ # The format of a run of text in a cell.
1024
+ # Absent values indicate that the field isn't specified.
1025
+ # Corresponds to the JSON property `format`
1026
+ # @return [Google::Apis::SheetsV1::TextFormat]
1027
+ attr_accessor :format
1028
+
1029
+ def initialize(**args)
1030
+ update!(**args)
1031
+ end
1032
+
1033
+ # Update properties of this object
1034
+ def update!(**args)
1035
+ @start_index = args[:start_index] if args.key?(:start_index)
1036
+ @format = args[:format] if args.key?(:format)
1037
+ end
1038
+ end
1039
+
1040
+ # Updates properties of the filter view.
1041
+ class UpdateFilterViewRequest
1042
+ include Google::Apis::Core::Hashable
1043
+
1044
+ # The fields that should be updated. At least one field must be specified.
1045
+ # The root 'filter' is implied and should not be specified.
1046
+ # Corresponds to the JSON property `fields`
1047
+ # @return [String]
1048
+ attr_accessor :fields
1049
+
1050
+ # A filter view.
1051
+ # Corresponds to the JSON property `filter`
1052
+ # @return [Google::Apis::SheetsV1::FilterView]
1053
+ attr_accessor :filter
1054
+
1055
+ def initialize(**args)
1056
+ update!(**args)
1057
+ end
1058
+
1059
+ # Update properties of this object
1060
+ def update!(**args)
1061
+ @fields = args[:fields] if args.key?(:fields)
1062
+ @filter = args[:filter] if args.key?(:filter)
1063
+ end
1064
+ end
1065
+
1066
+ # The result of updating a conditional format rule.
1067
+ class UpdateConditionalFormatRuleResponse
1068
+ include Google::Apis::Core::Hashable
1069
+
1070
+ # A rule describing a conditional format.
1071
+ # Corresponds to the JSON property `rule`
1072
+ # @return [Google::Apis::SheetsV1::ConditionalFormatRule]
1073
+ attr_accessor :rule
1074
+
1075
+ def initialize(**args)
1076
+ update!(**args)
1077
+ end
1078
+
1079
+ # Update properties of this object
1080
+ def update!(**args)
1081
+ @rule = args[:rule] if args.key?(:rule)
1082
+ end
1083
+ end
1084
+
1085
+ # Criteria for showing/hiding rows in a filter or filter view.
1086
+ class FilterCriteria
1087
+ include Google::Apis::Core::Hashable
1088
+
1089
+ # A condition that can evaluate to true or false.
1090
+ # BooleanConditions are used by conditional formatting,
1091
+ # data validation, and the criteria in filters.
1092
+ # Corresponds to the JSON property `condition`
1093
+ # @return [Google::Apis::SheetsV1::BooleanCondition]
1094
+ attr_accessor :condition
1095
+
1096
+ # Values that should be hidden.
1097
+ # Corresponds to the JSON property `hiddenValues`
1098
+ # @return [Array<String>]
1099
+ attr_accessor :hidden_values
1100
+
1101
+ def initialize(**args)
1102
+ update!(**args)
1103
+ end
1104
+
1105
+ # Update properties of this object
1106
+ def update!(**args)
1107
+ @condition = args[:condition] if args.key?(:condition)
1108
+ @hidden_values = args[:hidden_values] if args.key?(:hidden_values)
1109
+ end
1110
+ end
1111
+
1112
+ # Deletes the dimensions from the sheet.
1113
+ class DeleteDimensionRequest
1114
+ include Google::Apis::Core::Hashable
1115
+
1116
+ # A range along a single dimension on a sheet.
1117
+ # All indexes are 0-based.
1118
+ # Indexes are half open, e.g the start index is inclusive
1119
+ # and the end index is exclusive -- [start_index, end_index).
1120
+ # Missing indexes indicate the range is unbounded on that side.
1121
+ # Corresponds to the JSON property `range`
1122
+ # @return [Google::Apis::SheetsV1::DimensionRange]
1123
+ attr_accessor :range
1124
+
1125
+ def initialize(**args)
1126
+ update!(**args)
1127
+ end
1128
+
1129
+ # Update properties of this object
1130
+ def update!(**args)
1131
+ @range = args[:range] if args.key?(:range)
1132
+ end
1133
+ end
1134
+
1135
+ # A data validation rule.
1136
+ class DataValidationRule
1137
+ include Google::Apis::Core::Hashable
1138
+
1139
+ # A condition that can evaluate to true or false.
1140
+ # BooleanConditions are used by conditional formatting,
1141
+ # data validation, and the criteria in filters.
1142
+ # Corresponds to the JSON property `condition`
1143
+ # @return [Google::Apis::SheetsV1::BooleanCondition]
1144
+ attr_accessor :condition
1145
+
1146
+ # A message to show the user when adding data to the cell.
1147
+ # Corresponds to the JSON property `inputMessage`
1148
+ # @return [String]
1149
+ attr_accessor :input_message
1150
+
1151
+ # True if the UI should be customized based on the kind of condition.
1152
+ # If true, "List" conditions will show a dropdown.
1153
+ # Corresponds to the JSON property `showCustomUi`
1154
+ # @return [Boolean]
1155
+ attr_accessor :show_custom_ui
1156
+ alias_method :show_custom_ui?, :show_custom_ui
1157
+
1158
+ # True if invalid data should be rejected.
1159
+ # Corresponds to the JSON property `strict`
1160
+ # @return [Boolean]
1161
+ attr_accessor :strict
1162
+ alias_method :strict?, :strict
1163
+
1164
+ def initialize(**args)
1165
+ update!(**args)
1166
+ end
1167
+
1168
+ # Update properties of this object
1169
+ def update!(**args)
1170
+ @condition = args[:condition] if args.key?(:condition)
1171
+ @input_message = args[:input_message] if args.key?(:input_message)
1172
+ @show_custom_ui = args[:show_custom_ui] if args.key?(:show_custom_ui)
1173
+ @strict = args[:strict] if args.key?(:strict)
1174
+ end
1175
+ end
1176
+
1177
+ # Updates properties of a spreadsheet.
1178
+ # It is an error to specify read only fields in the field mask.
1179
+ class UpdateSpreadsheetPropertiesRequest
1180
+ include Google::Apis::Core::Hashable
1181
+
1182
+ # The fields that should be updated. At least one field must be specified.
1183
+ # The root 'properties' is implied and should not be specified.
1184
+ # Corresponds to the JSON property `fields`
1185
+ # @return [String]
1186
+ attr_accessor :fields
1187
+
1188
+ # Properties of a spreadsheet.
1189
+ # Corresponds to the JSON property `properties`
1190
+ # @return [Google::Apis::SheetsV1::SpreadsheetProperties]
1191
+ attr_accessor :properties
1192
+
1193
+ def initialize(**args)
1194
+ update!(**args)
1195
+ end
1196
+
1197
+ # Update properties of this object
1198
+ def update!(**args)
1199
+ @fields = args[:fields] if args.key?(:fields)
1200
+ @properties = args[:properties] if args.key?(:properties)
1201
+ end
1202
+ end
1203
+
1204
+ # The request for updating more than one range of values in a spreadsheet.
1205
+ class BatchUpdateValuesRequest
1206
+ include Google::Apis::Core::Hashable
1207
+
1208
+ # The new values to apply to the spreadsheet.
1209
+ # Corresponds to the JSON property `data`
1210
+ # @return [Array<Google::Apis::SheetsV1::ValueRange>]
1211
+ attr_accessor :data
1212
+
1213
+ # How the input data should be interpreted.
1214
+ # Corresponds to the JSON property `valueInputOption`
1215
+ # @return [String]
1216
+ attr_accessor :value_input_option
1217
+
1218
+ def initialize(**args)
1219
+ update!(**args)
1220
+ end
1221
+
1222
+ # Update properties of this object
1223
+ def update!(**args)
1224
+ @data = args[:data] if args.key?(:data)
1225
+ @value_input_option = args[:value_input_option] if args.key?(:value_input_option)
1226
+ end
1227
+ end
1228
+
1229
+ # Clears the basic filter, if any exists on the sheet.
1230
+ class ClearBasicFilterRequest
1231
+ include Google::Apis::Core::Hashable
1232
+
1233
+ # The sheet ID on which the basic filter should be cleared.
1234
+ # Corresponds to the JSON property `sheetId`
1235
+ # @return [Fixnum]
1236
+ attr_accessor :sheet_id
1237
+
1238
+ def initialize(**args)
1239
+ update!(**args)
1240
+ end
1241
+
1242
+ # Update properties of this object
1243
+ def update!(**args)
1244
+ @sheet_id = args[:sheet_id] if args.key?(:sheet_id)
1245
+ end
1246
+ end
1247
+
1248
+ # A rule describing a conditional format.
1249
+ class ConditionalFormatRule
1250
+ include Google::Apis::Core::Hashable
1251
+
1252
+ # A rule that applies a gradient color scale format, based on
1253
+ # the interpolation points listed. The format of a cell will vary
1254
+ # based on its contents as compared to the values of the interpolation
1255
+ # points.
1256
+ # Corresponds to the JSON property `gradientRule`
1257
+ # @return [Google::Apis::SheetsV1::GradientRule]
1258
+ attr_accessor :gradient_rule
1259
+
1260
+ # A rule that may or may not match, depending on the condition.
1261
+ # Corresponds to the JSON property `booleanRule`
1262
+ # @return [Google::Apis::SheetsV1::BooleanRule]
1263
+ attr_accessor :boolean_rule
1264
+
1265
+ # The ranges that will be formatted if the condition is true.
1266
+ # All the ranges must be on the same grid.
1267
+ # Corresponds to the JSON property `ranges`
1268
+ # @return [Array<Google::Apis::SheetsV1::GridRange>]
1269
+ attr_accessor :ranges
1270
+
1271
+ def initialize(**args)
1272
+ update!(**args)
1273
+ end
1274
+
1275
+ # Update properties of this object
1276
+ def update!(**args)
1277
+ @gradient_rule = args[:gradient_rule] if args.key?(:gradient_rule)
1278
+ @boolean_rule = args[:boolean_rule] if args.key?(:boolean_rule)
1279
+ @ranges = args[:ranges] if args.key?(:ranges)
1280
+ end
1281
+ end
1282
+
1283
+ # Updates the borders of a range.
1284
+ # If a field is not set in the request, that means the border remains as-is.
1285
+ # For example, with two subsequent SetBorderRequests:
1286
+ # 1) range: A1:A5 `` top: RED, bottom: WHITE ``
1287
+ # 2) range: A1:A5 `` left: BLUE ``
1288
+ # That would result in A1:A5 having a borders of
1289
+ # `` top: RED, bottom: WHITE, left: BLUE ``.
1290
+ # If you want to clear a border, explicitly set the style to `NONE`.
1291
+ class UpdateBordersRequest
1292
+ include Google::Apis::Core::Hashable
1293
+
1294
+ # A border along a cell.
1295
+ # Corresponds to the JSON property `right`
1296
+ # @return [Google::Apis::SheetsV1::Border]
1297
+ attr_accessor :right
1298
+
1299
+ # A border along a cell.
1300
+ # Corresponds to the JSON property `innerVertical`
1301
+ # @return [Google::Apis::SheetsV1::Border]
1302
+ attr_accessor :inner_vertical
1303
+
1304
+ # A border along a cell.
1305
+ # Corresponds to the JSON property `top`
1306
+ # @return [Google::Apis::SheetsV1::Border]
1307
+ attr_accessor :top
1308
+
1309
+ # A border along a cell.
1310
+ # Corresponds to the JSON property `innerHorizontal`
1311
+ # @return [Google::Apis::SheetsV1::Border]
1312
+ attr_accessor :inner_horizontal
1313
+
1314
+ # A border along a cell.
1315
+ # Corresponds to the JSON property `bottom`
1316
+ # @return [Google::Apis::SheetsV1::Border]
1317
+ attr_accessor :bottom
1318
+
1319
+ # A range on a sheet.
1320
+ # All indexes are 0-based.
1321
+ # Indexes are half open, e.g the start index is inclusive
1322
+ # and the end index is exclusive -- [start_index, end_index).
1323
+ # Missing indexes indicate the range is unbounded on that side.
1324
+ # For example, if "Sheet1" is grid ID 0, then:
1325
+ # Sheet1!A1:A1 == sheet_id: 0,
1326
+ # start_row_index: 0, end_row_index: 1,
1327
+ # start_column_index: 0, end_column_index: 1
1328
+ # Sheet1!A3:B4 == sheet_id: 0,
1329
+ # start_row_index: 2, end_row_index: 4,
1330
+ # start_column_index: 0, end_column_index: 2
1331
+ # Sheet1!A:B == sheet_id: 0,
1332
+ # start_column_index: 0, end_column_index: 2
1333
+ # Sheet1!A5:B == sheet_id: 0,
1334
+ # start_row_index: 4,
1335
+ # start_column_index: 0, end_column_index: 2
1336
+ # Sheet1 == sheet_id:0
1337
+ # The start index must always be less than or equal to the end index.
1338
+ # If the start index equals the end index, then the range is empty.
1339
+ # Empty ranges are typically not meaningful and are usually rendered in the
1340
+ # UI as "#REF!".
1341
+ # Corresponds to the JSON property `range`
1342
+ # @return [Google::Apis::SheetsV1::GridRange]
1343
+ attr_accessor :range
1344
+
1345
+ # A border along a cell.
1346
+ # Corresponds to the JSON property `left`
1347
+ # @return [Google::Apis::SheetsV1::Border]
1348
+ attr_accessor :left
1349
+
1350
+ def initialize(**args)
1351
+ update!(**args)
1352
+ end
1353
+
1354
+ # Update properties of this object
1355
+ def update!(**args)
1356
+ @right = args[:right] if args.key?(:right)
1357
+ @inner_vertical = args[:inner_vertical] if args.key?(:inner_vertical)
1358
+ @top = args[:top] if args.key?(:top)
1359
+ @inner_horizontal = args[:inner_horizontal] if args.key?(:inner_horizontal)
1360
+ @bottom = args[:bottom] if args.key?(:bottom)
1361
+ @range = args[:range] if args.key?(:range)
1362
+ @left = args[:left] if args.key?(:left)
1363
+ end
1364
+ end
1365
+
1366
+ # The borders of the cell.
1367
+ class Borders
1368
+ include Google::Apis::Core::Hashable
1369
+
1370
+ # A border along a cell.
1371
+ # Corresponds to the JSON property `right`
1372
+ # @return [Google::Apis::SheetsV1::Border]
1373
+ attr_accessor :right
1374
+
1375
+ # A border along a cell.
1376
+ # Corresponds to the JSON property `left`
1377
+ # @return [Google::Apis::SheetsV1::Border]
1378
+ attr_accessor :left
1379
+
1380
+ # A border along a cell.
1381
+ # Corresponds to the JSON property `top`
1382
+ # @return [Google::Apis::SheetsV1::Border]
1383
+ attr_accessor :top
1384
+
1385
+ # A border along a cell.
1386
+ # Corresponds to the JSON property `bottom`
1387
+ # @return [Google::Apis::SheetsV1::Border]
1388
+ attr_accessor :bottom
1389
+
1390
+ def initialize(**args)
1391
+ update!(**args)
1392
+ end
1393
+
1394
+ # Update properties of this object
1395
+ def update!(**args)
1396
+ @right = args[:right] if args.key?(:right)
1397
+ @left = args[:left] if args.key?(:left)
1398
+ @top = args[:top] if args.key?(:top)
1399
+ @bottom = args[:bottom] if args.key?(:bottom)
1400
+ end
1401
+ end
1402
+
1403
+ # Represents a color in the RGBA color space. This representation is designed
1404
+ # for simplicity of conversion to/from color representations in various
1405
+ # languages over compactness; for example, the fields of this representation
1406
+ # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1407
+ # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1408
+ # method in iOS; and, with just a little work, it can be easily formatted into
1409
+ # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1410
+ # Example (Java):
1411
+ # import com.google.type.Color;
1412
+ # // ...
1413
+ # public static java.awt.Color fromProto(Color protocolor) `
1414
+ # float alpha = protocolor.hasAlpha()
1415
+ # ? protocolor.getAlpha().getValue()
1416
+ # : 1.0;
1417
+ # return new java.awt.Color(
1418
+ # protocolor.getRed(),
1419
+ # protocolor.getGreen(),
1420
+ # protocolor.getBlue(),
1421
+ # alpha);
1422
+ # `
1423
+ # public static Color toProto(java.awt.Color color) `
1424
+ # float red = (float) color.getRed();
1425
+ # float green = (float) color.getGreen();
1426
+ # float blue = (float) color.getBlue();
1427
+ # float denominator = 255.0;
1428
+ # Color.Builder resultBuilder =
1429
+ # Color
1430
+ # .newBuilder()
1431
+ # .setRed(red / denominator)
1432
+ # .setGreen(green / denominator)
1433
+ # .setBlue(blue / denominator);
1434
+ # int alpha = color.getAlpha();
1435
+ # if (alpha != 255) `
1436
+ # result.setAlpha(
1437
+ # FloatValue
1438
+ # .newBuilder()
1439
+ # .setValue(((float) alpha) / denominator)
1440
+ # .build());
1441
+ # `
1442
+ # return resultBuilder.build();
1443
+ # `
1444
+ # // ...
1445
+ # Example (iOS / Obj-C):
1446
+ # // ...
1447
+ # static UIColor* fromProto(Color* protocolor) `
1448
+ # float red = [protocolor red];
1449
+ # float green = [protocolor green];
1450
+ # float blue = [protocolor blue];
1451
+ # FloatValue* alpha_wrapper = [protocolor alpha];
1452
+ # float alpha = 1.0;
1453
+ # if (alpha_wrapper != nil) `
1454
+ # alpha = [alpha_wrapper value];
1455
+ # `
1456
+ # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1457
+ # `
1458
+ # static Color* toProto(UIColor* color) `
1459
+ # CGFloat red, green, blue, alpha;
1460
+ # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
1461
+ # return nil;
1462
+ # `
1463
+ # Color* result = [Color alloc] init];
1464
+ # [result setRed:red];
1465
+ # [result setGreen:green];
1466
+ # [result setBlue:blue];
1467
+ # if (alpha <= 0.9999) `
1468
+ # [result setAlpha:floatWrapperWithValue(alpha)];
1469
+ # `
1470
+ # [result autorelease];
1471
+ # return result;
1472
+ # `
1473
+ # // ...
1474
+ # Example (JavaScript):
1475
+ # // ...
1476
+ # var protoToCssColor = function(rgb_color) `
1477
+ # var redFrac = rgb_color.red || 0.0;
1478
+ # var greenFrac = rgb_color.green || 0.0;
1479
+ # var blueFrac = rgb_color.blue || 0.0;
1480
+ # var red = Math.floor(redFrac * 255);
1481
+ # var green = Math.floor(greenFrac * 255);
1482
+ # var blue = Math.floor(blueFrac * 255);
1483
+ # if (!('alpha' in rgb_color)) `
1484
+ # return rgbToCssColor_(red, green, blue);
1485
+ # `
1486
+ # var alphaFrac = rgb_color.alpha.value || 0.0;
1487
+ # var rgbParams = [red, green, blue].join(',');
1488
+ # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1489
+ # `;
1490
+ # var rgbToCssColor_ = function(red, green, blue) `
1491
+ # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1492
+ # var hexString = rgbNumber.toString(16);
1493
+ # var missingZeros = 6 - hexString.length;
1494
+ # var resultBuilder = ['#'];
1495
+ # for (var i = 0; i < missingZeros; i++) `
1496
+ # resultBuilder.push('0');
1497
+ # `
1498
+ # resultBuilder.push(hexString);
1499
+ # return resultBuilder.join('');
1500
+ # `;
1501
+ # // ...
1502
+ class Color
1503
+ include Google::Apis::Core::Hashable
1504
+
1505
+ # The amount of green in the color as a value in the interval [0, 1].
1506
+ # Corresponds to the JSON property `green`
1507
+ # @return [Float]
1508
+ attr_accessor :green
1509
+
1510
+ # The amount of blue in the color as a value in the interval [0, 1].
1511
+ # Corresponds to the JSON property `blue`
1512
+ # @return [Float]
1513
+ attr_accessor :blue
1514
+
1515
+ # The amount of red in the color as a value in the interval [0, 1].
1516
+ # Corresponds to the JSON property `red`
1517
+ # @return [Float]
1518
+ attr_accessor :red
1519
+
1520
+ # The fraction of this color that should be applied to the pixel. That is,
1521
+ # the final pixel color is defined by the equation:
1522
+ # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1523
+ # This means that a value of 1.0 corresponds to a solid color, whereas
1524
+ # a value of 0.0 corresponds to a completely transparent color. This
1525
+ # uses a wrapper message rather than a simple float scalar so that it is
1526
+ # possible to distinguish between a default value and the value being unset.
1527
+ # If omitted, this color object is to be rendered as a solid color
1528
+ # (as if the alpha value had been explicitly given with a value of 1.0).
1529
+ # Corresponds to the JSON property `alpha`
1530
+ # @return [Float]
1531
+ attr_accessor :alpha
1532
+
1533
+ def initialize(**args)
1534
+ update!(**args)
1535
+ end
1536
+
1537
+ # Update properties of this object
1538
+ def update!(**args)
1539
+ @green = args[:green] if args.key?(:green)
1540
+ @blue = args[:blue] if args.key?(:blue)
1541
+ @red = args[:red] if args.key?(:red)
1542
+ @alpha = args[:alpha] if args.key?(:alpha)
1543
+ end
1544
+ end
1545
+
1546
+ # Adds a new sheet.
1547
+ # When a sheet is added at a given index,
1548
+ # all subsequent sheets' indexes are incremented.
1549
+ class AddSheetRequest
1550
+ include Google::Apis::Core::Hashable
1551
+
1552
+ # Properties of a sheet.
1553
+ # Corresponds to the JSON property `properties`
1554
+ # @return [Google::Apis::SheetsV1::SheetProperties]
1555
+ attr_accessor :properties
1556
+
1557
+ def initialize(**args)
1558
+ update!(**args)
1559
+ end
1560
+
1561
+ # Update properties of this object
1562
+ def update!(**args)
1563
+ @properties = args[:properties] if args.key?(:properties)
1564
+ end
1565
+ end
1566
+
1567
+ # Adds a new protected range.
1568
+ class AddProtectedRangeRequest
1569
+ include Google::Apis::Core::Hashable
1570
+
1571
+ # A protected range.
1572
+ # Corresponds to the JSON property `protectedRange`
1573
+ # @return [Google::Apis::SheetsV1::ProtectedRange]
1574
+ attr_accessor :protected_range
1575
+
1576
+ def initialize(**args)
1577
+ update!(**args)
1578
+ end
1579
+
1580
+ # Update properties of this object
1581
+ def update!(**args)
1582
+ @protected_range = args[:protected_range] if args.key?(:protected_range)
1583
+ end
1584
+ end
1585
+
1586
+ # Data within a range of the spreadsheet.
1587
+ class ValueRange
1588
+ include Google::Apis::Core::Hashable
1589
+
1590
+ # The data that was read or to be written. This is an array of arrays,
1591
+ # the outer array representing all the data and each inner array
1592
+ # representing a major dimension. Each item in the inner array
1593
+ # corresponds with one cell.
1594
+ # For output, empty trailing rows and columns will not be included.
1595
+ # For input, supported value types are: bool, string, and double.
1596
+ # Null and empty values will be skipped.
1597
+ # To set a cell to an empty value, set the string value to an empty string.
1598
+ # Corresponds to the JSON property `values`
1599
+ # @return [Array<Array<Object>>]
1600
+ attr_accessor :values
1601
+
1602
+ # The range the values cover, in A1 notation.
1603
+ # For output, this range indicates the entire requested range,
1604
+ # even though the values will exclude trailing rows and columns.
1605
+ # Corresponds to the JSON property `range`
1606
+ # @return [String]
1607
+ attr_accessor :range
1608
+
1609
+ # The major dimension of the values.
1610
+ # For output, if the spreadsheet data is: A1=1,B1=2,A2=3,B2=4,
1611
+ # then requesting range=A1:B2,majorDimension=ROWS will return [[1,2],[3,4]],
1612
+ # whereas requesting range=A1:B2,majorDimension=COLUMNS will return
1613
+ # [[1,3],[2,4]].
1614
+ # For input, with range=A1:B2,majorDimension=ROWS then [[1,2],[3,4]]
1615
+ # will set A1=1,B1=2,A2=3,B2=4. With range=A1:B2,majorDimension=COLUMNS
1616
+ # then [[1,2],[3,4]] will set A1=1,B1=3,A2=2,B2=4.
1617
+ # When writing, if this field is not set, it defaults to ROWS.
1618
+ # Corresponds to the JSON property `majorDimension`
1619
+ # @return [String]
1620
+ attr_accessor :major_dimension
1621
+
1622
+ def initialize(**args)
1623
+ update!(**args)
1624
+ end
1625
+
1626
+ # Update properties of this object
1627
+ def update!(**args)
1628
+ @values = args[:values] if args.key?(:values)
1629
+ @range = args[:range] if args.key?(:range)
1630
+ @major_dimension = args[:major_dimension] if args.key?(:major_dimension)
1631
+ end
1632
+ end
1633
+
1634
+ # The result of the find/replace.
1635
+ class FindReplaceResponse
1636
+ include Google::Apis::Core::Hashable
1637
+
1638
+ # The number of non-formula cells changed.
1639
+ # Corresponds to the JSON property `valuesChanged`
1640
+ # @return [Fixnum]
1641
+ attr_accessor :values_changed
1642
+
1643
+ # The number of rows changed.
1644
+ # Corresponds to the JSON property `rowsChanged`
1645
+ # @return [Fixnum]
1646
+ attr_accessor :rows_changed
1647
+
1648
+ # The number of occurrences (possibly multiple within a cell) changed.
1649
+ # For example, if replacing "e" with o" in "Google Sheets", this would
1650
+ # be "3" because "Google Sheets" -> "Googlo Shoots".
1651
+ # Corresponds to the JSON property `occurrencesChanged`
1652
+ # @return [Fixnum]
1653
+ attr_accessor :occurrences_changed
1654
+
1655
+ # The number of sheets changed.
1656
+ # Corresponds to the JSON property `sheetsChanged`
1657
+ # @return [Fixnum]
1658
+ attr_accessor :sheets_changed
1659
+
1660
+ # The number of formula cells changed.
1661
+ # Corresponds to the JSON property `formulasChanged`
1662
+ # @return [Fixnum]
1663
+ attr_accessor :formulas_changed
1664
+
1665
+ def initialize(**args)
1666
+ update!(**args)
1667
+ end
1668
+
1669
+ # Update properties of this object
1670
+ def update!(**args)
1671
+ @values_changed = args[:values_changed] if args.key?(:values_changed)
1672
+ @rows_changed = args[:rows_changed] if args.key?(:rows_changed)
1673
+ @occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed)
1674
+ @sheets_changed = args[:sheets_changed] if args.key?(:sheets_changed)
1675
+ @formulas_changed = args[:formulas_changed] if args.key?(:formulas_changed)
1676
+ end
1677
+ end
1678
+
1679
+ # The format of a cell.
1680
+ class CellFormat
1681
+ include Google::Apis::Core::Hashable
1682
+
1683
+ # The horizontal alignment of the value in cell.
1684
+ # Corresponds to the JSON property `horizontalAlignment`
1685
+ # @return [String]
1686
+ attr_accessor :horizontal_alignment
1687
+
1688
+ # How a hyperlink, if it exists, should be displayed in the cell.
1689
+ # Corresponds to the JSON property `hyperlinkDisplayType`
1690
+ # @return [String]
1691
+ attr_accessor :hyperlink_display_type
1692
+
1693
+ # The borders of the cell.
1694
+ # Corresponds to the JSON property `borders`
1695
+ # @return [Google::Apis::SheetsV1::Borders]
1696
+ attr_accessor :borders
1697
+
1698
+ # The direction of the text in the cell.
1699
+ # Corresponds to the JSON property `textDirection`
1700
+ # @return [String]
1701
+ attr_accessor :text_direction
1702
+
1703
+ # The format of a run of text in a cell.
1704
+ # Absent values indicate that the field isn't specified.
1705
+ # Corresponds to the JSON property `textFormat`
1706
+ # @return [Google::Apis::SheetsV1::TextFormat]
1707
+ attr_accessor :text_format
1708
+
1709
+ # The amount of padding around the cell, in pixels.
1710
+ # When updating padding, every field must be specified.
1711
+ # Corresponds to the JSON property `padding`
1712
+ # @return [Google::Apis::SheetsV1::Padding]
1713
+ attr_accessor :padding
1714
+
1715
+ # The number format of a cell.
1716
+ # When updating, all fields must be set.
1717
+ # Corresponds to the JSON property `numberFormat`
1718
+ # @return [Google::Apis::SheetsV1::NumberFormat]
1719
+ attr_accessor :number_format
1720
+
1721
+ # The wrap strategy for the value in the cell.
1722
+ # Corresponds to the JSON property `wrapStrategy`
1723
+ # @return [String]
1724
+ attr_accessor :wrap_strategy
1725
+
1726
+ # Represents a color in the RGBA color space. This representation is designed
1727
+ # for simplicity of conversion to/from color representations in various
1728
+ # languages over compactness; for example, the fields of this representation
1729
+ # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1730
+ # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1731
+ # method in iOS; and, with just a little work, it can be easily formatted into
1732
+ # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1733
+ # Example (Java):
1734
+ # import com.google.type.Color;
1735
+ # // ...
1736
+ # public static java.awt.Color fromProto(Color protocolor) `
1737
+ # float alpha = protocolor.hasAlpha()
1738
+ # ? protocolor.getAlpha().getValue()
1739
+ # : 1.0;
1740
+ # return new java.awt.Color(
1741
+ # protocolor.getRed(),
1742
+ # protocolor.getGreen(),
1743
+ # protocolor.getBlue(),
1744
+ # alpha);
1745
+ # `
1746
+ # public static Color toProto(java.awt.Color color) `
1747
+ # float red = (float) color.getRed();
1748
+ # float green = (float) color.getGreen();
1749
+ # float blue = (float) color.getBlue();
1750
+ # float denominator = 255.0;
1751
+ # Color.Builder resultBuilder =
1752
+ # Color
1753
+ # .newBuilder()
1754
+ # .setRed(red / denominator)
1755
+ # .setGreen(green / denominator)
1756
+ # .setBlue(blue / denominator);
1757
+ # int alpha = color.getAlpha();
1758
+ # if (alpha != 255) `
1759
+ # result.setAlpha(
1760
+ # FloatValue
1761
+ # .newBuilder()
1762
+ # .setValue(((float) alpha) / denominator)
1763
+ # .build());
1764
+ # `
1765
+ # return resultBuilder.build();
1766
+ # `
1767
+ # // ...
1768
+ # Example (iOS / Obj-C):
1769
+ # // ...
1770
+ # static UIColor* fromProto(Color* protocolor) `
1771
+ # float red = [protocolor red];
1772
+ # float green = [protocolor green];
1773
+ # float blue = [protocolor blue];
1774
+ # FloatValue* alpha_wrapper = [protocolor alpha];
1775
+ # float alpha = 1.0;
1776
+ # if (alpha_wrapper != nil) `
1777
+ # alpha = [alpha_wrapper value];
1778
+ # `
1779
+ # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1780
+ # `
1781
+ # static Color* toProto(UIColor* color) `
1782
+ # CGFloat red, green, blue, alpha;
1783
+ # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
1784
+ # return nil;
1785
+ # `
1786
+ # Color* result = [Color alloc] init];
1787
+ # [result setRed:red];
1788
+ # [result setGreen:green];
1789
+ # [result setBlue:blue];
1790
+ # if (alpha <= 0.9999) `
1791
+ # [result setAlpha:floatWrapperWithValue(alpha)];
1792
+ # `
1793
+ # [result autorelease];
1794
+ # return result;
1795
+ # `
1796
+ # // ...
1797
+ # Example (JavaScript):
1798
+ # // ...
1799
+ # var protoToCssColor = function(rgb_color) `
1800
+ # var redFrac = rgb_color.red || 0.0;
1801
+ # var greenFrac = rgb_color.green || 0.0;
1802
+ # var blueFrac = rgb_color.blue || 0.0;
1803
+ # var red = Math.floor(redFrac * 255);
1804
+ # var green = Math.floor(greenFrac * 255);
1805
+ # var blue = Math.floor(blueFrac * 255);
1806
+ # if (!('alpha' in rgb_color)) `
1807
+ # return rgbToCssColor_(red, green, blue);
1808
+ # `
1809
+ # var alphaFrac = rgb_color.alpha.value || 0.0;
1810
+ # var rgbParams = [red, green, blue].join(',');
1811
+ # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1812
+ # `;
1813
+ # var rgbToCssColor_ = function(red, green, blue) `
1814
+ # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1815
+ # var hexString = rgbNumber.toString(16);
1816
+ # var missingZeros = 6 - hexString.length;
1817
+ # var resultBuilder = ['#'];
1818
+ # for (var i = 0; i < missingZeros; i++) `
1819
+ # resultBuilder.push('0');
1820
+ # `
1821
+ # resultBuilder.push(hexString);
1822
+ # return resultBuilder.join('');
1823
+ # `;
1824
+ # // ...
1825
+ # Corresponds to the JSON property `backgroundColor`
1826
+ # @return [Google::Apis::SheetsV1::Color]
1827
+ attr_accessor :background_color
1828
+
1829
+ # The vertical alignment of the value in cell.
1830
+ # Corresponds to the JSON property `verticalAlignment`
1831
+ # @return [String]
1832
+ attr_accessor :vertical_alignment
1833
+
1834
+ def initialize(**args)
1835
+ update!(**args)
1836
+ end
1837
+
1838
+ # Update properties of this object
1839
+ def update!(**args)
1840
+ @horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment)
1841
+ @hyperlink_display_type = args[:hyperlink_display_type] if args.key?(:hyperlink_display_type)
1842
+ @borders = args[:borders] if args.key?(:borders)
1843
+ @text_direction = args[:text_direction] if args.key?(:text_direction)
1844
+ @text_format = args[:text_format] if args.key?(:text_format)
1845
+ @padding = args[:padding] if args.key?(:padding)
1846
+ @number_format = args[:number_format] if args.key?(:number_format)
1847
+ @wrap_strategy = args[:wrap_strategy] if args.key?(:wrap_strategy)
1848
+ @background_color = args[:background_color] if args.key?(:background_color)
1849
+ @vertical_alignment = args[:vertical_alignment] if args.key?(:vertical_alignment)
1850
+ end
1851
+ end
1852
+
1853
+ # Moves one or more rows or columns.
1854
+ class MoveDimensionRequest
1855
+ include Google::Apis::Core::Hashable
1856
+
1857
+ # The 0-based start index of where to move the source data to,
1858
+ # based on the coordinates *before* the source data is removed
1859
+ # from the grid. Existing data will be shifted down or right
1860
+ # (depending on the dimension) to make room for the moved dimensions.
1861
+ # The source dimensions are removed from the grid, so the
1862
+ # the data may end up in a different index than specified.
1863
+ # For example, given A1..A5 of 0, 1, 2, 3, 4 and wanting to move
1864
+ # "1" and "2" to between "3" and "4", the source would be `ROWS [1..3)`,
1865
+ # and the destination index would be '4' (the 0-based index of row 5).
1866
+ # The end result would be A1..A5 of 0, 3, 1, 2, 4.
1867
+ # Corresponds to the JSON property `destinationIndex`
1868
+ # @return [Fixnum]
1869
+ attr_accessor :destination_index
1870
+
1871
+ # A range along a single dimension on a sheet.
1872
+ # All indexes are 0-based.
1873
+ # Indexes are half open, e.g the start index is inclusive
1874
+ # and the end index is exclusive -- [start_index, end_index).
1875
+ # Missing indexes indicate the range is unbounded on that side.
1876
+ # Corresponds to the JSON property `source`
1877
+ # @return [Google::Apis::SheetsV1::DimensionRange]
1878
+ attr_accessor :source
1879
+
1880
+ def initialize(**args)
1881
+ update!(**args)
1882
+ end
1883
+
1884
+ # Update properties of this object
1885
+ def update!(**args)
1886
+ @destination_index = args[:destination_index] if args.key?(:destination_index)
1887
+ @source = args[:source] if args.key?(:source)
1888
+ end
1889
+ end
1890
+
1891
+ # Properties about a dimension.
1892
+ class DimensionProperties
1893
+ include Google::Apis::Core::Hashable
1894
+
1895
+ # The height (if a row) or width (if a column) of the dimension in pixels.
1896
+ # Corresponds to the JSON property `pixelSize`
1897
+ # @return [Fixnum]
1898
+ attr_accessor :pixel_size
1899
+
1900
+ # True if this dimension is explicitly hidden.
1901
+ # Corresponds to the JSON property `hiddenByUser`
1902
+ # @return [Boolean]
1903
+ attr_accessor :hidden_by_user
1904
+ alias_method :hidden_by_user?, :hidden_by_user
1905
+
1906
+ # True if this dimension is being filtered.
1907
+ # This field is read-only.
1908
+ # Corresponds to the JSON property `hiddenByFilter`
1909
+ # @return [Boolean]
1910
+ attr_accessor :hidden_by_filter
1911
+ alias_method :hidden_by_filter?, :hidden_by_filter
1912
+
1913
+ def initialize(**args)
1914
+ update!(**args)
1915
+ end
1916
+
1917
+ # Update properties of this object
1918
+ def update!(**args)
1919
+ @pixel_size = args[:pixel_size] if args.key?(:pixel_size)
1920
+ @hidden_by_user = args[:hidden_by_user] if args.key?(:hidden_by_user)
1921
+ @hidden_by_filter = args[:hidden_by_filter] if args.key?(:hidden_by_filter)
1922
+ end
1923
+ end
1924
+
1925
+ # A single interpolation point a gradient conditional format.
1926
+ # These pin the gradient color scale according to the color,
1927
+ # type and value chosen.
1928
+ class InterpolationPoint
1929
+ include Google::Apis::Core::Hashable
1930
+
1931
+ # The value this interpolation point uses. May be a formula.
1932
+ # Unused if pointType is MIN or MAX.
1933
+ # Corresponds to the JSON property `value`
1934
+ # @return [String]
1935
+ attr_accessor :value
1936
+
1937
+ # Represents a color in the RGBA color space. This representation is designed
1938
+ # for simplicity of conversion to/from color representations in various
1939
+ # languages over compactness; for example, the fields of this representation
1940
+ # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1941
+ # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1942
+ # method in iOS; and, with just a little work, it can be easily formatted into
1943
+ # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1944
+ # Example (Java):
1945
+ # import com.google.type.Color;
1946
+ # // ...
1947
+ # public static java.awt.Color fromProto(Color protocolor) `
1948
+ # float alpha = protocolor.hasAlpha()
1949
+ # ? protocolor.getAlpha().getValue()
1950
+ # : 1.0;
1951
+ # return new java.awt.Color(
1952
+ # protocolor.getRed(),
1953
+ # protocolor.getGreen(),
1954
+ # protocolor.getBlue(),
1955
+ # alpha);
1956
+ # `
1957
+ # public static Color toProto(java.awt.Color color) `
1958
+ # float red = (float) color.getRed();
1959
+ # float green = (float) color.getGreen();
1960
+ # float blue = (float) color.getBlue();
1961
+ # float denominator = 255.0;
1962
+ # Color.Builder resultBuilder =
1963
+ # Color
1964
+ # .newBuilder()
1965
+ # .setRed(red / denominator)
1966
+ # .setGreen(green / denominator)
1967
+ # .setBlue(blue / denominator);
1968
+ # int alpha = color.getAlpha();
1969
+ # if (alpha != 255) `
1970
+ # result.setAlpha(
1971
+ # FloatValue
1972
+ # .newBuilder()
1973
+ # .setValue(((float) alpha) / denominator)
1974
+ # .build());
1975
+ # `
1976
+ # return resultBuilder.build();
1977
+ # `
1978
+ # // ...
1979
+ # Example (iOS / Obj-C):
1980
+ # // ...
1981
+ # static UIColor* fromProto(Color* protocolor) `
1982
+ # float red = [protocolor red];
1983
+ # float green = [protocolor green];
1984
+ # float blue = [protocolor blue];
1985
+ # FloatValue* alpha_wrapper = [protocolor alpha];
1986
+ # float alpha = 1.0;
1987
+ # if (alpha_wrapper != nil) `
1988
+ # alpha = [alpha_wrapper value];
1989
+ # `
1990
+ # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1991
+ # `
1992
+ # static Color* toProto(UIColor* color) `
1993
+ # CGFloat red, green, blue, alpha;
1994
+ # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
1995
+ # return nil;
1996
+ # `
1997
+ # Color* result = [Color alloc] init];
1998
+ # [result setRed:red];
1999
+ # [result setGreen:green];
2000
+ # [result setBlue:blue];
2001
+ # if (alpha <= 0.9999) `
2002
+ # [result setAlpha:floatWrapperWithValue(alpha)];
2003
+ # `
2004
+ # [result autorelease];
2005
+ # return result;
2006
+ # `
2007
+ # // ...
2008
+ # Example (JavaScript):
2009
+ # // ...
2010
+ # var protoToCssColor = function(rgb_color) `
2011
+ # var redFrac = rgb_color.red || 0.0;
2012
+ # var greenFrac = rgb_color.green || 0.0;
2013
+ # var blueFrac = rgb_color.blue || 0.0;
2014
+ # var red = Math.floor(redFrac * 255);
2015
+ # var green = Math.floor(greenFrac * 255);
2016
+ # var blue = Math.floor(blueFrac * 255);
2017
+ # if (!('alpha' in rgb_color)) `
2018
+ # return rgbToCssColor_(red, green, blue);
2019
+ # `
2020
+ # var alphaFrac = rgb_color.alpha.value || 0.0;
2021
+ # var rgbParams = [red, green, blue].join(',');
2022
+ # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2023
+ # `;
2024
+ # var rgbToCssColor_ = function(red, green, blue) `
2025
+ # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2026
+ # var hexString = rgbNumber.toString(16);
2027
+ # var missingZeros = 6 - hexString.length;
2028
+ # var resultBuilder = ['#'];
2029
+ # for (var i = 0; i < missingZeros; i++) `
2030
+ # resultBuilder.push('0');
2031
+ # `
2032
+ # resultBuilder.push(hexString);
2033
+ # return resultBuilder.join('');
2034
+ # `;
2035
+ # // ...
2036
+ # Corresponds to the JSON property `color`
2037
+ # @return [Google::Apis::SheetsV1::Color]
2038
+ attr_accessor :color
2039
+
2040
+ # How the value should be interpreted.
2041
+ # Corresponds to the JSON property `type`
2042
+ # @return [String]
2043
+ attr_accessor :type
2044
+
2045
+ def initialize(**args)
2046
+ update!(**args)
2047
+ end
2048
+
2049
+ # Update properties of this object
2050
+ def update!(**args)
2051
+ @value = args[:value] if args.key?(:value)
2052
+ @color = args[:color] if args.key?(:color)
2053
+ @type = args[:type] if args.key?(:type)
2054
+ end
2055
+ end
2056
+
2057
+ # An error in a cell.
2058
+ class ErrorValue
2059
+ include Google::Apis::Core::Hashable
2060
+
2061
+ # The type of error.
2062
+ # Corresponds to the JSON property `type`
2063
+ # @return [String]
2064
+ attr_accessor :type
2065
+
2066
+ # A message with more information about the error
2067
+ # (in the spreadsheet's locale).
2068
+ # Corresponds to the JSON property `message`
2069
+ # @return [String]
2070
+ attr_accessor :message
2071
+
2072
+ def initialize(**args)
2073
+ update!(**args)
2074
+ end
2075
+
2076
+ # Update properties of this object
2077
+ def update!(**args)
2078
+ @type = args[:type] if args.key?(:type)
2079
+ @message = args[:message] if args.key?(:message)
2080
+ end
2081
+ end
2082
+
2083
+ # Duplicates a particular filter view.
2084
+ class DuplicateFilterViewRequest
2085
+ include Google::Apis::Core::Hashable
2086
+
2087
+ # The ID of the filter being duplicated.
2088
+ # Corresponds to the JSON property `filterId`
2089
+ # @return [Fixnum]
2090
+ attr_accessor :filter_id
2091
+
2092
+ def initialize(**args)
2093
+ update!(**args)
2094
+ end
2095
+
2096
+ # Update properties of this object
2097
+ def update!(**args)
2098
+ @filter_id = args[:filter_id] if args.key?(:filter_id)
2099
+ end
2100
+ end
2101
+
2102
+ # The request for updating any aspect of a spreadsheet.
2103
+ class BatchUpdateSpreadsheetRequest
2104
+ include Google::Apis::Core::Hashable
2105
+
2106
+ # A list of updates to apply to the spreadsheet.
2107
+ # Corresponds to the JSON property `requests`
2108
+ # @return [Array<Google::Apis::SheetsV1::Request>]
2109
+ attr_accessor :requests
2110
+
2111
+ def initialize(**args)
2112
+ update!(**args)
2113
+ end
2114
+
2115
+ # Update properties of this object
2116
+ def update!(**args)
2117
+ @requests = args[:requests] if args.key?(:requests)
2118
+ end
2119
+ end
2120
+
2121
+ # Properties of a sheet.
2122
+ class SheetProperties
2123
+ include Google::Apis::Core::Hashable
2124
+
2125
+ # The name of the sheet.
2126
+ # Corresponds to the JSON property `title`
2127
+ # @return [String]
2128
+ attr_accessor :title
2129
+
2130
+ # The index of the sheet within the spreadsheet.
2131
+ # This uses a wrapper message rather than simple int32 value
2132
+ # so that adding a new sheet can distinguish between adding
2133
+ # it at index 0 and adding it at the default (end) location.
2134
+ # Corresponds to the JSON property `index`
2135
+ # @return [Fixnum]
2136
+ attr_accessor :index
2137
+
2138
+ # True if the sheet is hidden in the UI, false if it's visible.
2139
+ # Corresponds to the JSON property `hidden`
2140
+ # @return [Boolean]
2141
+ attr_accessor :hidden
2142
+ alias_method :hidden?, :hidden
2143
+
2144
+ # Properties of a grid.
2145
+ # Corresponds to the JSON property `gridProperties`
2146
+ # @return [Google::Apis::SheetsV1::GridProperties]
2147
+ attr_accessor :grid_properties
2148
+
2149
+ # The ID of the sheet.
2150
+ # This field cannot be changed once set.
2151
+ # This uses a wrapper message rather than simple int32 value because
2152
+ # the sheet_id '0' is very common and we want the ID to be explicit.
2153
+ # Corresponds to the JSON property `sheetId`
2154
+ # @return [Fixnum]
2155
+ attr_accessor :sheet_id
2156
+
2157
+ # True if the sheet is an RTL sheet instead of an LTR sheet.
2158
+ # Corresponds to the JSON property `rightToLeft`
2159
+ # @return [Boolean]
2160
+ attr_accessor :right_to_left
2161
+ alias_method :right_to_left?, :right_to_left
2162
+
2163
+ # Represents a color in the RGBA color space. This representation is designed
2164
+ # for simplicity of conversion to/from color representations in various
2165
+ # languages over compactness; for example, the fields of this representation
2166
+ # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2167
+ # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2168
+ # method in iOS; and, with just a little work, it can be easily formatted into
2169
+ # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2170
+ # Example (Java):
2171
+ # import com.google.type.Color;
2172
+ # // ...
2173
+ # public static java.awt.Color fromProto(Color protocolor) `
2174
+ # float alpha = protocolor.hasAlpha()
2175
+ # ? protocolor.getAlpha().getValue()
2176
+ # : 1.0;
2177
+ # return new java.awt.Color(
2178
+ # protocolor.getRed(),
2179
+ # protocolor.getGreen(),
2180
+ # protocolor.getBlue(),
2181
+ # alpha);
2182
+ # `
2183
+ # public static Color toProto(java.awt.Color color) `
2184
+ # float red = (float) color.getRed();
2185
+ # float green = (float) color.getGreen();
2186
+ # float blue = (float) color.getBlue();
2187
+ # float denominator = 255.0;
2188
+ # Color.Builder resultBuilder =
2189
+ # Color
2190
+ # .newBuilder()
2191
+ # .setRed(red / denominator)
2192
+ # .setGreen(green / denominator)
2193
+ # .setBlue(blue / denominator);
2194
+ # int alpha = color.getAlpha();
2195
+ # if (alpha != 255) `
2196
+ # result.setAlpha(
2197
+ # FloatValue
2198
+ # .newBuilder()
2199
+ # .setValue(((float) alpha) / denominator)
2200
+ # .build());
2201
+ # `
2202
+ # return resultBuilder.build();
2203
+ # `
2204
+ # // ...
2205
+ # Example (iOS / Obj-C):
2206
+ # // ...
2207
+ # static UIColor* fromProto(Color* protocolor) `
2208
+ # float red = [protocolor red];
2209
+ # float green = [protocolor green];
2210
+ # float blue = [protocolor blue];
2211
+ # FloatValue* alpha_wrapper = [protocolor alpha];
2212
+ # float alpha = 1.0;
2213
+ # if (alpha_wrapper != nil) `
2214
+ # alpha = [alpha_wrapper value];
2215
+ # `
2216
+ # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2217
+ # `
2218
+ # static Color* toProto(UIColor* color) `
2219
+ # CGFloat red, green, blue, alpha;
2220
+ # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
2221
+ # return nil;
2222
+ # `
2223
+ # Color* result = [Color alloc] init];
2224
+ # [result setRed:red];
2225
+ # [result setGreen:green];
2226
+ # [result setBlue:blue];
2227
+ # if (alpha <= 0.9999) `
2228
+ # [result setAlpha:floatWrapperWithValue(alpha)];
2229
+ # `
2230
+ # [result autorelease];
2231
+ # return result;
2232
+ # `
2233
+ # // ...
2234
+ # Example (JavaScript):
2235
+ # // ...
2236
+ # var protoToCssColor = function(rgb_color) `
2237
+ # var redFrac = rgb_color.red || 0.0;
2238
+ # var greenFrac = rgb_color.green || 0.0;
2239
+ # var blueFrac = rgb_color.blue || 0.0;
2240
+ # var red = Math.floor(redFrac * 255);
2241
+ # var green = Math.floor(greenFrac * 255);
2242
+ # var blue = Math.floor(blueFrac * 255);
2243
+ # if (!('alpha' in rgb_color)) `
2244
+ # return rgbToCssColor_(red, green, blue);
2245
+ # `
2246
+ # var alphaFrac = rgb_color.alpha.value || 0.0;
2247
+ # var rgbParams = [red, green, blue].join(',');
2248
+ # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2249
+ # `;
2250
+ # var rgbToCssColor_ = function(red, green, blue) `
2251
+ # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2252
+ # var hexString = rgbNumber.toString(16);
2253
+ # var missingZeros = 6 - hexString.length;
2254
+ # var resultBuilder = ['#'];
2255
+ # for (var i = 0; i < missingZeros; i++) `
2256
+ # resultBuilder.push('0');
2257
+ # `
2258
+ # resultBuilder.push(hexString);
2259
+ # return resultBuilder.join('');
2260
+ # `;
2261
+ # // ...
2262
+ # Corresponds to the JSON property `tabColor`
2263
+ # @return [Google::Apis::SheetsV1::Color]
2264
+ attr_accessor :tab_color
2265
+
2266
+ # The type of sheet.
2267
+ # This field is read-only.
2268
+ # Corresponds to the JSON property `sheetType`
2269
+ # @return [String]
2270
+ attr_accessor :sheet_type
2271
+
2272
+ def initialize(**args)
2273
+ update!(**args)
2274
+ end
2275
+
2276
+ # Update properties of this object
2277
+ def update!(**args)
2278
+ @title = args[:title] if args.key?(:title)
2279
+ @index = args[:index] if args.key?(:index)
2280
+ @hidden = args[:hidden] if args.key?(:hidden)
2281
+ @grid_properties = args[:grid_properties] if args.key?(:grid_properties)
2282
+ @sheet_id = args[:sheet_id] if args.key?(:sheet_id)
2283
+ @right_to_left = args[:right_to_left] if args.key?(:right_to_left)
2284
+ @tab_color = args[:tab_color] if args.key?(:tab_color)
2285
+ @sheet_type = args[:sheet_type] if args.key?(:sheet_type)
2286
+ end
2287
+ end
2288
+
2289
+ # A protected range.
2290
+ class ProtectedRange
2291
+ include Google::Apis::Core::Hashable
2292
+
2293
+ # The list of unprotected ranges within a protected sheet.
2294
+ # Unprotected ranges are only supported on protected sheets.
2295
+ # Corresponds to the JSON property `unprotectedRanges`
2296
+ # @return [Array<Google::Apis::SheetsV1::GridRange>]
2297
+ attr_accessor :unprotected_ranges
2298
+
2299
+ # The description of this protected range.
2300
+ # Corresponds to the JSON property `description`
2301
+ # @return [String]
2302
+ attr_accessor :description
2303
+
2304
+ # The named range this protected range is backed by, if any.
2305
+ # When writing, only one of range or namedRangeId may be set.
2306
+ # Corresponds to the JSON property `namedRangeId`
2307
+ # @return [Fixnum]
2308
+ attr_accessor :named_range_id
2309
+
2310
+ # True if the user who requested this protected range can edit the
2311
+ # protected area.
2312
+ # This field is read-only.
2313
+ # Corresponds to the JSON property `requestingUserCanEdit`
2314
+ # @return [Boolean]
2315
+ attr_accessor :requesting_user_can_edit
2316
+ alias_method :requesting_user_can_edit?, :requesting_user_can_edit
2317
+
2318
+ # The editors of a protected range.
2319
+ # Corresponds to the JSON property `editors`
2320
+ # @return [Google::Apis::SheetsV1::Editors]
2321
+ attr_accessor :editors
2322
+
2323
+ # The ID of the protected range.
2324
+ # This field is read-only.
2325
+ # Corresponds to the JSON property `protectedRangeId`
2326
+ # @return [Fixnum]
2327
+ attr_accessor :protected_range_id
2328
+
2329
+ # True if this this protected range will show a warning when editing.
2330
+ # Warning-based protection means that every user can edit data in the
2331
+ # protected range, except editing will prompt a warning asking the user
2332
+ # to confirm the edit.
2333
+ # When warning: if this field is true, then `editors` is ignored.
2334
+ # Additionally, if this field is changed from true to false and the
2335
+ # editors field is not set (nor included in the field mask), then
2336
+ # the editors will be set to all the editors in the document.
2337
+ # Corresponds to the JSON property `warningOnly`
2338
+ # @return [Boolean]
2339
+ attr_accessor :warning_only
2340
+ alias_method :warning_only?, :warning_only
2341
+
2342
+ # A range on a sheet.
2343
+ # All indexes are 0-based.
2344
+ # Indexes are half open, e.g the start index is inclusive
2345
+ # and the end index is exclusive -- [start_index, end_index).
2346
+ # Missing indexes indicate the range is unbounded on that side.
2347
+ # For example, if "Sheet1" is grid ID 0, then:
2348
+ # Sheet1!A1:A1 == sheet_id: 0,
2349
+ # start_row_index: 0, end_row_index: 1,
2350
+ # start_column_index: 0, end_column_index: 1
2351
+ # Sheet1!A3:B4 == sheet_id: 0,
2352
+ # start_row_index: 2, end_row_index: 4,
2353
+ # start_column_index: 0, end_column_index: 2
2354
+ # Sheet1!A:B == sheet_id: 0,
2355
+ # start_column_index: 0, end_column_index: 2
2356
+ # Sheet1!A5:B == sheet_id: 0,
2357
+ # start_row_index: 4,
2358
+ # start_column_index: 0, end_column_index: 2
2359
+ # Sheet1 == sheet_id:0
2360
+ # The start index must always be less than or equal to the end index.
2361
+ # If the start index equals the end index, then the range is empty.
2362
+ # Empty ranges are typically not meaningful and are usually rendered in the
2363
+ # UI as "#REF!".
2364
+ # Corresponds to the JSON property `range`
2365
+ # @return [Google::Apis::SheetsV1::GridRange]
2366
+ attr_accessor :range
2367
+
2368
+ def initialize(**args)
2369
+ update!(**args)
2370
+ end
2371
+
2372
+ # Update properties of this object
2373
+ def update!(**args)
2374
+ @unprotected_ranges = args[:unprotected_ranges] if args.key?(:unprotected_ranges)
2375
+ @description = args[:description] if args.key?(:description)
2376
+ @named_range_id = args[:named_range_id] if args.key?(:named_range_id)
2377
+ @requesting_user_can_edit = args[:requesting_user_can_edit] if args.key?(:requesting_user_can_edit)
2378
+ @editors = args[:editors] if args.key?(:editors)
2379
+ @protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id)
2380
+ @warning_only = args[:warning_only] if args.key?(:warning_only)
2381
+ @range = args[:range] if args.key?(:range)
2382
+ end
2383
+ end
2384
+
2385
+ # Deletes a conditional format rule at the given index.
2386
+ # All subsequent rules' indexes are decremented.
2387
+ class DeleteConditionalFormatRuleRequest
2388
+ include Google::Apis::Core::Hashable
2389
+
2390
+ # The sheet the rule is being deleted from.
2391
+ # Corresponds to the JSON property `sheetId`
2392
+ # @return [Fixnum]
2393
+ attr_accessor :sheet_id
2394
+
2395
+ # The 0-based index of the rule to be deleted.
2396
+ # Corresponds to the JSON property `index`
2397
+ # @return [Fixnum]
2398
+ attr_accessor :index
2399
+
2400
+ def initialize(**args)
2401
+ update!(**args)
2402
+ end
2403
+
2404
+ # Update properties of this object
2405
+ def update!(**args)
2406
+ @sheet_id = args[:sheet_id] if args.key?(:sheet_id)
2407
+ @index = args[:index] if args.key?(:index)
2408
+ end
2409
+ end
2410
+
2411
+ # A combination of a source range and how to extend that source.
2412
+ class SourceAndDestination
2413
+ include Google::Apis::Core::Hashable
2414
+
2415
+ # The number of rows or columns that data should be filled into.
2416
+ # Positive numbers expand beyond the last row or last column
2417
+ # of the source. Negative numbers expand before the first row
2418
+ # or first column of the source.
2419
+ # Corresponds to the JSON property `fillLength`
2420
+ # @return [Fixnum]
2421
+ attr_accessor :fill_length
2422
+
2423
+ # A range on a sheet.
2424
+ # All indexes are 0-based.
2425
+ # Indexes are half open, e.g the start index is inclusive
2426
+ # and the end index is exclusive -- [start_index, end_index).
2427
+ # Missing indexes indicate the range is unbounded on that side.
2428
+ # For example, if "Sheet1" is grid ID 0, then:
2429
+ # Sheet1!A1:A1 == sheet_id: 0,
2430
+ # start_row_index: 0, end_row_index: 1,
2431
+ # start_column_index: 0, end_column_index: 1
2432
+ # Sheet1!A3:B4 == sheet_id: 0,
2433
+ # start_row_index: 2, end_row_index: 4,
2434
+ # start_column_index: 0, end_column_index: 2
2435
+ # Sheet1!A:B == sheet_id: 0,
2436
+ # start_column_index: 0, end_column_index: 2
2437
+ # Sheet1!A5:B == sheet_id: 0,
2438
+ # start_row_index: 4,
2439
+ # start_column_index: 0, end_column_index: 2
2440
+ # Sheet1 == sheet_id:0
2441
+ # The start index must always be less than or equal to the end index.
2442
+ # If the start index equals the end index, then the range is empty.
2443
+ # Empty ranges are typically not meaningful and are usually rendered in the
2444
+ # UI as "#REF!".
2445
+ # Corresponds to the JSON property `source`
2446
+ # @return [Google::Apis::SheetsV1::GridRange]
2447
+ attr_accessor :source
2448
+
2449
+ # The dimension that data should be filled into.
2450
+ # Corresponds to the JSON property `dimension`
2451
+ # @return [String]
2452
+ attr_accessor :dimension
2453
+
2454
+ def initialize(**args)
2455
+ update!(**args)
2456
+ end
2457
+
2458
+ # Update properties of this object
2459
+ def update!(**args)
2460
+ @fill_length = args[:fill_length] if args.key?(:fill_length)
2461
+ @source = args[:source] if args.key?(:source)
2462
+ @dimension = args[:dimension] if args.key?(:dimension)
2463
+ end
2464
+ end
2465
+
2466
+ # The value of the condition.
2467
+ class ConditionValue
2468
+ include Google::Apis::Core::Hashable
2469
+
2470
+ # A relative date (based on the current date).
2471
+ # Valid only if the type is DATE_BEFORE, DATE_AFTER,
2472
+ # DATE_ON_OR_BEFORE or DATE_ON_OR_AFTER.
2473
+ # Relative dates are not supported in data validation.
2474
+ # They are supported only in conditional formatting and
2475
+ # conditional filters.
2476
+ # Corresponds to the JSON property `relativeDate`
2477
+ # @return [String]
2478
+ attr_accessor :relative_date
2479
+
2480
+ # A value the condition is based on.
2481
+ # The value will be parsed as if the user typed into a cell.
2482
+ # Formulas are supported (and must begin with an '=').
2483
+ # Corresponds to the JSON property `userEnteredValue`
2484
+ # @return [String]
2485
+ attr_accessor :user_entered_value
2486
+
2487
+ def initialize(**args)
2488
+ update!(**args)
2489
+ end
2490
+
2491
+ # Update properties of this object
2492
+ def update!(**args)
2493
+ @relative_date = args[:relative_date] if args.key?(:relative_date)
2494
+ @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value)
2495
+ end
2496
+ end
2497
+
2498
+ # Inserts data into the spreadsheet starting at the specified coordinate.
2499
+ class PasteDataRequest
2500
+ include Google::Apis::Core::Hashable
2501
+
2502
+ # The data to insert.
2503
+ # Corresponds to the JSON property `data`
2504
+ # @return [String]
2505
+ attr_accessor :data
2506
+
2507
+ # A coordinate in a sheet.
2508
+ # All indexes are 0-based.
2509
+ # Corresponds to the JSON property `coordinate`
2510
+ # @return [Google::Apis::SheetsV1::GridCoordinate]
2511
+ attr_accessor :coordinate
2512
+
2513
+ # The delimiter in the data.
2514
+ # Corresponds to the JSON property `delimiter`
2515
+ # @return [String]
2516
+ attr_accessor :delimiter
2517
+
2518
+ # How the data should be pasted.
2519
+ # Corresponds to the JSON property `type`
2520
+ # @return [String]
2521
+ attr_accessor :type
2522
+
2523
+ # True if the data is HTML.
2524
+ # Corresponds to the JSON property `html`
2525
+ # @return [Boolean]
2526
+ attr_accessor :html
2527
+ alias_method :html?, :html
2528
+
2529
+ def initialize(**args)
2530
+ update!(**args)
2531
+ end
2532
+
2533
+ # Update properties of this object
2534
+ def update!(**args)
2535
+ @data = args[:data] if args.key?(:data)
2536
+ @coordinate = args[:coordinate] if args.key?(:coordinate)
2537
+ @delimiter = args[:delimiter] if args.key?(:delimiter)
2538
+ @type = args[:type] if args.key?(:type)
2539
+ @html = args[:html] if args.key?(:html)
2540
+ end
2541
+ end
2542
+
2543
+ # Finds and replaces data in cells over a range, sheet, or all sheets.
2544
+ class FindReplaceRequest
2545
+ include Google::Apis::Core::Hashable
2546
+
2547
+ # The value to search.
2548
+ # Corresponds to the JSON property `find`
2549
+ # @return [String]
2550
+ attr_accessor :find
2551
+
2552
+ # The value to use as the replacement.
2553
+ # Corresponds to the JSON property `replacement`
2554
+ # @return [String]
2555
+ attr_accessor :replacement
2556
+
2557
+ # True if the find value is a regex.
2558
+ # The regular expression and replacement should follow Java regex rules
2559
+ # at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html.
2560
+ # The replacement string is allowed to refer to capturing groups.
2561
+ # For example, with cells "Google Sheets" and "Google Docs",
2562
+ # searching for "o.* (.*)" with a replacement of "$1 Rocks" would create
2563
+ # "GSheets Rocks" and "GDocs Rocks" respectively.
2564
+ # Corresponds to the JSON property `searchByRegex`
2565
+ # @return [Boolean]
2566
+ attr_accessor :search_by_regex
2567
+ alias_method :search_by_regex?, :search_by_regex
2568
+
2569
+ # The sheet to find/replace over.
2570
+ # Corresponds to the JSON property `sheetId`
2571
+ # @return [Fixnum]
2572
+ attr_accessor :sheet_id
2573
+
2574
+ # True to find/replace over all sheets.
2575
+ # Corresponds to the JSON property `allSheets`
2576
+ # @return [Boolean]
2577
+ attr_accessor :all_sheets
2578
+ alias_method :all_sheets?, :all_sheets
2579
+
2580
+ # True if the search is case sensitive.
2581
+ # Corresponds to the JSON property `matchCase`
2582
+ # @return [Boolean]
2583
+ attr_accessor :match_case
2584
+ alias_method :match_case?, :match_case
2585
+
2586
+ # True if the search should include cells with formulas.
2587
+ # False to skip cells with formulas.
2588
+ # Corresponds to the JSON property `includeFormulas`
2589
+ # @return [Boolean]
2590
+ attr_accessor :include_formulas
2591
+ alias_method :include_formulas?, :include_formulas
2592
+
2593
+ # A range on a sheet.
2594
+ # All indexes are 0-based.
2595
+ # Indexes are half open, e.g the start index is inclusive
2596
+ # and the end index is exclusive -- [start_index, end_index).
2597
+ # Missing indexes indicate the range is unbounded on that side.
2598
+ # For example, if "Sheet1" is grid ID 0, then:
2599
+ # Sheet1!A1:A1 == sheet_id: 0,
2600
+ # start_row_index: 0, end_row_index: 1,
2601
+ # start_column_index: 0, end_column_index: 1
2602
+ # Sheet1!A3:B4 == sheet_id: 0,
2603
+ # start_row_index: 2, end_row_index: 4,
2604
+ # start_column_index: 0, end_column_index: 2
2605
+ # Sheet1!A:B == sheet_id: 0,
2606
+ # start_column_index: 0, end_column_index: 2
2607
+ # Sheet1!A5:B == sheet_id: 0,
2608
+ # start_row_index: 4,
2609
+ # start_column_index: 0, end_column_index: 2
2610
+ # Sheet1 == sheet_id:0
2611
+ # The start index must always be less than or equal to the end index.
2612
+ # If the start index equals the end index, then the range is empty.
2613
+ # Empty ranges are typically not meaningful and are usually rendered in the
2614
+ # UI as "#REF!".
2615
+ # Corresponds to the JSON property `range`
2616
+ # @return [Google::Apis::SheetsV1::GridRange]
2617
+ attr_accessor :range
2618
+
2619
+ # True if the find value should match the entire cell.
2620
+ # Corresponds to the JSON property `matchEntireCell`
2621
+ # @return [Boolean]
2622
+ attr_accessor :match_entire_cell
2623
+ alias_method :match_entire_cell?, :match_entire_cell
2624
+
2625
+ def initialize(**args)
2626
+ update!(**args)
2627
+ end
2628
+
2629
+ # Update properties of this object
2630
+ def update!(**args)
2631
+ @find = args[:find] if args.key?(:find)
2632
+ @replacement = args[:replacement] if args.key?(:replacement)
2633
+ @search_by_regex = args[:search_by_regex] if args.key?(:search_by_regex)
2634
+ @sheet_id = args[:sheet_id] if args.key?(:sheet_id)
2635
+ @all_sheets = args[:all_sheets] if args.key?(:all_sheets)
2636
+ @match_case = args[:match_case] if args.key?(:match_case)
2637
+ @include_formulas = args[:include_formulas] if args.key?(:include_formulas)
2638
+ @range = args[:range] if args.key?(:range)
2639
+ @match_entire_cell = args[:match_entire_cell] if args.key?(:match_entire_cell)
2640
+ end
2641
+ end
2642
+
2643
+ # A sort order associated with a specific column or row.
2644
+ class SortSpec
2645
+ include Google::Apis::Core::Hashable
2646
+
2647
+ # The order data should be sorted.
2648
+ # Corresponds to the JSON property `sortOrder`
2649
+ # @return [String]
2650
+ attr_accessor :sort_order
2651
+
2652
+ # The dimension the sort should be applied to.
2653
+ # Corresponds to the JSON property `dimensionIndex`
2654
+ # @return [Fixnum]
2655
+ attr_accessor :dimension_index
2656
+
2657
+ def initialize(**args)
2658
+ update!(**args)
2659
+ end
2660
+
2661
+ # Update properties of this object
2662
+ def update!(**args)
2663
+ @sort_order = args[:sort_order] if args.key?(:sort_order)
2664
+ @dimension_index = args[:dimension_index] if args.key?(:dimension_index)
2665
+ end
2666
+ end
2667
+
2668
+ # The request to copy a sheet across spreadsheets.
2669
+ class CopySheetToAnotherSpreadsheetRequest
2670
+ include Google::Apis::Core::Hashable
2671
+
2672
+ # The ID of the spreadsheet to copy the sheet to.
2673
+ # Corresponds to the JSON property `destinationSpreadsheetId`
2674
+ # @return [String]
2675
+ attr_accessor :destination_spreadsheet_id
2676
+
2677
+ def initialize(**args)
2678
+ update!(**args)
2679
+ end
2680
+
2681
+ # Update properties of this object
2682
+ def update!(**args)
2683
+ @destination_spreadsheet_id = args[:destination_spreadsheet_id] if args.key?(:destination_spreadsheet_id)
2684
+ end
2685
+ end
2686
+
2687
+ # The number format of a cell.
2688
+ # When updating, all fields must be set.
2689
+ class NumberFormat
2690
+ include Google::Apis::Core::Hashable
2691
+
2692
+ # Pattern string used for formatting.
2693
+ # Corresponds to the JSON property `pattern`
2694
+ # @return [String]
2695
+ attr_accessor :pattern
2696
+
2697
+ # The type of the number format.
2698
+ # Corresponds to the JSON property `type`
2699
+ # @return [String]
2700
+ attr_accessor :type
2701
+
2702
+ def initialize(**args)
2703
+ update!(**args)
2704
+ end
2705
+
2706
+ # Update properties of this object
2707
+ def update!(**args)
2708
+ @pattern = args[:pattern] if args.key?(:pattern)
2709
+ @type = args[:type] if args.key?(:type)
2710
+ end
2711
+ end
2712
+
2713
+ # Updates properties of dimensions within the specified range.
2714
+ # It is an error to specify read only fields in the field mask.
2715
+ class UpdateDimensionPropertiesRequest
2716
+ include Google::Apis::Core::Hashable
2717
+
2718
+ # The fields that should be updated. At least one field must be specified.
2719
+ # The root 'properties' is implied and should not be specified.
2720
+ # Corresponds to the JSON property `fields`
2721
+ # @return [String]
2722
+ attr_accessor :fields
2723
+
2724
+ # Properties about a dimension.
2725
+ # Corresponds to the JSON property `properties`
2726
+ # @return [Google::Apis::SheetsV1::DimensionProperties]
2727
+ attr_accessor :properties
2728
+
2729
+ # A range along a single dimension on a sheet.
2730
+ # All indexes are 0-based.
2731
+ # Indexes are half open, e.g the start index is inclusive
2732
+ # and the end index is exclusive -- [start_index, end_index).
2733
+ # Missing indexes indicate the range is unbounded on that side.
2734
+ # Corresponds to the JSON property `range`
2735
+ # @return [Google::Apis::SheetsV1::DimensionRange]
2736
+ attr_accessor :range
2737
+
2738
+ def initialize(**args)
2739
+ update!(**args)
2740
+ end
2741
+
2742
+ # Update properties of this object
2743
+ def update!(**args)
2744
+ @fields = args[:fields] if args.key?(:fields)
2745
+ @properties = args[:properties] if args.key?(:properties)
2746
+ @range = args[:range] if args.key?(:range)
2747
+ end
2748
+ end
2749
+
2750
+ # The editors of a protected range.
2751
+ class Editors
2752
+ include Google::Apis::Core::Hashable
2753
+
2754
+ # True if anyone in the document's domain has edit access to the protected
2755
+ # range. Domain protection is only supported on documents within a domain.
2756
+ # Corresponds to the JSON property `domainUsersCanEdit`
2757
+ # @return [Boolean]
2758
+ attr_accessor :domain_users_can_edit
2759
+ alias_method :domain_users_can_edit?, :domain_users_can_edit
2760
+
2761
+ # The email addresses of groups with edit access to the protected range.
2762
+ # Corresponds to the JSON property `groups`
2763
+ # @return [Array<String>]
2764
+ attr_accessor :groups
2765
+
2766
+ # The email addresses of users with edit access to the protected range.
2767
+ # Corresponds to the JSON property `users`
2768
+ # @return [Array<String>]
2769
+ attr_accessor :users
2770
+
2771
+ def initialize(**args)
2772
+ update!(**args)
2773
+ end
2774
+
2775
+ # Update properties of this object
2776
+ def update!(**args)
2777
+ @domain_users_can_edit = args[:domain_users_can_edit] if args.key?(:domain_users_can_edit)
2778
+ @groups = args[:groups] if args.key?(:groups)
2779
+ @users = args[:users] if args.key?(:users)
2780
+ end
2781
+ end
2782
+
2783
+ # A spreadsheet.
2784
+ class Spreadsheet
2785
+ include Google::Apis::Core::Hashable
2786
+
2787
+ # The ID of the spreadsheet.
2788
+ # Corresponds to the JSON property `spreadsheetId`
2789
+ # @return [String]
2790
+ attr_accessor :spreadsheet_id
2791
+
2792
+ # Properties of a spreadsheet.
2793
+ # Corresponds to the JSON property `properties`
2794
+ # @return [Google::Apis::SheetsV1::SpreadsheetProperties]
2795
+ attr_accessor :properties
2796
+
2797
+ # The named ranges in the spreadsheet.
2798
+ # Corresponds to the JSON property `namedRanges`
2799
+ # @return [Array<Google::Apis::SheetsV1::NamedRange>]
2800
+ attr_accessor :named_ranges
2801
+
2802
+ # Each sheet in the spreadsheet.
2803
+ # Corresponds to the JSON property `sheets`
2804
+ # @return [Array<Google::Apis::SheetsV1::Sheet>]
2805
+ attr_accessor :sheets
2806
+
2807
+ def initialize(**args)
2808
+ update!(**args)
2809
+ end
2810
+
2811
+ # Update properties of this object
2812
+ def update!(**args)
2813
+ @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id)
2814
+ @properties = args[:properties] if args.key?(:properties)
2815
+ @named_ranges = args[:named_ranges] if args.key?(:named_ranges)
2816
+ @sheets = args[:sheets] if args.key?(:sheets)
2817
+ end
2818
+ end
2819
+
2820
+ # Data in the grid, as well as metadata about the dimensions.
2821
+ class GridData
2822
+ include Google::Apis::Core::Hashable
2823
+
2824
+ # Metadata about the requested columns in the grid, starting with the column
2825
+ # in startColumn.
2826
+ # Corresponds to the JSON property `columnMetadata`
2827
+ # @return [Array<Google::Apis::SheetsV1::DimensionProperties>]
2828
+ attr_accessor :column_metadata
2829
+
2830
+ # The data in the grid, one entry per row,
2831
+ # starting with the row in startRow.
2832
+ # The values in RowData will correspond to columns starting
2833
+ # at start_column.
2834
+ # Corresponds to the JSON property `rowData`
2835
+ # @return [Array<Google::Apis::SheetsV1::RowData>]
2836
+ attr_accessor :row_data
2837
+
2838
+ # Metadata about the requested rows in the grid, starting with the row
2839
+ # in startRow.
2840
+ # Corresponds to the JSON property `rowMetadata`
2841
+ # @return [Array<Google::Apis::SheetsV1::DimensionProperties>]
2842
+ attr_accessor :row_metadata
2843
+
2844
+ # The first row this GridData refers to, 0-based.
2845
+ # Corresponds to the JSON property `startRow`
2846
+ # @return [Fixnum]
2847
+ attr_accessor :start_row
2848
+
2849
+ # The first column this GridData refers to, 0-based.
2850
+ # Corresponds to the JSON property `startColumn`
2851
+ # @return [Fixnum]
2852
+ attr_accessor :start_column
2853
+
2854
+ def initialize(**args)
2855
+ update!(**args)
2856
+ end
2857
+
2858
+ # Update properties of this object
2859
+ def update!(**args)
2860
+ @column_metadata = args[:column_metadata] if args.key?(:column_metadata)
2861
+ @row_data = args[:row_data] if args.key?(:row_data)
2862
+ @row_metadata = args[:row_metadata] if args.key?(:row_metadata)
2863
+ @start_row = args[:start_row] if args.key?(:start_row)
2864
+ @start_column = args[:start_column] if args.key?(:start_column)
2865
+ end
2866
+ end
2867
+
2868
+ # The default filter associated with a sheet.
2869
+ class BasicFilter
2870
+ include Google::Apis::Core::Hashable
2871
+
2872
+ # The criteria for showing/hiding values per column.
2873
+ # The map's key is the column index, and the value is the criteria for
2874
+ # that column.
2875
+ # Corresponds to the JSON property `criteria`
2876
+ # @return [Hash<String,Google::Apis::SheetsV1::FilterCriteria>]
2877
+ attr_accessor :criteria
2878
+
2879
+ # The sort order per column. Later specifications are used when values
2880
+ # are equal in the earlier specifications.
2881
+ # Corresponds to the JSON property `sortSpecs`
2882
+ # @return [Array<Google::Apis::SheetsV1::SortSpec>]
2883
+ attr_accessor :sort_specs
2884
+
2885
+ # A range on a sheet.
2886
+ # All indexes are 0-based.
2887
+ # Indexes are half open, e.g the start index is inclusive
2888
+ # and the end index is exclusive -- [start_index, end_index).
2889
+ # Missing indexes indicate the range is unbounded on that side.
2890
+ # For example, if "Sheet1" is grid ID 0, then:
2891
+ # Sheet1!A1:A1 == sheet_id: 0,
2892
+ # start_row_index: 0, end_row_index: 1,
2893
+ # start_column_index: 0, end_column_index: 1
2894
+ # Sheet1!A3:B4 == sheet_id: 0,
2895
+ # start_row_index: 2, end_row_index: 4,
2896
+ # start_column_index: 0, end_column_index: 2
2897
+ # Sheet1!A:B == sheet_id: 0,
2898
+ # start_column_index: 0, end_column_index: 2
2899
+ # Sheet1!A5:B == sheet_id: 0,
2900
+ # start_row_index: 4,
2901
+ # start_column_index: 0, end_column_index: 2
2902
+ # Sheet1 == sheet_id:0
2903
+ # The start index must always be less than or equal to the end index.
2904
+ # If the start index equals the end index, then the range is empty.
2905
+ # Empty ranges are typically not meaningful and are usually rendered in the
2906
+ # UI as "#REF!".
2907
+ # Corresponds to the JSON property `range`
2908
+ # @return [Google::Apis::SheetsV1::GridRange]
2909
+ attr_accessor :range
2910
+
2911
+ def initialize(**args)
2912
+ update!(**args)
2913
+ end
2914
+
2915
+ # Update properties of this object
2916
+ def update!(**args)
2917
+ @criteria = args[:criteria] if args.key?(:criteria)
2918
+ @sort_specs = args[:sort_specs] if args.key?(:sort_specs)
2919
+ @range = args[:range] if args.key?(:range)
2920
+ end
2921
+ end
2922
+
2923
+ # Duplicates the contents of a sheet.
2924
+ class DuplicateSheetRequest
2925
+ include Google::Apis::Core::Hashable
2926
+
2927
+ # If set, the ID of the new sheet. If not set, an ID is chosen.
2928
+ # If set, the ID must not conflict with any existing sheet ID.
2929
+ # Corresponds to the JSON property `newSheetId`
2930
+ # @return [Fixnum]
2931
+ attr_accessor :new_sheet_id
2932
+
2933
+ # The sheet to duplicate.
2934
+ # Corresponds to the JSON property `sourceSheetId`
2935
+ # @return [Fixnum]
2936
+ attr_accessor :source_sheet_id
2937
+
2938
+ # The name of the new sheet. If empty, a new name is chosen for you.
2939
+ # Corresponds to the JSON property `newSheetName`
2940
+ # @return [String]
2941
+ attr_accessor :new_sheet_name
2942
+
2943
+ # The 0-based index the new sheet should be inserted at.
2944
+ # The index of all sheets after this are incremented.
2945
+ # Corresponds to the JSON property `insertSheetIndex`
2946
+ # @return [Fixnum]
2947
+ attr_accessor :insert_sheet_index
2948
+
2949
+ def initialize(**args)
2950
+ update!(**args)
2951
+ end
2952
+
2953
+ # Update properties of this object
2954
+ def update!(**args)
2955
+ @new_sheet_id = args[:new_sheet_id] if args.key?(:new_sheet_id)
2956
+ @source_sheet_id = args[:source_sheet_id] if args.key?(:source_sheet_id)
2957
+ @new_sheet_name = args[:new_sheet_name] if args.key?(:new_sheet_name)
2958
+ @insert_sheet_index = args[:insert_sheet_index] if args.key?(:insert_sheet_index)
2959
+ end
2960
+ end
2961
+
2962
+ # The result of adding a filter view.
2963
+ class AddFilterViewResponse
2964
+ include Google::Apis::Core::Hashable
2965
+
2966
+ # A filter view.
2967
+ # Corresponds to the JSON property `filter`
2968
+ # @return [Google::Apis::SheetsV1::FilterView]
2969
+ attr_accessor :filter
2970
+
2971
+ def initialize(**args)
2972
+ update!(**args)
2973
+ end
2974
+
2975
+ # Update properties of this object
2976
+ def update!(**args)
2977
+ @filter = args[:filter] if args.key?(:filter)
2978
+ end
2979
+ end
2980
+
2981
+ # The result of duplicating a sheet.
2982
+ class DuplicateSheetResponse
2983
+ include Google::Apis::Core::Hashable
2984
+
2985
+ # Properties of a sheet.
2986
+ # Corresponds to the JSON property `properties`
2987
+ # @return [Google::Apis::SheetsV1::SheetProperties]
2988
+ attr_accessor :properties
2989
+
2990
+ def initialize(**args)
2991
+ update!(**args)
2992
+ end
2993
+
2994
+ # Update properties of this object
2995
+ def update!(**args)
2996
+ @properties = args[:properties] if args.key?(:properties)
2997
+ end
2998
+ end
2999
+
3000
+ # A border along a cell.
3001
+ class Border
3002
+ include Google::Apis::Core::Hashable
3003
+
3004
+ # The width of the border, in pixels.
3005
+ # Corresponds to the JSON property `width`
3006
+ # @return [Fixnum]
3007
+ attr_accessor :width
3008
+
3009
+ # The style of the border.
3010
+ # Corresponds to the JSON property `style`
3011
+ # @return [String]
3012
+ attr_accessor :style
3013
+
3014
+ # Represents a color in the RGBA color space. This representation is designed
3015
+ # for simplicity of conversion to/from color representations in various
3016
+ # languages over compactness; for example, the fields of this representation
3017
+ # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3018
+ # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3019
+ # method in iOS; and, with just a little work, it can be easily formatted into
3020
+ # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3021
+ # Example (Java):
3022
+ # import com.google.type.Color;
3023
+ # // ...
3024
+ # public static java.awt.Color fromProto(Color protocolor) `
3025
+ # float alpha = protocolor.hasAlpha()
3026
+ # ? protocolor.getAlpha().getValue()
3027
+ # : 1.0;
3028
+ # return new java.awt.Color(
3029
+ # protocolor.getRed(),
3030
+ # protocolor.getGreen(),
3031
+ # protocolor.getBlue(),
3032
+ # alpha);
3033
+ # `
3034
+ # public static Color toProto(java.awt.Color color) `
3035
+ # float red = (float) color.getRed();
3036
+ # float green = (float) color.getGreen();
3037
+ # float blue = (float) color.getBlue();
3038
+ # float denominator = 255.0;
3039
+ # Color.Builder resultBuilder =
3040
+ # Color
3041
+ # .newBuilder()
3042
+ # .setRed(red / denominator)
3043
+ # .setGreen(green / denominator)
3044
+ # .setBlue(blue / denominator);
3045
+ # int alpha = color.getAlpha();
3046
+ # if (alpha != 255) `
3047
+ # result.setAlpha(
3048
+ # FloatValue
3049
+ # .newBuilder()
3050
+ # .setValue(((float) alpha) / denominator)
3051
+ # .build());
3052
+ # `
3053
+ # return resultBuilder.build();
3054
+ # `
3055
+ # // ...
3056
+ # Example (iOS / Obj-C):
3057
+ # // ...
3058
+ # static UIColor* fromProto(Color* protocolor) `
3059
+ # float red = [protocolor red];
3060
+ # float green = [protocolor green];
3061
+ # float blue = [protocolor blue];
3062
+ # FloatValue* alpha_wrapper = [protocolor alpha];
3063
+ # float alpha = 1.0;
3064
+ # if (alpha_wrapper != nil) `
3065
+ # alpha = [alpha_wrapper value];
3066
+ # `
3067
+ # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3068
+ # `
3069
+ # static Color* toProto(UIColor* color) `
3070
+ # CGFloat red, green, blue, alpha;
3071
+ # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
3072
+ # return nil;
3073
+ # `
3074
+ # Color* result = [Color alloc] init];
3075
+ # [result setRed:red];
3076
+ # [result setGreen:green];
3077
+ # [result setBlue:blue];
3078
+ # if (alpha <= 0.9999) `
3079
+ # [result setAlpha:floatWrapperWithValue(alpha)];
3080
+ # `
3081
+ # [result autorelease];
3082
+ # return result;
3083
+ # `
3084
+ # // ...
3085
+ # Example (JavaScript):
3086
+ # // ...
3087
+ # var protoToCssColor = function(rgb_color) `
3088
+ # var redFrac = rgb_color.red || 0.0;
3089
+ # var greenFrac = rgb_color.green || 0.0;
3090
+ # var blueFrac = rgb_color.blue || 0.0;
3091
+ # var red = Math.floor(redFrac * 255);
3092
+ # var green = Math.floor(greenFrac * 255);
3093
+ # var blue = Math.floor(blueFrac * 255);
3094
+ # if (!('alpha' in rgb_color)) `
3095
+ # return rgbToCssColor_(red, green, blue);
3096
+ # `
3097
+ # var alphaFrac = rgb_color.alpha.value || 0.0;
3098
+ # var rgbParams = [red, green, blue].join(',');
3099
+ # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3100
+ # `;
3101
+ # var rgbToCssColor_ = function(red, green, blue) `
3102
+ # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3103
+ # var hexString = rgbNumber.toString(16);
3104
+ # var missingZeros = 6 - hexString.length;
3105
+ # var resultBuilder = ['#'];
3106
+ # for (var i = 0; i < missingZeros; i++) `
3107
+ # resultBuilder.push('0');
3108
+ # `
3109
+ # resultBuilder.push(hexString);
3110
+ # return resultBuilder.join('');
3111
+ # `;
3112
+ # // ...
3113
+ # Corresponds to the JSON property `color`
3114
+ # @return [Google::Apis::SheetsV1::Color]
3115
+ attr_accessor :color
3116
+
3117
+ def initialize(**args)
3118
+ update!(**args)
3119
+ end
3120
+
3121
+ # Update properties of this object
3122
+ def update!(**args)
3123
+ @width = args[:width] if args.key?(:width)
3124
+ @style = args[:style] if args.key?(:style)
3125
+ @color = args[:color] if args.key?(:color)
3126
+ end
3127
+ end
3128
+
3129
+ # Adds a named range to the spreadsheet.
3130
+ class AddNamedRangeRequest
3131
+ include Google::Apis::Core::Hashable
3132
+
3133
+ # A named range.
3134
+ # Corresponds to the JSON property `namedRange`
3135
+ # @return [Google::Apis::SheetsV1::NamedRange]
3136
+ attr_accessor :named_range
3137
+
3138
+ def initialize(**args)
3139
+ update!(**args)
3140
+ end
3141
+
3142
+ # Update properties of this object
3143
+ def update!(**args)
3144
+ @named_range = args[:named_range] if args.key?(:named_range)
3145
+ end
3146
+ end
3147
+
3148
+ # Adds new cells to the last row with data in a sheet,
3149
+ # inserting new rows into the sheet if necessary.
3150
+ class AppendCellsRequest
3151
+ include Google::Apis::Core::Hashable
3152
+
3153
+ # The sheet ID to append the data to.
3154
+ # Corresponds to the JSON property `sheetId`
3155
+ # @return [Fixnum]
3156
+ attr_accessor :sheet_id
3157
+
3158
+ # The data to append.
3159
+ # Corresponds to the JSON property `rows`
3160
+ # @return [Array<Google::Apis::SheetsV1::RowData>]
3161
+ attr_accessor :rows
3162
+
3163
+ # The fields of CellData to that should be updated.
3164
+ # At least one field must be specified.
3165
+ # The root is the CellData; 'row.values.' should not be specified.
3166
+ # Corresponds to the JSON property `cellDataFields`
3167
+ # @return [String]
3168
+ attr_accessor :cell_data_fields
3169
+
3170
+ def initialize(**args)
3171
+ update!(**args)
3172
+ end
3173
+
3174
+ # Update properties of this object
3175
+ def update!(**args)
3176
+ @sheet_id = args[:sheet_id] if args.key?(:sheet_id)
3177
+ @rows = args[:rows] if args.key?(:rows)
3178
+ @cell_data_fields = args[:cell_data_fields] if args.key?(:cell_data_fields)
3179
+ end
3180
+ end
3181
+
3182
+ # Data about each cell in a row.
3183
+ class RowData
3184
+ include Google::Apis::Core::Hashable
3185
+
3186
+ # The values in the row, one per column.
3187
+ # Corresponds to the JSON property `values`
3188
+ # @return [Array<Google::Apis::SheetsV1::CellData>]
3189
+ attr_accessor :values
3190
+
3191
+ def initialize(**args)
3192
+ update!(**args)
3193
+ end
3194
+
3195
+ # Update properties of this object
3196
+ def update!(**args)
3197
+ @values = args[:values] if args.key?(:values)
3198
+ end
3199
+ end
3200
+
3201
+ # Updates all cells in the range to the values in the given Cell object.
3202
+ # Only the fields set in the fields will be updated.
3203
+ # If writing a cell with a formula, the formula's ranges will automatically
3204
+ # increment for each field in the range.
3205
+ # For example, if writing a cell with formula `=A1` into range B2:C4,
3206
+ # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`,
3207
+ # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`.
3208
+ # To keep the formula's ranges static, use the `$` indicator.
3209
+ # For example, if the formula was `=$A$1`, then neither
3210
+ # the row nor column would increment.
3211
+ class RepeatCellRequest
3212
+ include Google::Apis::Core::Hashable
3213
+
3214
+ # The fields that should be updated. At least one field must be specified.
3215
+ # The root 'cell' is implied and should not be specified.
3216
+ # Corresponds to the JSON property `fields`
3217
+ # @return [String]
3218
+ attr_accessor :fields
3219
+
3220
+ # Data about a specific cell.
3221
+ # Corresponds to the JSON property `cell`
3222
+ # @return [Google::Apis::SheetsV1::CellData]
3223
+ attr_accessor :cell
3224
+
3225
+ # A range on a sheet.
3226
+ # All indexes are 0-based.
3227
+ # Indexes are half open, e.g the start index is inclusive
3228
+ # and the end index is exclusive -- [start_index, end_index).
3229
+ # Missing indexes indicate the range is unbounded on that side.
3230
+ # For example, if "Sheet1" is grid ID 0, then:
3231
+ # Sheet1!A1:A1 == sheet_id: 0,
3232
+ # start_row_index: 0, end_row_index: 1,
3233
+ # start_column_index: 0, end_column_index: 1
3234
+ # Sheet1!A3:B4 == sheet_id: 0,
3235
+ # start_row_index: 2, end_row_index: 4,
3236
+ # start_column_index: 0, end_column_index: 2
3237
+ # Sheet1!A:B == sheet_id: 0,
3238
+ # start_column_index: 0, end_column_index: 2
3239
+ # Sheet1!A5:B == sheet_id: 0,
3240
+ # start_row_index: 4,
3241
+ # start_column_index: 0, end_column_index: 2
3242
+ # Sheet1 == sheet_id:0
3243
+ # The start index must always be less than or equal to the end index.
3244
+ # If the start index equals the end index, then the range is empty.
3245
+ # Empty ranges are typically not meaningful and are usually rendered in the
3246
+ # UI as "#REF!".
3247
+ # Corresponds to the JSON property `range`
3248
+ # @return [Google::Apis::SheetsV1::GridRange]
3249
+ attr_accessor :range
3250
+
3251
+ def initialize(**args)
3252
+ update!(**args)
3253
+ end
3254
+
3255
+ # Update properties of this object
3256
+ def update!(**args)
3257
+ @fields = args[:fields] if args.key?(:fields)
3258
+ @cell = args[:cell] if args.key?(:cell)
3259
+ @range = args[:range] if args.key?(:range)
3260
+ end
3261
+ end
3262
+
3263
+ # A named range.
3264
+ class NamedRange
3265
+ include Google::Apis::Core::Hashable
3266
+
3267
+ # A range on a sheet.
3268
+ # All indexes are 0-based.
3269
+ # Indexes are half open, e.g the start index is inclusive
3270
+ # and the end index is exclusive -- [start_index, end_index).
3271
+ # Missing indexes indicate the range is unbounded on that side.
3272
+ # For example, if "Sheet1" is grid ID 0, then:
3273
+ # Sheet1!A1:A1 == sheet_id: 0,
3274
+ # start_row_index: 0, end_row_index: 1,
3275
+ # start_column_index: 0, end_column_index: 1
3276
+ # Sheet1!A3:B4 == sheet_id: 0,
3277
+ # start_row_index: 2, end_row_index: 4,
3278
+ # start_column_index: 0, end_column_index: 2
3279
+ # Sheet1!A:B == sheet_id: 0,
3280
+ # start_column_index: 0, end_column_index: 2
3281
+ # Sheet1!A5:B == sheet_id: 0,
3282
+ # start_row_index: 4,
3283
+ # start_column_index: 0, end_column_index: 2
3284
+ # Sheet1 == sheet_id:0
3285
+ # The start index must always be less than or equal to the end index.
3286
+ # If the start index equals the end index, then the range is empty.
3287
+ # Empty ranges are typically not meaningful and are usually rendered in the
3288
+ # UI as "#REF!".
3289
+ # Corresponds to the JSON property `range`
3290
+ # @return [Google::Apis::SheetsV1::GridRange]
3291
+ attr_accessor :range
3292
+
3293
+ # The ID of the named range.
3294
+ # Corresponds to the JSON property `namedRangeId`
3295
+ # @return [Fixnum]
3296
+ attr_accessor :named_range_id
3297
+
3298
+ # The name of the named range.
3299
+ # Corresponds to the JSON property `name`
3300
+ # @return [String]
3301
+ attr_accessor :name
3302
+
3303
+ def initialize(**args)
3304
+ update!(**args)
3305
+ end
3306
+
3307
+ # Update properties of this object
3308
+ def update!(**args)
3309
+ @range = args[:range] if args.key?(:range)
3310
+ @named_range_id = args[:named_range_id] if args.key?(:named_range_id)
3311
+ @name = args[:name] if args.key?(:name)
3312
+ end
3313
+ end
3314
+
3315
+ # Sets the basic filter associated with a sheet.
3316
+ class SetBasicFilterRequest
3317
+ include Google::Apis::Core::Hashable
3318
+
3319
+ # The default filter associated with a sheet.
3320
+ # Corresponds to the JSON property `filter`
3321
+ # @return [Google::Apis::SheetsV1::BasicFilter]
3322
+ attr_accessor :filter
3323
+
3324
+ def initialize(**args)
3325
+ update!(**args)
3326
+ end
3327
+
3328
+ # Update properties of this object
3329
+ def update!(**args)
3330
+ @filter = args[:filter] if args.key?(:filter)
3331
+ end
3332
+ end
3333
+
3334
+ # Automatically resizes one or more dimensions based on the contents
3335
+ # of the cells in that dimension.
3336
+ class AutoResizeDimensionsRequest
3337
+ include Google::Apis::Core::Hashable
3338
+
3339
+ # A range along a single dimension on a sheet.
3340
+ # All indexes are 0-based.
3341
+ # Indexes are half open, e.g the start index is inclusive
3342
+ # and the end index is exclusive -- [start_index, end_index).
3343
+ # Missing indexes indicate the range is unbounded on that side.
3344
+ # Corresponds to the JSON property `dimensions`
3345
+ # @return [Google::Apis::SheetsV1::DimensionRange]
3346
+ attr_accessor :dimensions
3347
+
3348
+ def initialize(**args)
3349
+ update!(**args)
3350
+ end
3351
+
3352
+ # Update properties of this object
3353
+ def update!(**args)
3354
+ @dimensions = args[:dimensions] if args.key?(:dimensions)
3355
+ end
3356
+ end
3357
+
3358
+ # The result of a filter view being duplicated.
3359
+ class DuplicateFilterViewResponse
3360
+ include Google::Apis::Core::Hashable
3361
+
3362
+ # A filter view.
3363
+ # Corresponds to the JSON property `filter`
3364
+ # @return [Google::Apis::SheetsV1::FilterView]
3365
+ attr_accessor :filter
3366
+
3367
+ def initialize(**args)
3368
+ update!(**args)
3369
+ end
3370
+
3371
+ # Update properties of this object
3372
+ def update!(**args)
3373
+ @filter = args[:filter] if args.key?(:filter)
3374
+ end
3375
+ end
3376
+
3377
+ # A range on a sheet.
3378
+ # All indexes are 0-based.
3379
+ # Indexes are half open, e.g the start index is inclusive
3380
+ # and the end index is exclusive -- [start_index, end_index).
3381
+ # Missing indexes indicate the range is unbounded on that side.
3382
+ # For example, if "Sheet1" is grid ID 0, then:
3383
+ # Sheet1!A1:A1 == sheet_id: 0,
3384
+ # start_row_index: 0, end_row_index: 1,
3385
+ # start_column_index: 0, end_column_index: 1
3386
+ # Sheet1!A3:B4 == sheet_id: 0,
3387
+ # start_row_index: 2, end_row_index: 4,
3388
+ # start_column_index: 0, end_column_index: 2
3389
+ # Sheet1!A:B == sheet_id: 0,
3390
+ # start_column_index: 0, end_column_index: 2
3391
+ # Sheet1!A5:B == sheet_id: 0,
3392
+ # start_row_index: 4,
3393
+ # start_column_index: 0, end_column_index: 2
3394
+ # Sheet1 == sheet_id:0
3395
+ # The start index must always be less than or equal to the end index.
3396
+ # If the start index equals the end index, then the range is empty.
3397
+ # Empty ranges are typically not meaningful and are usually rendered in the
3398
+ # UI as "#REF!".
3399
+ class GridRange
3400
+ include Google::Apis::Core::Hashable
3401
+
3402
+ # The start column (inclusive) of the range, or not set if unbounded.
3403
+ # Corresponds to the JSON property `startColumnIndex`
3404
+ # @return [Fixnum]
3405
+ attr_accessor :start_column_index
3406
+
3407
+ # The sheet this range is on.
3408
+ # Corresponds to the JSON property `sheetId`
3409
+ # @return [Fixnum]
3410
+ attr_accessor :sheet_id
3411
+
3412
+ # The end column (exclusive) of the range, or not set if unbounded.
3413
+ # Corresponds to the JSON property `endColumnIndex`
3414
+ # @return [Fixnum]
3415
+ attr_accessor :end_column_index
3416
+
3417
+ # The end row (exclusive) of the range, or not set if unbounded.
3418
+ # Corresponds to the JSON property `endRowIndex`
3419
+ # @return [Fixnum]
3420
+ attr_accessor :end_row_index
3421
+
3422
+ # The start row (inclusive) of the range, or not set if unbounded.
3423
+ # Corresponds to the JSON property `startRowIndex`
3424
+ # @return [Fixnum]
3425
+ attr_accessor :start_row_index
3426
+
3427
+ def initialize(**args)
3428
+ update!(**args)
3429
+ end
3430
+
3431
+ # Update properties of this object
3432
+ def update!(**args)
3433
+ @start_column_index = args[:start_column_index] if args.key?(:start_column_index)
3434
+ @sheet_id = args[:sheet_id] if args.key?(:sheet_id)
3435
+ @end_column_index = args[:end_column_index] if args.key?(:end_column_index)
3436
+ @end_row_index = args[:end_row_index] if args.key?(:end_row_index)
3437
+ @start_row_index = args[:start_row_index] if args.key?(:start_row_index)
3438
+ end
3439
+ end
3440
+
3441
+ # Deletes the requested sheet.
3442
+ class DeleteSheetRequest
3443
+ include Google::Apis::Core::Hashable
3444
+
3445
+ # The ID of the sheet to delete.
3446
+ # Corresponds to the JSON property `sheetId`
3447
+ # @return [Fixnum]
3448
+ attr_accessor :sheet_id
3449
+
3450
+ def initialize(**args)
3451
+ update!(**args)
3452
+ end
3453
+
3454
+ # Update properties of this object
3455
+ def update!(**args)
3456
+ @sheet_id = args[:sheet_id] if args.key?(:sheet_id)
3457
+ end
3458
+ end
3459
+
3460
+ # Moves an embedded object (such as a chart or image) to its own sheet.
3461
+ class MoveEmbeddedObjectToSheetRequest
3462
+ include Google::Apis::Core::Hashable
3463
+
3464
+ # The sheet to move it to. If not set, a sheet ID is chosen for you.
3465
+ # If set, the ID must not conflict with any existing sheet ID.
3466
+ # Corresponds to the JSON property `newSheetId`
3467
+ # @return [Fixnum]
3468
+ attr_accessor :new_sheet_id
3469
+
3470
+ # The id of the object to moved.
3471
+ # Corresponds to the JSON property `objectId`
3472
+ # @return [Fixnum]
3473
+ attr_accessor :object_id_prop
3474
+
3475
+ def initialize(**args)
3476
+ update!(**args)
3477
+ end
3478
+
3479
+ # Update properties of this object
3480
+ def update!(**args)
3481
+ @new_sheet_id = args[:new_sheet_id] if args.key?(:new_sheet_id)
3482
+ @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop)
3483
+ end
3484
+ end
3485
+
3486
+ # Updates all cells in a range with new data.
3487
+ class UpdateCellsRequest
3488
+ include Google::Apis::Core::Hashable
3489
+
3490
+ # The data to write.
3491
+ # Corresponds to the JSON property `rows`
3492
+ # @return [Array<Google::Apis::SheetsV1::RowData>]
3493
+ attr_accessor :rows
3494
+
3495
+ # The fields of CellData to that should be updated.
3496
+ # At least one field must be specified.
3497
+ # The root is the CellData; 'row.values.' should not be specified.
3498
+ # Corresponds to the JSON property `cellDataFields`
3499
+ # @return [String]
3500
+ attr_accessor :cell_data_fields
3501
+
3502
+ # A range on a sheet.
3503
+ # All indexes are 0-based.
3504
+ # Indexes are half open, e.g the start index is inclusive
3505
+ # and the end index is exclusive -- [start_index, end_index).
3506
+ # Missing indexes indicate the range is unbounded on that side.
3507
+ # For example, if "Sheet1" is grid ID 0, then:
3508
+ # Sheet1!A1:A1 == sheet_id: 0,
3509
+ # start_row_index: 0, end_row_index: 1,
3510
+ # start_column_index: 0, end_column_index: 1
3511
+ # Sheet1!A3:B4 == sheet_id: 0,
3512
+ # start_row_index: 2, end_row_index: 4,
3513
+ # start_column_index: 0, end_column_index: 2
3514
+ # Sheet1!A:B == sheet_id: 0,
3515
+ # start_column_index: 0, end_column_index: 2
3516
+ # Sheet1!A5:B == sheet_id: 0,
3517
+ # start_row_index: 4,
3518
+ # start_column_index: 0, end_column_index: 2
3519
+ # Sheet1 == sheet_id:0
3520
+ # The start index must always be less than or equal to the end index.
3521
+ # If the start index equals the end index, then the range is empty.
3522
+ # Empty ranges are typically not meaningful and are usually rendered in the
3523
+ # UI as "#REF!".
3524
+ # Corresponds to the JSON property `range`
3525
+ # @return [Google::Apis::SheetsV1::GridRange]
3526
+ attr_accessor :range
3527
+
3528
+ # A coordinate in a sheet.
3529
+ # All indexes are 0-based.
3530
+ # Corresponds to the JSON property `start`
3531
+ # @return [Google::Apis::SheetsV1::GridCoordinate]
3532
+ attr_accessor :start
3533
+
3534
+ def initialize(**args)
3535
+ update!(**args)
3536
+ end
3537
+
3538
+ # Update properties of this object
3539
+ def update!(**args)
3540
+ @rows = args[:rows] if args.key?(:rows)
3541
+ @cell_data_fields = args[:cell_data_fields] if args.key?(:cell_data_fields)
3542
+ @range = args[:range] if args.key?(:range)
3543
+ @start = args[:start] if args.key?(:start)
3544
+ end
3545
+ end
3546
+
3547
+ # Copies data from the source to the destination.
3548
+ class CopyPasteRequest
3549
+ include Google::Apis::Core::Hashable
3550
+
3551
+ # How that data should be oriented when pasting.
3552
+ # Corresponds to the JSON property `pasteOrientation`
3553
+ # @return [String]
3554
+ attr_accessor :paste_orientation
3555
+
3556
+ # What kind of data to paste.
3557
+ # Corresponds to the JSON property `pasteType`
3558
+ # @return [String]
3559
+ attr_accessor :paste_type
3560
+
3561
+ # A range on a sheet.
3562
+ # All indexes are 0-based.
3563
+ # Indexes are half open, e.g the start index is inclusive
3564
+ # and the end index is exclusive -- [start_index, end_index).
3565
+ # Missing indexes indicate the range is unbounded on that side.
3566
+ # For example, if "Sheet1" is grid ID 0, then:
3567
+ # Sheet1!A1:A1 == sheet_id: 0,
3568
+ # start_row_index: 0, end_row_index: 1,
3569
+ # start_column_index: 0, end_column_index: 1
3570
+ # Sheet1!A3:B4 == sheet_id: 0,
3571
+ # start_row_index: 2, end_row_index: 4,
3572
+ # start_column_index: 0, end_column_index: 2
3573
+ # Sheet1!A:B == sheet_id: 0,
3574
+ # start_column_index: 0, end_column_index: 2
3575
+ # Sheet1!A5:B == sheet_id: 0,
3576
+ # start_row_index: 4,
3577
+ # start_column_index: 0, end_column_index: 2
3578
+ # Sheet1 == sheet_id:0
3579
+ # The start index must always be less than or equal to the end index.
3580
+ # If the start index equals the end index, then the range is empty.
3581
+ # Empty ranges are typically not meaningful and are usually rendered in the
3582
+ # UI as "#REF!".
3583
+ # Corresponds to the JSON property `source`
3584
+ # @return [Google::Apis::SheetsV1::GridRange]
3585
+ attr_accessor :source
3586
+
3587
+ # A range on a sheet.
3588
+ # All indexes are 0-based.
3589
+ # Indexes are half open, e.g the start index is inclusive
3590
+ # and the end index is exclusive -- [start_index, end_index).
3591
+ # Missing indexes indicate the range is unbounded on that side.
3592
+ # For example, if "Sheet1" is grid ID 0, then:
3593
+ # Sheet1!A1:A1 == sheet_id: 0,
3594
+ # start_row_index: 0, end_row_index: 1,
3595
+ # start_column_index: 0, end_column_index: 1
3596
+ # Sheet1!A3:B4 == sheet_id: 0,
3597
+ # start_row_index: 2, end_row_index: 4,
3598
+ # start_column_index: 0, end_column_index: 2
3599
+ # Sheet1!A:B == sheet_id: 0,
3600
+ # start_column_index: 0, end_column_index: 2
3601
+ # Sheet1!A5:B == sheet_id: 0,
3602
+ # start_row_index: 4,
3603
+ # start_column_index: 0, end_column_index: 2
3604
+ # Sheet1 == sheet_id:0
3605
+ # The start index must always be less than or equal to the end index.
3606
+ # If the start index equals the end index, then the range is empty.
3607
+ # Empty ranges are typically not meaningful and are usually rendered in the
3608
+ # UI as "#REF!".
3609
+ # Corresponds to the JSON property `destination`
3610
+ # @return [Google::Apis::SheetsV1::GridRange]
3611
+ attr_accessor :destination
3612
+
3613
+ def initialize(**args)
3614
+ update!(**args)
3615
+ end
3616
+
3617
+ # Update properties of this object
3618
+ def update!(**args)
3619
+ @paste_orientation = args[:paste_orientation] if args.key?(:paste_orientation)
3620
+ @paste_type = args[:paste_type] if args.key?(:paste_type)
3621
+ @source = args[:source] if args.key?(:source)
3622
+ @destination = args[:destination] if args.key?(:destination)
3623
+ end
3624
+ end
3625
+
3626
+ # A sheet in a spreadsheet.
3627
+ class Sheet
3628
+ include Google::Apis::Core::Hashable
3629
+
3630
+ # Properties of a sheet.
3631
+ # Corresponds to the JSON property `properties`
3632
+ # @return [Google::Apis::SheetsV1::SheetProperties]
3633
+ attr_accessor :properties
3634
+
3635
+ # The filter views in this sheet.
3636
+ # Corresponds to the JSON property `filterViews`
3637
+ # @return [Array<Google::Apis::SheetsV1::FilterView>]
3638
+ attr_accessor :filter_views
3639
+
3640
+ # The conditional format rules in this sheet.
3641
+ # Corresponds to the JSON property `conditionalFormats`
3642
+ # @return [Array<Google::Apis::SheetsV1::ConditionalFormatRule>]
3643
+ attr_accessor :conditional_formats
3644
+
3645
+ # The protected ranges in this sheet.
3646
+ # Corresponds to the JSON property `protectedRanges`
3647
+ # @return [Array<Google::Apis::SheetsV1::ProtectedRange>]
3648
+ attr_accessor :protected_ranges
3649
+
3650
+ # The default filter associated with a sheet.
3651
+ # Corresponds to the JSON property `basicFilter`
3652
+ # @return [Google::Apis::SheetsV1::BasicFilter]
3653
+ attr_accessor :basic_filter
3654
+
3655
+ # The ranges that are merged together.
3656
+ # Corresponds to the JSON property `merges`
3657
+ # @return [Array<Google::Apis::SheetsV1::GridRange>]
3658
+ attr_accessor :merges
3659
+
3660
+ # Data in the grid, if this is a grid sheet.
3661
+ # The number of GridData objects returned is dependent on the number of
3662
+ # ranges requested on this sheet. For example, if this is representing
3663
+ # Sheet1, and the spreadsheet was requested with ranges
3664
+ # Sheet1!A1:C10 and Sheet1!D15:E20, then the first GridData will have a
3665
+ # startRow/startColumn of 0, while the second one will have startRow of
3666
+ # 14 (0-based row 15), and startColumn 3 (0-based column D).
3667
+ # Corresponds to the JSON property `data`
3668
+ # @return [Array<Google::Apis::SheetsV1::GridData>]
3669
+ attr_accessor :data
3670
+
3671
+ def initialize(**args)
3672
+ update!(**args)
3673
+ end
3674
+
3675
+ # Update properties of this object
3676
+ def update!(**args)
3677
+ @properties = args[:properties] if args.key?(:properties)
3678
+ @filter_views = args[:filter_views] if args.key?(:filter_views)
3679
+ @conditional_formats = args[:conditional_formats] if args.key?(:conditional_formats)
3680
+ @protected_ranges = args[:protected_ranges] if args.key?(:protected_ranges)
3681
+ @basic_filter = args[:basic_filter] if args.key?(:basic_filter)
3682
+ @merges = args[:merges] if args.key?(:merges)
3683
+ @data = args[:data] if args.key?(:data)
3684
+ end
3685
+ end
3686
+
3687
+ # The reply for batch updating a spreadsheet.
3688
+ class BatchUpdateSpreadsheetResponse
3689
+ include Google::Apis::Core::Hashable
3690
+
3691
+ # The spreadsheet the updates were applied to.
3692
+ # Corresponds to the JSON property `spreadsheetId`
3693
+ # @return [String]
3694
+ attr_accessor :spreadsheet_id
3695
+
3696
+ # The reply of the updates. This maps 1:1 with the updates, although
3697
+ # replies to some requests may be empty.
3698
+ # Corresponds to the JSON property `replies`
3699
+ # @return [Array<Google::Apis::SheetsV1::Response>]
3700
+ attr_accessor :replies
3701
+
3702
+ def initialize(**args)
3703
+ update!(**args)
3704
+ end
3705
+
3706
+ # Update properties of this object
3707
+ def update!(**args)
3708
+ @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id)
3709
+ @replies = args[:replies] if args.key?(:replies)
3710
+ end
3711
+ end
3712
+
3713
+ # Each kind of value a cell in a spreadsheet can have.
3714
+ class ExtendedValue
3715
+ include Google::Apis::Core::Hashable
3716
+
3717
+ # An error in a cell.
3718
+ # Corresponds to the JSON property `errorValue`
3719
+ # @return [Google::Apis::SheetsV1::ErrorValue]
3720
+ attr_accessor :error_value
3721
+
3722
+ # Represents a formula.
3723
+ # Corresponds to the JSON property `formulaValue`
3724
+ # @return [String]
3725
+ attr_accessor :formula_value
3726
+
3727
+ # Represents a boolean value.
3728
+ # Corresponds to the JSON property `boolValue`
3729
+ # @return [Boolean]
3730
+ attr_accessor :bool_value
3731
+ alias_method :bool_value?, :bool_value
3732
+
3733
+ # Represents a string value.
3734
+ # Leading single quotes are not included. For example, if the user typed
3735
+ # '123 into the UI, this would be represented as a string_value of "123".
3736
+ # Corresponds to the JSON property `stringValue`
3737
+ # @return [String]
3738
+ attr_accessor :string_value
3739
+
3740
+ # Represents a double value.
3741
+ # Note: Dates, Times and DateTimes are represented as "serial numbers".
3742
+ # See the note on GetValuesRequest.RenderedDateTimeOption.SERIAL_TIME for
3743
+ # more information.
3744
+ # Corresponds to the JSON property `numberValue`
3745
+ # @return [Float]
3746
+ attr_accessor :number_value
3747
+
3748
+ def initialize(**args)
3749
+ update!(**args)
3750
+ end
3751
+
3752
+ # Update properties of this object
3753
+ def update!(**args)
3754
+ @error_value = args[:error_value] if args.key?(:error_value)
3755
+ @formula_value = args[:formula_value] if args.key?(:formula_value)
3756
+ @bool_value = args[:bool_value] if args.key?(:bool_value)
3757
+ @string_value = args[:string_value] if args.key?(:string_value)
3758
+ @number_value = args[:number_value] if args.key?(:number_value)
3759
+ end
3760
+ end
3761
+
3762
+ # Moves data from the source to the destination.
3763
+ class CutPasteRequest
3764
+ include Google::Apis::Core::Hashable
3765
+
3766
+ # What kind of data to paste. All the source data will be cut, regardless
3767
+ # of what is pasted.
3768
+ # Corresponds to the JSON property `pasteType`
3769
+ # @return [String]
3770
+ attr_accessor :paste_type
3771
+
3772
+ # A range on a sheet.
3773
+ # All indexes are 0-based.
3774
+ # Indexes are half open, e.g the start index is inclusive
3775
+ # and the end index is exclusive -- [start_index, end_index).
3776
+ # Missing indexes indicate the range is unbounded on that side.
3777
+ # For example, if "Sheet1" is grid ID 0, then:
3778
+ # Sheet1!A1:A1 == sheet_id: 0,
3779
+ # start_row_index: 0, end_row_index: 1,
3780
+ # start_column_index: 0, end_column_index: 1
3781
+ # Sheet1!A3:B4 == sheet_id: 0,
3782
+ # start_row_index: 2, end_row_index: 4,
3783
+ # start_column_index: 0, end_column_index: 2
3784
+ # Sheet1!A:B == sheet_id: 0,
3785
+ # start_column_index: 0, end_column_index: 2
3786
+ # Sheet1!A5:B == sheet_id: 0,
3787
+ # start_row_index: 4,
3788
+ # start_column_index: 0, end_column_index: 2
3789
+ # Sheet1 == sheet_id:0
3790
+ # The start index must always be less than or equal to the end index.
3791
+ # If the start index equals the end index, then the range is empty.
3792
+ # Empty ranges are typically not meaningful and are usually rendered in the
3793
+ # UI as "#REF!".
3794
+ # Corresponds to the JSON property `source`
3795
+ # @return [Google::Apis::SheetsV1::GridRange]
3796
+ attr_accessor :source
3797
+
3798
+ # A coordinate in a sheet.
3799
+ # All indexes are 0-based.
3800
+ # Corresponds to the JSON property `destination`
3801
+ # @return [Google::Apis::SheetsV1::GridCoordinate]
3802
+ attr_accessor :destination
3803
+
3804
+ def initialize(**args)
3805
+ update!(**args)
3806
+ end
3807
+
3808
+ # Update properties of this object
3809
+ def update!(**args)
3810
+ @paste_type = args[:paste_type] if args.key?(:paste_type)
3811
+ @source = args[:source] if args.key?(:source)
3812
+ @destination = args[:destination] if args.key?(:destination)
3813
+ end
3814
+ end
3815
+
3816
+ # A rule that applies a gradient color scale format, based on
3817
+ # the interpolation points listed. The format of a cell will vary
3818
+ # based on its contents as compared to the values of the interpolation
3819
+ # points.
3820
+ class GradientRule
3821
+ include Google::Apis::Core::Hashable
3822
+
3823
+ # A single interpolation point a gradient conditional format.
3824
+ # These pin the gradient color scale according to the color,
3825
+ # type and value chosen.
3826
+ # Corresponds to the JSON property `maxpoint`
3827
+ # @return [Google::Apis::SheetsV1::InterpolationPoint]
3828
+ attr_accessor :maxpoint
3829
+
3830
+ # A single interpolation point a gradient conditional format.
3831
+ # These pin the gradient color scale according to the color,
3832
+ # type and value chosen.
3833
+ # Corresponds to the JSON property `midpoint`
3834
+ # @return [Google::Apis::SheetsV1::InterpolationPoint]
3835
+ attr_accessor :midpoint
3836
+
3837
+ # A single interpolation point a gradient conditional format.
3838
+ # These pin the gradient color scale according to the color,
3839
+ # type and value chosen.
3840
+ # Corresponds to the JSON property `minpoint`
3841
+ # @return [Google::Apis::SheetsV1::InterpolationPoint]
3842
+ attr_accessor :minpoint
3843
+
3844
+ def initialize(**args)
3845
+ update!(**args)
3846
+ end
3847
+
3848
+ # Update properties of this object
3849
+ def update!(**args)
3850
+ @maxpoint = args[:maxpoint] if args.key?(:maxpoint)
3851
+ @midpoint = args[:midpoint] if args.key?(:midpoint)
3852
+ @minpoint = args[:minpoint] if args.key?(:minpoint)
3853
+ end
3854
+ end
3855
+
3856
+ # Fills in more data based on existing data.
3857
+ class AutoFillRequest
3858
+ include Google::Apis::Core::Hashable
3859
+
3860
+ # True if we should generate data with the "alternate" series.
3861
+ # This differs based on the type and amount of source data.
3862
+ # Corresponds to the JSON property `useAlternateSeries`
3863
+ # @return [Boolean]
3864
+ attr_accessor :use_alternate_series
3865
+ alias_method :use_alternate_series?, :use_alternate_series
3866
+
3867
+ # A range on a sheet.
3868
+ # All indexes are 0-based.
3869
+ # Indexes are half open, e.g the start index is inclusive
3870
+ # and the end index is exclusive -- [start_index, end_index).
3871
+ # Missing indexes indicate the range is unbounded on that side.
3872
+ # For example, if "Sheet1" is grid ID 0, then:
3873
+ # Sheet1!A1:A1 == sheet_id: 0,
3874
+ # start_row_index: 0, end_row_index: 1,
3875
+ # start_column_index: 0, end_column_index: 1
3876
+ # Sheet1!A3:B4 == sheet_id: 0,
3877
+ # start_row_index: 2, end_row_index: 4,
3878
+ # start_column_index: 0, end_column_index: 2
3879
+ # Sheet1!A:B == sheet_id: 0,
3880
+ # start_column_index: 0, end_column_index: 2
3881
+ # Sheet1!A5:B == sheet_id: 0,
3882
+ # start_row_index: 4,
3883
+ # start_column_index: 0, end_column_index: 2
3884
+ # Sheet1 == sheet_id:0
3885
+ # The start index must always be less than or equal to the end index.
3886
+ # If the start index equals the end index, then the range is empty.
3887
+ # Empty ranges are typically not meaningful and are usually rendered in the
3888
+ # UI as "#REF!".
3889
+ # Corresponds to the JSON property `range`
3890
+ # @return [Google::Apis::SheetsV1::GridRange]
3891
+ attr_accessor :range
3892
+
3893
+ # A combination of a source range and how to extend that source.
3894
+ # Corresponds to the JSON property `sourceAndDestination`
3895
+ # @return [Google::Apis::SheetsV1::SourceAndDestination]
3896
+ attr_accessor :source_and_destination
3897
+
3898
+ def initialize(**args)
3899
+ update!(**args)
3900
+ end
3901
+
3902
+ # Update properties of this object
3903
+ def update!(**args)
3904
+ @use_alternate_series = args[:use_alternate_series] if args.key?(:use_alternate_series)
3905
+ @range = args[:range] if args.key?(:range)
3906
+ @source_and_destination = args[:source_and_destination] if args.key?(:source_and_destination)
3907
+ end
3908
+ end
3909
+
3910
+ # Updates properties of the sheet with the specified sheet id.
3911
+ # It is an error to specify read only fields in the field mask.
3912
+ class UpdateSheetPropertiesRequest
3913
+ include Google::Apis::Core::Hashable
3914
+
3915
+ # The fields that should be updated. At least one field must be specified.
3916
+ # The root 'properties' is implied and should not be specified.
3917
+ # Corresponds to the JSON property `fields`
3918
+ # @return [String]
3919
+ attr_accessor :fields
3920
+
3921
+ # Properties of a sheet.
3922
+ # Corresponds to the JSON property `properties`
3923
+ # @return [Google::Apis::SheetsV1::SheetProperties]
3924
+ attr_accessor :properties
3925
+
3926
+ def initialize(**args)
3927
+ update!(**args)
3928
+ end
3929
+
3930
+ # Update properties of this object
3931
+ def update!(**args)
3932
+ @fields = args[:fields] if args.key?(:fields)
3933
+ @properties = args[:properties] if args.key?(:properties)
3934
+ end
3935
+ end
3936
+
3937
+ # Appends rows or columns to the end of a sheet.
3938
+ class AppendDimensionRequest
3939
+ include Google::Apis::Core::Hashable
3940
+
3941
+ # The sheet to append rows or columns to.
3942
+ # Corresponds to the JSON property `sheetId`
3943
+ # @return [Fixnum]
3944
+ attr_accessor :sheet_id
3945
+
3946
+ # The number of rows or columns to append.
3947
+ # Corresponds to the JSON property `length`
3948
+ # @return [Fixnum]
3949
+ attr_accessor :length
3950
+
3951
+ # Whether rows or columns should be appended.
3952
+ # Corresponds to the JSON property `dimension`
3953
+ # @return [String]
3954
+ attr_accessor :dimension
3955
+
3956
+ def initialize(**args)
3957
+ update!(**args)
3958
+ end
3959
+
3960
+ # Update properties of this object
3961
+ def update!(**args)
3962
+ @sheet_id = args[:sheet_id] if args.key?(:sheet_id)
3963
+ @length = args[:length] if args.key?(:length)
3964
+ @dimension = args[:dimension] if args.key?(:dimension)
3965
+ end
3966
+ end
3967
+
3968
+ # A rule that may or may not match, depending on the condition.
3969
+ class BooleanRule
3970
+ include Google::Apis::Core::Hashable
3971
+
3972
+ # A condition that can evaluate to true or false.
3973
+ # BooleanConditions are used by conditional formatting,
3974
+ # data validation, and the criteria in filters.
3975
+ # Corresponds to the JSON property `condition`
3976
+ # @return [Google::Apis::SheetsV1::BooleanCondition]
3977
+ attr_accessor :condition
3978
+
3979
+ # The format of a cell.
3980
+ # Corresponds to the JSON property `format`
3981
+ # @return [Google::Apis::SheetsV1::CellFormat]
3982
+ attr_accessor :format
3983
+
3984
+ def initialize(**args)
3985
+ update!(**args)
3986
+ end
3987
+
3988
+ # Update properties of this object
3989
+ def update!(**args)
3990
+ @condition = args[:condition] if args.key?(:condition)
3991
+ @format = args[:format] if args.key?(:format)
3992
+ end
3993
+ end
3994
+
3995
+ # Adds a filter view.
3996
+ class AddFilterViewRequest
3997
+ include Google::Apis::Core::Hashable
3998
+
3999
+ # A filter view.
4000
+ # Corresponds to the JSON property `filter`
4001
+ # @return [Google::Apis::SheetsV1::FilterView]
4002
+ attr_accessor :filter
4003
+
4004
+ def initialize(**args)
4005
+ update!(**args)
4006
+ end
4007
+
4008
+ # Update properties of this object
4009
+ def update!(**args)
4010
+ @filter = args[:filter] if args.key?(:filter)
4011
+ end
4012
+ end
4013
+
4014
+ # Properties of a grid.
4015
+ class GridProperties
4016
+ include Google::Apis::Core::Hashable
4017
+
4018
+ # The number of columns in the grid.
4019
+ # Corresponds to the JSON property `columnCount`
4020
+ # @return [Fixnum]
4021
+ attr_accessor :column_count
4022
+
4023
+ # The number of rows in the grid.
4024
+ # Corresponds to the JSON property `rowCount`
4025
+ # @return [Fixnum]
4026
+ attr_accessor :row_count
4027
+
4028
+ # The number of rows that are frozen in the grid.
4029
+ # Corresponds to the JSON property `frozenRowCount`
4030
+ # @return [Fixnum]
4031
+ attr_accessor :frozen_row_count
4032
+
4033
+ # True if the grid isn't showing gridlines in the UI.
4034
+ # Corresponds to the JSON property `hideGridlines`
4035
+ # @return [Boolean]
4036
+ attr_accessor :hide_gridlines
4037
+ alias_method :hide_gridlines?, :hide_gridlines
4038
+
4039
+ # The number of columns that are frozen in the grid.
4040
+ # Corresponds to the JSON property `frozenColumnCount`
4041
+ # @return [Fixnum]
4042
+ attr_accessor :frozen_column_count
4043
+
4044
+ def initialize(**args)
4045
+ update!(**args)
4046
+ end
4047
+
4048
+ # Update properties of this object
4049
+ def update!(**args)
4050
+ @column_count = args[:column_count] if args.key?(:column_count)
4051
+ @row_count = args[:row_count] if args.key?(:row_count)
4052
+ @frozen_row_count = args[:frozen_row_count] if args.key?(:frozen_row_count)
4053
+ @hide_gridlines = args[:hide_gridlines] if args.key?(:hide_gridlines)
4054
+ @frozen_column_count = args[:frozen_column_count] if args.key?(:frozen_column_count)
4055
+ end
4056
+ end
4057
+
4058
+ # A generic empty message that you can re-use to avoid defining duplicated
4059
+ # empty messages in your APIs. A typical example is to use it as the request
4060
+ # or the response type of an API method. For instance:
4061
+ # service Foo `
4062
+ # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
4063
+ # `
4064
+ # The JSON representation for `Empty` is empty JSON object ````.
4065
+ class Empty
4066
+ include Google::Apis::Core::Hashable
4067
+
4068
+ def initialize(**args)
4069
+ update!(**args)
4070
+ end
4071
+
4072
+ # Update properties of this object
4073
+ def update!(**args)
4074
+ end
4075
+ end
4076
+
4077
+ # Removes the named range with the given ID from the spreadsheet.
4078
+ class DeleteNamedRangeRequest
4079
+ include Google::Apis::Core::Hashable
4080
+
4081
+ # The ID of the named range to delete.
4082
+ # Corresponds to the JSON property `namedRangeId`
4083
+ # @return [Fixnum]
4084
+ attr_accessor :named_range_id
4085
+
4086
+ def initialize(**args)
4087
+ update!(**args)
4088
+ end
4089
+
4090
+ # Update properties of this object
4091
+ def update!(**args)
4092
+ @named_range_id = args[:named_range_id] if args.key?(:named_range_id)
4093
+ end
4094
+ end
4095
+
4096
+ # Sets a data validation rule to every cell in the range.
4097
+ # To clear validation in a range, call this with no rule specified.
4098
+ class SetDataValidationRequest
4099
+ include Google::Apis::Core::Hashable
4100
+
4101
+ # A data validation rule.
4102
+ # Corresponds to the JSON property `rule`
4103
+ # @return [Google::Apis::SheetsV1::DataValidationRule]
4104
+ attr_accessor :rule
4105
+
4106
+ # A range on a sheet.
4107
+ # All indexes are 0-based.
4108
+ # Indexes are half open, e.g the start index is inclusive
4109
+ # and the end index is exclusive -- [start_index, end_index).
4110
+ # Missing indexes indicate the range is unbounded on that side.
4111
+ # For example, if "Sheet1" is grid ID 0, then:
4112
+ # Sheet1!A1:A1 == sheet_id: 0,
4113
+ # start_row_index: 0, end_row_index: 1,
4114
+ # start_column_index: 0, end_column_index: 1
4115
+ # Sheet1!A3:B4 == sheet_id: 0,
4116
+ # start_row_index: 2, end_row_index: 4,
4117
+ # start_column_index: 0, end_column_index: 2
4118
+ # Sheet1!A:B == sheet_id: 0,
4119
+ # start_column_index: 0, end_column_index: 2
4120
+ # Sheet1!A5:B == sheet_id: 0,
4121
+ # start_row_index: 4,
4122
+ # start_column_index: 0, end_column_index: 2
4123
+ # Sheet1 == sheet_id:0
4124
+ # The start index must always be less than or equal to the end index.
4125
+ # If the start index equals the end index, then the range is empty.
4126
+ # Empty ranges are typically not meaningful and are usually rendered in the
4127
+ # UI as "#REF!".
4128
+ # Corresponds to the JSON property `range`
4129
+ # @return [Google::Apis::SheetsV1::GridRange]
4130
+ attr_accessor :range
4131
+
4132
+ def initialize(**args)
4133
+ update!(**args)
4134
+ end
4135
+
4136
+ # Update properties of this object
4137
+ def update!(**args)
4138
+ @rule = args[:rule] if args.key?(:rule)
4139
+ @range = args[:range] if args.key?(:range)
4140
+ end
4141
+ end
4142
+
4143
+ # The response when retrieving more than one range of values in a spreadsheet.
4144
+ class BatchGetValuesResponse
4145
+ include Google::Apis::Core::Hashable
4146
+
4147
+ # The requested values. The order of the ValueRanges is the same as the
4148
+ # order of the requested ranges.
4149
+ # Corresponds to the JSON property `valueRanges`
4150
+ # @return [Array<Google::Apis::SheetsV1::ValueRange>]
4151
+ attr_accessor :value_ranges
4152
+
4153
+ # The id of the spreadsheet to retrieve data from.
4154
+ # Corresponds to the JSON property `spreadsheetId`
4155
+ # @return [String]
4156
+ attr_accessor :spreadsheet_id
4157
+
4158
+ def initialize(**args)
4159
+ update!(**args)
4160
+ end
4161
+
4162
+ # Update properties of this object
4163
+ def update!(**args)
4164
+ @value_ranges = args[:value_ranges] if args.key?(:value_ranges)
4165
+ @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id)
4166
+ end
4167
+ end
4168
+
4169
+ # A single kind of update to apply to a spreadsheet.
4170
+ class Request
4171
+ include Google::Apis::Core::Hashable
4172
+
4173
+ # Removes the named range with the given ID from the spreadsheet.
4174
+ # Corresponds to the JSON property `deleteNamedRange`
4175
+ # @return [Google::Apis::SheetsV1::DeleteNamedRangeRequest]
4176
+ attr_accessor :delete_named_range
4177
+
4178
+ # Updates properties of the named range with the specified named range id.
4179
+ # It is an error to specify read only fields in the field mask.
4180
+ # Corresponds to the JSON property `updateNamedRange`
4181
+ # @return [Google::Apis::SheetsV1::UpdateNamedRangeRequest]
4182
+ attr_accessor :update_named_range
4183
+
4184
+ # Adds a filter view.
4185
+ # Corresponds to the JSON property `addFilterView`
4186
+ # @return [Google::Apis::SheetsV1::AddFilterViewRequest]
4187
+ attr_accessor :add_filter_view
4188
+
4189
+ # Updates properties of a spreadsheet.
4190
+ # It is an error to specify read only fields in the field mask.
4191
+ # Corresponds to the JSON property `updateSpreadsheetProperties`
4192
+ # @return [Google::Apis::SheetsV1::UpdateSpreadsheetPropertiesRequest]
4193
+ attr_accessor :update_spreadsheet_properties
4194
+
4195
+ # Appends rows or columns to the end of a sheet.
4196
+ # Corresponds to the JSON property `appendDimension`
4197
+ # @return [Google::Apis::SheetsV1::AppendDimensionRequest]
4198
+ attr_accessor :append_dimension
4199
+
4200
+ # Moves an embedded object (such as a chart or image) to its own sheet.
4201
+ # Corresponds to the JSON property `moveEmbeddedObjectToSheet`
4202
+ # @return [Google::Apis::SheetsV1::MoveEmbeddedObjectToSheetRequest]
4203
+ attr_accessor :move_embedded_object_to_sheet
4204
+
4205
+ # Unmerges cells in the given range.
4206
+ # Corresponds to the JSON property `unmergeCells`
4207
+ # @return [Google::Apis::SheetsV1::UnmergeCellsRequest]
4208
+ attr_accessor :unmerge_cells
4209
+
4210
+ # Updates an existing protected range with the specified protected range id.
4211
+ # Corresponds to the JSON property `updateProtectedRange`
4212
+ # @return [Google::Apis::SheetsV1::UpdateProtectedRangeRequest]
4213
+ attr_accessor :update_protected_range
4214
+
4215
+ # Deletes a particular filter view.
4216
+ # Corresponds to the JSON property `deleteFilterView`
4217
+ # @return [Google::Apis::SheetsV1::DeleteFilterViewRequest]
4218
+ attr_accessor :delete_filter_view
4219
+
4220
+ # Clears the basic filter, if any exists on the sheet.
4221
+ # Corresponds to the JSON property `clearBasicFilter`
4222
+ # @return [Google::Apis::SheetsV1::ClearBasicFilterRequest]
4223
+ attr_accessor :clear_basic_filter
4224
+
4225
+ # Sorts data in rows based on a sort order per column.
4226
+ # Corresponds to the JSON property `sortRange`
4227
+ # @return [Google::Apis::SheetsV1::SortRangeRequest]
4228
+ attr_accessor :sort_range
4229
+
4230
+ # Sets a data validation rule to every cell in the range.
4231
+ # To clear validation in a range, call this with no rule specified.
4232
+ # Corresponds to the JSON property `setDataValidation`
4233
+ # @return [Google::Apis::SheetsV1::SetDataValidationRequest]
4234
+ attr_accessor :set_data_validation
4235
+
4236
+ # Updates all cells in the range to the values in the given Cell object.
4237
+ # Only the fields set in the fields will be updated.
4238
+ # If writing a cell with a formula, the formula's ranges will automatically
4239
+ # increment for each field in the range.
4240
+ # For example, if writing a cell with formula `=A1` into range B2:C4,
4241
+ # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`,
4242
+ # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`.
4243
+ # To keep the formula's ranges static, use the `$` indicator.
4244
+ # For example, if the formula was `=$A$1`, then neither
4245
+ # the row nor column would increment.
4246
+ # Corresponds to the JSON property `repeatCell`
4247
+ # @return [Google::Apis::SheetsV1::RepeatCellRequest]
4248
+ attr_accessor :repeat_cell
4249
+
4250
+ # Updates all cells in a range with new data.
4251
+ # Corresponds to the JSON property `updateCells`
4252
+ # @return [Google::Apis::SheetsV1::UpdateCellsRequest]
4253
+ attr_accessor :update_cells
4254
+
4255
+ # Updates properties of the filter view.
4256
+ # Corresponds to the JSON property `updateFilterView`
4257
+ # @return [Google::Apis::SheetsV1::UpdateFilterViewRequest]
4258
+ attr_accessor :update_filter_view
4259
+
4260
+ # Adds a new sheet.
4261
+ # When a sheet is added at a given index,
4262
+ # all subsequent sheets' indexes are incremented.
4263
+ # Corresponds to the JSON property `addSheet`
4264
+ # @return [Google::Apis::SheetsV1::AddSheetRequest]
4265
+ attr_accessor :add_sheet
4266
+
4267
+ # Updates properties of the sheet with the specified sheet id.
4268
+ # It is an error to specify read only fields in the field mask.
4269
+ # Corresponds to the JSON property `updateSheetProperties`
4270
+ # @return [Google::Apis::SheetsV1::UpdateSheetPropertiesRequest]
4271
+ attr_accessor :update_sheet_properties
4272
+
4273
+ # Deletes the requested sheet.
4274
+ # Corresponds to the JSON property `deleteSheet`
4275
+ # @return [Google::Apis::SheetsV1::DeleteSheetRequest]
4276
+ attr_accessor :delete_sheet
4277
+
4278
+ # Updates properties of dimensions within the specified range.
4279
+ # It is an error to specify read only fields in the field mask.
4280
+ # Corresponds to the JSON property `updateDimensionProperties`
4281
+ # @return [Google::Apis::SheetsV1::UpdateDimensionPropertiesRequest]
4282
+ attr_accessor :update_dimension_properties
4283
+
4284
+ # Deletes the protected range with the given id.
4285
+ # Corresponds to the JSON property `deleteProtectedRange`
4286
+ # @return [Google::Apis::SheetsV1::DeleteProtectedRangeRequest]
4287
+ attr_accessor :delete_protected_range
4288
+
4289
+ # Adds a new protected range.
4290
+ # Corresponds to the JSON property `addProtectedRange`
4291
+ # @return [Google::Apis::SheetsV1::AddProtectedRangeRequest]
4292
+ attr_accessor :add_protected_range
4293
+
4294
+ # Finds and replaces data in cells over a range, sheet, or all sheets.
4295
+ # Corresponds to the JSON property `findReplace`
4296
+ # @return [Google::Apis::SheetsV1::FindReplaceRequest]
4297
+ attr_accessor :find_replace
4298
+
4299
+ # Updates a conditional format rule at the given index,
4300
+ # or moves a conditional format rule to another index.
4301
+ # Corresponds to the JSON property `updateConditionalFormatRule`
4302
+ # @return [Google::Apis::SheetsV1::UpdateConditionalFormatRuleRequest]
4303
+ attr_accessor :update_conditional_format_rule
4304
+
4305
+ # Sets the basic filter associated with a sheet.
4306
+ # Corresponds to the JSON property `setBasicFilter`
4307
+ # @return [Google::Apis::SheetsV1::SetBasicFilterRequest]
4308
+ attr_accessor :set_basic_filter
4309
+
4310
+ # Merges all cells in the range.
4311
+ # Corresponds to the JSON property `mergeCells`
4312
+ # @return [Google::Apis::SheetsV1::MergeCellsRequest]
4313
+ attr_accessor :merge_cells
4314
+
4315
+ # Deletes a conditional format rule at the given index.
4316
+ # All subsequent rules' indexes are decremented.
4317
+ # Corresponds to the JSON property `deleteConditionalFormatRule`
4318
+ # @return [Google::Apis::SheetsV1::DeleteConditionalFormatRuleRequest]
4319
+ attr_accessor :delete_conditional_format_rule
4320
+
4321
+ # Deletes the dimensions from the sheet.
4322
+ # Corresponds to the JSON property `deleteDimension`
4323
+ # @return [Google::Apis::SheetsV1::DeleteDimensionRequest]
4324
+ attr_accessor :delete_dimension
4325
+
4326
+ # Inserts data into the spreadsheet starting at the specified coordinate.
4327
+ # Corresponds to the JSON property `pasteData`
4328
+ # @return [Google::Apis::SheetsV1::PasteDataRequest]
4329
+ attr_accessor :paste_data
4330
+
4331
+ # Deletes the embedded object with the given ID.
4332
+ # Corresponds to the JSON property `deleteEmbeddedObject`
4333
+ # @return [Google::Apis::SheetsV1::DeleteEmbeddedObjectRequest]
4334
+ attr_accessor :delete_embedded_object
4335
+
4336
+ # Adds a new conditional format rule at the given index.
4337
+ # All subsequent rules' indexes are incremented.
4338
+ # Corresponds to the JSON property `addConditionalFormatRule`
4339
+ # @return [Google::Apis::SheetsV1::AddConditionalFormatRuleRequest]
4340
+ attr_accessor :add_conditional_format_rule
4341
+
4342
+ # Updates the borders of a range.
4343
+ # If a field is not set in the request, that means the border remains as-is.
4344
+ # For example, with two subsequent SetBorderRequests:
4345
+ # 1) range: A1:A5 `` top: RED, bottom: WHITE ``
4346
+ # 2) range: A1:A5 `` left: BLUE ``
4347
+ # That would result in A1:A5 having a borders of
4348
+ # `` top: RED, bottom: WHITE, left: BLUE ``.
4349
+ # If you want to clear a border, explicitly set the style to `NONE`.
4350
+ # Corresponds to the JSON property `updateBorders`
4351
+ # @return [Google::Apis::SheetsV1::UpdateBordersRequest]
4352
+ attr_accessor :update_borders
4353
+
4354
+ # Automatically resizes one or more dimensions based on the contents
4355
+ # of the cells in that dimension.
4356
+ # Corresponds to the JSON property `autoResizeDimensions`
4357
+ # @return [Google::Apis::SheetsV1::AutoResizeDimensionsRequest]
4358
+ attr_accessor :auto_resize_dimensions
4359
+
4360
+ # Duplicates the contents of a sheet.
4361
+ # Corresponds to the JSON property `duplicateSheet`
4362
+ # @return [Google::Apis::SheetsV1::DuplicateSheetRequest]
4363
+ attr_accessor :duplicate_sheet
4364
+
4365
+ # Duplicates a particular filter view.
4366
+ # Corresponds to the JSON property `duplicateFilterView`
4367
+ # @return [Google::Apis::SheetsV1::DuplicateFilterViewRequest]
4368
+ attr_accessor :duplicate_filter_view
4369
+
4370
+ # Moves data from the source to the destination.
4371
+ # Corresponds to the JSON property `cutPaste`
4372
+ # @return [Google::Apis::SheetsV1::CutPasteRequest]
4373
+ attr_accessor :cut_paste
4374
+
4375
+ # Adds new cells to the last row with data in a sheet,
4376
+ # inserting new rows into the sheet if necessary.
4377
+ # Corresponds to the JSON property `appendCells`
4378
+ # @return [Google::Apis::SheetsV1::AppendCellsRequest]
4379
+ attr_accessor :append_cells
4380
+
4381
+ # Fills in more data based on existing data.
4382
+ # Corresponds to the JSON property `autoFill`
4383
+ # @return [Google::Apis::SheetsV1::AutoFillRequest]
4384
+ attr_accessor :auto_fill
4385
+
4386
+ # Adds a named range to the spreadsheet.
4387
+ # Corresponds to the JSON property `addNamedRange`
4388
+ # @return [Google::Apis::SheetsV1::AddNamedRangeRequest]
4389
+ attr_accessor :add_named_range
4390
+
4391
+ # Splits a column of text into multiple columns,
4392
+ # based on a delimiter in each cell.
4393
+ # Corresponds to the JSON property `textToColumns`
4394
+ # @return [Google::Apis::SheetsV1::TextToColumnsRequest]
4395
+ attr_accessor :text_to_columns
4396
+
4397
+ # Moves one or more rows or columns.
4398
+ # Corresponds to the JSON property `moveDimension`
4399
+ # @return [Google::Apis::SheetsV1::MoveDimensionRequest]
4400
+ attr_accessor :move_dimension
4401
+
4402
+ # Inserts rows or columns in a sheet at a particular index.
4403
+ # Corresponds to the JSON property `insertDimension`
4404
+ # @return [Google::Apis::SheetsV1::InsertDimensionRequest]
4405
+ attr_accessor :insert_dimension
4406
+
4407
+ # Copies data from the source to the destination.
4408
+ # Corresponds to the JSON property `copyPaste`
4409
+ # @return [Google::Apis::SheetsV1::CopyPasteRequest]
4410
+ attr_accessor :copy_paste
4411
+
4412
+ def initialize(**args)
4413
+ update!(**args)
4414
+ end
4415
+
4416
+ # Update properties of this object
4417
+ def update!(**args)
4418
+ @delete_named_range = args[:delete_named_range] if args.key?(:delete_named_range)
4419
+ @update_named_range = args[:update_named_range] if args.key?(:update_named_range)
4420
+ @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view)
4421
+ @update_spreadsheet_properties = args[:update_spreadsheet_properties] if args.key?(:update_spreadsheet_properties)
4422
+ @append_dimension = args[:append_dimension] if args.key?(:append_dimension)
4423
+ @move_embedded_object_to_sheet = args[:move_embedded_object_to_sheet] if args.key?(:move_embedded_object_to_sheet)
4424
+ @unmerge_cells = args[:unmerge_cells] if args.key?(:unmerge_cells)
4425
+ @update_protected_range = args[:update_protected_range] if args.key?(:update_protected_range)
4426
+ @delete_filter_view = args[:delete_filter_view] if args.key?(:delete_filter_view)
4427
+ @clear_basic_filter = args[:clear_basic_filter] if args.key?(:clear_basic_filter)
4428
+ @sort_range = args[:sort_range] if args.key?(:sort_range)
4429
+ @set_data_validation = args[:set_data_validation] if args.key?(:set_data_validation)
4430
+ @repeat_cell = args[:repeat_cell] if args.key?(:repeat_cell)
4431
+ @update_cells = args[:update_cells] if args.key?(:update_cells)
4432
+ @update_filter_view = args[:update_filter_view] if args.key?(:update_filter_view)
4433
+ @add_sheet = args[:add_sheet] if args.key?(:add_sheet)
4434
+ @update_sheet_properties = args[:update_sheet_properties] if args.key?(:update_sheet_properties)
4435
+ @delete_sheet = args[:delete_sheet] if args.key?(:delete_sheet)
4436
+ @update_dimension_properties = args[:update_dimension_properties] if args.key?(:update_dimension_properties)
4437
+ @delete_protected_range = args[:delete_protected_range] if args.key?(:delete_protected_range)
4438
+ @add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range)
4439
+ @find_replace = args[:find_replace] if args.key?(:find_replace)
4440
+ @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule)
4441
+ @set_basic_filter = args[:set_basic_filter] if args.key?(:set_basic_filter)
4442
+ @merge_cells = args[:merge_cells] if args.key?(:merge_cells)
4443
+ @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule)
4444
+ @delete_dimension = args[:delete_dimension] if args.key?(:delete_dimension)
4445
+ @paste_data = args[:paste_data] if args.key?(:paste_data)
4446
+ @delete_embedded_object = args[:delete_embedded_object] if args.key?(:delete_embedded_object)
4447
+ @add_conditional_format_rule = args[:add_conditional_format_rule] if args.key?(:add_conditional_format_rule)
4448
+ @update_borders = args[:update_borders] if args.key?(:update_borders)
4449
+ @auto_resize_dimensions = args[:auto_resize_dimensions] if args.key?(:auto_resize_dimensions)
4450
+ @duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet)
4451
+ @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view)
4452
+ @cut_paste = args[:cut_paste] if args.key?(:cut_paste)
4453
+ @append_cells = args[:append_cells] if args.key?(:append_cells)
4454
+ @auto_fill = args[:auto_fill] if args.key?(:auto_fill)
4455
+ @add_named_range = args[:add_named_range] if args.key?(:add_named_range)
4456
+ @text_to_columns = args[:text_to_columns] if args.key?(:text_to_columns)
4457
+ @move_dimension = args[:move_dimension] if args.key?(:move_dimension)
4458
+ @insert_dimension = args[:insert_dimension] if args.key?(:insert_dimension)
4459
+ @copy_paste = args[:copy_paste] if args.key?(:copy_paste)
4460
+ end
4461
+ end
4462
+
4463
+ # Inserts rows or columns in a sheet at a particular index.
4464
+ class InsertDimensionRequest
4465
+ include Google::Apis::Core::Hashable
4466
+
4467
+ # Whether dimension properties should be extended from the dimensions
4468
+ # before or after the newly inserted dimensions.
4469
+ # True to inherit from the dimensions before (in which case the start
4470
+ # index must be greater than 0), and false to inherit from the dimensions
4471
+ # after.
4472
+ # For example, if row index 0 has red background and row index 1
4473
+ # has a green background, then inserting 2 rows at index 1 can inherit
4474
+ # either the green or red background. If inheritFromBefore is true,
4475
+ # the two new rows will be red (because the row before the insertion point
4476
+ # was red), whereas if inheritFromBefore is false, the two new rows will
4477
+ # be green (because the rows after the insertion point were green).
4478
+ # Corresponds to the JSON property `inheritFromBefore`
4479
+ # @return [Boolean]
4480
+ attr_accessor :inherit_from_before
4481
+ alias_method :inherit_from_before?, :inherit_from_before
4482
+
4483
+ # A range along a single dimension on a sheet.
4484
+ # All indexes are 0-based.
4485
+ # Indexes are half open, e.g the start index is inclusive
4486
+ # and the end index is exclusive -- [start_index, end_index).
4487
+ # Missing indexes indicate the range is unbounded on that side.
4488
+ # Corresponds to the JSON property `range`
4489
+ # @return [Google::Apis::SheetsV1::DimensionRange]
4490
+ attr_accessor :range
4491
+
4492
+ def initialize(**args)
4493
+ update!(**args)
4494
+ end
4495
+
4496
+ # Update properties of this object
4497
+ def update!(**args)
4498
+ @inherit_from_before = args[:inherit_from_before] if args.key?(:inherit_from_before)
4499
+ @range = args[:range] if args.key?(:range)
4500
+ end
4501
+ end
4502
+
4503
+ # Deletes the embedded object with the given ID.
4504
+ class DeleteEmbeddedObjectRequest
4505
+ include Google::Apis::Core::Hashable
4506
+
4507
+ # The ID of the embedded object to delete.
4508
+ # Corresponds to the JSON property `objectId`
4509
+ # @return [Fixnum]
4510
+ attr_accessor :object_id_prop
4511
+
4512
+ def initialize(**args)
4513
+ update!(**args)
4514
+ end
4515
+
4516
+ # Update properties of this object
4517
+ def update!(**args)
4518
+ @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop)
4519
+ end
4520
+ end
4521
+
4522
+ # The result of deleting a conditional format rule.
4523
+ class DeleteConditionalFormatRuleResponse
4524
+ include Google::Apis::Core::Hashable
4525
+
4526
+ # A rule describing a conditional format.
4527
+ # Corresponds to the JSON property `deleted`
4528
+ # @return [Google::Apis::SheetsV1::ConditionalFormatRule]
4529
+ attr_accessor :deleted
4530
+
4531
+ def initialize(**args)
4532
+ update!(**args)
4533
+ end
4534
+
4535
+ # Update properties of this object
4536
+ def update!(**args)
4537
+ @deleted = args[:deleted] if args.key?(:deleted)
4538
+ end
4539
+ end
4540
+ end
4541
+ end
4542
+ end