blob: b6fdd6f356455be1d2078326fcc69c8f9f52e2f4 [file] [log] [blame]
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="sheets_v4.html">Google Sheets API</a> . <a href="sheets_v4.spreadsheets.html">spreadsheets</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="sheets_v4.spreadsheets.sheets.html">sheets()</a></code>
79</p>
80<p class="firstline">Returns the sheets Resource.</p>
81
82<p class="toc_element">
83 <code><a href="sheets_v4.spreadsheets.values.html">values()</a></code>
84</p>
85<p class="firstline">Returns the values Resource.</p>
86
87<p class="toc_element">
88 <code><a href="#batchUpdate">batchUpdate(spreadsheetId, body, x__xgafv=None)</a></code></p>
89<p class="firstline">Applies one or more updates to the spreadsheet.</p>
90<p class="toc_element">
91 <code><a href="#create">create(body, x__xgafv=None)</a></code></p>
92<p class="firstline">Creates a spreadsheet, returning the newly created spreadsheet.</p>
93<p class="toc_element">
94 <code><a href="#get">get(spreadsheetId, ranges=None, x__xgafv=None, includeGridData=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070095<p class="firstline">Returns the spreadsheet at the given ID.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070096<h3>Method Details</h3>
97<div class="method">
98 <code class="details" id="batchUpdate">batchUpdate(spreadsheetId, body, x__xgafv=None)</code>
99 <pre>Applies one or more updates to the spreadsheet.
100
101Each request is validated before
102being applied. If any request is not valid then the entire request will
103fail and nothing will be applied.
104
105Some requests have replies to
106give you some information about how
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700107they are applied. The replies will mirror the requests. For example,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700108if you applied 4 updates and the 3rd one had a reply, then the
109response will have 2 empty replies, the actual reply, and another empty
110reply, in that order.
111
112Due to the collaborative nature of spreadsheets, it is not guaranteed that
113the spreadsheet will reflect exactly your changes after this completes,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700114however it is guaranteed that the updates in the request will be
115applied together atomically. Your changes may be altered with respect to
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700116collaborator changes. If there are no collaborators, the spreadsheet
117should reflect your changes.
118
119Args:
120 spreadsheetId: string, The spreadsheet to apply the updates to. (required)
121 body: object, The request body. (required)
122 The object takes the form of:
123
124{ # The request for updating any aspect of a spreadsheet.
125 "requests": [ # A list of updates to apply to the spreadsheet.
126 { # A single kind of update to apply to a spreadsheet.
127 "duplicateFilterView": { # Duplicates a particular filter view. # Duplicates a filter view.
128 "filterId": 42, # The ID of the filter being duplicated.
129 },
130 "sortRange": { # Sorts data in rows based on a sort order per column. # Sorts data in a range.
131 "range": { # A range on a sheet. # The range to sort.
132 # All indexes are zero-based.
133 # Indexes are half open, e.g the start index is inclusive
134 # and the end index is exclusive -- [start_index, end_index).
135 # Missing indexes indicate the range is unbounded on that side.
136 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700137 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700138 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700139 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700140 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700141 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700142 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700143 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700144 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700145 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700146 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700147 # `Sheet1!A:B == sheet_id: 0,
148 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700149 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700150 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700151 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700152 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700153 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700154 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700155 #
156 # The start index must always be less than or equal to the end index.
157 # If the start index equals the end index, then the range is empty.
158 # Empty ranges are typically not meaningful and are usually rendered in the
159 # UI as `#REF!`.
160 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
161 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
162 "sheetId": 42, # The sheet this range is on.
163 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
164 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
165 },
166 "sortSpecs": [ # The sort order per column. Later specifications are used when values
167 # are equal in the earlier specifications.
168 { # A sort order associated with a specific column or row.
169 "sortOrder": "A String", # The order data should be sorted.
170 "dimensionIndex": 42, # The dimension the sort should be applied to.
171 },
172 ],
173 },
174 "updateEmbeddedObjectPosition": { # Update an embedded object's position (such as a moving or resizing a # Updates an embedded object's (e.g. chart, image) position.
175 # chart or image).
176 "newPosition": { # The position of an embedded object such as a chart. # An explicit position to move the embedded object to.
177 # If newPosition.sheetId is set,
178 # a new sheet with that ID will be created.
179 # If newPosition.newSheet is set to true,
180 # a new sheet will be created with an ID that will be chosen for you.
181 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
182 # is chosen for you. Used only when writing.
183 "sheetId": 42, # The sheet this is on. Set only if the embedded object
184 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700185 "overlayPosition": { # The location an object is overlaid on top of a grid. # The position at which the object is overlaid on top of a grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700186 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
187 # All indexes are zero-based.
188 "rowIndex": 42, # The row index of the coordinate.
189 "columnIndex": 42, # The column index of the coordinate.
190 "sheetId": 42, # The sheet this coordinate is on.
191 },
192 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
193 # from the anchor cell.
194 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
195 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
196 # from the anchor cell.
197 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
198 },
199 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700200 "fields": "A String", # The fields of OverlayPosition
201 # that should be updated when setting a new position. Used only if
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700202 # newPosition.overlayPosition
203 # is set, in which case at least one field must
204 # be specified. The root `newPosition.overlayPosition` is implied and
205 # should not be specified.
206 # A single `"*"` can be used as short-hand for listing every field.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700207 "objectId": 42, # The ID of the object to moved.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700208 },
209 "updateConditionalFormatRule": { # Updates a conditional format rule at the given index, # Updates an existing conditional format rule.
210 # or moves a conditional format rule to another index.
211 "index": 42, # The zero-based index of the rule that should be replaced or moved.
212 "newIndex": 42, # The zero-based new index the rule should end up at.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700213 "sheetId": 42, # The sheet of the rule to move. Required if new_index is set,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700214 # unused otherwise.
215 "rule": { # A rule describing a conditional format. # The rule that should replace the rule at the given index.
216 "ranges": [ # The ranges that will be formatted if the condition is true.
217 # All the ranges must be on the same grid.
218 { # A range on a sheet.
219 # All indexes are zero-based.
220 # Indexes are half open, e.g the start index is inclusive
221 # and the end index is exclusive -- [start_index, end_index).
222 # Missing indexes indicate the range is unbounded on that side.
223 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700224 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700225 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700226 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700227 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700228 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700229 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700230 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700231 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700232 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700233 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700234 # `Sheet1!A:B == sheet_id: 0,
235 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700236 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700237 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700238 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700239 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700240 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700241 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700242 #
243 # The start index must always be less than or equal to the end index.
244 # If the start index equals the end index, then the range is empty.
245 # Empty ranges are typically not meaningful and are usually rendered in the
246 # UI as `#REF!`.
247 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
248 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
249 "sheetId": 42, # The sheet this range is on.
250 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
251 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
252 },
253 ],
254 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
255 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
256 # the format will be applied.
257 # BooleanConditions are used by conditional formatting,
258 # data validation, and the criteria in filters.
259 "type": "A String", # The type of condition.
260 "values": [ # The values of the condition. The number of supported values depends
261 # on the condition type. Some support zero values,
262 # others one or two values,
263 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
264 { # The value of the condition.
265 "relativeDate": "A String", # A relative date (based on the current date).
266 # Valid only if the type is
267 # DATE_BEFORE,
268 # DATE_AFTER,
269 # DATE_ON_OR_BEFORE or
270 # DATE_ON_OR_AFTER.
271 #
272 # Relative dates are not supported in data validation.
273 # They are supported only in conditional formatting and
274 # conditional filters.
275 "userEnteredValue": "A String", # A value the condition is based on.
276 # The value will be parsed as if the user typed into a cell.
277 # Formulas are supported (and must begin with an `=`).
278 },
279 ],
280 },
281 "format": { # The format of a cell. # The format to apply.
282 # Conditional formatting can only apply a subset of formatting:
283 # bold, italic,
284 # strikethrough,
285 # foreground color &
286 # background color.
287 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700288 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
289 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700290 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700291 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700292 },
293 "textDirection": "A String", # The direction of the text in the cell.
294 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
295 # When updating padding, every field must be specified.
296 "top": 42, # The top padding of the cell.
297 "right": 42, # The right padding of the cell.
298 "bottom": 42, # The bottom padding of the cell.
299 "left": 42, # The left padding of the cell.
300 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700301 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700302 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
303 # for simplicity of conversion to/from color representations in various
304 # languages over compactness; for example, the fields of this representation
305 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
306 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
307 # method in iOS; and, with just a little work, it can be easily formatted into
308 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
309 #
310 # Example (Java):
311 #
312 # import com.google.type.Color;
313 #
314 # // ...
315 # public static java.awt.Color fromProto(Color protocolor) {
316 # float alpha = protocolor.hasAlpha()
317 # ? protocolor.getAlpha().getValue()
318 # : 1.0;
319 #
320 # return new java.awt.Color(
321 # protocolor.getRed(),
322 # protocolor.getGreen(),
323 # protocolor.getBlue(),
324 # alpha);
325 # }
326 #
327 # public static Color toProto(java.awt.Color color) {
328 # float red = (float) color.getRed();
329 # float green = (float) color.getGreen();
330 # float blue = (float) color.getBlue();
331 # float denominator = 255.0;
332 # Color.Builder resultBuilder =
333 # Color
334 # .newBuilder()
335 # .setRed(red / denominator)
336 # .setGreen(green / denominator)
337 # .setBlue(blue / denominator);
338 # int alpha = color.getAlpha();
339 # if (alpha != 255) {
340 # result.setAlpha(
341 # FloatValue
342 # .newBuilder()
343 # .setValue(((float) alpha) / denominator)
344 # .build());
345 # }
346 # return resultBuilder.build();
347 # }
348 # // ...
349 #
350 # Example (iOS / Obj-C):
351 #
352 # // ...
353 # static UIColor* fromProto(Color* protocolor) {
354 # float red = [protocolor red];
355 # float green = [protocolor green];
356 # float blue = [protocolor blue];
357 # FloatValue* alpha_wrapper = [protocolor alpha];
358 # float alpha = 1.0;
359 # if (alpha_wrapper != nil) {
360 # alpha = [alpha_wrapper value];
361 # }
362 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
363 # }
364 #
365 # static Color* toProto(UIColor* color) {
366 # CGFloat red, green, blue, alpha;
367 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
368 # return nil;
369 # }
370 # Color* result = [Color alloc] init];
371 # [result setRed:red];
372 # [result setGreen:green];
373 # [result setBlue:blue];
374 # if (alpha <= 0.9999) {
375 # [result setAlpha:floatWrapperWithValue(alpha)];
376 # }
377 # [result autorelease];
378 # return result;
379 # }
380 # // ...
381 #
382 # Example (JavaScript):
383 #
384 # // ...
385 #
386 # var protoToCssColor = function(rgb_color) {
387 # var redFrac = rgb_color.red || 0.0;
388 # var greenFrac = rgb_color.green || 0.0;
389 # var blueFrac = rgb_color.blue || 0.0;
390 # var red = Math.floor(redFrac * 255);
391 # var green = Math.floor(greenFrac * 255);
392 # var blue = Math.floor(blueFrac * 255);
393 #
394 # if (!('alpha' in rgb_color)) {
395 # return rgbToCssColor_(red, green, blue);
396 # }
397 #
398 # var alphaFrac = rgb_color.alpha.value || 0.0;
399 # var rgbParams = [red, green, blue].join(',');
400 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
401 # };
402 #
403 # var rgbToCssColor_ = function(red, green, blue) {
404 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
405 # var hexString = rgbNumber.toString(16);
406 # var missingZeros = 6 - hexString.length;
407 # var resultBuilder = ['#'];
408 # for (var i = 0; i < missingZeros; i++) {
409 # resultBuilder.push('0');
410 # }
411 # resultBuilder.push(hexString);
412 # return resultBuilder.join('');
413 # };
414 #
415 # // ...
416 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
417 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
418 # the final pixel color is defined by the equation:
419 #
420 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
421 #
422 # This means that a value of 1.0 corresponds to a solid color, whereas
423 # a value of 0.0 corresponds to a completely transparent color. This
424 # uses a wrapper message rather than a simple float scalar so that it is
425 # possible to distinguish between a default value and the value being unset.
426 # If omitted, this color object is to be rendered as a solid color
427 # (as if the alpha value had been explicitly given with a value of 1.0).
428 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
429 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
430 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700431 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700432 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
433 # Absent values indicate that the field isn't specified.
434 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
435 # for simplicity of conversion to/from color representations in various
436 # languages over compactness; for example, the fields of this representation
437 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
438 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
439 # method in iOS; and, with just a little work, it can be easily formatted into
440 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
441 #
442 # Example (Java):
443 #
444 # import com.google.type.Color;
445 #
446 # // ...
447 # public static java.awt.Color fromProto(Color protocolor) {
448 # float alpha = protocolor.hasAlpha()
449 # ? protocolor.getAlpha().getValue()
450 # : 1.0;
451 #
452 # return new java.awt.Color(
453 # protocolor.getRed(),
454 # protocolor.getGreen(),
455 # protocolor.getBlue(),
456 # alpha);
457 # }
458 #
459 # public static Color toProto(java.awt.Color color) {
460 # float red = (float) color.getRed();
461 # float green = (float) color.getGreen();
462 # float blue = (float) color.getBlue();
463 # float denominator = 255.0;
464 # Color.Builder resultBuilder =
465 # Color
466 # .newBuilder()
467 # .setRed(red / denominator)
468 # .setGreen(green / denominator)
469 # .setBlue(blue / denominator);
470 # int alpha = color.getAlpha();
471 # if (alpha != 255) {
472 # result.setAlpha(
473 # FloatValue
474 # .newBuilder()
475 # .setValue(((float) alpha) / denominator)
476 # .build());
477 # }
478 # return resultBuilder.build();
479 # }
480 # // ...
481 #
482 # Example (iOS / Obj-C):
483 #
484 # // ...
485 # static UIColor* fromProto(Color* protocolor) {
486 # float red = [protocolor red];
487 # float green = [protocolor green];
488 # float blue = [protocolor blue];
489 # FloatValue* alpha_wrapper = [protocolor alpha];
490 # float alpha = 1.0;
491 # if (alpha_wrapper != nil) {
492 # alpha = [alpha_wrapper value];
493 # }
494 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
495 # }
496 #
497 # static Color* toProto(UIColor* color) {
498 # CGFloat red, green, blue, alpha;
499 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
500 # return nil;
501 # }
502 # Color* result = [Color alloc] init];
503 # [result setRed:red];
504 # [result setGreen:green];
505 # [result setBlue:blue];
506 # if (alpha <= 0.9999) {
507 # [result setAlpha:floatWrapperWithValue(alpha)];
508 # }
509 # [result autorelease];
510 # return result;
511 # }
512 # // ...
513 #
514 # Example (JavaScript):
515 #
516 # // ...
517 #
518 # var protoToCssColor = function(rgb_color) {
519 # var redFrac = rgb_color.red || 0.0;
520 # var greenFrac = rgb_color.green || 0.0;
521 # var blueFrac = rgb_color.blue || 0.0;
522 # var red = Math.floor(redFrac * 255);
523 # var green = Math.floor(greenFrac * 255);
524 # var blue = Math.floor(blueFrac * 255);
525 #
526 # if (!('alpha' in rgb_color)) {
527 # return rgbToCssColor_(red, green, blue);
528 # }
529 #
530 # var alphaFrac = rgb_color.alpha.value || 0.0;
531 # var rgbParams = [red, green, blue].join(',');
532 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
533 # };
534 #
535 # var rgbToCssColor_ = function(red, green, blue) {
536 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
537 # var hexString = rgbNumber.toString(16);
538 # var missingZeros = 6 - hexString.length;
539 # var resultBuilder = ['#'];
540 # for (var i = 0; i < missingZeros; i++) {
541 # resultBuilder.push('0');
542 # }
543 # resultBuilder.push(hexString);
544 # return resultBuilder.join('');
545 # };
546 #
547 # // ...
548 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
549 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
550 # the final pixel color is defined by the equation:
551 #
552 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
553 #
554 # This means that a value of 1.0 corresponds to a solid color, whereas
555 # a value of 0.0 corresponds to a completely transparent color. This
556 # uses a wrapper message rather than a simple float scalar so that it is
557 # possible to distinguish between a default value and the value being unset.
558 # If omitted, this color object is to be rendered as a solid color
559 # (as if the alpha value had been explicitly given with a value of 1.0).
560 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
561 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
562 },
563 "bold": True or False, # True if the text is bold.
564 "strikethrough": True or False, # True if the text has a strikethrough.
565 "fontFamily": "A String", # The font family.
566 "fontSize": 42, # The size of the font.
567 "italic": True or False, # True if the text is italicized.
568 "underline": True or False, # True if the text is underlined.
569 },
570 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
571 "borders": { # The borders of the cell. # The borders of the cell.
572 "top": { # A border along a cell. # The top border of the cell.
573 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
574 # for simplicity of conversion to/from color representations in various
575 # languages over compactness; for example, the fields of this representation
576 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
577 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
578 # method in iOS; and, with just a little work, it can be easily formatted into
579 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
580 #
581 # Example (Java):
582 #
583 # import com.google.type.Color;
584 #
585 # // ...
586 # public static java.awt.Color fromProto(Color protocolor) {
587 # float alpha = protocolor.hasAlpha()
588 # ? protocolor.getAlpha().getValue()
589 # : 1.0;
590 #
591 # return new java.awt.Color(
592 # protocolor.getRed(),
593 # protocolor.getGreen(),
594 # protocolor.getBlue(),
595 # alpha);
596 # }
597 #
598 # public static Color toProto(java.awt.Color color) {
599 # float red = (float) color.getRed();
600 # float green = (float) color.getGreen();
601 # float blue = (float) color.getBlue();
602 # float denominator = 255.0;
603 # Color.Builder resultBuilder =
604 # Color
605 # .newBuilder()
606 # .setRed(red / denominator)
607 # .setGreen(green / denominator)
608 # .setBlue(blue / denominator);
609 # int alpha = color.getAlpha();
610 # if (alpha != 255) {
611 # result.setAlpha(
612 # FloatValue
613 # .newBuilder()
614 # .setValue(((float) alpha) / denominator)
615 # .build());
616 # }
617 # return resultBuilder.build();
618 # }
619 # // ...
620 #
621 # Example (iOS / Obj-C):
622 #
623 # // ...
624 # static UIColor* fromProto(Color* protocolor) {
625 # float red = [protocolor red];
626 # float green = [protocolor green];
627 # float blue = [protocolor blue];
628 # FloatValue* alpha_wrapper = [protocolor alpha];
629 # float alpha = 1.0;
630 # if (alpha_wrapper != nil) {
631 # alpha = [alpha_wrapper value];
632 # }
633 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
634 # }
635 #
636 # static Color* toProto(UIColor* color) {
637 # CGFloat red, green, blue, alpha;
638 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
639 # return nil;
640 # }
641 # Color* result = [Color alloc] init];
642 # [result setRed:red];
643 # [result setGreen:green];
644 # [result setBlue:blue];
645 # if (alpha <= 0.9999) {
646 # [result setAlpha:floatWrapperWithValue(alpha)];
647 # }
648 # [result autorelease];
649 # return result;
650 # }
651 # // ...
652 #
653 # Example (JavaScript):
654 #
655 # // ...
656 #
657 # var protoToCssColor = function(rgb_color) {
658 # var redFrac = rgb_color.red || 0.0;
659 # var greenFrac = rgb_color.green || 0.0;
660 # var blueFrac = rgb_color.blue || 0.0;
661 # var red = Math.floor(redFrac * 255);
662 # var green = Math.floor(greenFrac * 255);
663 # var blue = Math.floor(blueFrac * 255);
664 #
665 # if (!('alpha' in rgb_color)) {
666 # return rgbToCssColor_(red, green, blue);
667 # }
668 #
669 # var alphaFrac = rgb_color.alpha.value || 0.0;
670 # var rgbParams = [red, green, blue].join(',');
671 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
672 # };
673 #
674 # var rgbToCssColor_ = function(red, green, blue) {
675 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
676 # var hexString = rgbNumber.toString(16);
677 # var missingZeros = 6 - hexString.length;
678 # var resultBuilder = ['#'];
679 # for (var i = 0; i < missingZeros; i++) {
680 # resultBuilder.push('0');
681 # }
682 # resultBuilder.push(hexString);
683 # return resultBuilder.join('');
684 # };
685 #
686 # // ...
687 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
688 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
689 # the final pixel color is defined by the equation:
690 #
691 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
692 #
693 # This means that a value of 1.0 corresponds to a solid color, whereas
694 # a value of 0.0 corresponds to a completely transparent color. This
695 # uses a wrapper message rather than a simple float scalar so that it is
696 # possible to distinguish between a default value and the value being unset.
697 # If omitted, this color object is to be rendered as a solid color
698 # (as if the alpha value had been explicitly given with a value of 1.0).
699 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
700 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
701 },
702 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700703 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700704 "style": "A String", # The style of the border.
705 },
706 "right": { # A border along a cell. # The right border of the cell.
707 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
708 # for simplicity of conversion to/from color representations in various
709 # languages over compactness; for example, the fields of this representation
710 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
711 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
712 # method in iOS; and, with just a little work, it can be easily formatted into
713 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
714 #
715 # Example (Java):
716 #
717 # import com.google.type.Color;
718 #
719 # // ...
720 # public static java.awt.Color fromProto(Color protocolor) {
721 # float alpha = protocolor.hasAlpha()
722 # ? protocolor.getAlpha().getValue()
723 # : 1.0;
724 #
725 # return new java.awt.Color(
726 # protocolor.getRed(),
727 # protocolor.getGreen(),
728 # protocolor.getBlue(),
729 # alpha);
730 # }
731 #
732 # public static Color toProto(java.awt.Color color) {
733 # float red = (float) color.getRed();
734 # float green = (float) color.getGreen();
735 # float blue = (float) color.getBlue();
736 # float denominator = 255.0;
737 # Color.Builder resultBuilder =
738 # Color
739 # .newBuilder()
740 # .setRed(red / denominator)
741 # .setGreen(green / denominator)
742 # .setBlue(blue / denominator);
743 # int alpha = color.getAlpha();
744 # if (alpha != 255) {
745 # result.setAlpha(
746 # FloatValue
747 # .newBuilder()
748 # .setValue(((float) alpha) / denominator)
749 # .build());
750 # }
751 # return resultBuilder.build();
752 # }
753 # // ...
754 #
755 # Example (iOS / Obj-C):
756 #
757 # // ...
758 # static UIColor* fromProto(Color* protocolor) {
759 # float red = [protocolor red];
760 # float green = [protocolor green];
761 # float blue = [protocolor blue];
762 # FloatValue* alpha_wrapper = [protocolor alpha];
763 # float alpha = 1.0;
764 # if (alpha_wrapper != nil) {
765 # alpha = [alpha_wrapper value];
766 # }
767 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
768 # }
769 #
770 # static Color* toProto(UIColor* color) {
771 # CGFloat red, green, blue, alpha;
772 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
773 # return nil;
774 # }
775 # Color* result = [Color alloc] init];
776 # [result setRed:red];
777 # [result setGreen:green];
778 # [result setBlue:blue];
779 # if (alpha <= 0.9999) {
780 # [result setAlpha:floatWrapperWithValue(alpha)];
781 # }
782 # [result autorelease];
783 # return result;
784 # }
785 # // ...
786 #
787 # Example (JavaScript):
788 #
789 # // ...
790 #
791 # var protoToCssColor = function(rgb_color) {
792 # var redFrac = rgb_color.red || 0.0;
793 # var greenFrac = rgb_color.green || 0.0;
794 # var blueFrac = rgb_color.blue || 0.0;
795 # var red = Math.floor(redFrac * 255);
796 # var green = Math.floor(greenFrac * 255);
797 # var blue = Math.floor(blueFrac * 255);
798 #
799 # if (!('alpha' in rgb_color)) {
800 # return rgbToCssColor_(red, green, blue);
801 # }
802 #
803 # var alphaFrac = rgb_color.alpha.value || 0.0;
804 # var rgbParams = [red, green, blue].join(',');
805 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
806 # };
807 #
808 # var rgbToCssColor_ = function(red, green, blue) {
809 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
810 # var hexString = rgbNumber.toString(16);
811 # var missingZeros = 6 - hexString.length;
812 # var resultBuilder = ['#'];
813 # for (var i = 0; i < missingZeros; i++) {
814 # resultBuilder.push('0');
815 # }
816 # resultBuilder.push(hexString);
817 # return resultBuilder.join('');
818 # };
819 #
820 # // ...
821 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
822 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
823 # the final pixel color is defined by the equation:
824 #
825 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
826 #
827 # This means that a value of 1.0 corresponds to a solid color, whereas
828 # a value of 0.0 corresponds to a completely transparent color. This
829 # uses a wrapper message rather than a simple float scalar so that it is
830 # possible to distinguish between a default value and the value being unset.
831 # If omitted, this color object is to be rendered as a solid color
832 # (as if the alpha value had been explicitly given with a value of 1.0).
833 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
834 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
835 },
836 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700837 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700838 "style": "A String", # The style of the border.
839 },
840 "bottom": { # A border along a cell. # The bottom border of the cell.
841 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
842 # for simplicity of conversion to/from color representations in various
843 # languages over compactness; for example, the fields of this representation
844 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
845 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
846 # method in iOS; and, with just a little work, it can be easily formatted into
847 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
848 #
849 # Example (Java):
850 #
851 # import com.google.type.Color;
852 #
853 # // ...
854 # public static java.awt.Color fromProto(Color protocolor) {
855 # float alpha = protocolor.hasAlpha()
856 # ? protocolor.getAlpha().getValue()
857 # : 1.0;
858 #
859 # return new java.awt.Color(
860 # protocolor.getRed(),
861 # protocolor.getGreen(),
862 # protocolor.getBlue(),
863 # alpha);
864 # }
865 #
866 # public static Color toProto(java.awt.Color color) {
867 # float red = (float) color.getRed();
868 # float green = (float) color.getGreen();
869 # float blue = (float) color.getBlue();
870 # float denominator = 255.0;
871 # Color.Builder resultBuilder =
872 # Color
873 # .newBuilder()
874 # .setRed(red / denominator)
875 # .setGreen(green / denominator)
876 # .setBlue(blue / denominator);
877 # int alpha = color.getAlpha();
878 # if (alpha != 255) {
879 # result.setAlpha(
880 # FloatValue
881 # .newBuilder()
882 # .setValue(((float) alpha) / denominator)
883 # .build());
884 # }
885 # return resultBuilder.build();
886 # }
887 # // ...
888 #
889 # Example (iOS / Obj-C):
890 #
891 # // ...
892 # static UIColor* fromProto(Color* protocolor) {
893 # float red = [protocolor red];
894 # float green = [protocolor green];
895 # float blue = [protocolor blue];
896 # FloatValue* alpha_wrapper = [protocolor alpha];
897 # float alpha = 1.0;
898 # if (alpha_wrapper != nil) {
899 # alpha = [alpha_wrapper value];
900 # }
901 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
902 # }
903 #
904 # static Color* toProto(UIColor* color) {
905 # CGFloat red, green, blue, alpha;
906 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
907 # return nil;
908 # }
909 # Color* result = [Color alloc] init];
910 # [result setRed:red];
911 # [result setGreen:green];
912 # [result setBlue:blue];
913 # if (alpha <= 0.9999) {
914 # [result setAlpha:floatWrapperWithValue(alpha)];
915 # }
916 # [result autorelease];
917 # return result;
918 # }
919 # // ...
920 #
921 # Example (JavaScript):
922 #
923 # // ...
924 #
925 # var protoToCssColor = function(rgb_color) {
926 # var redFrac = rgb_color.red || 0.0;
927 # var greenFrac = rgb_color.green || 0.0;
928 # var blueFrac = rgb_color.blue || 0.0;
929 # var red = Math.floor(redFrac * 255);
930 # var green = Math.floor(greenFrac * 255);
931 # var blue = Math.floor(blueFrac * 255);
932 #
933 # if (!('alpha' in rgb_color)) {
934 # return rgbToCssColor_(red, green, blue);
935 # }
936 #
937 # var alphaFrac = rgb_color.alpha.value || 0.0;
938 # var rgbParams = [red, green, blue].join(',');
939 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
940 # };
941 #
942 # var rgbToCssColor_ = function(red, green, blue) {
943 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
944 # var hexString = rgbNumber.toString(16);
945 # var missingZeros = 6 - hexString.length;
946 # var resultBuilder = ['#'];
947 # for (var i = 0; i < missingZeros; i++) {
948 # resultBuilder.push('0');
949 # }
950 # resultBuilder.push(hexString);
951 # return resultBuilder.join('');
952 # };
953 #
954 # // ...
955 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
956 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
957 # the final pixel color is defined by the equation:
958 #
959 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
960 #
961 # This means that a value of 1.0 corresponds to a solid color, whereas
962 # a value of 0.0 corresponds to a completely transparent color. This
963 # uses a wrapper message rather than a simple float scalar so that it is
964 # possible to distinguish between a default value and the value being unset.
965 # If omitted, this color object is to be rendered as a solid color
966 # (as if the alpha value had been explicitly given with a value of 1.0).
967 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
968 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
969 },
970 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700971 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700972 "style": "A String", # The style of the border.
973 },
974 "left": { # A border along a cell. # The left border of the cell.
975 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
976 # for simplicity of conversion to/from color representations in various
977 # languages over compactness; for example, the fields of this representation
978 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
979 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
980 # method in iOS; and, with just a little work, it can be easily formatted into
981 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
982 #
983 # Example (Java):
984 #
985 # import com.google.type.Color;
986 #
987 # // ...
988 # public static java.awt.Color fromProto(Color protocolor) {
989 # float alpha = protocolor.hasAlpha()
990 # ? protocolor.getAlpha().getValue()
991 # : 1.0;
992 #
993 # return new java.awt.Color(
994 # protocolor.getRed(),
995 # protocolor.getGreen(),
996 # protocolor.getBlue(),
997 # alpha);
998 # }
999 #
1000 # public static Color toProto(java.awt.Color color) {
1001 # float red = (float) color.getRed();
1002 # float green = (float) color.getGreen();
1003 # float blue = (float) color.getBlue();
1004 # float denominator = 255.0;
1005 # Color.Builder resultBuilder =
1006 # Color
1007 # .newBuilder()
1008 # .setRed(red / denominator)
1009 # .setGreen(green / denominator)
1010 # .setBlue(blue / denominator);
1011 # int alpha = color.getAlpha();
1012 # if (alpha != 255) {
1013 # result.setAlpha(
1014 # FloatValue
1015 # .newBuilder()
1016 # .setValue(((float) alpha) / denominator)
1017 # .build());
1018 # }
1019 # return resultBuilder.build();
1020 # }
1021 # // ...
1022 #
1023 # Example (iOS / Obj-C):
1024 #
1025 # // ...
1026 # static UIColor* fromProto(Color* protocolor) {
1027 # float red = [protocolor red];
1028 # float green = [protocolor green];
1029 # float blue = [protocolor blue];
1030 # FloatValue* alpha_wrapper = [protocolor alpha];
1031 # float alpha = 1.0;
1032 # if (alpha_wrapper != nil) {
1033 # alpha = [alpha_wrapper value];
1034 # }
1035 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1036 # }
1037 #
1038 # static Color* toProto(UIColor* color) {
1039 # CGFloat red, green, blue, alpha;
1040 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1041 # return nil;
1042 # }
1043 # Color* result = [Color alloc] init];
1044 # [result setRed:red];
1045 # [result setGreen:green];
1046 # [result setBlue:blue];
1047 # if (alpha <= 0.9999) {
1048 # [result setAlpha:floatWrapperWithValue(alpha)];
1049 # }
1050 # [result autorelease];
1051 # return result;
1052 # }
1053 # // ...
1054 #
1055 # Example (JavaScript):
1056 #
1057 # // ...
1058 #
1059 # var protoToCssColor = function(rgb_color) {
1060 # var redFrac = rgb_color.red || 0.0;
1061 # var greenFrac = rgb_color.green || 0.0;
1062 # var blueFrac = rgb_color.blue || 0.0;
1063 # var red = Math.floor(redFrac * 255);
1064 # var green = Math.floor(greenFrac * 255);
1065 # var blue = Math.floor(blueFrac * 255);
1066 #
1067 # if (!('alpha' in rgb_color)) {
1068 # return rgbToCssColor_(red, green, blue);
1069 # }
1070 #
1071 # var alphaFrac = rgb_color.alpha.value || 0.0;
1072 # var rgbParams = [red, green, blue].join(',');
1073 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1074 # };
1075 #
1076 # var rgbToCssColor_ = function(red, green, blue) {
1077 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1078 # var hexString = rgbNumber.toString(16);
1079 # var missingZeros = 6 - hexString.length;
1080 # var resultBuilder = ['#'];
1081 # for (var i = 0; i < missingZeros; i++) {
1082 # resultBuilder.push('0');
1083 # }
1084 # resultBuilder.push(hexString);
1085 # return resultBuilder.join('');
1086 # };
1087 #
1088 # // ...
1089 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1090 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1091 # the final pixel color is defined by the equation:
1092 #
1093 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1094 #
1095 # This means that a value of 1.0 corresponds to a solid color, whereas
1096 # a value of 0.0 corresponds to a completely transparent color. This
1097 # uses a wrapper message rather than a simple float scalar so that it is
1098 # possible to distinguish between a default value and the value being unset.
1099 # If omitted, this color object is to be rendered as a solid color
1100 # (as if the alpha value had been explicitly given with a value of 1.0).
1101 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1102 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1103 },
1104 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001105 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001106 "style": "A String", # The style of the border.
1107 },
1108 },
1109 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
1110 },
1111 },
1112 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
1113 # the interpolation points listed. The format of a cell will vary
1114 # based on its contents as compared to the values of the interpolation
1115 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001116 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001117 # These pin the gradient color scale according to the color,
1118 # type and value chosen.
1119 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1120 # for simplicity of conversion to/from color representations in various
1121 # languages over compactness; for example, the fields of this representation
1122 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1123 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1124 # method in iOS; and, with just a little work, it can be easily formatted into
1125 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1126 #
1127 # Example (Java):
1128 #
1129 # import com.google.type.Color;
1130 #
1131 # // ...
1132 # public static java.awt.Color fromProto(Color protocolor) {
1133 # float alpha = protocolor.hasAlpha()
1134 # ? protocolor.getAlpha().getValue()
1135 # : 1.0;
1136 #
1137 # return new java.awt.Color(
1138 # protocolor.getRed(),
1139 # protocolor.getGreen(),
1140 # protocolor.getBlue(),
1141 # alpha);
1142 # }
1143 #
1144 # public static Color toProto(java.awt.Color color) {
1145 # float red = (float) color.getRed();
1146 # float green = (float) color.getGreen();
1147 # float blue = (float) color.getBlue();
1148 # float denominator = 255.0;
1149 # Color.Builder resultBuilder =
1150 # Color
1151 # .newBuilder()
1152 # .setRed(red / denominator)
1153 # .setGreen(green / denominator)
1154 # .setBlue(blue / denominator);
1155 # int alpha = color.getAlpha();
1156 # if (alpha != 255) {
1157 # result.setAlpha(
1158 # FloatValue
1159 # .newBuilder()
1160 # .setValue(((float) alpha) / denominator)
1161 # .build());
1162 # }
1163 # return resultBuilder.build();
1164 # }
1165 # // ...
1166 #
1167 # Example (iOS / Obj-C):
1168 #
1169 # // ...
1170 # static UIColor* fromProto(Color* protocolor) {
1171 # float red = [protocolor red];
1172 # float green = [protocolor green];
1173 # float blue = [protocolor blue];
1174 # FloatValue* alpha_wrapper = [protocolor alpha];
1175 # float alpha = 1.0;
1176 # if (alpha_wrapper != nil) {
1177 # alpha = [alpha_wrapper value];
1178 # }
1179 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1180 # }
1181 #
1182 # static Color* toProto(UIColor* color) {
1183 # CGFloat red, green, blue, alpha;
1184 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1185 # return nil;
1186 # }
1187 # Color* result = [Color alloc] init];
1188 # [result setRed:red];
1189 # [result setGreen:green];
1190 # [result setBlue:blue];
1191 # if (alpha <= 0.9999) {
1192 # [result setAlpha:floatWrapperWithValue(alpha)];
1193 # }
1194 # [result autorelease];
1195 # return result;
1196 # }
1197 # // ...
1198 #
1199 # Example (JavaScript):
1200 #
1201 # // ...
1202 #
1203 # var protoToCssColor = function(rgb_color) {
1204 # var redFrac = rgb_color.red || 0.0;
1205 # var greenFrac = rgb_color.green || 0.0;
1206 # var blueFrac = rgb_color.blue || 0.0;
1207 # var red = Math.floor(redFrac * 255);
1208 # var green = Math.floor(greenFrac * 255);
1209 # var blue = Math.floor(blueFrac * 255);
1210 #
1211 # if (!('alpha' in rgb_color)) {
1212 # return rgbToCssColor_(red, green, blue);
1213 # }
1214 #
1215 # var alphaFrac = rgb_color.alpha.value || 0.0;
1216 # var rgbParams = [red, green, blue].join(',');
1217 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1218 # };
1219 #
1220 # var rgbToCssColor_ = function(red, green, blue) {
1221 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1222 # var hexString = rgbNumber.toString(16);
1223 # var missingZeros = 6 - hexString.length;
1224 # var resultBuilder = ['#'];
1225 # for (var i = 0; i < missingZeros; i++) {
1226 # resultBuilder.push('0');
1227 # }
1228 # resultBuilder.push(hexString);
1229 # return resultBuilder.join('');
1230 # };
1231 #
1232 # // ...
1233 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1234 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1235 # the final pixel color is defined by the equation:
1236 #
1237 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1238 #
1239 # This means that a value of 1.0 corresponds to a solid color, whereas
1240 # a value of 0.0 corresponds to a completely transparent color. This
1241 # uses a wrapper message rather than a simple float scalar so that it is
1242 # possible to distinguish between a default value and the value being unset.
1243 # If omitted, this color object is to be rendered as a solid color
1244 # (as if the alpha value had been explicitly given with a value of 1.0).
1245 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1246 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1247 },
1248 "type": "A String", # How the value should be interpreted.
1249 "value": "A String", # The value this interpolation point uses. May be a formula.
1250 # Unused if type is MIN or
1251 # MAX.
1252 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001253 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001254 # These pin the gradient color scale according to the color,
1255 # type and value chosen.
1256 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1257 # for simplicity of conversion to/from color representations in various
1258 # languages over compactness; for example, the fields of this representation
1259 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1260 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1261 # method in iOS; and, with just a little work, it can be easily formatted into
1262 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1263 #
1264 # Example (Java):
1265 #
1266 # import com.google.type.Color;
1267 #
1268 # // ...
1269 # public static java.awt.Color fromProto(Color protocolor) {
1270 # float alpha = protocolor.hasAlpha()
1271 # ? protocolor.getAlpha().getValue()
1272 # : 1.0;
1273 #
1274 # return new java.awt.Color(
1275 # protocolor.getRed(),
1276 # protocolor.getGreen(),
1277 # protocolor.getBlue(),
1278 # alpha);
1279 # }
1280 #
1281 # public static Color toProto(java.awt.Color color) {
1282 # float red = (float) color.getRed();
1283 # float green = (float) color.getGreen();
1284 # float blue = (float) color.getBlue();
1285 # float denominator = 255.0;
1286 # Color.Builder resultBuilder =
1287 # Color
1288 # .newBuilder()
1289 # .setRed(red / denominator)
1290 # .setGreen(green / denominator)
1291 # .setBlue(blue / denominator);
1292 # int alpha = color.getAlpha();
1293 # if (alpha != 255) {
1294 # result.setAlpha(
1295 # FloatValue
1296 # .newBuilder()
1297 # .setValue(((float) alpha) / denominator)
1298 # .build());
1299 # }
1300 # return resultBuilder.build();
1301 # }
1302 # // ...
1303 #
1304 # Example (iOS / Obj-C):
1305 #
1306 # // ...
1307 # static UIColor* fromProto(Color* protocolor) {
1308 # float red = [protocolor red];
1309 # float green = [protocolor green];
1310 # float blue = [protocolor blue];
1311 # FloatValue* alpha_wrapper = [protocolor alpha];
1312 # float alpha = 1.0;
1313 # if (alpha_wrapper != nil) {
1314 # alpha = [alpha_wrapper value];
1315 # }
1316 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1317 # }
1318 #
1319 # static Color* toProto(UIColor* color) {
1320 # CGFloat red, green, blue, alpha;
1321 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1322 # return nil;
1323 # }
1324 # Color* result = [Color alloc] init];
1325 # [result setRed:red];
1326 # [result setGreen:green];
1327 # [result setBlue:blue];
1328 # if (alpha <= 0.9999) {
1329 # [result setAlpha:floatWrapperWithValue(alpha)];
1330 # }
1331 # [result autorelease];
1332 # return result;
1333 # }
1334 # // ...
1335 #
1336 # Example (JavaScript):
1337 #
1338 # // ...
1339 #
1340 # var protoToCssColor = function(rgb_color) {
1341 # var redFrac = rgb_color.red || 0.0;
1342 # var greenFrac = rgb_color.green || 0.0;
1343 # var blueFrac = rgb_color.blue || 0.0;
1344 # var red = Math.floor(redFrac * 255);
1345 # var green = Math.floor(greenFrac * 255);
1346 # var blue = Math.floor(blueFrac * 255);
1347 #
1348 # if (!('alpha' in rgb_color)) {
1349 # return rgbToCssColor_(red, green, blue);
1350 # }
1351 #
1352 # var alphaFrac = rgb_color.alpha.value || 0.0;
1353 # var rgbParams = [red, green, blue].join(',');
1354 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1355 # };
1356 #
1357 # var rgbToCssColor_ = function(red, green, blue) {
1358 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1359 # var hexString = rgbNumber.toString(16);
1360 # var missingZeros = 6 - hexString.length;
1361 # var resultBuilder = ['#'];
1362 # for (var i = 0; i < missingZeros; i++) {
1363 # resultBuilder.push('0');
1364 # }
1365 # resultBuilder.push(hexString);
1366 # return resultBuilder.join('');
1367 # };
1368 #
1369 # // ...
1370 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1371 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1372 # the final pixel color is defined by the equation:
1373 #
1374 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1375 #
1376 # This means that a value of 1.0 corresponds to a solid color, whereas
1377 # a value of 0.0 corresponds to a completely transparent color. This
1378 # uses a wrapper message rather than a simple float scalar so that it is
1379 # possible to distinguish between a default value and the value being unset.
1380 # If omitted, this color object is to be rendered as a solid color
1381 # (as if the alpha value had been explicitly given with a value of 1.0).
1382 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1383 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1384 },
1385 "type": "A String", # How the value should be interpreted.
1386 "value": "A String", # The value this interpolation point uses. May be a formula.
1387 # Unused if type is MIN or
1388 # MAX.
1389 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001390 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001391 # These pin the gradient color scale according to the color,
1392 # type and value chosen.
1393 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1394 # for simplicity of conversion to/from color representations in various
1395 # languages over compactness; for example, the fields of this representation
1396 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1397 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1398 # method in iOS; and, with just a little work, it can be easily formatted into
1399 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1400 #
1401 # Example (Java):
1402 #
1403 # import com.google.type.Color;
1404 #
1405 # // ...
1406 # public static java.awt.Color fromProto(Color protocolor) {
1407 # float alpha = protocolor.hasAlpha()
1408 # ? protocolor.getAlpha().getValue()
1409 # : 1.0;
1410 #
1411 # return new java.awt.Color(
1412 # protocolor.getRed(),
1413 # protocolor.getGreen(),
1414 # protocolor.getBlue(),
1415 # alpha);
1416 # }
1417 #
1418 # public static Color toProto(java.awt.Color color) {
1419 # float red = (float) color.getRed();
1420 # float green = (float) color.getGreen();
1421 # float blue = (float) color.getBlue();
1422 # float denominator = 255.0;
1423 # Color.Builder resultBuilder =
1424 # Color
1425 # .newBuilder()
1426 # .setRed(red / denominator)
1427 # .setGreen(green / denominator)
1428 # .setBlue(blue / denominator);
1429 # int alpha = color.getAlpha();
1430 # if (alpha != 255) {
1431 # result.setAlpha(
1432 # FloatValue
1433 # .newBuilder()
1434 # .setValue(((float) alpha) / denominator)
1435 # .build());
1436 # }
1437 # return resultBuilder.build();
1438 # }
1439 # // ...
1440 #
1441 # Example (iOS / Obj-C):
1442 #
1443 # // ...
1444 # static UIColor* fromProto(Color* protocolor) {
1445 # float red = [protocolor red];
1446 # float green = [protocolor green];
1447 # float blue = [protocolor blue];
1448 # FloatValue* alpha_wrapper = [protocolor alpha];
1449 # float alpha = 1.0;
1450 # if (alpha_wrapper != nil) {
1451 # alpha = [alpha_wrapper value];
1452 # }
1453 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1454 # }
1455 #
1456 # static Color* toProto(UIColor* color) {
1457 # CGFloat red, green, blue, alpha;
1458 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1459 # return nil;
1460 # }
1461 # Color* result = [Color alloc] init];
1462 # [result setRed:red];
1463 # [result setGreen:green];
1464 # [result setBlue:blue];
1465 # if (alpha <= 0.9999) {
1466 # [result setAlpha:floatWrapperWithValue(alpha)];
1467 # }
1468 # [result autorelease];
1469 # return result;
1470 # }
1471 # // ...
1472 #
1473 # Example (JavaScript):
1474 #
1475 # // ...
1476 #
1477 # var protoToCssColor = function(rgb_color) {
1478 # var redFrac = rgb_color.red || 0.0;
1479 # var greenFrac = rgb_color.green || 0.0;
1480 # var blueFrac = rgb_color.blue || 0.0;
1481 # var red = Math.floor(redFrac * 255);
1482 # var green = Math.floor(greenFrac * 255);
1483 # var blue = Math.floor(blueFrac * 255);
1484 #
1485 # if (!('alpha' in rgb_color)) {
1486 # return rgbToCssColor_(red, green, blue);
1487 # }
1488 #
1489 # var alphaFrac = rgb_color.alpha.value || 0.0;
1490 # var rgbParams = [red, green, blue].join(',');
1491 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1492 # };
1493 #
1494 # var rgbToCssColor_ = function(red, green, blue) {
1495 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1496 # var hexString = rgbNumber.toString(16);
1497 # var missingZeros = 6 - hexString.length;
1498 # var resultBuilder = ['#'];
1499 # for (var i = 0; i < missingZeros; i++) {
1500 # resultBuilder.push('0');
1501 # }
1502 # resultBuilder.push(hexString);
1503 # return resultBuilder.join('');
1504 # };
1505 #
1506 # // ...
1507 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1508 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1509 # the final pixel color is defined by the equation:
1510 #
1511 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1512 #
1513 # This means that a value of 1.0 corresponds to a solid color, whereas
1514 # a value of 0.0 corresponds to a completely transparent color. This
1515 # uses a wrapper message rather than a simple float scalar so that it is
1516 # possible to distinguish between a default value and the value being unset.
1517 # If omitted, this color object is to be rendered as a solid color
1518 # (as if the alpha value had been explicitly given with a value of 1.0).
1519 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1520 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1521 },
1522 "type": "A String", # How the value should be interpreted.
1523 "value": "A String", # The value this interpolation point uses. May be a formula.
1524 # Unused if type is MIN or
1525 # MAX.
1526 },
1527 },
1528 },
1529 },
1530 "updateProtectedRange": { # Updates an existing protected range with the specified # Updates a protected range.
1531 # protectedRangeId.
1532 "fields": "A String", # The fields that should be updated. At least one field must be specified.
1533 # The root `protectedRange` is implied and should not be specified.
1534 # A single `"*"` can be used as short-hand for listing every field.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001535 "protectedRange": { # A protected range. # The protected range to update with the new properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001536 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
1537 # Unprotected ranges are only supported on protected sheets.
1538 { # A range on a sheet.
1539 # All indexes are zero-based.
1540 # Indexes are half open, e.g the start index is inclusive
1541 # and the end index is exclusive -- [start_index, end_index).
1542 # Missing indexes indicate the range is unbounded on that side.
1543 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001544 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001545 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001546 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001547 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001548 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001549 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001550 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001551 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001552 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001553 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001554 # `Sheet1!A:B == sheet_id: 0,
1555 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001556 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001557 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001558 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001559 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001560 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001561 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001562 #
1563 # The start index must always be less than or equal to the end index.
1564 # If the start index equals the end index, then the range is empty.
1565 # Empty ranges are typically not meaningful and are usually rendered in the
1566 # UI as `#REF!`.
1567 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
1568 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
1569 "sheetId": 42, # The sheet this range is on.
1570 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
1571 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
1572 },
1573 ],
1574 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
1575 # protected area.
1576 # This field is read-only.
1577 "description": "A String", # The description of this protected range.
1578 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
1579 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001580 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001581 # may be set.
1582 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
1583 # This field is only visible to users with edit access to the protected
1584 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001585 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001586 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
1587 # range. Domain protection is only supported on documents within a domain.
1588 "users": [ # The email addresses of users with edit access to the protected range.
1589 "A String",
1590 ],
1591 "groups": [ # The email addresses of groups with edit access to the protected range.
1592 "A String",
1593 ],
1594 },
1595 "protectedRangeId": 42, # The ID of the protected range.
1596 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001597 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001598 # Warning-based protection means that every user can edit data in the
1599 # protected range, except editing will prompt a warning asking the user
1600 # to confirm the edit.
1601 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001602 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001603 # Additionally, if this field is changed from true to false and the
1604 # `editors` field is not set (nor included in the field mask), then
1605 # the editors will be set to all the editors in the document.
1606 "range": { # A range on a sheet. # The range that is being protected.
1607 # The range may be fully unbounded, in which case this is considered
1608 # a protected sheet.
1609 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001610 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001611 # may be set.
1612 # All indexes are zero-based.
1613 # Indexes are half open, e.g the start index is inclusive
1614 # and the end index is exclusive -- [start_index, end_index).
1615 # Missing indexes indicate the range is unbounded on that side.
1616 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001617 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001618 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001619 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001620 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001621 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001622 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001623 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001624 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001625 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001626 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001627 # `Sheet1!A:B == sheet_id: 0,
1628 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001629 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001630 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001631 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001632 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001633 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001634 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001635 #
1636 # The start index must always be less than or equal to the end index.
1637 # If the start index equals the end index, then the range is empty.
1638 # Empty ranges are typically not meaningful and are usually rendered in the
1639 # UI as `#REF!`.
1640 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
1641 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
1642 "sheetId": 42, # The sheet this range is on.
1643 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
1644 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
1645 },
1646 },
1647 },
1648 "deleteDimension": { # Deletes the dimensions from the sheet. # Deletes rows or columns in a sheet.
1649 "range": { # A range along a single dimension on a sheet. # The dimensions to delete from the sheet.
1650 # All indexes are zero-based.
1651 # Indexes are half open: the start index is inclusive
1652 # and the end index is exclusive.
1653 # Missing indexes indicate the range is unbounded on that side.
1654 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
1655 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
1656 "sheetId": 42, # The sheet this span is on.
1657 "dimension": "A String", # The dimension of the span.
1658 },
1659 },
1660 "addProtectedRange": { # Adds a new protected range. # Adds a protected range.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001661 "protectedRange": { # A protected range. # The protected range to be added. The
1662 # protectedRangeId field is optional; if
1663 # one is not set, an id will be randomly generated. (It is an error to
1664 # specify the ID of a range that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001665 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
1666 # Unprotected ranges are only supported on protected sheets.
1667 { # A range on a sheet.
1668 # All indexes are zero-based.
1669 # Indexes are half open, e.g the start index is inclusive
1670 # and the end index is exclusive -- [start_index, end_index).
1671 # Missing indexes indicate the range is unbounded on that side.
1672 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001673 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001674 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001675 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001676 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001677 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001678 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001679 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001680 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001681 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001682 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001683 # `Sheet1!A:B == sheet_id: 0,
1684 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001685 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001686 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001687 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001688 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001689 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001690 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001691 #
1692 # The start index must always be less than or equal to the end index.
1693 # If the start index equals the end index, then the range is empty.
1694 # Empty ranges are typically not meaningful and are usually rendered in the
1695 # UI as `#REF!`.
1696 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
1697 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
1698 "sheetId": 42, # The sheet this range is on.
1699 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
1700 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
1701 },
1702 ],
1703 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
1704 # protected area.
1705 # This field is read-only.
1706 "description": "A String", # The description of this protected range.
1707 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
1708 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001709 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001710 # may be set.
1711 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
1712 # This field is only visible to users with edit access to the protected
1713 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001714 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001715 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
1716 # range. Domain protection is only supported on documents within a domain.
1717 "users": [ # The email addresses of users with edit access to the protected range.
1718 "A String",
1719 ],
1720 "groups": [ # The email addresses of groups with edit access to the protected range.
1721 "A String",
1722 ],
1723 },
1724 "protectedRangeId": 42, # The ID of the protected range.
1725 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001726 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001727 # Warning-based protection means that every user can edit data in the
1728 # protected range, except editing will prompt a warning asking the user
1729 # to confirm the edit.
1730 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001731 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001732 # Additionally, if this field is changed from true to false and the
1733 # `editors` field is not set (nor included in the field mask), then
1734 # the editors will be set to all the editors in the document.
1735 "range": { # A range on a sheet. # The range that is being protected.
1736 # The range may be fully unbounded, in which case this is considered
1737 # a protected sheet.
1738 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001739 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001740 # may be set.
1741 # All indexes are zero-based.
1742 # Indexes are half open, e.g the start index is inclusive
1743 # and the end index is exclusive -- [start_index, end_index).
1744 # Missing indexes indicate the range is unbounded on that side.
1745 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001746 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001747 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001748 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001749 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001750 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001751 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001752 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001753 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001754 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001755 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001756 # `Sheet1!A:B == sheet_id: 0,
1757 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001758 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001759 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001760 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001761 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001762 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001763 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001764 #
1765 # The start index must always be less than or equal to the end index.
1766 # If the start index equals the end index, then the range is empty.
1767 # Empty ranges are typically not meaningful and are usually rendered in the
1768 # UI as `#REF!`.
1769 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
1770 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
1771 "sheetId": 42, # The sheet this range is on.
1772 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
1773 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
1774 },
1775 },
1776 },
1777 "deleteEmbeddedObject": { # Deletes the embedded object with the given ID. # Deletes an embedded object (e.g, chart, image) in a sheet.
1778 "objectId": 42, # The ID of the embedded object to delete.
1779 },
1780 "pasteData": { # Inserts data into the spreadsheet starting at the specified coordinate. # Pastes data (HTML or delimited) into a sheet.
1781 "coordinate": { # A coordinate in a sheet. # The coordinate at which the data should start being inserted.
1782 # All indexes are zero-based.
1783 "rowIndex": 42, # The row index of the coordinate.
1784 "columnIndex": 42, # The column index of the coordinate.
1785 "sheetId": 42, # The sheet this coordinate is on.
1786 },
1787 "type": "A String", # How the data should be pasted.
1788 "delimiter": "A String", # The delimiter in the data.
1789 "html": True or False, # True if the data is HTML.
1790 "data": "A String", # The data to insert.
1791 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001792 "appendCells": { # Adds new cells after the last row with data in a sheet, # Appends cells after the last row with data in a sheet.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001793 # inserting new rows into the sheet if necessary.
1794 "fields": "A String", # The fields of CellData that should be updated.
1795 # At least one field must be specified.
1796 # The root is the CellData; 'row.values.' should not be specified.
1797 # A single `"*"` can be used as short-hand for listing every field.
1798 "rows": [ # The data to append.
1799 { # Data about each cell in a row.
1800 "values": [ # The values in the row, one per column.
1801 { # Data about a specific cell.
1802 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
1803 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001804 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001805 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001806 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001807 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
1808 # or vertically (as rows).
1809 "rows": [ # Each row grouping in the pivot table.
1810 { # A single grouping (either row or column) in a pivot table.
1811 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
1812 "valueMetadata": [ # Metadata about values in the grouping.
1813 { # Metadata about a value in a pivot grouping.
1814 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
1815 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
1816 # (Note that formulaValue is not valid,
1817 # because the values will be calculated.)
1818 "numberValue": 3.14, # Represents a double value.
1819 # Note: Dates, Times and DateTimes are represented as doubles in
1820 # "serial number" format.
1821 "boolValue": True or False, # Represents a boolean value.
1822 "formulaValue": "A String", # Represents a formula.
1823 "stringValue": "A String", # Represents a string value.
1824 # Leading single quotes are not included. For example, if the user typed
1825 # `'123` into the UI, this would be represented as a `stringValue` of
1826 # `"123"`.
1827 "errorValue": { # An error in a cell. # Represents an error.
1828 # This field is read-only.
1829 "message": "A String", # A message with more information about the error
1830 # (in the spreadsheet's locale).
1831 "type": "A String", # The type of error.
1832 },
1833 },
1834 },
1835 ],
1836 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
1837 # If not specified, sorting is alphabetical by this group's values.
1838 "buckets": [ # Determines the bucket from which values are chosen to sort.
1839 #
1840 # For example, in a pivot table with one row group & two column groups,
1841 # the row group can list up to two values. The first value corresponds
1842 # to a value within the first column group, and the second value
1843 # corresponds to a value in the second column group. If no values
1844 # are listed, this would indicate that the row should be sorted according
1845 # to the "Grand Total" over the column groups. If a single value is listed,
1846 # this would correspond to using the "Total" of that bucket.
1847 { # The kinds of value that a cell in a spreadsheet can have.
1848 "numberValue": 3.14, # Represents a double value.
1849 # Note: Dates, Times and DateTimes are represented as doubles in
1850 # "serial number" format.
1851 "boolValue": True or False, # Represents a boolean value.
1852 "formulaValue": "A String", # Represents a formula.
1853 "stringValue": "A String", # Represents a string value.
1854 # Leading single quotes are not included. For example, if the user typed
1855 # `'123` into the UI, this would be represented as a `stringValue` of
1856 # `"123"`.
1857 "errorValue": { # An error in a cell. # Represents an error.
1858 # This field is read-only.
1859 "message": "A String", # A message with more information about the error
1860 # (in the spreadsheet's locale).
1861 "type": "A String", # The type of error.
1862 },
1863 },
1864 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001865 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001866 # grouping should be sorted by.
1867 },
1868 "sortOrder": "A String", # The order the values in this group should be sorted.
1869 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
1870 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001871 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001872 # means this group refers to column `C`, whereas the offset `1` would refer
1873 # to column `D`.
1874 },
1875 ],
1876 "source": { # A range on a sheet. # The range the pivot table is reading data from.
1877 # All indexes are zero-based.
1878 # Indexes are half open, e.g the start index is inclusive
1879 # and the end index is exclusive -- [start_index, end_index).
1880 # Missing indexes indicate the range is unbounded on that side.
1881 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001882 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001883 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001884 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001885 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001886 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001887 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001888 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001889 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001890 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001891 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001892 # `Sheet1!A:B == sheet_id: 0,
1893 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001894 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001895 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001896 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001897 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001898 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001899 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001900 #
1901 # The start index must always be less than or equal to the end index.
1902 # If the start index equals the end index, then the range is empty.
1903 # Empty ranges are typically not meaningful and are usually rendered in the
1904 # UI as `#REF!`.
1905 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
1906 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
1907 "sheetId": 42, # The sheet this range is on.
1908 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
1909 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
1910 },
1911 "values": [ # A list of values to include in the pivot table.
1912 { # The definition of how a value in a pivot table should be calculated.
1913 "formula": "A String", # A custom formula to calculate the value. The formula must start
1914 # with an `=` character.
1915 "summarizeFunction": "A String", # A function to summarize the value.
1916 # If formula is set, the only supported values are
1917 # SUM and
1918 # CUSTOM.
1919 # If sourceColumnOffset is set, then `CUSTOM`
1920 # is not supported.
1921 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
1922 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001923 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001924 # means this value refers to column `C`, whereas the offset `1` would
1925 # refer to column `D`.
1926 "name": "A String", # A name to use for the value. This is only used if formula was set.
1927 # Otherwise, the column name is used.
1928 },
1929 ],
1930 "criteria": { # An optional mapping of filters per source column offset.
1931 #
1932 # The filters will be applied before aggregating data into the pivot table.
1933 # The map's key is the column offset of the source range that you want to
1934 # filter, and the value is the criteria for that column.
1935 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001936 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001937 # for column `C`, whereas the key `1` is for column `D`.
1938 "a_key": { # Criteria for showing/hiding rows in a pivot table.
1939 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
1940 "A String",
1941 ],
1942 },
1943 },
1944 "columns": [ # Each column grouping in the pivot table.
1945 { # A single grouping (either row or column) in a pivot table.
1946 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
1947 "valueMetadata": [ # Metadata about values in the grouping.
1948 { # Metadata about a value in a pivot grouping.
1949 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
1950 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
1951 # (Note that formulaValue is not valid,
1952 # because the values will be calculated.)
1953 "numberValue": 3.14, # Represents a double value.
1954 # Note: Dates, Times and DateTimes are represented as doubles in
1955 # "serial number" format.
1956 "boolValue": True or False, # Represents a boolean value.
1957 "formulaValue": "A String", # Represents a formula.
1958 "stringValue": "A String", # Represents a string value.
1959 # Leading single quotes are not included. For example, if the user typed
1960 # `'123` into the UI, this would be represented as a `stringValue` of
1961 # `"123"`.
1962 "errorValue": { # An error in a cell. # Represents an error.
1963 # This field is read-only.
1964 "message": "A String", # A message with more information about the error
1965 # (in the spreadsheet's locale).
1966 "type": "A String", # The type of error.
1967 },
1968 },
1969 },
1970 ],
1971 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
1972 # If not specified, sorting is alphabetical by this group's values.
1973 "buckets": [ # Determines the bucket from which values are chosen to sort.
1974 #
1975 # For example, in a pivot table with one row group & two column groups,
1976 # the row group can list up to two values. The first value corresponds
1977 # to a value within the first column group, and the second value
1978 # corresponds to a value in the second column group. If no values
1979 # are listed, this would indicate that the row should be sorted according
1980 # to the "Grand Total" over the column groups. If a single value is listed,
1981 # this would correspond to using the "Total" of that bucket.
1982 { # The kinds of value that a cell in a spreadsheet can have.
1983 "numberValue": 3.14, # Represents a double value.
1984 # Note: Dates, Times and DateTimes are represented as doubles in
1985 # "serial number" format.
1986 "boolValue": True or False, # Represents a boolean value.
1987 "formulaValue": "A String", # Represents a formula.
1988 "stringValue": "A String", # Represents a string value.
1989 # Leading single quotes are not included. For example, if the user typed
1990 # `'123` into the UI, this would be represented as a `stringValue` of
1991 # `"123"`.
1992 "errorValue": { # An error in a cell. # Represents an error.
1993 # This field is read-only.
1994 "message": "A String", # A message with more information about the error
1995 # (in the spreadsheet's locale).
1996 "type": "A String", # The type of error.
1997 },
1998 },
1999 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002000 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002001 # grouping should be sorted by.
2002 },
2003 "sortOrder": "A String", # The order the values in this group should be sorted.
2004 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
2005 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002006 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002007 # means this group refers to column `C`, whereas the offset `1` would refer
2008 # to column `D`.
2009 },
2010 ],
2011 },
2012 "hyperlink": "A String", # A hyperlink this cell points to, if any.
2013 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
2014 "effectiveValue": { # The kinds of value that a cell in a spreadsheet can have. # The effective value of the cell. For cells with formulas, this will be
2015 # the calculated value. For cells with literals, this will be
2016 # the same as the user_entered_value.
2017 # This field is read-only.
2018 "numberValue": 3.14, # Represents a double value.
2019 # Note: Dates, Times and DateTimes are represented as doubles in
2020 # "serial number" format.
2021 "boolValue": True or False, # Represents a boolean value.
2022 "formulaValue": "A String", # Represents a formula.
2023 "stringValue": "A String", # Represents a string value.
2024 # Leading single quotes are not included. For example, if the user typed
2025 # `'123` into the UI, this would be represented as a `stringValue` of
2026 # `"123"`.
2027 "errorValue": { # An error in a cell. # Represents an error.
2028 # This field is read-only.
2029 "message": "A String", # A message with more information about the error
2030 # (in the spreadsheet's locale).
2031 "type": "A String", # The type of error.
2032 },
2033 },
2034 "formattedValue": "A String", # The formatted value of the cell.
2035 # This is the value as it's shown to the user.
2036 # This field is read-only.
2037 "userEnteredValue": { # The kinds of value that a cell in a spreadsheet can have. # The value the user entered in the cell. e.g, `1234`, `'Hello'`, or `=NOW()`
2038 # Note: Dates, Times and DateTimes are represented as doubles in
2039 # serial number format.
2040 "numberValue": 3.14, # Represents a double value.
2041 # Note: Dates, Times and DateTimes are represented as doubles in
2042 # "serial number" format.
2043 "boolValue": True or False, # Represents a boolean value.
2044 "formulaValue": "A String", # Represents a formula.
2045 "stringValue": "A String", # Represents a string value.
2046 # Leading single quotes are not included. For example, if the user typed
2047 # `'123` into the UI, this would be represented as a `stringValue` of
2048 # `"123"`.
2049 "errorValue": { # An error in a cell. # Represents an error.
2050 # This field is read-only.
2051 "message": "A String", # A message with more information about the error
2052 # (in the spreadsheet's locale).
2053 "type": "A String", # The type of error.
2054 },
2055 },
2056 "note": "A String", # Any note on the cell.
2057 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
2058 # This includes the results of applying any conditional formatting and,
2059 # if the cell contains a formula, the computed number format.
2060 # If the effective format is the default format, effective format will
2061 # not be written.
2062 # This field is read-only.
2063 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002064 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
2065 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002066 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002067 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002068 },
2069 "textDirection": "A String", # The direction of the text in the cell.
2070 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
2071 # When updating padding, every field must be specified.
2072 "top": 42, # The top padding of the cell.
2073 "right": 42, # The right padding of the cell.
2074 "bottom": 42, # The bottom padding of the cell.
2075 "left": 42, # The left padding of the cell.
2076 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002077 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002078 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
2079 # for simplicity of conversion to/from color representations in various
2080 # languages over compactness; for example, the fields of this representation
2081 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2082 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2083 # method in iOS; and, with just a little work, it can be easily formatted into
2084 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2085 #
2086 # Example (Java):
2087 #
2088 # import com.google.type.Color;
2089 #
2090 # // ...
2091 # public static java.awt.Color fromProto(Color protocolor) {
2092 # float alpha = protocolor.hasAlpha()
2093 # ? protocolor.getAlpha().getValue()
2094 # : 1.0;
2095 #
2096 # return new java.awt.Color(
2097 # protocolor.getRed(),
2098 # protocolor.getGreen(),
2099 # protocolor.getBlue(),
2100 # alpha);
2101 # }
2102 #
2103 # public static Color toProto(java.awt.Color color) {
2104 # float red = (float) color.getRed();
2105 # float green = (float) color.getGreen();
2106 # float blue = (float) color.getBlue();
2107 # float denominator = 255.0;
2108 # Color.Builder resultBuilder =
2109 # Color
2110 # .newBuilder()
2111 # .setRed(red / denominator)
2112 # .setGreen(green / denominator)
2113 # .setBlue(blue / denominator);
2114 # int alpha = color.getAlpha();
2115 # if (alpha != 255) {
2116 # result.setAlpha(
2117 # FloatValue
2118 # .newBuilder()
2119 # .setValue(((float) alpha) / denominator)
2120 # .build());
2121 # }
2122 # return resultBuilder.build();
2123 # }
2124 # // ...
2125 #
2126 # Example (iOS / Obj-C):
2127 #
2128 # // ...
2129 # static UIColor* fromProto(Color* protocolor) {
2130 # float red = [protocolor red];
2131 # float green = [protocolor green];
2132 # float blue = [protocolor blue];
2133 # FloatValue* alpha_wrapper = [protocolor alpha];
2134 # float alpha = 1.0;
2135 # if (alpha_wrapper != nil) {
2136 # alpha = [alpha_wrapper value];
2137 # }
2138 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2139 # }
2140 #
2141 # static Color* toProto(UIColor* color) {
2142 # CGFloat red, green, blue, alpha;
2143 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2144 # return nil;
2145 # }
2146 # Color* result = [Color alloc] init];
2147 # [result setRed:red];
2148 # [result setGreen:green];
2149 # [result setBlue:blue];
2150 # if (alpha <= 0.9999) {
2151 # [result setAlpha:floatWrapperWithValue(alpha)];
2152 # }
2153 # [result autorelease];
2154 # return result;
2155 # }
2156 # // ...
2157 #
2158 # Example (JavaScript):
2159 #
2160 # // ...
2161 #
2162 # var protoToCssColor = function(rgb_color) {
2163 # var redFrac = rgb_color.red || 0.0;
2164 # var greenFrac = rgb_color.green || 0.0;
2165 # var blueFrac = rgb_color.blue || 0.0;
2166 # var red = Math.floor(redFrac * 255);
2167 # var green = Math.floor(greenFrac * 255);
2168 # var blue = Math.floor(blueFrac * 255);
2169 #
2170 # if (!('alpha' in rgb_color)) {
2171 # return rgbToCssColor_(red, green, blue);
2172 # }
2173 #
2174 # var alphaFrac = rgb_color.alpha.value || 0.0;
2175 # var rgbParams = [red, green, blue].join(',');
2176 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2177 # };
2178 #
2179 # var rgbToCssColor_ = function(red, green, blue) {
2180 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2181 # var hexString = rgbNumber.toString(16);
2182 # var missingZeros = 6 - hexString.length;
2183 # var resultBuilder = ['#'];
2184 # for (var i = 0; i < missingZeros; i++) {
2185 # resultBuilder.push('0');
2186 # }
2187 # resultBuilder.push(hexString);
2188 # return resultBuilder.join('');
2189 # };
2190 #
2191 # // ...
2192 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2193 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2194 # the final pixel color is defined by the equation:
2195 #
2196 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2197 #
2198 # This means that a value of 1.0 corresponds to a solid color, whereas
2199 # a value of 0.0 corresponds to a completely transparent color. This
2200 # uses a wrapper message rather than a simple float scalar so that it is
2201 # possible to distinguish between a default value and the value being unset.
2202 # If omitted, this color object is to be rendered as a solid color
2203 # (as if the alpha value had been explicitly given with a value of 1.0).
2204 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2205 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2206 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002207 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002208 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
2209 # Absent values indicate that the field isn't specified.
2210 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
2211 # for simplicity of conversion to/from color representations in various
2212 # languages over compactness; for example, the fields of this representation
2213 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2214 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2215 # method in iOS; and, with just a little work, it can be easily formatted into
2216 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2217 #
2218 # Example (Java):
2219 #
2220 # import com.google.type.Color;
2221 #
2222 # // ...
2223 # public static java.awt.Color fromProto(Color protocolor) {
2224 # float alpha = protocolor.hasAlpha()
2225 # ? protocolor.getAlpha().getValue()
2226 # : 1.0;
2227 #
2228 # return new java.awt.Color(
2229 # protocolor.getRed(),
2230 # protocolor.getGreen(),
2231 # protocolor.getBlue(),
2232 # alpha);
2233 # }
2234 #
2235 # public static Color toProto(java.awt.Color color) {
2236 # float red = (float) color.getRed();
2237 # float green = (float) color.getGreen();
2238 # float blue = (float) color.getBlue();
2239 # float denominator = 255.0;
2240 # Color.Builder resultBuilder =
2241 # Color
2242 # .newBuilder()
2243 # .setRed(red / denominator)
2244 # .setGreen(green / denominator)
2245 # .setBlue(blue / denominator);
2246 # int alpha = color.getAlpha();
2247 # if (alpha != 255) {
2248 # result.setAlpha(
2249 # FloatValue
2250 # .newBuilder()
2251 # .setValue(((float) alpha) / denominator)
2252 # .build());
2253 # }
2254 # return resultBuilder.build();
2255 # }
2256 # // ...
2257 #
2258 # Example (iOS / Obj-C):
2259 #
2260 # // ...
2261 # static UIColor* fromProto(Color* protocolor) {
2262 # float red = [protocolor red];
2263 # float green = [protocolor green];
2264 # float blue = [protocolor blue];
2265 # FloatValue* alpha_wrapper = [protocolor alpha];
2266 # float alpha = 1.0;
2267 # if (alpha_wrapper != nil) {
2268 # alpha = [alpha_wrapper value];
2269 # }
2270 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2271 # }
2272 #
2273 # static Color* toProto(UIColor* color) {
2274 # CGFloat red, green, blue, alpha;
2275 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2276 # return nil;
2277 # }
2278 # Color* result = [Color alloc] init];
2279 # [result setRed:red];
2280 # [result setGreen:green];
2281 # [result setBlue:blue];
2282 # if (alpha <= 0.9999) {
2283 # [result setAlpha:floatWrapperWithValue(alpha)];
2284 # }
2285 # [result autorelease];
2286 # return result;
2287 # }
2288 # // ...
2289 #
2290 # Example (JavaScript):
2291 #
2292 # // ...
2293 #
2294 # var protoToCssColor = function(rgb_color) {
2295 # var redFrac = rgb_color.red || 0.0;
2296 # var greenFrac = rgb_color.green || 0.0;
2297 # var blueFrac = rgb_color.blue || 0.0;
2298 # var red = Math.floor(redFrac * 255);
2299 # var green = Math.floor(greenFrac * 255);
2300 # var blue = Math.floor(blueFrac * 255);
2301 #
2302 # if (!('alpha' in rgb_color)) {
2303 # return rgbToCssColor_(red, green, blue);
2304 # }
2305 #
2306 # var alphaFrac = rgb_color.alpha.value || 0.0;
2307 # var rgbParams = [red, green, blue].join(',');
2308 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2309 # };
2310 #
2311 # var rgbToCssColor_ = function(red, green, blue) {
2312 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2313 # var hexString = rgbNumber.toString(16);
2314 # var missingZeros = 6 - hexString.length;
2315 # var resultBuilder = ['#'];
2316 # for (var i = 0; i < missingZeros; i++) {
2317 # resultBuilder.push('0');
2318 # }
2319 # resultBuilder.push(hexString);
2320 # return resultBuilder.join('');
2321 # };
2322 #
2323 # // ...
2324 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2325 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2326 # the final pixel color is defined by the equation:
2327 #
2328 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2329 #
2330 # This means that a value of 1.0 corresponds to a solid color, whereas
2331 # a value of 0.0 corresponds to a completely transparent color. This
2332 # uses a wrapper message rather than a simple float scalar so that it is
2333 # possible to distinguish between a default value and the value being unset.
2334 # If omitted, this color object is to be rendered as a solid color
2335 # (as if the alpha value had been explicitly given with a value of 1.0).
2336 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2337 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2338 },
2339 "bold": True or False, # True if the text is bold.
2340 "strikethrough": True or False, # True if the text has a strikethrough.
2341 "fontFamily": "A String", # The font family.
2342 "fontSize": 42, # The size of the font.
2343 "italic": True or False, # True if the text is italicized.
2344 "underline": True or False, # True if the text is underlined.
2345 },
2346 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
2347 "borders": { # The borders of the cell. # The borders of the cell.
2348 "top": { # A border along a cell. # The top border of the cell.
2349 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2350 # for simplicity of conversion to/from color representations in various
2351 # languages over compactness; for example, the fields of this representation
2352 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2353 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2354 # method in iOS; and, with just a little work, it can be easily formatted into
2355 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2356 #
2357 # Example (Java):
2358 #
2359 # import com.google.type.Color;
2360 #
2361 # // ...
2362 # public static java.awt.Color fromProto(Color protocolor) {
2363 # float alpha = protocolor.hasAlpha()
2364 # ? protocolor.getAlpha().getValue()
2365 # : 1.0;
2366 #
2367 # return new java.awt.Color(
2368 # protocolor.getRed(),
2369 # protocolor.getGreen(),
2370 # protocolor.getBlue(),
2371 # alpha);
2372 # }
2373 #
2374 # public static Color toProto(java.awt.Color color) {
2375 # float red = (float) color.getRed();
2376 # float green = (float) color.getGreen();
2377 # float blue = (float) color.getBlue();
2378 # float denominator = 255.0;
2379 # Color.Builder resultBuilder =
2380 # Color
2381 # .newBuilder()
2382 # .setRed(red / denominator)
2383 # .setGreen(green / denominator)
2384 # .setBlue(blue / denominator);
2385 # int alpha = color.getAlpha();
2386 # if (alpha != 255) {
2387 # result.setAlpha(
2388 # FloatValue
2389 # .newBuilder()
2390 # .setValue(((float) alpha) / denominator)
2391 # .build());
2392 # }
2393 # return resultBuilder.build();
2394 # }
2395 # // ...
2396 #
2397 # Example (iOS / Obj-C):
2398 #
2399 # // ...
2400 # static UIColor* fromProto(Color* protocolor) {
2401 # float red = [protocolor red];
2402 # float green = [protocolor green];
2403 # float blue = [protocolor blue];
2404 # FloatValue* alpha_wrapper = [protocolor alpha];
2405 # float alpha = 1.0;
2406 # if (alpha_wrapper != nil) {
2407 # alpha = [alpha_wrapper value];
2408 # }
2409 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2410 # }
2411 #
2412 # static Color* toProto(UIColor* color) {
2413 # CGFloat red, green, blue, alpha;
2414 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2415 # return nil;
2416 # }
2417 # Color* result = [Color alloc] init];
2418 # [result setRed:red];
2419 # [result setGreen:green];
2420 # [result setBlue:blue];
2421 # if (alpha <= 0.9999) {
2422 # [result setAlpha:floatWrapperWithValue(alpha)];
2423 # }
2424 # [result autorelease];
2425 # return result;
2426 # }
2427 # // ...
2428 #
2429 # Example (JavaScript):
2430 #
2431 # // ...
2432 #
2433 # var protoToCssColor = function(rgb_color) {
2434 # var redFrac = rgb_color.red || 0.0;
2435 # var greenFrac = rgb_color.green || 0.0;
2436 # var blueFrac = rgb_color.blue || 0.0;
2437 # var red = Math.floor(redFrac * 255);
2438 # var green = Math.floor(greenFrac * 255);
2439 # var blue = Math.floor(blueFrac * 255);
2440 #
2441 # if (!('alpha' in rgb_color)) {
2442 # return rgbToCssColor_(red, green, blue);
2443 # }
2444 #
2445 # var alphaFrac = rgb_color.alpha.value || 0.0;
2446 # var rgbParams = [red, green, blue].join(',');
2447 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2448 # };
2449 #
2450 # var rgbToCssColor_ = function(red, green, blue) {
2451 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2452 # var hexString = rgbNumber.toString(16);
2453 # var missingZeros = 6 - hexString.length;
2454 # var resultBuilder = ['#'];
2455 # for (var i = 0; i < missingZeros; i++) {
2456 # resultBuilder.push('0');
2457 # }
2458 # resultBuilder.push(hexString);
2459 # return resultBuilder.join('');
2460 # };
2461 #
2462 # // ...
2463 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2464 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2465 # the final pixel color is defined by the equation:
2466 #
2467 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2468 #
2469 # This means that a value of 1.0 corresponds to a solid color, whereas
2470 # a value of 0.0 corresponds to a completely transparent color. This
2471 # uses a wrapper message rather than a simple float scalar so that it is
2472 # possible to distinguish between a default value and the value being unset.
2473 # If omitted, this color object is to be rendered as a solid color
2474 # (as if the alpha value had been explicitly given with a value of 1.0).
2475 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2476 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2477 },
2478 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002479 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002480 "style": "A String", # The style of the border.
2481 },
2482 "right": { # A border along a cell. # The right border of the cell.
2483 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2484 # for simplicity of conversion to/from color representations in various
2485 # languages over compactness; for example, the fields of this representation
2486 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2487 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2488 # method in iOS; and, with just a little work, it can be easily formatted into
2489 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2490 #
2491 # Example (Java):
2492 #
2493 # import com.google.type.Color;
2494 #
2495 # // ...
2496 # public static java.awt.Color fromProto(Color protocolor) {
2497 # float alpha = protocolor.hasAlpha()
2498 # ? protocolor.getAlpha().getValue()
2499 # : 1.0;
2500 #
2501 # return new java.awt.Color(
2502 # protocolor.getRed(),
2503 # protocolor.getGreen(),
2504 # protocolor.getBlue(),
2505 # alpha);
2506 # }
2507 #
2508 # public static Color toProto(java.awt.Color color) {
2509 # float red = (float) color.getRed();
2510 # float green = (float) color.getGreen();
2511 # float blue = (float) color.getBlue();
2512 # float denominator = 255.0;
2513 # Color.Builder resultBuilder =
2514 # Color
2515 # .newBuilder()
2516 # .setRed(red / denominator)
2517 # .setGreen(green / denominator)
2518 # .setBlue(blue / denominator);
2519 # int alpha = color.getAlpha();
2520 # if (alpha != 255) {
2521 # result.setAlpha(
2522 # FloatValue
2523 # .newBuilder()
2524 # .setValue(((float) alpha) / denominator)
2525 # .build());
2526 # }
2527 # return resultBuilder.build();
2528 # }
2529 # // ...
2530 #
2531 # Example (iOS / Obj-C):
2532 #
2533 # // ...
2534 # static UIColor* fromProto(Color* protocolor) {
2535 # float red = [protocolor red];
2536 # float green = [protocolor green];
2537 # float blue = [protocolor blue];
2538 # FloatValue* alpha_wrapper = [protocolor alpha];
2539 # float alpha = 1.0;
2540 # if (alpha_wrapper != nil) {
2541 # alpha = [alpha_wrapper value];
2542 # }
2543 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2544 # }
2545 #
2546 # static Color* toProto(UIColor* color) {
2547 # CGFloat red, green, blue, alpha;
2548 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2549 # return nil;
2550 # }
2551 # Color* result = [Color alloc] init];
2552 # [result setRed:red];
2553 # [result setGreen:green];
2554 # [result setBlue:blue];
2555 # if (alpha <= 0.9999) {
2556 # [result setAlpha:floatWrapperWithValue(alpha)];
2557 # }
2558 # [result autorelease];
2559 # return result;
2560 # }
2561 # // ...
2562 #
2563 # Example (JavaScript):
2564 #
2565 # // ...
2566 #
2567 # var protoToCssColor = function(rgb_color) {
2568 # var redFrac = rgb_color.red || 0.0;
2569 # var greenFrac = rgb_color.green || 0.0;
2570 # var blueFrac = rgb_color.blue || 0.0;
2571 # var red = Math.floor(redFrac * 255);
2572 # var green = Math.floor(greenFrac * 255);
2573 # var blue = Math.floor(blueFrac * 255);
2574 #
2575 # if (!('alpha' in rgb_color)) {
2576 # return rgbToCssColor_(red, green, blue);
2577 # }
2578 #
2579 # var alphaFrac = rgb_color.alpha.value || 0.0;
2580 # var rgbParams = [red, green, blue].join(',');
2581 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2582 # };
2583 #
2584 # var rgbToCssColor_ = function(red, green, blue) {
2585 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2586 # var hexString = rgbNumber.toString(16);
2587 # var missingZeros = 6 - hexString.length;
2588 # var resultBuilder = ['#'];
2589 # for (var i = 0; i < missingZeros; i++) {
2590 # resultBuilder.push('0');
2591 # }
2592 # resultBuilder.push(hexString);
2593 # return resultBuilder.join('');
2594 # };
2595 #
2596 # // ...
2597 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2598 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2599 # the final pixel color is defined by the equation:
2600 #
2601 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2602 #
2603 # This means that a value of 1.0 corresponds to a solid color, whereas
2604 # a value of 0.0 corresponds to a completely transparent color. This
2605 # uses a wrapper message rather than a simple float scalar so that it is
2606 # possible to distinguish between a default value and the value being unset.
2607 # If omitted, this color object is to be rendered as a solid color
2608 # (as if the alpha value had been explicitly given with a value of 1.0).
2609 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2610 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2611 },
2612 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002613 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002614 "style": "A String", # The style of the border.
2615 },
2616 "bottom": { # A border along a cell. # The bottom border of the cell.
2617 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2618 # for simplicity of conversion to/from color representations in various
2619 # languages over compactness; for example, the fields of this representation
2620 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2621 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2622 # method in iOS; and, with just a little work, it can be easily formatted into
2623 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2624 #
2625 # Example (Java):
2626 #
2627 # import com.google.type.Color;
2628 #
2629 # // ...
2630 # public static java.awt.Color fromProto(Color protocolor) {
2631 # float alpha = protocolor.hasAlpha()
2632 # ? protocolor.getAlpha().getValue()
2633 # : 1.0;
2634 #
2635 # return new java.awt.Color(
2636 # protocolor.getRed(),
2637 # protocolor.getGreen(),
2638 # protocolor.getBlue(),
2639 # alpha);
2640 # }
2641 #
2642 # public static Color toProto(java.awt.Color color) {
2643 # float red = (float) color.getRed();
2644 # float green = (float) color.getGreen();
2645 # float blue = (float) color.getBlue();
2646 # float denominator = 255.0;
2647 # Color.Builder resultBuilder =
2648 # Color
2649 # .newBuilder()
2650 # .setRed(red / denominator)
2651 # .setGreen(green / denominator)
2652 # .setBlue(blue / denominator);
2653 # int alpha = color.getAlpha();
2654 # if (alpha != 255) {
2655 # result.setAlpha(
2656 # FloatValue
2657 # .newBuilder()
2658 # .setValue(((float) alpha) / denominator)
2659 # .build());
2660 # }
2661 # return resultBuilder.build();
2662 # }
2663 # // ...
2664 #
2665 # Example (iOS / Obj-C):
2666 #
2667 # // ...
2668 # static UIColor* fromProto(Color* protocolor) {
2669 # float red = [protocolor red];
2670 # float green = [protocolor green];
2671 # float blue = [protocolor blue];
2672 # FloatValue* alpha_wrapper = [protocolor alpha];
2673 # float alpha = 1.0;
2674 # if (alpha_wrapper != nil) {
2675 # alpha = [alpha_wrapper value];
2676 # }
2677 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2678 # }
2679 #
2680 # static Color* toProto(UIColor* color) {
2681 # CGFloat red, green, blue, alpha;
2682 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2683 # return nil;
2684 # }
2685 # Color* result = [Color alloc] init];
2686 # [result setRed:red];
2687 # [result setGreen:green];
2688 # [result setBlue:blue];
2689 # if (alpha <= 0.9999) {
2690 # [result setAlpha:floatWrapperWithValue(alpha)];
2691 # }
2692 # [result autorelease];
2693 # return result;
2694 # }
2695 # // ...
2696 #
2697 # Example (JavaScript):
2698 #
2699 # // ...
2700 #
2701 # var protoToCssColor = function(rgb_color) {
2702 # var redFrac = rgb_color.red || 0.0;
2703 # var greenFrac = rgb_color.green || 0.0;
2704 # var blueFrac = rgb_color.blue || 0.0;
2705 # var red = Math.floor(redFrac * 255);
2706 # var green = Math.floor(greenFrac * 255);
2707 # var blue = Math.floor(blueFrac * 255);
2708 #
2709 # if (!('alpha' in rgb_color)) {
2710 # return rgbToCssColor_(red, green, blue);
2711 # }
2712 #
2713 # var alphaFrac = rgb_color.alpha.value || 0.0;
2714 # var rgbParams = [red, green, blue].join(',');
2715 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2716 # };
2717 #
2718 # var rgbToCssColor_ = function(red, green, blue) {
2719 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2720 # var hexString = rgbNumber.toString(16);
2721 # var missingZeros = 6 - hexString.length;
2722 # var resultBuilder = ['#'];
2723 # for (var i = 0; i < missingZeros; i++) {
2724 # resultBuilder.push('0');
2725 # }
2726 # resultBuilder.push(hexString);
2727 # return resultBuilder.join('');
2728 # };
2729 #
2730 # // ...
2731 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2732 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2733 # the final pixel color is defined by the equation:
2734 #
2735 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2736 #
2737 # This means that a value of 1.0 corresponds to a solid color, whereas
2738 # a value of 0.0 corresponds to a completely transparent color. This
2739 # uses a wrapper message rather than a simple float scalar so that it is
2740 # possible to distinguish between a default value and the value being unset.
2741 # If omitted, this color object is to be rendered as a solid color
2742 # (as if the alpha value had been explicitly given with a value of 1.0).
2743 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2744 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2745 },
2746 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002747 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002748 "style": "A String", # The style of the border.
2749 },
2750 "left": { # A border along a cell. # The left border of the cell.
2751 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2752 # for simplicity of conversion to/from color representations in various
2753 # languages over compactness; for example, the fields of this representation
2754 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2755 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2756 # method in iOS; and, with just a little work, it can be easily formatted into
2757 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2758 #
2759 # Example (Java):
2760 #
2761 # import com.google.type.Color;
2762 #
2763 # // ...
2764 # public static java.awt.Color fromProto(Color protocolor) {
2765 # float alpha = protocolor.hasAlpha()
2766 # ? protocolor.getAlpha().getValue()
2767 # : 1.0;
2768 #
2769 # return new java.awt.Color(
2770 # protocolor.getRed(),
2771 # protocolor.getGreen(),
2772 # protocolor.getBlue(),
2773 # alpha);
2774 # }
2775 #
2776 # public static Color toProto(java.awt.Color color) {
2777 # float red = (float) color.getRed();
2778 # float green = (float) color.getGreen();
2779 # float blue = (float) color.getBlue();
2780 # float denominator = 255.0;
2781 # Color.Builder resultBuilder =
2782 # Color
2783 # .newBuilder()
2784 # .setRed(red / denominator)
2785 # .setGreen(green / denominator)
2786 # .setBlue(blue / denominator);
2787 # int alpha = color.getAlpha();
2788 # if (alpha != 255) {
2789 # result.setAlpha(
2790 # FloatValue
2791 # .newBuilder()
2792 # .setValue(((float) alpha) / denominator)
2793 # .build());
2794 # }
2795 # return resultBuilder.build();
2796 # }
2797 # // ...
2798 #
2799 # Example (iOS / Obj-C):
2800 #
2801 # // ...
2802 # static UIColor* fromProto(Color* protocolor) {
2803 # float red = [protocolor red];
2804 # float green = [protocolor green];
2805 # float blue = [protocolor blue];
2806 # FloatValue* alpha_wrapper = [protocolor alpha];
2807 # float alpha = 1.0;
2808 # if (alpha_wrapper != nil) {
2809 # alpha = [alpha_wrapper value];
2810 # }
2811 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2812 # }
2813 #
2814 # static Color* toProto(UIColor* color) {
2815 # CGFloat red, green, blue, alpha;
2816 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2817 # return nil;
2818 # }
2819 # Color* result = [Color alloc] init];
2820 # [result setRed:red];
2821 # [result setGreen:green];
2822 # [result setBlue:blue];
2823 # if (alpha <= 0.9999) {
2824 # [result setAlpha:floatWrapperWithValue(alpha)];
2825 # }
2826 # [result autorelease];
2827 # return result;
2828 # }
2829 # // ...
2830 #
2831 # Example (JavaScript):
2832 #
2833 # // ...
2834 #
2835 # var protoToCssColor = function(rgb_color) {
2836 # var redFrac = rgb_color.red || 0.0;
2837 # var greenFrac = rgb_color.green || 0.0;
2838 # var blueFrac = rgb_color.blue || 0.0;
2839 # var red = Math.floor(redFrac * 255);
2840 # var green = Math.floor(greenFrac * 255);
2841 # var blue = Math.floor(blueFrac * 255);
2842 #
2843 # if (!('alpha' in rgb_color)) {
2844 # return rgbToCssColor_(red, green, blue);
2845 # }
2846 #
2847 # var alphaFrac = rgb_color.alpha.value || 0.0;
2848 # var rgbParams = [red, green, blue].join(',');
2849 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2850 # };
2851 #
2852 # var rgbToCssColor_ = function(red, green, blue) {
2853 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2854 # var hexString = rgbNumber.toString(16);
2855 # var missingZeros = 6 - hexString.length;
2856 # var resultBuilder = ['#'];
2857 # for (var i = 0; i < missingZeros; i++) {
2858 # resultBuilder.push('0');
2859 # }
2860 # resultBuilder.push(hexString);
2861 # return resultBuilder.join('');
2862 # };
2863 #
2864 # // ...
2865 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2866 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2867 # the final pixel color is defined by the equation:
2868 #
2869 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2870 #
2871 # This means that a value of 1.0 corresponds to a solid color, whereas
2872 # a value of 0.0 corresponds to a completely transparent color. This
2873 # uses a wrapper message rather than a simple float scalar so that it is
2874 # possible to distinguish between a default value and the value being unset.
2875 # If omitted, this color object is to be rendered as a solid color
2876 # (as if the alpha value had been explicitly given with a value of 1.0).
2877 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2878 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2879 },
2880 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002881 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002882 "style": "A String", # The style of the border.
2883 },
2884 },
2885 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
2886 },
2887 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
2888 #
2889 # When writing, the new format will be merged with the existing format.
2890 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002891 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
2892 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002893 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002894 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002895 },
2896 "textDirection": "A String", # The direction of the text in the cell.
2897 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
2898 # When updating padding, every field must be specified.
2899 "top": 42, # The top padding of the cell.
2900 "right": 42, # The right padding of the cell.
2901 "bottom": 42, # The bottom padding of the cell.
2902 "left": 42, # The left padding of the cell.
2903 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002904 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002905 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
2906 # for simplicity of conversion to/from color representations in various
2907 # languages over compactness; for example, the fields of this representation
2908 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2909 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2910 # method in iOS; and, with just a little work, it can be easily formatted into
2911 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2912 #
2913 # Example (Java):
2914 #
2915 # import com.google.type.Color;
2916 #
2917 # // ...
2918 # public static java.awt.Color fromProto(Color protocolor) {
2919 # float alpha = protocolor.hasAlpha()
2920 # ? protocolor.getAlpha().getValue()
2921 # : 1.0;
2922 #
2923 # return new java.awt.Color(
2924 # protocolor.getRed(),
2925 # protocolor.getGreen(),
2926 # protocolor.getBlue(),
2927 # alpha);
2928 # }
2929 #
2930 # public static Color toProto(java.awt.Color color) {
2931 # float red = (float) color.getRed();
2932 # float green = (float) color.getGreen();
2933 # float blue = (float) color.getBlue();
2934 # float denominator = 255.0;
2935 # Color.Builder resultBuilder =
2936 # Color
2937 # .newBuilder()
2938 # .setRed(red / denominator)
2939 # .setGreen(green / denominator)
2940 # .setBlue(blue / denominator);
2941 # int alpha = color.getAlpha();
2942 # if (alpha != 255) {
2943 # result.setAlpha(
2944 # FloatValue
2945 # .newBuilder()
2946 # .setValue(((float) alpha) / denominator)
2947 # .build());
2948 # }
2949 # return resultBuilder.build();
2950 # }
2951 # // ...
2952 #
2953 # Example (iOS / Obj-C):
2954 #
2955 # // ...
2956 # static UIColor* fromProto(Color* protocolor) {
2957 # float red = [protocolor red];
2958 # float green = [protocolor green];
2959 # float blue = [protocolor blue];
2960 # FloatValue* alpha_wrapper = [protocolor alpha];
2961 # float alpha = 1.0;
2962 # if (alpha_wrapper != nil) {
2963 # alpha = [alpha_wrapper value];
2964 # }
2965 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2966 # }
2967 #
2968 # static Color* toProto(UIColor* color) {
2969 # CGFloat red, green, blue, alpha;
2970 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2971 # return nil;
2972 # }
2973 # Color* result = [Color alloc] init];
2974 # [result setRed:red];
2975 # [result setGreen:green];
2976 # [result setBlue:blue];
2977 # if (alpha <= 0.9999) {
2978 # [result setAlpha:floatWrapperWithValue(alpha)];
2979 # }
2980 # [result autorelease];
2981 # return result;
2982 # }
2983 # // ...
2984 #
2985 # Example (JavaScript):
2986 #
2987 # // ...
2988 #
2989 # var protoToCssColor = function(rgb_color) {
2990 # var redFrac = rgb_color.red || 0.0;
2991 # var greenFrac = rgb_color.green || 0.0;
2992 # var blueFrac = rgb_color.blue || 0.0;
2993 # var red = Math.floor(redFrac * 255);
2994 # var green = Math.floor(greenFrac * 255);
2995 # var blue = Math.floor(blueFrac * 255);
2996 #
2997 # if (!('alpha' in rgb_color)) {
2998 # return rgbToCssColor_(red, green, blue);
2999 # }
3000 #
3001 # var alphaFrac = rgb_color.alpha.value || 0.0;
3002 # var rgbParams = [red, green, blue].join(',');
3003 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3004 # };
3005 #
3006 # var rgbToCssColor_ = function(red, green, blue) {
3007 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3008 # var hexString = rgbNumber.toString(16);
3009 # var missingZeros = 6 - hexString.length;
3010 # var resultBuilder = ['#'];
3011 # for (var i = 0; i < missingZeros; i++) {
3012 # resultBuilder.push('0');
3013 # }
3014 # resultBuilder.push(hexString);
3015 # return resultBuilder.join('');
3016 # };
3017 #
3018 # // ...
3019 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3020 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3021 # the final pixel color is defined by the equation:
3022 #
3023 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3024 #
3025 # This means that a value of 1.0 corresponds to a solid color, whereas
3026 # a value of 0.0 corresponds to a completely transparent color. This
3027 # uses a wrapper message rather than a simple float scalar so that it is
3028 # possible to distinguish between a default value and the value being unset.
3029 # If omitted, this color object is to be rendered as a solid color
3030 # (as if the alpha value had been explicitly given with a value of 1.0).
3031 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3032 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3033 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003034 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003035 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
3036 # Absent values indicate that the field isn't specified.
3037 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
3038 # for simplicity of conversion to/from color representations in various
3039 # languages over compactness; for example, the fields of this representation
3040 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3041 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3042 # method in iOS; and, with just a little work, it can be easily formatted into
3043 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3044 #
3045 # Example (Java):
3046 #
3047 # import com.google.type.Color;
3048 #
3049 # // ...
3050 # public static java.awt.Color fromProto(Color protocolor) {
3051 # float alpha = protocolor.hasAlpha()
3052 # ? protocolor.getAlpha().getValue()
3053 # : 1.0;
3054 #
3055 # return new java.awt.Color(
3056 # protocolor.getRed(),
3057 # protocolor.getGreen(),
3058 # protocolor.getBlue(),
3059 # alpha);
3060 # }
3061 #
3062 # public static Color toProto(java.awt.Color color) {
3063 # float red = (float) color.getRed();
3064 # float green = (float) color.getGreen();
3065 # float blue = (float) color.getBlue();
3066 # float denominator = 255.0;
3067 # Color.Builder resultBuilder =
3068 # Color
3069 # .newBuilder()
3070 # .setRed(red / denominator)
3071 # .setGreen(green / denominator)
3072 # .setBlue(blue / denominator);
3073 # int alpha = color.getAlpha();
3074 # if (alpha != 255) {
3075 # result.setAlpha(
3076 # FloatValue
3077 # .newBuilder()
3078 # .setValue(((float) alpha) / denominator)
3079 # .build());
3080 # }
3081 # return resultBuilder.build();
3082 # }
3083 # // ...
3084 #
3085 # Example (iOS / Obj-C):
3086 #
3087 # // ...
3088 # static UIColor* fromProto(Color* protocolor) {
3089 # float red = [protocolor red];
3090 # float green = [protocolor green];
3091 # float blue = [protocolor blue];
3092 # FloatValue* alpha_wrapper = [protocolor alpha];
3093 # float alpha = 1.0;
3094 # if (alpha_wrapper != nil) {
3095 # alpha = [alpha_wrapper value];
3096 # }
3097 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3098 # }
3099 #
3100 # static Color* toProto(UIColor* color) {
3101 # CGFloat red, green, blue, alpha;
3102 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3103 # return nil;
3104 # }
3105 # Color* result = [Color alloc] init];
3106 # [result setRed:red];
3107 # [result setGreen:green];
3108 # [result setBlue:blue];
3109 # if (alpha <= 0.9999) {
3110 # [result setAlpha:floatWrapperWithValue(alpha)];
3111 # }
3112 # [result autorelease];
3113 # return result;
3114 # }
3115 # // ...
3116 #
3117 # Example (JavaScript):
3118 #
3119 # // ...
3120 #
3121 # var protoToCssColor = function(rgb_color) {
3122 # var redFrac = rgb_color.red || 0.0;
3123 # var greenFrac = rgb_color.green || 0.0;
3124 # var blueFrac = rgb_color.blue || 0.0;
3125 # var red = Math.floor(redFrac * 255);
3126 # var green = Math.floor(greenFrac * 255);
3127 # var blue = Math.floor(blueFrac * 255);
3128 #
3129 # if (!('alpha' in rgb_color)) {
3130 # return rgbToCssColor_(red, green, blue);
3131 # }
3132 #
3133 # var alphaFrac = rgb_color.alpha.value || 0.0;
3134 # var rgbParams = [red, green, blue].join(',');
3135 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3136 # };
3137 #
3138 # var rgbToCssColor_ = function(red, green, blue) {
3139 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3140 # var hexString = rgbNumber.toString(16);
3141 # var missingZeros = 6 - hexString.length;
3142 # var resultBuilder = ['#'];
3143 # for (var i = 0; i < missingZeros; i++) {
3144 # resultBuilder.push('0');
3145 # }
3146 # resultBuilder.push(hexString);
3147 # return resultBuilder.join('');
3148 # };
3149 #
3150 # // ...
3151 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3152 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3153 # the final pixel color is defined by the equation:
3154 #
3155 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3156 #
3157 # This means that a value of 1.0 corresponds to a solid color, whereas
3158 # a value of 0.0 corresponds to a completely transparent color. This
3159 # uses a wrapper message rather than a simple float scalar so that it is
3160 # possible to distinguish between a default value and the value being unset.
3161 # If omitted, this color object is to be rendered as a solid color
3162 # (as if the alpha value had been explicitly given with a value of 1.0).
3163 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3164 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3165 },
3166 "bold": True or False, # True if the text is bold.
3167 "strikethrough": True or False, # True if the text has a strikethrough.
3168 "fontFamily": "A String", # The font family.
3169 "fontSize": 42, # The size of the font.
3170 "italic": True or False, # True if the text is italicized.
3171 "underline": True or False, # True if the text is underlined.
3172 },
3173 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
3174 "borders": { # The borders of the cell. # The borders of the cell.
3175 "top": { # A border along a cell. # The top border of the cell.
3176 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3177 # for simplicity of conversion to/from color representations in various
3178 # languages over compactness; for example, the fields of this representation
3179 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3180 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3181 # method in iOS; and, with just a little work, it can be easily formatted into
3182 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3183 #
3184 # Example (Java):
3185 #
3186 # import com.google.type.Color;
3187 #
3188 # // ...
3189 # public static java.awt.Color fromProto(Color protocolor) {
3190 # float alpha = protocolor.hasAlpha()
3191 # ? protocolor.getAlpha().getValue()
3192 # : 1.0;
3193 #
3194 # return new java.awt.Color(
3195 # protocolor.getRed(),
3196 # protocolor.getGreen(),
3197 # protocolor.getBlue(),
3198 # alpha);
3199 # }
3200 #
3201 # public static Color toProto(java.awt.Color color) {
3202 # float red = (float) color.getRed();
3203 # float green = (float) color.getGreen();
3204 # float blue = (float) color.getBlue();
3205 # float denominator = 255.0;
3206 # Color.Builder resultBuilder =
3207 # Color
3208 # .newBuilder()
3209 # .setRed(red / denominator)
3210 # .setGreen(green / denominator)
3211 # .setBlue(blue / denominator);
3212 # int alpha = color.getAlpha();
3213 # if (alpha != 255) {
3214 # result.setAlpha(
3215 # FloatValue
3216 # .newBuilder()
3217 # .setValue(((float) alpha) / denominator)
3218 # .build());
3219 # }
3220 # return resultBuilder.build();
3221 # }
3222 # // ...
3223 #
3224 # Example (iOS / Obj-C):
3225 #
3226 # // ...
3227 # static UIColor* fromProto(Color* protocolor) {
3228 # float red = [protocolor red];
3229 # float green = [protocolor green];
3230 # float blue = [protocolor blue];
3231 # FloatValue* alpha_wrapper = [protocolor alpha];
3232 # float alpha = 1.0;
3233 # if (alpha_wrapper != nil) {
3234 # alpha = [alpha_wrapper value];
3235 # }
3236 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3237 # }
3238 #
3239 # static Color* toProto(UIColor* color) {
3240 # CGFloat red, green, blue, alpha;
3241 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3242 # return nil;
3243 # }
3244 # Color* result = [Color alloc] init];
3245 # [result setRed:red];
3246 # [result setGreen:green];
3247 # [result setBlue:blue];
3248 # if (alpha <= 0.9999) {
3249 # [result setAlpha:floatWrapperWithValue(alpha)];
3250 # }
3251 # [result autorelease];
3252 # return result;
3253 # }
3254 # // ...
3255 #
3256 # Example (JavaScript):
3257 #
3258 # // ...
3259 #
3260 # var protoToCssColor = function(rgb_color) {
3261 # var redFrac = rgb_color.red || 0.0;
3262 # var greenFrac = rgb_color.green || 0.0;
3263 # var blueFrac = rgb_color.blue || 0.0;
3264 # var red = Math.floor(redFrac * 255);
3265 # var green = Math.floor(greenFrac * 255);
3266 # var blue = Math.floor(blueFrac * 255);
3267 #
3268 # if (!('alpha' in rgb_color)) {
3269 # return rgbToCssColor_(red, green, blue);
3270 # }
3271 #
3272 # var alphaFrac = rgb_color.alpha.value || 0.0;
3273 # var rgbParams = [red, green, blue].join(',');
3274 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3275 # };
3276 #
3277 # var rgbToCssColor_ = function(red, green, blue) {
3278 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3279 # var hexString = rgbNumber.toString(16);
3280 # var missingZeros = 6 - hexString.length;
3281 # var resultBuilder = ['#'];
3282 # for (var i = 0; i < missingZeros; i++) {
3283 # resultBuilder.push('0');
3284 # }
3285 # resultBuilder.push(hexString);
3286 # return resultBuilder.join('');
3287 # };
3288 #
3289 # // ...
3290 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3291 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3292 # the final pixel color is defined by the equation:
3293 #
3294 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3295 #
3296 # This means that a value of 1.0 corresponds to a solid color, whereas
3297 # a value of 0.0 corresponds to a completely transparent color. This
3298 # uses a wrapper message rather than a simple float scalar so that it is
3299 # possible to distinguish between a default value and the value being unset.
3300 # If omitted, this color object is to be rendered as a solid color
3301 # (as if the alpha value had been explicitly given with a value of 1.0).
3302 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3303 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3304 },
3305 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003306 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003307 "style": "A String", # The style of the border.
3308 },
3309 "right": { # A border along a cell. # The right border of the cell.
3310 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3311 # for simplicity of conversion to/from color representations in various
3312 # languages over compactness; for example, the fields of this representation
3313 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3314 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3315 # method in iOS; and, with just a little work, it can be easily formatted into
3316 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3317 #
3318 # Example (Java):
3319 #
3320 # import com.google.type.Color;
3321 #
3322 # // ...
3323 # public static java.awt.Color fromProto(Color protocolor) {
3324 # float alpha = protocolor.hasAlpha()
3325 # ? protocolor.getAlpha().getValue()
3326 # : 1.0;
3327 #
3328 # return new java.awt.Color(
3329 # protocolor.getRed(),
3330 # protocolor.getGreen(),
3331 # protocolor.getBlue(),
3332 # alpha);
3333 # }
3334 #
3335 # public static Color toProto(java.awt.Color color) {
3336 # float red = (float) color.getRed();
3337 # float green = (float) color.getGreen();
3338 # float blue = (float) color.getBlue();
3339 # float denominator = 255.0;
3340 # Color.Builder resultBuilder =
3341 # Color
3342 # .newBuilder()
3343 # .setRed(red / denominator)
3344 # .setGreen(green / denominator)
3345 # .setBlue(blue / denominator);
3346 # int alpha = color.getAlpha();
3347 # if (alpha != 255) {
3348 # result.setAlpha(
3349 # FloatValue
3350 # .newBuilder()
3351 # .setValue(((float) alpha) / denominator)
3352 # .build());
3353 # }
3354 # return resultBuilder.build();
3355 # }
3356 # // ...
3357 #
3358 # Example (iOS / Obj-C):
3359 #
3360 # // ...
3361 # static UIColor* fromProto(Color* protocolor) {
3362 # float red = [protocolor red];
3363 # float green = [protocolor green];
3364 # float blue = [protocolor blue];
3365 # FloatValue* alpha_wrapper = [protocolor alpha];
3366 # float alpha = 1.0;
3367 # if (alpha_wrapper != nil) {
3368 # alpha = [alpha_wrapper value];
3369 # }
3370 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3371 # }
3372 #
3373 # static Color* toProto(UIColor* color) {
3374 # CGFloat red, green, blue, alpha;
3375 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3376 # return nil;
3377 # }
3378 # Color* result = [Color alloc] init];
3379 # [result setRed:red];
3380 # [result setGreen:green];
3381 # [result setBlue:blue];
3382 # if (alpha <= 0.9999) {
3383 # [result setAlpha:floatWrapperWithValue(alpha)];
3384 # }
3385 # [result autorelease];
3386 # return result;
3387 # }
3388 # // ...
3389 #
3390 # Example (JavaScript):
3391 #
3392 # // ...
3393 #
3394 # var protoToCssColor = function(rgb_color) {
3395 # var redFrac = rgb_color.red || 0.0;
3396 # var greenFrac = rgb_color.green || 0.0;
3397 # var blueFrac = rgb_color.blue || 0.0;
3398 # var red = Math.floor(redFrac * 255);
3399 # var green = Math.floor(greenFrac * 255);
3400 # var blue = Math.floor(blueFrac * 255);
3401 #
3402 # if (!('alpha' in rgb_color)) {
3403 # return rgbToCssColor_(red, green, blue);
3404 # }
3405 #
3406 # var alphaFrac = rgb_color.alpha.value || 0.0;
3407 # var rgbParams = [red, green, blue].join(',');
3408 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3409 # };
3410 #
3411 # var rgbToCssColor_ = function(red, green, blue) {
3412 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3413 # var hexString = rgbNumber.toString(16);
3414 # var missingZeros = 6 - hexString.length;
3415 # var resultBuilder = ['#'];
3416 # for (var i = 0; i < missingZeros; i++) {
3417 # resultBuilder.push('0');
3418 # }
3419 # resultBuilder.push(hexString);
3420 # return resultBuilder.join('');
3421 # };
3422 #
3423 # // ...
3424 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3425 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3426 # the final pixel color is defined by the equation:
3427 #
3428 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3429 #
3430 # This means that a value of 1.0 corresponds to a solid color, whereas
3431 # a value of 0.0 corresponds to a completely transparent color. This
3432 # uses a wrapper message rather than a simple float scalar so that it is
3433 # possible to distinguish between a default value and the value being unset.
3434 # If omitted, this color object is to be rendered as a solid color
3435 # (as if the alpha value had been explicitly given with a value of 1.0).
3436 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3437 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3438 },
3439 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003440 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003441 "style": "A String", # The style of the border.
3442 },
3443 "bottom": { # A border along a cell. # The bottom border of the cell.
3444 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3445 # for simplicity of conversion to/from color representations in various
3446 # languages over compactness; for example, the fields of this representation
3447 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3448 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3449 # method in iOS; and, with just a little work, it can be easily formatted into
3450 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3451 #
3452 # Example (Java):
3453 #
3454 # import com.google.type.Color;
3455 #
3456 # // ...
3457 # public static java.awt.Color fromProto(Color protocolor) {
3458 # float alpha = protocolor.hasAlpha()
3459 # ? protocolor.getAlpha().getValue()
3460 # : 1.0;
3461 #
3462 # return new java.awt.Color(
3463 # protocolor.getRed(),
3464 # protocolor.getGreen(),
3465 # protocolor.getBlue(),
3466 # alpha);
3467 # }
3468 #
3469 # public static Color toProto(java.awt.Color color) {
3470 # float red = (float) color.getRed();
3471 # float green = (float) color.getGreen();
3472 # float blue = (float) color.getBlue();
3473 # float denominator = 255.0;
3474 # Color.Builder resultBuilder =
3475 # Color
3476 # .newBuilder()
3477 # .setRed(red / denominator)
3478 # .setGreen(green / denominator)
3479 # .setBlue(blue / denominator);
3480 # int alpha = color.getAlpha();
3481 # if (alpha != 255) {
3482 # result.setAlpha(
3483 # FloatValue
3484 # .newBuilder()
3485 # .setValue(((float) alpha) / denominator)
3486 # .build());
3487 # }
3488 # return resultBuilder.build();
3489 # }
3490 # // ...
3491 #
3492 # Example (iOS / Obj-C):
3493 #
3494 # // ...
3495 # static UIColor* fromProto(Color* protocolor) {
3496 # float red = [protocolor red];
3497 # float green = [protocolor green];
3498 # float blue = [protocolor blue];
3499 # FloatValue* alpha_wrapper = [protocolor alpha];
3500 # float alpha = 1.0;
3501 # if (alpha_wrapper != nil) {
3502 # alpha = [alpha_wrapper value];
3503 # }
3504 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3505 # }
3506 #
3507 # static Color* toProto(UIColor* color) {
3508 # CGFloat red, green, blue, alpha;
3509 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3510 # return nil;
3511 # }
3512 # Color* result = [Color alloc] init];
3513 # [result setRed:red];
3514 # [result setGreen:green];
3515 # [result setBlue:blue];
3516 # if (alpha <= 0.9999) {
3517 # [result setAlpha:floatWrapperWithValue(alpha)];
3518 # }
3519 # [result autorelease];
3520 # return result;
3521 # }
3522 # // ...
3523 #
3524 # Example (JavaScript):
3525 #
3526 # // ...
3527 #
3528 # var protoToCssColor = function(rgb_color) {
3529 # var redFrac = rgb_color.red || 0.0;
3530 # var greenFrac = rgb_color.green || 0.0;
3531 # var blueFrac = rgb_color.blue || 0.0;
3532 # var red = Math.floor(redFrac * 255);
3533 # var green = Math.floor(greenFrac * 255);
3534 # var blue = Math.floor(blueFrac * 255);
3535 #
3536 # if (!('alpha' in rgb_color)) {
3537 # return rgbToCssColor_(red, green, blue);
3538 # }
3539 #
3540 # var alphaFrac = rgb_color.alpha.value || 0.0;
3541 # var rgbParams = [red, green, blue].join(',');
3542 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3543 # };
3544 #
3545 # var rgbToCssColor_ = function(red, green, blue) {
3546 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3547 # var hexString = rgbNumber.toString(16);
3548 # var missingZeros = 6 - hexString.length;
3549 # var resultBuilder = ['#'];
3550 # for (var i = 0; i < missingZeros; i++) {
3551 # resultBuilder.push('0');
3552 # }
3553 # resultBuilder.push(hexString);
3554 # return resultBuilder.join('');
3555 # };
3556 #
3557 # // ...
3558 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3559 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3560 # the final pixel color is defined by the equation:
3561 #
3562 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3563 #
3564 # This means that a value of 1.0 corresponds to a solid color, whereas
3565 # a value of 0.0 corresponds to a completely transparent color. This
3566 # uses a wrapper message rather than a simple float scalar so that it is
3567 # possible to distinguish between a default value and the value being unset.
3568 # If omitted, this color object is to be rendered as a solid color
3569 # (as if the alpha value had been explicitly given with a value of 1.0).
3570 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3571 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3572 },
3573 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003574 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003575 "style": "A String", # The style of the border.
3576 },
3577 "left": { # A border along a cell. # The left border of the cell.
3578 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3579 # for simplicity of conversion to/from color representations in various
3580 # languages over compactness; for example, the fields of this representation
3581 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3582 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3583 # method in iOS; and, with just a little work, it can be easily formatted into
3584 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3585 #
3586 # Example (Java):
3587 #
3588 # import com.google.type.Color;
3589 #
3590 # // ...
3591 # public static java.awt.Color fromProto(Color protocolor) {
3592 # float alpha = protocolor.hasAlpha()
3593 # ? protocolor.getAlpha().getValue()
3594 # : 1.0;
3595 #
3596 # return new java.awt.Color(
3597 # protocolor.getRed(),
3598 # protocolor.getGreen(),
3599 # protocolor.getBlue(),
3600 # alpha);
3601 # }
3602 #
3603 # public static Color toProto(java.awt.Color color) {
3604 # float red = (float) color.getRed();
3605 # float green = (float) color.getGreen();
3606 # float blue = (float) color.getBlue();
3607 # float denominator = 255.0;
3608 # Color.Builder resultBuilder =
3609 # Color
3610 # .newBuilder()
3611 # .setRed(red / denominator)
3612 # .setGreen(green / denominator)
3613 # .setBlue(blue / denominator);
3614 # int alpha = color.getAlpha();
3615 # if (alpha != 255) {
3616 # result.setAlpha(
3617 # FloatValue
3618 # .newBuilder()
3619 # .setValue(((float) alpha) / denominator)
3620 # .build());
3621 # }
3622 # return resultBuilder.build();
3623 # }
3624 # // ...
3625 #
3626 # Example (iOS / Obj-C):
3627 #
3628 # // ...
3629 # static UIColor* fromProto(Color* protocolor) {
3630 # float red = [protocolor red];
3631 # float green = [protocolor green];
3632 # float blue = [protocolor blue];
3633 # FloatValue* alpha_wrapper = [protocolor alpha];
3634 # float alpha = 1.0;
3635 # if (alpha_wrapper != nil) {
3636 # alpha = [alpha_wrapper value];
3637 # }
3638 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3639 # }
3640 #
3641 # static Color* toProto(UIColor* color) {
3642 # CGFloat red, green, blue, alpha;
3643 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3644 # return nil;
3645 # }
3646 # Color* result = [Color alloc] init];
3647 # [result setRed:red];
3648 # [result setGreen:green];
3649 # [result setBlue:blue];
3650 # if (alpha <= 0.9999) {
3651 # [result setAlpha:floatWrapperWithValue(alpha)];
3652 # }
3653 # [result autorelease];
3654 # return result;
3655 # }
3656 # // ...
3657 #
3658 # Example (JavaScript):
3659 #
3660 # // ...
3661 #
3662 # var protoToCssColor = function(rgb_color) {
3663 # var redFrac = rgb_color.red || 0.0;
3664 # var greenFrac = rgb_color.green || 0.0;
3665 # var blueFrac = rgb_color.blue || 0.0;
3666 # var red = Math.floor(redFrac * 255);
3667 # var green = Math.floor(greenFrac * 255);
3668 # var blue = Math.floor(blueFrac * 255);
3669 #
3670 # if (!('alpha' in rgb_color)) {
3671 # return rgbToCssColor_(red, green, blue);
3672 # }
3673 #
3674 # var alphaFrac = rgb_color.alpha.value || 0.0;
3675 # var rgbParams = [red, green, blue].join(',');
3676 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3677 # };
3678 #
3679 # var rgbToCssColor_ = function(red, green, blue) {
3680 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3681 # var hexString = rgbNumber.toString(16);
3682 # var missingZeros = 6 - hexString.length;
3683 # var resultBuilder = ['#'];
3684 # for (var i = 0; i < missingZeros; i++) {
3685 # resultBuilder.push('0');
3686 # }
3687 # resultBuilder.push(hexString);
3688 # return resultBuilder.join('');
3689 # };
3690 #
3691 # // ...
3692 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3693 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3694 # the final pixel color is defined by the equation:
3695 #
3696 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3697 #
3698 # This means that a value of 1.0 corresponds to a solid color, whereas
3699 # a value of 0.0 corresponds to a completely transparent color. This
3700 # uses a wrapper message rather than a simple float scalar so that it is
3701 # possible to distinguish between a default value and the value being unset.
3702 # If omitted, this color object is to be rendered as a solid color
3703 # (as if the alpha value had been explicitly given with a value of 1.0).
3704 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3705 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3706 },
3707 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003708 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003709 "style": "A String", # The style of the border.
3710 },
3711 },
3712 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
3713 },
3714 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
3715 #
3716 # When writing, the new data validation rule will overwrite any prior rule.
3717 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
3718 # If true, "List" conditions will show a dropdown.
3719 "strict": True or False, # True if invalid data should be rejected.
3720 "inputMessage": "A String", # A message to show the user when adding data to the cell.
3721 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
3722 # BooleanConditions are used by conditional formatting,
3723 # data validation, and the criteria in filters.
3724 "type": "A String", # The type of condition.
3725 "values": [ # The values of the condition. The number of supported values depends
3726 # on the condition type. Some support zero values,
3727 # others one or two values,
3728 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
3729 { # The value of the condition.
3730 "relativeDate": "A String", # A relative date (based on the current date).
3731 # Valid only if the type is
3732 # DATE_BEFORE,
3733 # DATE_AFTER,
3734 # DATE_ON_OR_BEFORE or
3735 # DATE_ON_OR_AFTER.
3736 #
3737 # Relative dates are not supported in data validation.
3738 # They are supported only in conditional formatting and
3739 # conditional filters.
3740 "userEnteredValue": "A String", # A value the condition is based on.
3741 # The value will be parsed as if the user typed into a cell.
3742 # Formulas are supported (and must begin with an `=`).
3743 },
3744 ],
3745 },
3746 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003747 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
3748 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003749 # Runs start at specific indexes in the text and continue until the next
3750 # run. Properties of a run will continue unless explicitly changed
3751 # in a subsequent run (and properties of the first run will continue
3752 # the properties of the cell unless explicitly changed).
3753 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003754 # When writing, the new runs will overwrite any prior runs. When writing a
3755 # new user_entered_value, previous runs will be erased.
3756 { # A run of a text format. The format of this run continues until the start
3757 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003758 # When updating, all fields must be set.
3759 "startIndex": 42, # The character index where this run starts.
3760 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
3761 # Absent values indicate that the field isn't specified.
3762 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
3763 # for simplicity of conversion to/from color representations in various
3764 # languages over compactness; for example, the fields of this representation
3765 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3766 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3767 # method in iOS; and, with just a little work, it can be easily formatted into
3768 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3769 #
3770 # Example (Java):
3771 #
3772 # import com.google.type.Color;
3773 #
3774 # // ...
3775 # public static java.awt.Color fromProto(Color protocolor) {
3776 # float alpha = protocolor.hasAlpha()
3777 # ? protocolor.getAlpha().getValue()
3778 # : 1.0;
3779 #
3780 # return new java.awt.Color(
3781 # protocolor.getRed(),
3782 # protocolor.getGreen(),
3783 # protocolor.getBlue(),
3784 # alpha);
3785 # }
3786 #
3787 # public static Color toProto(java.awt.Color color) {
3788 # float red = (float) color.getRed();
3789 # float green = (float) color.getGreen();
3790 # float blue = (float) color.getBlue();
3791 # float denominator = 255.0;
3792 # Color.Builder resultBuilder =
3793 # Color
3794 # .newBuilder()
3795 # .setRed(red / denominator)
3796 # .setGreen(green / denominator)
3797 # .setBlue(blue / denominator);
3798 # int alpha = color.getAlpha();
3799 # if (alpha != 255) {
3800 # result.setAlpha(
3801 # FloatValue
3802 # .newBuilder()
3803 # .setValue(((float) alpha) / denominator)
3804 # .build());
3805 # }
3806 # return resultBuilder.build();
3807 # }
3808 # // ...
3809 #
3810 # Example (iOS / Obj-C):
3811 #
3812 # // ...
3813 # static UIColor* fromProto(Color* protocolor) {
3814 # float red = [protocolor red];
3815 # float green = [protocolor green];
3816 # float blue = [protocolor blue];
3817 # FloatValue* alpha_wrapper = [protocolor alpha];
3818 # float alpha = 1.0;
3819 # if (alpha_wrapper != nil) {
3820 # alpha = [alpha_wrapper value];
3821 # }
3822 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3823 # }
3824 #
3825 # static Color* toProto(UIColor* color) {
3826 # CGFloat red, green, blue, alpha;
3827 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3828 # return nil;
3829 # }
3830 # Color* result = [Color alloc] init];
3831 # [result setRed:red];
3832 # [result setGreen:green];
3833 # [result setBlue:blue];
3834 # if (alpha <= 0.9999) {
3835 # [result setAlpha:floatWrapperWithValue(alpha)];
3836 # }
3837 # [result autorelease];
3838 # return result;
3839 # }
3840 # // ...
3841 #
3842 # Example (JavaScript):
3843 #
3844 # // ...
3845 #
3846 # var protoToCssColor = function(rgb_color) {
3847 # var redFrac = rgb_color.red || 0.0;
3848 # var greenFrac = rgb_color.green || 0.0;
3849 # var blueFrac = rgb_color.blue || 0.0;
3850 # var red = Math.floor(redFrac * 255);
3851 # var green = Math.floor(greenFrac * 255);
3852 # var blue = Math.floor(blueFrac * 255);
3853 #
3854 # if (!('alpha' in rgb_color)) {
3855 # return rgbToCssColor_(red, green, blue);
3856 # }
3857 #
3858 # var alphaFrac = rgb_color.alpha.value || 0.0;
3859 # var rgbParams = [red, green, blue].join(',');
3860 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3861 # };
3862 #
3863 # var rgbToCssColor_ = function(red, green, blue) {
3864 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3865 # var hexString = rgbNumber.toString(16);
3866 # var missingZeros = 6 - hexString.length;
3867 # var resultBuilder = ['#'];
3868 # for (var i = 0; i < missingZeros; i++) {
3869 # resultBuilder.push('0');
3870 # }
3871 # resultBuilder.push(hexString);
3872 # return resultBuilder.join('');
3873 # };
3874 #
3875 # // ...
3876 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3877 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3878 # the final pixel color is defined by the equation:
3879 #
3880 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3881 #
3882 # This means that a value of 1.0 corresponds to a solid color, whereas
3883 # a value of 0.0 corresponds to a completely transparent color. This
3884 # uses a wrapper message rather than a simple float scalar so that it is
3885 # possible to distinguish between a default value and the value being unset.
3886 # If omitted, this color object is to be rendered as a solid color
3887 # (as if the alpha value had been explicitly given with a value of 1.0).
3888 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3889 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3890 },
3891 "bold": True or False, # True if the text is bold.
3892 "strikethrough": True or False, # True if the text has a strikethrough.
3893 "fontFamily": "A String", # The font family.
3894 "fontSize": 42, # The size of the font.
3895 "italic": True or False, # True if the text is italicized.
3896 "underline": True or False, # True if the text is underlined.
3897 },
3898 },
3899 ],
3900 },
3901 ],
3902 },
3903 ],
3904 "sheetId": 42, # The sheet ID to append the data to.
3905 },
3906 "duplicateSheet": { # Duplicates the contents of a sheet. # Duplicates a sheet.
3907 "sourceSheetId": 42, # The sheet to duplicate.
3908 "insertSheetIndex": 42, # The zero-based index where the new sheet should be inserted.
3909 # The index of all sheets after this are incremented.
3910 "newSheetName": "A String", # The name of the new sheet. If empty, a new name is chosen for you.
3911 "newSheetId": 42, # If set, the ID of the new sheet. If not set, an ID is chosen.
3912 # If set, the ID must not conflict with any existing sheet ID.
3913 # If set, it must be non-negative.
3914 },
3915 "updateSheetProperties": { # Updates properties of the sheet with the specified # Updates a sheet's properties.
3916 # sheetId.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003917 "fields": "A String", # The fields that should be updated. At least one field must be specified.
3918 # The root `properties` is implied and should not be specified.
3919 # A single `"*"` can be used as short-hand for listing every field.
3920 "properties": { # Properties of a sheet. # The properties to update.
3921 "sheetType": "A String", # The type of sheet. Defaults to GRID.
3922 # This field cannot be changed once set.
3923 "index": 42, # The index of the sheet within the spreadsheet.
3924 # When adding or updating sheet properties, if this field
3925 # is excluded then the sheet will be added or moved to the end
3926 # of the sheet list.
3927 "title": "A String", # The name of the sheet.
3928 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
3929 # (If the sheet is an object sheet, containing a chart or image, then
3930 # this field will be absent.)
3931 # When writing it is an error to set any grid properties on non-grid sheets.
3932 "columnCount": 42, # The number of columns in the grid.
3933 "rowCount": 42, # The number of rows in the grid.
3934 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
3935 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
3936 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
3937 },
3938 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
3939 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
3940 # for simplicity of conversion to/from color representations in various
3941 # languages over compactness; for example, the fields of this representation
3942 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3943 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3944 # method in iOS; and, with just a little work, it can be easily formatted into
3945 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3946 #
3947 # Example (Java):
3948 #
3949 # import com.google.type.Color;
3950 #
3951 # // ...
3952 # public static java.awt.Color fromProto(Color protocolor) {
3953 # float alpha = protocolor.hasAlpha()
3954 # ? protocolor.getAlpha().getValue()
3955 # : 1.0;
3956 #
3957 # return new java.awt.Color(
3958 # protocolor.getRed(),
3959 # protocolor.getGreen(),
3960 # protocolor.getBlue(),
3961 # alpha);
3962 # }
3963 #
3964 # public static Color toProto(java.awt.Color color) {
3965 # float red = (float) color.getRed();
3966 # float green = (float) color.getGreen();
3967 # float blue = (float) color.getBlue();
3968 # float denominator = 255.0;
3969 # Color.Builder resultBuilder =
3970 # Color
3971 # .newBuilder()
3972 # .setRed(red / denominator)
3973 # .setGreen(green / denominator)
3974 # .setBlue(blue / denominator);
3975 # int alpha = color.getAlpha();
3976 # if (alpha != 255) {
3977 # result.setAlpha(
3978 # FloatValue
3979 # .newBuilder()
3980 # .setValue(((float) alpha) / denominator)
3981 # .build());
3982 # }
3983 # return resultBuilder.build();
3984 # }
3985 # // ...
3986 #
3987 # Example (iOS / Obj-C):
3988 #
3989 # // ...
3990 # static UIColor* fromProto(Color* protocolor) {
3991 # float red = [protocolor red];
3992 # float green = [protocolor green];
3993 # float blue = [protocolor blue];
3994 # FloatValue* alpha_wrapper = [protocolor alpha];
3995 # float alpha = 1.0;
3996 # if (alpha_wrapper != nil) {
3997 # alpha = [alpha_wrapper value];
3998 # }
3999 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4000 # }
4001 #
4002 # static Color* toProto(UIColor* color) {
4003 # CGFloat red, green, blue, alpha;
4004 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4005 # return nil;
4006 # }
4007 # Color* result = [Color alloc] init];
4008 # [result setRed:red];
4009 # [result setGreen:green];
4010 # [result setBlue:blue];
4011 # if (alpha <= 0.9999) {
4012 # [result setAlpha:floatWrapperWithValue(alpha)];
4013 # }
4014 # [result autorelease];
4015 # return result;
4016 # }
4017 # // ...
4018 #
4019 # Example (JavaScript):
4020 #
4021 # // ...
4022 #
4023 # var protoToCssColor = function(rgb_color) {
4024 # var redFrac = rgb_color.red || 0.0;
4025 # var greenFrac = rgb_color.green || 0.0;
4026 # var blueFrac = rgb_color.blue || 0.0;
4027 # var red = Math.floor(redFrac * 255);
4028 # var green = Math.floor(greenFrac * 255);
4029 # var blue = Math.floor(blueFrac * 255);
4030 #
4031 # if (!('alpha' in rgb_color)) {
4032 # return rgbToCssColor_(red, green, blue);
4033 # }
4034 #
4035 # var alphaFrac = rgb_color.alpha.value || 0.0;
4036 # var rgbParams = [red, green, blue].join(',');
4037 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4038 # };
4039 #
4040 # var rgbToCssColor_ = function(red, green, blue) {
4041 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4042 # var hexString = rgbNumber.toString(16);
4043 # var missingZeros = 6 - hexString.length;
4044 # var resultBuilder = ['#'];
4045 # for (var i = 0; i < missingZeros; i++) {
4046 # resultBuilder.push('0');
4047 # }
4048 # resultBuilder.push(hexString);
4049 # return resultBuilder.join('');
4050 # };
4051 #
4052 # // ...
4053 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4054 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4055 # the final pixel color is defined by the equation:
4056 #
4057 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4058 #
4059 # This means that a value of 1.0 corresponds to a solid color, whereas
4060 # a value of 0.0 corresponds to a completely transparent color. This
4061 # uses a wrapper message rather than a simple float scalar so that it is
4062 # possible to distinguish between a default value and the value being unset.
4063 # If omitted, this color object is to be rendered as a solid color
4064 # (as if the alpha value had been explicitly given with a value of 1.0).
4065 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4066 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4067 },
4068 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
4069 "sheetId": 42, # The ID of the sheet. Must be non-negative.
4070 # This field cannot be changed once set.
4071 },
4072 },
4073 "addChart": { # Adds a chart to a sheet in the spreadsheet. # Adds a chart.
4074 "chart": { # A chart embedded in a sheet. # The chart that should be added to the spreadsheet, including the position
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004075 # where it should be placed. The chartId
4076 # field is optional; if one is not set, an id will be randomly generated. (It
4077 # is an error to specify the ID of a chart that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004078 "chartId": 42, # The ID of the chart.
4079 "position": { # The position of an embedded object such as a chart. # The position of the chart.
4080 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
4081 # is chosen for you. Used only when writing.
4082 "sheetId": 42, # The sheet this is on. Set only if the embedded object
4083 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004084 "overlayPosition": { # The location an object is overlaid on top of a grid. # The position at which the object is overlaid on top of a grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004085 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
4086 # All indexes are zero-based.
4087 "rowIndex": 42, # The row index of the coordinate.
4088 "columnIndex": 42, # The column index of the coordinate.
4089 "sheetId": 42, # The sheet this coordinate is on.
4090 },
4091 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
4092 # from the anchor cell.
4093 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
4094 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
4095 # from the anchor cell.
4096 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
4097 },
4098 },
4099 "spec": { # The specifications of a chart. # The specification of the chart.
4100 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004101 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
4102 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
4103 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
4104 "sources": [ # The ranges of data for a series or domain.
4105 # Exactly one dimension must have a length of 1,
4106 # and all sources in the list must have the same dimension
4107 # with length 1.
4108 # The domain (if it exists) & all series must have the same number
4109 # of source ranges. If using more than one source range, then the source
4110 # range at a given offset must be contiguous across the domain and series.
4111 #
4112 # For example, these are valid configurations:
4113 #
4114 # domain sources: A1:A5
4115 # series1 sources: B1:B5
4116 # series2 sources: D6:D10
4117 #
4118 # domain sources: A1:A5, C10:C12
4119 # series1 sources: B1:B5, D10:D12
4120 # series2 sources: C1:C5, E10:E12
4121 { # A range on a sheet.
4122 # All indexes are zero-based.
4123 # Indexes are half open, e.g the start index is inclusive
4124 # and the end index is exclusive -- [start_index, end_index).
4125 # Missing indexes indicate the range is unbounded on that side.
4126 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004127 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004128 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004129 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004130 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004131 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004132 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004133 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004134 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004135 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004136 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004137 # `Sheet1!A:B == sheet_id: 0,
4138 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004139 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004140 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004141 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004142 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004143 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004144 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004145 #
4146 # The start index must always be less than or equal to the end index.
4147 # If the start index equals the end index, then the range is empty.
4148 # Empty ranges are typically not meaningful and are usually rendered in the
4149 # UI as `#REF!`.
4150 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
4151 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
4152 "sheetId": 42, # The sheet this range is on.
4153 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
4154 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
4155 },
4156 ],
4157 },
4158 },
4159 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
4160 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
4161 "sources": [ # The ranges of data for a series or domain.
4162 # Exactly one dimension must have a length of 1,
4163 # and all sources in the list must have the same dimension
4164 # with length 1.
4165 # The domain (if it exists) & all series must have the same number
4166 # of source ranges. If using more than one source range, then the source
4167 # range at a given offset must be contiguous across the domain and series.
4168 #
4169 # For example, these are valid configurations:
4170 #
4171 # domain sources: A1:A5
4172 # series1 sources: B1:B5
4173 # series2 sources: D6:D10
4174 #
4175 # domain sources: A1:A5, C10:C12
4176 # series1 sources: B1:B5, D10:D12
4177 # series2 sources: C1:C5, E10:E12
4178 { # A range on a sheet.
4179 # All indexes are zero-based.
4180 # Indexes are half open, e.g the start index is inclusive
4181 # and the end index is exclusive -- [start_index, end_index).
4182 # Missing indexes indicate the range is unbounded on that side.
4183 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004184 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004185 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004186 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004187 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004188 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004189 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004190 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004191 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004192 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004193 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004194 # `Sheet1!A:B == sheet_id: 0,
4195 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004196 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004197 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004198 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004199 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004200 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004201 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004202 #
4203 # The start index must always be less than or equal to the end index.
4204 # If the start index equals the end index, then the range is empty.
4205 # Empty ranges are typically not meaningful and are usually rendered in the
4206 # UI as `#REF!`.
4207 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
4208 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
4209 "sheetId": 42, # The sheet this range is on.
4210 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
4211 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
4212 },
4213 ],
4214 },
4215 },
4216 "threeDimensional": True or False, # True if the pie is three dimensional.
4217 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
4218 "pieHole": 3.14, # The size of the hole in the pie chart.
4219 },
4220 "basicChart": { # The specification for a basic chart. See BasicChartType for the list # A basic chart specification, can be one of many kinds of charts.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004221 # See BasicChartType for the list of all
4222 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004223 # of charts this supports.
4224 "headerCount": 42, # The number of rows or columns in the data that are "headers".
4225 # If not set, Google Sheets will guess how many rows are headers based
4226 # on the data.
4227 #
4228 # (Note that BasicChartAxis.title may override the axis title
4229 # inferred from the header values.)
4230 "series": [ # The data this chart is visualizing.
4231 { # A single series of data in a chart.
4232 # For example, if charting stock prices over time, multiple series may exist,
4233 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
4234 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
4235 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
4236 "sources": [ # The ranges of data for a series or domain.
4237 # Exactly one dimension must have a length of 1,
4238 # and all sources in the list must have the same dimension
4239 # with length 1.
4240 # The domain (if it exists) & all series must have the same number
4241 # of source ranges. If using more than one source range, then the source
4242 # range at a given offset must be contiguous across the domain and series.
4243 #
4244 # For example, these are valid configurations:
4245 #
4246 # domain sources: A1:A5
4247 # series1 sources: B1:B5
4248 # series2 sources: D6:D10
4249 #
4250 # domain sources: A1:A5, C10:C12
4251 # series1 sources: B1:B5, D10:D12
4252 # series2 sources: C1:C5, E10:E12
4253 { # A range on a sheet.
4254 # All indexes are zero-based.
4255 # Indexes are half open, e.g the start index is inclusive
4256 # and the end index is exclusive -- [start_index, end_index).
4257 # Missing indexes indicate the range is unbounded on that side.
4258 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004259 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004260 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004261 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004262 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004263 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004264 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004265 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004266 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004267 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004268 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004269 # `Sheet1!A:B == sheet_id: 0,
4270 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004271 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004272 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004273 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004274 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004275 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004276 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004277 #
4278 # The start index must always be less than or equal to the end index.
4279 # If the start index equals the end index, then the range is empty.
4280 # Empty ranges are typically not meaningful and are usually rendered in the
4281 # UI as `#REF!`.
4282 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
4283 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
4284 "sheetId": 42, # The sheet this range is on.
4285 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
4286 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
4287 },
4288 ],
4289 },
4290 },
4291 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
4292 # For example, if charting stocks over time, the "Volume" series
4293 # may want to be pinned to the right with the prices pinned to the left,
4294 # because the scale of trading volume is different than the scale of
4295 # prices.
4296 # It is an error to specify an axis that isn't a valid minor axis
4297 # for the chart's type.
4298 "type": "A String", # The type of this series. Valid only if the
4299 # chartType is
4300 # COMBO.
4301 # Different types will change the way the series is visualized.
4302 # Only LINE, AREA,
4303 # and COLUMN are supported.
4304 },
4305 ],
4306 "legendPosition": "A String", # The position of the chart legend.
4307 "domains": [ # The domain of data this is charting.
4308 # Only a single domain is currently supported.
4309 { # The domain of a chart.
4310 # For example, if charting stock prices over time, this would be the date.
4311 "domain": { # The data included in a domain or series. # The data of the domain. For example, if charting stock prices over time,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004312 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004313 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
4314 "sources": [ # The ranges of data for a series or domain.
4315 # Exactly one dimension must have a length of 1,
4316 # and all sources in the list must have the same dimension
4317 # with length 1.
4318 # The domain (if it exists) & all series must have the same number
4319 # of source ranges. If using more than one source range, then the source
4320 # range at a given offset must be contiguous across the domain and series.
4321 #
4322 # For example, these are valid configurations:
4323 #
4324 # domain sources: A1:A5
4325 # series1 sources: B1:B5
4326 # series2 sources: D6:D10
4327 #
4328 # domain sources: A1:A5, C10:C12
4329 # series1 sources: B1:B5, D10:D12
4330 # series2 sources: C1:C5, E10:E12
4331 { # A range on a sheet.
4332 # All indexes are zero-based.
4333 # Indexes are half open, e.g the start index is inclusive
4334 # and the end index is exclusive -- [start_index, end_index).
4335 # Missing indexes indicate the range is unbounded on that side.
4336 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004337 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004338 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004339 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004340 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004341 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004342 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004343 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004344 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004345 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004346 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004347 # `Sheet1!A:B == sheet_id: 0,
4348 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004349 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004350 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004351 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004352 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004353 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004354 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004355 #
4356 # The start index must always be less than or equal to the end index.
4357 # If the start index equals the end index, then the range is empty.
4358 # Empty ranges are typically not meaningful and are usually rendered in the
4359 # UI as `#REF!`.
4360 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
4361 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
4362 "sheetId": 42, # The sheet this range is on.
4363 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
4364 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
4365 },
4366 ],
4367 },
4368 },
4369 },
4370 ],
4371 "chartType": "A String", # The type of the chart.
4372 "axis": [ # The axis on the chart.
4373 { # An axis of the chart.
4374 # A chart may not have more than one axis per
4375 # axis position.
4376 "position": "A String", # The position of this axis.
4377 "format": { # The format of a run of text in a cell. # The format of the title.
4378 # Only valid if the axis is not associated with the domain.
4379 # Absent values indicate that the field isn't specified.
4380 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
4381 # for simplicity of conversion to/from color representations in various
4382 # languages over compactness; for example, the fields of this representation
4383 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4384 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4385 # method in iOS; and, with just a little work, it can be easily formatted into
4386 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4387 #
4388 # Example (Java):
4389 #
4390 # import com.google.type.Color;
4391 #
4392 # // ...
4393 # public static java.awt.Color fromProto(Color protocolor) {
4394 # float alpha = protocolor.hasAlpha()
4395 # ? protocolor.getAlpha().getValue()
4396 # : 1.0;
4397 #
4398 # return new java.awt.Color(
4399 # protocolor.getRed(),
4400 # protocolor.getGreen(),
4401 # protocolor.getBlue(),
4402 # alpha);
4403 # }
4404 #
4405 # public static Color toProto(java.awt.Color color) {
4406 # float red = (float) color.getRed();
4407 # float green = (float) color.getGreen();
4408 # float blue = (float) color.getBlue();
4409 # float denominator = 255.0;
4410 # Color.Builder resultBuilder =
4411 # Color
4412 # .newBuilder()
4413 # .setRed(red / denominator)
4414 # .setGreen(green / denominator)
4415 # .setBlue(blue / denominator);
4416 # int alpha = color.getAlpha();
4417 # if (alpha != 255) {
4418 # result.setAlpha(
4419 # FloatValue
4420 # .newBuilder()
4421 # .setValue(((float) alpha) / denominator)
4422 # .build());
4423 # }
4424 # return resultBuilder.build();
4425 # }
4426 # // ...
4427 #
4428 # Example (iOS / Obj-C):
4429 #
4430 # // ...
4431 # static UIColor* fromProto(Color* protocolor) {
4432 # float red = [protocolor red];
4433 # float green = [protocolor green];
4434 # float blue = [protocolor blue];
4435 # FloatValue* alpha_wrapper = [protocolor alpha];
4436 # float alpha = 1.0;
4437 # if (alpha_wrapper != nil) {
4438 # alpha = [alpha_wrapper value];
4439 # }
4440 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4441 # }
4442 #
4443 # static Color* toProto(UIColor* color) {
4444 # CGFloat red, green, blue, alpha;
4445 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4446 # return nil;
4447 # }
4448 # Color* result = [Color alloc] init];
4449 # [result setRed:red];
4450 # [result setGreen:green];
4451 # [result setBlue:blue];
4452 # if (alpha <= 0.9999) {
4453 # [result setAlpha:floatWrapperWithValue(alpha)];
4454 # }
4455 # [result autorelease];
4456 # return result;
4457 # }
4458 # // ...
4459 #
4460 # Example (JavaScript):
4461 #
4462 # // ...
4463 #
4464 # var protoToCssColor = function(rgb_color) {
4465 # var redFrac = rgb_color.red || 0.0;
4466 # var greenFrac = rgb_color.green || 0.0;
4467 # var blueFrac = rgb_color.blue || 0.0;
4468 # var red = Math.floor(redFrac * 255);
4469 # var green = Math.floor(greenFrac * 255);
4470 # var blue = Math.floor(blueFrac * 255);
4471 #
4472 # if (!('alpha' in rgb_color)) {
4473 # return rgbToCssColor_(red, green, blue);
4474 # }
4475 #
4476 # var alphaFrac = rgb_color.alpha.value || 0.0;
4477 # var rgbParams = [red, green, blue].join(',');
4478 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4479 # };
4480 #
4481 # var rgbToCssColor_ = function(red, green, blue) {
4482 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4483 # var hexString = rgbNumber.toString(16);
4484 # var missingZeros = 6 - hexString.length;
4485 # var resultBuilder = ['#'];
4486 # for (var i = 0; i < missingZeros; i++) {
4487 # resultBuilder.push('0');
4488 # }
4489 # resultBuilder.push(hexString);
4490 # return resultBuilder.join('');
4491 # };
4492 #
4493 # // ...
4494 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4495 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4496 # the final pixel color is defined by the equation:
4497 #
4498 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4499 #
4500 # This means that a value of 1.0 corresponds to a solid color, whereas
4501 # a value of 0.0 corresponds to a completely transparent color. This
4502 # uses a wrapper message rather than a simple float scalar so that it is
4503 # possible to distinguish between a default value and the value being unset.
4504 # If omitted, this color object is to be rendered as a solid color
4505 # (as if the alpha value had been explicitly given with a value of 1.0).
4506 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4507 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4508 },
4509 "bold": True or False, # True if the text is bold.
4510 "strikethrough": True or False, # True if the text has a strikethrough.
4511 "fontFamily": "A String", # The font family.
4512 "fontSize": 42, # The size of the font.
4513 "italic": True or False, # True if the text is italicized.
4514 "underline": True or False, # True if the text is underlined.
4515 },
4516 "title": "A String", # The title of this axis. If set, this overrides any title inferred
4517 # from headers of the data.
4518 },
4519 ],
4520 },
4521 "title": "A String", # The title of the chart.
4522 },
4523 },
4524 },
4525 "addConditionalFormatRule": { # Adds a new conditional format rule at the given index. # Adds a new conditional format rule.
4526 # All subsequent rules' indexes are incremented.
4527 "index": 42, # The zero-based index where the rule should be inserted.
4528 "rule": { # A rule describing a conditional format. # The rule to add.
4529 "ranges": [ # The ranges that will be formatted if the condition is true.
4530 # All the ranges must be on the same grid.
4531 { # A range on a sheet.
4532 # All indexes are zero-based.
4533 # Indexes are half open, e.g the start index is inclusive
4534 # and the end index is exclusive -- [start_index, end_index).
4535 # Missing indexes indicate the range is unbounded on that side.
4536 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004537 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004538 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004539 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004540 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004541 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004542 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004543 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004544 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004545 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004546 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004547 # `Sheet1!A:B == sheet_id: 0,
4548 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004549 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004550 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004551 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004552 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004553 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004554 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004555 #
4556 # The start index must always be less than or equal to the end index.
4557 # If the start index equals the end index, then the range is empty.
4558 # Empty ranges are typically not meaningful and are usually rendered in the
4559 # UI as `#REF!`.
4560 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
4561 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
4562 "sheetId": 42, # The sheet this range is on.
4563 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
4564 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
4565 },
4566 ],
4567 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
4568 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
4569 # the format will be applied.
4570 # BooleanConditions are used by conditional formatting,
4571 # data validation, and the criteria in filters.
4572 "type": "A String", # The type of condition.
4573 "values": [ # The values of the condition. The number of supported values depends
4574 # on the condition type. Some support zero values,
4575 # others one or two values,
4576 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
4577 { # The value of the condition.
4578 "relativeDate": "A String", # A relative date (based on the current date).
4579 # Valid only if the type is
4580 # DATE_BEFORE,
4581 # DATE_AFTER,
4582 # DATE_ON_OR_BEFORE or
4583 # DATE_ON_OR_AFTER.
4584 #
4585 # Relative dates are not supported in data validation.
4586 # They are supported only in conditional formatting and
4587 # conditional filters.
4588 "userEnteredValue": "A String", # A value the condition is based on.
4589 # The value will be parsed as if the user typed into a cell.
4590 # Formulas are supported (and must begin with an `=`).
4591 },
4592 ],
4593 },
4594 "format": { # The format of a cell. # The format to apply.
4595 # Conditional formatting can only apply a subset of formatting:
4596 # bold, italic,
4597 # strikethrough,
4598 # foreground color &
4599 # background color.
4600 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004601 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
4602 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004603 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004604 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004605 },
4606 "textDirection": "A String", # The direction of the text in the cell.
4607 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
4608 # When updating padding, every field must be specified.
4609 "top": 42, # The top padding of the cell.
4610 "right": 42, # The right padding of the cell.
4611 "bottom": 42, # The bottom padding of the cell.
4612 "left": 42, # The left padding of the cell.
4613 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004614 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004615 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
4616 # for simplicity of conversion to/from color representations in various
4617 # languages over compactness; for example, the fields of this representation
4618 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4619 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4620 # method in iOS; and, with just a little work, it can be easily formatted into
4621 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4622 #
4623 # Example (Java):
4624 #
4625 # import com.google.type.Color;
4626 #
4627 # // ...
4628 # public static java.awt.Color fromProto(Color protocolor) {
4629 # float alpha = protocolor.hasAlpha()
4630 # ? protocolor.getAlpha().getValue()
4631 # : 1.0;
4632 #
4633 # return new java.awt.Color(
4634 # protocolor.getRed(),
4635 # protocolor.getGreen(),
4636 # protocolor.getBlue(),
4637 # alpha);
4638 # }
4639 #
4640 # public static Color toProto(java.awt.Color color) {
4641 # float red = (float) color.getRed();
4642 # float green = (float) color.getGreen();
4643 # float blue = (float) color.getBlue();
4644 # float denominator = 255.0;
4645 # Color.Builder resultBuilder =
4646 # Color
4647 # .newBuilder()
4648 # .setRed(red / denominator)
4649 # .setGreen(green / denominator)
4650 # .setBlue(blue / denominator);
4651 # int alpha = color.getAlpha();
4652 # if (alpha != 255) {
4653 # result.setAlpha(
4654 # FloatValue
4655 # .newBuilder()
4656 # .setValue(((float) alpha) / denominator)
4657 # .build());
4658 # }
4659 # return resultBuilder.build();
4660 # }
4661 # // ...
4662 #
4663 # Example (iOS / Obj-C):
4664 #
4665 # // ...
4666 # static UIColor* fromProto(Color* protocolor) {
4667 # float red = [protocolor red];
4668 # float green = [protocolor green];
4669 # float blue = [protocolor blue];
4670 # FloatValue* alpha_wrapper = [protocolor alpha];
4671 # float alpha = 1.0;
4672 # if (alpha_wrapper != nil) {
4673 # alpha = [alpha_wrapper value];
4674 # }
4675 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4676 # }
4677 #
4678 # static Color* toProto(UIColor* color) {
4679 # CGFloat red, green, blue, alpha;
4680 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4681 # return nil;
4682 # }
4683 # Color* result = [Color alloc] init];
4684 # [result setRed:red];
4685 # [result setGreen:green];
4686 # [result setBlue:blue];
4687 # if (alpha <= 0.9999) {
4688 # [result setAlpha:floatWrapperWithValue(alpha)];
4689 # }
4690 # [result autorelease];
4691 # return result;
4692 # }
4693 # // ...
4694 #
4695 # Example (JavaScript):
4696 #
4697 # // ...
4698 #
4699 # var protoToCssColor = function(rgb_color) {
4700 # var redFrac = rgb_color.red || 0.0;
4701 # var greenFrac = rgb_color.green || 0.0;
4702 # var blueFrac = rgb_color.blue || 0.0;
4703 # var red = Math.floor(redFrac * 255);
4704 # var green = Math.floor(greenFrac * 255);
4705 # var blue = Math.floor(blueFrac * 255);
4706 #
4707 # if (!('alpha' in rgb_color)) {
4708 # return rgbToCssColor_(red, green, blue);
4709 # }
4710 #
4711 # var alphaFrac = rgb_color.alpha.value || 0.0;
4712 # var rgbParams = [red, green, blue].join(',');
4713 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4714 # };
4715 #
4716 # var rgbToCssColor_ = function(red, green, blue) {
4717 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4718 # var hexString = rgbNumber.toString(16);
4719 # var missingZeros = 6 - hexString.length;
4720 # var resultBuilder = ['#'];
4721 # for (var i = 0; i < missingZeros; i++) {
4722 # resultBuilder.push('0');
4723 # }
4724 # resultBuilder.push(hexString);
4725 # return resultBuilder.join('');
4726 # };
4727 #
4728 # // ...
4729 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4730 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4731 # the final pixel color is defined by the equation:
4732 #
4733 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4734 #
4735 # This means that a value of 1.0 corresponds to a solid color, whereas
4736 # a value of 0.0 corresponds to a completely transparent color. This
4737 # uses a wrapper message rather than a simple float scalar so that it is
4738 # possible to distinguish between a default value and the value being unset.
4739 # If omitted, this color object is to be rendered as a solid color
4740 # (as if the alpha value had been explicitly given with a value of 1.0).
4741 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4742 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4743 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004744 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004745 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
4746 # Absent values indicate that the field isn't specified.
4747 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
4748 # for simplicity of conversion to/from color representations in various
4749 # languages over compactness; for example, the fields of this representation
4750 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4751 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4752 # method in iOS; and, with just a little work, it can be easily formatted into
4753 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4754 #
4755 # Example (Java):
4756 #
4757 # import com.google.type.Color;
4758 #
4759 # // ...
4760 # public static java.awt.Color fromProto(Color protocolor) {
4761 # float alpha = protocolor.hasAlpha()
4762 # ? protocolor.getAlpha().getValue()
4763 # : 1.0;
4764 #
4765 # return new java.awt.Color(
4766 # protocolor.getRed(),
4767 # protocolor.getGreen(),
4768 # protocolor.getBlue(),
4769 # alpha);
4770 # }
4771 #
4772 # public static Color toProto(java.awt.Color color) {
4773 # float red = (float) color.getRed();
4774 # float green = (float) color.getGreen();
4775 # float blue = (float) color.getBlue();
4776 # float denominator = 255.0;
4777 # Color.Builder resultBuilder =
4778 # Color
4779 # .newBuilder()
4780 # .setRed(red / denominator)
4781 # .setGreen(green / denominator)
4782 # .setBlue(blue / denominator);
4783 # int alpha = color.getAlpha();
4784 # if (alpha != 255) {
4785 # result.setAlpha(
4786 # FloatValue
4787 # .newBuilder()
4788 # .setValue(((float) alpha) / denominator)
4789 # .build());
4790 # }
4791 # return resultBuilder.build();
4792 # }
4793 # // ...
4794 #
4795 # Example (iOS / Obj-C):
4796 #
4797 # // ...
4798 # static UIColor* fromProto(Color* protocolor) {
4799 # float red = [protocolor red];
4800 # float green = [protocolor green];
4801 # float blue = [protocolor blue];
4802 # FloatValue* alpha_wrapper = [protocolor alpha];
4803 # float alpha = 1.0;
4804 # if (alpha_wrapper != nil) {
4805 # alpha = [alpha_wrapper value];
4806 # }
4807 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4808 # }
4809 #
4810 # static Color* toProto(UIColor* color) {
4811 # CGFloat red, green, blue, alpha;
4812 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4813 # return nil;
4814 # }
4815 # Color* result = [Color alloc] init];
4816 # [result setRed:red];
4817 # [result setGreen:green];
4818 # [result setBlue:blue];
4819 # if (alpha <= 0.9999) {
4820 # [result setAlpha:floatWrapperWithValue(alpha)];
4821 # }
4822 # [result autorelease];
4823 # return result;
4824 # }
4825 # // ...
4826 #
4827 # Example (JavaScript):
4828 #
4829 # // ...
4830 #
4831 # var protoToCssColor = function(rgb_color) {
4832 # var redFrac = rgb_color.red || 0.0;
4833 # var greenFrac = rgb_color.green || 0.0;
4834 # var blueFrac = rgb_color.blue || 0.0;
4835 # var red = Math.floor(redFrac * 255);
4836 # var green = Math.floor(greenFrac * 255);
4837 # var blue = Math.floor(blueFrac * 255);
4838 #
4839 # if (!('alpha' in rgb_color)) {
4840 # return rgbToCssColor_(red, green, blue);
4841 # }
4842 #
4843 # var alphaFrac = rgb_color.alpha.value || 0.0;
4844 # var rgbParams = [red, green, blue].join(',');
4845 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4846 # };
4847 #
4848 # var rgbToCssColor_ = function(red, green, blue) {
4849 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4850 # var hexString = rgbNumber.toString(16);
4851 # var missingZeros = 6 - hexString.length;
4852 # var resultBuilder = ['#'];
4853 # for (var i = 0; i < missingZeros; i++) {
4854 # resultBuilder.push('0');
4855 # }
4856 # resultBuilder.push(hexString);
4857 # return resultBuilder.join('');
4858 # };
4859 #
4860 # // ...
4861 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4862 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4863 # the final pixel color is defined by the equation:
4864 #
4865 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4866 #
4867 # This means that a value of 1.0 corresponds to a solid color, whereas
4868 # a value of 0.0 corresponds to a completely transparent color. This
4869 # uses a wrapper message rather than a simple float scalar so that it is
4870 # possible to distinguish between a default value and the value being unset.
4871 # If omitted, this color object is to be rendered as a solid color
4872 # (as if the alpha value had been explicitly given with a value of 1.0).
4873 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4874 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4875 },
4876 "bold": True or False, # True if the text is bold.
4877 "strikethrough": True or False, # True if the text has a strikethrough.
4878 "fontFamily": "A String", # The font family.
4879 "fontSize": 42, # The size of the font.
4880 "italic": True or False, # True if the text is italicized.
4881 "underline": True or False, # True if the text is underlined.
4882 },
4883 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
4884 "borders": { # The borders of the cell. # The borders of the cell.
4885 "top": { # A border along a cell. # The top border of the cell.
4886 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
4887 # for simplicity of conversion to/from color representations in various
4888 # languages over compactness; for example, the fields of this representation
4889 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4890 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4891 # method in iOS; and, with just a little work, it can be easily formatted into
4892 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4893 #
4894 # Example (Java):
4895 #
4896 # import com.google.type.Color;
4897 #
4898 # // ...
4899 # public static java.awt.Color fromProto(Color protocolor) {
4900 # float alpha = protocolor.hasAlpha()
4901 # ? protocolor.getAlpha().getValue()
4902 # : 1.0;
4903 #
4904 # return new java.awt.Color(
4905 # protocolor.getRed(),
4906 # protocolor.getGreen(),
4907 # protocolor.getBlue(),
4908 # alpha);
4909 # }
4910 #
4911 # public static Color toProto(java.awt.Color color) {
4912 # float red = (float) color.getRed();
4913 # float green = (float) color.getGreen();
4914 # float blue = (float) color.getBlue();
4915 # float denominator = 255.0;
4916 # Color.Builder resultBuilder =
4917 # Color
4918 # .newBuilder()
4919 # .setRed(red / denominator)
4920 # .setGreen(green / denominator)
4921 # .setBlue(blue / denominator);
4922 # int alpha = color.getAlpha();
4923 # if (alpha != 255) {
4924 # result.setAlpha(
4925 # FloatValue
4926 # .newBuilder()
4927 # .setValue(((float) alpha) / denominator)
4928 # .build());
4929 # }
4930 # return resultBuilder.build();
4931 # }
4932 # // ...
4933 #
4934 # Example (iOS / Obj-C):
4935 #
4936 # // ...
4937 # static UIColor* fromProto(Color* protocolor) {
4938 # float red = [protocolor red];
4939 # float green = [protocolor green];
4940 # float blue = [protocolor blue];
4941 # FloatValue* alpha_wrapper = [protocolor alpha];
4942 # float alpha = 1.0;
4943 # if (alpha_wrapper != nil) {
4944 # alpha = [alpha_wrapper value];
4945 # }
4946 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4947 # }
4948 #
4949 # static Color* toProto(UIColor* color) {
4950 # CGFloat red, green, blue, alpha;
4951 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4952 # return nil;
4953 # }
4954 # Color* result = [Color alloc] init];
4955 # [result setRed:red];
4956 # [result setGreen:green];
4957 # [result setBlue:blue];
4958 # if (alpha <= 0.9999) {
4959 # [result setAlpha:floatWrapperWithValue(alpha)];
4960 # }
4961 # [result autorelease];
4962 # return result;
4963 # }
4964 # // ...
4965 #
4966 # Example (JavaScript):
4967 #
4968 # // ...
4969 #
4970 # var protoToCssColor = function(rgb_color) {
4971 # var redFrac = rgb_color.red || 0.0;
4972 # var greenFrac = rgb_color.green || 0.0;
4973 # var blueFrac = rgb_color.blue || 0.0;
4974 # var red = Math.floor(redFrac * 255);
4975 # var green = Math.floor(greenFrac * 255);
4976 # var blue = Math.floor(blueFrac * 255);
4977 #
4978 # if (!('alpha' in rgb_color)) {
4979 # return rgbToCssColor_(red, green, blue);
4980 # }
4981 #
4982 # var alphaFrac = rgb_color.alpha.value || 0.0;
4983 # var rgbParams = [red, green, blue].join(',');
4984 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4985 # };
4986 #
4987 # var rgbToCssColor_ = function(red, green, blue) {
4988 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4989 # var hexString = rgbNumber.toString(16);
4990 # var missingZeros = 6 - hexString.length;
4991 # var resultBuilder = ['#'];
4992 # for (var i = 0; i < missingZeros; i++) {
4993 # resultBuilder.push('0');
4994 # }
4995 # resultBuilder.push(hexString);
4996 # return resultBuilder.join('');
4997 # };
4998 #
4999 # // ...
5000 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5001 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5002 # the final pixel color is defined by the equation:
5003 #
5004 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5005 #
5006 # This means that a value of 1.0 corresponds to a solid color, whereas
5007 # a value of 0.0 corresponds to a completely transparent color. This
5008 # uses a wrapper message rather than a simple float scalar so that it is
5009 # possible to distinguish between a default value and the value being unset.
5010 # If omitted, this color object is to be rendered as a solid color
5011 # (as if the alpha value had been explicitly given with a value of 1.0).
5012 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5013 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5014 },
5015 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005016 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005017 "style": "A String", # The style of the border.
5018 },
5019 "right": { # A border along a cell. # The right border of the cell.
5020 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
5021 # for simplicity of conversion to/from color representations in various
5022 # languages over compactness; for example, the fields of this representation
5023 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5024 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5025 # method in iOS; and, with just a little work, it can be easily formatted into
5026 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5027 #
5028 # Example (Java):
5029 #
5030 # import com.google.type.Color;
5031 #
5032 # // ...
5033 # public static java.awt.Color fromProto(Color protocolor) {
5034 # float alpha = protocolor.hasAlpha()
5035 # ? protocolor.getAlpha().getValue()
5036 # : 1.0;
5037 #
5038 # return new java.awt.Color(
5039 # protocolor.getRed(),
5040 # protocolor.getGreen(),
5041 # protocolor.getBlue(),
5042 # alpha);
5043 # }
5044 #
5045 # public static Color toProto(java.awt.Color color) {
5046 # float red = (float) color.getRed();
5047 # float green = (float) color.getGreen();
5048 # float blue = (float) color.getBlue();
5049 # float denominator = 255.0;
5050 # Color.Builder resultBuilder =
5051 # Color
5052 # .newBuilder()
5053 # .setRed(red / denominator)
5054 # .setGreen(green / denominator)
5055 # .setBlue(blue / denominator);
5056 # int alpha = color.getAlpha();
5057 # if (alpha != 255) {
5058 # result.setAlpha(
5059 # FloatValue
5060 # .newBuilder()
5061 # .setValue(((float) alpha) / denominator)
5062 # .build());
5063 # }
5064 # return resultBuilder.build();
5065 # }
5066 # // ...
5067 #
5068 # Example (iOS / Obj-C):
5069 #
5070 # // ...
5071 # static UIColor* fromProto(Color* protocolor) {
5072 # float red = [protocolor red];
5073 # float green = [protocolor green];
5074 # float blue = [protocolor blue];
5075 # FloatValue* alpha_wrapper = [protocolor alpha];
5076 # float alpha = 1.0;
5077 # if (alpha_wrapper != nil) {
5078 # alpha = [alpha_wrapper value];
5079 # }
5080 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5081 # }
5082 #
5083 # static Color* toProto(UIColor* color) {
5084 # CGFloat red, green, blue, alpha;
5085 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5086 # return nil;
5087 # }
5088 # Color* result = [Color alloc] init];
5089 # [result setRed:red];
5090 # [result setGreen:green];
5091 # [result setBlue:blue];
5092 # if (alpha <= 0.9999) {
5093 # [result setAlpha:floatWrapperWithValue(alpha)];
5094 # }
5095 # [result autorelease];
5096 # return result;
5097 # }
5098 # // ...
5099 #
5100 # Example (JavaScript):
5101 #
5102 # // ...
5103 #
5104 # var protoToCssColor = function(rgb_color) {
5105 # var redFrac = rgb_color.red || 0.0;
5106 # var greenFrac = rgb_color.green || 0.0;
5107 # var blueFrac = rgb_color.blue || 0.0;
5108 # var red = Math.floor(redFrac * 255);
5109 # var green = Math.floor(greenFrac * 255);
5110 # var blue = Math.floor(blueFrac * 255);
5111 #
5112 # if (!('alpha' in rgb_color)) {
5113 # return rgbToCssColor_(red, green, blue);
5114 # }
5115 #
5116 # var alphaFrac = rgb_color.alpha.value || 0.0;
5117 # var rgbParams = [red, green, blue].join(',');
5118 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5119 # };
5120 #
5121 # var rgbToCssColor_ = function(red, green, blue) {
5122 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5123 # var hexString = rgbNumber.toString(16);
5124 # var missingZeros = 6 - hexString.length;
5125 # var resultBuilder = ['#'];
5126 # for (var i = 0; i < missingZeros; i++) {
5127 # resultBuilder.push('0');
5128 # }
5129 # resultBuilder.push(hexString);
5130 # return resultBuilder.join('');
5131 # };
5132 #
5133 # // ...
5134 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5135 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5136 # the final pixel color is defined by the equation:
5137 #
5138 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5139 #
5140 # This means that a value of 1.0 corresponds to a solid color, whereas
5141 # a value of 0.0 corresponds to a completely transparent color. This
5142 # uses a wrapper message rather than a simple float scalar so that it is
5143 # possible to distinguish between a default value and the value being unset.
5144 # If omitted, this color object is to be rendered as a solid color
5145 # (as if the alpha value had been explicitly given with a value of 1.0).
5146 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5147 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5148 },
5149 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005150 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005151 "style": "A String", # The style of the border.
5152 },
5153 "bottom": { # A border along a cell. # The bottom border of the cell.
5154 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
5155 # for simplicity of conversion to/from color representations in various
5156 # languages over compactness; for example, the fields of this representation
5157 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5158 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5159 # method in iOS; and, with just a little work, it can be easily formatted into
5160 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5161 #
5162 # Example (Java):
5163 #
5164 # import com.google.type.Color;
5165 #
5166 # // ...
5167 # public static java.awt.Color fromProto(Color protocolor) {
5168 # float alpha = protocolor.hasAlpha()
5169 # ? protocolor.getAlpha().getValue()
5170 # : 1.0;
5171 #
5172 # return new java.awt.Color(
5173 # protocolor.getRed(),
5174 # protocolor.getGreen(),
5175 # protocolor.getBlue(),
5176 # alpha);
5177 # }
5178 #
5179 # public static Color toProto(java.awt.Color color) {
5180 # float red = (float) color.getRed();
5181 # float green = (float) color.getGreen();
5182 # float blue = (float) color.getBlue();
5183 # float denominator = 255.0;
5184 # Color.Builder resultBuilder =
5185 # Color
5186 # .newBuilder()
5187 # .setRed(red / denominator)
5188 # .setGreen(green / denominator)
5189 # .setBlue(blue / denominator);
5190 # int alpha = color.getAlpha();
5191 # if (alpha != 255) {
5192 # result.setAlpha(
5193 # FloatValue
5194 # .newBuilder()
5195 # .setValue(((float) alpha) / denominator)
5196 # .build());
5197 # }
5198 # return resultBuilder.build();
5199 # }
5200 # // ...
5201 #
5202 # Example (iOS / Obj-C):
5203 #
5204 # // ...
5205 # static UIColor* fromProto(Color* protocolor) {
5206 # float red = [protocolor red];
5207 # float green = [protocolor green];
5208 # float blue = [protocolor blue];
5209 # FloatValue* alpha_wrapper = [protocolor alpha];
5210 # float alpha = 1.0;
5211 # if (alpha_wrapper != nil) {
5212 # alpha = [alpha_wrapper value];
5213 # }
5214 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5215 # }
5216 #
5217 # static Color* toProto(UIColor* color) {
5218 # CGFloat red, green, blue, alpha;
5219 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5220 # return nil;
5221 # }
5222 # Color* result = [Color alloc] init];
5223 # [result setRed:red];
5224 # [result setGreen:green];
5225 # [result setBlue:blue];
5226 # if (alpha <= 0.9999) {
5227 # [result setAlpha:floatWrapperWithValue(alpha)];
5228 # }
5229 # [result autorelease];
5230 # return result;
5231 # }
5232 # // ...
5233 #
5234 # Example (JavaScript):
5235 #
5236 # // ...
5237 #
5238 # var protoToCssColor = function(rgb_color) {
5239 # var redFrac = rgb_color.red || 0.0;
5240 # var greenFrac = rgb_color.green || 0.0;
5241 # var blueFrac = rgb_color.blue || 0.0;
5242 # var red = Math.floor(redFrac * 255);
5243 # var green = Math.floor(greenFrac * 255);
5244 # var blue = Math.floor(blueFrac * 255);
5245 #
5246 # if (!('alpha' in rgb_color)) {
5247 # return rgbToCssColor_(red, green, blue);
5248 # }
5249 #
5250 # var alphaFrac = rgb_color.alpha.value || 0.0;
5251 # var rgbParams = [red, green, blue].join(',');
5252 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5253 # };
5254 #
5255 # var rgbToCssColor_ = function(red, green, blue) {
5256 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5257 # var hexString = rgbNumber.toString(16);
5258 # var missingZeros = 6 - hexString.length;
5259 # var resultBuilder = ['#'];
5260 # for (var i = 0; i < missingZeros; i++) {
5261 # resultBuilder.push('0');
5262 # }
5263 # resultBuilder.push(hexString);
5264 # return resultBuilder.join('');
5265 # };
5266 #
5267 # // ...
5268 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5269 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5270 # the final pixel color is defined by the equation:
5271 #
5272 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5273 #
5274 # This means that a value of 1.0 corresponds to a solid color, whereas
5275 # a value of 0.0 corresponds to a completely transparent color. This
5276 # uses a wrapper message rather than a simple float scalar so that it is
5277 # possible to distinguish between a default value and the value being unset.
5278 # If omitted, this color object is to be rendered as a solid color
5279 # (as if the alpha value had been explicitly given with a value of 1.0).
5280 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5281 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5282 },
5283 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005284 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005285 "style": "A String", # The style of the border.
5286 },
5287 "left": { # A border along a cell. # The left border of the cell.
5288 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
5289 # for simplicity of conversion to/from color representations in various
5290 # languages over compactness; for example, the fields of this representation
5291 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5292 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5293 # method in iOS; and, with just a little work, it can be easily formatted into
5294 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5295 #
5296 # Example (Java):
5297 #
5298 # import com.google.type.Color;
5299 #
5300 # // ...
5301 # public static java.awt.Color fromProto(Color protocolor) {
5302 # float alpha = protocolor.hasAlpha()
5303 # ? protocolor.getAlpha().getValue()
5304 # : 1.0;
5305 #
5306 # return new java.awt.Color(
5307 # protocolor.getRed(),
5308 # protocolor.getGreen(),
5309 # protocolor.getBlue(),
5310 # alpha);
5311 # }
5312 #
5313 # public static Color toProto(java.awt.Color color) {
5314 # float red = (float) color.getRed();
5315 # float green = (float) color.getGreen();
5316 # float blue = (float) color.getBlue();
5317 # float denominator = 255.0;
5318 # Color.Builder resultBuilder =
5319 # Color
5320 # .newBuilder()
5321 # .setRed(red / denominator)
5322 # .setGreen(green / denominator)
5323 # .setBlue(blue / denominator);
5324 # int alpha = color.getAlpha();
5325 # if (alpha != 255) {
5326 # result.setAlpha(
5327 # FloatValue
5328 # .newBuilder()
5329 # .setValue(((float) alpha) / denominator)
5330 # .build());
5331 # }
5332 # return resultBuilder.build();
5333 # }
5334 # // ...
5335 #
5336 # Example (iOS / Obj-C):
5337 #
5338 # // ...
5339 # static UIColor* fromProto(Color* protocolor) {
5340 # float red = [protocolor red];
5341 # float green = [protocolor green];
5342 # float blue = [protocolor blue];
5343 # FloatValue* alpha_wrapper = [protocolor alpha];
5344 # float alpha = 1.0;
5345 # if (alpha_wrapper != nil) {
5346 # alpha = [alpha_wrapper value];
5347 # }
5348 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5349 # }
5350 #
5351 # static Color* toProto(UIColor* color) {
5352 # CGFloat red, green, blue, alpha;
5353 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5354 # return nil;
5355 # }
5356 # Color* result = [Color alloc] init];
5357 # [result setRed:red];
5358 # [result setGreen:green];
5359 # [result setBlue:blue];
5360 # if (alpha <= 0.9999) {
5361 # [result setAlpha:floatWrapperWithValue(alpha)];
5362 # }
5363 # [result autorelease];
5364 # return result;
5365 # }
5366 # // ...
5367 #
5368 # Example (JavaScript):
5369 #
5370 # // ...
5371 #
5372 # var protoToCssColor = function(rgb_color) {
5373 # var redFrac = rgb_color.red || 0.0;
5374 # var greenFrac = rgb_color.green || 0.0;
5375 # var blueFrac = rgb_color.blue || 0.0;
5376 # var red = Math.floor(redFrac * 255);
5377 # var green = Math.floor(greenFrac * 255);
5378 # var blue = Math.floor(blueFrac * 255);
5379 #
5380 # if (!('alpha' in rgb_color)) {
5381 # return rgbToCssColor_(red, green, blue);
5382 # }
5383 #
5384 # var alphaFrac = rgb_color.alpha.value || 0.0;
5385 # var rgbParams = [red, green, blue].join(',');
5386 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5387 # };
5388 #
5389 # var rgbToCssColor_ = function(red, green, blue) {
5390 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5391 # var hexString = rgbNumber.toString(16);
5392 # var missingZeros = 6 - hexString.length;
5393 # var resultBuilder = ['#'];
5394 # for (var i = 0; i < missingZeros; i++) {
5395 # resultBuilder.push('0');
5396 # }
5397 # resultBuilder.push(hexString);
5398 # return resultBuilder.join('');
5399 # };
5400 #
5401 # // ...
5402 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5403 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5404 # the final pixel color is defined by the equation:
5405 #
5406 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5407 #
5408 # This means that a value of 1.0 corresponds to a solid color, whereas
5409 # a value of 0.0 corresponds to a completely transparent color. This
5410 # uses a wrapper message rather than a simple float scalar so that it is
5411 # possible to distinguish between a default value and the value being unset.
5412 # If omitted, this color object is to be rendered as a solid color
5413 # (as if the alpha value had been explicitly given with a value of 1.0).
5414 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5415 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5416 },
5417 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005418 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005419 "style": "A String", # The style of the border.
5420 },
5421 },
5422 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
5423 },
5424 },
5425 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
5426 # the interpolation points listed. The format of a cell will vary
5427 # based on its contents as compared to the values of the interpolation
5428 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005429 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005430 # These pin the gradient color scale according to the color,
5431 # type and value chosen.
5432 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
5433 # for simplicity of conversion to/from color representations in various
5434 # languages over compactness; for example, the fields of this representation
5435 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5436 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5437 # method in iOS; and, with just a little work, it can be easily formatted into
5438 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5439 #
5440 # Example (Java):
5441 #
5442 # import com.google.type.Color;
5443 #
5444 # // ...
5445 # public static java.awt.Color fromProto(Color protocolor) {
5446 # float alpha = protocolor.hasAlpha()
5447 # ? protocolor.getAlpha().getValue()
5448 # : 1.0;
5449 #
5450 # return new java.awt.Color(
5451 # protocolor.getRed(),
5452 # protocolor.getGreen(),
5453 # protocolor.getBlue(),
5454 # alpha);
5455 # }
5456 #
5457 # public static Color toProto(java.awt.Color color) {
5458 # float red = (float) color.getRed();
5459 # float green = (float) color.getGreen();
5460 # float blue = (float) color.getBlue();
5461 # float denominator = 255.0;
5462 # Color.Builder resultBuilder =
5463 # Color
5464 # .newBuilder()
5465 # .setRed(red / denominator)
5466 # .setGreen(green / denominator)
5467 # .setBlue(blue / denominator);
5468 # int alpha = color.getAlpha();
5469 # if (alpha != 255) {
5470 # result.setAlpha(
5471 # FloatValue
5472 # .newBuilder()
5473 # .setValue(((float) alpha) / denominator)
5474 # .build());
5475 # }
5476 # return resultBuilder.build();
5477 # }
5478 # // ...
5479 #
5480 # Example (iOS / Obj-C):
5481 #
5482 # // ...
5483 # static UIColor* fromProto(Color* protocolor) {
5484 # float red = [protocolor red];
5485 # float green = [protocolor green];
5486 # float blue = [protocolor blue];
5487 # FloatValue* alpha_wrapper = [protocolor alpha];
5488 # float alpha = 1.0;
5489 # if (alpha_wrapper != nil) {
5490 # alpha = [alpha_wrapper value];
5491 # }
5492 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5493 # }
5494 #
5495 # static Color* toProto(UIColor* color) {
5496 # CGFloat red, green, blue, alpha;
5497 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5498 # return nil;
5499 # }
5500 # Color* result = [Color alloc] init];
5501 # [result setRed:red];
5502 # [result setGreen:green];
5503 # [result setBlue:blue];
5504 # if (alpha <= 0.9999) {
5505 # [result setAlpha:floatWrapperWithValue(alpha)];
5506 # }
5507 # [result autorelease];
5508 # return result;
5509 # }
5510 # // ...
5511 #
5512 # Example (JavaScript):
5513 #
5514 # // ...
5515 #
5516 # var protoToCssColor = function(rgb_color) {
5517 # var redFrac = rgb_color.red || 0.0;
5518 # var greenFrac = rgb_color.green || 0.0;
5519 # var blueFrac = rgb_color.blue || 0.0;
5520 # var red = Math.floor(redFrac * 255);
5521 # var green = Math.floor(greenFrac * 255);
5522 # var blue = Math.floor(blueFrac * 255);
5523 #
5524 # if (!('alpha' in rgb_color)) {
5525 # return rgbToCssColor_(red, green, blue);
5526 # }
5527 #
5528 # var alphaFrac = rgb_color.alpha.value || 0.0;
5529 # var rgbParams = [red, green, blue].join(',');
5530 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5531 # };
5532 #
5533 # var rgbToCssColor_ = function(red, green, blue) {
5534 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5535 # var hexString = rgbNumber.toString(16);
5536 # var missingZeros = 6 - hexString.length;
5537 # var resultBuilder = ['#'];
5538 # for (var i = 0; i < missingZeros; i++) {
5539 # resultBuilder.push('0');
5540 # }
5541 # resultBuilder.push(hexString);
5542 # return resultBuilder.join('');
5543 # };
5544 #
5545 # // ...
5546 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5547 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5548 # the final pixel color is defined by the equation:
5549 #
5550 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5551 #
5552 # This means that a value of 1.0 corresponds to a solid color, whereas
5553 # a value of 0.0 corresponds to a completely transparent color. This
5554 # uses a wrapper message rather than a simple float scalar so that it is
5555 # possible to distinguish between a default value and the value being unset.
5556 # If omitted, this color object is to be rendered as a solid color
5557 # (as if the alpha value had been explicitly given with a value of 1.0).
5558 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5559 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5560 },
5561 "type": "A String", # How the value should be interpreted.
5562 "value": "A String", # The value this interpolation point uses. May be a formula.
5563 # Unused if type is MIN or
5564 # MAX.
5565 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005566 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005567 # These pin the gradient color scale according to the color,
5568 # type and value chosen.
5569 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
5570 # for simplicity of conversion to/from color representations in various
5571 # languages over compactness; for example, the fields of this representation
5572 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5573 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5574 # method in iOS; and, with just a little work, it can be easily formatted into
5575 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5576 #
5577 # Example (Java):
5578 #
5579 # import com.google.type.Color;
5580 #
5581 # // ...
5582 # public static java.awt.Color fromProto(Color protocolor) {
5583 # float alpha = protocolor.hasAlpha()
5584 # ? protocolor.getAlpha().getValue()
5585 # : 1.0;
5586 #
5587 # return new java.awt.Color(
5588 # protocolor.getRed(),
5589 # protocolor.getGreen(),
5590 # protocolor.getBlue(),
5591 # alpha);
5592 # }
5593 #
5594 # public static Color toProto(java.awt.Color color) {
5595 # float red = (float) color.getRed();
5596 # float green = (float) color.getGreen();
5597 # float blue = (float) color.getBlue();
5598 # float denominator = 255.0;
5599 # Color.Builder resultBuilder =
5600 # Color
5601 # .newBuilder()
5602 # .setRed(red / denominator)
5603 # .setGreen(green / denominator)
5604 # .setBlue(blue / denominator);
5605 # int alpha = color.getAlpha();
5606 # if (alpha != 255) {
5607 # result.setAlpha(
5608 # FloatValue
5609 # .newBuilder()
5610 # .setValue(((float) alpha) / denominator)
5611 # .build());
5612 # }
5613 # return resultBuilder.build();
5614 # }
5615 # // ...
5616 #
5617 # Example (iOS / Obj-C):
5618 #
5619 # // ...
5620 # static UIColor* fromProto(Color* protocolor) {
5621 # float red = [protocolor red];
5622 # float green = [protocolor green];
5623 # float blue = [protocolor blue];
5624 # FloatValue* alpha_wrapper = [protocolor alpha];
5625 # float alpha = 1.0;
5626 # if (alpha_wrapper != nil) {
5627 # alpha = [alpha_wrapper value];
5628 # }
5629 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5630 # }
5631 #
5632 # static Color* toProto(UIColor* color) {
5633 # CGFloat red, green, blue, alpha;
5634 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5635 # return nil;
5636 # }
5637 # Color* result = [Color alloc] init];
5638 # [result setRed:red];
5639 # [result setGreen:green];
5640 # [result setBlue:blue];
5641 # if (alpha <= 0.9999) {
5642 # [result setAlpha:floatWrapperWithValue(alpha)];
5643 # }
5644 # [result autorelease];
5645 # return result;
5646 # }
5647 # // ...
5648 #
5649 # Example (JavaScript):
5650 #
5651 # // ...
5652 #
5653 # var protoToCssColor = function(rgb_color) {
5654 # var redFrac = rgb_color.red || 0.0;
5655 # var greenFrac = rgb_color.green || 0.0;
5656 # var blueFrac = rgb_color.blue || 0.0;
5657 # var red = Math.floor(redFrac * 255);
5658 # var green = Math.floor(greenFrac * 255);
5659 # var blue = Math.floor(blueFrac * 255);
5660 #
5661 # if (!('alpha' in rgb_color)) {
5662 # return rgbToCssColor_(red, green, blue);
5663 # }
5664 #
5665 # var alphaFrac = rgb_color.alpha.value || 0.0;
5666 # var rgbParams = [red, green, blue].join(',');
5667 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5668 # };
5669 #
5670 # var rgbToCssColor_ = function(red, green, blue) {
5671 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5672 # var hexString = rgbNumber.toString(16);
5673 # var missingZeros = 6 - hexString.length;
5674 # var resultBuilder = ['#'];
5675 # for (var i = 0; i < missingZeros; i++) {
5676 # resultBuilder.push('0');
5677 # }
5678 # resultBuilder.push(hexString);
5679 # return resultBuilder.join('');
5680 # };
5681 #
5682 # // ...
5683 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5684 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5685 # the final pixel color is defined by the equation:
5686 #
5687 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5688 #
5689 # This means that a value of 1.0 corresponds to a solid color, whereas
5690 # a value of 0.0 corresponds to a completely transparent color. This
5691 # uses a wrapper message rather than a simple float scalar so that it is
5692 # possible to distinguish between a default value and the value being unset.
5693 # If omitted, this color object is to be rendered as a solid color
5694 # (as if the alpha value had been explicitly given with a value of 1.0).
5695 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5696 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5697 },
5698 "type": "A String", # How the value should be interpreted.
5699 "value": "A String", # The value this interpolation point uses. May be a formula.
5700 # Unused if type is MIN or
5701 # MAX.
5702 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005703 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005704 # These pin the gradient color scale according to the color,
5705 # type and value chosen.
5706 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
5707 # for simplicity of conversion to/from color representations in various
5708 # languages over compactness; for example, the fields of this representation
5709 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5710 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5711 # method in iOS; and, with just a little work, it can be easily formatted into
5712 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5713 #
5714 # Example (Java):
5715 #
5716 # import com.google.type.Color;
5717 #
5718 # // ...
5719 # public static java.awt.Color fromProto(Color protocolor) {
5720 # float alpha = protocolor.hasAlpha()
5721 # ? protocolor.getAlpha().getValue()
5722 # : 1.0;
5723 #
5724 # return new java.awt.Color(
5725 # protocolor.getRed(),
5726 # protocolor.getGreen(),
5727 # protocolor.getBlue(),
5728 # alpha);
5729 # }
5730 #
5731 # public static Color toProto(java.awt.Color color) {
5732 # float red = (float) color.getRed();
5733 # float green = (float) color.getGreen();
5734 # float blue = (float) color.getBlue();
5735 # float denominator = 255.0;
5736 # Color.Builder resultBuilder =
5737 # Color
5738 # .newBuilder()
5739 # .setRed(red / denominator)
5740 # .setGreen(green / denominator)
5741 # .setBlue(blue / denominator);
5742 # int alpha = color.getAlpha();
5743 # if (alpha != 255) {
5744 # result.setAlpha(
5745 # FloatValue
5746 # .newBuilder()
5747 # .setValue(((float) alpha) / denominator)
5748 # .build());
5749 # }
5750 # return resultBuilder.build();
5751 # }
5752 # // ...
5753 #
5754 # Example (iOS / Obj-C):
5755 #
5756 # // ...
5757 # static UIColor* fromProto(Color* protocolor) {
5758 # float red = [protocolor red];
5759 # float green = [protocolor green];
5760 # float blue = [protocolor blue];
5761 # FloatValue* alpha_wrapper = [protocolor alpha];
5762 # float alpha = 1.0;
5763 # if (alpha_wrapper != nil) {
5764 # alpha = [alpha_wrapper value];
5765 # }
5766 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5767 # }
5768 #
5769 # static Color* toProto(UIColor* color) {
5770 # CGFloat red, green, blue, alpha;
5771 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5772 # return nil;
5773 # }
5774 # Color* result = [Color alloc] init];
5775 # [result setRed:red];
5776 # [result setGreen:green];
5777 # [result setBlue:blue];
5778 # if (alpha <= 0.9999) {
5779 # [result setAlpha:floatWrapperWithValue(alpha)];
5780 # }
5781 # [result autorelease];
5782 # return result;
5783 # }
5784 # // ...
5785 #
5786 # Example (JavaScript):
5787 #
5788 # // ...
5789 #
5790 # var protoToCssColor = function(rgb_color) {
5791 # var redFrac = rgb_color.red || 0.0;
5792 # var greenFrac = rgb_color.green || 0.0;
5793 # var blueFrac = rgb_color.blue || 0.0;
5794 # var red = Math.floor(redFrac * 255);
5795 # var green = Math.floor(greenFrac * 255);
5796 # var blue = Math.floor(blueFrac * 255);
5797 #
5798 # if (!('alpha' in rgb_color)) {
5799 # return rgbToCssColor_(red, green, blue);
5800 # }
5801 #
5802 # var alphaFrac = rgb_color.alpha.value || 0.0;
5803 # var rgbParams = [red, green, blue].join(',');
5804 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5805 # };
5806 #
5807 # var rgbToCssColor_ = function(red, green, blue) {
5808 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5809 # var hexString = rgbNumber.toString(16);
5810 # var missingZeros = 6 - hexString.length;
5811 # var resultBuilder = ['#'];
5812 # for (var i = 0; i < missingZeros; i++) {
5813 # resultBuilder.push('0');
5814 # }
5815 # resultBuilder.push(hexString);
5816 # return resultBuilder.join('');
5817 # };
5818 #
5819 # // ...
5820 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5821 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5822 # the final pixel color is defined by the equation:
5823 #
5824 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5825 #
5826 # This means that a value of 1.0 corresponds to a solid color, whereas
5827 # a value of 0.0 corresponds to a completely transparent color. This
5828 # uses a wrapper message rather than a simple float scalar so that it is
5829 # possible to distinguish between a default value and the value being unset.
5830 # If omitted, this color object is to be rendered as a solid color
5831 # (as if the alpha value had been explicitly given with a value of 1.0).
5832 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5833 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5834 },
5835 "type": "A String", # How the value should be interpreted.
5836 "value": "A String", # The value this interpolation point uses. May be a formula.
5837 # Unused if type is MIN or
5838 # MAX.
5839 },
5840 },
5841 },
5842 },
5843 "repeatCell": { # Updates all cells in the range to the values in the given Cell object. # Repeats a single cell across a range.
5844 # Only the fields listed in the fields field are updated; others are
5845 # unchanged.
5846 #
5847 # If writing a cell with a formula, the formula's ranges will automatically
5848 # increment for each field in the range.
5849 # For example, if writing a cell with formula `=A1` into range B2:C4,
5850 # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`,
5851 # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`.
5852 #
5853 # To keep the formula's ranges static, use the `$` indicator.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005854 # For example, use the formula `=$A$1` to prevent both the row and the
5855 # column from incrementing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005856 "cell": { # Data about a specific cell. # The data to write.
5857 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
5858 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005859 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005860 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005861 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005862 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
5863 # or vertically (as rows).
5864 "rows": [ # Each row grouping in the pivot table.
5865 { # A single grouping (either row or column) in a pivot table.
5866 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
5867 "valueMetadata": [ # Metadata about values in the grouping.
5868 { # Metadata about a value in a pivot grouping.
5869 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
5870 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
5871 # (Note that formulaValue is not valid,
5872 # because the values will be calculated.)
5873 "numberValue": 3.14, # Represents a double value.
5874 # Note: Dates, Times and DateTimes are represented as doubles in
5875 # "serial number" format.
5876 "boolValue": True or False, # Represents a boolean value.
5877 "formulaValue": "A String", # Represents a formula.
5878 "stringValue": "A String", # Represents a string value.
5879 # Leading single quotes are not included. For example, if the user typed
5880 # `'123` into the UI, this would be represented as a `stringValue` of
5881 # `"123"`.
5882 "errorValue": { # An error in a cell. # Represents an error.
5883 # This field is read-only.
5884 "message": "A String", # A message with more information about the error
5885 # (in the spreadsheet's locale).
5886 "type": "A String", # The type of error.
5887 },
5888 },
5889 },
5890 ],
5891 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
5892 # If not specified, sorting is alphabetical by this group's values.
5893 "buckets": [ # Determines the bucket from which values are chosen to sort.
5894 #
5895 # For example, in a pivot table with one row group & two column groups,
5896 # the row group can list up to two values. The first value corresponds
5897 # to a value within the first column group, and the second value
5898 # corresponds to a value in the second column group. If no values
5899 # are listed, this would indicate that the row should be sorted according
5900 # to the "Grand Total" over the column groups. If a single value is listed,
5901 # this would correspond to using the "Total" of that bucket.
5902 { # The kinds of value that a cell in a spreadsheet can have.
5903 "numberValue": 3.14, # Represents a double value.
5904 # Note: Dates, Times and DateTimes are represented as doubles in
5905 # "serial number" format.
5906 "boolValue": True or False, # Represents a boolean value.
5907 "formulaValue": "A String", # Represents a formula.
5908 "stringValue": "A String", # Represents a string value.
5909 # Leading single quotes are not included. For example, if the user typed
5910 # `'123` into the UI, this would be represented as a `stringValue` of
5911 # `"123"`.
5912 "errorValue": { # An error in a cell. # Represents an error.
5913 # This field is read-only.
5914 "message": "A String", # A message with more information about the error
5915 # (in the spreadsheet's locale).
5916 "type": "A String", # The type of error.
5917 },
5918 },
5919 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005920 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005921 # grouping should be sorted by.
5922 },
5923 "sortOrder": "A String", # The order the values in this group should be sorted.
5924 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
5925 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005926 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005927 # means this group refers to column `C`, whereas the offset `1` would refer
5928 # to column `D`.
5929 },
5930 ],
5931 "source": { # A range on a sheet. # The range the pivot table is reading data from.
5932 # All indexes are zero-based.
5933 # Indexes are half open, e.g the start index is inclusive
5934 # and the end index is exclusive -- [start_index, end_index).
5935 # Missing indexes indicate the range is unbounded on that side.
5936 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005937 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005938 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005939 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005940 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005941 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005942 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005943 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005944 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005945 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005946 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005947 # `Sheet1!A:B == sheet_id: 0,
5948 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005949 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005950 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005951 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005952 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005953 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005954 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005955 #
5956 # The start index must always be less than or equal to the end index.
5957 # If the start index equals the end index, then the range is empty.
5958 # Empty ranges are typically not meaningful and are usually rendered in the
5959 # UI as `#REF!`.
5960 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
5961 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
5962 "sheetId": 42, # The sheet this range is on.
5963 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
5964 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
5965 },
5966 "values": [ # A list of values to include in the pivot table.
5967 { # The definition of how a value in a pivot table should be calculated.
5968 "formula": "A String", # A custom formula to calculate the value. The formula must start
5969 # with an `=` character.
5970 "summarizeFunction": "A String", # A function to summarize the value.
5971 # If formula is set, the only supported values are
5972 # SUM and
5973 # CUSTOM.
5974 # If sourceColumnOffset is set, then `CUSTOM`
5975 # is not supported.
5976 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
5977 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005978 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005979 # means this value refers to column `C`, whereas the offset `1` would
5980 # refer to column `D`.
5981 "name": "A String", # A name to use for the value. This is only used if formula was set.
5982 # Otherwise, the column name is used.
5983 },
5984 ],
5985 "criteria": { # An optional mapping of filters per source column offset.
5986 #
5987 # The filters will be applied before aggregating data into the pivot table.
5988 # The map's key is the column offset of the source range that you want to
5989 # filter, and the value is the criteria for that column.
5990 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005991 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005992 # for column `C`, whereas the key `1` is for column `D`.
5993 "a_key": { # Criteria for showing/hiding rows in a pivot table.
5994 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
5995 "A String",
5996 ],
5997 },
5998 },
5999 "columns": [ # Each column grouping in the pivot table.
6000 { # A single grouping (either row or column) in a pivot table.
6001 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
6002 "valueMetadata": [ # Metadata about values in the grouping.
6003 { # Metadata about a value in a pivot grouping.
6004 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
6005 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
6006 # (Note that formulaValue is not valid,
6007 # because the values will be calculated.)
6008 "numberValue": 3.14, # Represents a double value.
6009 # Note: Dates, Times and DateTimes are represented as doubles in
6010 # "serial number" format.
6011 "boolValue": True or False, # Represents a boolean value.
6012 "formulaValue": "A String", # Represents a formula.
6013 "stringValue": "A String", # Represents a string value.
6014 # Leading single quotes are not included. For example, if the user typed
6015 # `'123` into the UI, this would be represented as a `stringValue` of
6016 # `"123"`.
6017 "errorValue": { # An error in a cell. # Represents an error.
6018 # This field is read-only.
6019 "message": "A String", # A message with more information about the error
6020 # (in the spreadsheet's locale).
6021 "type": "A String", # The type of error.
6022 },
6023 },
6024 },
6025 ],
6026 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
6027 # If not specified, sorting is alphabetical by this group's values.
6028 "buckets": [ # Determines the bucket from which values are chosen to sort.
6029 #
6030 # For example, in a pivot table with one row group & two column groups,
6031 # the row group can list up to two values. The first value corresponds
6032 # to a value within the first column group, and the second value
6033 # corresponds to a value in the second column group. If no values
6034 # are listed, this would indicate that the row should be sorted according
6035 # to the "Grand Total" over the column groups. If a single value is listed,
6036 # this would correspond to using the "Total" of that bucket.
6037 { # The kinds of value that a cell in a spreadsheet can have.
6038 "numberValue": 3.14, # Represents a double value.
6039 # Note: Dates, Times and DateTimes are represented as doubles in
6040 # "serial number" format.
6041 "boolValue": True or False, # Represents a boolean value.
6042 "formulaValue": "A String", # Represents a formula.
6043 "stringValue": "A String", # Represents a string value.
6044 # Leading single quotes are not included. For example, if the user typed
6045 # `'123` into the UI, this would be represented as a `stringValue` of
6046 # `"123"`.
6047 "errorValue": { # An error in a cell. # Represents an error.
6048 # This field is read-only.
6049 "message": "A String", # A message with more information about the error
6050 # (in the spreadsheet's locale).
6051 "type": "A String", # The type of error.
6052 },
6053 },
6054 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006055 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006056 # grouping should be sorted by.
6057 },
6058 "sortOrder": "A String", # The order the values in this group should be sorted.
6059 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
6060 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006061 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006062 # means this group refers to column `C`, whereas the offset `1` would refer
6063 # to column `D`.
6064 },
6065 ],
6066 },
6067 "hyperlink": "A String", # A hyperlink this cell points to, if any.
6068 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
6069 "effectiveValue": { # The kinds of value that a cell in a spreadsheet can have. # The effective value of the cell. For cells with formulas, this will be
6070 # the calculated value. For cells with literals, this will be
6071 # the same as the user_entered_value.
6072 # This field is read-only.
6073 "numberValue": 3.14, # Represents a double value.
6074 # Note: Dates, Times and DateTimes are represented as doubles in
6075 # "serial number" format.
6076 "boolValue": True or False, # Represents a boolean value.
6077 "formulaValue": "A String", # Represents a formula.
6078 "stringValue": "A String", # Represents a string value.
6079 # Leading single quotes are not included. For example, if the user typed
6080 # `'123` into the UI, this would be represented as a `stringValue` of
6081 # `"123"`.
6082 "errorValue": { # An error in a cell. # Represents an error.
6083 # This field is read-only.
6084 "message": "A String", # A message with more information about the error
6085 # (in the spreadsheet's locale).
6086 "type": "A String", # The type of error.
6087 },
6088 },
6089 "formattedValue": "A String", # The formatted value of the cell.
6090 # This is the value as it's shown to the user.
6091 # This field is read-only.
6092 "userEnteredValue": { # The kinds of value that a cell in a spreadsheet can have. # The value the user entered in the cell. e.g, `1234`, `'Hello'`, or `=NOW()`
6093 # Note: Dates, Times and DateTimes are represented as doubles in
6094 # serial number format.
6095 "numberValue": 3.14, # Represents a double value.
6096 # Note: Dates, Times and DateTimes are represented as doubles in
6097 # "serial number" format.
6098 "boolValue": True or False, # Represents a boolean value.
6099 "formulaValue": "A String", # Represents a formula.
6100 "stringValue": "A String", # Represents a string value.
6101 # Leading single quotes are not included. For example, if the user typed
6102 # `'123` into the UI, this would be represented as a `stringValue` of
6103 # `"123"`.
6104 "errorValue": { # An error in a cell. # Represents an error.
6105 # This field is read-only.
6106 "message": "A String", # A message with more information about the error
6107 # (in the spreadsheet's locale).
6108 "type": "A String", # The type of error.
6109 },
6110 },
6111 "note": "A String", # Any note on the cell.
6112 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
6113 # This includes the results of applying any conditional formatting and,
6114 # if the cell contains a formula, the computed number format.
6115 # If the effective format is the default format, effective format will
6116 # not be written.
6117 # This field is read-only.
6118 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006119 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
6120 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006121 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006122 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006123 },
6124 "textDirection": "A String", # The direction of the text in the cell.
6125 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
6126 # When updating padding, every field must be specified.
6127 "top": 42, # The top padding of the cell.
6128 "right": 42, # The right padding of the cell.
6129 "bottom": 42, # The bottom padding of the cell.
6130 "left": 42, # The left padding of the cell.
6131 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006132 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006133 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
6134 # for simplicity of conversion to/from color representations in various
6135 # languages over compactness; for example, the fields of this representation
6136 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6137 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6138 # method in iOS; and, with just a little work, it can be easily formatted into
6139 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6140 #
6141 # Example (Java):
6142 #
6143 # import com.google.type.Color;
6144 #
6145 # // ...
6146 # public static java.awt.Color fromProto(Color protocolor) {
6147 # float alpha = protocolor.hasAlpha()
6148 # ? protocolor.getAlpha().getValue()
6149 # : 1.0;
6150 #
6151 # return new java.awt.Color(
6152 # protocolor.getRed(),
6153 # protocolor.getGreen(),
6154 # protocolor.getBlue(),
6155 # alpha);
6156 # }
6157 #
6158 # public static Color toProto(java.awt.Color color) {
6159 # float red = (float) color.getRed();
6160 # float green = (float) color.getGreen();
6161 # float blue = (float) color.getBlue();
6162 # float denominator = 255.0;
6163 # Color.Builder resultBuilder =
6164 # Color
6165 # .newBuilder()
6166 # .setRed(red / denominator)
6167 # .setGreen(green / denominator)
6168 # .setBlue(blue / denominator);
6169 # int alpha = color.getAlpha();
6170 # if (alpha != 255) {
6171 # result.setAlpha(
6172 # FloatValue
6173 # .newBuilder()
6174 # .setValue(((float) alpha) / denominator)
6175 # .build());
6176 # }
6177 # return resultBuilder.build();
6178 # }
6179 # // ...
6180 #
6181 # Example (iOS / Obj-C):
6182 #
6183 # // ...
6184 # static UIColor* fromProto(Color* protocolor) {
6185 # float red = [protocolor red];
6186 # float green = [protocolor green];
6187 # float blue = [protocolor blue];
6188 # FloatValue* alpha_wrapper = [protocolor alpha];
6189 # float alpha = 1.0;
6190 # if (alpha_wrapper != nil) {
6191 # alpha = [alpha_wrapper value];
6192 # }
6193 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6194 # }
6195 #
6196 # static Color* toProto(UIColor* color) {
6197 # CGFloat red, green, blue, alpha;
6198 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6199 # return nil;
6200 # }
6201 # Color* result = [Color alloc] init];
6202 # [result setRed:red];
6203 # [result setGreen:green];
6204 # [result setBlue:blue];
6205 # if (alpha <= 0.9999) {
6206 # [result setAlpha:floatWrapperWithValue(alpha)];
6207 # }
6208 # [result autorelease];
6209 # return result;
6210 # }
6211 # // ...
6212 #
6213 # Example (JavaScript):
6214 #
6215 # // ...
6216 #
6217 # var protoToCssColor = function(rgb_color) {
6218 # var redFrac = rgb_color.red || 0.0;
6219 # var greenFrac = rgb_color.green || 0.0;
6220 # var blueFrac = rgb_color.blue || 0.0;
6221 # var red = Math.floor(redFrac * 255);
6222 # var green = Math.floor(greenFrac * 255);
6223 # var blue = Math.floor(blueFrac * 255);
6224 #
6225 # if (!('alpha' in rgb_color)) {
6226 # return rgbToCssColor_(red, green, blue);
6227 # }
6228 #
6229 # var alphaFrac = rgb_color.alpha.value || 0.0;
6230 # var rgbParams = [red, green, blue].join(',');
6231 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6232 # };
6233 #
6234 # var rgbToCssColor_ = function(red, green, blue) {
6235 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6236 # var hexString = rgbNumber.toString(16);
6237 # var missingZeros = 6 - hexString.length;
6238 # var resultBuilder = ['#'];
6239 # for (var i = 0; i < missingZeros; i++) {
6240 # resultBuilder.push('0');
6241 # }
6242 # resultBuilder.push(hexString);
6243 # return resultBuilder.join('');
6244 # };
6245 #
6246 # // ...
6247 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6248 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6249 # the final pixel color is defined by the equation:
6250 #
6251 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6252 #
6253 # This means that a value of 1.0 corresponds to a solid color, whereas
6254 # a value of 0.0 corresponds to a completely transparent color. This
6255 # uses a wrapper message rather than a simple float scalar so that it is
6256 # possible to distinguish between a default value and the value being unset.
6257 # If omitted, this color object is to be rendered as a solid color
6258 # (as if the alpha value had been explicitly given with a value of 1.0).
6259 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6260 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6261 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006262 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006263 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
6264 # Absent values indicate that the field isn't specified.
6265 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
6266 # for simplicity of conversion to/from color representations in various
6267 # languages over compactness; for example, the fields of this representation
6268 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6269 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6270 # method in iOS; and, with just a little work, it can be easily formatted into
6271 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6272 #
6273 # Example (Java):
6274 #
6275 # import com.google.type.Color;
6276 #
6277 # // ...
6278 # public static java.awt.Color fromProto(Color protocolor) {
6279 # float alpha = protocolor.hasAlpha()
6280 # ? protocolor.getAlpha().getValue()
6281 # : 1.0;
6282 #
6283 # return new java.awt.Color(
6284 # protocolor.getRed(),
6285 # protocolor.getGreen(),
6286 # protocolor.getBlue(),
6287 # alpha);
6288 # }
6289 #
6290 # public static Color toProto(java.awt.Color color) {
6291 # float red = (float) color.getRed();
6292 # float green = (float) color.getGreen();
6293 # float blue = (float) color.getBlue();
6294 # float denominator = 255.0;
6295 # Color.Builder resultBuilder =
6296 # Color
6297 # .newBuilder()
6298 # .setRed(red / denominator)
6299 # .setGreen(green / denominator)
6300 # .setBlue(blue / denominator);
6301 # int alpha = color.getAlpha();
6302 # if (alpha != 255) {
6303 # result.setAlpha(
6304 # FloatValue
6305 # .newBuilder()
6306 # .setValue(((float) alpha) / denominator)
6307 # .build());
6308 # }
6309 # return resultBuilder.build();
6310 # }
6311 # // ...
6312 #
6313 # Example (iOS / Obj-C):
6314 #
6315 # // ...
6316 # static UIColor* fromProto(Color* protocolor) {
6317 # float red = [protocolor red];
6318 # float green = [protocolor green];
6319 # float blue = [protocolor blue];
6320 # FloatValue* alpha_wrapper = [protocolor alpha];
6321 # float alpha = 1.0;
6322 # if (alpha_wrapper != nil) {
6323 # alpha = [alpha_wrapper value];
6324 # }
6325 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6326 # }
6327 #
6328 # static Color* toProto(UIColor* color) {
6329 # CGFloat red, green, blue, alpha;
6330 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6331 # return nil;
6332 # }
6333 # Color* result = [Color alloc] init];
6334 # [result setRed:red];
6335 # [result setGreen:green];
6336 # [result setBlue:blue];
6337 # if (alpha <= 0.9999) {
6338 # [result setAlpha:floatWrapperWithValue(alpha)];
6339 # }
6340 # [result autorelease];
6341 # return result;
6342 # }
6343 # // ...
6344 #
6345 # Example (JavaScript):
6346 #
6347 # // ...
6348 #
6349 # var protoToCssColor = function(rgb_color) {
6350 # var redFrac = rgb_color.red || 0.0;
6351 # var greenFrac = rgb_color.green || 0.0;
6352 # var blueFrac = rgb_color.blue || 0.0;
6353 # var red = Math.floor(redFrac * 255);
6354 # var green = Math.floor(greenFrac * 255);
6355 # var blue = Math.floor(blueFrac * 255);
6356 #
6357 # if (!('alpha' in rgb_color)) {
6358 # return rgbToCssColor_(red, green, blue);
6359 # }
6360 #
6361 # var alphaFrac = rgb_color.alpha.value || 0.0;
6362 # var rgbParams = [red, green, blue].join(',');
6363 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6364 # };
6365 #
6366 # var rgbToCssColor_ = function(red, green, blue) {
6367 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6368 # var hexString = rgbNumber.toString(16);
6369 # var missingZeros = 6 - hexString.length;
6370 # var resultBuilder = ['#'];
6371 # for (var i = 0; i < missingZeros; i++) {
6372 # resultBuilder.push('0');
6373 # }
6374 # resultBuilder.push(hexString);
6375 # return resultBuilder.join('');
6376 # };
6377 #
6378 # // ...
6379 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6380 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6381 # the final pixel color is defined by the equation:
6382 #
6383 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6384 #
6385 # This means that a value of 1.0 corresponds to a solid color, whereas
6386 # a value of 0.0 corresponds to a completely transparent color. This
6387 # uses a wrapper message rather than a simple float scalar so that it is
6388 # possible to distinguish between a default value and the value being unset.
6389 # If omitted, this color object is to be rendered as a solid color
6390 # (as if the alpha value had been explicitly given with a value of 1.0).
6391 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6392 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6393 },
6394 "bold": True or False, # True if the text is bold.
6395 "strikethrough": True or False, # True if the text has a strikethrough.
6396 "fontFamily": "A String", # The font family.
6397 "fontSize": 42, # The size of the font.
6398 "italic": True or False, # True if the text is italicized.
6399 "underline": True or False, # True if the text is underlined.
6400 },
6401 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
6402 "borders": { # The borders of the cell. # The borders of the cell.
6403 "top": { # A border along a cell. # The top border of the cell.
6404 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
6405 # for simplicity of conversion to/from color representations in various
6406 # languages over compactness; for example, the fields of this representation
6407 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6408 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6409 # method in iOS; and, with just a little work, it can be easily formatted into
6410 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6411 #
6412 # Example (Java):
6413 #
6414 # import com.google.type.Color;
6415 #
6416 # // ...
6417 # public static java.awt.Color fromProto(Color protocolor) {
6418 # float alpha = protocolor.hasAlpha()
6419 # ? protocolor.getAlpha().getValue()
6420 # : 1.0;
6421 #
6422 # return new java.awt.Color(
6423 # protocolor.getRed(),
6424 # protocolor.getGreen(),
6425 # protocolor.getBlue(),
6426 # alpha);
6427 # }
6428 #
6429 # public static Color toProto(java.awt.Color color) {
6430 # float red = (float) color.getRed();
6431 # float green = (float) color.getGreen();
6432 # float blue = (float) color.getBlue();
6433 # float denominator = 255.0;
6434 # Color.Builder resultBuilder =
6435 # Color
6436 # .newBuilder()
6437 # .setRed(red / denominator)
6438 # .setGreen(green / denominator)
6439 # .setBlue(blue / denominator);
6440 # int alpha = color.getAlpha();
6441 # if (alpha != 255) {
6442 # result.setAlpha(
6443 # FloatValue
6444 # .newBuilder()
6445 # .setValue(((float) alpha) / denominator)
6446 # .build());
6447 # }
6448 # return resultBuilder.build();
6449 # }
6450 # // ...
6451 #
6452 # Example (iOS / Obj-C):
6453 #
6454 # // ...
6455 # static UIColor* fromProto(Color* protocolor) {
6456 # float red = [protocolor red];
6457 # float green = [protocolor green];
6458 # float blue = [protocolor blue];
6459 # FloatValue* alpha_wrapper = [protocolor alpha];
6460 # float alpha = 1.0;
6461 # if (alpha_wrapper != nil) {
6462 # alpha = [alpha_wrapper value];
6463 # }
6464 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6465 # }
6466 #
6467 # static Color* toProto(UIColor* color) {
6468 # CGFloat red, green, blue, alpha;
6469 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6470 # return nil;
6471 # }
6472 # Color* result = [Color alloc] init];
6473 # [result setRed:red];
6474 # [result setGreen:green];
6475 # [result setBlue:blue];
6476 # if (alpha <= 0.9999) {
6477 # [result setAlpha:floatWrapperWithValue(alpha)];
6478 # }
6479 # [result autorelease];
6480 # return result;
6481 # }
6482 # // ...
6483 #
6484 # Example (JavaScript):
6485 #
6486 # // ...
6487 #
6488 # var protoToCssColor = function(rgb_color) {
6489 # var redFrac = rgb_color.red || 0.0;
6490 # var greenFrac = rgb_color.green || 0.0;
6491 # var blueFrac = rgb_color.blue || 0.0;
6492 # var red = Math.floor(redFrac * 255);
6493 # var green = Math.floor(greenFrac * 255);
6494 # var blue = Math.floor(blueFrac * 255);
6495 #
6496 # if (!('alpha' in rgb_color)) {
6497 # return rgbToCssColor_(red, green, blue);
6498 # }
6499 #
6500 # var alphaFrac = rgb_color.alpha.value || 0.0;
6501 # var rgbParams = [red, green, blue].join(',');
6502 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6503 # };
6504 #
6505 # var rgbToCssColor_ = function(red, green, blue) {
6506 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6507 # var hexString = rgbNumber.toString(16);
6508 # var missingZeros = 6 - hexString.length;
6509 # var resultBuilder = ['#'];
6510 # for (var i = 0; i < missingZeros; i++) {
6511 # resultBuilder.push('0');
6512 # }
6513 # resultBuilder.push(hexString);
6514 # return resultBuilder.join('');
6515 # };
6516 #
6517 # // ...
6518 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6519 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6520 # the final pixel color is defined by the equation:
6521 #
6522 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6523 #
6524 # This means that a value of 1.0 corresponds to a solid color, whereas
6525 # a value of 0.0 corresponds to a completely transparent color. This
6526 # uses a wrapper message rather than a simple float scalar so that it is
6527 # possible to distinguish between a default value and the value being unset.
6528 # If omitted, this color object is to be rendered as a solid color
6529 # (as if the alpha value had been explicitly given with a value of 1.0).
6530 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6531 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6532 },
6533 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006534 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006535 "style": "A String", # The style of the border.
6536 },
6537 "right": { # A border along a cell. # The right border of the cell.
6538 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
6539 # for simplicity of conversion to/from color representations in various
6540 # languages over compactness; for example, the fields of this representation
6541 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6542 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6543 # method in iOS; and, with just a little work, it can be easily formatted into
6544 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6545 #
6546 # Example (Java):
6547 #
6548 # import com.google.type.Color;
6549 #
6550 # // ...
6551 # public static java.awt.Color fromProto(Color protocolor) {
6552 # float alpha = protocolor.hasAlpha()
6553 # ? protocolor.getAlpha().getValue()
6554 # : 1.0;
6555 #
6556 # return new java.awt.Color(
6557 # protocolor.getRed(),
6558 # protocolor.getGreen(),
6559 # protocolor.getBlue(),
6560 # alpha);
6561 # }
6562 #
6563 # public static Color toProto(java.awt.Color color) {
6564 # float red = (float) color.getRed();
6565 # float green = (float) color.getGreen();
6566 # float blue = (float) color.getBlue();
6567 # float denominator = 255.0;
6568 # Color.Builder resultBuilder =
6569 # Color
6570 # .newBuilder()
6571 # .setRed(red / denominator)
6572 # .setGreen(green / denominator)
6573 # .setBlue(blue / denominator);
6574 # int alpha = color.getAlpha();
6575 # if (alpha != 255) {
6576 # result.setAlpha(
6577 # FloatValue
6578 # .newBuilder()
6579 # .setValue(((float) alpha) / denominator)
6580 # .build());
6581 # }
6582 # return resultBuilder.build();
6583 # }
6584 # // ...
6585 #
6586 # Example (iOS / Obj-C):
6587 #
6588 # // ...
6589 # static UIColor* fromProto(Color* protocolor) {
6590 # float red = [protocolor red];
6591 # float green = [protocolor green];
6592 # float blue = [protocolor blue];
6593 # FloatValue* alpha_wrapper = [protocolor alpha];
6594 # float alpha = 1.0;
6595 # if (alpha_wrapper != nil) {
6596 # alpha = [alpha_wrapper value];
6597 # }
6598 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6599 # }
6600 #
6601 # static Color* toProto(UIColor* color) {
6602 # CGFloat red, green, blue, alpha;
6603 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6604 # return nil;
6605 # }
6606 # Color* result = [Color alloc] init];
6607 # [result setRed:red];
6608 # [result setGreen:green];
6609 # [result setBlue:blue];
6610 # if (alpha <= 0.9999) {
6611 # [result setAlpha:floatWrapperWithValue(alpha)];
6612 # }
6613 # [result autorelease];
6614 # return result;
6615 # }
6616 # // ...
6617 #
6618 # Example (JavaScript):
6619 #
6620 # // ...
6621 #
6622 # var protoToCssColor = function(rgb_color) {
6623 # var redFrac = rgb_color.red || 0.0;
6624 # var greenFrac = rgb_color.green || 0.0;
6625 # var blueFrac = rgb_color.blue || 0.0;
6626 # var red = Math.floor(redFrac * 255);
6627 # var green = Math.floor(greenFrac * 255);
6628 # var blue = Math.floor(blueFrac * 255);
6629 #
6630 # if (!('alpha' in rgb_color)) {
6631 # return rgbToCssColor_(red, green, blue);
6632 # }
6633 #
6634 # var alphaFrac = rgb_color.alpha.value || 0.0;
6635 # var rgbParams = [red, green, blue].join(',');
6636 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6637 # };
6638 #
6639 # var rgbToCssColor_ = function(red, green, blue) {
6640 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6641 # var hexString = rgbNumber.toString(16);
6642 # var missingZeros = 6 - hexString.length;
6643 # var resultBuilder = ['#'];
6644 # for (var i = 0; i < missingZeros; i++) {
6645 # resultBuilder.push('0');
6646 # }
6647 # resultBuilder.push(hexString);
6648 # return resultBuilder.join('');
6649 # };
6650 #
6651 # // ...
6652 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6653 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6654 # the final pixel color is defined by the equation:
6655 #
6656 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6657 #
6658 # This means that a value of 1.0 corresponds to a solid color, whereas
6659 # a value of 0.0 corresponds to a completely transparent color. This
6660 # uses a wrapper message rather than a simple float scalar so that it is
6661 # possible to distinguish between a default value and the value being unset.
6662 # If omitted, this color object is to be rendered as a solid color
6663 # (as if the alpha value had been explicitly given with a value of 1.0).
6664 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6665 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6666 },
6667 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006668 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006669 "style": "A String", # The style of the border.
6670 },
6671 "bottom": { # A border along a cell. # The bottom border of the cell.
6672 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
6673 # for simplicity of conversion to/from color representations in various
6674 # languages over compactness; for example, the fields of this representation
6675 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6676 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6677 # method in iOS; and, with just a little work, it can be easily formatted into
6678 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6679 #
6680 # Example (Java):
6681 #
6682 # import com.google.type.Color;
6683 #
6684 # // ...
6685 # public static java.awt.Color fromProto(Color protocolor) {
6686 # float alpha = protocolor.hasAlpha()
6687 # ? protocolor.getAlpha().getValue()
6688 # : 1.0;
6689 #
6690 # return new java.awt.Color(
6691 # protocolor.getRed(),
6692 # protocolor.getGreen(),
6693 # protocolor.getBlue(),
6694 # alpha);
6695 # }
6696 #
6697 # public static Color toProto(java.awt.Color color) {
6698 # float red = (float) color.getRed();
6699 # float green = (float) color.getGreen();
6700 # float blue = (float) color.getBlue();
6701 # float denominator = 255.0;
6702 # Color.Builder resultBuilder =
6703 # Color
6704 # .newBuilder()
6705 # .setRed(red / denominator)
6706 # .setGreen(green / denominator)
6707 # .setBlue(blue / denominator);
6708 # int alpha = color.getAlpha();
6709 # if (alpha != 255) {
6710 # result.setAlpha(
6711 # FloatValue
6712 # .newBuilder()
6713 # .setValue(((float) alpha) / denominator)
6714 # .build());
6715 # }
6716 # return resultBuilder.build();
6717 # }
6718 # // ...
6719 #
6720 # Example (iOS / Obj-C):
6721 #
6722 # // ...
6723 # static UIColor* fromProto(Color* protocolor) {
6724 # float red = [protocolor red];
6725 # float green = [protocolor green];
6726 # float blue = [protocolor blue];
6727 # FloatValue* alpha_wrapper = [protocolor alpha];
6728 # float alpha = 1.0;
6729 # if (alpha_wrapper != nil) {
6730 # alpha = [alpha_wrapper value];
6731 # }
6732 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6733 # }
6734 #
6735 # static Color* toProto(UIColor* color) {
6736 # CGFloat red, green, blue, alpha;
6737 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6738 # return nil;
6739 # }
6740 # Color* result = [Color alloc] init];
6741 # [result setRed:red];
6742 # [result setGreen:green];
6743 # [result setBlue:blue];
6744 # if (alpha <= 0.9999) {
6745 # [result setAlpha:floatWrapperWithValue(alpha)];
6746 # }
6747 # [result autorelease];
6748 # return result;
6749 # }
6750 # // ...
6751 #
6752 # Example (JavaScript):
6753 #
6754 # // ...
6755 #
6756 # var protoToCssColor = function(rgb_color) {
6757 # var redFrac = rgb_color.red || 0.0;
6758 # var greenFrac = rgb_color.green || 0.0;
6759 # var blueFrac = rgb_color.blue || 0.0;
6760 # var red = Math.floor(redFrac * 255);
6761 # var green = Math.floor(greenFrac * 255);
6762 # var blue = Math.floor(blueFrac * 255);
6763 #
6764 # if (!('alpha' in rgb_color)) {
6765 # return rgbToCssColor_(red, green, blue);
6766 # }
6767 #
6768 # var alphaFrac = rgb_color.alpha.value || 0.0;
6769 # var rgbParams = [red, green, blue].join(',');
6770 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6771 # };
6772 #
6773 # var rgbToCssColor_ = function(red, green, blue) {
6774 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6775 # var hexString = rgbNumber.toString(16);
6776 # var missingZeros = 6 - hexString.length;
6777 # var resultBuilder = ['#'];
6778 # for (var i = 0; i < missingZeros; i++) {
6779 # resultBuilder.push('0');
6780 # }
6781 # resultBuilder.push(hexString);
6782 # return resultBuilder.join('');
6783 # };
6784 #
6785 # // ...
6786 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6787 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6788 # the final pixel color is defined by the equation:
6789 #
6790 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6791 #
6792 # This means that a value of 1.0 corresponds to a solid color, whereas
6793 # a value of 0.0 corresponds to a completely transparent color. This
6794 # uses a wrapper message rather than a simple float scalar so that it is
6795 # possible to distinguish between a default value and the value being unset.
6796 # If omitted, this color object is to be rendered as a solid color
6797 # (as if the alpha value had been explicitly given with a value of 1.0).
6798 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6799 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6800 },
6801 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006802 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006803 "style": "A String", # The style of the border.
6804 },
6805 "left": { # A border along a cell. # The left border of the cell.
6806 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
6807 # for simplicity of conversion to/from color representations in various
6808 # languages over compactness; for example, the fields of this representation
6809 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6810 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6811 # method in iOS; and, with just a little work, it can be easily formatted into
6812 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6813 #
6814 # Example (Java):
6815 #
6816 # import com.google.type.Color;
6817 #
6818 # // ...
6819 # public static java.awt.Color fromProto(Color protocolor) {
6820 # float alpha = protocolor.hasAlpha()
6821 # ? protocolor.getAlpha().getValue()
6822 # : 1.0;
6823 #
6824 # return new java.awt.Color(
6825 # protocolor.getRed(),
6826 # protocolor.getGreen(),
6827 # protocolor.getBlue(),
6828 # alpha);
6829 # }
6830 #
6831 # public static Color toProto(java.awt.Color color) {
6832 # float red = (float) color.getRed();
6833 # float green = (float) color.getGreen();
6834 # float blue = (float) color.getBlue();
6835 # float denominator = 255.0;
6836 # Color.Builder resultBuilder =
6837 # Color
6838 # .newBuilder()
6839 # .setRed(red / denominator)
6840 # .setGreen(green / denominator)
6841 # .setBlue(blue / denominator);
6842 # int alpha = color.getAlpha();
6843 # if (alpha != 255) {
6844 # result.setAlpha(
6845 # FloatValue
6846 # .newBuilder()
6847 # .setValue(((float) alpha) / denominator)
6848 # .build());
6849 # }
6850 # return resultBuilder.build();
6851 # }
6852 # // ...
6853 #
6854 # Example (iOS / Obj-C):
6855 #
6856 # // ...
6857 # static UIColor* fromProto(Color* protocolor) {
6858 # float red = [protocolor red];
6859 # float green = [protocolor green];
6860 # float blue = [protocolor blue];
6861 # FloatValue* alpha_wrapper = [protocolor alpha];
6862 # float alpha = 1.0;
6863 # if (alpha_wrapper != nil) {
6864 # alpha = [alpha_wrapper value];
6865 # }
6866 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6867 # }
6868 #
6869 # static Color* toProto(UIColor* color) {
6870 # CGFloat red, green, blue, alpha;
6871 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6872 # return nil;
6873 # }
6874 # Color* result = [Color alloc] init];
6875 # [result setRed:red];
6876 # [result setGreen:green];
6877 # [result setBlue:blue];
6878 # if (alpha <= 0.9999) {
6879 # [result setAlpha:floatWrapperWithValue(alpha)];
6880 # }
6881 # [result autorelease];
6882 # return result;
6883 # }
6884 # // ...
6885 #
6886 # Example (JavaScript):
6887 #
6888 # // ...
6889 #
6890 # var protoToCssColor = function(rgb_color) {
6891 # var redFrac = rgb_color.red || 0.0;
6892 # var greenFrac = rgb_color.green || 0.0;
6893 # var blueFrac = rgb_color.blue || 0.0;
6894 # var red = Math.floor(redFrac * 255);
6895 # var green = Math.floor(greenFrac * 255);
6896 # var blue = Math.floor(blueFrac * 255);
6897 #
6898 # if (!('alpha' in rgb_color)) {
6899 # return rgbToCssColor_(red, green, blue);
6900 # }
6901 #
6902 # var alphaFrac = rgb_color.alpha.value || 0.0;
6903 # var rgbParams = [red, green, blue].join(',');
6904 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6905 # };
6906 #
6907 # var rgbToCssColor_ = function(red, green, blue) {
6908 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6909 # var hexString = rgbNumber.toString(16);
6910 # var missingZeros = 6 - hexString.length;
6911 # var resultBuilder = ['#'];
6912 # for (var i = 0; i < missingZeros; i++) {
6913 # resultBuilder.push('0');
6914 # }
6915 # resultBuilder.push(hexString);
6916 # return resultBuilder.join('');
6917 # };
6918 #
6919 # // ...
6920 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6921 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6922 # the final pixel color is defined by the equation:
6923 #
6924 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6925 #
6926 # This means that a value of 1.0 corresponds to a solid color, whereas
6927 # a value of 0.0 corresponds to a completely transparent color. This
6928 # uses a wrapper message rather than a simple float scalar so that it is
6929 # possible to distinguish between a default value and the value being unset.
6930 # If omitted, this color object is to be rendered as a solid color
6931 # (as if the alpha value had been explicitly given with a value of 1.0).
6932 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6933 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6934 },
6935 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006936 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006937 "style": "A String", # The style of the border.
6938 },
6939 },
6940 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
6941 },
6942 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
6943 #
6944 # When writing, the new format will be merged with the existing format.
6945 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006946 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
6947 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006948 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006949 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006950 },
6951 "textDirection": "A String", # The direction of the text in the cell.
6952 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
6953 # When updating padding, every field must be specified.
6954 "top": 42, # The top padding of the cell.
6955 "right": 42, # The right padding of the cell.
6956 "bottom": 42, # The bottom padding of the cell.
6957 "left": 42, # The left padding of the cell.
6958 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006959 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006960 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
6961 # for simplicity of conversion to/from color representations in various
6962 # languages over compactness; for example, the fields of this representation
6963 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6964 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6965 # method in iOS; and, with just a little work, it can be easily formatted into
6966 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6967 #
6968 # Example (Java):
6969 #
6970 # import com.google.type.Color;
6971 #
6972 # // ...
6973 # public static java.awt.Color fromProto(Color protocolor) {
6974 # float alpha = protocolor.hasAlpha()
6975 # ? protocolor.getAlpha().getValue()
6976 # : 1.0;
6977 #
6978 # return new java.awt.Color(
6979 # protocolor.getRed(),
6980 # protocolor.getGreen(),
6981 # protocolor.getBlue(),
6982 # alpha);
6983 # }
6984 #
6985 # public static Color toProto(java.awt.Color color) {
6986 # float red = (float) color.getRed();
6987 # float green = (float) color.getGreen();
6988 # float blue = (float) color.getBlue();
6989 # float denominator = 255.0;
6990 # Color.Builder resultBuilder =
6991 # Color
6992 # .newBuilder()
6993 # .setRed(red / denominator)
6994 # .setGreen(green / denominator)
6995 # .setBlue(blue / denominator);
6996 # int alpha = color.getAlpha();
6997 # if (alpha != 255) {
6998 # result.setAlpha(
6999 # FloatValue
7000 # .newBuilder()
7001 # .setValue(((float) alpha) / denominator)
7002 # .build());
7003 # }
7004 # return resultBuilder.build();
7005 # }
7006 # // ...
7007 #
7008 # Example (iOS / Obj-C):
7009 #
7010 # // ...
7011 # static UIColor* fromProto(Color* protocolor) {
7012 # float red = [protocolor red];
7013 # float green = [protocolor green];
7014 # float blue = [protocolor blue];
7015 # FloatValue* alpha_wrapper = [protocolor alpha];
7016 # float alpha = 1.0;
7017 # if (alpha_wrapper != nil) {
7018 # alpha = [alpha_wrapper value];
7019 # }
7020 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7021 # }
7022 #
7023 # static Color* toProto(UIColor* color) {
7024 # CGFloat red, green, blue, alpha;
7025 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7026 # return nil;
7027 # }
7028 # Color* result = [Color alloc] init];
7029 # [result setRed:red];
7030 # [result setGreen:green];
7031 # [result setBlue:blue];
7032 # if (alpha <= 0.9999) {
7033 # [result setAlpha:floatWrapperWithValue(alpha)];
7034 # }
7035 # [result autorelease];
7036 # return result;
7037 # }
7038 # // ...
7039 #
7040 # Example (JavaScript):
7041 #
7042 # // ...
7043 #
7044 # var protoToCssColor = function(rgb_color) {
7045 # var redFrac = rgb_color.red || 0.0;
7046 # var greenFrac = rgb_color.green || 0.0;
7047 # var blueFrac = rgb_color.blue || 0.0;
7048 # var red = Math.floor(redFrac * 255);
7049 # var green = Math.floor(greenFrac * 255);
7050 # var blue = Math.floor(blueFrac * 255);
7051 #
7052 # if (!('alpha' in rgb_color)) {
7053 # return rgbToCssColor_(red, green, blue);
7054 # }
7055 #
7056 # var alphaFrac = rgb_color.alpha.value || 0.0;
7057 # var rgbParams = [red, green, blue].join(',');
7058 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7059 # };
7060 #
7061 # var rgbToCssColor_ = function(red, green, blue) {
7062 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7063 # var hexString = rgbNumber.toString(16);
7064 # var missingZeros = 6 - hexString.length;
7065 # var resultBuilder = ['#'];
7066 # for (var i = 0; i < missingZeros; i++) {
7067 # resultBuilder.push('0');
7068 # }
7069 # resultBuilder.push(hexString);
7070 # return resultBuilder.join('');
7071 # };
7072 #
7073 # // ...
7074 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7075 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7076 # the final pixel color is defined by the equation:
7077 #
7078 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7079 #
7080 # This means that a value of 1.0 corresponds to a solid color, whereas
7081 # a value of 0.0 corresponds to a completely transparent color. This
7082 # uses a wrapper message rather than a simple float scalar so that it is
7083 # possible to distinguish between a default value and the value being unset.
7084 # If omitted, this color object is to be rendered as a solid color
7085 # (as if the alpha value had been explicitly given with a value of 1.0).
7086 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7087 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7088 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007089 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007090 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
7091 # Absent values indicate that the field isn't specified.
7092 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
7093 # for simplicity of conversion to/from color representations in various
7094 # languages over compactness; for example, the fields of this representation
7095 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7096 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7097 # method in iOS; and, with just a little work, it can be easily formatted into
7098 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7099 #
7100 # Example (Java):
7101 #
7102 # import com.google.type.Color;
7103 #
7104 # // ...
7105 # public static java.awt.Color fromProto(Color protocolor) {
7106 # float alpha = protocolor.hasAlpha()
7107 # ? protocolor.getAlpha().getValue()
7108 # : 1.0;
7109 #
7110 # return new java.awt.Color(
7111 # protocolor.getRed(),
7112 # protocolor.getGreen(),
7113 # protocolor.getBlue(),
7114 # alpha);
7115 # }
7116 #
7117 # public static Color toProto(java.awt.Color color) {
7118 # float red = (float) color.getRed();
7119 # float green = (float) color.getGreen();
7120 # float blue = (float) color.getBlue();
7121 # float denominator = 255.0;
7122 # Color.Builder resultBuilder =
7123 # Color
7124 # .newBuilder()
7125 # .setRed(red / denominator)
7126 # .setGreen(green / denominator)
7127 # .setBlue(blue / denominator);
7128 # int alpha = color.getAlpha();
7129 # if (alpha != 255) {
7130 # result.setAlpha(
7131 # FloatValue
7132 # .newBuilder()
7133 # .setValue(((float) alpha) / denominator)
7134 # .build());
7135 # }
7136 # return resultBuilder.build();
7137 # }
7138 # // ...
7139 #
7140 # Example (iOS / Obj-C):
7141 #
7142 # // ...
7143 # static UIColor* fromProto(Color* protocolor) {
7144 # float red = [protocolor red];
7145 # float green = [protocolor green];
7146 # float blue = [protocolor blue];
7147 # FloatValue* alpha_wrapper = [protocolor alpha];
7148 # float alpha = 1.0;
7149 # if (alpha_wrapper != nil) {
7150 # alpha = [alpha_wrapper value];
7151 # }
7152 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7153 # }
7154 #
7155 # static Color* toProto(UIColor* color) {
7156 # CGFloat red, green, blue, alpha;
7157 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7158 # return nil;
7159 # }
7160 # Color* result = [Color alloc] init];
7161 # [result setRed:red];
7162 # [result setGreen:green];
7163 # [result setBlue:blue];
7164 # if (alpha <= 0.9999) {
7165 # [result setAlpha:floatWrapperWithValue(alpha)];
7166 # }
7167 # [result autorelease];
7168 # return result;
7169 # }
7170 # // ...
7171 #
7172 # Example (JavaScript):
7173 #
7174 # // ...
7175 #
7176 # var protoToCssColor = function(rgb_color) {
7177 # var redFrac = rgb_color.red || 0.0;
7178 # var greenFrac = rgb_color.green || 0.0;
7179 # var blueFrac = rgb_color.blue || 0.0;
7180 # var red = Math.floor(redFrac * 255);
7181 # var green = Math.floor(greenFrac * 255);
7182 # var blue = Math.floor(blueFrac * 255);
7183 #
7184 # if (!('alpha' in rgb_color)) {
7185 # return rgbToCssColor_(red, green, blue);
7186 # }
7187 #
7188 # var alphaFrac = rgb_color.alpha.value || 0.0;
7189 # var rgbParams = [red, green, blue].join(',');
7190 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7191 # };
7192 #
7193 # var rgbToCssColor_ = function(red, green, blue) {
7194 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7195 # var hexString = rgbNumber.toString(16);
7196 # var missingZeros = 6 - hexString.length;
7197 # var resultBuilder = ['#'];
7198 # for (var i = 0; i < missingZeros; i++) {
7199 # resultBuilder.push('0');
7200 # }
7201 # resultBuilder.push(hexString);
7202 # return resultBuilder.join('');
7203 # };
7204 #
7205 # // ...
7206 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7207 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7208 # the final pixel color is defined by the equation:
7209 #
7210 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7211 #
7212 # This means that a value of 1.0 corresponds to a solid color, whereas
7213 # a value of 0.0 corresponds to a completely transparent color. This
7214 # uses a wrapper message rather than a simple float scalar so that it is
7215 # possible to distinguish between a default value and the value being unset.
7216 # If omitted, this color object is to be rendered as a solid color
7217 # (as if the alpha value had been explicitly given with a value of 1.0).
7218 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7219 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7220 },
7221 "bold": True or False, # True if the text is bold.
7222 "strikethrough": True or False, # True if the text has a strikethrough.
7223 "fontFamily": "A String", # The font family.
7224 "fontSize": 42, # The size of the font.
7225 "italic": True or False, # True if the text is italicized.
7226 "underline": True or False, # True if the text is underlined.
7227 },
7228 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
7229 "borders": { # The borders of the cell. # The borders of the cell.
7230 "top": { # A border along a cell. # The top border of the cell.
7231 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7232 # for simplicity of conversion to/from color representations in various
7233 # languages over compactness; for example, the fields of this representation
7234 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7235 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7236 # method in iOS; and, with just a little work, it can be easily formatted into
7237 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7238 #
7239 # Example (Java):
7240 #
7241 # import com.google.type.Color;
7242 #
7243 # // ...
7244 # public static java.awt.Color fromProto(Color protocolor) {
7245 # float alpha = protocolor.hasAlpha()
7246 # ? protocolor.getAlpha().getValue()
7247 # : 1.0;
7248 #
7249 # return new java.awt.Color(
7250 # protocolor.getRed(),
7251 # protocolor.getGreen(),
7252 # protocolor.getBlue(),
7253 # alpha);
7254 # }
7255 #
7256 # public static Color toProto(java.awt.Color color) {
7257 # float red = (float) color.getRed();
7258 # float green = (float) color.getGreen();
7259 # float blue = (float) color.getBlue();
7260 # float denominator = 255.0;
7261 # Color.Builder resultBuilder =
7262 # Color
7263 # .newBuilder()
7264 # .setRed(red / denominator)
7265 # .setGreen(green / denominator)
7266 # .setBlue(blue / denominator);
7267 # int alpha = color.getAlpha();
7268 # if (alpha != 255) {
7269 # result.setAlpha(
7270 # FloatValue
7271 # .newBuilder()
7272 # .setValue(((float) alpha) / denominator)
7273 # .build());
7274 # }
7275 # return resultBuilder.build();
7276 # }
7277 # // ...
7278 #
7279 # Example (iOS / Obj-C):
7280 #
7281 # // ...
7282 # static UIColor* fromProto(Color* protocolor) {
7283 # float red = [protocolor red];
7284 # float green = [protocolor green];
7285 # float blue = [protocolor blue];
7286 # FloatValue* alpha_wrapper = [protocolor alpha];
7287 # float alpha = 1.0;
7288 # if (alpha_wrapper != nil) {
7289 # alpha = [alpha_wrapper value];
7290 # }
7291 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7292 # }
7293 #
7294 # static Color* toProto(UIColor* color) {
7295 # CGFloat red, green, blue, alpha;
7296 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7297 # return nil;
7298 # }
7299 # Color* result = [Color alloc] init];
7300 # [result setRed:red];
7301 # [result setGreen:green];
7302 # [result setBlue:blue];
7303 # if (alpha <= 0.9999) {
7304 # [result setAlpha:floatWrapperWithValue(alpha)];
7305 # }
7306 # [result autorelease];
7307 # return result;
7308 # }
7309 # // ...
7310 #
7311 # Example (JavaScript):
7312 #
7313 # // ...
7314 #
7315 # var protoToCssColor = function(rgb_color) {
7316 # var redFrac = rgb_color.red || 0.0;
7317 # var greenFrac = rgb_color.green || 0.0;
7318 # var blueFrac = rgb_color.blue || 0.0;
7319 # var red = Math.floor(redFrac * 255);
7320 # var green = Math.floor(greenFrac * 255);
7321 # var blue = Math.floor(blueFrac * 255);
7322 #
7323 # if (!('alpha' in rgb_color)) {
7324 # return rgbToCssColor_(red, green, blue);
7325 # }
7326 #
7327 # var alphaFrac = rgb_color.alpha.value || 0.0;
7328 # var rgbParams = [red, green, blue].join(',');
7329 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7330 # };
7331 #
7332 # var rgbToCssColor_ = function(red, green, blue) {
7333 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7334 # var hexString = rgbNumber.toString(16);
7335 # var missingZeros = 6 - hexString.length;
7336 # var resultBuilder = ['#'];
7337 # for (var i = 0; i < missingZeros; i++) {
7338 # resultBuilder.push('0');
7339 # }
7340 # resultBuilder.push(hexString);
7341 # return resultBuilder.join('');
7342 # };
7343 #
7344 # // ...
7345 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7346 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7347 # the final pixel color is defined by the equation:
7348 #
7349 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7350 #
7351 # This means that a value of 1.0 corresponds to a solid color, whereas
7352 # a value of 0.0 corresponds to a completely transparent color. This
7353 # uses a wrapper message rather than a simple float scalar so that it is
7354 # possible to distinguish between a default value and the value being unset.
7355 # If omitted, this color object is to be rendered as a solid color
7356 # (as if the alpha value had been explicitly given with a value of 1.0).
7357 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7358 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7359 },
7360 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007361 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007362 "style": "A String", # The style of the border.
7363 },
7364 "right": { # A border along a cell. # The right border of the cell.
7365 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7366 # for simplicity of conversion to/from color representations in various
7367 # languages over compactness; for example, the fields of this representation
7368 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7369 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7370 # method in iOS; and, with just a little work, it can be easily formatted into
7371 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7372 #
7373 # Example (Java):
7374 #
7375 # import com.google.type.Color;
7376 #
7377 # // ...
7378 # public static java.awt.Color fromProto(Color protocolor) {
7379 # float alpha = protocolor.hasAlpha()
7380 # ? protocolor.getAlpha().getValue()
7381 # : 1.0;
7382 #
7383 # return new java.awt.Color(
7384 # protocolor.getRed(),
7385 # protocolor.getGreen(),
7386 # protocolor.getBlue(),
7387 # alpha);
7388 # }
7389 #
7390 # public static Color toProto(java.awt.Color color) {
7391 # float red = (float) color.getRed();
7392 # float green = (float) color.getGreen();
7393 # float blue = (float) color.getBlue();
7394 # float denominator = 255.0;
7395 # Color.Builder resultBuilder =
7396 # Color
7397 # .newBuilder()
7398 # .setRed(red / denominator)
7399 # .setGreen(green / denominator)
7400 # .setBlue(blue / denominator);
7401 # int alpha = color.getAlpha();
7402 # if (alpha != 255) {
7403 # result.setAlpha(
7404 # FloatValue
7405 # .newBuilder()
7406 # .setValue(((float) alpha) / denominator)
7407 # .build());
7408 # }
7409 # return resultBuilder.build();
7410 # }
7411 # // ...
7412 #
7413 # Example (iOS / Obj-C):
7414 #
7415 # // ...
7416 # static UIColor* fromProto(Color* protocolor) {
7417 # float red = [protocolor red];
7418 # float green = [protocolor green];
7419 # float blue = [protocolor blue];
7420 # FloatValue* alpha_wrapper = [protocolor alpha];
7421 # float alpha = 1.0;
7422 # if (alpha_wrapper != nil) {
7423 # alpha = [alpha_wrapper value];
7424 # }
7425 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7426 # }
7427 #
7428 # static Color* toProto(UIColor* color) {
7429 # CGFloat red, green, blue, alpha;
7430 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7431 # return nil;
7432 # }
7433 # Color* result = [Color alloc] init];
7434 # [result setRed:red];
7435 # [result setGreen:green];
7436 # [result setBlue:blue];
7437 # if (alpha <= 0.9999) {
7438 # [result setAlpha:floatWrapperWithValue(alpha)];
7439 # }
7440 # [result autorelease];
7441 # return result;
7442 # }
7443 # // ...
7444 #
7445 # Example (JavaScript):
7446 #
7447 # // ...
7448 #
7449 # var protoToCssColor = function(rgb_color) {
7450 # var redFrac = rgb_color.red || 0.0;
7451 # var greenFrac = rgb_color.green || 0.0;
7452 # var blueFrac = rgb_color.blue || 0.0;
7453 # var red = Math.floor(redFrac * 255);
7454 # var green = Math.floor(greenFrac * 255);
7455 # var blue = Math.floor(blueFrac * 255);
7456 #
7457 # if (!('alpha' in rgb_color)) {
7458 # return rgbToCssColor_(red, green, blue);
7459 # }
7460 #
7461 # var alphaFrac = rgb_color.alpha.value || 0.0;
7462 # var rgbParams = [red, green, blue].join(',');
7463 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7464 # };
7465 #
7466 # var rgbToCssColor_ = function(red, green, blue) {
7467 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7468 # var hexString = rgbNumber.toString(16);
7469 # var missingZeros = 6 - hexString.length;
7470 # var resultBuilder = ['#'];
7471 # for (var i = 0; i < missingZeros; i++) {
7472 # resultBuilder.push('0');
7473 # }
7474 # resultBuilder.push(hexString);
7475 # return resultBuilder.join('');
7476 # };
7477 #
7478 # // ...
7479 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7480 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7481 # the final pixel color is defined by the equation:
7482 #
7483 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7484 #
7485 # This means that a value of 1.0 corresponds to a solid color, whereas
7486 # a value of 0.0 corresponds to a completely transparent color. This
7487 # uses a wrapper message rather than a simple float scalar so that it is
7488 # possible to distinguish between a default value and the value being unset.
7489 # If omitted, this color object is to be rendered as a solid color
7490 # (as if the alpha value had been explicitly given with a value of 1.0).
7491 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7492 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7493 },
7494 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007495 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007496 "style": "A String", # The style of the border.
7497 },
7498 "bottom": { # A border along a cell. # The bottom border of the cell.
7499 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7500 # for simplicity of conversion to/from color representations in various
7501 # languages over compactness; for example, the fields of this representation
7502 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7503 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7504 # method in iOS; and, with just a little work, it can be easily formatted into
7505 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7506 #
7507 # Example (Java):
7508 #
7509 # import com.google.type.Color;
7510 #
7511 # // ...
7512 # public static java.awt.Color fromProto(Color protocolor) {
7513 # float alpha = protocolor.hasAlpha()
7514 # ? protocolor.getAlpha().getValue()
7515 # : 1.0;
7516 #
7517 # return new java.awt.Color(
7518 # protocolor.getRed(),
7519 # protocolor.getGreen(),
7520 # protocolor.getBlue(),
7521 # alpha);
7522 # }
7523 #
7524 # public static Color toProto(java.awt.Color color) {
7525 # float red = (float) color.getRed();
7526 # float green = (float) color.getGreen();
7527 # float blue = (float) color.getBlue();
7528 # float denominator = 255.0;
7529 # Color.Builder resultBuilder =
7530 # Color
7531 # .newBuilder()
7532 # .setRed(red / denominator)
7533 # .setGreen(green / denominator)
7534 # .setBlue(blue / denominator);
7535 # int alpha = color.getAlpha();
7536 # if (alpha != 255) {
7537 # result.setAlpha(
7538 # FloatValue
7539 # .newBuilder()
7540 # .setValue(((float) alpha) / denominator)
7541 # .build());
7542 # }
7543 # return resultBuilder.build();
7544 # }
7545 # // ...
7546 #
7547 # Example (iOS / Obj-C):
7548 #
7549 # // ...
7550 # static UIColor* fromProto(Color* protocolor) {
7551 # float red = [protocolor red];
7552 # float green = [protocolor green];
7553 # float blue = [protocolor blue];
7554 # FloatValue* alpha_wrapper = [protocolor alpha];
7555 # float alpha = 1.0;
7556 # if (alpha_wrapper != nil) {
7557 # alpha = [alpha_wrapper value];
7558 # }
7559 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7560 # }
7561 #
7562 # static Color* toProto(UIColor* color) {
7563 # CGFloat red, green, blue, alpha;
7564 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7565 # return nil;
7566 # }
7567 # Color* result = [Color alloc] init];
7568 # [result setRed:red];
7569 # [result setGreen:green];
7570 # [result setBlue:blue];
7571 # if (alpha <= 0.9999) {
7572 # [result setAlpha:floatWrapperWithValue(alpha)];
7573 # }
7574 # [result autorelease];
7575 # return result;
7576 # }
7577 # // ...
7578 #
7579 # Example (JavaScript):
7580 #
7581 # // ...
7582 #
7583 # var protoToCssColor = function(rgb_color) {
7584 # var redFrac = rgb_color.red || 0.0;
7585 # var greenFrac = rgb_color.green || 0.0;
7586 # var blueFrac = rgb_color.blue || 0.0;
7587 # var red = Math.floor(redFrac * 255);
7588 # var green = Math.floor(greenFrac * 255);
7589 # var blue = Math.floor(blueFrac * 255);
7590 #
7591 # if (!('alpha' in rgb_color)) {
7592 # return rgbToCssColor_(red, green, blue);
7593 # }
7594 #
7595 # var alphaFrac = rgb_color.alpha.value || 0.0;
7596 # var rgbParams = [red, green, blue].join(',');
7597 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7598 # };
7599 #
7600 # var rgbToCssColor_ = function(red, green, blue) {
7601 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7602 # var hexString = rgbNumber.toString(16);
7603 # var missingZeros = 6 - hexString.length;
7604 # var resultBuilder = ['#'];
7605 # for (var i = 0; i < missingZeros; i++) {
7606 # resultBuilder.push('0');
7607 # }
7608 # resultBuilder.push(hexString);
7609 # return resultBuilder.join('');
7610 # };
7611 #
7612 # // ...
7613 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7614 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7615 # the final pixel color is defined by the equation:
7616 #
7617 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7618 #
7619 # This means that a value of 1.0 corresponds to a solid color, whereas
7620 # a value of 0.0 corresponds to a completely transparent color. This
7621 # uses a wrapper message rather than a simple float scalar so that it is
7622 # possible to distinguish between a default value and the value being unset.
7623 # If omitted, this color object is to be rendered as a solid color
7624 # (as if the alpha value had been explicitly given with a value of 1.0).
7625 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7626 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7627 },
7628 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007629 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007630 "style": "A String", # The style of the border.
7631 },
7632 "left": { # A border along a cell. # The left border of the cell.
7633 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7634 # for simplicity of conversion to/from color representations in various
7635 # languages over compactness; for example, the fields of this representation
7636 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7637 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7638 # method in iOS; and, with just a little work, it can be easily formatted into
7639 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7640 #
7641 # Example (Java):
7642 #
7643 # import com.google.type.Color;
7644 #
7645 # // ...
7646 # public static java.awt.Color fromProto(Color protocolor) {
7647 # float alpha = protocolor.hasAlpha()
7648 # ? protocolor.getAlpha().getValue()
7649 # : 1.0;
7650 #
7651 # return new java.awt.Color(
7652 # protocolor.getRed(),
7653 # protocolor.getGreen(),
7654 # protocolor.getBlue(),
7655 # alpha);
7656 # }
7657 #
7658 # public static Color toProto(java.awt.Color color) {
7659 # float red = (float) color.getRed();
7660 # float green = (float) color.getGreen();
7661 # float blue = (float) color.getBlue();
7662 # float denominator = 255.0;
7663 # Color.Builder resultBuilder =
7664 # Color
7665 # .newBuilder()
7666 # .setRed(red / denominator)
7667 # .setGreen(green / denominator)
7668 # .setBlue(blue / denominator);
7669 # int alpha = color.getAlpha();
7670 # if (alpha != 255) {
7671 # result.setAlpha(
7672 # FloatValue
7673 # .newBuilder()
7674 # .setValue(((float) alpha) / denominator)
7675 # .build());
7676 # }
7677 # return resultBuilder.build();
7678 # }
7679 # // ...
7680 #
7681 # Example (iOS / Obj-C):
7682 #
7683 # // ...
7684 # static UIColor* fromProto(Color* protocolor) {
7685 # float red = [protocolor red];
7686 # float green = [protocolor green];
7687 # float blue = [protocolor blue];
7688 # FloatValue* alpha_wrapper = [protocolor alpha];
7689 # float alpha = 1.0;
7690 # if (alpha_wrapper != nil) {
7691 # alpha = [alpha_wrapper value];
7692 # }
7693 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7694 # }
7695 #
7696 # static Color* toProto(UIColor* color) {
7697 # CGFloat red, green, blue, alpha;
7698 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7699 # return nil;
7700 # }
7701 # Color* result = [Color alloc] init];
7702 # [result setRed:red];
7703 # [result setGreen:green];
7704 # [result setBlue:blue];
7705 # if (alpha <= 0.9999) {
7706 # [result setAlpha:floatWrapperWithValue(alpha)];
7707 # }
7708 # [result autorelease];
7709 # return result;
7710 # }
7711 # // ...
7712 #
7713 # Example (JavaScript):
7714 #
7715 # // ...
7716 #
7717 # var protoToCssColor = function(rgb_color) {
7718 # var redFrac = rgb_color.red || 0.0;
7719 # var greenFrac = rgb_color.green || 0.0;
7720 # var blueFrac = rgb_color.blue || 0.0;
7721 # var red = Math.floor(redFrac * 255);
7722 # var green = Math.floor(greenFrac * 255);
7723 # var blue = Math.floor(blueFrac * 255);
7724 #
7725 # if (!('alpha' in rgb_color)) {
7726 # return rgbToCssColor_(red, green, blue);
7727 # }
7728 #
7729 # var alphaFrac = rgb_color.alpha.value || 0.0;
7730 # var rgbParams = [red, green, blue].join(',');
7731 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7732 # };
7733 #
7734 # var rgbToCssColor_ = function(red, green, blue) {
7735 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7736 # var hexString = rgbNumber.toString(16);
7737 # var missingZeros = 6 - hexString.length;
7738 # var resultBuilder = ['#'];
7739 # for (var i = 0; i < missingZeros; i++) {
7740 # resultBuilder.push('0');
7741 # }
7742 # resultBuilder.push(hexString);
7743 # return resultBuilder.join('');
7744 # };
7745 #
7746 # // ...
7747 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7748 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7749 # the final pixel color is defined by the equation:
7750 #
7751 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7752 #
7753 # This means that a value of 1.0 corresponds to a solid color, whereas
7754 # a value of 0.0 corresponds to a completely transparent color. This
7755 # uses a wrapper message rather than a simple float scalar so that it is
7756 # possible to distinguish between a default value and the value being unset.
7757 # If omitted, this color object is to be rendered as a solid color
7758 # (as if the alpha value had been explicitly given with a value of 1.0).
7759 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7760 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7761 },
7762 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007763 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007764 "style": "A String", # The style of the border.
7765 },
7766 },
7767 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
7768 },
7769 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
7770 #
7771 # When writing, the new data validation rule will overwrite any prior rule.
7772 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
7773 # If true, "List" conditions will show a dropdown.
7774 "strict": True or False, # True if invalid data should be rejected.
7775 "inputMessage": "A String", # A message to show the user when adding data to the cell.
7776 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
7777 # BooleanConditions are used by conditional formatting,
7778 # data validation, and the criteria in filters.
7779 "type": "A String", # The type of condition.
7780 "values": [ # The values of the condition. The number of supported values depends
7781 # on the condition type. Some support zero values,
7782 # others one or two values,
7783 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
7784 { # The value of the condition.
7785 "relativeDate": "A String", # A relative date (based on the current date).
7786 # Valid only if the type is
7787 # DATE_BEFORE,
7788 # DATE_AFTER,
7789 # DATE_ON_OR_BEFORE or
7790 # DATE_ON_OR_AFTER.
7791 #
7792 # Relative dates are not supported in data validation.
7793 # They are supported only in conditional formatting and
7794 # conditional filters.
7795 "userEnteredValue": "A String", # A value the condition is based on.
7796 # The value will be parsed as if the user typed into a cell.
7797 # Formulas are supported (and must begin with an `=`).
7798 },
7799 ],
7800 },
7801 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007802 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
7803 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007804 # Runs start at specific indexes in the text and continue until the next
7805 # run. Properties of a run will continue unless explicitly changed
7806 # in a subsequent run (and properties of the first run will continue
7807 # the properties of the cell unless explicitly changed).
7808 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007809 # When writing, the new runs will overwrite any prior runs. When writing a
7810 # new user_entered_value, previous runs will be erased.
7811 { # A run of a text format. The format of this run continues until the start
7812 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007813 # When updating, all fields must be set.
7814 "startIndex": 42, # The character index where this run starts.
7815 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
7816 # Absent values indicate that the field isn't specified.
7817 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
7818 # for simplicity of conversion to/from color representations in various
7819 # languages over compactness; for example, the fields of this representation
7820 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7821 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7822 # method in iOS; and, with just a little work, it can be easily formatted into
7823 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7824 #
7825 # Example (Java):
7826 #
7827 # import com.google.type.Color;
7828 #
7829 # // ...
7830 # public static java.awt.Color fromProto(Color protocolor) {
7831 # float alpha = protocolor.hasAlpha()
7832 # ? protocolor.getAlpha().getValue()
7833 # : 1.0;
7834 #
7835 # return new java.awt.Color(
7836 # protocolor.getRed(),
7837 # protocolor.getGreen(),
7838 # protocolor.getBlue(),
7839 # alpha);
7840 # }
7841 #
7842 # public static Color toProto(java.awt.Color color) {
7843 # float red = (float) color.getRed();
7844 # float green = (float) color.getGreen();
7845 # float blue = (float) color.getBlue();
7846 # float denominator = 255.0;
7847 # Color.Builder resultBuilder =
7848 # Color
7849 # .newBuilder()
7850 # .setRed(red / denominator)
7851 # .setGreen(green / denominator)
7852 # .setBlue(blue / denominator);
7853 # int alpha = color.getAlpha();
7854 # if (alpha != 255) {
7855 # result.setAlpha(
7856 # FloatValue
7857 # .newBuilder()
7858 # .setValue(((float) alpha) / denominator)
7859 # .build());
7860 # }
7861 # return resultBuilder.build();
7862 # }
7863 # // ...
7864 #
7865 # Example (iOS / Obj-C):
7866 #
7867 # // ...
7868 # static UIColor* fromProto(Color* protocolor) {
7869 # float red = [protocolor red];
7870 # float green = [protocolor green];
7871 # float blue = [protocolor blue];
7872 # FloatValue* alpha_wrapper = [protocolor alpha];
7873 # float alpha = 1.0;
7874 # if (alpha_wrapper != nil) {
7875 # alpha = [alpha_wrapper value];
7876 # }
7877 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7878 # }
7879 #
7880 # static Color* toProto(UIColor* color) {
7881 # CGFloat red, green, blue, alpha;
7882 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7883 # return nil;
7884 # }
7885 # Color* result = [Color alloc] init];
7886 # [result setRed:red];
7887 # [result setGreen:green];
7888 # [result setBlue:blue];
7889 # if (alpha <= 0.9999) {
7890 # [result setAlpha:floatWrapperWithValue(alpha)];
7891 # }
7892 # [result autorelease];
7893 # return result;
7894 # }
7895 # // ...
7896 #
7897 # Example (JavaScript):
7898 #
7899 # // ...
7900 #
7901 # var protoToCssColor = function(rgb_color) {
7902 # var redFrac = rgb_color.red || 0.0;
7903 # var greenFrac = rgb_color.green || 0.0;
7904 # var blueFrac = rgb_color.blue || 0.0;
7905 # var red = Math.floor(redFrac * 255);
7906 # var green = Math.floor(greenFrac * 255);
7907 # var blue = Math.floor(blueFrac * 255);
7908 #
7909 # if (!('alpha' in rgb_color)) {
7910 # return rgbToCssColor_(red, green, blue);
7911 # }
7912 #
7913 # var alphaFrac = rgb_color.alpha.value || 0.0;
7914 # var rgbParams = [red, green, blue].join(',');
7915 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7916 # };
7917 #
7918 # var rgbToCssColor_ = function(red, green, blue) {
7919 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7920 # var hexString = rgbNumber.toString(16);
7921 # var missingZeros = 6 - hexString.length;
7922 # var resultBuilder = ['#'];
7923 # for (var i = 0; i < missingZeros; i++) {
7924 # resultBuilder.push('0');
7925 # }
7926 # resultBuilder.push(hexString);
7927 # return resultBuilder.join('');
7928 # };
7929 #
7930 # // ...
7931 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7932 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7933 # the final pixel color is defined by the equation:
7934 #
7935 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7936 #
7937 # This means that a value of 1.0 corresponds to a solid color, whereas
7938 # a value of 0.0 corresponds to a completely transparent color. This
7939 # uses a wrapper message rather than a simple float scalar so that it is
7940 # possible to distinguish between a default value and the value being unset.
7941 # If omitted, this color object is to be rendered as a solid color
7942 # (as if the alpha value had been explicitly given with a value of 1.0).
7943 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7944 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7945 },
7946 "bold": True or False, # True if the text is bold.
7947 "strikethrough": True or False, # True if the text has a strikethrough.
7948 "fontFamily": "A String", # The font family.
7949 "fontSize": 42, # The size of the font.
7950 "italic": True or False, # True if the text is italicized.
7951 "underline": True or False, # True if the text is underlined.
7952 },
7953 },
7954 ],
7955 },
7956 "fields": "A String", # The fields that should be updated. At least one field must be specified.
7957 # The root `cell` is implied and should not be specified.
7958 # A single `"*"` can be used as short-hand for listing every field.
7959 "range": { # A range on a sheet. # The range to repeat the cell in.
7960 # All indexes are zero-based.
7961 # Indexes are half open, e.g the start index is inclusive
7962 # and the end index is exclusive -- [start_index, end_index).
7963 # Missing indexes indicate the range is unbounded on that side.
7964 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007965 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007966 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007967 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007968 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007969 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007970 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007971 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007972 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007973 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007974 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007975 # `Sheet1!A:B == sheet_id: 0,
7976 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007977 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007978 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007979 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007980 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007981 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007982 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007983 #
7984 # The start index must always be less than or equal to the end index.
7985 # If the start index equals the end index, then the range is empty.
7986 # Empty ranges are typically not meaningful and are usually rendered in the
7987 # UI as `#REF!`.
7988 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
7989 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
7990 "sheetId": 42, # The sheet this range is on.
7991 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
7992 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
7993 },
7994 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007995 "findReplace": { # Finds and replaces data in cells over a range, sheet, or all sheets. # Finds and replaces occurrences of some text with other text.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007996 "includeFormulas": True or False, # True if the search should include cells with formulas.
7997 # False to skip cells with formulas.
7998 "matchEntireCell": True or False, # True if the find value should match the entire cell.
7999 "allSheets": True or False, # True to find/replace over all sheets.
8000 "matchCase": True or False, # True if the search is case sensitive.
8001 "sheetId": 42, # The sheet to find/replace over.
8002 "range": { # A range on a sheet. # The range to find/replace over.
8003 # All indexes are zero-based.
8004 # Indexes are half open, e.g the start index is inclusive
8005 # and the end index is exclusive -- [start_index, end_index).
8006 # Missing indexes indicate the range is unbounded on that side.
8007 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008008 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008009 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008010 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008011 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008012 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008013 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008014 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008015 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008016 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008017 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008018 # `Sheet1!A:B == sheet_id: 0,
8019 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008020 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008021 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008022 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008023 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008024 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008025 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008026 #
8027 # The start index must always be less than or equal to the end index.
8028 # If the start index equals the end index, then the range is empty.
8029 # Empty ranges are typically not meaningful and are usually rendered in the
8030 # UI as `#REF!`.
8031 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
8032 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
8033 "sheetId": 42, # The sheet this range is on.
8034 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
8035 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
8036 },
8037 "searchByRegex": True or False, # True if the find value is a regex.
8038 # The regular expression and replacement should follow Java regex rules
8039 # at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html.
8040 # The replacement string is allowed to refer to capturing groups.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008041 # For example, if one cell has the contents `"Google Sheets"` and another
8042 # has `"Google Docs"`, then searching for `"o.* (.*)"` with a replacement of
8043 # `"$1 Rocks"` would change the contents of the cells to
8044 # `"GSheets Rocks"` and `"GDocs Rocks"` respectively.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008045 "find": "A String", # The value to search.
8046 "replacement": "A String", # The value to use as the replacement.
8047 },
8048 "setBasicFilter": { # Sets the basic filter associated with a sheet. # Sets the basic filter on a sheet.
8049 "filter": { # The default filter associated with a sheet. # The filter to set.
8050 "range": { # A range on a sheet. # The range the filter covers.
8051 # All indexes are zero-based.
8052 # Indexes are half open, e.g the start index is inclusive
8053 # and the end index is exclusive -- [start_index, end_index).
8054 # Missing indexes indicate the range is unbounded on that side.
8055 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008056 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008057 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008058 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008059 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008060 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008061 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008062 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008063 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008064 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008065 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008066 # `Sheet1!A:B == sheet_id: 0,
8067 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008068 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008069 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008070 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008071 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008072 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008073 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008074 #
8075 # The start index must always be less than or equal to the end index.
8076 # If the start index equals the end index, then the range is empty.
8077 # Empty ranges are typically not meaningful and are usually rendered in the
8078 # UI as `#REF!`.
8079 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
8080 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
8081 "sheetId": 42, # The sheet this range is on.
8082 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
8083 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
8084 },
8085 "sortSpecs": [ # The sort order per column. Later specifications are used when values
8086 # are equal in the earlier specifications.
8087 { # A sort order associated with a specific column or row.
8088 "sortOrder": "A String", # The order data should be sorted.
8089 "dimensionIndex": 42, # The dimension the sort should be applied to.
8090 },
8091 ],
8092 "criteria": { # The criteria for showing/hiding values per column.
8093 # The map's key is the column index, and the value is the criteria for
8094 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008095 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008096 "hiddenValues": [ # Values that should be hidden.
8097 "A String",
8098 ],
8099 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
8100 # (This does not override hiddenValues -- if a value is listed there,
8101 # it will still be hidden.)
8102 # BooleanConditions are used by conditional formatting,
8103 # data validation, and the criteria in filters.
8104 "type": "A String", # The type of condition.
8105 "values": [ # The values of the condition. The number of supported values depends
8106 # on the condition type. Some support zero values,
8107 # others one or two values,
8108 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
8109 { # The value of the condition.
8110 "relativeDate": "A String", # A relative date (based on the current date).
8111 # Valid only if the type is
8112 # DATE_BEFORE,
8113 # DATE_AFTER,
8114 # DATE_ON_OR_BEFORE or
8115 # DATE_ON_OR_AFTER.
8116 #
8117 # Relative dates are not supported in data validation.
8118 # They are supported only in conditional formatting and
8119 # conditional filters.
8120 "userEnteredValue": "A String", # A value the condition is based on.
8121 # The value will be parsed as if the user typed into a cell.
8122 # Formulas are supported (and must begin with an `=`).
8123 },
8124 ],
8125 },
8126 },
8127 },
8128 },
8129 },
8130 "updateSpreadsheetProperties": { # Updates properties of a spreadsheet. # Updates the spreadsheet's properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008131 "fields": "A String", # The fields that should be updated. At least one field must be specified.
8132 # The root 'properties' is implied and should not be specified.
8133 # A single `"*"` can be used as short-hand for listing every field.
8134 "properties": { # Properties of a spreadsheet. # The properties to update.
8135 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008136 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008137 # * an ISO 639-1 language code such as `en`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008138 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008139 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008140 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008141 # * a combination of the ISO language code and country code, such as `en_US`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008142 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008143 # Note: when updating this field, not all locales/languages are supported.
8144 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
8145 # `America/New_York`. If the time zone isn't recognized, this may
8146 # be a custom time zone such as `GMT-07:00`.
8147 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
8148 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008149 # CellData.effectiveFormat will not be set if the
8150 # cell's format is equal to this default format.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008151 # This field is read-only.
8152 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008153 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
8154 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008155 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008156 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008157 },
8158 "textDirection": "A String", # The direction of the text in the cell.
8159 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
8160 # When updating padding, every field must be specified.
8161 "top": 42, # The top padding of the cell.
8162 "right": 42, # The right padding of the cell.
8163 "bottom": 42, # The bottom padding of the cell.
8164 "left": 42, # The left padding of the cell.
8165 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008166 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008167 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
8168 # for simplicity of conversion to/from color representations in various
8169 # languages over compactness; for example, the fields of this representation
8170 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8171 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8172 # method in iOS; and, with just a little work, it can be easily formatted into
8173 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8174 #
8175 # Example (Java):
8176 #
8177 # import com.google.type.Color;
8178 #
8179 # // ...
8180 # public static java.awt.Color fromProto(Color protocolor) {
8181 # float alpha = protocolor.hasAlpha()
8182 # ? protocolor.getAlpha().getValue()
8183 # : 1.0;
8184 #
8185 # return new java.awt.Color(
8186 # protocolor.getRed(),
8187 # protocolor.getGreen(),
8188 # protocolor.getBlue(),
8189 # alpha);
8190 # }
8191 #
8192 # public static Color toProto(java.awt.Color color) {
8193 # float red = (float) color.getRed();
8194 # float green = (float) color.getGreen();
8195 # float blue = (float) color.getBlue();
8196 # float denominator = 255.0;
8197 # Color.Builder resultBuilder =
8198 # Color
8199 # .newBuilder()
8200 # .setRed(red / denominator)
8201 # .setGreen(green / denominator)
8202 # .setBlue(blue / denominator);
8203 # int alpha = color.getAlpha();
8204 # if (alpha != 255) {
8205 # result.setAlpha(
8206 # FloatValue
8207 # .newBuilder()
8208 # .setValue(((float) alpha) / denominator)
8209 # .build());
8210 # }
8211 # return resultBuilder.build();
8212 # }
8213 # // ...
8214 #
8215 # Example (iOS / Obj-C):
8216 #
8217 # // ...
8218 # static UIColor* fromProto(Color* protocolor) {
8219 # float red = [protocolor red];
8220 # float green = [protocolor green];
8221 # float blue = [protocolor blue];
8222 # FloatValue* alpha_wrapper = [protocolor alpha];
8223 # float alpha = 1.0;
8224 # if (alpha_wrapper != nil) {
8225 # alpha = [alpha_wrapper value];
8226 # }
8227 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8228 # }
8229 #
8230 # static Color* toProto(UIColor* color) {
8231 # CGFloat red, green, blue, alpha;
8232 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8233 # return nil;
8234 # }
8235 # Color* result = [Color alloc] init];
8236 # [result setRed:red];
8237 # [result setGreen:green];
8238 # [result setBlue:blue];
8239 # if (alpha <= 0.9999) {
8240 # [result setAlpha:floatWrapperWithValue(alpha)];
8241 # }
8242 # [result autorelease];
8243 # return result;
8244 # }
8245 # // ...
8246 #
8247 # Example (JavaScript):
8248 #
8249 # // ...
8250 #
8251 # var protoToCssColor = function(rgb_color) {
8252 # var redFrac = rgb_color.red || 0.0;
8253 # var greenFrac = rgb_color.green || 0.0;
8254 # var blueFrac = rgb_color.blue || 0.0;
8255 # var red = Math.floor(redFrac * 255);
8256 # var green = Math.floor(greenFrac * 255);
8257 # var blue = Math.floor(blueFrac * 255);
8258 #
8259 # if (!('alpha' in rgb_color)) {
8260 # return rgbToCssColor_(red, green, blue);
8261 # }
8262 #
8263 # var alphaFrac = rgb_color.alpha.value || 0.0;
8264 # var rgbParams = [red, green, blue].join(',');
8265 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8266 # };
8267 #
8268 # var rgbToCssColor_ = function(red, green, blue) {
8269 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8270 # var hexString = rgbNumber.toString(16);
8271 # var missingZeros = 6 - hexString.length;
8272 # var resultBuilder = ['#'];
8273 # for (var i = 0; i < missingZeros; i++) {
8274 # resultBuilder.push('0');
8275 # }
8276 # resultBuilder.push(hexString);
8277 # return resultBuilder.join('');
8278 # };
8279 #
8280 # // ...
8281 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8282 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8283 # the final pixel color is defined by the equation:
8284 #
8285 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8286 #
8287 # This means that a value of 1.0 corresponds to a solid color, whereas
8288 # a value of 0.0 corresponds to a completely transparent color. This
8289 # uses a wrapper message rather than a simple float scalar so that it is
8290 # possible to distinguish between a default value and the value being unset.
8291 # If omitted, this color object is to be rendered as a solid color
8292 # (as if the alpha value had been explicitly given with a value of 1.0).
8293 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8294 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8295 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008296 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008297 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
8298 # Absent values indicate that the field isn't specified.
8299 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
8300 # for simplicity of conversion to/from color representations in various
8301 # languages over compactness; for example, the fields of this representation
8302 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8303 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8304 # method in iOS; and, with just a little work, it can be easily formatted into
8305 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8306 #
8307 # Example (Java):
8308 #
8309 # import com.google.type.Color;
8310 #
8311 # // ...
8312 # public static java.awt.Color fromProto(Color protocolor) {
8313 # float alpha = protocolor.hasAlpha()
8314 # ? protocolor.getAlpha().getValue()
8315 # : 1.0;
8316 #
8317 # return new java.awt.Color(
8318 # protocolor.getRed(),
8319 # protocolor.getGreen(),
8320 # protocolor.getBlue(),
8321 # alpha);
8322 # }
8323 #
8324 # public static Color toProto(java.awt.Color color) {
8325 # float red = (float) color.getRed();
8326 # float green = (float) color.getGreen();
8327 # float blue = (float) color.getBlue();
8328 # float denominator = 255.0;
8329 # Color.Builder resultBuilder =
8330 # Color
8331 # .newBuilder()
8332 # .setRed(red / denominator)
8333 # .setGreen(green / denominator)
8334 # .setBlue(blue / denominator);
8335 # int alpha = color.getAlpha();
8336 # if (alpha != 255) {
8337 # result.setAlpha(
8338 # FloatValue
8339 # .newBuilder()
8340 # .setValue(((float) alpha) / denominator)
8341 # .build());
8342 # }
8343 # return resultBuilder.build();
8344 # }
8345 # // ...
8346 #
8347 # Example (iOS / Obj-C):
8348 #
8349 # // ...
8350 # static UIColor* fromProto(Color* protocolor) {
8351 # float red = [protocolor red];
8352 # float green = [protocolor green];
8353 # float blue = [protocolor blue];
8354 # FloatValue* alpha_wrapper = [protocolor alpha];
8355 # float alpha = 1.0;
8356 # if (alpha_wrapper != nil) {
8357 # alpha = [alpha_wrapper value];
8358 # }
8359 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8360 # }
8361 #
8362 # static Color* toProto(UIColor* color) {
8363 # CGFloat red, green, blue, alpha;
8364 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8365 # return nil;
8366 # }
8367 # Color* result = [Color alloc] init];
8368 # [result setRed:red];
8369 # [result setGreen:green];
8370 # [result setBlue:blue];
8371 # if (alpha <= 0.9999) {
8372 # [result setAlpha:floatWrapperWithValue(alpha)];
8373 # }
8374 # [result autorelease];
8375 # return result;
8376 # }
8377 # // ...
8378 #
8379 # Example (JavaScript):
8380 #
8381 # // ...
8382 #
8383 # var protoToCssColor = function(rgb_color) {
8384 # var redFrac = rgb_color.red || 0.0;
8385 # var greenFrac = rgb_color.green || 0.0;
8386 # var blueFrac = rgb_color.blue || 0.0;
8387 # var red = Math.floor(redFrac * 255);
8388 # var green = Math.floor(greenFrac * 255);
8389 # var blue = Math.floor(blueFrac * 255);
8390 #
8391 # if (!('alpha' in rgb_color)) {
8392 # return rgbToCssColor_(red, green, blue);
8393 # }
8394 #
8395 # var alphaFrac = rgb_color.alpha.value || 0.0;
8396 # var rgbParams = [red, green, blue].join(',');
8397 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8398 # };
8399 #
8400 # var rgbToCssColor_ = function(red, green, blue) {
8401 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8402 # var hexString = rgbNumber.toString(16);
8403 # var missingZeros = 6 - hexString.length;
8404 # var resultBuilder = ['#'];
8405 # for (var i = 0; i < missingZeros; i++) {
8406 # resultBuilder.push('0');
8407 # }
8408 # resultBuilder.push(hexString);
8409 # return resultBuilder.join('');
8410 # };
8411 #
8412 # // ...
8413 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8414 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8415 # the final pixel color is defined by the equation:
8416 #
8417 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8418 #
8419 # This means that a value of 1.0 corresponds to a solid color, whereas
8420 # a value of 0.0 corresponds to a completely transparent color. This
8421 # uses a wrapper message rather than a simple float scalar so that it is
8422 # possible to distinguish between a default value and the value being unset.
8423 # If omitted, this color object is to be rendered as a solid color
8424 # (as if the alpha value had been explicitly given with a value of 1.0).
8425 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8426 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8427 },
8428 "bold": True or False, # True if the text is bold.
8429 "strikethrough": True or False, # True if the text has a strikethrough.
8430 "fontFamily": "A String", # The font family.
8431 "fontSize": 42, # The size of the font.
8432 "italic": True or False, # True if the text is italicized.
8433 "underline": True or False, # True if the text is underlined.
8434 },
8435 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
8436 "borders": { # The borders of the cell. # The borders of the cell.
8437 "top": { # A border along a cell. # The top border of the cell.
8438 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8439 # for simplicity of conversion to/from color representations in various
8440 # languages over compactness; for example, the fields of this representation
8441 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8442 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8443 # method in iOS; and, with just a little work, it can be easily formatted into
8444 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8445 #
8446 # Example (Java):
8447 #
8448 # import com.google.type.Color;
8449 #
8450 # // ...
8451 # public static java.awt.Color fromProto(Color protocolor) {
8452 # float alpha = protocolor.hasAlpha()
8453 # ? protocolor.getAlpha().getValue()
8454 # : 1.0;
8455 #
8456 # return new java.awt.Color(
8457 # protocolor.getRed(),
8458 # protocolor.getGreen(),
8459 # protocolor.getBlue(),
8460 # alpha);
8461 # }
8462 #
8463 # public static Color toProto(java.awt.Color color) {
8464 # float red = (float) color.getRed();
8465 # float green = (float) color.getGreen();
8466 # float blue = (float) color.getBlue();
8467 # float denominator = 255.0;
8468 # Color.Builder resultBuilder =
8469 # Color
8470 # .newBuilder()
8471 # .setRed(red / denominator)
8472 # .setGreen(green / denominator)
8473 # .setBlue(blue / denominator);
8474 # int alpha = color.getAlpha();
8475 # if (alpha != 255) {
8476 # result.setAlpha(
8477 # FloatValue
8478 # .newBuilder()
8479 # .setValue(((float) alpha) / denominator)
8480 # .build());
8481 # }
8482 # return resultBuilder.build();
8483 # }
8484 # // ...
8485 #
8486 # Example (iOS / Obj-C):
8487 #
8488 # // ...
8489 # static UIColor* fromProto(Color* protocolor) {
8490 # float red = [protocolor red];
8491 # float green = [protocolor green];
8492 # float blue = [protocolor blue];
8493 # FloatValue* alpha_wrapper = [protocolor alpha];
8494 # float alpha = 1.0;
8495 # if (alpha_wrapper != nil) {
8496 # alpha = [alpha_wrapper value];
8497 # }
8498 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8499 # }
8500 #
8501 # static Color* toProto(UIColor* color) {
8502 # CGFloat red, green, blue, alpha;
8503 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8504 # return nil;
8505 # }
8506 # Color* result = [Color alloc] init];
8507 # [result setRed:red];
8508 # [result setGreen:green];
8509 # [result setBlue:blue];
8510 # if (alpha <= 0.9999) {
8511 # [result setAlpha:floatWrapperWithValue(alpha)];
8512 # }
8513 # [result autorelease];
8514 # return result;
8515 # }
8516 # // ...
8517 #
8518 # Example (JavaScript):
8519 #
8520 # // ...
8521 #
8522 # var protoToCssColor = function(rgb_color) {
8523 # var redFrac = rgb_color.red || 0.0;
8524 # var greenFrac = rgb_color.green || 0.0;
8525 # var blueFrac = rgb_color.blue || 0.0;
8526 # var red = Math.floor(redFrac * 255);
8527 # var green = Math.floor(greenFrac * 255);
8528 # var blue = Math.floor(blueFrac * 255);
8529 #
8530 # if (!('alpha' in rgb_color)) {
8531 # return rgbToCssColor_(red, green, blue);
8532 # }
8533 #
8534 # var alphaFrac = rgb_color.alpha.value || 0.0;
8535 # var rgbParams = [red, green, blue].join(',');
8536 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8537 # };
8538 #
8539 # var rgbToCssColor_ = function(red, green, blue) {
8540 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8541 # var hexString = rgbNumber.toString(16);
8542 # var missingZeros = 6 - hexString.length;
8543 # var resultBuilder = ['#'];
8544 # for (var i = 0; i < missingZeros; i++) {
8545 # resultBuilder.push('0');
8546 # }
8547 # resultBuilder.push(hexString);
8548 # return resultBuilder.join('');
8549 # };
8550 #
8551 # // ...
8552 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8553 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8554 # the final pixel color is defined by the equation:
8555 #
8556 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8557 #
8558 # This means that a value of 1.0 corresponds to a solid color, whereas
8559 # a value of 0.0 corresponds to a completely transparent color. This
8560 # uses a wrapper message rather than a simple float scalar so that it is
8561 # possible to distinguish between a default value and the value being unset.
8562 # If omitted, this color object is to be rendered as a solid color
8563 # (as if the alpha value had been explicitly given with a value of 1.0).
8564 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8565 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8566 },
8567 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008568 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008569 "style": "A String", # The style of the border.
8570 },
8571 "right": { # A border along a cell. # The right border of the cell.
8572 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8573 # for simplicity of conversion to/from color representations in various
8574 # languages over compactness; for example, the fields of this representation
8575 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8576 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8577 # method in iOS; and, with just a little work, it can be easily formatted into
8578 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8579 #
8580 # Example (Java):
8581 #
8582 # import com.google.type.Color;
8583 #
8584 # // ...
8585 # public static java.awt.Color fromProto(Color protocolor) {
8586 # float alpha = protocolor.hasAlpha()
8587 # ? protocolor.getAlpha().getValue()
8588 # : 1.0;
8589 #
8590 # return new java.awt.Color(
8591 # protocolor.getRed(),
8592 # protocolor.getGreen(),
8593 # protocolor.getBlue(),
8594 # alpha);
8595 # }
8596 #
8597 # public static Color toProto(java.awt.Color color) {
8598 # float red = (float) color.getRed();
8599 # float green = (float) color.getGreen();
8600 # float blue = (float) color.getBlue();
8601 # float denominator = 255.0;
8602 # Color.Builder resultBuilder =
8603 # Color
8604 # .newBuilder()
8605 # .setRed(red / denominator)
8606 # .setGreen(green / denominator)
8607 # .setBlue(blue / denominator);
8608 # int alpha = color.getAlpha();
8609 # if (alpha != 255) {
8610 # result.setAlpha(
8611 # FloatValue
8612 # .newBuilder()
8613 # .setValue(((float) alpha) / denominator)
8614 # .build());
8615 # }
8616 # return resultBuilder.build();
8617 # }
8618 # // ...
8619 #
8620 # Example (iOS / Obj-C):
8621 #
8622 # // ...
8623 # static UIColor* fromProto(Color* protocolor) {
8624 # float red = [protocolor red];
8625 # float green = [protocolor green];
8626 # float blue = [protocolor blue];
8627 # FloatValue* alpha_wrapper = [protocolor alpha];
8628 # float alpha = 1.0;
8629 # if (alpha_wrapper != nil) {
8630 # alpha = [alpha_wrapper value];
8631 # }
8632 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8633 # }
8634 #
8635 # static Color* toProto(UIColor* color) {
8636 # CGFloat red, green, blue, alpha;
8637 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8638 # return nil;
8639 # }
8640 # Color* result = [Color alloc] init];
8641 # [result setRed:red];
8642 # [result setGreen:green];
8643 # [result setBlue:blue];
8644 # if (alpha <= 0.9999) {
8645 # [result setAlpha:floatWrapperWithValue(alpha)];
8646 # }
8647 # [result autorelease];
8648 # return result;
8649 # }
8650 # // ...
8651 #
8652 # Example (JavaScript):
8653 #
8654 # // ...
8655 #
8656 # var protoToCssColor = function(rgb_color) {
8657 # var redFrac = rgb_color.red || 0.0;
8658 # var greenFrac = rgb_color.green || 0.0;
8659 # var blueFrac = rgb_color.blue || 0.0;
8660 # var red = Math.floor(redFrac * 255);
8661 # var green = Math.floor(greenFrac * 255);
8662 # var blue = Math.floor(blueFrac * 255);
8663 #
8664 # if (!('alpha' in rgb_color)) {
8665 # return rgbToCssColor_(red, green, blue);
8666 # }
8667 #
8668 # var alphaFrac = rgb_color.alpha.value || 0.0;
8669 # var rgbParams = [red, green, blue].join(',');
8670 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8671 # };
8672 #
8673 # var rgbToCssColor_ = function(red, green, blue) {
8674 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8675 # var hexString = rgbNumber.toString(16);
8676 # var missingZeros = 6 - hexString.length;
8677 # var resultBuilder = ['#'];
8678 # for (var i = 0; i < missingZeros; i++) {
8679 # resultBuilder.push('0');
8680 # }
8681 # resultBuilder.push(hexString);
8682 # return resultBuilder.join('');
8683 # };
8684 #
8685 # // ...
8686 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8687 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8688 # the final pixel color is defined by the equation:
8689 #
8690 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8691 #
8692 # This means that a value of 1.0 corresponds to a solid color, whereas
8693 # a value of 0.0 corresponds to a completely transparent color. This
8694 # uses a wrapper message rather than a simple float scalar so that it is
8695 # possible to distinguish between a default value and the value being unset.
8696 # If omitted, this color object is to be rendered as a solid color
8697 # (as if the alpha value had been explicitly given with a value of 1.0).
8698 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8699 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8700 },
8701 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008702 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008703 "style": "A String", # The style of the border.
8704 },
8705 "bottom": { # A border along a cell. # The bottom border of the cell.
8706 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8707 # for simplicity of conversion to/from color representations in various
8708 # languages over compactness; for example, the fields of this representation
8709 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8710 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8711 # method in iOS; and, with just a little work, it can be easily formatted into
8712 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8713 #
8714 # Example (Java):
8715 #
8716 # import com.google.type.Color;
8717 #
8718 # // ...
8719 # public static java.awt.Color fromProto(Color protocolor) {
8720 # float alpha = protocolor.hasAlpha()
8721 # ? protocolor.getAlpha().getValue()
8722 # : 1.0;
8723 #
8724 # return new java.awt.Color(
8725 # protocolor.getRed(),
8726 # protocolor.getGreen(),
8727 # protocolor.getBlue(),
8728 # alpha);
8729 # }
8730 #
8731 # public static Color toProto(java.awt.Color color) {
8732 # float red = (float) color.getRed();
8733 # float green = (float) color.getGreen();
8734 # float blue = (float) color.getBlue();
8735 # float denominator = 255.0;
8736 # Color.Builder resultBuilder =
8737 # Color
8738 # .newBuilder()
8739 # .setRed(red / denominator)
8740 # .setGreen(green / denominator)
8741 # .setBlue(blue / denominator);
8742 # int alpha = color.getAlpha();
8743 # if (alpha != 255) {
8744 # result.setAlpha(
8745 # FloatValue
8746 # .newBuilder()
8747 # .setValue(((float) alpha) / denominator)
8748 # .build());
8749 # }
8750 # return resultBuilder.build();
8751 # }
8752 # // ...
8753 #
8754 # Example (iOS / Obj-C):
8755 #
8756 # // ...
8757 # static UIColor* fromProto(Color* protocolor) {
8758 # float red = [protocolor red];
8759 # float green = [protocolor green];
8760 # float blue = [protocolor blue];
8761 # FloatValue* alpha_wrapper = [protocolor alpha];
8762 # float alpha = 1.0;
8763 # if (alpha_wrapper != nil) {
8764 # alpha = [alpha_wrapper value];
8765 # }
8766 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8767 # }
8768 #
8769 # static Color* toProto(UIColor* color) {
8770 # CGFloat red, green, blue, alpha;
8771 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8772 # return nil;
8773 # }
8774 # Color* result = [Color alloc] init];
8775 # [result setRed:red];
8776 # [result setGreen:green];
8777 # [result setBlue:blue];
8778 # if (alpha <= 0.9999) {
8779 # [result setAlpha:floatWrapperWithValue(alpha)];
8780 # }
8781 # [result autorelease];
8782 # return result;
8783 # }
8784 # // ...
8785 #
8786 # Example (JavaScript):
8787 #
8788 # // ...
8789 #
8790 # var protoToCssColor = function(rgb_color) {
8791 # var redFrac = rgb_color.red || 0.0;
8792 # var greenFrac = rgb_color.green || 0.0;
8793 # var blueFrac = rgb_color.blue || 0.0;
8794 # var red = Math.floor(redFrac * 255);
8795 # var green = Math.floor(greenFrac * 255);
8796 # var blue = Math.floor(blueFrac * 255);
8797 #
8798 # if (!('alpha' in rgb_color)) {
8799 # return rgbToCssColor_(red, green, blue);
8800 # }
8801 #
8802 # var alphaFrac = rgb_color.alpha.value || 0.0;
8803 # var rgbParams = [red, green, blue].join(',');
8804 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8805 # };
8806 #
8807 # var rgbToCssColor_ = function(red, green, blue) {
8808 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8809 # var hexString = rgbNumber.toString(16);
8810 # var missingZeros = 6 - hexString.length;
8811 # var resultBuilder = ['#'];
8812 # for (var i = 0; i < missingZeros; i++) {
8813 # resultBuilder.push('0');
8814 # }
8815 # resultBuilder.push(hexString);
8816 # return resultBuilder.join('');
8817 # };
8818 #
8819 # // ...
8820 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8821 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8822 # the final pixel color is defined by the equation:
8823 #
8824 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8825 #
8826 # This means that a value of 1.0 corresponds to a solid color, whereas
8827 # a value of 0.0 corresponds to a completely transparent color. This
8828 # uses a wrapper message rather than a simple float scalar so that it is
8829 # possible to distinguish between a default value and the value being unset.
8830 # If omitted, this color object is to be rendered as a solid color
8831 # (as if the alpha value had been explicitly given with a value of 1.0).
8832 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8833 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8834 },
8835 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008836 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008837 "style": "A String", # The style of the border.
8838 },
8839 "left": { # A border along a cell. # The left border of the cell.
8840 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8841 # for simplicity of conversion to/from color representations in various
8842 # languages over compactness; for example, the fields of this representation
8843 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8844 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8845 # method in iOS; and, with just a little work, it can be easily formatted into
8846 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8847 #
8848 # Example (Java):
8849 #
8850 # import com.google.type.Color;
8851 #
8852 # // ...
8853 # public static java.awt.Color fromProto(Color protocolor) {
8854 # float alpha = protocolor.hasAlpha()
8855 # ? protocolor.getAlpha().getValue()
8856 # : 1.0;
8857 #
8858 # return new java.awt.Color(
8859 # protocolor.getRed(),
8860 # protocolor.getGreen(),
8861 # protocolor.getBlue(),
8862 # alpha);
8863 # }
8864 #
8865 # public static Color toProto(java.awt.Color color) {
8866 # float red = (float) color.getRed();
8867 # float green = (float) color.getGreen();
8868 # float blue = (float) color.getBlue();
8869 # float denominator = 255.0;
8870 # Color.Builder resultBuilder =
8871 # Color
8872 # .newBuilder()
8873 # .setRed(red / denominator)
8874 # .setGreen(green / denominator)
8875 # .setBlue(blue / denominator);
8876 # int alpha = color.getAlpha();
8877 # if (alpha != 255) {
8878 # result.setAlpha(
8879 # FloatValue
8880 # .newBuilder()
8881 # .setValue(((float) alpha) / denominator)
8882 # .build());
8883 # }
8884 # return resultBuilder.build();
8885 # }
8886 # // ...
8887 #
8888 # Example (iOS / Obj-C):
8889 #
8890 # // ...
8891 # static UIColor* fromProto(Color* protocolor) {
8892 # float red = [protocolor red];
8893 # float green = [protocolor green];
8894 # float blue = [protocolor blue];
8895 # FloatValue* alpha_wrapper = [protocolor alpha];
8896 # float alpha = 1.0;
8897 # if (alpha_wrapper != nil) {
8898 # alpha = [alpha_wrapper value];
8899 # }
8900 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8901 # }
8902 #
8903 # static Color* toProto(UIColor* color) {
8904 # CGFloat red, green, blue, alpha;
8905 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8906 # return nil;
8907 # }
8908 # Color* result = [Color alloc] init];
8909 # [result setRed:red];
8910 # [result setGreen:green];
8911 # [result setBlue:blue];
8912 # if (alpha <= 0.9999) {
8913 # [result setAlpha:floatWrapperWithValue(alpha)];
8914 # }
8915 # [result autorelease];
8916 # return result;
8917 # }
8918 # // ...
8919 #
8920 # Example (JavaScript):
8921 #
8922 # // ...
8923 #
8924 # var protoToCssColor = function(rgb_color) {
8925 # var redFrac = rgb_color.red || 0.0;
8926 # var greenFrac = rgb_color.green || 0.0;
8927 # var blueFrac = rgb_color.blue || 0.0;
8928 # var red = Math.floor(redFrac * 255);
8929 # var green = Math.floor(greenFrac * 255);
8930 # var blue = Math.floor(blueFrac * 255);
8931 #
8932 # if (!('alpha' in rgb_color)) {
8933 # return rgbToCssColor_(red, green, blue);
8934 # }
8935 #
8936 # var alphaFrac = rgb_color.alpha.value || 0.0;
8937 # var rgbParams = [red, green, blue].join(',');
8938 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8939 # };
8940 #
8941 # var rgbToCssColor_ = function(red, green, blue) {
8942 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8943 # var hexString = rgbNumber.toString(16);
8944 # var missingZeros = 6 - hexString.length;
8945 # var resultBuilder = ['#'];
8946 # for (var i = 0; i < missingZeros; i++) {
8947 # resultBuilder.push('0');
8948 # }
8949 # resultBuilder.push(hexString);
8950 # return resultBuilder.join('');
8951 # };
8952 #
8953 # // ...
8954 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8955 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8956 # the final pixel color is defined by the equation:
8957 #
8958 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8959 #
8960 # This means that a value of 1.0 corresponds to a solid color, whereas
8961 # a value of 0.0 corresponds to a completely transparent color. This
8962 # uses a wrapper message rather than a simple float scalar so that it is
8963 # possible to distinguish between a default value and the value being unset.
8964 # If omitted, this color object is to be rendered as a solid color
8965 # (as if the alpha value had been explicitly given with a value of 1.0).
8966 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8967 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8968 },
8969 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008970 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008971 "style": "A String", # The style of the border.
8972 },
8973 },
8974 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
8975 },
8976 "title": "A String", # The title of the spreadsheet.
8977 },
8978 },
8979 "updateCells": { # Updates all cells in a range with new data. # Updates many cells at once.
8980 "fields": "A String", # The fields of CellData that should be updated.
8981 # At least one field must be specified.
8982 # The root is the CellData; 'row.values.' should not be specified.
8983 # A single `"*"` can be used as short-hand for listing every field.
8984 "range": { # A range on a sheet. # The range to write data to.
8985 #
8986 # If the data in rows does not cover the entire requested range,
8987 # the fields matching those set in fields will be cleared.
8988 # All indexes are zero-based.
8989 # Indexes are half open, e.g the start index is inclusive
8990 # and the end index is exclusive -- [start_index, end_index).
8991 # Missing indexes indicate the range is unbounded on that side.
8992 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008993 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008994 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008995 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008996 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008997 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008998 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008999 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009000 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009001 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009002 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009003 # `Sheet1!A:B == sheet_id: 0,
9004 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009005 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009006 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009007 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009008 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009009 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009010 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009011 #
9012 # The start index must always be less than or equal to the end index.
9013 # If the start index equals the end index, then the range is empty.
9014 # Empty ranges are typically not meaningful and are usually rendered in the
9015 # UI as `#REF!`.
9016 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
9017 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
9018 "sheetId": 42, # The sheet this range is on.
9019 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
9020 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
9021 },
9022 "rows": [ # The data to write.
9023 { # Data about each cell in a row.
9024 "values": [ # The values in the row, one per column.
9025 { # Data about a specific cell.
9026 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
9027 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009028 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009029 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009030 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009031 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
9032 # or vertically (as rows).
9033 "rows": [ # Each row grouping in the pivot table.
9034 { # A single grouping (either row or column) in a pivot table.
9035 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
9036 "valueMetadata": [ # Metadata about values in the grouping.
9037 { # Metadata about a value in a pivot grouping.
9038 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
9039 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
9040 # (Note that formulaValue is not valid,
9041 # because the values will be calculated.)
9042 "numberValue": 3.14, # Represents a double value.
9043 # Note: Dates, Times and DateTimes are represented as doubles in
9044 # "serial number" format.
9045 "boolValue": True or False, # Represents a boolean value.
9046 "formulaValue": "A String", # Represents a formula.
9047 "stringValue": "A String", # Represents a string value.
9048 # Leading single quotes are not included. For example, if the user typed
9049 # `'123` into the UI, this would be represented as a `stringValue` of
9050 # `"123"`.
9051 "errorValue": { # An error in a cell. # Represents an error.
9052 # This field is read-only.
9053 "message": "A String", # A message with more information about the error
9054 # (in the spreadsheet's locale).
9055 "type": "A String", # The type of error.
9056 },
9057 },
9058 },
9059 ],
9060 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
9061 # If not specified, sorting is alphabetical by this group's values.
9062 "buckets": [ # Determines the bucket from which values are chosen to sort.
9063 #
9064 # For example, in a pivot table with one row group & two column groups,
9065 # the row group can list up to two values. The first value corresponds
9066 # to a value within the first column group, and the second value
9067 # corresponds to a value in the second column group. If no values
9068 # are listed, this would indicate that the row should be sorted according
9069 # to the "Grand Total" over the column groups. If a single value is listed,
9070 # this would correspond to using the "Total" of that bucket.
9071 { # The kinds of value that a cell in a spreadsheet can have.
9072 "numberValue": 3.14, # Represents a double value.
9073 # Note: Dates, Times and DateTimes are represented as doubles in
9074 # "serial number" format.
9075 "boolValue": True or False, # Represents a boolean value.
9076 "formulaValue": "A String", # Represents a formula.
9077 "stringValue": "A String", # Represents a string value.
9078 # Leading single quotes are not included. For example, if the user typed
9079 # `'123` into the UI, this would be represented as a `stringValue` of
9080 # `"123"`.
9081 "errorValue": { # An error in a cell. # Represents an error.
9082 # This field is read-only.
9083 "message": "A String", # A message with more information about the error
9084 # (in the spreadsheet's locale).
9085 "type": "A String", # The type of error.
9086 },
9087 },
9088 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009089 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009090 # grouping should be sorted by.
9091 },
9092 "sortOrder": "A String", # The order the values in this group should be sorted.
9093 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
9094 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009095 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009096 # means this group refers to column `C`, whereas the offset `1` would refer
9097 # to column `D`.
9098 },
9099 ],
9100 "source": { # A range on a sheet. # The range the pivot table is reading data from.
9101 # All indexes are zero-based.
9102 # Indexes are half open, e.g the start index is inclusive
9103 # and the end index is exclusive -- [start_index, end_index).
9104 # Missing indexes indicate the range is unbounded on that side.
9105 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009106 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009107 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009108 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009109 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009110 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009111 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009112 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009113 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009114 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009115 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009116 # `Sheet1!A:B == sheet_id: 0,
9117 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009118 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009119 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009120 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009121 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009122 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009123 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009124 #
9125 # The start index must always be less than or equal to the end index.
9126 # If the start index equals the end index, then the range is empty.
9127 # Empty ranges are typically not meaningful and are usually rendered in the
9128 # UI as `#REF!`.
9129 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
9130 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
9131 "sheetId": 42, # The sheet this range is on.
9132 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
9133 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
9134 },
9135 "values": [ # A list of values to include in the pivot table.
9136 { # The definition of how a value in a pivot table should be calculated.
9137 "formula": "A String", # A custom formula to calculate the value. The formula must start
9138 # with an `=` character.
9139 "summarizeFunction": "A String", # A function to summarize the value.
9140 # If formula is set, the only supported values are
9141 # SUM and
9142 # CUSTOM.
9143 # If sourceColumnOffset is set, then `CUSTOM`
9144 # is not supported.
9145 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
9146 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009147 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009148 # means this value refers to column `C`, whereas the offset `1` would
9149 # refer to column `D`.
9150 "name": "A String", # A name to use for the value. This is only used if formula was set.
9151 # Otherwise, the column name is used.
9152 },
9153 ],
9154 "criteria": { # An optional mapping of filters per source column offset.
9155 #
9156 # The filters will be applied before aggregating data into the pivot table.
9157 # The map's key is the column offset of the source range that you want to
9158 # filter, and the value is the criteria for that column.
9159 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009160 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009161 # for column `C`, whereas the key `1` is for column `D`.
9162 "a_key": { # Criteria for showing/hiding rows in a pivot table.
9163 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
9164 "A String",
9165 ],
9166 },
9167 },
9168 "columns": [ # Each column grouping in the pivot table.
9169 { # A single grouping (either row or column) in a pivot table.
9170 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
9171 "valueMetadata": [ # Metadata about values in the grouping.
9172 { # Metadata about a value in a pivot grouping.
9173 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
9174 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
9175 # (Note that formulaValue is not valid,
9176 # because the values will be calculated.)
9177 "numberValue": 3.14, # Represents a double value.
9178 # Note: Dates, Times and DateTimes are represented as doubles in
9179 # "serial number" format.
9180 "boolValue": True or False, # Represents a boolean value.
9181 "formulaValue": "A String", # Represents a formula.
9182 "stringValue": "A String", # Represents a string value.
9183 # Leading single quotes are not included. For example, if the user typed
9184 # `'123` into the UI, this would be represented as a `stringValue` of
9185 # `"123"`.
9186 "errorValue": { # An error in a cell. # Represents an error.
9187 # This field is read-only.
9188 "message": "A String", # A message with more information about the error
9189 # (in the spreadsheet's locale).
9190 "type": "A String", # The type of error.
9191 },
9192 },
9193 },
9194 ],
9195 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
9196 # If not specified, sorting is alphabetical by this group's values.
9197 "buckets": [ # Determines the bucket from which values are chosen to sort.
9198 #
9199 # For example, in a pivot table with one row group & two column groups,
9200 # the row group can list up to two values. The first value corresponds
9201 # to a value within the first column group, and the second value
9202 # corresponds to a value in the second column group. If no values
9203 # are listed, this would indicate that the row should be sorted according
9204 # to the "Grand Total" over the column groups. If a single value is listed,
9205 # this would correspond to using the "Total" of that bucket.
9206 { # The kinds of value that a cell in a spreadsheet can have.
9207 "numberValue": 3.14, # Represents a double value.
9208 # Note: Dates, Times and DateTimes are represented as doubles in
9209 # "serial number" format.
9210 "boolValue": True or False, # Represents a boolean value.
9211 "formulaValue": "A String", # Represents a formula.
9212 "stringValue": "A String", # Represents a string value.
9213 # Leading single quotes are not included. For example, if the user typed
9214 # `'123` into the UI, this would be represented as a `stringValue` of
9215 # `"123"`.
9216 "errorValue": { # An error in a cell. # Represents an error.
9217 # This field is read-only.
9218 "message": "A String", # A message with more information about the error
9219 # (in the spreadsheet's locale).
9220 "type": "A String", # The type of error.
9221 },
9222 },
9223 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009224 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009225 # grouping should be sorted by.
9226 },
9227 "sortOrder": "A String", # The order the values in this group should be sorted.
9228 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
9229 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009230 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009231 # means this group refers to column `C`, whereas the offset `1` would refer
9232 # to column `D`.
9233 },
9234 ],
9235 },
9236 "hyperlink": "A String", # A hyperlink this cell points to, if any.
9237 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
9238 "effectiveValue": { # The kinds of value that a cell in a spreadsheet can have. # The effective value of the cell. For cells with formulas, this will be
9239 # the calculated value. For cells with literals, this will be
9240 # the same as the user_entered_value.
9241 # This field is read-only.
9242 "numberValue": 3.14, # Represents a double value.
9243 # Note: Dates, Times and DateTimes are represented as doubles in
9244 # "serial number" format.
9245 "boolValue": True or False, # Represents a boolean value.
9246 "formulaValue": "A String", # Represents a formula.
9247 "stringValue": "A String", # Represents a string value.
9248 # Leading single quotes are not included. For example, if the user typed
9249 # `'123` into the UI, this would be represented as a `stringValue` of
9250 # `"123"`.
9251 "errorValue": { # An error in a cell. # Represents an error.
9252 # This field is read-only.
9253 "message": "A String", # A message with more information about the error
9254 # (in the spreadsheet's locale).
9255 "type": "A String", # The type of error.
9256 },
9257 },
9258 "formattedValue": "A String", # The formatted value of the cell.
9259 # This is the value as it's shown to the user.
9260 # This field is read-only.
9261 "userEnteredValue": { # The kinds of value that a cell in a spreadsheet can have. # The value the user entered in the cell. e.g, `1234`, `'Hello'`, or `=NOW()`
9262 # Note: Dates, Times and DateTimes are represented as doubles in
9263 # serial number format.
9264 "numberValue": 3.14, # Represents a double value.
9265 # Note: Dates, Times and DateTimes are represented as doubles in
9266 # "serial number" format.
9267 "boolValue": True or False, # Represents a boolean value.
9268 "formulaValue": "A String", # Represents a formula.
9269 "stringValue": "A String", # Represents a string value.
9270 # Leading single quotes are not included. For example, if the user typed
9271 # `'123` into the UI, this would be represented as a `stringValue` of
9272 # `"123"`.
9273 "errorValue": { # An error in a cell. # Represents an error.
9274 # This field is read-only.
9275 "message": "A String", # A message with more information about the error
9276 # (in the spreadsheet's locale).
9277 "type": "A String", # The type of error.
9278 },
9279 },
9280 "note": "A String", # Any note on the cell.
9281 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
9282 # This includes the results of applying any conditional formatting and,
9283 # if the cell contains a formula, the computed number format.
9284 # If the effective format is the default format, effective format will
9285 # not be written.
9286 # This field is read-only.
9287 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009288 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
9289 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009290 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009291 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009292 },
9293 "textDirection": "A String", # The direction of the text in the cell.
9294 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
9295 # When updating padding, every field must be specified.
9296 "top": 42, # The top padding of the cell.
9297 "right": 42, # The right padding of the cell.
9298 "bottom": 42, # The bottom padding of the cell.
9299 "left": 42, # The left padding of the cell.
9300 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009301 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009302 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
9303 # for simplicity of conversion to/from color representations in various
9304 # languages over compactness; for example, the fields of this representation
9305 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9306 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9307 # method in iOS; and, with just a little work, it can be easily formatted into
9308 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9309 #
9310 # Example (Java):
9311 #
9312 # import com.google.type.Color;
9313 #
9314 # // ...
9315 # public static java.awt.Color fromProto(Color protocolor) {
9316 # float alpha = protocolor.hasAlpha()
9317 # ? protocolor.getAlpha().getValue()
9318 # : 1.0;
9319 #
9320 # return new java.awt.Color(
9321 # protocolor.getRed(),
9322 # protocolor.getGreen(),
9323 # protocolor.getBlue(),
9324 # alpha);
9325 # }
9326 #
9327 # public static Color toProto(java.awt.Color color) {
9328 # float red = (float) color.getRed();
9329 # float green = (float) color.getGreen();
9330 # float blue = (float) color.getBlue();
9331 # float denominator = 255.0;
9332 # Color.Builder resultBuilder =
9333 # Color
9334 # .newBuilder()
9335 # .setRed(red / denominator)
9336 # .setGreen(green / denominator)
9337 # .setBlue(blue / denominator);
9338 # int alpha = color.getAlpha();
9339 # if (alpha != 255) {
9340 # result.setAlpha(
9341 # FloatValue
9342 # .newBuilder()
9343 # .setValue(((float) alpha) / denominator)
9344 # .build());
9345 # }
9346 # return resultBuilder.build();
9347 # }
9348 # // ...
9349 #
9350 # Example (iOS / Obj-C):
9351 #
9352 # // ...
9353 # static UIColor* fromProto(Color* protocolor) {
9354 # float red = [protocolor red];
9355 # float green = [protocolor green];
9356 # float blue = [protocolor blue];
9357 # FloatValue* alpha_wrapper = [protocolor alpha];
9358 # float alpha = 1.0;
9359 # if (alpha_wrapper != nil) {
9360 # alpha = [alpha_wrapper value];
9361 # }
9362 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9363 # }
9364 #
9365 # static Color* toProto(UIColor* color) {
9366 # CGFloat red, green, blue, alpha;
9367 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9368 # return nil;
9369 # }
9370 # Color* result = [Color alloc] init];
9371 # [result setRed:red];
9372 # [result setGreen:green];
9373 # [result setBlue:blue];
9374 # if (alpha <= 0.9999) {
9375 # [result setAlpha:floatWrapperWithValue(alpha)];
9376 # }
9377 # [result autorelease];
9378 # return result;
9379 # }
9380 # // ...
9381 #
9382 # Example (JavaScript):
9383 #
9384 # // ...
9385 #
9386 # var protoToCssColor = function(rgb_color) {
9387 # var redFrac = rgb_color.red || 0.0;
9388 # var greenFrac = rgb_color.green || 0.0;
9389 # var blueFrac = rgb_color.blue || 0.0;
9390 # var red = Math.floor(redFrac * 255);
9391 # var green = Math.floor(greenFrac * 255);
9392 # var blue = Math.floor(blueFrac * 255);
9393 #
9394 # if (!('alpha' in rgb_color)) {
9395 # return rgbToCssColor_(red, green, blue);
9396 # }
9397 #
9398 # var alphaFrac = rgb_color.alpha.value || 0.0;
9399 # var rgbParams = [red, green, blue].join(',');
9400 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9401 # };
9402 #
9403 # var rgbToCssColor_ = function(red, green, blue) {
9404 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9405 # var hexString = rgbNumber.toString(16);
9406 # var missingZeros = 6 - hexString.length;
9407 # var resultBuilder = ['#'];
9408 # for (var i = 0; i < missingZeros; i++) {
9409 # resultBuilder.push('0');
9410 # }
9411 # resultBuilder.push(hexString);
9412 # return resultBuilder.join('');
9413 # };
9414 #
9415 # // ...
9416 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9417 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9418 # the final pixel color is defined by the equation:
9419 #
9420 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9421 #
9422 # This means that a value of 1.0 corresponds to a solid color, whereas
9423 # a value of 0.0 corresponds to a completely transparent color. This
9424 # uses a wrapper message rather than a simple float scalar so that it is
9425 # possible to distinguish between a default value and the value being unset.
9426 # If omitted, this color object is to be rendered as a solid color
9427 # (as if the alpha value had been explicitly given with a value of 1.0).
9428 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9429 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9430 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009431 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009432 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
9433 # Absent values indicate that the field isn't specified.
9434 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
9435 # for simplicity of conversion to/from color representations in various
9436 # languages over compactness; for example, the fields of this representation
9437 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9438 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9439 # method in iOS; and, with just a little work, it can be easily formatted into
9440 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9441 #
9442 # Example (Java):
9443 #
9444 # import com.google.type.Color;
9445 #
9446 # // ...
9447 # public static java.awt.Color fromProto(Color protocolor) {
9448 # float alpha = protocolor.hasAlpha()
9449 # ? protocolor.getAlpha().getValue()
9450 # : 1.0;
9451 #
9452 # return new java.awt.Color(
9453 # protocolor.getRed(),
9454 # protocolor.getGreen(),
9455 # protocolor.getBlue(),
9456 # alpha);
9457 # }
9458 #
9459 # public static Color toProto(java.awt.Color color) {
9460 # float red = (float) color.getRed();
9461 # float green = (float) color.getGreen();
9462 # float blue = (float) color.getBlue();
9463 # float denominator = 255.0;
9464 # Color.Builder resultBuilder =
9465 # Color
9466 # .newBuilder()
9467 # .setRed(red / denominator)
9468 # .setGreen(green / denominator)
9469 # .setBlue(blue / denominator);
9470 # int alpha = color.getAlpha();
9471 # if (alpha != 255) {
9472 # result.setAlpha(
9473 # FloatValue
9474 # .newBuilder()
9475 # .setValue(((float) alpha) / denominator)
9476 # .build());
9477 # }
9478 # return resultBuilder.build();
9479 # }
9480 # // ...
9481 #
9482 # Example (iOS / Obj-C):
9483 #
9484 # // ...
9485 # static UIColor* fromProto(Color* protocolor) {
9486 # float red = [protocolor red];
9487 # float green = [protocolor green];
9488 # float blue = [protocolor blue];
9489 # FloatValue* alpha_wrapper = [protocolor alpha];
9490 # float alpha = 1.0;
9491 # if (alpha_wrapper != nil) {
9492 # alpha = [alpha_wrapper value];
9493 # }
9494 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9495 # }
9496 #
9497 # static Color* toProto(UIColor* color) {
9498 # CGFloat red, green, blue, alpha;
9499 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9500 # return nil;
9501 # }
9502 # Color* result = [Color alloc] init];
9503 # [result setRed:red];
9504 # [result setGreen:green];
9505 # [result setBlue:blue];
9506 # if (alpha <= 0.9999) {
9507 # [result setAlpha:floatWrapperWithValue(alpha)];
9508 # }
9509 # [result autorelease];
9510 # return result;
9511 # }
9512 # // ...
9513 #
9514 # Example (JavaScript):
9515 #
9516 # // ...
9517 #
9518 # var protoToCssColor = function(rgb_color) {
9519 # var redFrac = rgb_color.red || 0.0;
9520 # var greenFrac = rgb_color.green || 0.0;
9521 # var blueFrac = rgb_color.blue || 0.0;
9522 # var red = Math.floor(redFrac * 255);
9523 # var green = Math.floor(greenFrac * 255);
9524 # var blue = Math.floor(blueFrac * 255);
9525 #
9526 # if (!('alpha' in rgb_color)) {
9527 # return rgbToCssColor_(red, green, blue);
9528 # }
9529 #
9530 # var alphaFrac = rgb_color.alpha.value || 0.0;
9531 # var rgbParams = [red, green, blue].join(',');
9532 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9533 # };
9534 #
9535 # var rgbToCssColor_ = function(red, green, blue) {
9536 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9537 # var hexString = rgbNumber.toString(16);
9538 # var missingZeros = 6 - hexString.length;
9539 # var resultBuilder = ['#'];
9540 # for (var i = 0; i < missingZeros; i++) {
9541 # resultBuilder.push('0');
9542 # }
9543 # resultBuilder.push(hexString);
9544 # return resultBuilder.join('');
9545 # };
9546 #
9547 # // ...
9548 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9549 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9550 # the final pixel color is defined by the equation:
9551 #
9552 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9553 #
9554 # This means that a value of 1.0 corresponds to a solid color, whereas
9555 # a value of 0.0 corresponds to a completely transparent color. This
9556 # uses a wrapper message rather than a simple float scalar so that it is
9557 # possible to distinguish between a default value and the value being unset.
9558 # If omitted, this color object is to be rendered as a solid color
9559 # (as if the alpha value had been explicitly given with a value of 1.0).
9560 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9561 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9562 },
9563 "bold": True or False, # True if the text is bold.
9564 "strikethrough": True or False, # True if the text has a strikethrough.
9565 "fontFamily": "A String", # The font family.
9566 "fontSize": 42, # The size of the font.
9567 "italic": True or False, # True if the text is italicized.
9568 "underline": True or False, # True if the text is underlined.
9569 },
9570 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
9571 "borders": { # The borders of the cell. # The borders of the cell.
9572 "top": { # A border along a cell. # The top border of the cell.
9573 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
9574 # for simplicity of conversion to/from color representations in various
9575 # languages over compactness; for example, the fields of this representation
9576 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9577 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9578 # method in iOS; and, with just a little work, it can be easily formatted into
9579 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9580 #
9581 # Example (Java):
9582 #
9583 # import com.google.type.Color;
9584 #
9585 # // ...
9586 # public static java.awt.Color fromProto(Color protocolor) {
9587 # float alpha = protocolor.hasAlpha()
9588 # ? protocolor.getAlpha().getValue()
9589 # : 1.0;
9590 #
9591 # return new java.awt.Color(
9592 # protocolor.getRed(),
9593 # protocolor.getGreen(),
9594 # protocolor.getBlue(),
9595 # alpha);
9596 # }
9597 #
9598 # public static Color toProto(java.awt.Color color) {
9599 # float red = (float) color.getRed();
9600 # float green = (float) color.getGreen();
9601 # float blue = (float) color.getBlue();
9602 # float denominator = 255.0;
9603 # Color.Builder resultBuilder =
9604 # Color
9605 # .newBuilder()
9606 # .setRed(red / denominator)
9607 # .setGreen(green / denominator)
9608 # .setBlue(blue / denominator);
9609 # int alpha = color.getAlpha();
9610 # if (alpha != 255) {
9611 # result.setAlpha(
9612 # FloatValue
9613 # .newBuilder()
9614 # .setValue(((float) alpha) / denominator)
9615 # .build());
9616 # }
9617 # return resultBuilder.build();
9618 # }
9619 # // ...
9620 #
9621 # Example (iOS / Obj-C):
9622 #
9623 # // ...
9624 # static UIColor* fromProto(Color* protocolor) {
9625 # float red = [protocolor red];
9626 # float green = [protocolor green];
9627 # float blue = [protocolor blue];
9628 # FloatValue* alpha_wrapper = [protocolor alpha];
9629 # float alpha = 1.0;
9630 # if (alpha_wrapper != nil) {
9631 # alpha = [alpha_wrapper value];
9632 # }
9633 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9634 # }
9635 #
9636 # static Color* toProto(UIColor* color) {
9637 # CGFloat red, green, blue, alpha;
9638 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9639 # return nil;
9640 # }
9641 # Color* result = [Color alloc] init];
9642 # [result setRed:red];
9643 # [result setGreen:green];
9644 # [result setBlue:blue];
9645 # if (alpha <= 0.9999) {
9646 # [result setAlpha:floatWrapperWithValue(alpha)];
9647 # }
9648 # [result autorelease];
9649 # return result;
9650 # }
9651 # // ...
9652 #
9653 # Example (JavaScript):
9654 #
9655 # // ...
9656 #
9657 # var protoToCssColor = function(rgb_color) {
9658 # var redFrac = rgb_color.red || 0.0;
9659 # var greenFrac = rgb_color.green || 0.0;
9660 # var blueFrac = rgb_color.blue || 0.0;
9661 # var red = Math.floor(redFrac * 255);
9662 # var green = Math.floor(greenFrac * 255);
9663 # var blue = Math.floor(blueFrac * 255);
9664 #
9665 # if (!('alpha' in rgb_color)) {
9666 # return rgbToCssColor_(red, green, blue);
9667 # }
9668 #
9669 # var alphaFrac = rgb_color.alpha.value || 0.0;
9670 # var rgbParams = [red, green, blue].join(',');
9671 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9672 # };
9673 #
9674 # var rgbToCssColor_ = function(red, green, blue) {
9675 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9676 # var hexString = rgbNumber.toString(16);
9677 # var missingZeros = 6 - hexString.length;
9678 # var resultBuilder = ['#'];
9679 # for (var i = 0; i < missingZeros; i++) {
9680 # resultBuilder.push('0');
9681 # }
9682 # resultBuilder.push(hexString);
9683 # return resultBuilder.join('');
9684 # };
9685 #
9686 # // ...
9687 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9688 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9689 # the final pixel color is defined by the equation:
9690 #
9691 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9692 #
9693 # This means that a value of 1.0 corresponds to a solid color, whereas
9694 # a value of 0.0 corresponds to a completely transparent color. This
9695 # uses a wrapper message rather than a simple float scalar so that it is
9696 # possible to distinguish between a default value and the value being unset.
9697 # If omitted, this color object is to be rendered as a solid color
9698 # (as if the alpha value had been explicitly given with a value of 1.0).
9699 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9700 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9701 },
9702 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009703 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009704 "style": "A String", # The style of the border.
9705 },
9706 "right": { # A border along a cell. # The right border of the cell.
9707 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
9708 # for simplicity of conversion to/from color representations in various
9709 # languages over compactness; for example, the fields of this representation
9710 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9711 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9712 # method in iOS; and, with just a little work, it can be easily formatted into
9713 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9714 #
9715 # Example (Java):
9716 #
9717 # import com.google.type.Color;
9718 #
9719 # // ...
9720 # public static java.awt.Color fromProto(Color protocolor) {
9721 # float alpha = protocolor.hasAlpha()
9722 # ? protocolor.getAlpha().getValue()
9723 # : 1.0;
9724 #
9725 # return new java.awt.Color(
9726 # protocolor.getRed(),
9727 # protocolor.getGreen(),
9728 # protocolor.getBlue(),
9729 # alpha);
9730 # }
9731 #
9732 # public static Color toProto(java.awt.Color color) {
9733 # float red = (float) color.getRed();
9734 # float green = (float) color.getGreen();
9735 # float blue = (float) color.getBlue();
9736 # float denominator = 255.0;
9737 # Color.Builder resultBuilder =
9738 # Color
9739 # .newBuilder()
9740 # .setRed(red / denominator)
9741 # .setGreen(green / denominator)
9742 # .setBlue(blue / denominator);
9743 # int alpha = color.getAlpha();
9744 # if (alpha != 255) {
9745 # result.setAlpha(
9746 # FloatValue
9747 # .newBuilder()
9748 # .setValue(((float) alpha) / denominator)
9749 # .build());
9750 # }
9751 # return resultBuilder.build();
9752 # }
9753 # // ...
9754 #
9755 # Example (iOS / Obj-C):
9756 #
9757 # // ...
9758 # static UIColor* fromProto(Color* protocolor) {
9759 # float red = [protocolor red];
9760 # float green = [protocolor green];
9761 # float blue = [protocolor blue];
9762 # FloatValue* alpha_wrapper = [protocolor alpha];
9763 # float alpha = 1.0;
9764 # if (alpha_wrapper != nil) {
9765 # alpha = [alpha_wrapper value];
9766 # }
9767 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9768 # }
9769 #
9770 # static Color* toProto(UIColor* color) {
9771 # CGFloat red, green, blue, alpha;
9772 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9773 # return nil;
9774 # }
9775 # Color* result = [Color alloc] init];
9776 # [result setRed:red];
9777 # [result setGreen:green];
9778 # [result setBlue:blue];
9779 # if (alpha <= 0.9999) {
9780 # [result setAlpha:floatWrapperWithValue(alpha)];
9781 # }
9782 # [result autorelease];
9783 # return result;
9784 # }
9785 # // ...
9786 #
9787 # Example (JavaScript):
9788 #
9789 # // ...
9790 #
9791 # var protoToCssColor = function(rgb_color) {
9792 # var redFrac = rgb_color.red || 0.0;
9793 # var greenFrac = rgb_color.green || 0.0;
9794 # var blueFrac = rgb_color.blue || 0.0;
9795 # var red = Math.floor(redFrac * 255);
9796 # var green = Math.floor(greenFrac * 255);
9797 # var blue = Math.floor(blueFrac * 255);
9798 #
9799 # if (!('alpha' in rgb_color)) {
9800 # return rgbToCssColor_(red, green, blue);
9801 # }
9802 #
9803 # var alphaFrac = rgb_color.alpha.value || 0.0;
9804 # var rgbParams = [red, green, blue].join(',');
9805 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9806 # };
9807 #
9808 # var rgbToCssColor_ = function(red, green, blue) {
9809 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9810 # var hexString = rgbNumber.toString(16);
9811 # var missingZeros = 6 - hexString.length;
9812 # var resultBuilder = ['#'];
9813 # for (var i = 0; i < missingZeros; i++) {
9814 # resultBuilder.push('0');
9815 # }
9816 # resultBuilder.push(hexString);
9817 # return resultBuilder.join('');
9818 # };
9819 #
9820 # // ...
9821 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9822 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9823 # the final pixel color is defined by the equation:
9824 #
9825 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9826 #
9827 # This means that a value of 1.0 corresponds to a solid color, whereas
9828 # a value of 0.0 corresponds to a completely transparent color. This
9829 # uses a wrapper message rather than a simple float scalar so that it is
9830 # possible to distinguish between a default value and the value being unset.
9831 # If omitted, this color object is to be rendered as a solid color
9832 # (as if the alpha value had been explicitly given with a value of 1.0).
9833 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9834 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9835 },
9836 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009837 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009838 "style": "A String", # The style of the border.
9839 },
9840 "bottom": { # A border along a cell. # The bottom border of the cell.
9841 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
9842 # for simplicity of conversion to/from color representations in various
9843 # languages over compactness; for example, the fields of this representation
9844 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9845 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9846 # method in iOS; and, with just a little work, it can be easily formatted into
9847 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9848 #
9849 # Example (Java):
9850 #
9851 # import com.google.type.Color;
9852 #
9853 # // ...
9854 # public static java.awt.Color fromProto(Color protocolor) {
9855 # float alpha = protocolor.hasAlpha()
9856 # ? protocolor.getAlpha().getValue()
9857 # : 1.0;
9858 #
9859 # return new java.awt.Color(
9860 # protocolor.getRed(),
9861 # protocolor.getGreen(),
9862 # protocolor.getBlue(),
9863 # alpha);
9864 # }
9865 #
9866 # public static Color toProto(java.awt.Color color) {
9867 # float red = (float) color.getRed();
9868 # float green = (float) color.getGreen();
9869 # float blue = (float) color.getBlue();
9870 # float denominator = 255.0;
9871 # Color.Builder resultBuilder =
9872 # Color
9873 # .newBuilder()
9874 # .setRed(red / denominator)
9875 # .setGreen(green / denominator)
9876 # .setBlue(blue / denominator);
9877 # int alpha = color.getAlpha();
9878 # if (alpha != 255) {
9879 # result.setAlpha(
9880 # FloatValue
9881 # .newBuilder()
9882 # .setValue(((float) alpha) / denominator)
9883 # .build());
9884 # }
9885 # return resultBuilder.build();
9886 # }
9887 # // ...
9888 #
9889 # Example (iOS / Obj-C):
9890 #
9891 # // ...
9892 # static UIColor* fromProto(Color* protocolor) {
9893 # float red = [protocolor red];
9894 # float green = [protocolor green];
9895 # float blue = [protocolor blue];
9896 # FloatValue* alpha_wrapper = [protocolor alpha];
9897 # float alpha = 1.0;
9898 # if (alpha_wrapper != nil) {
9899 # alpha = [alpha_wrapper value];
9900 # }
9901 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9902 # }
9903 #
9904 # static Color* toProto(UIColor* color) {
9905 # CGFloat red, green, blue, alpha;
9906 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9907 # return nil;
9908 # }
9909 # Color* result = [Color alloc] init];
9910 # [result setRed:red];
9911 # [result setGreen:green];
9912 # [result setBlue:blue];
9913 # if (alpha <= 0.9999) {
9914 # [result setAlpha:floatWrapperWithValue(alpha)];
9915 # }
9916 # [result autorelease];
9917 # return result;
9918 # }
9919 # // ...
9920 #
9921 # Example (JavaScript):
9922 #
9923 # // ...
9924 #
9925 # var protoToCssColor = function(rgb_color) {
9926 # var redFrac = rgb_color.red || 0.0;
9927 # var greenFrac = rgb_color.green || 0.0;
9928 # var blueFrac = rgb_color.blue || 0.0;
9929 # var red = Math.floor(redFrac * 255);
9930 # var green = Math.floor(greenFrac * 255);
9931 # var blue = Math.floor(blueFrac * 255);
9932 #
9933 # if (!('alpha' in rgb_color)) {
9934 # return rgbToCssColor_(red, green, blue);
9935 # }
9936 #
9937 # var alphaFrac = rgb_color.alpha.value || 0.0;
9938 # var rgbParams = [red, green, blue].join(',');
9939 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9940 # };
9941 #
9942 # var rgbToCssColor_ = function(red, green, blue) {
9943 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9944 # var hexString = rgbNumber.toString(16);
9945 # var missingZeros = 6 - hexString.length;
9946 # var resultBuilder = ['#'];
9947 # for (var i = 0; i < missingZeros; i++) {
9948 # resultBuilder.push('0');
9949 # }
9950 # resultBuilder.push(hexString);
9951 # return resultBuilder.join('');
9952 # };
9953 #
9954 # // ...
9955 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9956 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9957 # the final pixel color is defined by the equation:
9958 #
9959 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9960 #
9961 # This means that a value of 1.0 corresponds to a solid color, whereas
9962 # a value of 0.0 corresponds to a completely transparent color. This
9963 # uses a wrapper message rather than a simple float scalar so that it is
9964 # possible to distinguish between a default value and the value being unset.
9965 # If omitted, this color object is to be rendered as a solid color
9966 # (as if the alpha value had been explicitly given with a value of 1.0).
9967 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9968 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9969 },
9970 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009971 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009972 "style": "A String", # The style of the border.
9973 },
9974 "left": { # A border along a cell. # The left border of the cell.
9975 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
9976 # for simplicity of conversion to/from color representations in various
9977 # languages over compactness; for example, the fields of this representation
9978 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9979 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9980 # method in iOS; and, with just a little work, it can be easily formatted into
9981 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9982 #
9983 # Example (Java):
9984 #
9985 # import com.google.type.Color;
9986 #
9987 # // ...
9988 # public static java.awt.Color fromProto(Color protocolor) {
9989 # float alpha = protocolor.hasAlpha()
9990 # ? protocolor.getAlpha().getValue()
9991 # : 1.0;
9992 #
9993 # return new java.awt.Color(
9994 # protocolor.getRed(),
9995 # protocolor.getGreen(),
9996 # protocolor.getBlue(),
9997 # alpha);
9998 # }
9999 #
10000 # public static Color toProto(java.awt.Color color) {
10001 # float red = (float) color.getRed();
10002 # float green = (float) color.getGreen();
10003 # float blue = (float) color.getBlue();
10004 # float denominator = 255.0;
10005 # Color.Builder resultBuilder =
10006 # Color
10007 # .newBuilder()
10008 # .setRed(red / denominator)
10009 # .setGreen(green / denominator)
10010 # .setBlue(blue / denominator);
10011 # int alpha = color.getAlpha();
10012 # if (alpha != 255) {
10013 # result.setAlpha(
10014 # FloatValue
10015 # .newBuilder()
10016 # .setValue(((float) alpha) / denominator)
10017 # .build());
10018 # }
10019 # return resultBuilder.build();
10020 # }
10021 # // ...
10022 #
10023 # Example (iOS / Obj-C):
10024 #
10025 # // ...
10026 # static UIColor* fromProto(Color* protocolor) {
10027 # float red = [protocolor red];
10028 # float green = [protocolor green];
10029 # float blue = [protocolor blue];
10030 # FloatValue* alpha_wrapper = [protocolor alpha];
10031 # float alpha = 1.0;
10032 # if (alpha_wrapper != nil) {
10033 # alpha = [alpha_wrapper value];
10034 # }
10035 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10036 # }
10037 #
10038 # static Color* toProto(UIColor* color) {
10039 # CGFloat red, green, blue, alpha;
10040 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10041 # return nil;
10042 # }
10043 # Color* result = [Color alloc] init];
10044 # [result setRed:red];
10045 # [result setGreen:green];
10046 # [result setBlue:blue];
10047 # if (alpha <= 0.9999) {
10048 # [result setAlpha:floatWrapperWithValue(alpha)];
10049 # }
10050 # [result autorelease];
10051 # return result;
10052 # }
10053 # // ...
10054 #
10055 # Example (JavaScript):
10056 #
10057 # // ...
10058 #
10059 # var protoToCssColor = function(rgb_color) {
10060 # var redFrac = rgb_color.red || 0.0;
10061 # var greenFrac = rgb_color.green || 0.0;
10062 # var blueFrac = rgb_color.blue || 0.0;
10063 # var red = Math.floor(redFrac * 255);
10064 # var green = Math.floor(greenFrac * 255);
10065 # var blue = Math.floor(blueFrac * 255);
10066 #
10067 # if (!('alpha' in rgb_color)) {
10068 # return rgbToCssColor_(red, green, blue);
10069 # }
10070 #
10071 # var alphaFrac = rgb_color.alpha.value || 0.0;
10072 # var rgbParams = [red, green, blue].join(',');
10073 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10074 # };
10075 #
10076 # var rgbToCssColor_ = function(red, green, blue) {
10077 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10078 # var hexString = rgbNumber.toString(16);
10079 # var missingZeros = 6 - hexString.length;
10080 # var resultBuilder = ['#'];
10081 # for (var i = 0; i < missingZeros; i++) {
10082 # resultBuilder.push('0');
10083 # }
10084 # resultBuilder.push(hexString);
10085 # return resultBuilder.join('');
10086 # };
10087 #
10088 # // ...
10089 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10090 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10091 # the final pixel color is defined by the equation:
10092 #
10093 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10094 #
10095 # This means that a value of 1.0 corresponds to a solid color, whereas
10096 # a value of 0.0 corresponds to a completely transparent color. This
10097 # uses a wrapper message rather than a simple float scalar so that it is
10098 # possible to distinguish between a default value and the value being unset.
10099 # If omitted, this color object is to be rendered as a solid color
10100 # (as if the alpha value had been explicitly given with a value of 1.0).
10101 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10102 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10103 },
10104 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010105 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010106 "style": "A String", # The style of the border.
10107 },
10108 },
10109 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
10110 },
10111 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
10112 #
10113 # When writing, the new format will be merged with the existing format.
10114 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010115 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
10116 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010117 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010118 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010119 },
10120 "textDirection": "A String", # The direction of the text in the cell.
10121 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
10122 # When updating padding, every field must be specified.
10123 "top": 42, # The top padding of the cell.
10124 "right": 42, # The right padding of the cell.
10125 "bottom": 42, # The bottom padding of the cell.
10126 "left": 42, # The left padding of the cell.
10127 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010128 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010129 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
10130 # for simplicity of conversion to/from color representations in various
10131 # languages over compactness; for example, the fields of this representation
10132 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10133 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10134 # method in iOS; and, with just a little work, it can be easily formatted into
10135 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10136 #
10137 # Example (Java):
10138 #
10139 # import com.google.type.Color;
10140 #
10141 # // ...
10142 # public static java.awt.Color fromProto(Color protocolor) {
10143 # float alpha = protocolor.hasAlpha()
10144 # ? protocolor.getAlpha().getValue()
10145 # : 1.0;
10146 #
10147 # return new java.awt.Color(
10148 # protocolor.getRed(),
10149 # protocolor.getGreen(),
10150 # protocolor.getBlue(),
10151 # alpha);
10152 # }
10153 #
10154 # public static Color toProto(java.awt.Color color) {
10155 # float red = (float) color.getRed();
10156 # float green = (float) color.getGreen();
10157 # float blue = (float) color.getBlue();
10158 # float denominator = 255.0;
10159 # Color.Builder resultBuilder =
10160 # Color
10161 # .newBuilder()
10162 # .setRed(red / denominator)
10163 # .setGreen(green / denominator)
10164 # .setBlue(blue / denominator);
10165 # int alpha = color.getAlpha();
10166 # if (alpha != 255) {
10167 # result.setAlpha(
10168 # FloatValue
10169 # .newBuilder()
10170 # .setValue(((float) alpha) / denominator)
10171 # .build());
10172 # }
10173 # return resultBuilder.build();
10174 # }
10175 # // ...
10176 #
10177 # Example (iOS / Obj-C):
10178 #
10179 # // ...
10180 # static UIColor* fromProto(Color* protocolor) {
10181 # float red = [protocolor red];
10182 # float green = [protocolor green];
10183 # float blue = [protocolor blue];
10184 # FloatValue* alpha_wrapper = [protocolor alpha];
10185 # float alpha = 1.0;
10186 # if (alpha_wrapper != nil) {
10187 # alpha = [alpha_wrapper value];
10188 # }
10189 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10190 # }
10191 #
10192 # static Color* toProto(UIColor* color) {
10193 # CGFloat red, green, blue, alpha;
10194 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10195 # return nil;
10196 # }
10197 # Color* result = [Color alloc] init];
10198 # [result setRed:red];
10199 # [result setGreen:green];
10200 # [result setBlue:blue];
10201 # if (alpha <= 0.9999) {
10202 # [result setAlpha:floatWrapperWithValue(alpha)];
10203 # }
10204 # [result autorelease];
10205 # return result;
10206 # }
10207 # // ...
10208 #
10209 # Example (JavaScript):
10210 #
10211 # // ...
10212 #
10213 # var protoToCssColor = function(rgb_color) {
10214 # var redFrac = rgb_color.red || 0.0;
10215 # var greenFrac = rgb_color.green || 0.0;
10216 # var blueFrac = rgb_color.blue || 0.0;
10217 # var red = Math.floor(redFrac * 255);
10218 # var green = Math.floor(greenFrac * 255);
10219 # var blue = Math.floor(blueFrac * 255);
10220 #
10221 # if (!('alpha' in rgb_color)) {
10222 # return rgbToCssColor_(red, green, blue);
10223 # }
10224 #
10225 # var alphaFrac = rgb_color.alpha.value || 0.0;
10226 # var rgbParams = [red, green, blue].join(',');
10227 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10228 # };
10229 #
10230 # var rgbToCssColor_ = function(red, green, blue) {
10231 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10232 # var hexString = rgbNumber.toString(16);
10233 # var missingZeros = 6 - hexString.length;
10234 # var resultBuilder = ['#'];
10235 # for (var i = 0; i < missingZeros; i++) {
10236 # resultBuilder.push('0');
10237 # }
10238 # resultBuilder.push(hexString);
10239 # return resultBuilder.join('');
10240 # };
10241 #
10242 # // ...
10243 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10244 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10245 # the final pixel color is defined by the equation:
10246 #
10247 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10248 #
10249 # This means that a value of 1.0 corresponds to a solid color, whereas
10250 # a value of 0.0 corresponds to a completely transparent color. This
10251 # uses a wrapper message rather than a simple float scalar so that it is
10252 # possible to distinguish between a default value and the value being unset.
10253 # If omitted, this color object is to be rendered as a solid color
10254 # (as if the alpha value had been explicitly given with a value of 1.0).
10255 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10256 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10257 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010258 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010259 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
10260 # Absent values indicate that the field isn't specified.
10261 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
10262 # for simplicity of conversion to/from color representations in various
10263 # languages over compactness; for example, the fields of this representation
10264 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10265 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10266 # method in iOS; and, with just a little work, it can be easily formatted into
10267 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10268 #
10269 # Example (Java):
10270 #
10271 # import com.google.type.Color;
10272 #
10273 # // ...
10274 # public static java.awt.Color fromProto(Color protocolor) {
10275 # float alpha = protocolor.hasAlpha()
10276 # ? protocolor.getAlpha().getValue()
10277 # : 1.0;
10278 #
10279 # return new java.awt.Color(
10280 # protocolor.getRed(),
10281 # protocolor.getGreen(),
10282 # protocolor.getBlue(),
10283 # alpha);
10284 # }
10285 #
10286 # public static Color toProto(java.awt.Color color) {
10287 # float red = (float) color.getRed();
10288 # float green = (float) color.getGreen();
10289 # float blue = (float) color.getBlue();
10290 # float denominator = 255.0;
10291 # Color.Builder resultBuilder =
10292 # Color
10293 # .newBuilder()
10294 # .setRed(red / denominator)
10295 # .setGreen(green / denominator)
10296 # .setBlue(blue / denominator);
10297 # int alpha = color.getAlpha();
10298 # if (alpha != 255) {
10299 # result.setAlpha(
10300 # FloatValue
10301 # .newBuilder()
10302 # .setValue(((float) alpha) / denominator)
10303 # .build());
10304 # }
10305 # return resultBuilder.build();
10306 # }
10307 # // ...
10308 #
10309 # Example (iOS / Obj-C):
10310 #
10311 # // ...
10312 # static UIColor* fromProto(Color* protocolor) {
10313 # float red = [protocolor red];
10314 # float green = [protocolor green];
10315 # float blue = [protocolor blue];
10316 # FloatValue* alpha_wrapper = [protocolor alpha];
10317 # float alpha = 1.0;
10318 # if (alpha_wrapper != nil) {
10319 # alpha = [alpha_wrapper value];
10320 # }
10321 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10322 # }
10323 #
10324 # static Color* toProto(UIColor* color) {
10325 # CGFloat red, green, blue, alpha;
10326 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10327 # return nil;
10328 # }
10329 # Color* result = [Color alloc] init];
10330 # [result setRed:red];
10331 # [result setGreen:green];
10332 # [result setBlue:blue];
10333 # if (alpha <= 0.9999) {
10334 # [result setAlpha:floatWrapperWithValue(alpha)];
10335 # }
10336 # [result autorelease];
10337 # return result;
10338 # }
10339 # // ...
10340 #
10341 # Example (JavaScript):
10342 #
10343 # // ...
10344 #
10345 # var protoToCssColor = function(rgb_color) {
10346 # var redFrac = rgb_color.red || 0.0;
10347 # var greenFrac = rgb_color.green || 0.0;
10348 # var blueFrac = rgb_color.blue || 0.0;
10349 # var red = Math.floor(redFrac * 255);
10350 # var green = Math.floor(greenFrac * 255);
10351 # var blue = Math.floor(blueFrac * 255);
10352 #
10353 # if (!('alpha' in rgb_color)) {
10354 # return rgbToCssColor_(red, green, blue);
10355 # }
10356 #
10357 # var alphaFrac = rgb_color.alpha.value || 0.0;
10358 # var rgbParams = [red, green, blue].join(',');
10359 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10360 # };
10361 #
10362 # var rgbToCssColor_ = function(red, green, blue) {
10363 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10364 # var hexString = rgbNumber.toString(16);
10365 # var missingZeros = 6 - hexString.length;
10366 # var resultBuilder = ['#'];
10367 # for (var i = 0; i < missingZeros; i++) {
10368 # resultBuilder.push('0');
10369 # }
10370 # resultBuilder.push(hexString);
10371 # return resultBuilder.join('');
10372 # };
10373 #
10374 # // ...
10375 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10376 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10377 # the final pixel color is defined by the equation:
10378 #
10379 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10380 #
10381 # This means that a value of 1.0 corresponds to a solid color, whereas
10382 # a value of 0.0 corresponds to a completely transparent color. This
10383 # uses a wrapper message rather than a simple float scalar so that it is
10384 # possible to distinguish between a default value and the value being unset.
10385 # If omitted, this color object is to be rendered as a solid color
10386 # (as if the alpha value had been explicitly given with a value of 1.0).
10387 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10388 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10389 },
10390 "bold": True or False, # True if the text is bold.
10391 "strikethrough": True or False, # True if the text has a strikethrough.
10392 "fontFamily": "A String", # The font family.
10393 "fontSize": 42, # The size of the font.
10394 "italic": True or False, # True if the text is italicized.
10395 "underline": True or False, # True if the text is underlined.
10396 },
10397 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
10398 "borders": { # The borders of the cell. # The borders of the cell.
10399 "top": { # A border along a cell. # The top border of the cell.
10400 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10401 # for simplicity of conversion to/from color representations in various
10402 # languages over compactness; for example, the fields of this representation
10403 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10404 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10405 # method in iOS; and, with just a little work, it can be easily formatted into
10406 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10407 #
10408 # Example (Java):
10409 #
10410 # import com.google.type.Color;
10411 #
10412 # // ...
10413 # public static java.awt.Color fromProto(Color protocolor) {
10414 # float alpha = protocolor.hasAlpha()
10415 # ? protocolor.getAlpha().getValue()
10416 # : 1.0;
10417 #
10418 # return new java.awt.Color(
10419 # protocolor.getRed(),
10420 # protocolor.getGreen(),
10421 # protocolor.getBlue(),
10422 # alpha);
10423 # }
10424 #
10425 # public static Color toProto(java.awt.Color color) {
10426 # float red = (float) color.getRed();
10427 # float green = (float) color.getGreen();
10428 # float blue = (float) color.getBlue();
10429 # float denominator = 255.0;
10430 # Color.Builder resultBuilder =
10431 # Color
10432 # .newBuilder()
10433 # .setRed(red / denominator)
10434 # .setGreen(green / denominator)
10435 # .setBlue(blue / denominator);
10436 # int alpha = color.getAlpha();
10437 # if (alpha != 255) {
10438 # result.setAlpha(
10439 # FloatValue
10440 # .newBuilder()
10441 # .setValue(((float) alpha) / denominator)
10442 # .build());
10443 # }
10444 # return resultBuilder.build();
10445 # }
10446 # // ...
10447 #
10448 # Example (iOS / Obj-C):
10449 #
10450 # // ...
10451 # static UIColor* fromProto(Color* protocolor) {
10452 # float red = [protocolor red];
10453 # float green = [protocolor green];
10454 # float blue = [protocolor blue];
10455 # FloatValue* alpha_wrapper = [protocolor alpha];
10456 # float alpha = 1.0;
10457 # if (alpha_wrapper != nil) {
10458 # alpha = [alpha_wrapper value];
10459 # }
10460 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10461 # }
10462 #
10463 # static Color* toProto(UIColor* color) {
10464 # CGFloat red, green, blue, alpha;
10465 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10466 # return nil;
10467 # }
10468 # Color* result = [Color alloc] init];
10469 # [result setRed:red];
10470 # [result setGreen:green];
10471 # [result setBlue:blue];
10472 # if (alpha <= 0.9999) {
10473 # [result setAlpha:floatWrapperWithValue(alpha)];
10474 # }
10475 # [result autorelease];
10476 # return result;
10477 # }
10478 # // ...
10479 #
10480 # Example (JavaScript):
10481 #
10482 # // ...
10483 #
10484 # var protoToCssColor = function(rgb_color) {
10485 # var redFrac = rgb_color.red || 0.0;
10486 # var greenFrac = rgb_color.green || 0.0;
10487 # var blueFrac = rgb_color.blue || 0.0;
10488 # var red = Math.floor(redFrac * 255);
10489 # var green = Math.floor(greenFrac * 255);
10490 # var blue = Math.floor(blueFrac * 255);
10491 #
10492 # if (!('alpha' in rgb_color)) {
10493 # return rgbToCssColor_(red, green, blue);
10494 # }
10495 #
10496 # var alphaFrac = rgb_color.alpha.value || 0.0;
10497 # var rgbParams = [red, green, blue].join(',');
10498 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10499 # };
10500 #
10501 # var rgbToCssColor_ = function(red, green, blue) {
10502 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10503 # var hexString = rgbNumber.toString(16);
10504 # var missingZeros = 6 - hexString.length;
10505 # var resultBuilder = ['#'];
10506 # for (var i = 0; i < missingZeros; i++) {
10507 # resultBuilder.push('0');
10508 # }
10509 # resultBuilder.push(hexString);
10510 # return resultBuilder.join('');
10511 # };
10512 #
10513 # // ...
10514 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10515 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10516 # the final pixel color is defined by the equation:
10517 #
10518 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10519 #
10520 # This means that a value of 1.0 corresponds to a solid color, whereas
10521 # a value of 0.0 corresponds to a completely transparent color. This
10522 # uses a wrapper message rather than a simple float scalar so that it is
10523 # possible to distinguish between a default value and the value being unset.
10524 # If omitted, this color object is to be rendered as a solid color
10525 # (as if the alpha value had been explicitly given with a value of 1.0).
10526 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10527 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10528 },
10529 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010530 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010531 "style": "A String", # The style of the border.
10532 },
10533 "right": { # A border along a cell. # The right border of the cell.
10534 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10535 # for simplicity of conversion to/from color representations in various
10536 # languages over compactness; for example, the fields of this representation
10537 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10538 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10539 # method in iOS; and, with just a little work, it can be easily formatted into
10540 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10541 #
10542 # Example (Java):
10543 #
10544 # import com.google.type.Color;
10545 #
10546 # // ...
10547 # public static java.awt.Color fromProto(Color protocolor) {
10548 # float alpha = protocolor.hasAlpha()
10549 # ? protocolor.getAlpha().getValue()
10550 # : 1.0;
10551 #
10552 # return new java.awt.Color(
10553 # protocolor.getRed(),
10554 # protocolor.getGreen(),
10555 # protocolor.getBlue(),
10556 # alpha);
10557 # }
10558 #
10559 # public static Color toProto(java.awt.Color color) {
10560 # float red = (float) color.getRed();
10561 # float green = (float) color.getGreen();
10562 # float blue = (float) color.getBlue();
10563 # float denominator = 255.0;
10564 # Color.Builder resultBuilder =
10565 # Color
10566 # .newBuilder()
10567 # .setRed(red / denominator)
10568 # .setGreen(green / denominator)
10569 # .setBlue(blue / denominator);
10570 # int alpha = color.getAlpha();
10571 # if (alpha != 255) {
10572 # result.setAlpha(
10573 # FloatValue
10574 # .newBuilder()
10575 # .setValue(((float) alpha) / denominator)
10576 # .build());
10577 # }
10578 # return resultBuilder.build();
10579 # }
10580 # // ...
10581 #
10582 # Example (iOS / Obj-C):
10583 #
10584 # // ...
10585 # static UIColor* fromProto(Color* protocolor) {
10586 # float red = [protocolor red];
10587 # float green = [protocolor green];
10588 # float blue = [protocolor blue];
10589 # FloatValue* alpha_wrapper = [protocolor alpha];
10590 # float alpha = 1.0;
10591 # if (alpha_wrapper != nil) {
10592 # alpha = [alpha_wrapper value];
10593 # }
10594 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10595 # }
10596 #
10597 # static Color* toProto(UIColor* color) {
10598 # CGFloat red, green, blue, alpha;
10599 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10600 # return nil;
10601 # }
10602 # Color* result = [Color alloc] init];
10603 # [result setRed:red];
10604 # [result setGreen:green];
10605 # [result setBlue:blue];
10606 # if (alpha <= 0.9999) {
10607 # [result setAlpha:floatWrapperWithValue(alpha)];
10608 # }
10609 # [result autorelease];
10610 # return result;
10611 # }
10612 # // ...
10613 #
10614 # Example (JavaScript):
10615 #
10616 # // ...
10617 #
10618 # var protoToCssColor = function(rgb_color) {
10619 # var redFrac = rgb_color.red || 0.0;
10620 # var greenFrac = rgb_color.green || 0.0;
10621 # var blueFrac = rgb_color.blue || 0.0;
10622 # var red = Math.floor(redFrac * 255);
10623 # var green = Math.floor(greenFrac * 255);
10624 # var blue = Math.floor(blueFrac * 255);
10625 #
10626 # if (!('alpha' in rgb_color)) {
10627 # return rgbToCssColor_(red, green, blue);
10628 # }
10629 #
10630 # var alphaFrac = rgb_color.alpha.value || 0.0;
10631 # var rgbParams = [red, green, blue].join(',');
10632 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10633 # };
10634 #
10635 # var rgbToCssColor_ = function(red, green, blue) {
10636 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10637 # var hexString = rgbNumber.toString(16);
10638 # var missingZeros = 6 - hexString.length;
10639 # var resultBuilder = ['#'];
10640 # for (var i = 0; i < missingZeros; i++) {
10641 # resultBuilder.push('0');
10642 # }
10643 # resultBuilder.push(hexString);
10644 # return resultBuilder.join('');
10645 # };
10646 #
10647 # // ...
10648 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10649 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10650 # the final pixel color is defined by the equation:
10651 #
10652 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10653 #
10654 # This means that a value of 1.0 corresponds to a solid color, whereas
10655 # a value of 0.0 corresponds to a completely transparent color. This
10656 # uses a wrapper message rather than a simple float scalar so that it is
10657 # possible to distinguish between a default value and the value being unset.
10658 # If omitted, this color object is to be rendered as a solid color
10659 # (as if the alpha value had been explicitly given with a value of 1.0).
10660 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10661 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10662 },
10663 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010664 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010665 "style": "A String", # The style of the border.
10666 },
10667 "bottom": { # A border along a cell. # The bottom border of the cell.
10668 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10669 # for simplicity of conversion to/from color representations in various
10670 # languages over compactness; for example, the fields of this representation
10671 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10672 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10673 # method in iOS; and, with just a little work, it can be easily formatted into
10674 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10675 #
10676 # Example (Java):
10677 #
10678 # import com.google.type.Color;
10679 #
10680 # // ...
10681 # public static java.awt.Color fromProto(Color protocolor) {
10682 # float alpha = protocolor.hasAlpha()
10683 # ? protocolor.getAlpha().getValue()
10684 # : 1.0;
10685 #
10686 # return new java.awt.Color(
10687 # protocolor.getRed(),
10688 # protocolor.getGreen(),
10689 # protocolor.getBlue(),
10690 # alpha);
10691 # }
10692 #
10693 # public static Color toProto(java.awt.Color color) {
10694 # float red = (float) color.getRed();
10695 # float green = (float) color.getGreen();
10696 # float blue = (float) color.getBlue();
10697 # float denominator = 255.0;
10698 # Color.Builder resultBuilder =
10699 # Color
10700 # .newBuilder()
10701 # .setRed(red / denominator)
10702 # .setGreen(green / denominator)
10703 # .setBlue(blue / denominator);
10704 # int alpha = color.getAlpha();
10705 # if (alpha != 255) {
10706 # result.setAlpha(
10707 # FloatValue
10708 # .newBuilder()
10709 # .setValue(((float) alpha) / denominator)
10710 # .build());
10711 # }
10712 # return resultBuilder.build();
10713 # }
10714 # // ...
10715 #
10716 # Example (iOS / Obj-C):
10717 #
10718 # // ...
10719 # static UIColor* fromProto(Color* protocolor) {
10720 # float red = [protocolor red];
10721 # float green = [protocolor green];
10722 # float blue = [protocolor blue];
10723 # FloatValue* alpha_wrapper = [protocolor alpha];
10724 # float alpha = 1.0;
10725 # if (alpha_wrapper != nil) {
10726 # alpha = [alpha_wrapper value];
10727 # }
10728 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10729 # }
10730 #
10731 # static Color* toProto(UIColor* color) {
10732 # CGFloat red, green, blue, alpha;
10733 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10734 # return nil;
10735 # }
10736 # Color* result = [Color alloc] init];
10737 # [result setRed:red];
10738 # [result setGreen:green];
10739 # [result setBlue:blue];
10740 # if (alpha <= 0.9999) {
10741 # [result setAlpha:floatWrapperWithValue(alpha)];
10742 # }
10743 # [result autorelease];
10744 # return result;
10745 # }
10746 # // ...
10747 #
10748 # Example (JavaScript):
10749 #
10750 # // ...
10751 #
10752 # var protoToCssColor = function(rgb_color) {
10753 # var redFrac = rgb_color.red || 0.0;
10754 # var greenFrac = rgb_color.green || 0.0;
10755 # var blueFrac = rgb_color.blue || 0.0;
10756 # var red = Math.floor(redFrac * 255);
10757 # var green = Math.floor(greenFrac * 255);
10758 # var blue = Math.floor(blueFrac * 255);
10759 #
10760 # if (!('alpha' in rgb_color)) {
10761 # return rgbToCssColor_(red, green, blue);
10762 # }
10763 #
10764 # var alphaFrac = rgb_color.alpha.value || 0.0;
10765 # var rgbParams = [red, green, blue].join(',');
10766 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10767 # };
10768 #
10769 # var rgbToCssColor_ = function(red, green, blue) {
10770 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10771 # var hexString = rgbNumber.toString(16);
10772 # var missingZeros = 6 - hexString.length;
10773 # var resultBuilder = ['#'];
10774 # for (var i = 0; i < missingZeros; i++) {
10775 # resultBuilder.push('0');
10776 # }
10777 # resultBuilder.push(hexString);
10778 # return resultBuilder.join('');
10779 # };
10780 #
10781 # // ...
10782 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10783 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10784 # the final pixel color is defined by the equation:
10785 #
10786 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10787 #
10788 # This means that a value of 1.0 corresponds to a solid color, whereas
10789 # a value of 0.0 corresponds to a completely transparent color. This
10790 # uses a wrapper message rather than a simple float scalar so that it is
10791 # possible to distinguish between a default value and the value being unset.
10792 # If omitted, this color object is to be rendered as a solid color
10793 # (as if the alpha value had been explicitly given with a value of 1.0).
10794 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10795 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10796 },
10797 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010798 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010799 "style": "A String", # The style of the border.
10800 },
10801 "left": { # A border along a cell. # The left border of the cell.
10802 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10803 # for simplicity of conversion to/from color representations in various
10804 # languages over compactness; for example, the fields of this representation
10805 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10806 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10807 # method in iOS; and, with just a little work, it can be easily formatted into
10808 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10809 #
10810 # Example (Java):
10811 #
10812 # import com.google.type.Color;
10813 #
10814 # // ...
10815 # public static java.awt.Color fromProto(Color protocolor) {
10816 # float alpha = protocolor.hasAlpha()
10817 # ? protocolor.getAlpha().getValue()
10818 # : 1.0;
10819 #
10820 # return new java.awt.Color(
10821 # protocolor.getRed(),
10822 # protocolor.getGreen(),
10823 # protocolor.getBlue(),
10824 # alpha);
10825 # }
10826 #
10827 # public static Color toProto(java.awt.Color color) {
10828 # float red = (float) color.getRed();
10829 # float green = (float) color.getGreen();
10830 # float blue = (float) color.getBlue();
10831 # float denominator = 255.0;
10832 # Color.Builder resultBuilder =
10833 # Color
10834 # .newBuilder()
10835 # .setRed(red / denominator)
10836 # .setGreen(green / denominator)
10837 # .setBlue(blue / denominator);
10838 # int alpha = color.getAlpha();
10839 # if (alpha != 255) {
10840 # result.setAlpha(
10841 # FloatValue
10842 # .newBuilder()
10843 # .setValue(((float) alpha) / denominator)
10844 # .build());
10845 # }
10846 # return resultBuilder.build();
10847 # }
10848 # // ...
10849 #
10850 # Example (iOS / Obj-C):
10851 #
10852 # // ...
10853 # static UIColor* fromProto(Color* protocolor) {
10854 # float red = [protocolor red];
10855 # float green = [protocolor green];
10856 # float blue = [protocolor blue];
10857 # FloatValue* alpha_wrapper = [protocolor alpha];
10858 # float alpha = 1.0;
10859 # if (alpha_wrapper != nil) {
10860 # alpha = [alpha_wrapper value];
10861 # }
10862 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10863 # }
10864 #
10865 # static Color* toProto(UIColor* color) {
10866 # CGFloat red, green, blue, alpha;
10867 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10868 # return nil;
10869 # }
10870 # Color* result = [Color alloc] init];
10871 # [result setRed:red];
10872 # [result setGreen:green];
10873 # [result setBlue:blue];
10874 # if (alpha <= 0.9999) {
10875 # [result setAlpha:floatWrapperWithValue(alpha)];
10876 # }
10877 # [result autorelease];
10878 # return result;
10879 # }
10880 # // ...
10881 #
10882 # Example (JavaScript):
10883 #
10884 # // ...
10885 #
10886 # var protoToCssColor = function(rgb_color) {
10887 # var redFrac = rgb_color.red || 0.0;
10888 # var greenFrac = rgb_color.green || 0.0;
10889 # var blueFrac = rgb_color.blue || 0.0;
10890 # var red = Math.floor(redFrac * 255);
10891 # var green = Math.floor(greenFrac * 255);
10892 # var blue = Math.floor(blueFrac * 255);
10893 #
10894 # if (!('alpha' in rgb_color)) {
10895 # return rgbToCssColor_(red, green, blue);
10896 # }
10897 #
10898 # var alphaFrac = rgb_color.alpha.value || 0.0;
10899 # var rgbParams = [red, green, blue].join(',');
10900 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10901 # };
10902 #
10903 # var rgbToCssColor_ = function(red, green, blue) {
10904 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10905 # var hexString = rgbNumber.toString(16);
10906 # var missingZeros = 6 - hexString.length;
10907 # var resultBuilder = ['#'];
10908 # for (var i = 0; i < missingZeros; i++) {
10909 # resultBuilder.push('0');
10910 # }
10911 # resultBuilder.push(hexString);
10912 # return resultBuilder.join('');
10913 # };
10914 #
10915 # // ...
10916 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10917 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10918 # the final pixel color is defined by the equation:
10919 #
10920 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10921 #
10922 # This means that a value of 1.0 corresponds to a solid color, whereas
10923 # a value of 0.0 corresponds to a completely transparent color. This
10924 # uses a wrapper message rather than a simple float scalar so that it is
10925 # possible to distinguish between a default value and the value being unset.
10926 # If omitted, this color object is to be rendered as a solid color
10927 # (as if the alpha value had been explicitly given with a value of 1.0).
10928 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10929 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10930 },
10931 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010932 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010933 "style": "A String", # The style of the border.
10934 },
10935 },
10936 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
10937 },
10938 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
10939 #
10940 # When writing, the new data validation rule will overwrite any prior rule.
10941 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
10942 # If true, "List" conditions will show a dropdown.
10943 "strict": True or False, # True if invalid data should be rejected.
10944 "inputMessage": "A String", # A message to show the user when adding data to the cell.
10945 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
10946 # BooleanConditions are used by conditional formatting,
10947 # data validation, and the criteria in filters.
10948 "type": "A String", # The type of condition.
10949 "values": [ # The values of the condition. The number of supported values depends
10950 # on the condition type. Some support zero values,
10951 # others one or two values,
10952 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
10953 { # The value of the condition.
10954 "relativeDate": "A String", # A relative date (based on the current date).
10955 # Valid only if the type is
10956 # DATE_BEFORE,
10957 # DATE_AFTER,
10958 # DATE_ON_OR_BEFORE or
10959 # DATE_ON_OR_AFTER.
10960 #
10961 # Relative dates are not supported in data validation.
10962 # They are supported only in conditional formatting and
10963 # conditional filters.
10964 "userEnteredValue": "A String", # A value the condition is based on.
10965 # The value will be parsed as if the user typed into a cell.
10966 # Formulas are supported (and must begin with an `=`).
10967 },
10968 ],
10969 },
10970 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010971 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
10972 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010973 # Runs start at specific indexes in the text and continue until the next
10974 # run. Properties of a run will continue unless explicitly changed
10975 # in a subsequent run (and properties of the first run will continue
10976 # the properties of the cell unless explicitly changed).
10977 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010978 # When writing, the new runs will overwrite any prior runs. When writing a
10979 # new user_entered_value, previous runs will be erased.
10980 { # A run of a text format. The format of this run continues until the start
10981 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010982 # When updating, all fields must be set.
10983 "startIndex": 42, # The character index where this run starts.
10984 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
10985 # Absent values indicate that the field isn't specified.
10986 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
10987 # for simplicity of conversion to/from color representations in various
10988 # languages over compactness; for example, the fields of this representation
10989 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10990 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10991 # method in iOS; and, with just a little work, it can be easily formatted into
10992 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10993 #
10994 # Example (Java):
10995 #
10996 # import com.google.type.Color;
10997 #
10998 # // ...
10999 # public static java.awt.Color fromProto(Color protocolor) {
11000 # float alpha = protocolor.hasAlpha()
11001 # ? protocolor.getAlpha().getValue()
11002 # : 1.0;
11003 #
11004 # return new java.awt.Color(
11005 # protocolor.getRed(),
11006 # protocolor.getGreen(),
11007 # protocolor.getBlue(),
11008 # alpha);
11009 # }
11010 #
11011 # public static Color toProto(java.awt.Color color) {
11012 # float red = (float) color.getRed();
11013 # float green = (float) color.getGreen();
11014 # float blue = (float) color.getBlue();
11015 # float denominator = 255.0;
11016 # Color.Builder resultBuilder =
11017 # Color
11018 # .newBuilder()
11019 # .setRed(red / denominator)
11020 # .setGreen(green / denominator)
11021 # .setBlue(blue / denominator);
11022 # int alpha = color.getAlpha();
11023 # if (alpha != 255) {
11024 # result.setAlpha(
11025 # FloatValue
11026 # .newBuilder()
11027 # .setValue(((float) alpha) / denominator)
11028 # .build());
11029 # }
11030 # return resultBuilder.build();
11031 # }
11032 # // ...
11033 #
11034 # Example (iOS / Obj-C):
11035 #
11036 # // ...
11037 # static UIColor* fromProto(Color* protocolor) {
11038 # float red = [protocolor red];
11039 # float green = [protocolor green];
11040 # float blue = [protocolor blue];
11041 # FloatValue* alpha_wrapper = [protocolor alpha];
11042 # float alpha = 1.0;
11043 # if (alpha_wrapper != nil) {
11044 # alpha = [alpha_wrapper value];
11045 # }
11046 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11047 # }
11048 #
11049 # static Color* toProto(UIColor* color) {
11050 # CGFloat red, green, blue, alpha;
11051 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11052 # return nil;
11053 # }
11054 # Color* result = [Color alloc] init];
11055 # [result setRed:red];
11056 # [result setGreen:green];
11057 # [result setBlue:blue];
11058 # if (alpha <= 0.9999) {
11059 # [result setAlpha:floatWrapperWithValue(alpha)];
11060 # }
11061 # [result autorelease];
11062 # return result;
11063 # }
11064 # // ...
11065 #
11066 # Example (JavaScript):
11067 #
11068 # // ...
11069 #
11070 # var protoToCssColor = function(rgb_color) {
11071 # var redFrac = rgb_color.red || 0.0;
11072 # var greenFrac = rgb_color.green || 0.0;
11073 # var blueFrac = rgb_color.blue || 0.0;
11074 # var red = Math.floor(redFrac * 255);
11075 # var green = Math.floor(greenFrac * 255);
11076 # var blue = Math.floor(blueFrac * 255);
11077 #
11078 # if (!('alpha' in rgb_color)) {
11079 # return rgbToCssColor_(red, green, blue);
11080 # }
11081 #
11082 # var alphaFrac = rgb_color.alpha.value || 0.0;
11083 # var rgbParams = [red, green, blue].join(',');
11084 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11085 # };
11086 #
11087 # var rgbToCssColor_ = function(red, green, blue) {
11088 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11089 # var hexString = rgbNumber.toString(16);
11090 # var missingZeros = 6 - hexString.length;
11091 # var resultBuilder = ['#'];
11092 # for (var i = 0; i < missingZeros; i++) {
11093 # resultBuilder.push('0');
11094 # }
11095 # resultBuilder.push(hexString);
11096 # return resultBuilder.join('');
11097 # };
11098 #
11099 # // ...
11100 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11101 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11102 # the final pixel color is defined by the equation:
11103 #
11104 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11105 #
11106 # This means that a value of 1.0 corresponds to a solid color, whereas
11107 # a value of 0.0 corresponds to a completely transparent color. This
11108 # uses a wrapper message rather than a simple float scalar so that it is
11109 # possible to distinguish between a default value and the value being unset.
11110 # If omitted, this color object is to be rendered as a solid color
11111 # (as if the alpha value had been explicitly given with a value of 1.0).
11112 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11113 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11114 },
11115 "bold": True or False, # True if the text is bold.
11116 "strikethrough": True or False, # True if the text has a strikethrough.
11117 "fontFamily": "A String", # The font family.
11118 "fontSize": 42, # The size of the font.
11119 "italic": True or False, # True if the text is italicized.
11120 "underline": True or False, # True if the text is underlined.
11121 },
11122 },
11123 ],
11124 },
11125 ],
11126 },
11127 ],
11128 "start": { # A coordinate in a sheet. # The coordinate to start writing data at.
11129 # Any number of rows and columns (including a different number of
11130 # columns per row) may be written.
11131 # All indexes are zero-based.
11132 "rowIndex": 42, # The row index of the coordinate.
11133 "columnIndex": 42, # The column index of the coordinate.
11134 "sheetId": 42, # The sheet this coordinate is on.
11135 },
11136 },
11137 "autoFill": { # Fills in more data based on existing data. # Automatically fills in more data based on existing data.
11138 "useAlternateSeries": True or False, # True if we should generate data with the "alternate" series.
11139 # This differs based on the type and amount of source data.
11140 "range": { # A range on a sheet. # The range to autofill. This will examine the range and detect
11141 # the location that has data and automatically fill that data
11142 # in to the rest of the range.
11143 # All indexes are zero-based.
11144 # Indexes are half open, e.g the start index is inclusive
11145 # and the end index is exclusive -- [start_index, end_index).
11146 # Missing indexes indicate the range is unbounded on that side.
11147 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011148 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011149 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011150 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011151 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011152 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011153 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011154 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011155 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011156 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011157 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011158 # `Sheet1!A:B == sheet_id: 0,
11159 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011160 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011161 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011162 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011163 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011164 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011165 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011166 #
11167 # The start index must always be less than or equal to the end index.
11168 # If the start index equals the end index, then the range is empty.
11169 # Empty ranges are typically not meaningful and are usually rendered in the
11170 # UI as `#REF!`.
11171 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11172 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11173 "sheetId": 42, # The sheet this range is on.
11174 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11175 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11176 },
11177 "sourceAndDestination": { # A combination of a source range and how to extend that source. # The source and destination areas to autofill.
11178 # This explicitly lists the source of the autofill and where to
11179 # extend that data.
11180 "source": { # A range on a sheet. # The location of the data to use as the source of the autofill.
11181 # All indexes are zero-based.
11182 # Indexes are half open, e.g the start index is inclusive
11183 # and the end index is exclusive -- [start_index, end_index).
11184 # Missing indexes indicate the range is unbounded on that side.
11185 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011186 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011187 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011188 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011189 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011190 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011191 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011192 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011193 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011194 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011195 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011196 # `Sheet1!A:B == sheet_id: 0,
11197 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011198 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011199 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011200 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011201 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011202 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011203 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011204 #
11205 # The start index must always be less than or equal to the end index.
11206 # If the start index equals the end index, then the range is empty.
11207 # Empty ranges are typically not meaningful and are usually rendered in the
11208 # UI as `#REF!`.
11209 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11210 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11211 "sheetId": 42, # The sheet this range is on.
11212 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11213 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11214 },
11215 "dimension": "A String", # The dimension that data should be filled into.
11216 "fillLength": 42, # The number of rows or columns that data should be filled into.
11217 # Positive numbers expand beyond the last row or last column
11218 # of the source. Negative numbers expand before the first row
11219 # or first column of the source.
11220 },
11221 },
11222 "appendDimension": { # Appends rows or columns to the end of a sheet. # Appends dimensions to the end of a sheet.
11223 "length": 42, # The number of rows or columns to append.
11224 "sheetId": 42, # The sheet to append rows or columns to.
11225 "dimension": "A String", # Whether rows or columns should be appended.
11226 },
11227 "autoResizeDimensions": { # Automatically resizes one or more dimensions based on the contents # Automatically resizes one or more dimensions based on the contents
11228 # of the cells in that dimension.
11229 # of the cells in that dimension.
11230 "dimensions": { # A range along a single dimension on a sheet. # The dimensions to automatically resize.
11231 # Only COLUMNS are supported.
11232 # All indexes are zero-based.
11233 # Indexes are half open: the start index is inclusive
11234 # and the end index is exclusive.
11235 # Missing indexes indicate the range is unbounded on that side.
11236 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
11237 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
11238 "sheetId": 42, # The sheet this span is on.
11239 "dimension": "A String", # The dimension of the span.
11240 },
11241 },
11242 "updateDimensionProperties": { # Updates properties of dimensions within the specified range. # Updates dimensions' properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011243 "fields": "A String", # The fields that should be updated. At least one field must be specified.
11244 # The root `properties` is implied and should not be specified.
11245 # A single `"*"` can be used as short-hand for listing every field.
11246 "range": { # A range along a single dimension on a sheet. # The rows or columns to update.
11247 # All indexes are zero-based.
11248 # Indexes are half open: the start index is inclusive
11249 # and the end index is exclusive.
11250 # Missing indexes indicate the range is unbounded on that side.
11251 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
11252 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
11253 "sheetId": 42, # The sheet this span is on.
11254 "dimension": "A String", # The dimension of the span.
11255 },
11256 "properties": { # Properties about a dimension. # Properties to update.
11257 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
11258 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
11259 "hiddenByFilter": True or False, # True if this dimension is being filtered.
11260 # This field is read-only.
11261 },
11262 },
11263 "unmergeCells": { # Unmerges cells in the given range. # Unmerges merged cells.
11264 "range": { # A range on a sheet. # The range within which all cells should be unmerged.
11265 # If the range spans multiple merges, all will be unmerged.
11266 # The range must not partially span any merge.
11267 # All indexes are zero-based.
11268 # Indexes are half open, e.g the start index is inclusive
11269 # and the end index is exclusive -- [start_index, end_index).
11270 # Missing indexes indicate the range is unbounded on that side.
11271 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011272 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011273 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011274 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011275 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011276 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011277 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011278 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011279 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011280 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011281 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011282 # `Sheet1!A:B == sheet_id: 0,
11283 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011284 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011285 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011286 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011287 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011288 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011289 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011290 #
11291 # The start index must always be less than or equal to the end index.
11292 # If the start index equals the end index, then the range is empty.
11293 # Empty ranges are typically not meaningful and are usually rendered in the
11294 # UI as `#REF!`.
11295 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11296 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11297 "sheetId": 42, # The sheet this range is on.
11298 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11299 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11300 },
11301 },
11302 "setDataValidation": { # Sets a data validation rule to every cell in the range. # Sets data validation for one or more cells.
11303 # To clear validation in a range, call this with no rule specified.
11304 "range": { # A range on a sheet. # The range the data validation rule should apply to.
11305 # All indexes are zero-based.
11306 # Indexes are half open, e.g the start index is inclusive
11307 # and the end index is exclusive -- [start_index, end_index).
11308 # Missing indexes indicate the range is unbounded on that side.
11309 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011310 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011311 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011312 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011313 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011314 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011315 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011316 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011317 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011318 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011319 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011320 # `Sheet1!A:B == sheet_id: 0,
11321 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011322 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011323 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011324 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011325 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011326 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011327 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011328 #
11329 # The start index must always be less than or equal to the end index.
11330 # If the start index equals the end index, then the range is empty.
11331 # Empty ranges are typically not meaningful and are usually rendered in the
11332 # UI as `#REF!`.
11333 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11334 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11335 "sheetId": 42, # The sheet this range is on.
11336 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11337 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11338 },
11339 "rule": { # A data validation rule. # The data validation rule to set on each cell in the range,
11340 # or empty to clear the data validation in the range.
11341 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
11342 # If true, "List" conditions will show a dropdown.
11343 "strict": True or False, # True if invalid data should be rejected.
11344 "inputMessage": "A String", # A message to show the user when adding data to the cell.
11345 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
11346 # BooleanConditions are used by conditional formatting,
11347 # data validation, and the criteria in filters.
11348 "type": "A String", # The type of condition.
11349 "values": [ # The values of the condition. The number of supported values depends
11350 # on the condition type. Some support zero values,
11351 # others one or two values,
11352 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
11353 { # The value of the condition.
11354 "relativeDate": "A String", # A relative date (based on the current date).
11355 # Valid only if the type is
11356 # DATE_BEFORE,
11357 # DATE_AFTER,
11358 # DATE_ON_OR_BEFORE or
11359 # DATE_ON_OR_AFTER.
11360 #
11361 # Relative dates are not supported in data validation.
11362 # They are supported only in conditional formatting and
11363 # conditional filters.
11364 "userEnteredValue": "A String", # A value the condition is based on.
11365 # The value will be parsed as if the user typed into a cell.
11366 # Formulas are supported (and must begin with an `=`).
11367 },
11368 ],
11369 },
11370 },
11371 },
11372 "clearBasicFilter": { # Clears the basic filter, if any exists on the sheet. # Clears the basic filter on a sheet.
11373 "sheetId": 42, # The sheet ID on which the basic filter should be cleared.
11374 },
11375 "addNamedRange": { # Adds a named range to the spreadsheet. # Adds a named range.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011376 "namedRange": { # A named range. # The named range to add. The namedRangeId
11377 # field is optional; if one is not set, an id will be randomly generated. (It
11378 # is an error to specify the ID of a range that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011379 "namedRangeId": "A String", # The ID of the named range.
11380 "range": { # A range on a sheet. # The range this represents.
11381 # All indexes are zero-based.
11382 # Indexes are half open, e.g the start index is inclusive
11383 # and the end index is exclusive -- [start_index, end_index).
11384 # Missing indexes indicate the range is unbounded on that side.
11385 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011386 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011387 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011388 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011389 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011390 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011391 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011392 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011393 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011394 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011395 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011396 # `Sheet1!A:B == sheet_id: 0,
11397 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011398 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011399 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011400 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011401 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011402 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011403 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011404 #
11405 # The start index must always be less than or equal to the end index.
11406 # If the start index equals the end index, then the range is empty.
11407 # Empty ranges are typically not meaningful and are usually rendered in the
11408 # UI as `#REF!`.
11409 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11410 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11411 "sheetId": 42, # The sheet this range is on.
11412 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11413 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11414 },
11415 "name": "A String", # The name of the named range.
11416 },
11417 },
11418 "updateChartSpec": { # Updates a chart's specifications. # Updates a chart's specifications.
11419 # (This does not move or resize a chart. To move or resize a chart, use
11420 # UpdateEmbeddedObjectPositionRequest.)
11421 "chartId": 42, # The ID of the chart to update.
11422 "spec": { # The specifications of a chart. # The specification to apply to the chart.
11423 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011424 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
11425 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
11426 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
11427 "sources": [ # The ranges of data for a series or domain.
11428 # Exactly one dimension must have a length of 1,
11429 # and all sources in the list must have the same dimension
11430 # with length 1.
11431 # The domain (if it exists) & all series must have the same number
11432 # of source ranges. If using more than one source range, then the source
11433 # range at a given offset must be contiguous across the domain and series.
11434 #
11435 # For example, these are valid configurations:
11436 #
11437 # domain sources: A1:A5
11438 # series1 sources: B1:B5
11439 # series2 sources: D6:D10
11440 #
11441 # domain sources: A1:A5, C10:C12
11442 # series1 sources: B1:B5, D10:D12
11443 # series2 sources: C1:C5, E10:E12
11444 { # A range on a sheet.
11445 # All indexes are zero-based.
11446 # Indexes are half open, e.g the start index is inclusive
11447 # and the end index is exclusive -- [start_index, end_index).
11448 # Missing indexes indicate the range is unbounded on that side.
11449 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011450 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011451 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011452 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011453 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011454 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011455 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011456 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011457 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011458 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011459 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011460 # `Sheet1!A:B == sheet_id: 0,
11461 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011462 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011463 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011464 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011465 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011466 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011467 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011468 #
11469 # The start index must always be less than or equal to the end index.
11470 # If the start index equals the end index, then the range is empty.
11471 # Empty ranges are typically not meaningful and are usually rendered in the
11472 # UI as `#REF!`.
11473 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11474 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11475 "sheetId": 42, # The sheet this range is on.
11476 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11477 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11478 },
11479 ],
11480 },
11481 },
11482 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
11483 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
11484 "sources": [ # The ranges of data for a series or domain.
11485 # Exactly one dimension must have a length of 1,
11486 # and all sources in the list must have the same dimension
11487 # with length 1.
11488 # The domain (if it exists) & all series must have the same number
11489 # of source ranges. If using more than one source range, then the source
11490 # range at a given offset must be contiguous across the domain and series.
11491 #
11492 # For example, these are valid configurations:
11493 #
11494 # domain sources: A1:A5
11495 # series1 sources: B1:B5
11496 # series2 sources: D6:D10
11497 #
11498 # domain sources: A1:A5, C10:C12
11499 # series1 sources: B1:B5, D10:D12
11500 # series2 sources: C1:C5, E10:E12
11501 { # A range on a sheet.
11502 # All indexes are zero-based.
11503 # Indexes are half open, e.g the start index is inclusive
11504 # and the end index is exclusive -- [start_index, end_index).
11505 # Missing indexes indicate the range is unbounded on that side.
11506 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011507 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011508 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011509 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011510 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011511 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011512 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011513 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011514 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011515 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011516 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011517 # `Sheet1!A:B == sheet_id: 0,
11518 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011519 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011520 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011521 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011522 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011523 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011524 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011525 #
11526 # The start index must always be less than or equal to the end index.
11527 # If the start index equals the end index, then the range is empty.
11528 # Empty ranges are typically not meaningful and are usually rendered in the
11529 # UI as `#REF!`.
11530 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11531 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11532 "sheetId": 42, # The sheet this range is on.
11533 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11534 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11535 },
11536 ],
11537 },
11538 },
11539 "threeDimensional": True or False, # True if the pie is three dimensional.
11540 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
11541 "pieHole": 3.14, # The size of the hole in the pie chart.
11542 },
11543 "basicChart": { # The specification for a basic chart. See BasicChartType for the list # A basic chart specification, can be one of many kinds of charts.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011544 # See BasicChartType for the list of all
11545 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011546 # of charts this supports.
11547 "headerCount": 42, # The number of rows or columns in the data that are "headers".
11548 # If not set, Google Sheets will guess how many rows are headers based
11549 # on the data.
11550 #
11551 # (Note that BasicChartAxis.title may override the axis title
11552 # inferred from the header values.)
11553 "series": [ # The data this chart is visualizing.
11554 { # A single series of data in a chart.
11555 # For example, if charting stock prices over time, multiple series may exist,
11556 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
11557 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
11558 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
11559 "sources": [ # The ranges of data for a series or domain.
11560 # Exactly one dimension must have a length of 1,
11561 # and all sources in the list must have the same dimension
11562 # with length 1.
11563 # The domain (if it exists) & all series must have the same number
11564 # of source ranges. If using more than one source range, then the source
11565 # range at a given offset must be contiguous across the domain and series.
11566 #
11567 # For example, these are valid configurations:
11568 #
11569 # domain sources: A1:A5
11570 # series1 sources: B1:B5
11571 # series2 sources: D6:D10
11572 #
11573 # domain sources: A1:A5, C10:C12
11574 # series1 sources: B1:B5, D10:D12
11575 # series2 sources: C1:C5, E10:E12
11576 { # A range on a sheet.
11577 # All indexes are zero-based.
11578 # Indexes are half open, e.g the start index is inclusive
11579 # and the end index is exclusive -- [start_index, end_index).
11580 # Missing indexes indicate the range is unbounded on that side.
11581 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011582 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011583 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011584 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011585 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011586 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011587 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011588 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011589 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011590 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011591 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011592 # `Sheet1!A:B == sheet_id: 0,
11593 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011594 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011595 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011596 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011597 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011598 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011599 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011600 #
11601 # The start index must always be less than or equal to the end index.
11602 # If the start index equals the end index, then the range is empty.
11603 # Empty ranges are typically not meaningful and are usually rendered in the
11604 # UI as `#REF!`.
11605 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11606 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11607 "sheetId": 42, # The sheet this range is on.
11608 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11609 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11610 },
11611 ],
11612 },
11613 },
11614 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
11615 # For example, if charting stocks over time, the "Volume" series
11616 # may want to be pinned to the right with the prices pinned to the left,
11617 # because the scale of trading volume is different than the scale of
11618 # prices.
11619 # It is an error to specify an axis that isn't a valid minor axis
11620 # for the chart's type.
11621 "type": "A String", # The type of this series. Valid only if the
11622 # chartType is
11623 # COMBO.
11624 # Different types will change the way the series is visualized.
11625 # Only LINE, AREA,
11626 # and COLUMN are supported.
11627 },
11628 ],
11629 "legendPosition": "A String", # The position of the chart legend.
11630 "domains": [ # The domain of data this is charting.
11631 # Only a single domain is currently supported.
11632 { # The domain of a chart.
11633 # For example, if charting stock prices over time, this would be the date.
11634 "domain": { # The data included in a domain or series. # The data of the domain. For example, if charting stock prices over time,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011635 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011636 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
11637 "sources": [ # The ranges of data for a series or domain.
11638 # Exactly one dimension must have a length of 1,
11639 # and all sources in the list must have the same dimension
11640 # with length 1.
11641 # The domain (if it exists) & all series must have the same number
11642 # of source ranges. If using more than one source range, then the source
11643 # range at a given offset must be contiguous across the domain and series.
11644 #
11645 # For example, these are valid configurations:
11646 #
11647 # domain sources: A1:A5
11648 # series1 sources: B1:B5
11649 # series2 sources: D6:D10
11650 #
11651 # domain sources: A1:A5, C10:C12
11652 # series1 sources: B1:B5, D10:D12
11653 # series2 sources: C1:C5, E10:E12
11654 { # A range on a sheet.
11655 # All indexes are zero-based.
11656 # Indexes are half open, e.g the start index is inclusive
11657 # and the end index is exclusive -- [start_index, end_index).
11658 # Missing indexes indicate the range is unbounded on that side.
11659 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011660 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011661 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011662 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011663 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011664 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011665 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011666 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011667 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011668 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011669 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011670 # `Sheet1!A:B == sheet_id: 0,
11671 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011672 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011673 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011674 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011675 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011676 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011677 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011678 #
11679 # The start index must always be less than or equal to the end index.
11680 # If the start index equals the end index, then the range is empty.
11681 # Empty ranges are typically not meaningful and are usually rendered in the
11682 # UI as `#REF!`.
11683 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11684 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11685 "sheetId": 42, # The sheet this range is on.
11686 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11687 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11688 },
11689 ],
11690 },
11691 },
11692 },
11693 ],
11694 "chartType": "A String", # The type of the chart.
11695 "axis": [ # The axis on the chart.
11696 { # An axis of the chart.
11697 # A chart may not have more than one axis per
11698 # axis position.
11699 "position": "A String", # The position of this axis.
11700 "format": { # The format of a run of text in a cell. # The format of the title.
11701 # Only valid if the axis is not associated with the domain.
11702 # Absent values indicate that the field isn't specified.
11703 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
11704 # for simplicity of conversion to/from color representations in various
11705 # languages over compactness; for example, the fields of this representation
11706 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11707 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11708 # method in iOS; and, with just a little work, it can be easily formatted into
11709 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11710 #
11711 # Example (Java):
11712 #
11713 # import com.google.type.Color;
11714 #
11715 # // ...
11716 # public static java.awt.Color fromProto(Color protocolor) {
11717 # float alpha = protocolor.hasAlpha()
11718 # ? protocolor.getAlpha().getValue()
11719 # : 1.0;
11720 #
11721 # return new java.awt.Color(
11722 # protocolor.getRed(),
11723 # protocolor.getGreen(),
11724 # protocolor.getBlue(),
11725 # alpha);
11726 # }
11727 #
11728 # public static Color toProto(java.awt.Color color) {
11729 # float red = (float) color.getRed();
11730 # float green = (float) color.getGreen();
11731 # float blue = (float) color.getBlue();
11732 # float denominator = 255.0;
11733 # Color.Builder resultBuilder =
11734 # Color
11735 # .newBuilder()
11736 # .setRed(red / denominator)
11737 # .setGreen(green / denominator)
11738 # .setBlue(blue / denominator);
11739 # int alpha = color.getAlpha();
11740 # if (alpha != 255) {
11741 # result.setAlpha(
11742 # FloatValue
11743 # .newBuilder()
11744 # .setValue(((float) alpha) / denominator)
11745 # .build());
11746 # }
11747 # return resultBuilder.build();
11748 # }
11749 # // ...
11750 #
11751 # Example (iOS / Obj-C):
11752 #
11753 # // ...
11754 # static UIColor* fromProto(Color* protocolor) {
11755 # float red = [protocolor red];
11756 # float green = [protocolor green];
11757 # float blue = [protocolor blue];
11758 # FloatValue* alpha_wrapper = [protocolor alpha];
11759 # float alpha = 1.0;
11760 # if (alpha_wrapper != nil) {
11761 # alpha = [alpha_wrapper value];
11762 # }
11763 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11764 # }
11765 #
11766 # static Color* toProto(UIColor* color) {
11767 # CGFloat red, green, blue, alpha;
11768 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11769 # return nil;
11770 # }
11771 # Color* result = [Color alloc] init];
11772 # [result setRed:red];
11773 # [result setGreen:green];
11774 # [result setBlue:blue];
11775 # if (alpha <= 0.9999) {
11776 # [result setAlpha:floatWrapperWithValue(alpha)];
11777 # }
11778 # [result autorelease];
11779 # return result;
11780 # }
11781 # // ...
11782 #
11783 # Example (JavaScript):
11784 #
11785 # // ...
11786 #
11787 # var protoToCssColor = function(rgb_color) {
11788 # var redFrac = rgb_color.red || 0.0;
11789 # var greenFrac = rgb_color.green || 0.0;
11790 # var blueFrac = rgb_color.blue || 0.0;
11791 # var red = Math.floor(redFrac * 255);
11792 # var green = Math.floor(greenFrac * 255);
11793 # var blue = Math.floor(blueFrac * 255);
11794 #
11795 # if (!('alpha' in rgb_color)) {
11796 # return rgbToCssColor_(red, green, blue);
11797 # }
11798 #
11799 # var alphaFrac = rgb_color.alpha.value || 0.0;
11800 # var rgbParams = [red, green, blue].join(',');
11801 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11802 # };
11803 #
11804 # var rgbToCssColor_ = function(red, green, blue) {
11805 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11806 # var hexString = rgbNumber.toString(16);
11807 # var missingZeros = 6 - hexString.length;
11808 # var resultBuilder = ['#'];
11809 # for (var i = 0; i < missingZeros; i++) {
11810 # resultBuilder.push('0');
11811 # }
11812 # resultBuilder.push(hexString);
11813 # return resultBuilder.join('');
11814 # };
11815 #
11816 # // ...
11817 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11818 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11819 # the final pixel color is defined by the equation:
11820 #
11821 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11822 #
11823 # This means that a value of 1.0 corresponds to a solid color, whereas
11824 # a value of 0.0 corresponds to a completely transparent color. This
11825 # uses a wrapper message rather than a simple float scalar so that it is
11826 # possible to distinguish between a default value and the value being unset.
11827 # If omitted, this color object is to be rendered as a solid color
11828 # (as if the alpha value had been explicitly given with a value of 1.0).
11829 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11830 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11831 },
11832 "bold": True or False, # True if the text is bold.
11833 "strikethrough": True or False, # True if the text has a strikethrough.
11834 "fontFamily": "A String", # The font family.
11835 "fontSize": 42, # The size of the font.
11836 "italic": True or False, # True if the text is italicized.
11837 "underline": True or False, # True if the text is underlined.
11838 },
11839 "title": "A String", # The title of this axis. If set, this overrides any title inferred
11840 # from headers of the data.
11841 },
11842 ],
11843 },
11844 "title": "A String", # The title of the chart.
11845 },
11846 },
11847 "moveDimension": { # Moves one or more rows or columns. # Moves rows or columns to another location in a sheet.
11848 "source": { # A range along a single dimension on a sheet. # The source dimensions to move.
11849 # All indexes are zero-based.
11850 # Indexes are half open: the start index is inclusive
11851 # and the end index is exclusive.
11852 # Missing indexes indicate the range is unbounded on that side.
11853 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
11854 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
11855 "sheetId": 42, # The sheet this span is on.
11856 "dimension": "A String", # The dimension of the span.
11857 },
11858 "destinationIndex": 42, # The zero-based start index of where to move the source data to,
11859 # based on the coordinates *before* the source data is removed
11860 # from the grid. Existing data will be shifted down or right
11861 # (depending on the dimension) to make room for the moved dimensions.
11862 # The source dimensions are removed from the grid, so the
11863 # the data may end up in a different index than specified.
11864 #
11865 # For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011866 # `"1"` and `"2"` to between `"3"` and `"4"`, the source would be
11867 # `ROWS [1..3)`,and the destination index would be `"4"`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011868 # (the zero-based index of row 5).
11869 # The end result would be `A1..A5` of `0, 3, 1, 2, 4`.
11870 },
11871 "textToColumns": { # Splits a column of text into multiple columns, # Converts a column of text into many columns of text.
11872 # based on a delimiter in each cell.
11873 "source": { # A range on a sheet. # The source data range. This must span exactly one column.
11874 # All indexes are zero-based.
11875 # Indexes are half open, e.g the start index is inclusive
11876 # and the end index is exclusive -- [start_index, end_index).
11877 # Missing indexes indicate the range is unbounded on that side.
11878 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011879 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011880 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011881 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011882 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011883 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011884 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011885 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011886 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011887 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011888 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011889 # `Sheet1!A:B == sheet_id: 0,
11890 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011891 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011892 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011893 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011894 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011895 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011896 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011897 #
11898 # The start index must always be less than or equal to the end index.
11899 # If the start index equals the end index, then the range is empty.
11900 # Empty ranges are typically not meaningful and are usually rendered in the
11901 # UI as `#REF!`.
11902 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11903 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11904 "sheetId": 42, # The sheet this range is on.
11905 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11906 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11907 },
11908 "delimiter": "A String", # The delimiter to use. Used only if delimiterType is
11909 # CUSTOM.
11910 "delimiterType": "A String", # The delimiter type to use.
11911 },
11912 "deleteFilterView": { # Deletes a particular filter view. # Deletes a filter view from a sheet.
11913 "filterId": 42, # The ID of the filter to delete.
11914 },
11915 "mergeCells": { # Merges all cells in the range. # Merges cells together.
11916 "range": { # A range on a sheet. # The range of cells to merge.
11917 # All indexes are zero-based.
11918 # Indexes are half open, e.g the start index is inclusive
11919 # and the end index is exclusive -- [start_index, end_index).
11920 # Missing indexes indicate the range is unbounded on that side.
11921 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011922 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011923 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011924 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011925 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011926 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011927 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011928 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011929 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011930 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011931 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011932 # `Sheet1!A:B == sheet_id: 0,
11933 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011934 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011935 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011936 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011937 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011938 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011939 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011940 #
11941 # The start index must always be less than or equal to the end index.
11942 # If the start index equals the end index, then the range is empty.
11943 # Empty ranges are typically not meaningful and are usually rendered in the
11944 # UI as `#REF!`.
11945 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11946 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11947 "sheetId": 42, # The sheet this range is on.
11948 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11949 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11950 },
11951 "mergeType": "A String", # How the cells should be merged.
11952 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011953 "deleteProtectedRange": { # Deletes the protected range with the given ID. # Deletes a protected range.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011954 "protectedRangeId": 42, # The ID of the protected range to delete.
11955 },
11956 "addFilterView": { # Adds a filter view. # Adds a filter view.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011957 "filter": { # A filter view. # The filter to add. The filterViewId
11958 # field is optional; if one is not set, an id will be randomly generated. (It
11959 # is an error to specify the ID of a filter that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011960 "title": "A String", # The name of the filter view.
11961 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
11962 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011963 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011964 # may be set.
11965 "filterViewId": 42, # The ID of the filter view.
11966 "range": { # A range on a sheet. # The range this filter view covers.
11967 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011968 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011969 # may be set.
11970 # All indexes are zero-based.
11971 # Indexes are half open, e.g the start index is inclusive
11972 # and the end index is exclusive -- [start_index, end_index).
11973 # Missing indexes indicate the range is unbounded on that side.
11974 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011975 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011976 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011977 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011978 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011979 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011980 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011981 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011982 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011983 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011984 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011985 # `Sheet1!A:B == sheet_id: 0,
11986 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011987 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011988 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011989 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011990 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011991 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011992 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011993 #
11994 # The start index must always be less than or equal to the end index.
11995 # If the start index equals the end index, then the range is empty.
11996 # Empty ranges are typically not meaningful and are usually rendered in the
11997 # UI as `#REF!`.
11998 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11999 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12000 "sheetId": 42, # The sheet this range is on.
12001 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12002 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12003 },
12004 "sortSpecs": [ # The sort order per column. Later specifications are used when values
12005 # are equal in the earlier specifications.
12006 { # A sort order associated with a specific column or row.
12007 "sortOrder": "A String", # The order data should be sorted.
12008 "dimensionIndex": 42, # The dimension the sort should be applied to.
12009 },
12010 ],
12011 "criteria": { # The criteria for showing/hiding values per column.
12012 # The map's key is the column index, and the value is the criteria for
12013 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012014 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012015 "hiddenValues": [ # Values that should be hidden.
12016 "A String",
12017 ],
12018 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
12019 # (This does not override hiddenValues -- if a value is listed there,
12020 # it will still be hidden.)
12021 # BooleanConditions are used by conditional formatting,
12022 # data validation, and the criteria in filters.
12023 "type": "A String", # The type of condition.
12024 "values": [ # The values of the condition. The number of supported values depends
12025 # on the condition type. Some support zero values,
12026 # others one or two values,
12027 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
12028 { # The value of the condition.
12029 "relativeDate": "A String", # A relative date (based on the current date).
12030 # Valid only if the type is
12031 # DATE_BEFORE,
12032 # DATE_AFTER,
12033 # DATE_ON_OR_BEFORE or
12034 # DATE_ON_OR_AFTER.
12035 #
12036 # Relative dates are not supported in data validation.
12037 # They are supported only in conditional formatting and
12038 # conditional filters.
12039 "userEnteredValue": "A String", # A value the condition is based on.
12040 # The value will be parsed as if the user typed into a cell.
12041 # Formulas are supported (and must begin with an `=`).
12042 },
12043 ],
12044 },
12045 },
12046 },
12047 },
12048 },
12049 "deleteSheet": { # Deletes the requested sheet. # Deletes a sheet.
12050 "sheetId": 42, # The ID of the sheet to delete.
12051 },
12052 "updateBorders": { # Updates the borders of a range. # Updates the borders in a range of cells.
12053 # If a field is not set in the request, that means the border remains as-is.
12054 # For example, with two subsequent UpdateBordersRequest:
12055 #
12056 # 1. range: A1:A5 `{ top: RED, bottom: WHITE }`
12057 # 2. range: A1:A5 `{ left: BLUE }`
12058 #
12059 # That would result in A1:A5 having a borders of
12060 # `{ top: RED, bottom: WHITE, left: BLUE }`.
12061 # If you want to clear a border, explicitly set the style to
12062 # NONE.
12063 "right": { # A border along a cell. # The border to put at the right of the range.
12064 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
12065 # for simplicity of conversion to/from color representations in various
12066 # languages over compactness; for example, the fields of this representation
12067 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12068 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12069 # method in iOS; and, with just a little work, it can be easily formatted into
12070 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12071 #
12072 # Example (Java):
12073 #
12074 # import com.google.type.Color;
12075 #
12076 # // ...
12077 # public static java.awt.Color fromProto(Color protocolor) {
12078 # float alpha = protocolor.hasAlpha()
12079 # ? protocolor.getAlpha().getValue()
12080 # : 1.0;
12081 #
12082 # return new java.awt.Color(
12083 # protocolor.getRed(),
12084 # protocolor.getGreen(),
12085 # protocolor.getBlue(),
12086 # alpha);
12087 # }
12088 #
12089 # public static Color toProto(java.awt.Color color) {
12090 # float red = (float) color.getRed();
12091 # float green = (float) color.getGreen();
12092 # float blue = (float) color.getBlue();
12093 # float denominator = 255.0;
12094 # Color.Builder resultBuilder =
12095 # Color
12096 # .newBuilder()
12097 # .setRed(red / denominator)
12098 # .setGreen(green / denominator)
12099 # .setBlue(blue / denominator);
12100 # int alpha = color.getAlpha();
12101 # if (alpha != 255) {
12102 # result.setAlpha(
12103 # FloatValue
12104 # .newBuilder()
12105 # .setValue(((float) alpha) / denominator)
12106 # .build());
12107 # }
12108 # return resultBuilder.build();
12109 # }
12110 # // ...
12111 #
12112 # Example (iOS / Obj-C):
12113 #
12114 # // ...
12115 # static UIColor* fromProto(Color* protocolor) {
12116 # float red = [protocolor red];
12117 # float green = [protocolor green];
12118 # float blue = [protocolor blue];
12119 # FloatValue* alpha_wrapper = [protocolor alpha];
12120 # float alpha = 1.0;
12121 # if (alpha_wrapper != nil) {
12122 # alpha = [alpha_wrapper value];
12123 # }
12124 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12125 # }
12126 #
12127 # static Color* toProto(UIColor* color) {
12128 # CGFloat red, green, blue, alpha;
12129 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12130 # return nil;
12131 # }
12132 # Color* result = [Color alloc] init];
12133 # [result setRed:red];
12134 # [result setGreen:green];
12135 # [result setBlue:blue];
12136 # if (alpha <= 0.9999) {
12137 # [result setAlpha:floatWrapperWithValue(alpha)];
12138 # }
12139 # [result autorelease];
12140 # return result;
12141 # }
12142 # // ...
12143 #
12144 # Example (JavaScript):
12145 #
12146 # // ...
12147 #
12148 # var protoToCssColor = function(rgb_color) {
12149 # var redFrac = rgb_color.red || 0.0;
12150 # var greenFrac = rgb_color.green || 0.0;
12151 # var blueFrac = rgb_color.blue || 0.0;
12152 # var red = Math.floor(redFrac * 255);
12153 # var green = Math.floor(greenFrac * 255);
12154 # var blue = Math.floor(blueFrac * 255);
12155 #
12156 # if (!('alpha' in rgb_color)) {
12157 # return rgbToCssColor_(red, green, blue);
12158 # }
12159 #
12160 # var alphaFrac = rgb_color.alpha.value || 0.0;
12161 # var rgbParams = [red, green, blue].join(',');
12162 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12163 # };
12164 #
12165 # var rgbToCssColor_ = function(red, green, blue) {
12166 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12167 # var hexString = rgbNumber.toString(16);
12168 # var missingZeros = 6 - hexString.length;
12169 # var resultBuilder = ['#'];
12170 # for (var i = 0; i < missingZeros; i++) {
12171 # resultBuilder.push('0');
12172 # }
12173 # resultBuilder.push(hexString);
12174 # return resultBuilder.join('');
12175 # };
12176 #
12177 # // ...
12178 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12179 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12180 # the final pixel color is defined by the equation:
12181 #
12182 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12183 #
12184 # This means that a value of 1.0 corresponds to a solid color, whereas
12185 # a value of 0.0 corresponds to a completely transparent color. This
12186 # uses a wrapper message rather than a simple float scalar so that it is
12187 # possible to distinguish between a default value and the value being unset.
12188 # If omitted, this color object is to be rendered as a solid color
12189 # (as if the alpha value had been explicitly given with a value of 1.0).
12190 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12191 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12192 },
12193 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012194 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012195 "style": "A String", # The style of the border.
12196 },
12197 "bottom": { # A border along a cell. # The border to put at the bottom of the range.
12198 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
12199 # for simplicity of conversion to/from color representations in various
12200 # languages over compactness; for example, the fields of this representation
12201 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12202 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12203 # method in iOS; and, with just a little work, it can be easily formatted into
12204 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12205 #
12206 # Example (Java):
12207 #
12208 # import com.google.type.Color;
12209 #
12210 # // ...
12211 # public static java.awt.Color fromProto(Color protocolor) {
12212 # float alpha = protocolor.hasAlpha()
12213 # ? protocolor.getAlpha().getValue()
12214 # : 1.0;
12215 #
12216 # return new java.awt.Color(
12217 # protocolor.getRed(),
12218 # protocolor.getGreen(),
12219 # protocolor.getBlue(),
12220 # alpha);
12221 # }
12222 #
12223 # public static Color toProto(java.awt.Color color) {
12224 # float red = (float) color.getRed();
12225 # float green = (float) color.getGreen();
12226 # float blue = (float) color.getBlue();
12227 # float denominator = 255.0;
12228 # Color.Builder resultBuilder =
12229 # Color
12230 # .newBuilder()
12231 # .setRed(red / denominator)
12232 # .setGreen(green / denominator)
12233 # .setBlue(blue / denominator);
12234 # int alpha = color.getAlpha();
12235 # if (alpha != 255) {
12236 # result.setAlpha(
12237 # FloatValue
12238 # .newBuilder()
12239 # .setValue(((float) alpha) / denominator)
12240 # .build());
12241 # }
12242 # return resultBuilder.build();
12243 # }
12244 # // ...
12245 #
12246 # Example (iOS / Obj-C):
12247 #
12248 # // ...
12249 # static UIColor* fromProto(Color* protocolor) {
12250 # float red = [protocolor red];
12251 # float green = [protocolor green];
12252 # float blue = [protocolor blue];
12253 # FloatValue* alpha_wrapper = [protocolor alpha];
12254 # float alpha = 1.0;
12255 # if (alpha_wrapper != nil) {
12256 # alpha = [alpha_wrapper value];
12257 # }
12258 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12259 # }
12260 #
12261 # static Color* toProto(UIColor* color) {
12262 # CGFloat red, green, blue, alpha;
12263 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12264 # return nil;
12265 # }
12266 # Color* result = [Color alloc] init];
12267 # [result setRed:red];
12268 # [result setGreen:green];
12269 # [result setBlue:blue];
12270 # if (alpha <= 0.9999) {
12271 # [result setAlpha:floatWrapperWithValue(alpha)];
12272 # }
12273 # [result autorelease];
12274 # return result;
12275 # }
12276 # // ...
12277 #
12278 # Example (JavaScript):
12279 #
12280 # // ...
12281 #
12282 # var protoToCssColor = function(rgb_color) {
12283 # var redFrac = rgb_color.red || 0.0;
12284 # var greenFrac = rgb_color.green || 0.0;
12285 # var blueFrac = rgb_color.blue || 0.0;
12286 # var red = Math.floor(redFrac * 255);
12287 # var green = Math.floor(greenFrac * 255);
12288 # var blue = Math.floor(blueFrac * 255);
12289 #
12290 # if (!('alpha' in rgb_color)) {
12291 # return rgbToCssColor_(red, green, blue);
12292 # }
12293 #
12294 # var alphaFrac = rgb_color.alpha.value || 0.0;
12295 # var rgbParams = [red, green, blue].join(',');
12296 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12297 # };
12298 #
12299 # var rgbToCssColor_ = function(red, green, blue) {
12300 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12301 # var hexString = rgbNumber.toString(16);
12302 # var missingZeros = 6 - hexString.length;
12303 # var resultBuilder = ['#'];
12304 # for (var i = 0; i < missingZeros; i++) {
12305 # resultBuilder.push('0');
12306 # }
12307 # resultBuilder.push(hexString);
12308 # return resultBuilder.join('');
12309 # };
12310 #
12311 # // ...
12312 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12313 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12314 # the final pixel color is defined by the equation:
12315 #
12316 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12317 #
12318 # This means that a value of 1.0 corresponds to a solid color, whereas
12319 # a value of 0.0 corresponds to a completely transparent color. This
12320 # uses a wrapper message rather than a simple float scalar so that it is
12321 # possible to distinguish between a default value and the value being unset.
12322 # If omitted, this color object is to be rendered as a solid color
12323 # (as if the alpha value had been explicitly given with a value of 1.0).
12324 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12325 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12326 },
12327 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012328 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012329 "style": "A String", # The style of the border.
12330 },
12331 "top": { # A border along a cell. # The border to put at the top of the range.
12332 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
12333 # for simplicity of conversion to/from color representations in various
12334 # languages over compactness; for example, the fields of this representation
12335 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12336 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12337 # method in iOS; and, with just a little work, it can be easily formatted into
12338 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12339 #
12340 # Example (Java):
12341 #
12342 # import com.google.type.Color;
12343 #
12344 # // ...
12345 # public static java.awt.Color fromProto(Color protocolor) {
12346 # float alpha = protocolor.hasAlpha()
12347 # ? protocolor.getAlpha().getValue()
12348 # : 1.0;
12349 #
12350 # return new java.awt.Color(
12351 # protocolor.getRed(),
12352 # protocolor.getGreen(),
12353 # protocolor.getBlue(),
12354 # alpha);
12355 # }
12356 #
12357 # public static Color toProto(java.awt.Color color) {
12358 # float red = (float) color.getRed();
12359 # float green = (float) color.getGreen();
12360 # float blue = (float) color.getBlue();
12361 # float denominator = 255.0;
12362 # Color.Builder resultBuilder =
12363 # Color
12364 # .newBuilder()
12365 # .setRed(red / denominator)
12366 # .setGreen(green / denominator)
12367 # .setBlue(blue / denominator);
12368 # int alpha = color.getAlpha();
12369 # if (alpha != 255) {
12370 # result.setAlpha(
12371 # FloatValue
12372 # .newBuilder()
12373 # .setValue(((float) alpha) / denominator)
12374 # .build());
12375 # }
12376 # return resultBuilder.build();
12377 # }
12378 # // ...
12379 #
12380 # Example (iOS / Obj-C):
12381 #
12382 # // ...
12383 # static UIColor* fromProto(Color* protocolor) {
12384 # float red = [protocolor red];
12385 # float green = [protocolor green];
12386 # float blue = [protocolor blue];
12387 # FloatValue* alpha_wrapper = [protocolor alpha];
12388 # float alpha = 1.0;
12389 # if (alpha_wrapper != nil) {
12390 # alpha = [alpha_wrapper value];
12391 # }
12392 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12393 # }
12394 #
12395 # static Color* toProto(UIColor* color) {
12396 # CGFloat red, green, blue, alpha;
12397 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12398 # return nil;
12399 # }
12400 # Color* result = [Color alloc] init];
12401 # [result setRed:red];
12402 # [result setGreen:green];
12403 # [result setBlue:blue];
12404 # if (alpha <= 0.9999) {
12405 # [result setAlpha:floatWrapperWithValue(alpha)];
12406 # }
12407 # [result autorelease];
12408 # return result;
12409 # }
12410 # // ...
12411 #
12412 # Example (JavaScript):
12413 #
12414 # // ...
12415 #
12416 # var protoToCssColor = function(rgb_color) {
12417 # var redFrac = rgb_color.red || 0.0;
12418 # var greenFrac = rgb_color.green || 0.0;
12419 # var blueFrac = rgb_color.blue || 0.0;
12420 # var red = Math.floor(redFrac * 255);
12421 # var green = Math.floor(greenFrac * 255);
12422 # var blue = Math.floor(blueFrac * 255);
12423 #
12424 # if (!('alpha' in rgb_color)) {
12425 # return rgbToCssColor_(red, green, blue);
12426 # }
12427 #
12428 # var alphaFrac = rgb_color.alpha.value || 0.0;
12429 # var rgbParams = [red, green, blue].join(',');
12430 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12431 # };
12432 #
12433 # var rgbToCssColor_ = function(red, green, blue) {
12434 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12435 # var hexString = rgbNumber.toString(16);
12436 # var missingZeros = 6 - hexString.length;
12437 # var resultBuilder = ['#'];
12438 # for (var i = 0; i < missingZeros; i++) {
12439 # resultBuilder.push('0');
12440 # }
12441 # resultBuilder.push(hexString);
12442 # return resultBuilder.join('');
12443 # };
12444 #
12445 # // ...
12446 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12447 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12448 # the final pixel color is defined by the equation:
12449 #
12450 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12451 #
12452 # This means that a value of 1.0 corresponds to a solid color, whereas
12453 # a value of 0.0 corresponds to a completely transparent color. This
12454 # uses a wrapper message rather than a simple float scalar so that it is
12455 # possible to distinguish between a default value and the value being unset.
12456 # If omitted, this color object is to be rendered as a solid color
12457 # (as if the alpha value had been explicitly given with a value of 1.0).
12458 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12459 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12460 },
12461 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012462 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012463 "style": "A String", # The style of the border.
12464 },
12465 "innerHorizontal": { # A border along a cell. # The horizontal border to put within the range.
12466 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
12467 # for simplicity of conversion to/from color representations in various
12468 # languages over compactness; for example, the fields of this representation
12469 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12470 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12471 # method in iOS; and, with just a little work, it can be easily formatted into
12472 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12473 #
12474 # Example (Java):
12475 #
12476 # import com.google.type.Color;
12477 #
12478 # // ...
12479 # public static java.awt.Color fromProto(Color protocolor) {
12480 # float alpha = protocolor.hasAlpha()
12481 # ? protocolor.getAlpha().getValue()
12482 # : 1.0;
12483 #
12484 # return new java.awt.Color(
12485 # protocolor.getRed(),
12486 # protocolor.getGreen(),
12487 # protocolor.getBlue(),
12488 # alpha);
12489 # }
12490 #
12491 # public static Color toProto(java.awt.Color color) {
12492 # float red = (float) color.getRed();
12493 # float green = (float) color.getGreen();
12494 # float blue = (float) color.getBlue();
12495 # float denominator = 255.0;
12496 # Color.Builder resultBuilder =
12497 # Color
12498 # .newBuilder()
12499 # .setRed(red / denominator)
12500 # .setGreen(green / denominator)
12501 # .setBlue(blue / denominator);
12502 # int alpha = color.getAlpha();
12503 # if (alpha != 255) {
12504 # result.setAlpha(
12505 # FloatValue
12506 # .newBuilder()
12507 # .setValue(((float) alpha) / denominator)
12508 # .build());
12509 # }
12510 # return resultBuilder.build();
12511 # }
12512 # // ...
12513 #
12514 # Example (iOS / Obj-C):
12515 #
12516 # // ...
12517 # static UIColor* fromProto(Color* protocolor) {
12518 # float red = [protocolor red];
12519 # float green = [protocolor green];
12520 # float blue = [protocolor blue];
12521 # FloatValue* alpha_wrapper = [protocolor alpha];
12522 # float alpha = 1.0;
12523 # if (alpha_wrapper != nil) {
12524 # alpha = [alpha_wrapper value];
12525 # }
12526 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12527 # }
12528 #
12529 # static Color* toProto(UIColor* color) {
12530 # CGFloat red, green, blue, alpha;
12531 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12532 # return nil;
12533 # }
12534 # Color* result = [Color alloc] init];
12535 # [result setRed:red];
12536 # [result setGreen:green];
12537 # [result setBlue:blue];
12538 # if (alpha <= 0.9999) {
12539 # [result setAlpha:floatWrapperWithValue(alpha)];
12540 # }
12541 # [result autorelease];
12542 # return result;
12543 # }
12544 # // ...
12545 #
12546 # Example (JavaScript):
12547 #
12548 # // ...
12549 #
12550 # var protoToCssColor = function(rgb_color) {
12551 # var redFrac = rgb_color.red || 0.0;
12552 # var greenFrac = rgb_color.green || 0.0;
12553 # var blueFrac = rgb_color.blue || 0.0;
12554 # var red = Math.floor(redFrac * 255);
12555 # var green = Math.floor(greenFrac * 255);
12556 # var blue = Math.floor(blueFrac * 255);
12557 #
12558 # if (!('alpha' in rgb_color)) {
12559 # return rgbToCssColor_(red, green, blue);
12560 # }
12561 #
12562 # var alphaFrac = rgb_color.alpha.value || 0.0;
12563 # var rgbParams = [red, green, blue].join(',');
12564 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12565 # };
12566 #
12567 # var rgbToCssColor_ = function(red, green, blue) {
12568 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12569 # var hexString = rgbNumber.toString(16);
12570 # var missingZeros = 6 - hexString.length;
12571 # var resultBuilder = ['#'];
12572 # for (var i = 0; i < missingZeros; i++) {
12573 # resultBuilder.push('0');
12574 # }
12575 # resultBuilder.push(hexString);
12576 # return resultBuilder.join('');
12577 # };
12578 #
12579 # // ...
12580 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12581 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12582 # the final pixel color is defined by the equation:
12583 #
12584 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12585 #
12586 # This means that a value of 1.0 corresponds to a solid color, whereas
12587 # a value of 0.0 corresponds to a completely transparent color. This
12588 # uses a wrapper message rather than a simple float scalar so that it is
12589 # possible to distinguish between a default value and the value being unset.
12590 # If omitted, this color object is to be rendered as a solid color
12591 # (as if the alpha value had been explicitly given with a value of 1.0).
12592 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12593 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12594 },
12595 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012596 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012597 "style": "A String", # The style of the border.
12598 },
12599 "range": { # A range on a sheet. # The range whose borders should be updated.
12600 # All indexes are zero-based.
12601 # Indexes are half open, e.g the start index is inclusive
12602 # and the end index is exclusive -- [start_index, end_index).
12603 # Missing indexes indicate the range is unbounded on that side.
12604 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012605 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012606 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012607 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012608 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012609 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012610 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012611 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012612 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012613 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012614 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012615 # `Sheet1!A:B == sheet_id: 0,
12616 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012617 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012618 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012619 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012620 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012621 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012622 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012623 #
12624 # The start index must always be less than or equal to the end index.
12625 # If the start index equals the end index, then the range is empty.
12626 # Empty ranges are typically not meaningful and are usually rendered in the
12627 # UI as `#REF!`.
12628 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12629 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12630 "sheetId": 42, # The sheet this range is on.
12631 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12632 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12633 },
12634 "innerVertical": { # A border along a cell. # The vertical border to put within the range.
12635 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
12636 # for simplicity of conversion to/from color representations in various
12637 # languages over compactness; for example, the fields of this representation
12638 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12639 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12640 # method in iOS; and, with just a little work, it can be easily formatted into
12641 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12642 #
12643 # Example (Java):
12644 #
12645 # import com.google.type.Color;
12646 #
12647 # // ...
12648 # public static java.awt.Color fromProto(Color protocolor) {
12649 # float alpha = protocolor.hasAlpha()
12650 # ? protocolor.getAlpha().getValue()
12651 # : 1.0;
12652 #
12653 # return new java.awt.Color(
12654 # protocolor.getRed(),
12655 # protocolor.getGreen(),
12656 # protocolor.getBlue(),
12657 # alpha);
12658 # }
12659 #
12660 # public static Color toProto(java.awt.Color color) {
12661 # float red = (float) color.getRed();
12662 # float green = (float) color.getGreen();
12663 # float blue = (float) color.getBlue();
12664 # float denominator = 255.0;
12665 # Color.Builder resultBuilder =
12666 # Color
12667 # .newBuilder()
12668 # .setRed(red / denominator)
12669 # .setGreen(green / denominator)
12670 # .setBlue(blue / denominator);
12671 # int alpha = color.getAlpha();
12672 # if (alpha != 255) {
12673 # result.setAlpha(
12674 # FloatValue
12675 # .newBuilder()
12676 # .setValue(((float) alpha) / denominator)
12677 # .build());
12678 # }
12679 # return resultBuilder.build();
12680 # }
12681 # // ...
12682 #
12683 # Example (iOS / Obj-C):
12684 #
12685 # // ...
12686 # static UIColor* fromProto(Color* protocolor) {
12687 # float red = [protocolor red];
12688 # float green = [protocolor green];
12689 # float blue = [protocolor blue];
12690 # FloatValue* alpha_wrapper = [protocolor alpha];
12691 # float alpha = 1.0;
12692 # if (alpha_wrapper != nil) {
12693 # alpha = [alpha_wrapper value];
12694 # }
12695 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12696 # }
12697 #
12698 # static Color* toProto(UIColor* color) {
12699 # CGFloat red, green, blue, alpha;
12700 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12701 # return nil;
12702 # }
12703 # Color* result = [Color alloc] init];
12704 # [result setRed:red];
12705 # [result setGreen:green];
12706 # [result setBlue:blue];
12707 # if (alpha <= 0.9999) {
12708 # [result setAlpha:floatWrapperWithValue(alpha)];
12709 # }
12710 # [result autorelease];
12711 # return result;
12712 # }
12713 # // ...
12714 #
12715 # Example (JavaScript):
12716 #
12717 # // ...
12718 #
12719 # var protoToCssColor = function(rgb_color) {
12720 # var redFrac = rgb_color.red || 0.0;
12721 # var greenFrac = rgb_color.green || 0.0;
12722 # var blueFrac = rgb_color.blue || 0.0;
12723 # var red = Math.floor(redFrac * 255);
12724 # var green = Math.floor(greenFrac * 255);
12725 # var blue = Math.floor(blueFrac * 255);
12726 #
12727 # if (!('alpha' in rgb_color)) {
12728 # return rgbToCssColor_(red, green, blue);
12729 # }
12730 #
12731 # var alphaFrac = rgb_color.alpha.value || 0.0;
12732 # var rgbParams = [red, green, blue].join(',');
12733 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12734 # };
12735 #
12736 # var rgbToCssColor_ = function(red, green, blue) {
12737 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12738 # var hexString = rgbNumber.toString(16);
12739 # var missingZeros = 6 - hexString.length;
12740 # var resultBuilder = ['#'];
12741 # for (var i = 0; i < missingZeros; i++) {
12742 # resultBuilder.push('0');
12743 # }
12744 # resultBuilder.push(hexString);
12745 # return resultBuilder.join('');
12746 # };
12747 #
12748 # // ...
12749 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12750 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12751 # the final pixel color is defined by the equation:
12752 #
12753 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12754 #
12755 # This means that a value of 1.0 corresponds to a solid color, whereas
12756 # a value of 0.0 corresponds to a completely transparent color. This
12757 # uses a wrapper message rather than a simple float scalar so that it is
12758 # possible to distinguish between a default value and the value being unset.
12759 # If omitted, this color object is to be rendered as a solid color
12760 # (as if the alpha value had been explicitly given with a value of 1.0).
12761 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12762 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12763 },
12764 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012765 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012766 "style": "A String", # The style of the border.
12767 },
12768 "left": { # A border along a cell. # The border to put at the left of the range.
12769 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
12770 # for simplicity of conversion to/from color representations in various
12771 # languages over compactness; for example, the fields of this representation
12772 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12773 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12774 # method in iOS; and, with just a little work, it can be easily formatted into
12775 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12776 #
12777 # Example (Java):
12778 #
12779 # import com.google.type.Color;
12780 #
12781 # // ...
12782 # public static java.awt.Color fromProto(Color protocolor) {
12783 # float alpha = protocolor.hasAlpha()
12784 # ? protocolor.getAlpha().getValue()
12785 # : 1.0;
12786 #
12787 # return new java.awt.Color(
12788 # protocolor.getRed(),
12789 # protocolor.getGreen(),
12790 # protocolor.getBlue(),
12791 # alpha);
12792 # }
12793 #
12794 # public static Color toProto(java.awt.Color color) {
12795 # float red = (float) color.getRed();
12796 # float green = (float) color.getGreen();
12797 # float blue = (float) color.getBlue();
12798 # float denominator = 255.0;
12799 # Color.Builder resultBuilder =
12800 # Color
12801 # .newBuilder()
12802 # .setRed(red / denominator)
12803 # .setGreen(green / denominator)
12804 # .setBlue(blue / denominator);
12805 # int alpha = color.getAlpha();
12806 # if (alpha != 255) {
12807 # result.setAlpha(
12808 # FloatValue
12809 # .newBuilder()
12810 # .setValue(((float) alpha) / denominator)
12811 # .build());
12812 # }
12813 # return resultBuilder.build();
12814 # }
12815 # // ...
12816 #
12817 # Example (iOS / Obj-C):
12818 #
12819 # // ...
12820 # static UIColor* fromProto(Color* protocolor) {
12821 # float red = [protocolor red];
12822 # float green = [protocolor green];
12823 # float blue = [protocolor blue];
12824 # FloatValue* alpha_wrapper = [protocolor alpha];
12825 # float alpha = 1.0;
12826 # if (alpha_wrapper != nil) {
12827 # alpha = [alpha_wrapper value];
12828 # }
12829 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12830 # }
12831 #
12832 # static Color* toProto(UIColor* color) {
12833 # CGFloat red, green, blue, alpha;
12834 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12835 # return nil;
12836 # }
12837 # Color* result = [Color alloc] init];
12838 # [result setRed:red];
12839 # [result setGreen:green];
12840 # [result setBlue:blue];
12841 # if (alpha <= 0.9999) {
12842 # [result setAlpha:floatWrapperWithValue(alpha)];
12843 # }
12844 # [result autorelease];
12845 # return result;
12846 # }
12847 # // ...
12848 #
12849 # Example (JavaScript):
12850 #
12851 # // ...
12852 #
12853 # var protoToCssColor = function(rgb_color) {
12854 # var redFrac = rgb_color.red || 0.0;
12855 # var greenFrac = rgb_color.green || 0.0;
12856 # var blueFrac = rgb_color.blue || 0.0;
12857 # var red = Math.floor(redFrac * 255);
12858 # var green = Math.floor(greenFrac * 255);
12859 # var blue = Math.floor(blueFrac * 255);
12860 #
12861 # if (!('alpha' in rgb_color)) {
12862 # return rgbToCssColor_(red, green, blue);
12863 # }
12864 #
12865 # var alphaFrac = rgb_color.alpha.value || 0.0;
12866 # var rgbParams = [red, green, blue].join(',');
12867 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12868 # };
12869 #
12870 # var rgbToCssColor_ = function(red, green, blue) {
12871 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12872 # var hexString = rgbNumber.toString(16);
12873 # var missingZeros = 6 - hexString.length;
12874 # var resultBuilder = ['#'];
12875 # for (var i = 0; i < missingZeros; i++) {
12876 # resultBuilder.push('0');
12877 # }
12878 # resultBuilder.push(hexString);
12879 # return resultBuilder.join('');
12880 # };
12881 #
12882 # // ...
12883 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12884 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12885 # the final pixel color is defined by the equation:
12886 #
12887 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12888 #
12889 # This means that a value of 1.0 corresponds to a solid color, whereas
12890 # a value of 0.0 corresponds to a completely transparent color. This
12891 # uses a wrapper message rather than a simple float scalar so that it is
12892 # possible to distinguish between a default value and the value being unset.
12893 # If omitted, this color object is to be rendered as a solid color
12894 # (as if the alpha value had been explicitly given with a value of 1.0).
12895 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12896 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12897 },
12898 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012899 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012900 "style": "A String", # The style of the border.
12901 },
12902 },
12903 "cutPaste": { # Moves data from the source to the destination. # Cuts data from one area and pastes it to another.
12904 "pasteType": "A String", # What kind of data to paste. All the source data will be cut, regardless
12905 # of what is pasted.
12906 "source": { # A range on a sheet. # The source data to cut.
12907 # All indexes are zero-based.
12908 # Indexes are half open, e.g the start index is inclusive
12909 # and the end index is exclusive -- [start_index, end_index).
12910 # Missing indexes indicate the range is unbounded on that side.
12911 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012912 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012913 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012914 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012915 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012916 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012917 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012918 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012919 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012920 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012921 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012922 # `Sheet1!A:B == sheet_id: 0,
12923 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012924 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012925 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012926 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012927 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012928 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012929 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012930 #
12931 # The start index must always be less than or equal to the end index.
12932 # If the start index equals the end index, then the range is empty.
12933 # Empty ranges are typically not meaningful and are usually rendered in the
12934 # UI as `#REF!`.
12935 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12936 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12937 "sheetId": 42, # The sheet this range is on.
12938 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12939 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12940 },
12941 "destination": { # A coordinate in a sheet. # The top-left coordinate where the data should be pasted.
12942 # All indexes are zero-based.
12943 "rowIndex": 42, # The row index of the coordinate.
12944 "columnIndex": 42, # The column index of the coordinate.
12945 "sheetId": 42, # The sheet this coordinate is on.
12946 },
12947 },
12948 "copyPaste": { # Copies data from the source to the destination. # Copies data from one area and pastes it to another.
12949 "pasteType": "A String", # What kind of data to paste.
12950 "source": { # A range on a sheet. # The source range to copy.
12951 # All indexes are zero-based.
12952 # Indexes are half open, e.g the start index is inclusive
12953 # and the end index is exclusive -- [start_index, end_index).
12954 # Missing indexes indicate the range is unbounded on that side.
12955 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012956 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012957 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012958 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012959 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012960 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012961 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012962 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012963 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012964 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012965 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012966 # `Sheet1!A:B == sheet_id: 0,
12967 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012968 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012969 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012970 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012971 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012972 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012973 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012974 #
12975 # The start index must always be less than or equal to the end index.
12976 # If the start index equals the end index, then the range is empty.
12977 # Empty ranges are typically not meaningful and are usually rendered in the
12978 # UI as `#REF!`.
12979 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12980 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12981 "sheetId": 42, # The sheet this range is on.
12982 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12983 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12984 },
12985 "destination": { # A range on a sheet. # The location to paste to. If the range covers a span that's
12986 # a multiple of the source's height or width, then the
12987 # data will be repeated to fill in the destination range.
12988 # If the range is smaller than the source range, the entire
12989 # source data will still be copied (beyond the end of the destination range).
12990 # All indexes are zero-based.
12991 # Indexes are half open, e.g the start index is inclusive
12992 # and the end index is exclusive -- [start_index, end_index).
12993 # Missing indexes indicate the range is unbounded on that side.
12994 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012995 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012996 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012997 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012998 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012999 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013000 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013001 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013002 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013003 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013004 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013005 # `Sheet1!A:B == sheet_id: 0,
13006 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013007 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013008 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013009 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013010 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013011 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013012 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013013 #
13014 # The start index must always be less than or equal to the end index.
13015 # If the start index equals the end index, then the range is empty.
13016 # Empty ranges are typically not meaningful and are usually rendered in the
13017 # UI as `#REF!`.
13018 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13019 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13020 "sheetId": 42, # The sheet this range is on.
13021 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13022 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13023 },
13024 "pasteOrientation": "A String", # How that data should be oriented when pasting.
13025 },
13026 "addSheet": { # Adds a new sheet. # Adds a sheet.
13027 # When a sheet is added at a given index,
13028 # all subsequent sheets' indexes are incremented.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013029 # To add an object sheet, use AddChartRequest instead and specify
13030 # EmbeddedObjectPosition.sheetId or
13031 # EmbeddedObjectPosition.newSheet.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013032 "properties": { # Properties of a sheet. # The properties the new sheet should have.
13033 # All properties are optional.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013034 # The sheetId field is optional; if one is not
13035 # set, an id will be randomly generated. (It is an error to specify the ID
13036 # of a sheet that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013037 "sheetType": "A String", # The type of sheet. Defaults to GRID.
13038 # This field cannot be changed once set.
13039 "index": 42, # The index of the sheet within the spreadsheet.
13040 # When adding or updating sheet properties, if this field
13041 # is excluded then the sheet will be added or moved to the end
13042 # of the sheet list.
13043 "title": "A String", # The name of the sheet.
13044 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
13045 # (If the sheet is an object sheet, containing a chart or image, then
13046 # this field will be absent.)
13047 # When writing it is an error to set any grid properties on non-grid sheets.
13048 "columnCount": 42, # The number of columns in the grid.
13049 "rowCount": 42, # The number of rows in the grid.
13050 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
13051 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
13052 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
13053 },
13054 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
13055 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
13056 # for simplicity of conversion to/from color representations in various
13057 # languages over compactness; for example, the fields of this representation
13058 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13059 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13060 # method in iOS; and, with just a little work, it can be easily formatted into
13061 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13062 #
13063 # Example (Java):
13064 #
13065 # import com.google.type.Color;
13066 #
13067 # // ...
13068 # public static java.awt.Color fromProto(Color protocolor) {
13069 # float alpha = protocolor.hasAlpha()
13070 # ? protocolor.getAlpha().getValue()
13071 # : 1.0;
13072 #
13073 # return new java.awt.Color(
13074 # protocolor.getRed(),
13075 # protocolor.getGreen(),
13076 # protocolor.getBlue(),
13077 # alpha);
13078 # }
13079 #
13080 # public static Color toProto(java.awt.Color color) {
13081 # float red = (float) color.getRed();
13082 # float green = (float) color.getGreen();
13083 # float blue = (float) color.getBlue();
13084 # float denominator = 255.0;
13085 # Color.Builder resultBuilder =
13086 # Color
13087 # .newBuilder()
13088 # .setRed(red / denominator)
13089 # .setGreen(green / denominator)
13090 # .setBlue(blue / denominator);
13091 # int alpha = color.getAlpha();
13092 # if (alpha != 255) {
13093 # result.setAlpha(
13094 # FloatValue
13095 # .newBuilder()
13096 # .setValue(((float) alpha) / denominator)
13097 # .build());
13098 # }
13099 # return resultBuilder.build();
13100 # }
13101 # // ...
13102 #
13103 # Example (iOS / Obj-C):
13104 #
13105 # // ...
13106 # static UIColor* fromProto(Color* protocolor) {
13107 # float red = [protocolor red];
13108 # float green = [protocolor green];
13109 # float blue = [protocolor blue];
13110 # FloatValue* alpha_wrapper = [protocolor alpha];
13111 # float alpha = 1.0;
13112 # if (alpha_wrapper != nil) {
13113 # alpha = [alpha_wrapper value];
13114 # }
13115 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13116 # }
13117 #
13118 # static Color* toProto(UIColor* color) {
13119 # CGFloat red, green, blue, alpha;
13120 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13121 # return nil;
13122 # }
13123 # Color* result = [Color alloc] init];
13124 # [result setRed:red];
13125 # [result setGreen:green];
13126 # [result setBlue:blue];
13127 # if (alpha <= 0.9999) {
13128 # [result setAlpha:floatWrapperWithValue(alpha)];
13129 # }
13130 # [result autorelease];
13131 # return result;
13132 # }
13133 # // ...
13134 #
13135 # Example (JavaScript):
13136 #
13137 # // ...
13138 #
13139 # var protoToCssColor = function(rgb_color) {
13140 # var redFrac = rgb_color.red || 0.0;
13141 # var greenFrac = rgb_color.green || 0.0;
13142 # var blueFrac = rgb_color.blue || 0.0;
13143 # var red = Math.floor(redFrac * 255);
13144 # var green = Math.floor(greenFrac * 255);
13145 # var blue = Math.floor(blueFrac * 255);
13146 #
13147 # if (!('alpha' in rgb_color)) {
13148 # return rgbToCssColor_(red, green, blue);
13149 # }
13150 #
13151 # var alphaFrac = rgb_color.alpha.value || 0.0;
13152 # var rgbParams = [red, green, blue].join(',');
13153 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13154 # };
13155 #
13156 # var rgbToCssColor_ = function(red, green, blue) {
13157 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13158 # var hexString = rgbNumber.toString(16);
13159 # var missingZeros = 6 - hexString.length;
13160 # var resultBuilder = ['#'];
13161 # for (var i = 0; i < missingZeros; i++) {
13162 # resultBuilder.push('0');
13163 # }
13164 # resultBuilder.push(hexString);
13165 # return resultBuilder.join('');
13166 # };
13167 #
13168 # // ...
13169 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13170 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13171 # the final pixel color is defined by the equation:
13172 #
13173 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13174 #
13175 # This means that a value of 1.0 corresponds to a solid color, whereas
13176 # a value of 0.0 corresponds to a completely transparent color. This
13177 # uses a wrapper message rather than a simple float scalar so that it is
13178 # possible to distinguish between a default value and the value being unset.
13179 # If omitted, this color object is to be rendered as a solid color
13180 # (as if the alpha value had been explicitly given with a value of 1.0).
13181 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13182 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13183 },
13184 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
13185 "sheetId": 42, # The ID of the sheet. Must be non-negative.
13186 # This field cannot be changed once set.
13187 },
13188 },
13189 "deleteNamedRange": { # Removes the named range with the given ID from the spreadsheet. # Deletes a named range.
13190 "namedRangeId": "A String", # The ID of the named range to delete.
13191 },
13192 "updateNamedRange": { # Updates properties of the named range with the specified # Updates a named range.
13193 # namedRangeId.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013194 "fields": "A String", # The fields that should be updated. At least one field must be specified.
13195 # The root `namedRange` is implied and should not be specified.
13196 # A single `"*"` can be used as short-hand for listing every field.
13197 "namedRange": { # A named range. # The named range to update with the new properties.
13198 "namedRangeId": "A String", # The ID of the named range.
13199 "range": { # A range on a sheet. # The range this represents.
13200 # All indexes are zero-based.
13201 # Indexes are half open, e.g the start index is inclusive
13202 # and the end index is exclusive -- [start_index, end_index).
13203 # Missing indexes indicate the range is unbounded on that side.
13204 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013205 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013206 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013207 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013208 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013209 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013210 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013211 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013212 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013213 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013214 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013215 # `Sheet1!A:B == sheet_id: 0,
13216 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013217 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013218 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013219 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013220 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013221 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013222 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013223 #
13224 # The start index must always be less than or equal to the end index.
13225 # If the start index equals the end index, then the range is empty.
13226 # Empty ranges are typically not meaningful and are usually rendered in the
13227 # UI as `#REF!`.
13228 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13229 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13230 "sheetId": 42, # The sheet this range is on.
13231 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13232 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13233 },
13234 "name": "A String", # The name of the named range.
13235 },
13236 },
13237 "insertDimension": { # Inserts rows or columns in a sheet at a particular index. # Inserts new rows or columns in a sheet.
13238 "inheritFromBefore": True or False, # Whether dimension properties should be extended from the dimensions
13239 # before or after the newly inserted dimensions.
13240 # True to inherit from the dimensions before (in which case the start
13241 # index must be greater than 0), and false to inherit from the dimensions
13242 # after.
13243 #
13244 # For example, if row index 0 has red background and row index 1
13245 # has a green background, then inserting 2 rows at index 1 can inherit
13246 # either the green or red background. If `inheritFromBefore` is true,
13247 # the two new rows will be red (because the row before the insertion point
13248 # was red), whereas if `inheritFromBefore` is false, the two new rows will
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013249 # be green (because the row after the insertion point was green).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013250 "range": { # A range along a single dimension on a sheet. # The dimensions to insert. Both the start and end indexes must be bounded.
13251 # All indexes are zero-based.
13252 # Indexes are half open: the start index is inclusive
13253 # and the end index is exclusive.
13254 # Missing indexes indicate the range is unbounded on that side.
13255 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
13256 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
13257 "sheetId": 42, # The sheet this span is on.
13258 "dimension": "A String", # The dimension of the span.
13259 },
13260 },
13261 "updateFilterView": { # Updates properties of the filter view. # Updates the properties of a filter view.
13262 "filter": { # A filter view. # The new properties of the filter view.
13263 "title": "A String", # The name of the filter view.
13264 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
13265 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013266 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013267 # may be set.
13268 "filterViewId": 42, # The ID of the filter view.
13269 "range": { # A range on a sheet. # The range this filter view covers.
13270 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013271 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013272 # may be set.
13273 # All indexes are zero-based.
13274 # Indexes are half open, e.g the start index is inclusive
13275 # and the end index is exclusive -- [start_index, end_index).
13276 # Missing indexes indicate the range is unbounded on that side.
13277 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013278 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013279 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013280 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013281 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013282 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013283 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013284 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013285 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013286 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013287 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013288 # `Sheet1!A:B == sheet_id: 0,
13289 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013290 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013291 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013292 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013293 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013294 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013295 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013296 #
13297 # The start index must always be less than or equal to the end index.
13298 # If the start index equals the end index, then the range is empty.
13299 # Empty ranges are typically not meaningful and are usually rendered in the
13300 # UI as `#REF!`.
13301 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13302 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13303 "sheetId": 42, # The sheet this range is on.
13304 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13305 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13306 },
13307 "sortSpecs": [ # The sort order per column. Later specifications are used when values
13308 # are equal in the earlier specifications.
13309 { # A sort order associated with a specific column or row.
13310 "sortOrder": "A String", # The order data should be sorted.
13311 "dimensionIndex": 42, # The dimension the sort should be applied to.
13312 },
13313 ],
13314 "criteria": { # The criteria for showing/hiding values per column.
13315 # The map's key is the column index, and the value is the criteria for
13316 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013317 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013318 "hiddenValues": [ # Values that should be hidden.
13319 "A String",
13320 ],
13321 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
13322 # (This does not override hiddenValues -- if a value is listed there,
13323 # it will still be hidden.)
13324 # BooleanConditions are used by conditional formatting,
13325 # data validation, and the criteria in filters.
13326 "type": "A String", # The type of condition.
13327 "values": [ # The values of the condition. The number of supported values depends
13328 # on the condition type. Some support zero values,
13329 # others one or two values,
13330 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
13331 { # The value of the condition.
13332 "relativeDate": "A String", # A relative date (based on the current date).
13333 # Valid only if the type is
13334 # DATE_BEFORE,
13335 # DATE_AFTER,
13336 # DATE_ON_OR_BEFORE or
13337 # DATE_ON_OR_AFTER.
13338 #
13339 # Relative dates are not supported in data validation.
13340 # They are supported only in conditional formatting and
13341 # conditional filters.
13342 "userEnteredValue": "A String", # A value the condition is based on.
13343 # The value will be parsed as if the user typed into a cell.
13344 # Formulas are supported (and must begin with an `=`).
13345 },
13346 ],
13347 },
13348 },
13349 },
13350 },
13351 "fields": "A String", # The fields that should be updated. At least one field must be specified.
13352 # The root `filter` is implied and should not be specified.
13353 # A single `"*"` can be used as short-hand for listing every field.
13354 },
13355 "deleteConditionalFormatRule": { # Deletes a conditional format rule at the given index. # Deletes an existing conditional format rule.
13356 # All subsequent rules' indexes are decremented.
13357 "index": 42, # The zero-based index of the rule to be deleted.
13358 "sheetId": 42, # The sheet the rule is being deleted from.
13359 },
13360 },
13361 ],
13362 }
13363
13364 x__xgafv: string, V1 error format.
13365 Allowed values
13366 1 - v1 error format
13367 2 - v2 error format
13368
13369Returns:
13370 An object of the form:
13371
13372 { # The reply for batch updating a spreadsheet.
13373 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
13374 "replies": [ # The reply of the updates. This maps 1:1 with the updates, although
13375 # replies to some requests may be empty.
13376 { # A single response from an update.
13377 "duplicateFilterView": { # The result of a filter view being duplicated. # A reply from duplicating a filter view.
13378 "filter": { # A filter view. # The newly created filter.
13379 "title": "A String", # The name of the filter view.
13380 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
13381 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013382 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013383 # may be set.
13384 "filterViewId": 42, # The ID of the filter view.
13385 "range": { # A range on a sheet. # The range this filter view covers.
13386 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013387 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013388 # may be set.
13389 # All indexes are zero-based.
13390 # Indexes are half open, e.g the start index is inclusive
13391 # and the end index is exclusive -- [start_index, end_index).
13392 # Missing indexes indicate the range is unbounded on that side.
13393 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013394 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013395 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013396 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013397 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013398 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013399 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013400 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013401 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013402 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013403 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013404 # `Sheet1!A:B == sheet_id: 0,
13405 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013406 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013407 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013408 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013409 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013410 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013411 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013412 #
13413 # The start index must always be less than or equal to the end index.
13414 # If the start index equals the end index, then the range is empty.
13415 # Empty ranges are typically not meaningful and are usually rendered in the
13416 # UI as `#REF!`.
13417 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13418 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13419 "sheetId": 42, # The sheet this range is on.
13420 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13421 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13422 },
13423 "sortSpecs": [ # The sort order per column. Later specifications are used when values
13424 # are equal in the earlier specifications.
13425 { # A sort order associated with a specific column or row.
13426 "sortOrder": "A String", # The order data should be sorted.
13427 "dimensionIndex": 42, # The dimension the sort should be applied to.
13428 },
13429 ],
13430 "criteria": { # The criteria for showing/hiding values per column.
13431 # The map's key is the column index, and the value is the criteria for
13432 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013433 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013434 "hiddenValues": [ # Values that should be hidden.
13435 "A String",
13436 ],
13437 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
13438 # (This does not override hiddenValues -- if a value is listed there,
13439 # it will still be hidden.)
13440 # BooleanConditions are used by conditional formatting,
13441 # data validation, and the criteria in filters.
13442 "type": "A String", # The type of condition.
13443 "values": [ # The values of the condition. The number of supported values depends
13444 # on the condition type. Some support zero values,
13445 # others one or two values,
13446 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
13447 { # The value of the condition.
13448 "relativeDate": "A String", # A relative date (based on the current date).
13449 # Valid only if the type is
13450 # DATE_BEFORE,
13451 # DATE_AFTER,
13452 # DATE_ON_OR_BEFORE or
13453 # DATE_ON_OR_AFTER.
13454 #
13455 # Relative dates are not supported in data validation.
13456 # They are supported only in conditional formatting and
13457 # conditional filters.
13458 "userEnteredValue": "A String", # A value the condition is based on.
13459 # The value will be parsed as if the user typed into a cell.
13460 # Formulas are supported (and must begin with an `=`).
13461 },
13462 ],
13463 },
13464 },
13465 },
13466 },
13467 },
13468 "duplicateSheet": { # The result of duplicating a sheet. # A reply from duplicating a sheet.
13469 "properties": { # Properties of a sheet. # The properties of the duplicate sheet.
13470 "sheetType": "A String", # The type of sheet. Defaults to GRID.
13471 # This field cannot be changed once set.
13472 "index": 42, # The index of the sheet within the spreadsheet.
13473 # When adding or updating sheet properties, if this field
13474 # is excluded then the sheet will be added or moved to the end
13475 # of the sheet list.
13476 "title": "A String", # The name of the sheet.
13477 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
13478 # (If the sheet is an object sheet, containing a chart or image, then
13479 # this field will be absent.)
13480 # When writing it is an error to set any grid properties on non-grid sheets.
13481 "columnCount": 42, # The number of columns in the grid.
13482 "rowCount": 42, # The number of rows in the grid.
13483 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
13484 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
13485 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
13486 },
13487 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
13488 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
13489 # for simplicity of conversion to/from color representations in various
13490 # languages over compactness; for example, the fields of this representation
13491 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13492 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13493 # method in iOS; and, with just a little work, it can be easily formatted into
13494 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13495 #
13496 # Example (Java):
13497 #
13498 # import com.google.type.Color;
13499 #
13500 # // ...
13501 # public static java.awt.Color fromProto(Color protocolor) {
13502 # float alpha = protocolor.hasAlpha()
13503 # ? protocolor.getAlpha().getValue()
13504 # : 1.0;
13505 #
13506 # return new java.awt.Color(
13507 # protocolor.getRed(),
13508 # protocolor.getGreen(),
13509 # protocolor.getBlue(),
13510 # alpha);
13511 # }
13512 #
13513 # public static Color toProto(java.awt.Color color) {
13514 # float red = (float) color.getRed();
13515 # float green = (float) color.getGreen();
13516 # float blue = (float) color.getBlue();
13517 # float denominator = 255.0;
13518 # Color.Builder resultBuilder =
13519 # Color
13520 # .newBuilder()
13521 # .setRed(red / denominator)
13522 # .setGreen(green / denominator)
13523 # .setBlue(blue / denominator);
13524 # int alpha = color.getAlpha();
13525 # if (alpha != 255) {
13526 # result.setAlpha(
13527 # FloatValue
13528 # .newBuilder()
13529 # .setValue(((float) alpha) / denominator)
13530 # .build());
13531 # }
13532 # return resultBuilder.build();
13533 # }
13534 # // ...
13535 #
13536 # Example (iOS / Obj-C):
13537 #
13538 # // ...
13539 # static UIColor* fromProto(Color* protocolor) {
13540 # float red = [protocolor red];
13541 # float green = [protocolor green];
13542 # float blue = [protocolor blue];
13543 # FloatValue* alpha_wrapper = [protocolor alpha];
13544 # float alpha = 1.0;
13545 # if (alpha_wrapper != nil) {
13546 # alpha = [alpha_wrapper value];
13547 # }
13548 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13549 # }
13550 #
13551 # static Color* toProto(UIColor* color) {
13552 # CGFloat red, green, blue, alpha;
13553 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13554 # return nil;
13555 # }
13556 # Color* result = [Color alloc] init];
13557 # [result setRed:red];
13558 # [result setGreen:green];
13559 # [result setBlue:blue];
13560 # if (alpha <= 0.9999) {
13561 # [result setAlpha:floatWrapperWithValue(alpha)];
13562 # }
13563 # [result autorelease];
13564 # return result;
13565 # }
13566 # // ...
13567 #
13568 # Example (JavaScript):
13569 #
13570 # // ...
13571 #
13572 # var protoToCssColor = function(rgb_color) {
13573 # var redFrac = rgb_color.red || 0.0;
13574 # var greenFrac = rgb_color.green || 0.0;
13575 # var blueFrac = rgb_color.blue || 0.0;
13576 # var red = Math.floor(redFrac * 255);
13577 # var green = Math.floor(greenFrac * 255);
13578 # var blue = Math.floor(blueFrac * 255);
13579 #
13580 # if (!('alpha' in rgb_color)) {
13581 # return rgbToCssColor_(red, green, blue);
13582 # }
13583 #
13584 # var alphaFrac = rgb_color.alpha.value || 0.0;
13585 # var rgbParams = [red, green, blue].join(',');
13586 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13587 # };
13588 #
13589 # var rgbToCssColor_ = function(red, green, blue) {
13590 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13591 # var hexString = rgbNumber.toString(16);
13592 # var missingZeros = 6 - hexString.length;
13593 # var resultBuilder = ['#'];
13594 # for (var i = 0; i < missingZeros; i++) {
13595 # resultBuilder.push('0');
13596 # }
13597 # resultBuilder.push(hexString);
13598 # return resultBuilder.join('');
13599 # };
13600 #
13601 # // ...
13602 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13603 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13604 # the final pixel color is defined by the equation:
13605 #
13606 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13607 #
13608 # This means that a value of 1.0 corresponds to a solid color, whereas
13609 # a value of 0.0 corresponds to a completely transparent color. This
13610 # uses a wrapper message rather than a simple float scalar so that it is
13611 # possible to distinguish between a default value and the value being unset.
13612 # If omitted, this color object is to be rendered as a solid color
13613 # (as if the alpha value had been explicitly given with a value of 1.0).
13614 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13615 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13616 },
13617 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
13618 "sheetId": 42, # The ID of the sheet. Must be non-negative.
13619 # This field cannot be changed once set.
13620 },
13621 },
13622 "updateEmbeddedObjectPosition": { # The result of updating an embedded object's position. # A reply from updating an embedded object's position.
13623 "position": { # The position of an embedded object such as a chart. # The new position of the embedded object.
13624 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
13625 # is chosen for you. Used only when writing.
13626 "sheetId": 42, # The sheet this is on. Set only if the embedded object
13627 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013628 "overlayPosition": { # The location an object is overlaid on top of a grid. # The position at which the object is overlaid on top of a grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013629 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
13630 # All indexes are zero-based.
13631 "rowIndex": 42, # The row index of the coordinate.
13632 "columnIndex": 42, # The column index of the coordinate.
13633 "sheetId": 42, # The sheet this coordinate is on.
13634 },
13635 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
13636 # from the anchor cell.
13637 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
13638 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
13639 # from the anchor cell.
13640 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
13641 },
13642 },
13643 },
13644 "addChart": { # The result of adding a chart to a spreadsheet. # A reply from adding a chart.
13645 "chart": { # A chart embedded in a sheet. # The newly added chart.
13646 "chartId": 42, # The ID of the chart.
13647 "position": { # The position of an embedded object such as a chart. # The position of the chart.
13648 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
13649 # is chosen for you. Used only when writing.
13650 "sheetId": 42, # The sheet this is on. Set only if the embedded object
13651 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013652 "overlayPosition": { # The location an object is overlaid on top of a grid. # The position at which the object is overlaid on top of a grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013653 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
13654 # All indexes are zero-based.
13655 "rowIndex": 42, # The row index of the coordinate.
13656 "columnIndex": 42, # The column index of the coordinate.
13657 "sheetId": 42, # The sheet this coordinate is on.
13658 },
13659 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
13660 # from the anchor cell.
13661 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
13662 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
13663 # from the anchor cell.
13664 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
13665 },
13666 },
13667 "spec": { # The specifications of a chart. # The specification of the chart.
13668 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013669 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
13670 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
13671 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
13672 "sources": [ # The ranges of data for a series or domain.
13673 # Exactly one dimension must have a length of 1,
13674 # and all sources in the list must have the same dimension
13675 # with length 1.
13676 # The domain (if it exists) & all series must have the same number
13677 # of source ranges. If using more than one source range, then the source
13678 # range at a given offset must be contiguous across the domain and series.
13679 #
13680 # For example, these are valid configurations:
13681 #
13682 # domain sources: A1:A5
13683 # series1 sources: B1:B5
13684 # series2 sources: D6:D10
13685 #
13686 # domain sources: A1:A5, C10:C12
13687 # series1 sources: B1:B5, D10:D12
13688 # series2 sources: C1:C5, E10:E12
13689 { # A range on a sheet.
13690 # All indexes are zero-based.
13691 # Indexes are half open, e.g the start index is inclusive
13692 # and the end index is exclusive -- [start_index, end_index).
13693 # Missing indexes indicate the range is unbounded on that side.
13694 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013695 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013696 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013697 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013698 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013699 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013700 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013701 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013702 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013703 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013704 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013705 # `Sheet1!A:B == sheet_id: 0,
13706 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013707 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013708 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013709 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013710 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013711 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013712 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013713 #
13714 # The start index must always be less than or equal to the end index.
13715 # If the start index equals the end index, then the range is empty.
13716 # Empty ranges are typically not meaningful and are usually rendered in the
13717 # UI as `#REF!`.
13718 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13719 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13720 "sheetId": 42, # The sheet this range is on.
13721 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13722 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13723 },
13724 ],
13725 },
13726 },
13727 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
13728 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
13729 "sources": [ # The ranges of data for a series or domain.
13730 # Exactly one dimension must have a length of 1,
13731 # and all sources in the list must have the same dimension
13732 # with length 1.
13733 # The domain (if it exists) & all series must have the same number
13734 # of source ranges. If using more than one source range, then the source
13735 # range at a given offset must be contiguous across the domain and series.
13736 #
13737 # For example, these are valid configurations:
13738 #
13739 # domain sources: A1:A5
13740 # series1 sources: B1:B5
13741 # series2 sources: D6:D10
13742 #
13743 # domain sources: A1:A5, C10:C12
13744 # series1 sources: B1:B5, D10:D12
13745 # series2 sources: C1:C5, E10:E12
13746 { # A range on a sheet.
13747 # All indexes are zero-based.
13748 # Indexes are half open, e.g the start index is inclusive
13749 # and the end index is exclusive -- [start_index, end_index).
13750 # Missing indexes indicate the range is unbounded on that side.
13751 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013752 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013753 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013754 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013755 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013756 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013757 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013758 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013759 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013760 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013761 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013762 # `Sheet1!A:B == sheet_id: 0,
13763 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013764 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013765 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013766 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013767 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013768 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013769 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013770 #
13771 # The start index must always be less than or equal to the end index.
13772 # If the start index equals the end index, then the range is empty.
13773 # Empty ranges are typically not meaningful and are usually rendered in the
13774 # UI as `#REF!`.
13775 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13776 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13777 "sheetId": 42, # The sheet this range is on.
13778 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13779 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13780 },
13781 ],
13782 },
13783 },
13784 "threeDimensional": True or False, # True if the pie is three dimensional.
13785 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
13786 "pieHole": 3.14, # The size of the hole in the pie chart.
13787 },
13788 "basicChart": { # The specification for a basic chart. See BasicChartType for the list # A basic chart specification, can be one of many kinds of charts.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013789 # See BasicChartType for the list of all
13790 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013791 # of charts this supports.
13792 "headerCount": 42, # The number of rows or columns in the data that are "headers".
13793 # If not set, Google Sheets will guess how many rows are headers based
13794 # on the data.
13795 #
13796 # (Note that BasicChartAxis.title may override the axis title
13797 # inferred from the header values.)
13798 "series": [ # The data this chart is visualizing.
13799 { # A single series of data in a chart.
13800 # For example, if charting stock prices over time, multiple series may exist,
13801 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
13802 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
13803 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
13804 "sources": [ # The ranges of data for a series or domain.
13805 # Exactly one dimension must have a length of 1,
13806 # and all sources in the list must have the same dimension
13807 # with length 1.
13808 # The domain (if it exists) & all series must have the same number
13809 # of source ranges. If using more than one source range, then the source
13810 # range at a given offset must be contiguous across the domain and series.
13811 #
13812 # For example, these are valid configurations:
13813 #
13814 # domain sources: A1:A5
13815 # series1 sources: B1:B5
13816 # series2 sources: D6:D10
13817 #
13818 # domain sources: A1:A5, C10:C12
13819 # series1 sources: B1:B5, D10:D12
13820 # series2 sources: C1:C5, E10:E12
13821 { # A range on a sheet.
13822 # All indexes are zero-based.
13823 # Indexes are half open, e.g the start index is inclusive
13824 # and the end index is exclusive -- [start_index, end_index).
13825 # Missing indexes indicate the range is unbounded on that side.
13826 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013827 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013828 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013829 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013830 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013831 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013832 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013833 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013834 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013835 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013836 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013837 # `Sheet1!A:B == sheet_id: 0,
13838 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013839 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013840 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013841 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013842 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013843 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013844 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013845 #
13846 # The start index must always be less than or equal to the end index.
13847 # If the start index equals the end index, then the range is empty.
13848 # Empty ranges are typically not meaningful and are usually rendered in the
13849 # UI as `#REF!`.
13850 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13851 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13852 "sheetId": 42, # The sheet this range is on.
13853 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13854 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13855 },
13856 ],
13857 },
13858 },
13859 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
13860 # For example, if charting stocks over time, the "Volume" series
13861 # may want to be pinned to the right with the prices pinned to the left,
13862 # because the scale of trading volume is different than the scale of
13863 # prices.
13864 # It is an error to specify an axis that isn't a valid minor axis
13865 # for the chart's type.
13866 "type": "A String", # The type of this series. Valid only if the
13867 # chartType is
13868 # COMBO.
13869 # Different types will change the way the series is visualized.
13870 # Only LINE, AREA,
13871 # and COLUMN are supported.
13872 },
13873 ],
13874 "legendPosition": "A String", # The position of the chart legend.
13875 "domains": [ # The domain of data this is charting.
13876 # Only a single domain is currently supported.
13877 { # The domain of a chart.
13878 # For example, if charting stock prices over time, this would be the date.
13879 "domain": { # The data included in a domain or series. # The data of the domain. For example, if charting stock prices over time,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013880 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013881 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
13882 "sources": [ # The ranges of data for a series or domain.
13883 # Exactly one dimension must have a length of 1,
13884 # and all sources in the list must have the same dimension
13885 # with length 1.
13886 # The domain (if it exists) & all series must have the same number
13887 # of source ranges. If using more than one source range, then the source
13888 # range at a given offset must be contiguous across the domain and series.
13889 #
13890 # For example, these are valid configurations:
13891 #
13892 # domain sources: A1:A5
13893 # series1 sources: B1:B5
13894 # series2 sources: D6:D10
13895 #
13896 # domain sources: A1:A5, C10:C12
13897 # series1 sources: B1:B5, D10:D12
13898 # series2 sources: C1:C5, E10:E12
13899 { # A range on a sheet.
13900 # All indexes are zero-based.
13901 # Indexes are half open, e.g the start index is inclusive
13902 # and the end index is exclusive -- [start_index, end_index).
13903 # Missing indexes indicate the range is unbounded on that side.
13904 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013905 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013906 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013907 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013908 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013909 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013910 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013911 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013912 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013913 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013914 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013915 # `Sheet1!A:B == sheet_id: 0,
13916 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013917 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013918 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013919 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013920 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013921 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013922 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013923 #
13924 # The start index must always be less than or equal to the end index.
13925 # If the start index equals the end index, then the range is empty.
13926 # Empty ranges are typically not meaningful and are usually rendered in the
13927 # UI as `#REF!`.
13928 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13929 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13930 "sheetId": 42, # The sheet this range is on.
13931 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13932 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13933 },
13934 ],
13935 },
13936 },
13937 },
13938 ],
13939 "chartType": "A String", # The type of the chart.
13940 "axis": [ # The axis on the chart.
13941 { # An axis of the chart.
13942 # A chart may not have more than one axis per
13943 # axis position.
13944 "position": "A String", # The position of this axis.
13945 "format": { # The format of a run of text in a cell. # The format of the title.
13946 # Only valid if the axis is not associated with the domain.
13947 # Absent values indicate that the field isn't specified.
13948 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
13949 # for simplicity of conversion to/from color representations in various
13950 # languages over compactness; for example, the fields of this representation
13951 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13952 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13953 # method in iOS; and, with just a little work, it can be easily formatted into
13954 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13955 #
13956 # Example (Java):
13957 #
13958 # import com.google.type.Color;
13959 #
13960 # // ...
13961 # public static java.awt.Color fromProto(Color protocolor) {
13962 # float alpha = protocolor.hasAlpha()
13963 # ? protocolor.getAlpha().getValue()
13964 # : 1.0;
13965 #
13966 # return new java.awt.Color(
13967 # protocolor.getRed(),
13968 # protocolor.getGreen(),
13969 # protocolor.getBlue(),
13970 # alpha);
13971 # }
13972 #
13973 # public static Color toProto(java.awt.Color color) {
13974 # float red = (float) color.getRed();
13975 # float green = (float) color.getGreen();
13976 # float blue = (float) color.getBlue();
13977 # float denominator = 255.0;
13978 # Color.Builder resultBuilder =
13979 # Color
13980 # .newBuilder()
13981 # .setRed(red / denominator)
13982 # .setGreen(green / denominator)
13983 # .setBlue(blue / denominator);
13984 # int alpha = color.getAlpha();
13985 # if (alpha != 255) {
13986 # result.setAlpha(
13987 # FloatValue
13988 # .newBuilder()
13989 # .setValue(((float) alpha) / denominator)
13990 # .build());
13991 # }
13992 # return resultBuilder.build();
13993 # }
13994 # // ...
13995 #
13996 # Example (iOS / Obj-C):
13997 #
13998 # // ...
13999 # static UIColor* fromProto(Color* protocolor) {
14000 # float red = [protocolor red];
14001 # float green = [protocolor green];
14002 # float blue = [protocolor blue];
14003 # FloatValue* alpha_wrapper = [protocolor alpha];
14004 # float alpha = 1.0;
14005 # if (alpha_wrapper != nil) {
14006 # alpha = [alpha_wrapper value];
14007 # }
14008 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14009 # }
14010 #
14011 # static Color* toProto(UIColor* color) {
14012 # CGFloat red, green, blue, alpha;
14013 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14014 # return nil;
14015 # }
14016 # Color* result = [Color alloc] init];
14017 # [result setRed:red];
14018 # [result setGreen:green];
14019 # [result setBlue:blue];
14020 # if (alpha <= 0.9999) {
14021 # [result setAlpha:floatWrapperWithValue(alpha)];
14022 # }
14023 # [result autorelease];
14024 # return result;
14025 # }
14026 # // ...
14027 #
14028 # Example (JavaScript):
14029 #
14030 # // ...
14031 #
14032 # var protoToCssColor = function(rgb_color) {
14033 # var redFrac = rgb_color.red || 0.0;
14034 # var greenFrac = rgb_color.green || 0.0;
14035 # var blueFrac = rgb_color.blue || 0.0;
14036 # var red = Math.floor(redFrac * 255);
14037 # var green = Math.floor(greenFrac * 255);
14038 # var blue = Math.floor(blueFrac * 255);
14039 #
14040 # if (!('alpha' in rgb_color)) {
14041 # return rgbToCssColor_(red, green, blue);
14042 # }
14043 #
14044 # var alphaFrac = rgb_color.alpha.value || 0.0;
14045 # var rgbParams = [red, green, blue].join(',');
14046 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14047 # };
14048 #
14049 # var rgbToCssColor_ = function(red, green, blue) {
14050 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14051 # var hexString = rgbNumber.toString(16);
14052 # var missingZeros = 6 - hexString.length;
14053 # var resultBuilder = ['#'];
14054 # for (var i = 0; i < missingZeros; i++) {
14055 # resultBuilder.push('0');
14056 # }
14057 # resultBuilder.push(hexString);
14058 # return resultBuilder.join('');
14059 # };
14060 #
14061 # // ...
14062 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14063 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14064 # the final pixel color is defined by the equation:
14065 #
14066 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14067 #
14068 # This means that a value of 1.0 corresponds to a solid color, whereas
14069 # a value of 0.0 corresponds to a completely transparent color. This
14070 # uses a wrapper message rather than a simple float scalar so that it is
14071 # possible to distinguish between a default value and the value being unset.
14072 # If omitted, this color object is to be rendered as a solid color
14073 # (as if the alpha value had been explicitly given with a value of 1.0).
14074 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14075 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14076 },
14077 "bold": True or False, # True if the text is bold.
14078 "strikethrough": True or False, # True if the text has a strikethrough.
14079 "fontFamily": "A String", # The font family.
14080 "fontSize": 42, # The size of the font.
14081 "italic": True or False, # True if the text is italicized.
14082 "underline": True or False, # True if the text is underlined.
14083 },
14084 "title": "A String", # The title of this axis. If set, this overrides any title inferred
14085 # from headers of the data.
14086 },
14087 ],
14088 },
14089 "title": "A String", # The title of the chart.
14090 },
14091 },
14092 },
14093 "updateConditionalFormatRule": { # The result of updating a conditional format rule. # A reply from updating a conditional format rule.
14094 "oldIndex": 42, # The old index of the rule. Not set if a rule was replaced
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014095 # (because it is the same as new_index).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014096 "newIndex": 42, # The index of the new rule.
14097 "oldRule": { # A rule describing a conditional format. # The old (deleted) rule. Not set if a rule was moved
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014098 # (because it is the same as new_rule).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014099 "ranges": [ # The ranges that will be formatted if the condition is true.
14100 # All the ranges must be on the same grid.
14101 { # A range on a sheet.
14102 # All indexes are zero-based.
14103 # Indexes are half open, e.g the start index is inclusive
14104 # and the end index is exclusive -- [start_index, end_index).
14105 # Missing indexes indicate the range is unbounded on that side.
14106 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014107 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014108 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014109 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014110 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014111 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014112 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014113 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014114 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014115 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014116 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014117 # `Sheet1!A:B == sheet_id: 0,
14118 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014119 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014120 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014121 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014122 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014123 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014124 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014125 #
14126 # The start index must always be less than or equal to the end index.
14127 # If the start index equals the end index, then the range is empty.
14128 # Empty ranges are typically not meaningful and are usually rendered in the
14129 # UI as `#REF!`.
14130 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
14131 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
14132 "sheetId": 42, # The sheet this range is on.
14133 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
14134 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
14135 },
14136 ],
14137 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
14138 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
14139 # the format will be applied.
14140 # BooleanConditions are used by conditional formatting,
14141 # data validation, and the criteria in filters.
14142 "type": "A String", # The type of condition.
14143 "values": [ # The values of the condition. The number of supported values depends
14144 # on the condition type. Some support zero values,
14145 # others one or two values,
14146 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
14147 { # The value of the condition.
14148 "relativeDate": "A String", # A relative date (based on the current date).
14149 # Valid only if the type is
14150 # DATE_BEFORE,
14151 # DATE_AFTER,
14152 # DATE_ON_OR_BEFORE or
14153 # DATE_ON_OR_AFTER.
14154 #
14155 # Relative dates are not supported in data validation.
14156 # They are supported only in conditional formatting and
14157 # conditional filters.
14158 "userEnteredValue": "A String", # A value the condition is based on.
14159 # The value will be parsed as if the user typed into a cell.
14160 # Formulas are supported (and must begin with an `=`).
14161 },
14162 ],
14163 },
14164 "format": { # The format of a cell. # The format to apply.
14165 # Conditional formatting can only apply a subset of formatting:
14166 # bold, italic,
14167 # strikethrough,
14168 # foreground color &
14169 # background color.
14170 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014171 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
14172 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014173 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014174 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014175 },
14176 "textDirection": "A String", # The direction of the text in the cell.
14177 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
14178 # When updating padding, every field must be specified.
14179 "top": 42, # The top padding of the cell.
14180 "right": 42, # The right padding of the cell.
14181 "bottom": 42, # The bottom padding of the cell.
14182 "left": 42, # The left padding of the cell.
14183 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014184 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014185 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
14186 # for simplicity of conversion to/from color representations in various
14187 # languages over compactness; for example, the fields of this representation
14188 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14189 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14190 # method in iOS; and, with just a little work, it can be easily formatted into
14191 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14192 #
14193 # Example (Java):
14194 #
14195 # import com.google.type.Color;
14196 #
14197 # // ...
14198 # public static java.awt.Color fromProto(Color protocolor) {
14199 # float alpha = protocolor.hasAlpha()
14200 # ? protocolor.getAlpha().getValue()
14201 # : 1.0;
14202 #
14203 # return new java.awt.Color(
14204 # protocolor.getRed(),
14205 # protocolor.getGreen(),
14206 # protocolor.getBlue(),
14207 # alpha);
14208 # }
14209 #
14210 # public static Color toProto(java.awt.Color color) {
14211 # float red = (float) color.getRed();
14212 # float green = (float) color.getGreen();
14213 # float blue = (float) color.getBlue();
14214 # float denominator = 255.0;
14215 # Color.Builder resultBuilder =
14216 # Color
14217 # .newBuilder()
14218 # .setRed(red / denominator)
14219 # .setGreen(green / denominator)
14220 # .setBlue(blue / denominator);
14221 # int alpha = color.getAlpha();
14222 # if (alpha != 255) {
14223 # result.setAlpha(
14224 # FloatValue
14225 # .newBuilder()
14226 # .setValue(((float) alpha) / denominator)
14227 # .build());
14228 # }
14229 # return resultBuilder.build();
14230 # }
14231 # // ...
14232 #
14233 # Example (iOS / Obj-C):
14234 #
14235 # // ...
14236 # static UIColor* fromProto(Color* protocolor) {
14237 # float red = [protocolor red];
14238 # float green = [protocolor green];
14239 # float blue = [protocolor blue];
14240 # FloatValue* alpha_wrapper = [protocolor alpha];
14241 # float alpha = 1.0;
14242 # if (alpha_wrapper != nil) {
14243 # alpha = [alpha_wrapper value];
14244 # }
14245 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14246 # }
14247 #
14248 # static Color* toProto(UIColor* color) {
14249 # CGFloat red, green, blue, alpha;
14250 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14251 # return nil;
14252 # }
14253 # Color* result = [Color alloc] init];
14254 # [result setRed:red];
14255 # [result setGreen:green];
14256 # [result setBlue:blue];
14257 # if (alpha <= 0.9999) {
14258 # [result setAlpha:floatWrapperWithValue(alpha)];
14259 # }
14260 # [result autorelease];
14261 # return result;
14262 # }
14263 # // ...
14264 #
14265 # Example (JavaScript):
14266 #
14267 # // ...
14268 #
14269 # var protoToCssColor = function(rgb_color) {
14270 # var redFrac = rgb_color.red || 0.0;
14271 # var greenFrac = rgb_color.green || 0.0;
14272 # var blueFrac = rgb_color.blue || 0.0;
14273 # var red = Math.floor(redFrac * 255);
14274 # var green = Math.floor(greenFrac * 255);
14275 # var blue = Math.floor(blueFrac * 255);
14276 #
14277 # if (!('alpha' in rgb_color)) {
14278 # return rgbToCssColor_(red, green, blue);
14279 # }
14280 #
14281 # var alphaFrac = rgb_color.alpha.value || 0.0;
14282 # var rgbParams = [red, green, blue].join(',');
14283 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14284 # };
14285 #
14286 # var rgbToCssColor_ = function(red, green, blue) {
14287 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14288 # var hexString = rgbNumber.toString(16);
14289 # var missingZeros = 6 - hexString.length;
14290 # var resultBuilder = ['#'];
14291 # for (var i = 0; i < missingZeros; i++) {
14292 # resultBuilder.push('0');
14293 # }
14294 # resultBuilder.push(hexString);
14295 # return resultBuilder.join('');
14296 # };
14297 #
14298 # // ...
14299 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14300 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14301 # the final pixel color is defined by the equation:
14302 #
14303 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14304 #
14305 # This means that a value of 1.0 corresponds to a solid color, whereas
14306 # a value of 0.0 corresponds to a completely transparent color. This
14307 # uses a wrapper message rather than a simple float scalar so that it is
14308 # possible to distinguish between a default value and the value being unset.
14309 # If omitted, this color object is to be rendered as a solid color
14310 # (as if the alpha value had been explicitly given with a value of 1.0).
14311 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14312 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14313 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014314 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014315 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
14316 # Absent values indicate that the field isn't specified.
14317 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
14318 # for simplicity of conversion to/from color representations in various
14319 # languages over compactness; for example, the fields of this representation
14320 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14321 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14322 # method in iOS; and, with just a little work, it can be easily formatted into
14323 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14324 #
14325 # Example (Java):
14326 #
14327 # import com.google.type.Color;
14328 #
14329 # // ...
14330 # public static java.awt.Color fromProto(Color protocolor) {
14331 # float alpha = protocolor.hasAlpha()
14332 # ? protocolor.getAlpha().getValue()
14333 # : 1.0;
14334 #
14335 # return new java.awt.Color(
14336 # protocolor.getRed(),
14337 # protocolor.getGreen(),
14338 # protocolor.getBlue(),
14339 # alpha);
14340 # }
14341 #
14342 # public static Color toProto(java.awt.Color color) {
14343 # float red = (float) color.getRed();
14344 # float green = (float) color.getGreen();
14345 # float blue = (float) color.getBlue();
14346 # float denominator = 255.0;
14347 # Color.Builder resultBuilder =
14348 # Color
14349 # .newBuilder()
14350 # .setRed(red / denominator)
14351 # .setGreen(green / denominator)
14352 # .setBlue(blue / denominator);
14353 # int alpha = color.getAlpha();
14354 # if (alpha != 255) {
14355 # result.setAlpha(
14356 # FloatValue
14357 # .newBuilder()
14358 # .setValue(((float) alpha) / denominator)
14359 # .build());
14360 # }
14361 # return resultBuilder.build();
14362 # }
14363 # // ...
14364 #
14365 # Example (iOS / Obj-C):
14366 #
14367 # // ...
14368 # static UIColor* fromProto(Color* protocolor) {
14369 # float red = [protocolor red];
14370 # float green = [protocolor green];
14371 # float blue = [protocolor blue];
14372 # FloatValue* alpha_wrapper = [protocolor alpha];
14373 # float alpha = 1.0;
14374 # if (alpha_wrapper != nil) {
14375 # alpha = [alpha_wrapper value];
14376 # }
14377 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14378 # }
14379 #
14380 # static Color* toProto(UIColor* color) {
14381 # CGFloat red, green, blue, alpha;
14382 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14383 # return nil;
14384 # }
14385 # Color* result = [Color alloc] init];
14386 # [result setRed:red];
14387 # [result setGreen:green];
14388 # [result setBlue:blue];
14389 # if (alpha <= 0.9999) {
14390 # [result setAlpha:floatWrapperWithValue(alpha)];
14391 # }
14392 # [result autorelease];
14393 # return result;
14394 # }
14395 # // ...
14396 #
14397 # Example (JavaScript):
14398 #
14399 # // ...
14400 #
14401 # var protoToCssColor = function(rgb_color) {
14402 # var redFrac = rgb_color.red || 0.0;
14403 # var greenFrac = rgb_color.green || 0.0;
14404 # var blueFrac = rgb_color.blue || 0.0;
14405 # var red = Math.floor(redFrac * 255);
14406 # var green = Math.floor(greenFrac * 255);
14407 # var blue = Math.floor(blueFrac * 255);
14408 #
14409 # if (!('alpha' in rgb_color)) {
14410 # return rgbToCssColor_(red, green, blue);
14411 # }
14412 #
14413 # var alphaFrac = rgb_color.alpha.value || 0.0;
14414 # var rgbParams = [red, green, blue].join(',');
14415 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14416 # };
14417 #
14418 # var rgbToCssColor_ = function(red, green, blue) {
14419 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14420 # var hexString = rgbNumber.toString(16);
14421 # var missingZeros = 6 - hexString.length;
14422 # var resultBuilder = ['#'];
14423 # for (var i = 0; i < missingZeros; i++) {
14424 # resultBuilder.push('0');
14425 # }
14426 # resultBuilder.push(hexString);
14427 # return resultBuilder.join('');
14428 # };
14429 #
14430 # // ...
14431 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14432 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14433 # the final pixel color is defined by the equation:
14434 #
14435 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14436 #
14437 # This means that a value of 1.0 corresponds to a solid color, whereas
14438 # a value of 0.0 corresponds to a completely transparent color. This
14439 # uses a wrapper message rather than a simple float scalar so that it is
14440 # possible to distinguish between a default value and the value being unset.
14441 # If omitted, this color object is to be rendered as a solid color
14442 # (as if the alpha value had been explicitly given with a value of 1.0).
14443 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14444 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14445 },
14446 "bold": True or False, # True if the text is bold.
14447 "strikethrough": True or False, # True if the text has a strikethrough.
14448 "fontFamily": "A String", # The font family.
14449 "fontSize": 42, # The size of the font.
14450 "italic": True or False, # True if the text is italicized.
14451 "underline": True or False, # True if the text is underlined.
14452 },
14453 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
14454 "borders": { # The borders of the cell. # The borders of the cell.
14455 "top": { # A border along a cell. # The top border of the cell.
14456 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14457 # for simplicity of conversion to/from color representations in various
14458 # languages over compactness; for example, the fields of this representation
14459 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14460 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14461 # method in iOS; and, with just a little work, it can be easily formatted into
14462 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14463 #
14464 # Example (Java):
14465 #
14466 # import com.google.type.Color;
14467 #
14468 # // ...
14469 # public static java.awt.Color fromProto(Color protocolor) {
14470 # float alpha = protocolor.hasAlpha()
14471 # ? protocolor.getAlpha().getValue()
14472 # : 1.0;
14473 #
14474 # return new java.awt.Color(
14475 # protocolor.getRed(),
14476 # protocolor.getGreen(),
14477 # protocolor.getBlue(),
14478 # alpha);
14479 # }
14480 #
14481 # public static Color toProto(java.awt.Color color) {
14482 # float red = (float) color.getRed();
14483 # float green = (float) color.getGreen();
14484 # float blue = (float) color.getBlue();
14485 # float denominator = 255.0;
14486 # Color.Builder resultBuilder =
14487 # Color
14488 # .newBuilder()
14489 # .setRed(red / denominator)
14490 # .setGreen(green / denominator)
14491 # .setBlue(blue / denominator);
14492 # int alpha = color.getAlpha();
14493 # if (alpha != 255) {
14494 # result.setAlpha(
14495 # FloatValue
14496 # .newBuilder()
14497 # .setValue(((float) alpha) / denominator)
14498 # .build());
14499 # }
14500 # return resultBuilder.build();
14501 # }
14502 # // ...
14503 #
14504 # Example (iOS / Obj-C):
14505 #
14506 # // ...
14507 # static UIColor* fromProto(Color* protocolor) {
14508 # float red = [protocolor red];
14509 # float green = [protocolor green];
14510 # float blue = [protocolor blue];
14511 # FloatValue* alpha_wrapper = [protocolor alpha];
14512 # float alpha = 1.0;
14513 # if (alpha_wrapper != nil) {
14514 # alpha = [alpha_wrapper value];
14515 # }
14516 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14517 # }
14518 #
14519 # static Color* toProto(UIColor* color) {
14520 # CGFloat red, green, blue, alpha;
14521 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14522 # return nil;
14523 # }
14524 # Color* result = [Color alloc] init];
14525 # [result setRed:red];
14526 # [result setGreen:green];
14527 # [result setBlue:blue];
14528 # if (alpha <= 0.9999) {
14529 # [result setAlpha:floatWrapperWithValue(alpha)];
14530 # }
14531 # [result autorelease];
14532 # return result;
14533 # }
14534 # // ...
14535 #
14536 # Example (JavaScript):
14537 #
14538 # // ...
14539 #
14540 # var protoToCssColor = function(rgb_color) {
14541 # var redFrac = rgb_color.red || 0.0;
14542 # var greenFrac = rgb_color.green || 0.0;
14543 # var blueFrac = rgb_color.blue || 0.0;
14544 # var red = Math.floor(redFrac * 255);
14545 # var green = Math.floor(greenFrac * 255);
14546 # var blue = Math.floor(blueFrac * 255);
14547 #
14548 # if (!('alpha' in rgb_color)) {
14549 # return rgbToCssColor_(red, green, blue);
14550 # }
14551 #
14552 # var alphaFrac = rgb_color.alpha.value || 0.0;
14553 # var rgbParams = [red, green, blue].join(',');
14554 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14555 # };
14556 #
14557 # var rgbToCssColor_ = function(red, green, blue) {
14558 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14559 # var hexString = rgbNumber.toString(16);
14560 # var missingZeros = 6 - hexString.length;
14561 # var resultBuilder = ['#'];
14562 # for (var i = 0; i < missingZeros; i++) {
14563 # resultBuilder.push('0');
14564 # }
14565 # resultBuilder.push(hexString);
14566 # return resultBuilder.join('');
14567 # };
14568 #
14569 # // ...
14570 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14571 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14572 # the final pixel color is defined by the equation:
14573 #
14574 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14575 #
14576 # This means that a value of 1.0 corresponds to a solid color, whereas
14577 # a value of 0.0 corresponds to a completely transparent color. This
14578 # uses a wrapper message rather than a simple float scalar so that it is
14579 # possible to distinguish between a default value and the value being unset.
14580 # If omitted, this color object is to be rendered as a solid color
14581 # (as if the alpha value had been explicitly given with a value of 1.0).
14582 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14583 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14584 },
14585 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014586 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014587 "style": "A String", # The style of the border.
14588 },
14589 "right": { # A border along a cell. # The right border of the cell.
14590 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14591 # for simplicity of conversion to/from color representations in various
14592 # languages over compactness; for example, the fields of this representation
14593 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14594 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14595 # method in iOS; and, with just a little work, it can be easily formatted into
14596 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14597 #
14598 # Example (Java):
14599 #
14600 # import com.google.type.Color;
14601 #
14602 # // ...
14603 # public static java.awt.Color fromProto(Color protocolor) {
14604 # float alpha = protocolor.hasAlpha()
14605 # ? protocolor.getAlpha().getValue()
14606 # : 1.0;
14607 #
14608 # return new java.awt.Color(
14609 # protocolor.getRed(),
14610 # protocolor.getGreen(),
14611 # protocolor.getBlue(),
14612 # alpha);
14613 # }
14614 #
14615 # public static Color toProto(java.awt.Color color) {
14616 # float red = (float) color.getRed();
14617 # float green = (float) color.getGreen();
14618 # float blue = (float) color.getBlue();
14619 # float denominator = 255.0;
14620 # Color.Builder resultBuilder =
14621 # Color
14622 # .newBuilder()
14623 # .setRed(red / denominator)
14624 # .setGreen(green / denominator)
14625 # .setBlue(blue / denominator);
14626 # int alpha = color.getAlpha();
14627 # if (alpha != 255) {
14628 # result.setAlpha(
14629 # FloatValue
14630 # .newBuilder()
14631 # .setValue(((float) alpha) / denominator)
14632 # .build());
14633 # }
14634 # return resultBuilder.build();
14635 # }
14636 # // ...
14637 #
14638 # Example (iOS / Obj-C):
14639 #
14640 # // ...
14641 # static UIColor* fromProto(Color* protocolor) {
14642 # float red = [protocolor red];
14643 # float green = [protocolor green];
14644 # float blue = [protocolor blue];
14645 # FloatValue* alpha_wrapper = [protocolor alpha];
14646 # float alpha = 1.0;
14647 # if (alpha_wrapper != nil) {
14648 # alpha = [alpha_wrapper value];
14649 # }
14650 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14651 # }
14652 #
14653 # static Color* toProto(UIColor* color) {
14654 # CGFloat red, green, blue, alpha;
14655 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14656 # return nil;
14657 # }
14658 # Color* result = [Color alloc] init];
14659 # [result setRed:red];
14660 # [result setGreen:green];
14661 # [result setBlue:blue];
14662 # if (alpha <= 0.9999) {
14663 # [result setAlpha:floatWrapperWithValue(alpha)];
14664 # }
14665 # [result autorelease];
14666 # return result;
14667 # }
14668 # // ...
14669 #
14670 # Example (JavaScript):
14671 #
14672 # // ...
14673 #
14674 # var protoToCssColor = function(rgb_color) {
14675 # var redFrac = rgb_color.red || 0.0;
14676 # var greenFrac = rgb_color.green || 0.0;
14677 # var blueFrac = rgb_color.blue || 0.0;
14678 # var red = Math.floor(redFrac * 255);
14679 # var green = Math.floor(greenFrac * 255);
14680 # var blue = Math.floor(blueFrac * 255);
14681 #
14682 # if (!('alpha' in rgb_color)) {
14683 # return rgbToCssColor_(red, green, blue);
14684 # }
14685 #
14686 # var alphaFrac = rgb_color.alpha.value || 0.0;
14687 # var rgbParams = [red, green, blue].join(',');
14688 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14689 # };
14690 #
14691 # var rgbToCssColor_ = function(red, green, blue) {
14692 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14693 # var hexString = rgbNumber.toString(16);
14694 # var missingZeros = 6 - hexString.length;
14695 # var resultBuilder = ['#'];
14696 # for (var i = 0; i < missingZeros; i++) {
14697 # resultBuilder.push('0');
14698 # }
14699 # resultBuilder.push(hexString);
14700 # return resultBuilder.join('');
14701 # };
14702 #
14703 # // ...
14704 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14705 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14706 # the final pixel color is defined by the equation:
14707 #
14708 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14709 #
14710 # This means that a value of 1.0 corresponds to a solid color, whereas
14711 # a value of 0.0 corresponds to a completely transparent color. This
14712 # uses a wrapper message rather than a simple float scalar so that it is
14713 # possible to distinguish between a default value and the value being unset.
14714 # If omitted, this color object is to be rendered as a solid color
14715 # (as if the alpha value had been explicitly given with a value of 1.0).
14716 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14717 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14718 },
14719 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014720 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014721 "style": "A String", # The style of the border.
14722 },
14723 "bottom": { # A border along a cell. # The bottom border of the cell.
14724 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14725 # for simplicity of conversion to/from color representations in various
14726 # languages over compactness; for example, the fields of this representation
14727 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14728 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14729 # method in iOS; and, with just a little work, it can be easily formatted into
14730 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14731 #
14732 # Example (Java):
14733 #
14734 # import com.google.type.Color;
14735 #
14736 # // ...
14737 # public static java.awt.Color fromProto(Color protocolor) {
14738 # float alpha = protocolor.hasAlpha()
14739 # ? protocolor.getAlpha().getValue()
14740 # : 1.0;
14741 #
14742 # return new java.awt.Color(
14743 # protocolor.getRed(),
14744 # protocolor.getGreen(),
14745 # protocolor.getBlue(),
14746 # alpha);
14747 # }
14748 #
14749 # public static Color toProto(java.awt.Color color) {
14750 # float red = (float) color.getRed();
14751 # float green = (float) color.getGreen();
14752 # float blue = (float) color.getBlue();
14753 # float denominator = 255.0;
14754 # Color.Builder resultBuilder =
14755 # Color
14756 # .newBuilder()
14757 # .setRed(red / denominator)
14758 # .setGreen(green / denominator)
14759 # .setBlue(blue / denominator);
14760 # int alpha = color.getAlpha();
14761 # if (alpha != 255) {
14762 # result.setAlpha(
14763 # FloatValue
14764 # .newBuilder()
14765 # .setValue(((float) alpha) / denominator)
14766 # .build());
14767 # }
14768 # return resultBuilder.build();
14769 # }
14770 # // ...
14771 #
14772 # Example (iOS / Obj-C):
14773 #
14774 # // ...
14775 # static UIColor* fromProto(Color* protocolor) {
14776 # float red = [protocolor red];
14777 # float green = [protocolor green];
14778 # float blue = [protocolor blue];
14779 # FloatValue* alpha_wrapper = [protocolor alpha];
14780 # float alpha = 1.0;
14781 # if (alpha_wrapper != nil) {
14782 # alpha = [alpha_wrapper value];
14783 # }
14784 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14785 # }
14786 #
14787 # static Color* toProto(UIColor* color) {
14788 # CGFloat red, green, blue, alpha;
14789 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14790 # return nil;
14791 # }
14792 # Color* result = [Color alloc] init];
14793 # [result setRed:red];
14794 # [result setGreen:green];
14795 # [result setBlue:blue];
14796 # if (alpha <= 0.9999) {
14797 # [result setAlpha:floatWrapperWithValue(alpha)];
14798 # }
14799 # [result autorelease];
14800 # return result;
14801 # }
14802 # // ...
14803 #
14804 # Example (JavaScript):
14805 #
14806 # // ...
14807 #
14808 # var protoToCssColor = function(rgb_color) {
14809 # var redFrac = rgb_color.red || 0.0;
14810 # var greenFrac = rgb_color.green || 0.0;
14811 # var blueFrac = rgb_color.blue || 0.0;
14812 # var red = Math.floor(redFrac * 255);
14813 # var green = Math.floor(greenFrac * 255);
14814 # var blue = Math.floor(blueFrac * 255);
14815 #
14816 # if (!('alpha' in rgb_color)) {
14817 # return rgbToCssColor_(red, green, blue);
14818 # }
14819 #
14820 # var alphaFrac = rgb_color.alpha.value || 0.0;
14821 # var rgbParams = [red, green, blue].join(',');
14822 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14823 # };
14824 #
14825 # var rgbToCssColor_ = function(red, green, blue) {
14826 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14827 # var hexString = rgbNumber.toString(16);
14828 # var missingZeros = 6 - hexString.length;
14829 # var resultBuilder = ['#'];
14830 # for (var i = 0; i < missingZeros; i++) {
14831 # resultBuilder.push('0');
14832 # }
14833 # resultBuilder.push(hexString);
14834 # return resultBuilder.join('');
14835 # };
14836 #
14837 # // ...
14838 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14839 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14840 # the final pixel color is defined by the equation:
14841 #
14842 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14843 #
14844 # This means that a value of 1.0 corresponds to a solid color, whereas
14845 # a value of 0.0 corresponds to a completely transparent color. This
14846 # uses a wrapper message rather than a simple float scalar so that it is
14847 # possible to distinguish between a default value and the value being unset.
14848 # If omitted, this color object is to be rendered as a solid color
14849 # (as if the alpha value had been explicitly given with a value of 1.0).
14850 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14851 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14852 },
14853 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014854 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014855 "style": "A String", # The style of the border.
14856 },
14857 "left": { # A border along a cell. # The left border of the cell.
14858 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14859 # for simplicity of conversion to/from color representations in various
14860 # languages over compactness; for example, the fields of this representation
14861 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14862 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14863 # method in iOS; and, with just a little work, it can be easily formatted into
14864 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14865 #
14866 # Example (Java):
14867 #
14868 # import com.google.type.Color;
14869 #
14870 # // ...
14871 # public static java.awt.Color fromProto(Color protocolor) {
14872 # float alpha = protocolor.hasAlpha()
14873 # ? protocolor.getAlpha().getValue()
14874 # : 1.0;
14875 #
14876 # return new java.awt.Color(
14877 # protocolor.getRed(),
14878 # protocolor.getGreen(),
14879 # protocolor.getBlue(),
14880 # alpha);
14881 # }
14882 #
14883 # public static Color toProto(java.awt.Color color) {
14884 # float red = (float) color.getRed();
14885 # float green = (float) color.getGreen();
14886 # float blue = (float) color.getBlue();
14887 # float denominator = 255.0;
14888 # Color.Builder resultBuilder =
14889 # Color
14890 # .newBuilder()
14891 # .setRed(red / denominator)
14892 # .setGreen(green / denominator)
14893 # .setBlue(blue / denominator);
14894 # int alpha = color.getAlpha();
14895 # if (alpha != 255) {
14896 # result.setAlpha(
14897 # FloatValue
14898 # .newBuilder()
14899 # .setValue(((float) alpha) / denominator)
14900 # .build());
14901 # }
14902 # return resultBuilder.build();
14903 # }
14904 # // ...
14905 #
14906 # Example (iOS / Obj-C):
14907 #
14908 # // ...
14909 # static UIColor* fromProto(Color* protocolor) {
14910 # float red = [protocolor red];
14911 # float green = [protocolor green];
14912 # float blue = [protocolor blue];
14913 # FloatValue* alpha_wrapper = [protocolor alpha];
14914 # float alpha = 1.0;
14915 # if (alpha_wrapper != nil) {
14916 # alpha = [alpha_wrapper value];
14917 # }
14918 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14919 # }
14920 #
14921 # static Color* toProto(UIColor* color) {
14922 # CGFloat red, green, blue, alpha;
14923 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14924 # return nil;
14925 # }
14926 # Color* result = [Color alloc] init];
14927 # [result setRed:red];
14928 # [result setGreen:green];
14929 # [result setBlue:blue];
14930 # if (alpha <= 0.9999) {
14931 # [result setAlpha:floatWrapperWithValue(alpha)];
14932 # }
14933 # [result autorelease];
14934 # return result;
14935 # }
14936 # // ...
14937 #
14938 # Example (JavaScript):
14939 #
14940 # // ...
14941 #
14942 # var protoToCssColor = function(rgb_color) {
14943 # var redFrac = rgb_color.red || 0.0;
14944 # var greenFrac = rgb_color.green || 0.0;
14945 # var blueFrac = rgb_color.blue || 0.0;
14946 # var red = Math.floor(redFrac * 255);
14947 # var green = Math.floor(greenFrac * 255);
14948 # var blue = Math.floor(blueFrac * 255);
14949 #
14950 # if (!('alpha' in rgb_color)) {
14951 # return rgbToCssColor_(red, green, blue);
14952 # }
14953 #
14954 # var alphaFrac = rgb_color.alpha.value || 0.0;
14955 # var rgbParams = [red, green, blue].join(',');
14956 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14957 # };
14958 #
14959 # var rgbToCssColor_ = function(red, green, blue) {
14960 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14961 # var hexString = rgbNumber.toString(16);
14962 # var missingZeros = 6 - hexString.length;
14963 # var resultBuilder = ['#'];
14964 # for (var i = 0; i < missingZeros; i++) {
14965 # resultBuilder.push('0');
14966 # }
14967 # resultBuilder.push(hexString);
14968 # return resultBuilder.join('');
14969 # };
14970 #
14971 # // ...
14972 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14973 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14974 # the final pixel color is defined by the equation:
14975 #
14976 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14977 #
14978 # This means that a value of 1.0 corresponds to a solid color, whereas
14979 # a value of 0.0 corresponds to a completely transparent color. This
14980 # uses a wrapper message rather than a simple float scalar so that it is
14981 # possible to distinguish between a default value and the value being unset.
14982 # If omitted, this color object is to be rendered as a solid color
14983 # (as if the alpha value had been explicitly given with a value of 1.0).
14984 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14985 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14986 },
14987 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014988 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014989 "style": "A String", # The style of the border.
14990 },
14991 },
14992 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
14993 },
14994 },
14995 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
14996 # the interpolation points listed. The format of a cell will vary
14997 # based on its contents as compared to the values of the interpolation
14998 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014999 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015000 # These pin the gradient color scale according to the color,
15001 # type and value chosen.
15002 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
15003 # for simplicity of conversion to/from color representations in various
15004 # languages over compactness; for example, the fields of this representation
15005 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15006 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15007 # method in iOS; and, with just a little work, it can be easily formatted into
15008 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15009 #
15010 # Example (Java):
15011 #
15012 # import com.google.type.Color;
15013 #
15014 # // ...
15015 # public static java.awt.Color fromProto(Color protocolor) {
15016 # float alpha = protocolor.hasAlpha()
15017 # ? protocolor.getAlpha().getValue()
15018 # : 1.0;
15019 #
15020 # return new java.awt.Color(
15021 # protocolor.getRed(),
15022 # protocolor.getGreen(),
15023 # protocolor.getBlue(),
15024 # alpha);
15025 # }
15026 #
15027 # public static Color toProto(java.awt.Color color) {
15028 # float red = (float) color.getRed();
15029 # float green = (float) color.getGreen();
15030 # float blue = (float) color.getBlue();
15031 # float denominator = 255.0;
15032 # Color.Builder resultBuilder =
15033 # Color
15034 # .newBuilder()
15035 # .setRed(red / denominator)
15036 # .setGreen(green / denominator)
15037 # .setBlue(blue / denominator);
15038 # int alpha = color.getAlpha();
15039 # if (alpha != 255) {
15040 # result.setAlpha(
15041 # FloatValue
15042 # .newBuilder()
15043 # .setValue(((float) alpha) / denominator)
15044 # .build());
15045 # }
15046 # return resultBuilder.build();
15047 # }
15048 # // ...
15049 #
15050 # Example (iOS / Obj-C):
15051 #
15052 # // ...
15053 # static UIColor* fromProto(Color* protocolor) {
15054 # float red = [protocolor red];
15055 # float green = [protocolor green];
15056 # float blue = [protocolor blue];
15057 # FloatValue* alpha_wrapper = [protocolor alpha];
15058 # float alpha = 1.0;
15059 # if (alpha_wrapper != nil) {
15060 # alpha = [alpha_wrapper value];
15061 # }
15062 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15063 # }
15064 #
15065 # static Color* toProto(UIColor* color) {
15066 # CGFloat red, green, blue, alpha;
15067 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15068 # return nil;
15069 # }
15070 # Color* result = [Color alloc] init];
15071 # [result setRed:red];
15072 # [result setGreen:green];
15073 # [result setBlue:blue];
15074 # if (alpha <= 0.9999) {
15075 # [result setAlpha:floatWrapperWithValue(alpha)];
15076 # }
15077 # [result autorelease];
15078 # return result;
15079 # }
15080 # // ...
15081 #
15082 # Example (JavaScript):
15083 #
15084 # // ...
15085 #
15086 # var protoToCssColor = function(rgb_color) {
15087 # var redFrac = rgb_color.red || 0.0;
15088 # var greenFrac = rgb_color.green || 0.0;
15089 # var blueFrac = rgb_color.blue || 0.0;
15090 # var red = Math.floor(redFrac * 255);
15091 # var green = Math.floor(greenFrac * 255);
15092 # var blue = Math.floor(blueFrac * 255);
15093 #
15094 # if (!('alpha' in rgb_color)) {
15095 # return rgbToCssColor_(red, green, blue);
15096 # }
15097 #
15098 # var alphaFrac = rgb_color.alpha.value || 0.0;
15099 # var rgbParams = [red, green, blue].join(',');
15100 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15101 # };
15102 #
15103 # var rgbToCssColor_ = function(red, green, blue) {
15104 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15105 # var hexString = rgbNumber.toString(16);
15106 # var missingZeros = 6 - hexString.length;
15107 # var resultBuilder = ['#'];
15108 # for (var i = 0; i < missingZeros; i++) {
15109 # resultBuilder.push('0');
15110 # }
15111 # resultBuilder.push(hexString);
15112 # return resultBuilder.join('');
15113 # };
15114 #
15115 # // ...
15116 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15117 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15118 # the final pixel color is defined by the equation:
15119 #
15120 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15121 #
15122 # This means that a value of 1.0 corresponds to a solid color, whereas
15123 # a value of 0.0 corresponds to a completely transparent color. This
15124 # uses a wrapper message rather than a simple float scalar so that it is
15125 # possible to distinguish between a default value and the value being unset.
15126 # If omitted, this color object is to be rendered as a solid color
15127 # (as if the alpha value had been explicitly given with a value of 1.0).
15128 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15129 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15130 },
15131 "type": "A String", # How the value should be interpreted.
15132 "value": "A String", # The value this interpolation point uses. May be a formula.
15133 # Unused if type is MIN or
15134 # MAX.
15135 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015136 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015137 # These pin the gradient color scale according to the color,
15138 # type and value chosen.
15139 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
15140 # for simplicity of conversion to/from color representations in various
15141 # languages over compactness; for example, the fields of this representation
15142 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15143 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15144 # method in iOS; and, with just a little work, it can be easily formatted into
15145 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15146 #
15147 # Example (Java):
15148 #
15149 # import com.google.type.Color;
15150 #
15151 # // ...
15152 # public static java.awt.Color fromProto(Color protocolor) {
15153 # float alpha = protocolor.hasAlpha()
15154 # ? protocolor.getAlpha().getValue()
15155 # : 1.0;
15156 #
15157 # return new java.awt.Color(
15158 # protocolor.getRed(),
15159 # protocolor.getGreen(),
15160 # protocolor.getBlue(),
15161 # alpha);
15162 # }
15163 #
15164 # public static Color toProto(java.awt.Color color) {
15165 # float red = (float) color.getRed();
15166 # float green = (float) color.getGreen();
15167 # float blue = (float) color.getBlue();
15168 # float denominator = 255.0;
15169 # Color.Builder resultBuilder =
15170 # Color
15171 # .newBuilder()
15172 # .setRed(red / denominator)
15173 # .setGreen(green / denominator)
15174 # .setBlue(blue / denominator);
15175 # int alpha = color.getAlpha();
15176 # if (alpha != 255) {
15177 # result.setAlpha(
15178 # FloatValue
15179 # .newBuilder()
15180 # .setValue(((float) alpha) / denominator)
15181 # .build());
15182 # }
15183 # return resultBuilder.build();
15184 # }
15185 # // ...
15186 #
15187 # Example (iOS / Obj-C):
15188 #
15189 # // ...
15190 # static UIColor* fromProto(Color* protocolor) {
15191 # float red = [protocolor red];
15192 # float green = [protocolor green];
15193 # float blue = [protocolor blue];
15194 # FloatValue* alpha_wrapper = [protocolor alpha];
15195 # float alpha = 1.0;
15196 # if (alpha_wrapper != nil) {
15197 # alpha = [alpha_wrapper value];
15198 # }
15199 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15200 # }
15201 #
15202 # static Color* toProto(UIColor* color) {
15203 # CGFloat red, green, blue, alpha;
15204 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15205 # return nil;
15206 # }
15207 # Color* result = [Color alloc] init];
15208 # [result setRed:red];
15209 # [result setGreen:green];
15210 # [result setBlue:blue];
15211 # if (alpha <= 0.9999) {
15212 # [result setAlpha:floatWrapperWithValue(alpha)];
15213 # }
15214 # [result autorelease];
15215 # return result;
15216 # }
15217 # // ...
15218 #
15219 # Example (JavaScript):
15220 #
15221 # // ...
15222 #
15223 # var protoToCssColor = function(rgb_color) {
15224 # var redFrac = rgb_color.red || 0.0;
15225 # var greenFrac = rgb_color.green || 0.0;
15226 # var blueFrac = rgb_color.blue || 0.0;
15227 # var red = Math.floor(redFrac * 255);
15228 # var green = Math.floor(greenFrac * 255);
15229 # var blue = Math.floor(blueFrac * 255);
15230 #
15231 # if (!('alpha' in rgb_color)) {
15232 # return rgbToCssColor_(red, green, blue);
15233 # }
15234 #
15235 # var alphaFrac = rgb_color.alpha.value || 0.0;
15236 # var rgbParams = [red, green, blue].join(',');
15237 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15238 # };
15239 #
15240 # var rgbToCssColor_ = function(red, green, blue) {
15241 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15242 # var hexString = rgbNumber.toString(16);
15243 # var missingZeros = 6 - hexString.length;
15244 # var resultBuilder = ['#'];
15245 # for (var i = 0; i < missingZeros; i++) {
15246 # resultBuilder.push('0');
15247 # }
15248 # resultBuilder.push(hexString);
15249 # return resultBuilder.join('');
15250 # };
15251 #
15252 # // ...
15253 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15254 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15255 # the final pixel color is defined by the equation:
15256 #
15257 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15258 #
15259 # This means that a value of 1.0 corresponds to a solid color, whereas
15260 # a value of 0.0 corresponds to a completely transparent color. This
15261 # uses a wrapper message rather than a simple float scalar so that it is
15262 # possible to distinguish between a default value and the value being unset.
15263 # If omitted, this color object is to be rendered as a solid color
15264 # (as if the alpha value had been explicitly given with a value of 1.0).
15265 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15266 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15267 },
15268 "type": "A String", # How the value should be interpreted.
15269 "value": "A String", # The value this interpolation point uses. May be a formula.
15270 # Unused if type is MIN or
15271 # MAX.
15272 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015273 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015274 # These pin the gradient color scale according to the color,
15275 # type and value chosen.
15276 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
15277 # for simplicity of conversion to/from color representations in various
15278 # languages over compactness; for example, the fields of this representation
15279 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15280 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15281 # method in iOS; and, with just a little work, it can be easily formatted into
15282 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15283 #
15284 # Example (Java):
15285 #
15286 # import com.google.type.Color;
15287 #
15288 # // ...
15289 # public static java.awt.Color fromProto(Color protocolor) {
15290 # float alpha = protocolor.hasAlpha()
15291 # ? protocolor.getAlpha().getValue()
15292 # : 1.0;
15293 #
15294 # return new java.awt.Color(
15295 # protocolor.getRed(),
15296 # protocolor.getGreen(),
15297 # protocolor.getBlue(),
15298 # alpha);
15299 # }
15300 #
15301 # public static Color toProto(java.awt.Color color) {
15302 # float red = (float) color.getRed();
15303 # float green = (float) color.getGreen();
15304 # float blue = (float) color.getBlue();
15305 # float denominator = 255.0;
15306 # Color.Builder resultBuilder =
15307 # Color
15308 # .newBuilder()
15309 # .setRed(red / denominator)
15310 # .setGreen(green / denominator)
15311 # .setBlue(blue / denominator);
15312 # int alpha = color.getAlpha();
15313 # if (alpha != 255) {
15314 # result.setAlpha(
15315 # FloatValue
15316 # .newBuilder()
15317 # .setValue(((float) alpha) / denominator)
15318 # .build());
15319 # }
15320 # return resultBuilder.build();
15321 # }
15322 # // ...
15323 #
15324 # Example (iOS / Obj-C):
15325 #
15326 # // ...
15327 # static UIColor* fromProto(Color* protocolor) {
15328 # float red = [protocolor red];
15329 # float green = [protocolor green];
15330 # float blue = [protocolor blue];
15331 # FloatValue* alpha_wrapper = [protocolor alpha];
15332 # float alpha = 1.0;
15333 # if (alpha_wrapper != nil) {
15334 # alpha = [alpha_wrapper value];
15335 # }
15336 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15337 # }
15338 #
15339 # static Color* toProto(UIColor* color) {
15340 # CGFloat red, green, blue, alpha;
15341 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15342 # return nil;
15343 # }
15344 # Color* result = [Color alloc] init];
15345 # [result setRed:red];
15346 # [result setGreen:green];
15347 # [result setBlue:blue];
15348 # if (alpha <= 0.9999) {
15349 # [result setAlpha:floatWrapperWithValue(alpha)];
15350 # }
15351 # [result autorelease];
15352 # return result;
15353 # }
15354 # // ...
15355 #
15356 # Example (JavaScript):
15357 #
15358 # // ...
15359 #
15360 # var protoToCssColor = function(rgb_color) {
15361 # var redFrac = rgb_color.red || 0.0;
15362 # var greenFrac = rgb_color.green || 0.0;
15363 # var blueFrac = rgb_color.blue || 0.0;
15364 # var red = Math.floor(redFrac * 255);
15365 # var green = Math.floor(greenFrac * 255);
15366 # var blue = Math.floor(blueFrac * 255);
15367 #
15368 # if (!('alpha' in rgb_color)) {
15369 # return rgbToCssColor_(red, green, blue);
15370 # }
15371 #
15372 # var alphaFrac = rgb_color.alpha.value || 0.0;
15373 # var rgbParams = [red, green, blue].join(',');
15374 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15375 # };
15376 #
15377 # var rgbToCssColor_ = function(red, green, blue) {
15378 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15379 # var hexString = rgbNumber.toString(16);
15380 # var missingZeros = 6 - hexString.length;
15381 # var resultBuilder = ['#'];
15382 # for (var i = 0; i < missingZeros; i++) {
15383 # resultBuilder.push('0');
15384 # }
15385 # resultBuilder.push(hexString);
15386 # return resultBuilder.join('');
15387 # };
15388 #
15389 # // ...
15390 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15391 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15392 # the final pixel color is defined by the equation:
15393 #
15394 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15395 #
15396 # This means that a value of 1.0 corresponds to a solid color, whereas
15397 # a value of 0.0 corresponds to a completely transparent color. This
15398 # uses a wrapper message rather than a simple float scalar so that it is
15399 # possible to distinguish between a default value and the value being unset.
15400 # If omitted, this color object is to be rendered as a solid color
15401 # (as if the alpha value had been explicitly given with a value of 1.0).
15402 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15403 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15404 },
15405 "type": "A String", # How the value should be interpreted.
15406 "value": "A String", # The value this interpolation point uses. May be a formula.
15407 # Unused if type is MIN or
15408 # MAX.
15409 },
15410 },
15411 },
15412 "newRule": { # A rule describing a conditional format. # The new rule that replaced the old rule (if replacing),
15413 # or the rule that was moved (if moved)
15414 "ranges": [ # The ranges that will be formatted if the condition is true.
15415 # All the ranges must be on the same grid.
15416 { # A range on a sheet.
15417 # All indexes are zero-based.
15418 # Indexes are half open, e.g the start index is inclusive
15419 # and the end index is exclusive -- [start_index, end_index).
15420 # Missing indexes indicate the range is unbounded on that side.
15421 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015422 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015423 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015424 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015425 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015426 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015427 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015428 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015429 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015430 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015431 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015432 # `Sheet1!A:B == sheet_id: 0,
15433 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015434 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015435 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015436 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015437 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015438 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015439 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015440 #
15441 # The start index must always be less than or equal to the end index.
15442 # If the start index equals the end index, then the range is empty.
15443 # Empty ranges are typically not meaningful and are usually rendered in the
15444 # UI as `#REF!`.
15445 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
15446 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
15447 "sheetId": 42, # The sheet this range is on.
15448 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
15449 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
15450 },
15451 ],
15452 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
15453 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
15454 # the format will be applied.
15455 # BooleanConditions are used by conditional formatting,
15456 # data validation, and the criteria in filters.
15457 "type": "A String", # The type of condition.
15458 "values": [ # The values of the condition. The number of supported values depends
15459 # on the condition type. Some support zero values,
15460 # others one or two values,
15461 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
15462 { # The value of the condition.
15463 "relativeDate": "A String", # A relative date (based on the current date).
15464 # Valid only if the type is
15465 # DATE_BEFORE,
15466 # DATE_AFTER,
15467 # DATE_ON_OR_BEFORE or
15468 # DATE_ON_OR_AFTER.
15469 #
15470 # Relative dates are not supported in data validation.
15471 # They are supported only in conditional formatting and
15472 # conditional filters.
15473 "userEnteredValue": "A String", # A value the condition is based on.
15474 # The value will be parsed as if the user typed into a cell.
15475 # Formulas are supported (and must begin with an `=`).
15476 },
15477 ],
15478 },
15479 "format": { # The format of a cell. # The format to apply.
15480 # Conditional formatting can only apply a subset of formatting:
15481 # bold, italic,
15482 # strikethrough,
15483 # foreground color &
15484 # background color.
15485 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015486 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
15487 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015488 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015489 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015490 },
15491 "textDirection": "A String", # The direction of the text in the cell.
15492 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
15493 # When updating padding, every field must be specified.
15494 "top": 42, # The top padding of the cell.
15495 "right": 42, # The right padding of the cell.
15496 "bottom": 42, # The bottom padding of the cell.
15497 "left": 42, # The left padding of the cell.
15498 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015499 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015500 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
15501 # for simplicity of conversion to/from color representations in various
15502 # languages over compactness; for example, the fields of this representation
15503 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15504 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15505 # method in iOS; and, with just a little work, it can be easily formatted into
15506 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15507 #
15508 # Example (Java):
15509 #
15510 # import com.google.type.Color;
15511 #
15512 # // ...
15513 # public static java.awt.Color fromProto(Color protocolor) {
15514 # float alpha = protocolor.hasAlpha()
15515 # ? protocolor.getAlpha().getValue()
15516 # : 1.0;
15517 #
15518 # return new java.awt.Color(
15519 # protocolor.getRed(),
15520 # protocolor.getGreen(),
15521 # protocolor.getBlue(),
15522 # alpha);
15523 # }
15524 #
15525 # public static Color toProto(java.awt.Color color) {
15526 # float red = (float) color.getRed();
15527 # float green = (float) color.getGreen();
15528 # float blue = (float) color.getBlue();
15529 # float denominator = 255.0;
15530 # Color.Builder resultBuilder =
15531 # Color
15532 # .newBuilder()
15533 # .setRed(red / denominator)
15534 # .setGreen(green / denominator)
15535 # .setBlue(blue / denominator);
15536 # int alpha = color.getAlpha();
15537 # if (alpha != 255) {
15538 # result.setAlpha(
15539 # FloatValue
15540 # .newBuilder()
15541 # .setValue(((float) alpha) / denominator)
15542 # .build());
15543 # }
15544 # return resultBuilder.build();
15545 # }
15546 # // ...
15547 #
15548 # Example (iOS / Obj-C):
15549 #
15550 # // ...
15551 # static UIColor* fromProto(Color* protocolor) {
15552 # float red = [protocolor red];
15553 # float green = [protocolor green];
15554 # float blue = [protocolor blue];
15555 # FloatValue* alpha_wrapper = [protocolor alpha];
15556 # float alpha = 1.0;
15557 # if (alpha_wrapper != nil) {
15558 # alpha = [alpha_wrapper value];
15559 # }
15560 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15561 # }
15562 #
15563 # static Color* toProto(UIColor* color) {
15564 # CGFloat red, green, blue, alpha;
15565 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15566 # return nil;
15567 # }
15568 # Color* result = [Color alloc] init];
15569 # [result setRed:red];
15570 # [result setGreen:green];
15571 # [result setBlue:blue];
15572 # if (alpha <= 0.9999) {
15573 # [result setAlpha:floatWrapperWithValue(alpha)];
15574 # }
15575 # [result autorelease];
15576 # return result;
15577 # }
15578 # // ...
15579 #
15580 # Example (JavaScript):
15581 #
15582 # // ...
15583 #
15584 # var protoToCssColor = function(rgb_color) {
15585 # var redFrac = rgb_color.red || 0.0;
15586 # var greenFrac = rgb_color.green || 0.0;
15587 # var blueFrac = rgb_color.blue || 0.0;
15588 # var red = Math.floor(redFrac * 255);
15589 # var green = Math.floor(greenFrac * 255);
15590 # var blue = Math.floor(blueFrac * 255);
15591 #
15592 # if (!('alpha' in rgb_color)) {
15593 # return rgbToCssColor_(red, green, blue);
15594 # }
15595 #
15596 # var alphaFrac = rgb_color.alpha.value || 0.0;
15597 # var rgbParams = [red, green, blue].join(',');
15598 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15599 # };
15600 #
15601 # var rgbToCssColor_ = function(red, green, blue) {
15602 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15603 # var hexString = rgbNumber.toString(16);
15604 # var missingZeros = 6 - hexString.length;
15605 # var resultBuilder = ['#'];
15606 # for (var i = 0; i < missingZeros; i++) {
15607 # resultBuilder.push('0');
15608 # }
15609 # resultBuilder.push(hexString);
15610 # return resultBuilder.join('');
15611 # };
15612 #
15613 # // ...
15614 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15615 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15616 # the final pixel color is defined by the equation:
15617 #
15618 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15619 #
15620 # This means that a value of 1.0 corresponds to a solid color, whereas
15621 # a value of 0.0 corresponds to a completely transparent color. This
15622 # uses a wrapper message rather than a simple float scalar so that it is
15623 # possible to distinguish between a default value and the value being unset.
15624 # If omitted, this color object is to be rendered as a solid color
15625 # (as if the alpha value had been explicitly given with a value of 1.0).
15626 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15627 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15628 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015629 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015630 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
15631 # Absent values indicate that the field isn't specified.
15632 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
15633 # for simplicity of conversion to/from color representations in various
15634 # languages over compactness; for example, the fields of this representation
15635 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15636 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15637 # method in iOS; and, with just a little work, it can be easily formatted into
15638 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15639 #
15640 # Example (Java):
15641 #
15642 # import com.google.type.Color;
15643 #
15644 # // ...
15645 # public static java.awt.Color fromProto(Color protocolor) {
15646 # float alpha = protocolor.hasAlpha()
15647 # ? protocolor.getAlpha().getValue()
15648 # : 1.0;
15649 #
15650 # return new java.awt.Color(
15651 # protocolor.getRed(),
15652 # protocolor.getGreen(),
15653 # protocolor.getBlue(),
15654 # alpha);
15655 # }
15656 #
15657 # public static Color toProto(java.awt.Color color) {
15658 # float red = (float) color.getRed();
15659 # float green = (float) color.getGreen();
15660 # float blue = (float) color.getBlue();
15661 # float denominator = 255.0;
15662 # Color.Builder resultBuilder =
15663 # Color
15664 # .newBuilder()
15665 # .setRed(red / denominator)
15666 # .setGreen(green / denominator)
15667 # .setBlue(blue / denominator);
15668 # int alpha = color.getAlpha();
15669 # if (alpha != 255) {
15670 # result.setAlpha(
15671 # FloatValue
15672 # .newBuilder()
15673 # .setValue(((float) alpha) / denominator)
15674 # .build());
15675 # }
15676 # return resultBuilder.build();
15677 # }
15678 # // ...
15679 #
15680 # Example (iOS / Obj-C):
15681 #
15682 # // ...
15683 # static UIColor* fromProto(Color* protocolor) {
15684 # float red = [protocolor red];
15685 # float green = [protocolor green];
15686 # float blue = [protocolor blue];
15687 # FloatValue* alpha_wrapper = [protocolor alpha];
15688 # float alpha = 1.0;
15689 # if (alpha_wrapper != nil) {
15690 # alpha = [alpha_wrapper value];
15691 # }
15692 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15693 # }
15694 #
15695 # static Color* toProto(UIColor* color) {
15696 # CGFloat red, green, blue, alpha;
15697 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15698 # return nil;
15699 # }
15700 # Color* result = [Color alloc] init];
15701 # [result setRed:red];
15702 # [result setGreen:green];
15703 # [result setBlue:blue];
15704 # if (alpha <= 0.9999) {
15705 # [result setAlpha:floatWrapperWithValue(alpha)];
15706 # }
15707 # [result autorelease];
15708 # return result;
15709 # }
15710 # // ...
15711 #
15712 # Example (JavaScript):
15713 #
15714 # // ...
15715 #
15716 # var protoToCssColor = function(rgb_color) {
15717 # var redFrac = rgb_color.red || 0.0;
15718 # var greenFrac = rgb_color.green || 0.0;
15719 # var blueFrac = rgb_color.blue || 0.0;
15720 # var red = Math.floor(redFrac * 255);
15721 # var green = Math.floor(greenFrac * 255);
15722 # var blue = Math.floor(blueFrac * 255);
15723 #
15724 # if (!('alpha' in rgb_color)) {
15725 # return rgbToCssColor_(red, green, blue);
15726 # }
15727 #
15728 # var alphaFrac = rgb_color.alpha.value || 0.0;
15729 # var rgbParams = [red, green, blue].join(',');
15730 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15731 # };
15732 #
15733 # var rgbToCssColor_ = function(red, green, blue) {
15734 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15735 # var hexString = rgbNumber.toString(16);
15736 # var missingZeros = 6 - hexString.length;
15737 # var resultBuilder = ['#'];
15738 # for (var i = 0; i < missingZeros; i++) {
15739 # resultBuilder.push('0');
15740 # }
15741 # resultBuilder.push(hexString);
15742 # return resultBuilder.join('');
15743 # };
15744 #
15745 # // ...
15746 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15747 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15748 # the final pixel color is defined by the equation:
15749 #
15750 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15751 #
15752 # This means that a value of 1.0 corresponds to a solid color, whereas
15753 # a value of 0.0 corresponds to a completely transparent color. This
15754 # uses a wrapper message rather than a simple float scalar so that it is
15755 # possible to distinguish between a default value and the value being unset.
15756 # If omitted, this color object is to be rendered as a solid color
15757 # (as if the alpha value had been explicitly given with a value of 1.0).
15758 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15759 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15760 },
15761 "bold": True or False, # True if the text is bold.
15762 "strikethrough": True or False, # True if the text has a strikethrough.
15763 "fontFamily": "A String", # The font family.
15764 "fontSize": 42, # The size of the font.
15765 "italic": True or False, # True if the text is italicized.
15766 "underline": True or False, # True if the text is underlined.
15767 },
15768 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
15769 "borders": { # The borders of the cell. # The borders of the cell.
15770 "top": { # A border along a cell. # The top border of the cell.
15771 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
15772 # for simplicity of conversion to/from color representations in various
15773 # languages over compactness; for example, the fields of this representation
15774 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15775 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15776 # method in iOS; and, with just a little work, it can be easily formatted into
15777 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15778 #
15779 # Example (Java):
15780 #
15781 # import com.google.type.Color;
15782 #
15783 # // ...
15784 # public static java.awt.Color fromProto(Color protocolor) {
15785 # float alpha = protocolor.hasAlpha()
15786 # ? protocolor.getAlpha().getValue()
15787 # : 1.0;
15788 #
15789 # return new java.awt.Color(
15790 # protocolor.getRed(),
15791 # protocolor.getGreen(),
15792 # protocolor.getBlue(),
15793 # alpha);
15794 # }
15795 #
15796 # public static Color toProto(java.awt.Color color) {
15797 # float red = (float) color.getRed();
15798 # float green = (float) color.getGreen();
15799 # float blue = (float) color.getBlue();
15800 # float denominator = 255.0;
15801 # Color.Builder resultBuilder =
15802 # Color
15803 # .newBuilder()
15804 # .setRed(red / denominator)
15805 # .setGreen(green / denominator)
15806 # .setBlue(blue / denominator);
15807 # int alpha = color.getAlpha();
15808 # if (alpha != 255) {
15809 # result.setAlpha(
15810 # FloatValue
15811 # .newBuilder()
15812 # .setValue(((float) alpha) / denominator)
15813 # .build());
15814 # }
15815 # return resultBuilder.build();
15816 # }
15817 # // ...
15818 #
15819 # Example (iOS / Obj-C):
15820 #
15821 # // ...
15822 # static UIColor* fromProto(Color* protocolor) {
15823 # float red = [protocolor red];
15824 # float green = [protocolor green];
15825 # float blue = [protocolor blue];
15826 # FloatValue* alpha_wrapper = [protocolor alpha];
15827 # float alpha = 1.0;
15828 # if (alpha_wrapper != nil) {
15829 # alpha = [alpha_wrapper value];
15830 # }
15831 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15832 # }
15833 #
15834 # static Color* toProto(UIColor* color) {
15835 # CGFloat red, green, blue, alpha;
15836 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15837 # return nil;
15838 # }
15839 # Color* result = [Color alloc] init];
15840 # [result setRed:red];
15841 # [result setGreen:green];
15842 # [result setBlue:blue];
15843 # if (alpha <= 0.9999) {
15844 # [result setAlpha:floatWrapperWithValue(alpha)];
15845 # }
15846 # [result autorelease];
15847 # return result;
15848 # }
15849 # // ...
15850 #
15851 # Example (JavaScript):
15852 #
15853 # // ...
15854 #
15855 # var protoToCssColor = function(rgb_color) {
15856 # var redFrac = rgb_color.red || 0.0;
15857 # var greenFrac = rgb_color.green || 0.0;
15858 # var blueFrac = rgb_color.blue || 0.0;
15859 # var red = Math.floor(redFrac * 255);
15860 # var green = Math.floor(greenFrac * 255);
15861 # var blue = Math.floor(blueFrac * 255);
15862 #
15863 # if (!('alpha' in rgb_color)) {
15864 # return rgbToCssColor_(red, green, blue);
15865 # }
15866 #
15867 # var alphaFrac = rgb_color.alpha.value || 0.0;
15868 # var rgbParams = [red, green, blue].join(',');
15869 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15870 # };
15871 #
15872 # var rgbToCssColor_ = function(red, green, blue) {
15873 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15874 # var hexString = rgbNumber.toString(16);
15875 # var missingZeros = 6 - hexString.length;
15876 # var resultBuilder = ['#'];
15877 # for (var i = 0; i < missingZeros; i++) {
15878 # resultBuilder.push('0');
15879 # }
15880 # resultBuilder.push(hexString);
15881 # return resultBuilder.join('');
15882 # };
15883 #
15884 # // ...
15885 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15886 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15887 # the final pixel color is defined by the equation:
15888 #
15889 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15890 #
15891 # This means that a value of 1.0 corresponds to a solid color, whereas
15892 # a value of 0.0 corresponds to a completely transparent color. This
15893 # uses a wrapper message rather than a simple float scalar so that it is
15894 # possible to distinguish between a default value and the value being unset.
15895 # If omitted, this color object is to be rendered as a solid color
15896 # (as if the alpha value had been explicitly given with a value of 1.0).
15897 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15898 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15899 },
15900 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015901 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015902 "style": "A String", # The style of the border.
15903 },
15904 "right": { # A border along a cell. # The right border of the cell.
15905 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
15906 # for simplicity of conversion to/from color representations in various
15907 # languages over compactness; for example, the fields of this representation
15908 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15909 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15910 # method in iOS; and, with just a little work, it can be easily formatted into
15911 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15912 #
15913 # Example (Java):
15914 #
15915 # import com.google.type.Color;
15916 #
15917 # // ...
15918 # public static java.awt.Color fromProto(Color protocolor) {
15919 # float alpha = protocolor.hasAlpha()
15920 # ? protocolor.getAlpha().getValue()
15921 # : 1.0;
15922 #
15923 # return new java.awt.Color(
15924 # protocolor.getRed(),
15925 # protocolor.getGreen(),
15926 # protocolor.getBlue(),
15927 # alpha);
15928 # }
15929 #
15930 # public static Color toProto(java.awt.Color color) {
15931 # float red = (float) color.getRed();
15932 # float green = (float) color.getGreen();
15933 # float blue = (float) color.getBlue();
15934 # float denominator = 255.0;
15935 # Color.Builder resultBuilder =
15936 # Color
15937 # .newBuilder()
15938 # .setRed(red / denominator)
15939 # .setGreen(green / denominator)
15940 # .setBlue(blue / denominator);
15941 # int alpha = color.getAlpha();
15942 # if (alpha != 255) {
15943 # result.setAlpha(
15944 # FloatValue
15945 # .newBuilder()
15946 # .setValue(((float) alpha) / denominator)
15947 # .build());
15948 # }
15949 # return resultBuilder.build();
15950 # }
15951 # // ...
15952 #
15953 # Example (iOS / Obj-C):
15954 #
15955 # // ...
15956 # static UIColor* fromProto(Color* protocolor) {
15957 # float red = [protocolor red];
15958 # float green = [protocolor green];
15959 # float blue = [protocolor blue];
15960 # FloatValue* alpha_wrapper = [protocolor alpha];
15961 # float alpha = 1.0;
15962 # if (alpha_wrapper != nil) {
15963 # alpha = [alpha_wrapper value];
15964 # }
15965 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15966 # }
15967 #
15968 # static Color* toProto(UIColor* color) {
15969 # CGFloat red, green, blue, alpha;
15970 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15971 # return nil;
15972 # }
15973 # Color* result = [Color alloc] init];
15974 # [result setRed:red];
15975 # [result setGreen:green];
15976 # [result setBlue:blue];
15977 # if (alpha <= 0.9999) {
15978 # [result setAlpha:floatWrapperWithValue(alpha)];
15979 # }
15980 # [result autorelease];
15981 # return result;
15982 # }
15983 # // ...
15984 #
15985 # Example (JavaScript):
15986 #
15987 # // ...
15988 #
15989 # var protoToCssColor = function(rgb_color) {
15990 # var redFrac = rgb_color.red || 0.0;
15991 # var greenFrac = rgb_color.green || 0.0;
15992 # var blueFrac = rgb_color.blue || 0.0;
15993 # var red = Math.floor(redFrac * 255);
15994 # var green = Math.floor(greenFrac * 255);
15995 # var blue = Math.floor(blueFrac * 255);
15996 #
15997 # if (!('alpha' in rgb_color)) {
15998 # return rgbToCssColor_(red, green, blue);
15999 # }
16000 #
16001 # var alphaFrac = rgb_color.alpha.value || 0.0;
16002 # var rgbParams = [red, green, blue].join(',');
16003 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16004 # };
16005 #
16006 # var rgbToCssColor_ = function(red, green, blue) {
16007 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16008 # var hexString = rgbNumber.toString(16);
16009 # var missingZeros = 6 - hexString.length;
16010 # var resultBuilder = ['#'];
16011 # for (var i = 0; i < missingZeros; i++) {
16012 # resultBuilder.push('0');
16013 # }
16014 # resultBuilder.push(hexString);
16015 # return resultBuilder.join('');
16016 # };
16017 #
16018 # // ...
16019 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16020 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16021 # the final pixel color is defined by the equation:
16022 #
16023 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16024 #
16025 # This means that a value of 1.0 corresponds to a solid color, whereas
16026 # a value of 0.0 corresponds to a completely transparent color. This
16027 # uses a wrapper message rather than a simple float scalar so that it is
16028 # possible to distinguish between a default value and the value being unset.
16029 # If omitted, this color object is to be rendered as a solid color
16030 # (as if the alpha value had been explicitly given with a value of 1.0).
16031 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16032 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16033 },
16034 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016035 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016036 "style": "A String", # The style of the border.
16037 },
16038 "bottom": { # A border along a cell. # The bottom border of the cell.
16039 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16040 # for simplicity of conversion to/from color representations in various
16041 # languages over compactness; for example, the fields of this representation
16042 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16043 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16044 # method in iOS; and, with just a little work, it can be easily formatted into
16045 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16046 #
16047 # Example (Java):
16048 #
16049 # import com.google.type.Color;
16050 #
16051 # // ...
16052 # public static java.awt.Color fromProto(Color protocolor) {
16053 # float alpha = protocolor.hasAlpha()
16054 # ? protocolor.getAlpha().getValue()
16055 # : 1.0;
16056 #
16057 # return new java.awt.Color(
16058 # protocolor.getRed(),
16059 # protocolor.getGreen(),
16060 # protocolor.getBlue(),
16061 # alpha);
16062 # }
16063 #
16064 # public static Color toProto(java.awt.Color color) {
16065 # float red = (float) color.getRed();
16066 # float green = (float) color.getGreen();
16067 # float blue = (float) color.getBlue();
16068 # float denominator = 255.0;
16069 # Color.Builder resultBuilder =
16070 # Color
16071 # .newBuilder()
16072 # .setRed(red / denominator)
16073 # .setGreen(green / denominator)
16074 # .setBlue(blue / denominator);
16075 # int alpha = color.getAlpha();
16076 # if (alpha != 255) {
16077 # result.setAlpha(
16078 # FloatValue
16079 # .newBuilder()
16080 # .setValue(((float) alpha) / denominator)
16081 # .build());
16082 # }
16083 # return resultBuilder.build();
16084 # }
16085 # // ...
16086 #
16087 # Example (iOS / Obj-C):
16088 #
16089 # // ...
16090 # static UIColor* fromProto(Color* protocolor) {
16091 # float red = [protocolor red];
16092 # float green = [protocolor green];
16093 # float blue = [protocolor blue];
16094 # FloatValue* alpha_wrapper = [protocolor alpha];
16095 # float alpha = 1.0;
16096 # if (alpha_wrapper != nil) {
16097 # alpha = [alpha_wrapper value];
16098 # }
16099 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16100 # }
16101 #
16102 # static Color* toProto(UIColor* color) {
16103 # CGFloat red, green, blue, alpha;
16104 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16105 # return nil;
16106 # }
16107 # Color* result = [Color alloc] init];
16108 # [result setRed:red];
16109 # [result setGreen:green];
16110 # [result setBlue:blue];
16111 # if (alpha <= 0.9999) {
16112 # [result setAlpha:floatWrapperWithValue(alpha)];
16113 # }
16114 # [result autorelease];
16115 # return result;
16116 # }
16117 # // ...
16118 #
16119 # Example (JavaScript):
16120 #
16121 # // ...
16122 #
16123 # var protoToCssColor = function(rgb_color) {
16124 # var redFrac = rgb_color.red || 0.0;
16125 # var greenFrac = rgb_color.green || 0.0;
16126 # var blueFrac = rgb_color.blue || 0.0;
16127 # var red = Math.floor(redFrac * 255);
16128 # var green = Math.floor(greenFrac * 255);
16129 # var blue = Math.floor(blueFrac * 255);
16130 #
16131 # if (!('alpha' in rgb_color)) {
16132 # return rgbToCssColor_(red, green, blue);
16133 # }
16134 #
16135 # var alphaFrac = rgb_color.alpha.value || 0.0;
16136 # var rgbParams = [red, green, blue].join(',');
16137 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16138 # };
16139 #
16140 # var rgbToCssColor_ = function(red, green, blue) {
16141 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16142 # var hexString = rgbNumber.toString(16);
16143 # var missingZeros = 6 - hexString.length;
16144 # var resultBuilder = ['#'];
16145 # for (var i = 0; i < missingZeros; i++) {
16146 # resultBuilder.push('0');
16147 # }
16148 # resultBuilder.push(hexString);
16149 # return resultBuilder.join('');
16150 # };
16151 #
16152 # // ...
16153 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16154 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16155 # the final pixel color is defined by the equation:
16156 #
16157 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16158 #
16159 # This means that a value of 1.0 corresponds to a solid color, whereas
16160 # a value of 0.0 corresponds to a completely transparent color. This
16161 # uses a wrapper message rather than a simple float scalar so that it is
16162 # possible to distinguish between a default value and the value being unset.
16163 # If omitted, this color object is to be rendered as a solid color
16164 # (as if the alpha value had been explicitly given with a value of 1.0).
16165 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16166 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16167 },
16168 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016169 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016170 "style": "A String", # The style of the border.
16171 },
16172 "left": { # A border along a cell. # The left border of the cell.
16173 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16174 # for simplicity of conversion to/from color representations in various
16175 # languages over compactness; for example, the fields of this representation
16176 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16177 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16178 # method in iOS; and, with just a little work, it can be easily formatted into
16179 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16180 #
16181 # Example (Java):
16182 #
16183 # import com.google.type.Color;
16184 #
16185 # // ...
16186 # public static java.awt.Color fromProto(Color protocolor) {
16187 # float alpha = protocolor.hasAlpha()
16188 # ? protocolor.getAlpha().getValue()
16189 # : 1.0;
16190 #
16191 # return new java.awt.Color(
16192 # protocolor.getRed(),
16193 # protocolor.getGreen(),
16194 # protocolor.getBlue(),
16195 # alpha);
16196 # }
16197 #
16198 # public static Color toProto(java.awt.Color color) {
16199 # float red = (float) color.getRed();
16200 # float green = (float) color.getGreen();
16201 # float blue = (float) color.getBlue();
16202 # float denominator = 255.0;
16203 # Color.Builder resultBuilder =
16204 # Color
16205 # .newBuilder()
16206 # .setRed(red / denominator)
16207 # .setGreen(green / denominator)
16208 # .setBlue(blue / denominator);
16209 # int alpha = color.getAlpha();
16210 # if (alpha != 255) {
16211 # result.setAlpha(
16212 # FloatValue
16213 # .newBuilder()
16214 # .setValue(((float) alpha) / denominator)
16215 # .build());
16216 # }
16217 # return resultBuilder.build();
16218 # }
16219 # // ...
16220 #
16221 # Example (iOS / Obj-C):
16222 #
16223 # // ...
16224 # static UIColor* fromProto(Color* protocolor) {
16225 # float red = [protocolor red];
16226 # float green = [protocolor green];
16227 # float blue = [protocolor blue];
16228 # FloatValue* alpha_wrapper = [protocolor alpha];
16229 # float alpha = 1.0;
16230 # if (alpha_wrapper != nil) {
16231 # alpha = [alpha_wrapper value];
16232 # }
16233 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16234 # }
16235 #
16236 # static Color* toProto(UIColor* color) {
16237 # CGFloat red, green, blue, alpha;
16238 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16239 # return nil;
16240 # }
16241 # Color* result = [Color alloc] init];
16242 # [result setRed:red];
16243 # [result setGreen:green];
16244 # [result setBlue:blue];
16245 # if (alpha <= 0.9999) {
16246 # [result setAlpha:floatWrapperWithValue(alpha)];
16247 # }
16248 # [result autorelease];
16249 # return result;
16250 # }
16251 # // ...
16252 #
16253 # Example (JavaScript):
16254 #
16255 # // ...
16256 #
16257 # var protoToCssColor = function(rgb_color) {
16258 # var redFrac = rgb_color.red || 0.0;
16259 # var greenFrac = rgb_color.green || 0.0;
16260 # var blueFrac = rgb_color.blue || 0.0;
16261 # var red = Math.floor(redFrac * 255);
16262 # var green = Math.floor(greenFrac * 255);
16263 # var blue = Math.floor(blueFrac * 255);
16264 #
16265 # if (!('alpha' in rgb_color)) {
16266 # return rgbToCssColor_(red, green, blue);
16267 # }
16268 #
16269 # var alphaFrac = rgb_color.alpha.value || 0.0;
16270 # var rgbParams = [red, green, blue].join(',');
16271 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16272 # };
16273 #
16274 # var rgbToCssColor_ = function(red, green, blue) {
16275 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16276 # var hexString = rgbNumber.toString(16);
16277 # var missingZeros = 6 - hexString.length;
16278 # var resultBuilder = ['#'];
16279 # for (var i = 0; i < missingZeros; i++) {
16280 # resultBuilder.push('0');
16281 # }
16282 # resultBuilder.push(hexString);
16283 # return resultBuilder.join('');
16284 # };
16285 #
16286 # // ...
16287 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16288 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16289 # the final pixel color is defined by the equation:
16290 #
16291 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16292 #
16293 # This means that a value of 1.0 corresponds to a solid color, whereas
16294 # a value of 0.0 corresponds to a completely transparent color. This
16295 # uses a wrapper message rather than a simple float scalar so that it is
16296 # possible to distinguish between a default value and the value being unset.
16297 # If omitted, this color object is to be rendered as a solid color
16298 # (as if the alpha value had been explicitly given with a value of 1.0).
16299 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16300 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16301 },
16302 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016303 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016304 "style": "A String", # The style of the border.
16305 },
16306 },
16307 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
16308 },
16309 },
16310 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
16311 # the interpolation points listed. The format of a cell will vary
16312 # based on its contents as compared to the values of the interpolation
16313 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016314 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016315 # These pin the gradient color scale according to the color,
16316 # type and value chosen.
16317 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
16318 # for simplicity of conversion to/from color representations in various
16319 # languages over compactness; for example, the fields of this representation
16320 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16321 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16322 # method in iOS; and, with just a little work, it can be easily formatted into
16323 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16324 #
16325 # Example (Java):
16326 #
16327 # import com.google.type.Color;
16328 #
16329 # // ...
16330 # public static java.awt.Color fromProto(Color protocolor) {
16331 # float alpha = protocolor.hasAlpha()
16332 # ? protocolor.getAlpha().getValue()
16333 # : 1.0;
16334 #
16335 # return new java.awt.Color(
16336 # protocolor.getRed(),
16337 # protocolor.getGreen(),
16338 # protocolor.getBlue(),
16339 # alpha);
16340 # }
16341 #
16342 # public static Color toProto(java.awt.Color color) {
16343 # float red = (float) color.getRed();
16344 # float green = (float) color.getGreen();
16345 # float blue = (float) color.getBlue();
16346 # float denominator = 255.0;
16347 # Color.Builder resultBuilder =
16348 # Color
16349 # .newBuilder()
16350 # .setRed(red / denominator)
16351 # .setGreen(green / denominator)
16352 # .setBlue(blue / denominator);
16353 # int alpha = color.getAlpha();
16354 # if (alpha != 255) {
16355 # result.setAlpha(
16356 # FloatValue
16357 # .newBuilder()
16358 # .setValue(((float) alpha) / denominator)
16359 # .build());
16360 # }
16361 # return resultBuilder.build();
16362 # }
16363 # // ...
16364 #
16365 # Example (iOS / Obj-C):
16366 #
16367 # // ...
16368 # static UIColor* fromProto(Color* protocolor) {
16369 # float red = [protocolor red];
16370 # float green = [protocolor green];
16371 # float blue = [protocolor blue];
16372 # FloatValue* alpha_wrapper = [protocolor alpha];
16373 # float alpha = 1.0;
16374 # if (alpha_wrapper != nil) {
16375 # alpha = [alpha_wrapper value];
16376 # }
16377 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16378 # }
16379 #
16380 # static Color* toProto(UIColor* color) {
16381 # CGFloat red, green, blue, alpha;
16382 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16383 # return nil;
16384 # }
16385 # Color* result = [Color alloc] init];
16386 # [result setRed:red];
16387 # [result setGreen:green];
16388 # [result setBlue:blue];
16389 # if (alpha <= 0.9999) {
16390 # [result setAlpha:floatWrapperWithValue(alpha)];
16391 # }
16392 # [result autorelease];
16393 # return result;
16394 # }
16395 # // ...
16396 #
16397 # Example (JavaScript):
16398 #
16399 # // ...
16400 #
16401 # var protoToCssColor = function(rgb_color) {
16402 # var redFrac = rgb_color.red || 0.0;
16403 # var greenFrac = rgb_color.green || 0.0;
16404 # var blueFrac = rgb_color.blue || 0.0;
16405 # var red = Math.floor(redFrac * 255);
16406 # var green = Math.floor(greenFrac * 255);
16407 # var blue = Math.floor(blueFrac * 255);
16408 #
16409 # if (!('alpha' in rgb_color)) {
16410 # return rgbToCssColor_(red, green, blue);
16411 # }
16412 #
16413 # var alphaFrac = rgb_color.alpha.value || 0.0;
16414 # var rgbParams = [red, green, blue].join(',');
16415 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16416 # };
16417 #
16418 # var rgbToCssColor_ = function(red, green, blue) {
16419 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16420 # var hexString = rgbNumber.toString(16);
16421 # var missingZeros = 6 - hexString.length;
16422 # var resultBuilder = ['#'];
16423 # for (var i = 0; i < missingZeros; i++) {
16424 # resultBuilder.push('0');
16425 # }
16426 # resultBuilder.push(hexString);
16427 # return resultBuilder.join('');
16428 # };
16429 #
16430 # // ...
16431 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16432 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16433 # the final pixel color is defined by the equation:
16434 #
16435 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16436 #
16437 # This means that a value of 1.0 corresponds to a solid color, whereas
16438 # a value of 0.0 corresponds to a completely transparent color. This
16439 # uses a wrapper message rather than a simple float scalar so that it is
16440 # possible to distinguish between a default value and the value being unset.
16441 # If omitted, this color object is to be rendered as a solid color
16442 # (as if the alpha value had been explicitly given with a value of 1.0).
16443 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16444 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16445 },
16446 "type": "A String", # How the value should be interpreted.
16447 "value": "A String", # The value this interpolation point uses. May be a formula.
16448 # Unused if type is MIN or
16449 # MAX.
16450 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016451 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016452 # These pin the gradient color scale according to the color,
16453 # type and value chosen.
16454 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
16455 # for simplicity of conversion to/from color representations in various
16456 # languages over compactness; for example, the fields of this representation
16457 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16458 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16459 # method in iOS; and, with just a little work, it can be easily formatted into
16460 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16461 #
16462 # Example (Java):
16463 #
16464 # import com.google.type.Color;
16465 #
16466 # // ...
16467 # public static java.awt.Color fromProto(Color protocolor) {
16468 # float alpha = protocolor.hasAlpha()
16469 # ? protocolor.getAlpha().getValue()
16470 # : 1.0;
16471 #
16472 # return new java.awt.Color(
16473 # protocolor.getRed(),
16474 # protocolor.getGreen(),
16475 # protocolor.getBlue(),
16476 # alpha);
16477 # }
16478 #
16479 # public static Color toProto(java.awt.Color color) {
16480 # float red = (float) color.getRed();
16481 # float green = (float) color.getGreen();
16482 # float blue = (float) color.getBlue();
16483 # float denominator = 255.0;
16484 # Color.Builder resultBuilder =
16485 # Color
16486 # .newBuilder()
16487 # .setRed(red / denominator)
16488 # .setGreen(green / denominator)
16489 # .setBlue(blue / denominator);
16490 # int alpha = color.getAlpha();
16491 # if (alpha != 255) {
16492 # result.setAlpha(
16493 # FloatValue
16494 # .newBuilder()
16495 # .setValue(((float) alpha) / denominator)
16496 # .build());
16497 # }
16498 # return resultBuilder.build();
16499 # }
16500 # // ...
16501 #
16502 # Example (iOS / Obj-C):
16503 #
16504 # // ...
16505 # static UIColor* fromProto(Color* protocolor) {
16506 # float red = [protocolor red];
16507 # float green = [protocolor green];
16508 # float blue = [protocolor blue];
16509 # FloatValue* alpha_wrapper = [protocolor alpha];
16510 # float alpha = 1.0;
16511 # if (alpha_wrapper != nil) {
16512 # alpha = [alpha_wrapper value];
16513 # }
16514 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16515 # }
16516 #
16517 # static Color* toProto(UIColor* color) {
16518 # CGFloat red, green, blue, alpha;
16519 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16520 # return nil;
16521 # }
16522 # Color* result = [Color alloc] init];
16523 # [result setRed:red];
16524 # [result setGreen:green];
16525 # [result setBlue:blue];
16526 # if (alpha <= 0.9999) {
16527 # [result setAlpha:floatWrapperWithValue(alpha)];
16528 # }
16529 # [result autorelease];
16530 # return result;
16531 # }
16532 # // ...
16533 #
16534 # Example (JavaScript):
16535 #
16536 # // ...
16537 #
16538 # var protoToCssColor = function(rgb_color) {
16539 # var redFrac = rgb_color.red || 0.0;
16540 # var greenFrac = rgb_color.green || 0.0;
16541 # var blueFrac = rgb_color.blue || 0.0;
16542 # var red = Math.floor(redFrac * 255);
16543 # var green = Math.floor(greenFrac * 255);
16544 # var blue = Math.floor(blueFrac * 255);
16545 #
16546 # if (!('alpha' in rgb_color)) {
16547 # return rgbToCssColor_(red, green, blue);
16548 # }
16549 #
16550 # var alphaFrac = rgb_color.alpha.value || 0.0;
16551 # var rgbParams = [red, green, blue].join(',');
16552 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16553 # };
16554 #
16555 # var rgbToCssColor_ = function(red, green, blue) {
16556 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16557 # var hexString = rgbNumber.toString(16);
16558 # var missingZeros = 6 - hexString.length;
16559 # var resultBuilder = ['#'];
16560 # for (var i = 0; i < missingZeros; i++) {
16561 # resultBuilder.push('0');
16562 # }
16563 # resultBuilder.push(hexString);
16564 # return resultBuilder.join('');
16565 # };
16566 #
16567 # // ...
16568 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16569 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16570 # the final pixel color is defined by the equation:
16571 #
16572 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16573 #
16574 # This means that a value of 1.0 corresponds to a solid color, whereas
16575 # a value of 0.0 corresponds to a completely transparent color. This
16576 # uses a wrapper message rather than a simple float scalar so that it is
16577 # possible to distinguish between a default value and the value being unset.
16578 # If omitted, this color object is to be rendered as a solid color
16579 # (as if the alpha value had been explicitly given with a value of 1.0).
16580 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16581 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16582 },
16583 "type": "A String", # How the value should be interpreted.
16584 "value": "A String", # The value this interpolation point uses. May be a formula.
16585 # Unused if type is MIN or
16586 # MAX.
16587 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016588 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016589 # These pin the gradient color scale according to the color,
16590 # type and value chosen.
16591 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
16592 # for simplicity of conversion to/from color representations in various
16593 # languages over compactness; for example, the fields of this representation
16594 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16595 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16596 # method in iOS; and, with just a little work, it can be easily formatted into
16597 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16598 #
16599 # Example (Java):
16600 #
16601 # import com.google.type.Color;
16602 #
16603 # // ...
16604 # public static java.awt.Color fromProto(Color protocolor) {
16605 # float alpha = protocolor.hasAlpha()
16606 # ? protocolor.getAlpha().getValue()
16607 # : 1.0;
16608 #
16609 # return new java.awt.Color(
16610 # protocolor.getRed(),
16611 # protocolor.getGreen(),
16612 # protocolor.getBlue(),
16613 # alpha);
16614 # }
16615 #
16616 # public static Color toProto(java.awt.Color color) {
16617 # float red = (float) color.getRed();
16618 # float green = (float) color.getGreen();
16619 # float blue = (float) color.getBlue();
16620 # float denominator = 255.0;
16621 # Color.Builder resultBuilder =
16622 # Color
16623 # .newBuilder()
16624 # .setRed(red / denominator)
16625 # .setGreen(green / denominator)
16626 # .setBlue(blue / denominator);
16627 # int alpha = color.getAlpha();
16628 # if (alpha != 255) {
16629 # result.setAlpha(
16630 # FloatValue
16631 # .newBuilder()
16632 # .setValue(((float) alpha) / denominator)
16633 # .build());
16634 # }
16635 # return resultBuilder.build();
16636 # }
16637 # // ...
16638 #
16639 # Example (iOS / Obj-C):
16640 #
16641 # // ...
16642 # static UIColor* fromProto(Color* protocolor) {
16643 # float red = [protocolor red];
16644 # float green = [protocolor green];
16645 # float blue = [protocolor blue];
16646 # FloatValue* alpha_wrapper = [protocolor alpha];
16647 # float alpha = 1.0;
16648 # if (alpha_wrapper != nil) {
16649 # alpha = [alpha_wrapper value];
16650 # }
16651 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16652 # }
16653 #
16654 # static Color* toProto(UIColor* color) {
16655 # CGFloat red, green, blue, alpha;
16656 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16657 # return nil;
16658 # }
16659 # Color* result = [Color alloc] init];
16660 # [result setRed:red];
16661 # [result setGreen:green];
16662 # [result setBlue:blue];
16663 # if (alpha <= 0.9999) {
16664 # [result setAlpha:floatWrapperWithValue(alpha)];
16665 # }
16666 # [result autorelease];
16667 # return result;
16668 # }
16669 # // ...
16670 #
16671 # Example (JavaScript):
16672 #
16673 # // ...
16674 #
16675 # var protoToCssColor = function(rgb_color) {
16676 # var redFrac = rgb_color.red || 0.0;
16677 # var greenFrac = rgb_color.green || 0.0;
16678 # var blueFrac = rgb_color.blue || 0.0;
16679 # var red = Math.floor(redFrac * 255);
16680 # var green = Math.floor(greenFrac * 255);
16681 # var blue = Math.floor(blueFrac * 255);
16682 #
16683 # if (!('alpha' in rgb_color)) {
16684 # return rgbToCssColor_(red, green, blue);
16685 # }
16686 #
16687 # var alphaFrac = rgb_color.alpha.value || 0.0;
16688 # var rgbParams = [red, green, blue].join(',');
16689 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16690 # };
16691 #
16692 # var rgbToCssColor_ = function(red, green, blue) {
16693 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16694 # var hexString = rgbNumber.toString(16);
16695 # var missingZeros = 6 - hexString.length;
16696 # var resultBuilder = ['#'];
16697 # for (var i = 0; i < missingZeros; i++) {
16698 # resultBuilder.push('0');
16699 # }
16700 # resultBuilder.push(hexString);
16701 # return resultBuilder.join('');
16702 # };
16703 #
16704 # // ...
16705 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16706 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16707 # the final pixel color is defined by the equation:
16708 #
16709 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16710 #
16711 # This means that a value of 1.0 corresponds to a solid color, whereas
16712 # a value of 0.0 corresponds to a completely transparent color. This
16713 # uses a wrapper message rather than a simple float scalar so that it is
16714 # possible to distinguish between a default value and the value being unset.
16715 # If omitted, this color object is to be rendered as a solid color
16716 # (as if the alpha value had been explicitly given with a value of 1.0).
16717 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16718 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16719 },
16720 "type": "A String", # How the value should be interpreted.
16721 "value": "A String", # The value this interpolation point uses. May be a formula.
16722 # Unused if type is MIN or
16723 # MAX.
16724 },
16725 },
16726 },
16727 },
16728 "addSheet": { # The result of adding a sheet. # A reply from adding a sheet.
16729 "properties": { # Properties of a sheet. # The properties of the newly added sheet.
16730 "sheetType": "A String", # The type of sheet. Defaults to GRID.
16731 # This field cannot be changed once set.
16732 "index": 42, # The index of the sheet within the spreadsheet.
16733 # When adding or updating sheet properties, if this field
16734 # is excluded then the sheet will be added or moved to the end
16735 # of the sheet list.
16736 "title": "A String", # The name of the sheet.
16737 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
16738 # (If the sheet is an object sheet, containing a chart or image, then
16739 # this field will be absent.)
16740 # When writing it is an error to set any grid properties on non-grid sheets.
16741 "columnCount": 42, # The number of columns in the grid.
16742 "rowCount": 42, # The number of rows in the grid.
16743 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
16744 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
16745 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
16746 },
16747 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
16748 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
16749 # for simplicity of conversion to/from color representations in various
16750 # languages over compactness; for example, the fields of this representation
16751 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16752 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16753 # method in iOS; and, with just a little work, it can be easily formatted into
16754 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16755 #
16756 # Example (Java):
16757 #
16758 # import com.google.type.Color;
16759 #
16760 # // ...
16761 # public static java.awt.Color fromProto(Color protocolor) {
16762 # float alpha = protocolor.hasAlpha()
16763 # ? protocolor.getAlpha().getValue()
16764 # : 1.0;
16765 #
16766 # return new java.awt.Color(
16767 # protocolor.getRed(),
16768 # protocolor.getGreen(),
16769 # protocolor.getBlue(),
16770 # alpha);
16771 # }
16772 #
16773 # public static Color toProto(java.awt.Color color) {
16774 # float red = (float) color.getRed();
16775 # float green = (float) color.getGreen();
16776 # float blue = (float) color.getBlue();
16777 # float denominator = 255.0;
16778 # Color.Builder resultBuilder =
16779 # Color
16780 # .newBuilder()
16781 # .setRed(red / denominator)
16782 # .setGreen(green / denominator)
16783 # .setBlue(blue / denominator);
16784 # int alpha = color.getAlpha();
16785 # if (alpha != 255) {
16786 # result.setAlpha(
16787 # FloatValue
16788 # .newBuilder()
16789 # .setValue(((float) alpha) / denominator)
16790 # .build());
16791 # }
16792 # return resultBuilder.build();
16793 # }
16794 # // ...
16795 #
16796 # Example (iOS / Obj-C):
16797 #
16798 # // ...
16799 # static UIColor* fromProto(Color* protocolor) {
16800 # float red = [protocolor red];
16801 # float green = [protocolor green];
16802 # float blue = [protocolor blue];
16803 # FloatValue* alpha_wrapper = [protocolor alpha];
16804 # float alpha = 1.0;
16805 # if (alpha_wrapper != nil) {
16806 # alpha = [alpha_wrapper value];
16807 # }
16808 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16809 # }
16810 #
16811 # static Color* toProto(UIColor* color) {
16812 # CGFloat red, green, blue, alpha;
16813 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16814 # return nil;
16815 # }
16816 # Color* result = [Color alloc] init];
16817 # [result setRed:red];
16818 # [result setGreen:green];
16819 # [result setBlue:blue];
16820 # if (alpha <= 0.9999) {
16821 # [result setAlpha:floatWrapperWithValue(alpha)];
16822 # }
16823 # [result autorelease];
16824 # return result;
16825 # }
16826 # // ...
16827 #
16828 # Example (JavaScript):
16829 #
16830 # // ...
16831 #
16832 # var protoToCssColor = function(rgb_color) {
16833 # var redFrac = rgb_color.red || 0.0;
16834 # var greenFrac = rgb_color.green || 0.0;
16835 # var blueFrac = rgb_color.blue || 0.0;
16836 # var red = Math.floor(redFrac * 255);
16837 # var green = Math.floor(greenFrac * 255);
16838 # var blue = Math.floor(blueFrac * 255);
16839 #
16840 # if (!('alpha' in rgb_color)) {
16841 # return rgbToCssColor_(red, green, blue);
16842 # }
16843 #
16844 # var alphaFrac = rgb_color.alpha.value || 0.0;
16845 # var rgbParams = [red, green, blue].join(',');
16846 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16847 # };
16848 #
16849 # var rgbToCssColor_ = function(red, green, blue) {
16850 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16851 # var hexString = rgbNumber.toString(16);
16852 # var missingZeros = 6 - hexString.length;
16853 # var resultBuilder = ['#'];
16854 # for (var i = 0; i < missingZeros; i++) {
16855 # resultBuilder.push('0');
16856 # }
16857 # resultBuilder.push(hexString);
16858 # return resultBuilder.join('');
16859 # };
16860 #
16861 # // ...
16862 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16863 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16864 # the final pixel color is defined by the equation:
16865 #
16866 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16867 #
16868 # This means that a value of 1.0 corresponds to a solid color, whereas
16869 # a value of 0.0 corresponds to a completely transparent color. This
16870 # uses a wrapper message rather than a simple float scalar so that it is
16871 # possible to distinguish between a default value and the value being unset.
16872 # If omitted, this color object is to be rendered as a solid color
16873 # (as if the alpha value had been explicitly given with a value of 1.0).
16874 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16875 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16876 },
16877 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
16878 "sheetId": 42, # The ID of the sheet. Must be non-negative.
16879 # This field cannot be changed once set.
16880 },
16881 },
16882 "findReplace": { # The result of the find/replace. # A reply from doing a find/replace.
16883 "occurrencesChanged": 42, # The number of occurrences (possibly multiple within a cell) changed.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016884 # For example, if replacing `"e"` with `"o"` in `"Google Sheets"`, this would
16885 # be `"3"` because `"Google Sheets"` -> `"Googlo Shoots"`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016886 "sheetsChanged": 42, # The number of sheets changed.
16887 "rowsChanged": 42, # The number of rows changed.
16888 "valuesChanged": 42, # The number of non-formula cells changed.
16889 "formulasChanged": 42, # The number of formula cells changed.
16890 },
16891 "addNamedRange": { # The result of adding a named range. # A reply from adding a named range.
16892 "namedRange": { # A named range. # The named range to add.
16893 "namedRangeId": "A String", # The ID of the named range.
16894 "range": { # A range on a sheet. # The range this represents.
16895 # All indexes are zero-based.
16896 # Indexes are half open, e.g the start index is inclusive
16897 # and the end index is exclusive -- [start_index, end_index).
16898 # Missing indexes indicate the range is unbounded on that side.
16899 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016900 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016901 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016902 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016903 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016904 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016905 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016906 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016907 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016908 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016909 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016910 # `Sheet1!A:B == sheet_id: 0,
16911 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016912 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016913 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016914 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016915 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016916 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016917 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016918 #
16919 # The start index must always be less than or equal to the end index.
16920 # If the start index equals the end index, then the range is empty.
16921 # Empty ranges are typically not meaningful and are usually rendered in the
16922 # UI as `#REF!`.
16923 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
16924 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
16925 "sheetId": 42, # The sheet this range is on.
16926 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
16927 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
16928 },
16929 "name": "A String", # The name of the named range.
16930 },
16931 },
16932 "addProtectedRange": { # The result of adding a new protected range. # A reply from adding a protected range.
16933 "protectedRange": { # A protected range. # The newly added protected range.
16934 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
16935 # Unprotected ranges are only supported on protected sheets.
16936 { # A range on a sheet.
16937 # All indexes are zero-based.
16938 # Indexes are half open, e.g the start index is inclusive
16939 # and the end index is exclusive -- [start_index, end_index).
16940 # Missing indexes indicate the range is unbounded on that side.
16941 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016942 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016943 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016944 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016945 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016946 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016947 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016948 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016949 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016950 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016951 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016952 # `Sheet1!A:B == sheet_id: 0,
16953 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016954 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016955 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016956 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016957 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016958 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016959 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016960 #
16961 # The start index must always be less than or equal to the end index.
16962 # If the start index equals the end index, then the range is empty.
16963 # Empty ranges are typically not meaningful and are usually rendered in the
16964 # UI as `#REF!`.
16965 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
16966 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
16967 "sheetId": 42, # The sheet this range is on.
16968 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
16969 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
16970 },
16971 ],
16972 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
16973 # protected area.
16974 # This field is read-only.
16975 "description": "A String", # The description of this protected range.
16976 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
16977 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016978 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016979 # may be set.
16980 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
16981 # This field is only visible to users with edit access to the protected
16982 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016983 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016984 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
16985 # range. Domain protection is only supported on documents within a domain.
16986 "users": [ # The email addresses of users with edit access to the protected range.
16987 "A String",
16988 ],
16989 "groups": [ # The email addresses of groups with edit access to the protected range.
16990 "A String",
16991 ],
16992 },
16993 "protectedRangeId": 42, # The ID of the protected range.
16994 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016995 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016996 # Warning-based protection means that every user can edit data in the
16997 # protected range, except editing will prompt a warning asking the user
16998 # to confirm the edit.
16999 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017000 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017001 # Additionally, if this field is changed from true to false and the
17002 # `editors` field is not set (nor included in the field mask), then
17003 # the editors will be set to all the editors in the document.
17004 "range": { # A range on a sheet. # The range that is being protected.
17005 # The range may be fully unbounded, in which case this is considered
17006 # a protected sheet.
17007 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017008 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017009 # may be set.
17010 # All indexes are zero-based.
17011 # Indexes are half open, e.g the start index is inclusive
17012 # and the end index is exclusive -- [start_index, end_index).
17013 # Missing indexes indicate the range is unbounded on that side.
17014 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017015 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017016 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017017 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017018 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017019 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017020 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017021 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017022 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017023 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017024 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017025 # `Sheet1!A:B == sheet_id: 0,
17026 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017027 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017028 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017029 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017030 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017031 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017032 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017033 #
17034 # The start index must always be less than or equal to the end index.
17035 # If the start index equals the end index, then the range is empty.
17036 # Empty ranges are typically not meaningful and are usually rendered in the
17037 # UI as `#REF!`.
17038 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
17039 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
17040 "sheetId": 42, # The sheet this range is on.
17041 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
17042 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
17043 },
17044 },
17045 },
17046 "deleteConditionalFormatRule": { # The result of deleting a conditional format rule. # A reply from deleting a conditional format rule.
17047 "rule": { # A rule describing a conditional format. # The rule that was deleted.
17048 "ranges": [ # The ranges that will be formatted if the condition is true.
17049 # All the ranges must be on the same grid.
17050 { # A range on a sheet.
17051 # All indexes are zero-based.
17052 # Indexes are half open, e.g the start index is inclusive
17053 # and the end index is exclusive -- [start_index, end_index).
17054 # Missing indexes indicate the range is unbounded on that side.
17055 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017056 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017057 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017058 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017059 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017060 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017061 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017062 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017063 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017064 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017065 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017066 # `Sheet1!A:B == sheet_id: 0,
17067 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017068 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017069 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017070 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017071 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017072 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017073 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017074 #
17075 # The start index must always be less than or equal to the end index.
17076 # If the start index equals the end index, then the range is empty.
17077 # Empty ranges are typically not meaningful and are usually rendered in the
17078 # UI as `#REF!`.
17079 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
17080 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
17081 "sheetId": 42, # The sheet this range is on.
17082 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
17083 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
17084 },
17085 ],
17086 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
17087 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
17088 # the format will be applied.
17089 # BooleanConditions are used by conditional formatting,
17090 # data validation, and the criteria in filters.
17091 "type": "A String", # The type of condition.
17092 "values": [ # The values of the condition. The number of supported values depends
17093 # on the condition type. Some support zero values,
17094 # others one or two values,
17095 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
17096 { # The value of the condition.
17097 "relativeDate": "A String", # A relative date (based on the current date).
17098 # Valid only if the type is
17099 # DATE_BEFORE,
17100 # DATE_AFTER,
17101 # DATE_ON_OR_BEFORE or
17102 # DATE_ON_OR_AFTER.
17103 #
17104 # Relative dates are not supported in data validation.
17105 # They are supported only in conditional formatting and
17106 # conditional filters.
17107 "userEnteredValue": "A String", # A value the condition is based on.
17108 # The value will be parsed as if the user typed into a cell.
17109 # Formulas are supported (and must begin with an `=`).
17110 },
17111 ],
17112 },
17113 "format": { # The format of a cell. # The format to apply.
17114 # Conditional formatting can only apply a subset of formatting:
17115 # bold, italic,
17116 # strikethrough,
17117 # foreground color &
17118 # background color.
17119 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017120 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
17121 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017122 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017123 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017124 },
17125 "textDirection": "A String", # The direction of the text in the cell.
17126 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
17127 # When updating padding, every field must be specified.
17128 "top": 42, # The top padding of the cell.
17129 "right": 42, # The right padding of the cell.
17130 "bottom": 42, # The bottom padding of the cell.
17131 "left": 42, # The left padding of the cell.
17132 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017133 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017134 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
17135 # for simplicity of conversion to/from color representations in various
17136 # languages over compactness; for example, the fields of this representation
17137 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17138 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17139 # method in iOS; and, with just a little work, it can be easily formatted into
17140 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17141 #
17142 # Example (Java):
17143 #
17144 # import com.google.type.Color;
17145 #
17146 # // ...
17147 # public static java.awt.Color fromProto(Color protocolor) {
17148 # float alpha = protocolor.hasAlpha()
17149 # ? protocolor.getAlpha().getValue()
17150 # : 1.0;
17151 #
17152 # return new java.awt.Color(
17153 # protocolor.getRed(),
17154 # protocolor.getGreen(),
17155 # protocolor.getBlue(),
17156 # alpha);
17157 # }
17158 #
17159 # public static Color toProto(java.awt.Color color) {
17160 # float red = (float) color.getRed();
17161 # float green = (float) color.getGreen();
17162 # float blue = (float) color.getBlue();
17163 # float denominator = 255.0;
17164 # Color.Builder resultBuilder =
17165 # Color
17166 # .newBuilder()
17167 # .setRed(red / denominator)
17168 # .setGreen(green / denominator)
17169 # .setBlue(blue / denominator);
17170 # int alpha = color.getAlpha();
17171 # if (alpha != 255) {
17172 # result.setAlpha(
17173 # FloatValue
17174 # .newBuilder()
17175 # .setValue(((float) alpha) / denominator)
17176 # .build());
17177 # }
17178 # return resultBuilder.build();
17179 # }
17180 # // ...
17181 #
17182 # Example (iOS / Obj-C):
17183 #
17184 # // ...
17185 # static UIColor* fromProto(Color* protocolor) {
17186 # float red = [protocolor red];
17187 # float green = [protocolor green];
17188 # float blue = [protocolor blue];
17189 # FloatValue* alpha_wrapper = [protocolor alpha];
17190 # float alpha = 1.0;
17191 # if (alpha_wrapper != nil) {
17192 # alpha = [alpha_wrapper value];
17193 # }
17194 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17195 # }
17196 #
17197 # static Color* toProto(UIColor* color) {
17198 # CGFloat red, green, blue, alpha;
17199 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17200 # return nil;
17201 # }
17202 # Color* result = [Color alloc] init];
17203 # [result setRed:red];
17204 # [result setGreen:green];
17205 # [result setBlue:blue];
17206 # if (alpha <= 0.9999) {
17207 # [result setAlpha:floatWrapperWithValue(alpha)];
17208 # }
17209 # [result autorelease];
17210 # return result;
17211 # }
17212 # // ...
17213 #
17214 # Example (JavaScript):
17215 #
17216 # // ...
17217 #
17218 # var protoToCssColor = function(rgb_color) {
17219 # var redFrac = rgb_color.red || 0.0;
17220 # var greenFrac = rgb_color.green || 0.0;
17221 # var blueFrac = rgb_color.blue || 0.0;
17222 # var red = Math.floor(redFrac * 255);
17223 # var green = Math.floor(greenFrac * 255);
17224 # var blue = Math.floor(blueFrac * 255);
17225 #
17226 # if (!('alpha' in rgb_color)) {
17227 # return rgbToCssColor_(red, green, blue);
17228 # }
17229 #
17230 # var alphaFrac = rgb_color.alpha.value || 0.0;
17231 # var rgbParams = [red, green, blue].join(',');
17232 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17233 # };
17234 #
17235 # var rgbToCssColor_ = function(red, green, blue) {
17236 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17237 # var hexString = rgbNumber.toString(16);
17238 # var missingZeros = 6 - hexString.length;
17239 # var resultBuilder = ['#'];
17240 # for (var i = 0; i < missingZeros; i++) {
17241 # resultBuilder.push('0');
17242 # }
17243 # resultBuilder.push(hexString);
17244 # return resultBuilder.join('');
17245 # };
17246 #
17247 # // ...
17248 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17249 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17250 # the final pixel color is defined by the equation:
17251 #
17252 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17253 #
17254 # This means that a value of 1.0 corresponds to a solid color, whereas
17255 # a value of 0.0 corresponds to a completely transparent color. This
17256 # uses a wrapper message rather than a simple float scalar so that it is
17257 # possible to distinguish between a default value and the value being unset.
17258 # If omitted, this color object is to be rendered as a solid color
17259 # (as if the alpha value had been explicitly given with a value of 1.0).
17260 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17261 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17262 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017263 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017264 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
17265 # Absent values indicate that the field isn't specified.
17266 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
17267 # for simplicity of conversion to/from color representations in various
17268 # languages over compactness; for example, the fields of this representation
17269 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17270 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17271 # method in iOS; and, with just a little work, it can be easily formatted into
17272 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17273 #
17274 # Example (Java):
17275 #
17276 # import com.google.type.Color;
17277 #
17278 # // ...
17279 # public static java.awt.Color fromProto(Color protocolor) {
17280 # float alpha = protocolor.hasAlpha()
17281 # ? protocolor.getAlpha().getValue()
17282 # : 1.0;
17283 #
17284 # return new java.awt.Color(
17285 # protocolor.getRed(),
17286 # protocolor.getGreen(),
17287 # protocolor.getBlue(),
17288 # alpha);
17289 # }
17290 #
17291 # public static Color toProto(java.awt.Color color) {
17292 # float red = (float) color.getRed();
17293 # float green = (float) color.getGreen();
17294 # float blue = (float) color.getBlue();
17295 # float denominator = 255.0;
17296 # Color.Builder resultBuilder =
17297 # Color
17298 # .newBuilder()
17299 # .setRed(red / denominator)
17300 # .setGreen(green / denominator)
17301 # .setBlue(blue / denominator);
17302 # int alpha = color.getAlpha();
17303 # if (alpha != 255) {
17304 # result.setAlpha(
17305 # FloatValue
17306 # .newBuilder()
17307 # .setValue(((float) alpha) / denominator)
17308 # .build());
17309 # }
17310 # return resultBuilder.build();
17311 # }
17312 # // ...
17313 #
17314 # Example (iOS / Obj-C):
17315 #
17316 # // ...
17317 # static UIColor* fromProto(Color* protocolor) {
17318 # float red = [protocolor red];
17319 # float green = [protocolor green];
17320 # float blue = [protocolor blue];
17321 # FloatValue* alpha_wrapper = [protocolor alpha];
17322 # float alpha = 1.0;
17323 # if (alpha_wrapper != nil) {
17324 # alpha = [alpha_wrapper value];
17325 # }
17326 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17327 # }
17328 #
17329 # static Color* toProto(UIColor* color) {
17330 # CGFloat red, green, blue, alpha;
17331 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17332 # return nil;
17333 # }
17334 # Color* result = [Color alloc] init];
17335 # [result setRed:red];
17336 # [result setGreen:green];
17337 # [result setBlue:blue];
17338 # if (alpha <= 0.9999) {
17339 # [result setAlpha:floatWrapperWithValue(alpha)];
17340 # }
17341 # [result autorelease];
17342 # return result;
17343 # }
17344 # // ...
17345 #
17346 # Example (JavaScript):
17347 #
17348 # // ...
17349 #
17350 # var protoToCssColor = function(rgb_color) {
17351 # var redFrac = rgb_color.red || 0.0;
17352 # var greenFrac = rgb_color.green || 0.0;
17353 # var blueFrac = rgb_color.blue || 0.0;
17354 # var red = Math.floor(redFrac * 255);
17355 # var green = Math.floor(greenFrac * 255);
17356 # var blue = Math.floor(blueFrac * 255);
17357 #
17358 # if (!('alpha' in rgb_color)) {
17359 # return rgbToCssColor_(red, green, blue);
17360 # }
17361 #
17362 # var alphaFrac = rgb_color.alpha.value || 0.0;
17363 # var rgbParams = [red, green, blue].join(',');
17364 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17365 # };
17366 #
17367 # var rgbToCssColor_ = function(red, green, blue) {
17368 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17369 # var hexString = rgbNumber.toString(16);
17370 # var missingZeros = 6 - hexString.length;
17371 # var resultBuilder = ['#'];
17372 # for (var i = 0; i < missingZeros; i++) {
17373 # resultBuilder.push('0');
17374 # }
17375 # resultBuilder.push(hexString);
17376 # return resultBuilder.join('');
17377 # };
17378 #
17379 # // ...
17380 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17381 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17382 # the final pixel color is defined by the equation:
17383 #
17384 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17385 #
17386 # This means that a value of 1.0 corresponds to a solid color, whereas
17387 # a value of 0.0 corresponds to a completely transparent color. This
17388 # uses a wrapper message rather than a simple float scalar so that it is
17389 # possible to distinguish between a default value and the value being unset.
17390 # If omitted, this color object is to be rendered as a solid color
17391 # (as if the alpha value had been explicitly given with a value of 1.0).
17392 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17393 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17394 },
17395 "bold": True or False, # True if the text is bold.
17396 "strikethrough": True or False, # True if the text has a strikethrough.
17397 "fontFamily": "A String", # The font family.
17398 "fontSize": 42, # The size of the font.
17399 "italic": True or False, # True if the text is italicized.
17400 "underline": True or False, # True if the text is underlined.
17401 },
17402 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
17403 "borders": { # The borders of the cell. # The borders of the cell.
17404 "top": { # A border along a cell. # The top border of the cell.
17405 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17406 # for simplicity of conversion to/from color representations in various
17407 # languages over compactness; for example, the fields of this representation
17408 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17409 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17410 # method in iOS; and, with just a little work, it can be easily formatted into
17411 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17412 #
17413 # Example (Java):
17414 #
17415 # import com.google.type.Color;
17416 #
17417 # // ...
17418 # public static java.awt.Color fromProto(Color protocolor) {
17419 # float alpha = protocolor.hasAlpha()
17420 # ? protocolor.getAlpha().getValue()
17421 # : 1.0;
17422 #
17423 # return new java.awt.Color(
17424 # protocolor.getRed(),
17425 # protocolor.getGreen(),
17426 # protocolor.getBlue(),
17427 # alpha);
17428 # }
17429 #
17430 # public static Color toProto(java.awt.Color color) {
17431 # float red = (float) color.getRed();
17432 # float green = (float) color.getGreen();
17433 # float blue = (float) color.getBlue();
17434 # float denominator = 255.0;
17435 # Color.Builder resultBuilder =
17436 # Color
17437 # .newBuilder()
17438 # .setRed(red / denominator)
17439 # .setGreen(green / denominator)
17440 # .setBlue(blue / denominator);
17441 # int alpha = color.getAlpha();
17442 # if (alpha != 255) {
17443 # result.setAlpha(
17444 # FloatValue
17445 # .newBuilder()
17446 # .setValue(((float) alpha) / denominator)
17447 # .build());
17448 # }
17449 # return resultBuilder.build();
17450 # }
17451 # // ...
17452 #
17453 # Example (iOS / Obj-C):
17454 #
17455 # // ...
17456 # static UIColor* fromProto(Color* protocolor) {
17457 # float red = [protocolor red];
17458 # float green = [protocolor green];
17459 # float blue = [protocolor blue];
17460 # FloatValue* alpha_wrapper = [protocolor alpha];
17461 # float alpha = 1.0;
17462 # if (alpha_wrapper != nil) {
17463 # alpha = [alpha_wrapper value];
17464 # }
17465 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17466 # }
17467 #
17468 # static Color* toProto(UIColor* color) {
17469 # CGFloat red, green, blue, alpha;
17470 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17471 # return nil;
17472 # }
17473 # Color* result = [Color alloc] init];
17474 # [result setRed:red];
17475 # [result setGreen:green];
17476 # [result setBlue:blue];
17477 # if (alpha <= 0.9999) {
17478 # [result setAlpha:floatWrapperWithValue(alpha)];
17479 # }
17480 # [result autorelease];
17481 # return result;
17482 # }
17483 # // ...
17484 #
17485 # Example (JavaScript):
17486 #
17487 # // ...
17488 #
17489 # var protoToCssColor = function(rgb_color) {
17490 # var redFrac = rgb_color.red || 0.0;
17491 # var greenFrac = rgb_color.green || 0.0;
17492 # var blueFrac = rgb_color.blue || 0.0;
17493 # var red = Math.floor(redFrac * 255);
17494 # var green = Math.floor(greenFrac * 255);
17495 # var blue = Math.floor(blueFrac * 255);
17496 #
17497 # if (!('alpha' in rgb_color)) {
17498 # return rgbToCssColor_(red, green, blue);
17499 # }
17500 #
17501 # var alphaFrac = rgb_color.alpha.value || 0.0;
17502 # var rgbParams = [red, green, blue].join(',');
17503 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17504 # };
17505 #
17506 # var rgbToCssColor_ = function(red, green, blue) {
17507 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17508 # var hexString = rgbNumber.toString(16);
17509 # var missingZeros = 6 - hexString.length;
17510 # var resultBuilder = ['#'];
17511 # for (var i = 0; i < missingZeros; i++) {
17512 # resultBuilder.push('0');
17513 # }
17514 # resultBuilder.push(hexString);
17515 # return resultBuilder.join('');
17516 # };
17517 #
17518 # // ...
17519 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17520 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17521 # the final pixel color is defined by the equation:
17522 #
17523 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17524 #
17525 # This means that a value of 1.0 corresponds to a solid color, whereas
17526 # a value of 0.0 corresponds to a completely transparent color. This
17527 # uses a wrapper message rather than a simple float scalar so that it is
17528 # possible to distinguish between a default value and the value being unset.
17529 # If omitted, this color object is to be rendered as a solid color
17530 # (as if the alpha value had been explicitly given with a value of 1.0).
17531 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17532 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17533 },
17534 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017535 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017536 "style": "A String", # The style of the border.
17537 },
17538 "right": { # A border along a cell. # The right border of the cell.
17539 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17540 # for simplicity of conversion to/from color representations in various
17541 # languages over compactness; for example, the fields of this representation
17542 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17543 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17544 # method in iOS; and, with just a little work, it can be easily formatted into
17545 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17546 #
17547 # Example (Java):
17548 #
17549 # import com.google.type.Color;
17550 #
17551 # // ...
17552 # public static java.awt.Color fromProto(Color protocolor) {
17553 # float alpha = protocolor.hasAlpha()
17554 # ? protocolor.getAlpha().getValue()
17555 # : 1.0;
17556 #
17557 # return new java.awt.Color(
17558 # protocolor.getRed(),
17559 # protocolor.getGreen(),
17560 # protocolor.getBlue(),
17561 # alpha);
17562 # }
17563 #
17564 # public static Color toProto(java.awt.Color color) {
17565 # float red = (float) color.getRed();
17566 # float green = (float) color.getGreen();
17567 # float blue = (float) color.getBlue();
17568 # float denominator = 255.0;
17569 # Color.Builder resultBuilder =
17570 # Color
17571 # .newBuilder()
17572 # .setRed(red / denominator)
17573 # .setGreen(green / denominator)
17574 # .setBlue(blue / denominator);
17575 # int alpha = color.getAlpha();
17576 # if (alpha != 255) {
17577 # result.setAlpha(
17578 # FloatValue
17579 # .newBuilder()
17580 # .setValue(((float) alpha) / denominator)
17581 # .build());
17582 # }
17583 # return resultBuilder.build();
17584 # }
17585 # // ...
17586 #
17587 # Example (iOS / Obj-C):
17588 #
17589 # // ...
17590 # static UIColor* fromProto(Color* protocolor) {
17591 # float red = [protocolor red];
17592 # float green = [protocolor green];
17593 # float blue = [protocolor blue];
17594 # FloatValue* alpha_wrapper = [protocolor alpha];
17595 # float alpha = 1.0;
17596 # if (alpha_wrapper != nil) {
17597 # alpha = [alpha_wrapper value];
17598 # }
17599 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17600 # }
17601 #
17602 # static Color* toProto(UIColor* color) {
17603 # CGFloat red, green, blue, alpha;
17604 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17605 # return nil;
17606 # }
17607 # Color* result = [Color alloc] init];
17608 # [result setRed:red];
17609 # [result setGreen:green];
17610 # [result setBlue:blue];
17611 # if (alpha <= 0.9999) {
17612 # [result setAlpha:floatWrapperWithValue(alpha)];
17613 # }
17614 # [result autorelease];
17615 # return result;
17616 # }
17617 # // ...
17618 #
17619 # Example (JavaScript):
17620 #
17621 # // ...
17622 #
17623 # var protoToCssColor = function(rgb_color) {
17624 # var redFrac = rgb_color.red || 0.0;
17625 # var greenFrac = rgb_color.green || 0.0;
17626 # var blueFrac = rgb_color.blue || 0.0;
17627 # var red = Math.floor(redFrac * 255);
17628 # var green = Math.floor(greenFrac * 255);
17629 # var blue = Math.floor(blueFrac * 255);
17630 #
17631 # if (!('alpha' in rgb_color)) {
17632 # return rgbToCssColor_(red, green, blue);
17633 # }
17634 #
17635 # var alphaFrac = rgb_color.alpha.value || 0.0;
17636 # var rgbParams = [red, green, blue].join(',');
17637 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17638 # };
17639 #
17640 # var rgbToCssColor_ = function(red, green, blue) {
17641 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17642 # var hexString = rgbNumber.toString(16);
17643 # var missingZeros = 6 - hexString.length;
17644 # var resultBuilder = ['#'];
17645 # for (var i = 0; i < missingZeros; i++) {
17646 # resultBuilder.push('0');
17647 # }
17648 # resultBuilder.push(hexString);
17649 # return resultBuilder.join('');
17650 # };
17651 #
17652 # // ...
17653 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17654 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17655 # the final pixel color is defined by the equation:
17656 #
17657 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17658 #
17659 # This means that a value of 1.0 corresponds to a solid color, whereas
17660 # a value of 0.0 corresponds to a completely transparent color. This
17661 # uses a wrapper message rather than a simple float scalar so that it is
17662 # possible to distinguish between a default value and the value being unset.
17663 # If omitted, this color object is to be rendered as a solid color
17664 # (as if the alpha value had been explicitly given with a value of 1.0).
17665 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17666 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17667 },
17668 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017669 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017670 "style": "A String", # The style of the border.
17671 },
17672 "bottom": { # A border along a cell. # The bottom border of the cell.
17673 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17674 # for simplicity of conversion to/from color representations in various
17675 # languages over compactness; for example, the fields of this representation
17676 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17677 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17678 # method in iOS; and, with just a little work, it can be easily formatted into
17679 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17680 #
17681 # Example (Java):
17682 #
17683 # import com.google.type.Color;
17684 #
17685 # // ...
17686 # public static java.awt.Color fromProto(Color protocolor) {
17687 # float alpha = protocolor.hasAlpha()
17688 # ? protocolor.getAlpha().getValue()
17689 # : 1.0;
17690 #
17691 # return new java.awt.Color(
17692 # protocolor.getRed(),
17693 # protocolor.getGreen(),
17694 # protocolor.getBlue(),
17695 # alpha);
17696 # }
17697 #
17698 # public static Color toProto(java.awt.Color color) {
17699 # float red = (float) color.getRed();
17700 # float green = (float) color.getGreen();
17701 # float blue = (float) color.getBlue();
17702 # float denominator = 255.0;
17703 # Color.Builder resultBuilder =
17704 # Color
17705 # .newBuilder()
17706 # .setRed(red / denominator)
17707 # .setGreen(green / denominator)
17708 # .setBlue(blue / denominator);
17709 # int alpha = color.getAlpha();
17710 # if (alpha != 255) {
17711 # result.setAlpha(
17712 # FloatValue
17713 # .newBuilder()
17714 # .setValue(((float) alpha) / denominator)
17715 # .build());
17716 # }
17717 # return resultBuilder.build();
17718 # }
17719 # // ...
17720 #
17721 # Example (iOS / Obj-C):
17722 #
17723 # // ...
17724 # static UIColor* fromProto(Color* protocolor) {
17725 # float red = [protocolor red];
17726 # float green = [protocolor green];
17727 # float blue = [protocolor blue];
17728 # FloatValue* alpha_wrapper = [protocolor alpha];
17729 # float alpha = 1.0;
17730 # if (alpha_wrapper != nil) {
17731 # alpha = [alpha_wrapper value];
17732 # }
17733 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17734 # }
17735 #
17736 # static Color* toProto(UIColor* color) {
17737 # CGFloat red, green, blue, alpha;
17738 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17739 # return nil;
17740 # }
17741 # Color* result = [Color alloc] init];
17742 # [result setRed:red];
17743 # [result setGreen:green];
17744 # [result setBlue:blue];
17745 # if (alpha <= 0.9999) {
17746 # [result setAlpha:floatWrapperWithValue(alpha)];
17747 # }
17748 # [result autorelease];
17749 # return result;
17750 # }
17751 # // ...
17752 #
17753 # Example (JavaScript):
17754 #
17755 # // ...
17756 #
17757 # var protoToCssColor = function(rgb_color) {
17758 # var redFrac = rgb_color.red || 0.0;
17759 # var greenFrac = rgb_color.green || 0.0;
17760 # var blueFrac = rgb_color.blue || 0.0;
17761 # var red = Math.floor(redFrac * 255);
17762 # var green = Math.floor(greenFrac * 255);
17763 # var blue = Math.floor(blueFrac * 255);
17764 #
17765 # if (!('alpha' in rgb_color)) {
17766 # return rgbToCssColor_(red, green, blue);
17767 # }
17768 #
17769 # var alphaFrac = rgb_color.alpha.value || 0.0;
17770 # var rgbParams = [red, green, blue].join(',');
17771 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17772 # };
17773 #
17774 # var rgbToCssColor_ = function(red, green, blue) {
17775 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17776 # var hexString = rgbNumber.toString(16);
17777 # var missingZeros = 6 - hexString.length;
17778 # var resultBuilder = ['#'];
17779 # for (var i = 0; i < missingZeros; i++) {
17780 # resultBuilder.push('0');
17781 # }
17782 # resultBuilder.push(hexString);
17783 # return resultBuilder.join('');
17784 # };
17785 #
17786 # // ...
17787 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17788 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17789 # the final pixel color is defined by the equation:
17790 #
17791 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17792 #
17793 # This means that a value of 1.0 corresponds to a solid color, whereas
17794 # a value of 0.0 corresponds to a completely transparent color. This
17795 # uses a wrapper message rather than a simple float scalar so that it is
17796 # possible to distinguish between a default value and the value being unset.
17797 # If omitted, this color object is to be rendered as a solid color
17798 # (as if the alpha value had been explicitly given with a value of 1.0).
17799 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17800 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17801 },
17802 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017803 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017804 "style": "A String", # The style of the border.
17805 },
17806 "left": { # A border along a cell. # The left border of the cell.
17807 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17808 # for simplicity of conversion to/from color representations in various
17809 # languages over compactness; for example, the fields of this representation
17810 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17811 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17812 # method in iOS; and, with just a little work, it can be easily formatted into
17813 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17814 #
17815 # Example (Java):
17816 #
17817 # import com.google.type.Color;
17818 #
17819 # // ...
17820 # public static java.awt.Color fromProto(Color protocolor) {
17821 # float alpha = protocolor.hasAlpha()
17822 # ? protocolor.getAlpha().getValue()
17823 # : 1.0;
17824 #
17825 # return new java.awt.Color(
17826 # protocolor.getRed(),
17827 # protocolor.getGreen(),
17828 # protocolor.getBlue(),
17829 # alpha);
17830 # }
17831 #
17832 # public static Color toProto(java.awt.Color color) {
17833 # float red = (float) color.getRed();
17834 # float green = (float) color.getGreen();
17835 # float blue = (float) color.getBlue();
17836 # float denominator = 255.0;
17837 # Color.Builder resultBuilder =
17838 # Color
17839 # .newBuilder()
17840 # .setRed(red / denominator)
17841 # .setGreen(green / denominator)
17842 # .setBlue(blue / denominator);
17843 # int alpha = color.getAlpha();
17844 # if (alpha != 255) {
17845 # result.setAlpha(
17846 # FloatValue
17847 # .newBuilder()
17848 # .setValue(((float) alpha) / denominator)
17849 # .build());
17850 # }
17851 # return resultBuilder.build();
17852 # }
17853 # // ...
17854 #
17855 # Example (iOS / Obj-C):
17856 #
17857 # // ...
17858 # static UIColor* fromProto(Color* protocolor) {
17859 # float red = [protocolor red];
17860 # float green = [protocolor green];
17861 # float blue = [protocolor blue];
17862 # FloatValue* alpha_wrapper = [protocolor alpha];
17863 # float alpha = 1.0;
17864 # if (alpha_wrapper != nil) {
17865 # alpha = [alpha_wrapper value];
17866 # }
17867 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17868 # }
17869 #
17870 # static Color* toProto(UIColor* color) {
17871 # CGFloat red, green, blue, alpha;
17872 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17873 # return nil;
17874 # }
17875 # Color* result = [Color alloc] init];
17876 # [result setRed:red];
17877 # [result setGreen:green];
17878 # [result setBlue:blue];
17879 # if (alpha <= 0.9999) {
17880 # [result setAlpha:floatWrapperWithValue(alpha)];
17881 # }
17882 # [result autorelease];
17883 # return result;
17884 # }
17885 # // ...
17886 #
17887 # Example (JavaScript):
17888 #
17889 # // ...
17890 #
17891 # var protoToCssColor = function(rgb_color) {
17892 # var redFrac = rgb_color.red || 0.0;
17893 # var greenFrac = rgb_color.green || 0.0;
17894 # var blueFrac = rgb_color.blue || 0.0;
17895 # var red = Math.floor(redFrac * 255);
17896 # var green = Math.floor(greenFrac * 255);
17897 # var blue = Math.floor(blueFrac * 255);
17898 #
17899 # if (!('alpha' in rgb_color)) {
17900 # return rgbToCssColor_(red, green, blue);
17901 # }
17902 #
17903 # var alphaFrac = rgb_color.alpha.value || 0.0;
17904 # var rgbParams = [red, green, blue].join(',');
17905 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17906 # };
17907 #
17908 # var rgbToCssColor_ = function(red, green, blue) {
17909 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17910 # var hexString = rgbNumber.toString(16);
17911 # var missingZeros = 6 - hexString.length;
17912 # var resultBuilder = ['#'];
17913 # for (var i = 0; i < missingZeros; i++) {
17914 # resultBuilder.push('0');
17915 # }
17916 # resultBuilder.push(hexString);
17917 # return resultBuilder.join('');
17918 # };
17919 #
17920 # // ...
17921 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17922 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17923 # the final pixel color is defined by the equation:
17924 #
17925 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17926 #
17927 # This means that a value of 1.0 corresponds to a solid color, whereas
17928 # a value of 0.0 corresponds to a completely transparent color. This
17929 # uses a wrapper message rather than a simple float scalar so that it is
17930 # possible to distinguish between a default value and the value being unset.
17931 # If omitted, this color object is to be rendered as a solid color
17932 # (as if the alpha value had been explicitly given with a value of 1.0).
17933 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17934 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17935 },
17936 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017937 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017938 "style": "A String", # The style of the border.
17939 },
17940 },
17941 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
17942 },
17943 },
17944 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
17945 # the interpolation points listed. The format of a cell will vary
17946 # based on its contents as compared to the values of the interpolation
17947 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017948 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017949 # These pin the gradient color scale according to the color,
17950 # type and value chosen.
17951 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
17952 # for simplicity of conversion to/from color representations in various
17953 # languages over compactness; for example, the fields of this representation
17954 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17955 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17956 # method in iOS; and, with just a little work, it can be easily formatted into
17957 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17958 #
17959 # Example (Java):
17960 #
17961 # import com.google.type.Color;
17962 #
17963 # // ...
17964 # public static java.awt.Color fromProto(Color protocolor) {
17965 # float alpha = protocolor.hasAlpha()
17966 # ? protocolor.getAlpha().getValue()
17967 # : 1.0;
17968 #
17969 # return new java.awt.Color(
17970 # protocolor.getRed(),
17971 # protocolor.getGreen(),
17972 # protocolor.getBlue(),
17973 # alpha);
17974 # }
17975 #
17976 # public static Color toProto(java.awt.Color color) {
17977 # float red = (float) color.getRed();
17978 # float green = (float) color.getGreen();
17979 # float blue = (float) color.getBlue();
17980 # float denominator = 255.0;
17981 # Color.Builder resultBuilder =
17982 # Color
17983 # .newBuilder()
17984 # .setRed(red / denominator)
17985 # .setGreen(green / denominator)
17986 # .setBlue(blue / denominator);
17987 # int alpha = color.getAlpha();
17988 # if (alpha != 255) {
17989 # result.setAlpha(
17990 # FloatValue
17991 # .newBuilder()
17992 # .setValue(((float) alpha) / denominator)
17993 # .build());
17994 # }
17995 # return resultBuilder.build();
17996 # }
17997 # // ...
17998 #
17999 # Example (iOS / Obj-C):
18000 #
18001 # // ...
18002 # static UIColor* fromProto(Color* protocolor) {
18003 # float red = [protocolor red];
18004 # float green = [protocolor green];
18005 # float blue = [protocolor blue];
18006 # FloatValue* alpha_wrapper = [protocolor alpha];
18007 # float alpha = 1.0;
18008 # if (alpha_wrapper != nil) {
18009 # alpha = [alpha_wrapper value];
18010 # }
18011 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18012 # }
18013 #
18014 # static Color* toProto(UIColor* color) {
18015 # CGFloat red, green, blue, alpha;
18016 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18017 # return nil;
18018 # }
18019 # Color* result = [Color alloc] init];
18020 # [result setRed:red];
18021 # [result setGreen:green];
18022 # [result setBlue:blue];
18023 # if (alpha <= 0.9999) {
18024 # [result setAlpha:floatWrapperWithValue(alpha)];
18025 # }
18026 # [result autorelease];
18027 # return result;
18028 # }
18029 # // ...
18030 #
18031 # Example (JavaScript):
18032 #
18033 # // ...
18034 #
18035 # var protoToCssColor = function(rgb_color) {
18036 # var redFrac = rgb_color.red || 0.0;
18037 # var greenFrac = rgb_color.green || 0.0;
18038 # var blueFrac = rgb_color.blue || 0.0;
18039 # var red = Math.floor(redFrac * 255);
18040 # var green = Math.floor(greenFrac * 255);
18041 # var blue = Math.floor(blueFrac * 255);
18042 #
18043 # if (!('alpha' in rgb_color)) {
18044 # return rgbToCssColor_(red, green, blue);
18045 # }
18046 #
18047 # var alphaFrac = rgb_color.alpha.value || 0.0;
18048 # var rgbParams = [red, green, blue].join(',');
18049 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18050 # };
18051 #
18052 # var rgbToCssColor_ = function(red, green, blue) {
18053 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18054 # var hexString = rgbNumber.toString(16);
18055 # var missingZeros = 6 - hexString.length;
18056 # var resultBuilder = ['#'];
18057 # for (var i = 0; i < missingZeros; i++) {
18058 # resultBuilder.push('0');
18059 # }
18060 # resultBuilder.push(hexString);
18061 # return resultBuilder.join('');
18062 # };
18063 #
18064 # // ...
18065 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18066 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18067 # the final pixel color is defined by the equation:
18068 #
18069 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18070 #
18071 # This means that a value of 1.0 corresponds to a solid color, whereas
18072 # a value of 0.0 corresponds to a completely transparent color. This
18073 # uses a wrapper message rather than a simple float scalar so that it is
18074 # possible to distinguish between a default value and the value being unset.
18075 # If omitted, this color object is to be rendered as a solid color
18076 # (as if the alpha value had been explicitly given with a value of 1.0).
18077 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18078 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18079 },
18080 "type": "A String", # How the value should be interpreted.
18081 "value": "A String", # The value this interpolation point uses. May be a formula.
18082 # Unused if type is MIN or
18083 # MAX.
18084 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018085 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018086 # These pin the gradient color scale according to the color,
18087 # type and value chosen.
18088 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
18089 # for simplicity of conversion to/from color representations in various
18090 # languages over compactness; for example, the fields of this representation
18091 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18092 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18093 # method in iOS; and, with just a little work, it can be easily formatted into
18094 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18095 #
18096 # Example (Java):
18097 #
18098 # import com.google.type.Color;
18099 #
18100 # // ...
18101 # public static java.awt.Color fromProto(Color protocolor) {
18102 # float alpha = protocolor.hasAlpha()
18103 # ? protocolor.getAlpha().getValue()
18104 # : 1.0;
18105 #
18106 # return new java.awt.Color(
18107 # protocolor.getRed(),
18108 # protocolor.getGreen(),
18109 # protocolor.getBlue(),
18110 # alpha);
18111 # }
18112 #
18113 # public static Color toProto(java.awt.Color color) {
18114 # float red = (float) color.getRed();
18115 # float green = (float) color.getGreen();
18116 # float blue = (float) color.getBlue();
18117 # float denominator = 255.0;
18118 # Color.Builder resultBuilder =
18119 # Color
18120 # .newBuilder()
18121 # .setRed(red / denominator)
18122 # .setGreen(green / denominator)
18123 # .setBlue(blue / denominator);
18124 # int alpha = color.getAlpha();
18125 # if (alpha != 255) {
18126 # result.setAlpha(
18127 # FloatValue
18128 # .newBuilder()
18129 # .setValue(((float) alpha) / denominator)
18130 # .build());
18131 # }
18132 # return resultBuilder.build();
18133 # }
18134 # // ...
18135 #
18136 # Example (iOS / Obj-C):
18137 #
18138 # // ...
18139 # static UIColor* fromProto(Color* protocolor) {
18140 # float red = [protocolor red];
18141 # float green = [protocolor green];
18142 # float blue = [protocolor blue];
18143 # FloatValue* alpha_wrapper = [protocolor alpha];
18144 # float alpha = 1.0;
18145 # if (alpha_wrapper != nil) {
18146 # alpha = [alpha_wrapper value];
18147 # }
18148 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18149 # }
18150 #
18151 # static Color* toProto(UIColor* color) {
18152 # CGFloat red, green, blue, alpha;
18153 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18154 # return nil;
18155 # }
18156 # Color* result = [Color alloc] init];
18157 # [result setRed:red];
18158 # [result setGreen:green];
18159 # [result setBlue:blue];
18160 # if (alpha <= 0.9999) {
18161 # [result setAlpha:floatWrapperWithValue(alpha)];
18162 # }
18163 # [result autorelease];
18164 # return result;
18165 # }
18166 # // ...
18167 #
18168 # Example (JavaScript):
18169 #
18170 # // ...
18171 #
18172 # var protoToCssColor = function(rgb_color) {
18173 # var redFrac = rgb_color.red || 0.0;
18174 # var greenFrac = rgb_color.green || 0.0;
18175 # var blueFrac = rgb_color.blue || 0.0;
18176 # var red = Math.floor(redFrac * 255);
18177 # var green = Math.floor(greenFrac * 255);
18178 # var blue = Math.floor(blueFrac * 255);
18179 #
18180 # if (!('alpha' in rgb_color)) {
18181 # return rgbToCssColor_(red, green, blue);
18182 # }
18183 #
18184 # var alphaFrac = rgb_color.alpha.value || 0.0;
18185 # var rgbParams = [red, green, blue].join(',');
18186 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18187 # };
18188 #
18189 # var rgbToCssColor_ = function(red, green, blue) {
18190 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18191 # var hexString = rgbNumber.toString(16);
18192 # var missingZeros = 6 - hexString.length;
18193 # var resultBuilder = ['#'];
18194 # for (var i = 0; i < missingZeros; i++) {
18195 # resultBuilder.push('0');
18196 # }
18197 # resultBuilder.push(hexString);
18198 # return resultBuilder.join('');
18199 # };
18200 #
18201 # // ...
18202 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18203 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18204 # the final pixel color is defined by the equation:
18205 #
18206 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18207 #
18208 # This means that a value of 1.0 corresponds to a solid color, whereas
18209 # a value of 0.0 corresponds to a completely transparent color. This
18210 # uses a wrapper message rather than a simple float scalar so that it is
18211 # possible to distinguish between a default value and the value being unset.
18212 # If omitted, this color object is to be rendered as a solid color
18213 # (as if the alpha value had been explicitly given with a value of 1.0).
18214 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18215 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18216 },
18217 "type": "A String", # How the value should be interpreted.
18218 "value": "A String", # The value this interpolation point uses. May be a formula.
18219 # Unused if type is MIN or
18220 # MAX.
18221 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018222 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018223 # These pin the gradient color scale according to the color,
18224 # type and value chosen.
18225 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
18226 # for simplicity of conversion to/from color representations in various
18227 # languages over compactness; for example, the fields of this representation
18228 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18229 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18230 # method in iOS; and, with just a little work, it can be easily formatted into
18231 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18232 #
18233 # Example (Java):
18234 #
18235 # import com.google.type.Color;
18236 #
18237 # // ...
18238 # public static java.awt.Color fromProto(Color protocolor) {
18239 # float alpha = protocolor.hasAlpha()
18240 # ? protocolor.getAlpha().getValue()
18241 # : 1.0;
18242 #
18243 # return new java.awt.Color(
18244 # protocolor.getRed(),
18245 # protocolor.getGreen(),
18246 # protocolor.getBlue(),
18247 # alpha);
18248 # }
18249 #
18250 # public static Color toProto(java.awt.Color color) {
18251 # float red = (float) color.getRed();
18252 # float green = (float) color.getGreen();
18253 # float blue = (float) color.getBlue();
18254 # float denominator = 255.0;
18255 # Color.Builder resultBuilder =
18256 # Color
18257 # .newBuilder()
18258 # .setRed(red / denominator)
18259 # .setGreen(green / denominator)
18260 # .setBlue(blue / denominator);
18261 # int alpha = color.getAlpha();
18262 # if (alpha != 255) {
18263 # result.setAlpha(
18264 # FloatValue
18265 # .newBuilder()
18266 # .setValue(((float) alpha) / denominator)
18267 # .build());
18268 # }
18269 # return resultBuilder.build();
18270 # }
18271 # // ...
18272 #
18273 # Example (iOS / Obj-C):
18274 #
18275 # // ...
18276 # static UIColor* fromProto(Color* protocolor) {
18277 # float red = [protocolor red];
18278 # float green = [protocolor green];
18279 # float blue = [protocolor blue];
18280 # FloatValue* alpha_wrapper = [protocolor alpha];
18281 # float alpha = 1.0;
18282 # if (alpha_wrapper != nil) {
18283 # alpha = [alpha_wrapper value];
18284 # }
18285 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18286 # }
18287 #
18288 # static Color* toProto(UIColor* color) {
18289 # CGFloat red, green, blue, alpha;
18290 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18291 # return nil;
18292 # }
18293 # Color* result = [Color alloc] init];
18294 # [result setRed:red];
18295 # [result setGreen:green];
18296 # [result setBlue:blue];
18297 # if (alpha <= 0.9999) {
18298 # [result setAlpha:floatWrapperWithValue(alpha)];
18299 # }
18300 # [result autorelease];
18301 # return result;
18302 # }
18303 # // ...
18304 #
18305 # Example (JavaScript):
18306 #
18307 # // ...
18308 #
18309 # var protoToCssColor = function(rgb_color) {
18310 # var redFrac = rgb_color.red || 0.0;
18311 # var greenFrac = rgb_color.green || 0.0;
18312 # var blueFrac = rgb_color.blue || 0.0;
18313 # var red = Math.floor(redFrac * 255);
18314 # var green = Math.floor(greenFrac * 255);
18315 # var blue = Math.floor(blueFrac * 255);
18316 #
18317 # if (!('alpha' in rgb_color)) {
18318 # return rgbToCssColor_(red, green, blue);
18319 # }
18320 #
18321 # var alphaFrac = rgb_color.alpha.value || 0.0;
18322 # var rgbParams = [red, green, blue].join(',');
18323 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18324 # };
18325 #
18326 # var rgbToCssColor_ = function(red, green, blue) {
18327 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18328 # var hexString = rgbNumber.toString(16);
18329 # var missingZeros = 6 - hexString.length;
18330 # var resultBuilder = ['#'];
18331 # for (var i = 0; i < missingZeros; i++) {
18332 # resultBuilder.push('0');
18333 # }
18334 # resultBuilder.push(hexString);
18335 # return resultBuilder.join('');
18336 # };
18337 #
18338 # // ...
18339 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18340 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18341 # the final pixel color is defined by the equation:
18342 #
18343 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18344 #
18345 # This means that a value of 1.0 corresponds to a solid color, whereas
18346 # a value of 0.0 corresponds to a completely transparent color. This
18347 # uses a wrapper message rather than a simple float scalar so that it is
18348 # possible to distinguish between a default value and the value being unset.
18349 # If omitted, this color object is to be rendered as a solid color
18350 # (as if the alpha value had been explicitly given with a value of 1.0).
18351 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18352 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18353 },
18354 "type": "A String", # How the value should be interpreted.
18355 "value": "A String", # The value this interpolation point uses. May be a formula.
18356 # Unused if type is MIN or
18357 # MAX.
18358 },
18359 },
18360 },
18361 },
18362 "addFilterView": { # The result of adding a filter view. # A reply from adding a filter view.
18363 "filter": { # A filter view. # The newly added filter view.
18364 "title": "A String", # The name of the filter view.
18365 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
18366 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018367 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018368 # may be set.
18369 "filterViewId": 42, # The ID of the filter view.
18370 "range": { # A range on a sheet. # The range this filter view covers.
18371 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018372 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018373 # may be set.
18374 # All indexes are zero-based.
18375 # Indexes are half open, e.g the start index is inclusive
18376 # and the end index is exclusive -- [start_index, end_index).
18377 # Missing indexes indicate the range is unbounded on that side.
18378 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018379 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018380 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018381 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018382 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018383 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018384 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018385 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018386 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018387 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018388 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018389 # `Sheet1!A:B == sheet_id: 0,
18390 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018391 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018392 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018393 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018394 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018395 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018396 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018397 #
18398 # The start index must always be less than or equal to the end index.
18399 # If the start index equals the end index, then the range is empty.
18400 # Empty ranges are typically not meaningful and are usually rendered in the
18401 # UI as `#REF!`.
18402 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
18403 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
18404 "sheetId": 42, # The sheet this range is on.
18405 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
18406 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
18407 },
18408 "sortSpecs": [ # The sort order per column. Later specifications are used when values
18409 # are equal in the earlier specifications.
18410 { # A sort order associated with a specific column or row.
18411 "sortOrder": "A String", # The order data should be sorted.
18412 "dimensionIndex": 42, # The dimension the sort should be applied to.
18413 },
18414 ],
18415 "criteria": { # The criteria for showing/hiding values per column.
18416 # The map's key is the column index, and the value is the criteria for
18417 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018418 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018419 "hiddenValues": [ # Values that should be hidden.
18420 "A String",
18421 ],
18422 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
18423 # (This does not override hiddenValues -- if a value is listed there,
18424 # it will still be hidden.)
18425 # BooleanConditions are used by conditional formatting,
18426 # data validation, and the criteria in filters.
18427 "type": "A String", # The type of condition.
18428 "values": [ # The values of the condition. The number of supported values depends
18429 # on the condition type. Some support zero values,
18430 # others one or two values,
18431 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
18432 { # The value of the condition.
18433 "relativeDate": "A String", # A relative date (based on the current date).
18434 # Valid only if the type is
18435 # DATE_BEFORE,
18436 # DATE_AFTER,
18437 # DATE_ON_OR_BEFORE or
18438 # DATE_ON_OR_AFTER.
18439 #
18440 # Relative dates are not supported in data validation.
18441 # They are supported only in conditional formatting and
18442 # conditional filters.
18443 "userEnteredValue": "A String", # A value the condition is based on.
18444 # The value will be parsed as if the user typed into a cell.
18445 # Formulas are supported (and must begin with an `=`).
18446 },
18447 ],
18448 },
18449 },
18450 },
18451 },
18452 },
18453 },
18454 ],
18455 }</pre>
18456</div>
18457
18458<div class="method">
18459 <code class="details" id="create">create(body, x__xgafv=None)</code>
18460 <pre>Creates a spreadsheet, returning the newly created spreadsheet.
18461
18462Args:
18463 body: object, The request body. (required)
18464 The object takes the form of:
18465
18466{ # Resource that represents a spreadsheet.
18467 "spreadsheetId": "A String", # The ID of the spreadsheet.
18468 # This field is read-only.
18469 "namedRanges": [ # The named ranges defined in a spreadsheet.
18470 { # A named range.
18471 "namedRangeId": "A String", # The ID of the named range.
18472 "range": { # A range on a sheet. # The range this represents.
18473 # All indexes are zero-based.
18474 # Indexes are half open, e.g the start index is inclusive
18475 # and the end index is exclusive -- [start_index, end_index).
18476 # Missing indexes indicate the range is unbounded on that side.
18477 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018478 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018479 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018480 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018481 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018482 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018483 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018484 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018485 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018486 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018487 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018488 # `Sheet1!A:B == sheet_id: 0,
18489 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018490 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018491 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018492 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018493 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018494 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018495 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018496 #
18497 # The start index must always be less than or equal to the end index.
18498 # If the start index equals the end index, then the range is empty.
18499 # Empty ranges are typically not meaningful and are usually rendered in the
18500 # UI as `#REF!`.
18501 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
18502 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
18503 "sheetId": 42, # The sheet this range is on.
18504 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
18505 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
18506 },
18507 "name": "A String", # The name of the named range.
18508 },
18509 ],
18510 "properties": { # Properties of a spreadsheet. # Overall properties of a spreadsheet.
18511 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018512 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018513 # * an ISO 639-1 language code such as `en`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018514 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018515 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018516 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018517 # * a combination of the ISO language code and country code, such as `en_US`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018518 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018519 # Note: when updating this field, not all locales/languages are supported.
18520 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
18521 # `America/New_York`. If the time zone isn't recognized, this may
18522 # be a custom time zone such as `GMT-07:00`.
18523 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
18524 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018525 # CellData.effectiveFormat will not be set if the
18526 # cell's format is equal to this default format.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018527 # This field is read-only.
18528 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018529 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
18530 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018531 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018532 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018533 },
18534 "textDirection": "A String", # The direction of the text in the cell.
18535 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
18536 # When updating padding, every field must be specified.
18537 "top": 42, # The top padding of the cell.
18538 "right": 42, # The right padding of the cell.
18539 "bottom": 42, # The bottom padding of the cell.
18540 "left": 42, # The left padding of the cell.
18541 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018542 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018543 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
18544 # for simplicity of conversion to/from color representations in various
18545 # languages over compactness; for example, the fields of this representation
18546 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18547 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18548 # method in iOS; and, with just a little work, it can be easily formatted into
18549 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18550 #
18551 # Example (Java):
18552 #
18553 # import com.google.type.Color;
18554 #
18555 # // ...
18556 # public static java.awt.Color fromProto(Color protocolor) {
18557 # float alpha = protocolor.hasAlpha()
18558 # ? protocolor.getAlpha().getValue()
18559 # : 1.0;
18560 #
18561 # return new java.awt.Color(
18562 # protocolor.getRed(),
18563 # protocolor.getGreen(),
18564 # protocolor.getBlue(),
18565 # alpha);
18566 # }
18567 #
18568 # public static Color toProto(java.awt.Color color) {
18569 # float red = (float) color.getRed();
18570 # float green = (float) color.getGreen();
18571 # float blue = (float) color.getBlue();
18572 # float denominator = 255.0;
18573 # Color.Builder resultBuilder =
18574 # Color
18575 # .newBuilder()
18576 # .setRed(red / denominator)
18577 # .setGreen(green / denominator)
18578 # .setBlue(blue / denominator);
18579 # int alpha = color.getAlpha();
18580 # if (alpha != 255) {
18581 # result.setAlpha(
18582 # FloatValue
18583 # .newBuilder()
18584 # .setValue(((float) alpha) / denominator)
18585 # .build());
18586 # }
18587 # return resultBuilder.build();
18588 # }
18589 # // ...
18590 #
18591 # Example (iOS / Obj-C):
18592 #
18593 # // ...
18594 # static UIColor* fromProto(Color* protocolor) {
18595 # float red = [protocolor red];
18596 # float green = [protocolor green];
18597 # float blue = [protocolor blue];
18598 # FloatValue* alpha_wrapper = [protocolor alpha];
18599 # float alpha = 1.0;
18600 # if (alpha_wrapper != nil) {
18601 # alpha = [alpha_wrapper value];
18602 # }
18603 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18604 # }
18605 #
18606 # static Color* toProto(UIColor* color) {
18607 # CGFloat red, green, blue, alpha;
18608 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18609 # return nil;
18610 # }
18611 # Color* result = [Color alloc] init];
18612 # [result setRed:red];
18613 # [result setGreen:green];
18614 # [result setBlue:blue];
18615 # if (alpha <= 0.9999) {
18616 # [result setAlpha:floatWrapperWithValue(alpha)];
18617 # }
18618 # [result autorelease];
18619 # return result;
18620 # }
18621 # // ...
18622 #
18623 # Example (JavaScript):
18624 #
18625 # // ...
18626 #
18627 # var protoToCssColor = function(rgb_color) {
18628 # var redFrac = rgb_color.red || 0.0;
18629 # var greenFrac = rgb_color.green || 0.0;
18630 # var blueFrac = rgb_color.blue || 0.0;
18631 # var red = Math.floor(redFrac * 255);
18632 # var green = Math.floor(greenFrac * 255);
18633 # var blue = Math.floor(blueFrac * 255);
18634 #
18635 # if (!('alpha' in rgb_color)) {
18636 # return rgbToCssColor_(red, green, blue);
18637 # }
18638 #
18639 # var alphaFrac = rgb_color.alpha.value || 0.0;
18640 # var rgbParams = [red, green, blue].join(',');
18641 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18642 # };
18643 #
18644 # var rgbToCssColor_ = function(red, green, blue) {
18645 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18646 # var hexString = rgbNumber.toString(16);
18647 # var missingZeros = 6 - hexString.length;
18648 # var resultBuilder = ['#'];
18649 # for (var i = 0; i < missingZeros; i++) {
18650 # resultBuilder.push('0');
18651 # }
18652 # resultBuilder.push(hexString);
18653 # return resultBuilder.join('');
18654 # };
18655 #
18656 # // ...
18657 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18658 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18659 # the final pixel color is defined by the equation:
18660 #
18661 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18662 #
18663 # This means that a value of 1.0 corresponds to a solid color, whereas
18664 # a value of 0.0 corresponds to a completely transparent color. This
18665 # uses a wrapper message rather than a simple float scalar so that it is
18666 # possible to distinguish between a default value and the value being unset.
18667 # If omitted, this color object is to be rendered as a solid color
18668 # (as if the alpha value had been explicitly given with a value of 1.0).
18669 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18670 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18671 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018672 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018673 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
18674 # Absent values indicate that the field isn't specified.
18675 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
18676 # for simplicity of conversion to/from color representations in various
18677 # languages over compactness; for example, the fields of this representation
18678 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18679 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18680 # method in iOS; and, with just a little work, it can be easily formatted into
18681 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18682 #
18683 # Example (Java):
18684 #
18685 # import com.google.type.Color;
18686 #
18687 # // ...
18688 # public static java.awt.Color fromProto(Color protocolor) {
18689 # float alpha = protocolor.hasAlpha()
18690 # ? protocolor.getAlpha().getValue()
18691 # : 1.0;
18692 #
18693 # return new java.awt.Color(
18694 # protocolor.getRed(),
18695 # protocolor.getGreen(),
18696 # protocolor.getBlue(),
18697 # alpha);
18698 # }
18699 #
18700 # public static Color toProto(java.awt.Color color) {
18701 # float red = (float) color.getRed();
18702 # float green = (float) color.getGreen();
18703 # float blue = (float) color.getBlue();
18704 # float denominator = 255.0;
18705 # Color.Builder resultBuilder =
18706 # Color
18707 # .newBuilder()
18708 # .setRed(red / denominator)
18709 # .setGreen(green / denominator)
18710 # .setBlue(blue / denominator);
18711 # int alpha = color.getAlpha();
18712 # if (alpha != 255) {
18713 # result.setAlpha(
18714 # FloatValue
18715 # .newBuilder()
18716 # .setValue(((float) alpha) / denominator)
18717 # .build());
18718 # }
18719 # return resultBuilder.build();
18720 # }
18721 # // ...
18722 #
18723 # Example (iOS / Obj-C):
18724 #
18725 # // ...
18726 # static UIColor* fromProto(Color* protocolor) {
18727 # float red = [protocolor red];
18728 # float green = [protocolor green];
18729 # float blue = [protocolor blue];
18730 # FloatValue* alpha_wrapper = [protocolor alpha];
18731 # float alpha = 1.0;
18732 # if (alpha_wrapper != nil) {
18733 # alpha = [alpha_wrapper value];
18734 # }
18735 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18736 # }
18737 #
18738 # static Color* toProto(UIColor* color) {
18739 # CGFloat red, green, blue, alpha;
18740 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18741 # return nil;
18742 # }
18743 # Color* result = [Color alloc] init];
18744 # [result setRed:red];
18745 # [result setGreen:green];
18746 # [result setBlue:blue];
18747 # if (alpha <= 0.9999) {
18748 # [result setAlpha:floatWrapperWithValue(alpha)];
18749 # }
18750 # [result autorelease];
18751 # return result;
18752 # }
18753 # // ...
18754 #
18755 # Example (JavaScript):
18756 #
18757 # // ...
18758 #
18759 # var protoToCssColor = function(rgb_color) {
18760 # var redFrac = rgb_color.red || 0.0;
18761 # var greenFrac = rgb_color.green || 0.0;
18762 # var blueFrac = rgb_color.blue || 0.0;
18763 # var red = Math.floor(redFrac * 255);
18764 # var green = Math.floor(greenFrac * 255);
18765 # var blue = Math.floor(blueFrac * 255);
18766 #
18767 # if (!('alpha' in rgb_color)) {
18768 # return rgbToCssColor_(red, green, blue);
18769 # }
18770 #
18771 # var alphaFrac = rgb_color.alpha.value || 0.0;
18772 # var rgbParams = [red, green, blue].join(',');
18773 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18774 # };
18775 #
18776 # var rgbToCssColor_ = function(red, green, blue) {
18777 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18778 # var hexString = rgbNumber.toString(16);
18779 # var missingZeros = 6 - hexString.length;
18780 # var resultBuilder = ['#'];
18781 # for (var i = 0; i < missingZeros; i++) {
18782 # resultBuilder.push('0');
18783 # }
18784 # resultBuilder.push(hexString);
18785 # return resultBuilder.join('');
18786 # };
18787 #
18788 # // ...
18789 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18790 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18791 # the final pixel color is defined by the equation:
18792 #
18793 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18794 #
18795 # This means that a value of 1.0 corresponds to a solid color, whereas
18796 # a value of 0.0 corresponds to a completely transparent color. This
18797 # uses a wrapper message rather than a simple float scalar so that it is
18798 # possible to distinguish between a default value and the value being unset.
18799 # If omitted, this color object is to be rendered as a solid color
18800 # (as if the alpha value had been explicitly given with a value of 1.0).
18801 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18802 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18803 },
18804 "bold": True or False, # True if the text is bold.
18805 "strikethrough": True or False, # True if the text has a strikethrough.
18806 "fontFamily": "A String", # The font family.
18807 "fontSize": 42, # The size of the font.
18808 "italic": True or False, # True if the text is italicized.
18809 "underline": True or False, # True if the text is underlined.
18810 },
18811 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
18812 "borders": { # The borders of the cell. # The borders of the cell.
18813 "top": { # A border along a cell. # The top border of the cell.
18814 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
18815 # for simplicity of conversion to/from color representations in various
18816 # languages over compactness; for example, the fields of this representation
18817 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18818 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18819 # method in iOS; and, with just a little work, it can be easily formatted into
18820 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18821 #
18822 # Example (Java):
18823 #
18824 # import com.google.type.Color;
18825 #
18826 # // ...
18827 # public static java.awt.Color fromProto(Color protocolor) {
18828 # float alpha = protocolor.hasAlpha()
18829 # ? protocolor.getAlpha().getValue()
18830 # : 1.0;
18831 #
18832 # return new java.awt.Color(
18833 # protocolor.getRed(),
18834 # protocolor.getGreen(),
18835 # protocolor.getBlue(),
18836 # alpha);
18837 # }
18838 #
18839 # public static Color toProto(java.awt.Color color) {
18840 # float red = (float) color.getRed();
18841 # float green = (float) color.getGreen();
18842 # float blue = (float) color.getBlue();
18843 # float denominator = 255.0;
18844 # Color.Builder resultBuilder =
18845 # Color
18846 # .newBuilder()
18847 # .setRed(red / denominator)
18848 # .setGreen(green / denominator)
18849 # .setBlue(blue / denominator);
18850 # int alpha = color.getAlpha();
18851 # if (alpha != 255) {
18852 # result.setAlpha(
18853 # FloatValue
18854 # .newBuilder()
18855 # .setValue(((float) alpha) / denominator)
18856 # .build());
18857 # }
18858 # return resultBuilder.build();
18859 # }
18860 # // ...
18861 #
18862 # Example (iOS / Obj-C):
18863 #
18864 # // ...
18865 # static UIColor* fromProto(Color* protocolor) {
18866 # float red = [protocolor red];
18867 # float green = [protocolor green];
18868 # float blue = [protocolor blue];
18869 # FloatValue* alpha_wrapper = [protocolor alpha];
18870 # float alpha = 1.0;
18871 # if (alpha_wrapper != nil) {
18872 # alpha = [alpha_wrapper value];
18873 # }
18874 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18875 # }
18876 #
18877 # static Color* toProto(UIColor* color) {
18878 # CGFloat red, green, blue, alpha;
18879 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18880 # return nil;
18881 # }
18882 # Color* result = [Color alloc] init];
18883 # [result setRed:red];
18884 # [result setGreen:green];
18885 # [result setBlue:blue];
18886 # if (alpha <= 0.9999) {
18887 # [result setAlpha:floatWrapperWithValue(alpha)];
18888 # }
18889 # [result autorelease];
18890 # return result;
18891 # }
18892 # // ...
18893 #
18894 # Example (JavaScript):
18895 #
18896 # // ...
18897 #
18898 # var protoToCssColor = function(rgb_color) {
18899 # var redFrac = rgb_color.red || 0.0;
18900 # var greenFrac = rgb_color.green || 0.0;
18901 # var blueFrac = rgb_color.blue || 0.0;
18902 # var red = Math.floor(redFrac * 255);
18903 # var green = Math.floor(greenFrac * 255);
18904 # var blue = Math.floor(blueFrac * 255);
18905 #
18906 # if (!('alpha' in rgb_color)) {
18907 # return rgbToCssColor_(red, green, blue);
18908 # }
18909 #
18910 # var alphaFrac = rgb_color.alpha.value || 0.0;
18911 # var rgbParams = [red, green, blue].join(',');
18912 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18913 # };
18914 #
18915 # var rgbToCssColor_ = function(red, green, blue) {
18916 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18917 # var hexString = rgbNumber.toString(16);
18918 # var missingZeros = 6 - hexString.length;
18919 # var resultBuilder = ['#'];
18920 # for (var i = 0; i < missingZeros; i++) {
18921 # resultBuilder.push('0');
18922 # }
18923 # resultBuilder.push(hexString);
18924 # return resultBuilder.join('');
18925 # };
18926 #
18927 # // ...
18928 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18929 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18930 # the final pixel color is defined by the equation:
18931 #
18932 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18933 #
18934 # This means that a value of 1.0 corresponds to a solid color, whereas
18935 # a value of 0.0 corresponds to a completely transparent color. This
18936 # uses a wrapper message rather than a simple float scalar so that it is
18937 # possible to distinguish between a default value and the value being unset.
18938 # If omitted, this color object is to be rendered as a solid color
18939 # (as if the alpha value had been explicitly given with a value of 1.0).
18940 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18941 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18942 },
18943 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018944 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018945 "style": "A String", # The style of the border.
18946 },
18947 "right": { # A border along a cell. # The right border of the cell.
18948 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
18949 # for simplicity of conversion to/from color representations in various
18950 # languages over compactness; for example, the fields of this representation
18951 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18952 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18953 # method in iOS; and, with just a little work, it can be easily formatted into
18954 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18955 #
18956 # Example (Java):
18957 #
18958 # import com.google.type.Color;
18959 #
18960 # // ...
18961 # public static java.awt.Color fromProto(Color protocolor) {
18962 # float alpha = protocolor.hasAlpha()
18963 # ? protocolor.getAlpha().getValue()
18964 # : 1.0;
18965 #
18966 # return new java.awt.Color(
18967 # protocolor.getRed(),
18968 # protocolor.getGreen(),
18969 # protocolor.getBlue(),
18970 # alpha);
18971 # }
18972 #
18973 # public static Color toProto(java.awt.Color color) {
18974 # float red = (float) color.getRed();
18975 # float green = (float) color.getGreen();
18976 # float blue = (float) color.getBlue();
18977 # float denominator = 255.0;
18978 # Color.Builder resultBuilder =
18979 # Color
18980 # .newBuilder()
18981 # .setRed(red / denominator)
18982 # .setGreen(green / denominator)
18983 # .setBlue(blue / denominator);
18984 # int alpha = color.getAlpha();
18985 # if (alpha != 255) {
18986 # result.setAlpha(
18987 # FloatValue
18988 # .newBuilder()
18989 # .setValue(((float) alpha) / denominator)
18990 # .build());
18991 # }
18992 # return resultBuilder.build();
18993 # }
18994 # // ...
18995 #
18996 # Example (iOS / Obj-C):
18997 #
18998 # // ...
18999 # static UIColor* fromProto(Color* protocolor) {
19000 # float red = [protocolor red];
19001 # float green = [protocolor green];
19002 # float blue = [protocolor blue];
19003 # FloatValue* alpha_wrapper = [protocolor alpha];
19004 # float alpha = 1.0;
19005 # if (alpha_wrapper != nil) {
19006 # alpha = [alpha_wrapper value];
19007 # }
19008 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19009 # }
19010 #
19011 # static Color* toProto(UIColor* color) {
19012 # CGFloat red, green, blue, alpha;
19013 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19014 # return nil;
19015 # }
19016 # Color* result = [Color alloc] init];
19017 # [result setRed:red];
19018 # [result setGreen:green];
19019 # [result setBlue:blue];
19020 # if (alpha <= 0.9999) {
19021 # [result setAlpha:floatWrapperWithValue(alpha)];
19022 # }
19023 # [result autorelease];
19024 # return result;
19025 # }
19026 # // ...
19027 #
19028 # Example (JavaScript):
19029 #
19030 # // ...
19031 #
19032 # var protoToCssColor = function(rgb_color) {
19033 # var redFrac = rgb_color.red || 0.0;
19034 # var greenFrac = rgb_color.green || 0.0;
19035 # var blueFrac = rgb_color.blue || 0.0;
19036 # var red = Math.floor(redFrac * 255);
19037 # var green = Math.floor(greenFrac * 255);
19038 # var blue = Math.floor(blueFrac * 255);
19039 #
19040 # if (!('alpha' in rgb_color)) {
19041 # return rgbToCssColor_(red, green, blue);
19042 # }
19043 #
19044 # var alphaFrac = rgb_color.alpha.value || 0.0;
19045 # var rgbParams = [red, green, blue].join(',');
19046 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19047 # };
19048 #
19049 # var rgbToCssColor_ = function(red, green, blue) {
19050 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19051 # var hexString = rgbNumber.toString(16);
19052 # var missingZeros = 6 - hexString.length;
19053 # var resultBuilder = ['#'];
19054 # for (var i = 0; i < missingZeros; i++) {
19055 # resultBuilder.push('0');
19056 # }
19057 # resultBuilder.push(hexString);
19058 # return resultBuilder.join('');
19059 # };
19060 #
19061 # // ...
19062 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19063 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19064 # the final pixel color is defined by the equation:
19065 #
19066 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19067 #
19068 # This means that a value of 1.0 corresponds to a solid color, whereas
19069 # a value of 0.0 corresponds to a completely transparent color. This
19070 # uses a wrapper message rather than a simple float scalar so that it is
19071 # possible to distinguish between a default value and the value being unset.
19072 # If omitted, this color object is to be rendered as a solid color
19073 # (as if the alpha value had been explicitly given with a value of 1.0).
19074 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19075 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19076 },
19077 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019078 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019079 "style": "A String", # The style of the border.
19080 },
19081 "bottom": { # A border along a cell. # The bottom border of the cell.
19082 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
19083 # for simplicity of conversion to/from color representations in various
19084 # languages over compactness; for example, the fields of this representation
19085 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19086 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19087 # method in iOS; and, with just a little work, it can be easily formatted into
19088 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19089 #
19090 # Example (Java):
19091 #
19092 # import com.google.type.Color;
19093 #
19094 # // ...
19095 # public static java.awt.Color fromProto(Color protocolor) {
19096 # float alpha = protocolor.hasAlpha()
19097 # ? protocolor.getAlpha().getValue()
19098 # : 1.0;
19099 #
19100 # return new java.awt.Color(
19101 # protocolor.getRed(),
19102 # protocolor.getGreen(),
19103 # protocolor.getBlue(),
19104 # alpha);
19105 # }
19106 #
19107 # public static Color toProto(java.awt.Color color) {
19108 # float red = (float) color.getRed();
19109 # float green = (float) color.getGreen();
19110 # float blue = (float) color.getBlue();
19111 # float denominator = 255.0;
19112 # Color.Builder resultBuilder =
19113 # Color
19114 # .newBuilder()
19115 # .setRed(red / denominator)
19116 # .setGreen(green / denominator)
19117 # .setBlue(blue / denominator);
19118 # int alpha = color.getAlpha();
19119 # if (alpha != 255) {
19120 # result.setAlpha(
19121 # FloatValue
19122 # .newBuilder()
19123 # .setValue(((float) alpha) / denominator)
19124 # .build());
19125 # }
19126 # return resultBuilder.build();
19127 # }
19128 # // ...
19129 #
19130 # Example (iOS / Obj-C):
19131 #
19132 # // ...
19133 # static UIColor* fromProto(Color* protocolor) {
19134 # float red = [protocolor red];
19135 # float green = [protocolor green];
19136 # float blue = [protocolor blue];
19137 # FloatValue* alpha_wrapper = [protocolor alpha];
19138 # float alpha = 1.0;
19139 # if (alpha_wrapper != nil) {
19140 # alpha = [alpha_wrapper value];
19141 # }
19142 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19143 # }
19144 #
19145 # static Color* toProto(UIColor* color) {
19146 # CGFloat red, green, blue, alpha;
19147 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19148 # return nil;
19149 # }
19150 # Color* result = [Color alloc] init];
19151 # [result setRed:red];
19152 # [result setGreen:green];
19153 # [result setBlue:blue];
19154 # if (alpha <= 0.9999) {
19155 # [result setAlpha:floatWrapperWithValue(alpha)];
19156 # }
19157 # [result autorelease];
19158 # return result;
19159 # }
19160 # // ...
19161 #
19162 # Example (JavaScript):
19163 #
19164 # // ...
19165 #
19166 # var protoToCssColor = function(rgb_color) {
19167 # var redFrac = rgb_color.red || 0.0;
19168 # var greenFrac = rgb_color.green || 0.0;
19169 # var blueFrac = rgb_color.blue || 0.0;
19170 # var red = Math.floor(redFrac * 255);
19171 # var green = Math.floor(greenFrac * 255);
19172 # var blue = Math.floor(blueFrac * 255);
19173 #
19174 # if (!('alpha' in rgb_color)) {
19175 # return rgbToCssColor_(red, green, blue);
19176 # }
19177 #
19178 # var alphaFrac = rgb_color.alpha.value || 0.0;
19179 # var rgbParams = [red, green, blue].join(',');
19180 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19181 # };
19182 #
19183 # var rgbToCssColor_ = function(red, green, blue) {
19184 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19185 # var hexString = rgbNumber.toString(16);
19186 # var missingZeros = 6 - hexString.length;
19187 # var resultBuilder = ['#'];
19188 # for (var i = 0; i < missingZeros; i++) {
19189 # resultBuilder.push('0');
19190 # }
19191 # resultBuilder.push(hexString);
19192 # return resultBuilder.join('');
19193 # };
19194 #
19195 # // ...
19196 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19197 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19198 # the final pixel color is defined by the equation:
19199 #
19200 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19201 #
19202 # This means that a value of 1.0 corresponds to a solid color, whereas
19203 # a value of 0.0 corresponds to a completely transparent color. This
19204 # uses a wrapper message rather than a simple float scalar so that it is
19205 # possible to distinguish between a default value and the value being unset.
19206 # If omitted, this color object is to be rendered as a solid color
19207 # (as if the alpha value had been explicitly given with a value of 1.0).
19208 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19209 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19210 },
19211 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019212 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019213 "style": "A String", # The style of the border.
19214 },
19215 "left": { # A border along a cell. # The left border of the cell.
19216 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
19217 # for simplicity of conversion to/from color representations in various
19218 # languages over compactness; for example, the fields of this representation
19219 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19220 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19221 # method in iOS; and, with just a little work, it can be easily formatted into
19222 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19223 #
19224 # Example (Java):
19225 #
19226 # import com.google.type.Color;
19227 #
19228 # // ...
19229 # public static java.awt.Color fromProto(Color protocolor) {
19230 # float alpha = protocolor.hasAlpha()
19231 # ? protocolor.getAlpha().getValue()
19232 # : 1.0;
19233 #
19234 # return new java.awt.Color(
19235 # protocolor.getRed(),
19236 # protocolor.getGreen(),
19237 # protocolor.getBlue(),
19238 # alpha);
19239 # }
19240 #
19241 # public static Color toProto(java.awt.Color color) {
19242 # float red = (float) color.getRed();
19243 # float green = (float) color.getGreen();
19244 # float blue = (float) color.getBlue();
19245 # float denominator = 255.0;
19246 # Color.Builder resultBuilder =
19247 # Color
19248 # .newBuilder()
19249 # .setRed(red / denominator)
19250 # .setGreen(green / denominator)
19251 # .setBlue(blue / denominator);
19252 # int alpha = color.getAlpha();
19253 # if (alpha != 255) {
19254 # result.setAlpha(
19255 # FloatValue
19256 # .newBuilder()
19257 # .setValue(((float) alpha) / denominator)
19258 # .build());
19259 # }
19260 # return resultBuilder.build();
19261 # }
19262 # // ...
19263 #
19264 # Example (iOS / Obj-C):
19265 #
19266 # // ...
19267 # static UIColor* fromProto(Color* protocolor) {
19268 # float red = [protocolor red];
19269 # float green = [protocolor green];
19270 # float blue = [protocolor blue];
19271 # FloatValue* alpha_wrapper = [protocolor alpha];
19272 # float alpha = 1.0;
19273 # if (alpha_wrapper != nil) {
19274 # alpha = [alpha_wrapper value];
19275 # }
19276 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19277 # }
19278 #
19279 # static Color* toProto(UIColor* color) {
19280 # CGFloat red, green, blue, alpha;
19281 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19282 # return nil;
19283 # }
19284 # Color* result = [Color alloc] init];
19285 # [result setRed:red];
19286 # [result setGreen:green];
19287 # [result setBlue:blue];
19288 # if (alpha <= 0.9999) {
19289 # [result setAlpha:floatWrapperWithValue(alpha)];
19290 # }
19291 # [result autorelease];
19292 # return result;
19293 # }
19294 # // ...
19295 #
19296 # Example (JavaScript):
19297 #
19298 # // ...
19299 #
19300 # var protoToCssColor = function(rgb_color) {
19301 # var redFrac = rgb_color.red || 0.0;
19302 # var greenFrac = rgb_color.green || 0.0;
19303 # var blueFrac = rgb_color.blue || 0.0;
19304 # var red = Math.floor(redFrac * 255);
19305 # var green = Math.floor(greenFrac * 255);
19306 # var blue = Math.floor(blueFrac * 255);
19307 #
19308 # if (!('alpha' in rgb_color)) {
19309 # return rgbToCssColor_(red, green, blue);
19310 # }
19311 #
19312 # var alphaFrac = rgb_color.alpha.value || 0.0;
19313 # var rgbParams = [red, green, blue].join(',');
19314 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19315 # };
19316 #
19317 # var rgbToCssColor_ = function(red, green, blue) {
19318 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19319 # var hexString = rgbNumber.toString(16);
19320 # var missingZeros = 6 - hexString.length;
19321 # var resultBuilder = ['#'];
19322 # for (var i = 0; i < missingZeros; i++) {
19323 # resultBuilder.push('0');
19324 # }
19325 # resultBuilder.push(hexString);
19326 # return resultBuilder.join('');
19327 # };
19328 #
19329 # // ...
19330 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19331 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19332 # the final pixel color is defined by the equation:
19333 #
19334 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19335 #
19336 # This means that a value of 1.0 corresponds to a solid color, whereas
19337 # a value of 0.0 corresponds to a completely transparent color. This
19338 # uses a wrapper message rather than a simple float scalar so that it is
19339 # possible to distinguish between a default value and the value being unset.
19340 # If omitted, this color object is to be rendered as a solid color
19341 # (as if the alpha value had been explicitly given with a value of 1.0).
19342 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19343 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19344 },
19345 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019346 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019347 "style": "A String", # The style of the border.
19348 },
19349 },
19350 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
19351 },
19352 "title": "A String", # The title of the spreadsheet.
19353 },
19354 "sheets": [ # The sheets that are part of a spreadsheet.
19355 { # A sheet in a spreadsheet.
19356 "conditionalFormats": [ # The conditional format rules in this sheet.
19357 { # A rule describing a conditional format.
19358 "ranges": [ # The ranges that will be formatted if the condition is true.
19359 # All the ranges must be on the same grid.
19360 { # A range on a sheet.
19361 # All indexes are zero-based.
19362 # Indexes are half open, e.g the start index is inclusive
19363 # and the end index is exclusive -- [start_index, end_index).
19364 # Missing indexes indicate the range is unbounded on that side.
19365 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019366 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019367 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019368 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019369 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019370 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019371 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019372 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019373 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019374 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019375 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019376 # `Sheet1!A:B == sheet_id: 0,
19377 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019378 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019379 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019380 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019381 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019382 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019383 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019384 #
19385 # The start index must always be less than or equal to the end index.
19386 # If the start index equals the end index, then the range is empty.
19387 # Empty ranges are typically not meaningful and are usually rendered in the
19388 # UI as `#REF!`.
19389 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
19390 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
19391 "sheetId": 42, # The sheet this range is on.
19392 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
19393 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
19394 },
19395 ],
19396 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
19397 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
19398 # the format will be applied.
19399 # BooleanConditions are used by conditional formatting,
19400 # data validation, and the criteria in filters.
19401 "type": "A String", # The type of condition.
19402 "values": [ # The values of the condition. The number of supported values depends
19403 # on the condition type. Some support zero values,
19404 # others one or two values,
19405 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
19406 { # The value of the condition.
19407 "relativeDate": "A String", # A relative date (based on the current date).
19408 # Valid only if the type is
19409 # DATE_BEFORE,
19410 # DATE_AFTER,
19411 # DATE_ON_OR_BEFORE or
19412 # DATE_ON_OR_AFTER.
19413 #
19414 # Relative dates are not supported in data validation.
19415 # They are supported only in conditional formatting and
19416 # conditional filters.
19417 "userEnteredValue": "A String", # A value the condition is based on.
19418 # The value will be parsed as if the user typed into a cell.
19419 # Formulas are supported (and must begin with an `=`).
19420 },
19421 ],
19422 },
19423 "format": { # The format of a cell. # The format to apply.
19424 # Conditional formatting can only apply a subset of formatting:
19425 # bold, italic,
19426 # strikethrough,
19427 # foreground color &
19428 # background color.
19429 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019430 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
19431 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019432 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019433 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019434 },
19435 "textDirection": "A String", # The direction of the text in the cell.
19436 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
19437 # When updating padding, every field must be specified.
19438 "top": 42, # The top padding of the cell.
19439 "right": 42, # The right padding of the cell.
19440 "bottom": 42, # The bottom padding of the cell.
19441 "left": 42, # The left padding of the cell.
19442 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019443 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019444 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
19445 # for simplicity of conversion to/from color representations in various
19446 # languages over compactness; for example, the fields of this representation
19447 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19448 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19449 # method in iOS; and, with just a little work, it can be easily formatted into
19450 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19451 #
19452 # Example (Java):
19453 #
19454 # import com.google.type.Color;
19455 #
19456 # // ...
19457 # public static java.awt.Color fromProto(Color protocolor) {
19458 # float alpha = protocolor.hasAlpha()
19459 # ? protocolor.getAlpha().getValue()
19460 # : 1.0;
19461 #
19462 # return new java.awt.Color(
19463 # protocolor.getRed(),
19464 # protocolor.getGreen(),
19465 # protocolor.getBlue(),
19466 # alpha);
19467 # }
19468 #
19469 # public static Color toProto(java.awt.Color color) {
19470 # float red = (float) color.getRed();
19471 # float green = (float) color.getGreen();
19472 # float blue = (float) color.getBlue();
19473 # float denominator = 255.0;
19474 # Color.Builder resultBuilder =
19475 # Color
19476 # .newBuilder()
19477 # .setRed(red / denominator)
19478 # .setGreen(green / denominator)
19479 # .setBlue(blue / denominator);
19480 # int alpha = color.getAlpha();
19481 # if (alpha != 255) {
19482 # result.setAlpha(
19483 # FloatValue
19484 # .newBuilder()
19485 # .setValue(((float) alpha) / denominator)
19486 # .build());
19487 # }
19488 # return resultBuilder.build();
19489 # }
19490 # // ...
19491 #
19492 # Example (iOS / Obj-C):
19493 #
19494 # // ...
19495 # static UIColor* fromProto(Color* protocolor) {
19496 # float red = [protocolor red];
19497 # float green = [protocolor green];
19498 # float blue = [protocolor blue];
19499 # FloatValue* alpha_wrapper = [protocolor alpha];
19500 # float alpha = 1.0;
19501 # if (alpha_wrapper != nil) {
19502 # alpha = [alpha_wrapper value];
19503 # }
19504 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19505 # }
19506 #
19507 # static Color* toProto(UIColor* color) {
19508 # CGFloat red, green, blue, alpha;
19509 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19510 # return nil;
19511 # }
19512 # Color* result = [Color alloc] init];
19513 # [result setRed:red];
19514 # [result setGreen:green];
19515 # [result setBlue:blue];
19516 # if (alpha <= 0.9999) {
19517 # [result setAlpha:floatWrapperWithValue(alpha)];
19518 # }
19519 # [result autorelease];
19520 # return result;
19521 # }
19522 # // ...
19523 #
19524 # Example (JavaScript):
19525 #
19526 # // ...
19527 #
19528 # var protoToCssColor = function(rgb_color) {
19529 # var redFrac = rgb_color.red || 0.0;
19530 # var greenFrac = rgb_color.green || 0.0;
19531 # var blueFrac = rgb_color.blue || 0.0;
19532 # var red = Math.floor(redFrac * 255);
19533 # var green = Math.floor(greenFrac * 255);
19534 # var blue = Math.floor(blueFrac * 255);
19535 #
19536 # if (!('alpha' in rgb_color)) {
19537 # return rgbToCssColor_(red, green, blue);
19538 # }
19539 #
19540 # var alphaFrac = rgb_color.alpha.value || 0.0;
19541 # var rgbParams = [red, green, blue].join(',');
19542 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19543 # };
19544 #
19545 # var rgbToCssColor_ = function(red, green, blue) {
19546 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19547 # var hexString = rgbNumber.toString(16);
19548 # var missingZeros = 6 - hexString.length;
19549 # var resultBuilder = ['#'];
19550 # for (var i = 0; i < missingZeros; i++) {
19551 # resultBuilder.push('0');
19552 # }
19553 # resultBuilder.push(hexString);
19554 # return resultBuilder.join('');
19555 # };
19556 #
19557 # // ...
19558 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19559 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19560 # the final pixel color is defined by the equation:
19561 #
19562 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19563 #
19564 # This means that a value of 1.0 corresponds to a solid color, whereas
19565 # a value of 0.0 corresponds to a completely transparent color. This
19566 # uses a wrapper message rather than a simple float scalar so that it is
19567 # possible to distinguish between a default value and the value being unset.
19568 # If omitted, this color object is to be rendered as a solid color
19569 # (as if the alpha value had been explicitly given with a value of 1.0).
19570 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19571 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19572 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019573 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019574 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
19575 # Absent values indicate that the field isn't specified.
19576 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
19577 # for simplicity of conversion to/from color representations in various
19578 # languages over compactness; for example, the fields of this representation
19579 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19580 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19581 # method in iOS; and, with just a little work, it can be easily formatted into
19582 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19583 #
19584 # Example (Java):
19585 #
19586 # import com.google.type.Color;
19587 #
19588 # // ...
19589 # public static java.awt.Color fromProto(Color protocolor) {
19590 # float alpha = protocolor.hasAlpha()
19591 # ? protocolor.getAlpha().getValue()
19592 # : 1.0;
19593 #
19594 # return new java.awt.Color(
19595 # protocolor.getRed(),
19596 # protocolor.getGreen(),
19597 # protocolor.getBlue(),
19598 # alpha);
19599 # }
19600 #
19601 # public static Color toProto(java.awt.Color color) {
19602 # float red = (float) color.getRed();
19603 # float green = (float) color.getGreen();
19604 # float blue = (float) color.getBlue();
19605 # float denominator = 255.0;
19606 # Color.Builder resultBuilder =
19607 # Color
19608 # .newBuilder()
19609 # .setRed(red / denominator)
19610 # .setGreen(green / denominator)
19611 # .setBlue(blue / denominator);
19612 # int alpha = color.getAlpha();
19613 # if (alpha != 255) {
19614 # result.setAlpha(
19615 # FloatValue
19616 # .newBuilder()
19617 # .setValue(((float) alpha) / denominator)
19618 # .build());
19619 # }
19620 # return resultBuilder.build();
19621 # }
19622 # // ...
19623 #
19624 # Example (iOS / Obj-C):
19625 #
19626 # // ...
19627 # static UIColor* fromProto(Color* protocolor) {
19628 # float red = [protocolor red];
19629 # float green = [protocolor green];
19630 # float blue = [protocolor blue];
19631 # FloatValue* alpha_wrapper = [protocolor alpha];
19632 # float alpha = 1.0;
19633 # if (alpha_wrapper != nil) {
19634 # alpha = [alpha_wrapper value];
19635 # }
19636 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19637 # }
19638 #
19639 # static Color* toProto(UIColor* color) {
19640 # CGFloat red, green, blue, alpha;
19641 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19642 # return nil;
19643 # }
19644 # Color* result = [Color alloc] init];
19645 # [result setRed:red];
19646 # [result setGreen:green];
19647 # [result setBlue:blue];
19648 # if (alpha <= 0.9999) {
19649 # [result setAlpha:floatWrapperWithValue(alpha)];
19650 # }
19651 # [result autorelease];
19652 # return result;
19653 # }
19654 # // ...
19655 #
19656 # Example (JavaScript):
19657 #
19658 # // ...
19659 #
19660 # var protoToCssColor = function(rgb_color) {
19661 # var redFrac = rgb_color.red || 0.0;
19662 # var greenFrac = rgb_color.green || 0.0;
19663 # var blueFrac = rgb_color.blue || 0.0;
19664 # var red = Math.floor(redFrac * 255);
19665 # var green = Math.floor(greenFrac * 255);
19666 # var blue = Math.floor(blueFrac * 255);
19667 #
19668 # if (!('alpha' in rgb_color)) {
19669 # return rgbToCssColor_(red, green, blue);
19670 # }
19671 #
19672 # var alphaFrac = rgb_color.alpha.value || 0.0;
19673 # var rgbParams = [red, green, blue].join(',');
19674 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19675 # };
19676 #
19677 # var rgbToCssColor_ = function(red, green, blue) {
19678 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19679 # var hexString = rgbNumber.toString(16);
19680 # var missingZeros = 6 - hexString.length;
19681 # var resultBuilder = ['#'];
19682 # for (var i = 0; i < missingZeros; i++) {
19683 # resultBuilder.push('0');
19684 # }
19685 # resultBuilder.push(hexString);
19686 # return resultBuilder.join('');
19687 # };
19688 #
19689 # // ...
19690 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19691 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19692 # the final pixel color is defined by the equation:
19693 #
19694 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19695 #
19696 # This means that a value of 1.0 corresponds to a solid color, whereas
19697 # a value of 0.0 corresponds to a completely transparent color. This
19698 # uses a wrapper message rather than a simple float scalar so that it is
19699 # possible to distinguish between a default value and the value being unset.
19700 # If omitted, this color object is to be rendered as a solid color
19701 # (as if the alpha value had been explicitly given with a value of 1.0).
19702 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19703 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19704 },
19705 "bold": True or False, # True if the text is bold.
19706 "strikethrough": True or False, # True if the text has a strikethrough.
19707 "fontFamily": "A String", # The font family.
19708 "fontSize": 42, # The size of the font.
19709 "italic": True or False, # True if the text is italicized.
19710 "underline": True or False, # True if the text is underlined.
19711 },
19712 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
19713 "borders": { # The borders of the cell. # The borders of the cell.
19714 "top": { # A border along a cell. # The top border of the cell.
19715 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
19716 # for simplicity of conversion to/from color representations in various
19717 # languages over compactness; for example, the fields of this representation
19718 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19719 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19720 # method in iOS; and, with just a little work, it can be easily formatted into
19721 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19722 #
19723 # Example (Java):
19724 #
19725 # import com.google.type.Color;
19726 #
19727 # // ...
19728 # public static java.awt.Color fromProto(Color protocolor) {
19729 # float alpha = protocolor.hasAlpha()
19730 # ? protocolor.getAlpha().getValue()
19731 # : 1.0;
19732 #
19733 # return new java.awt.Color(
19734 # protocolor.getRed(),
19735 # protocolor.getGreen(),
19736 # protocolor.getBlue(),
19737 # alpha);
19738 # }
19739 #
19740 # public static Color toProto(java.awt.Color color) {
19741 # float red = (float) color.getRed();
19742 # float green = (float) color.getGreen();
19743 # float blue = (float) color.getBlue();
19744 # float denominator = 255.0;
19745 # Color.Builder resultBuilder =
19746 # Color
19747 # .newBuilder()
19748 # .setRed(red / denominator)
19749 # .setGreen(green / denominator)
19750 # .setBlue(blue / denominator);
19751 # int alpha = color.getAlpha();
19752 # if (alpha != 255) {
19753 # result.setAlpha(
19754 # FloatValue
19755 # .newBuilder()
19756 # .setValue(((float) alpha) / denominator)
19757 # .build());
19758 # }
19759 # return resultBuilder.build();
19760 # }
19761 # // ...
19762 #
19763 # Example (iOS / Obj-C):
19764 #
19765 # // ...
19766 # static UIColor* fromProto(Color* protocolor) {
19767 # float red = [protocolor red];
19768 # float green = [protocolor green];
19769 # float blue = [protocolor blue];
19770 # FloatValue* alpha_wrapper = [protocolor alpha];
19771 # float alpha = 1.0;
19772 # if (alpha_wrapper != nil) {
19773 # alpha = [alpha_wrapper value];
19774 # }
19775 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19776 # }
19777 #
19778 # static Color* toProto(UIColor* color) {
19779 # CGFloat red, green, blue, alpha;
19780 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19781 # return nil;
19782 # }
19783 # Color* result = [Color alloc] init];
19784 # [result setRed:red];
19785 # [result setGreen:green];
19786 # [result setBlue:blue];
19787 # if (alpha <= 0.9999) {
19788 # [result setAlpha:floatWrapperWithValue(alpha)];
19789 # }
19790 # [result autorelease];
19791 # return result;
19792 # }
19793 # // ...
19794 #
19795 # Example (JavaScript):
19796 #
19797 # // ...
19798 #
19799 # var protoToCssColor = function(rgb_color) {
19800 # var redFrac = rgb_color.red || 0.0;
19801 # var greenFrac = rgb_color.green || 0.0;
19802 # var blueFrac = rgb_color.blue || 0.0;
19803 # var red = Math.floor(redFrac * 255);
19804 # var green = Math.floor(greenFrac * 255);
19805 # var blue = Math.floor(blueFrac * 255);
19806 #
19807 # if (!('alpha' in rgb_color)) {
19808 # return rgbToCssColor_(red, green, blue);
19809 # }
19810 #
19811 # var alphaFrac = rgb_color.alpha.value || 0.0;
19812 # var rgbParams = [red, green, blue].join(',');
19813 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19814 # };
19815 #
19816 # var rgbToCssColor_ = function(red, green, blue) {
19817 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19818 # var hexString = rgbNumber.toString(16);
19819 # var missingZeros = 6 - hexString.length;
19820 # var resultBuilder = ['#'];
19821 # for (var i = 0; i < missingZeros; i++) {
19822 # resultBuilder.push('0');
19823 # }
19824 # resultBuilder.push(hexString);
19825 # return resultBuilder.join('');
19826 # };
19827 #
19828 # // ...
19829 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19830 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19831 # the final pixel color is defined by the equation:
19832 #
19833 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19834 #
19835 # This means that a value of 1.0 corresponds to a solid color, whereas
19836 # a value of 0.0 corresponds to a completely transparent color. This
19837 # uses a wrapper message rather than a simple float scalar so that it is
19838 # possible to distinguish between a default value and the value being unset.
19839 # If omitted, this color object is to be rendered as a solid color
19840 # (as if the alpha value had been explicitly given with a value of 1.0).
19841 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19842 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19843 },
19844 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019845 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019846 "style": "A String", # The style of the border.
19847 },
19848 "right": { # A border along a cell. # The right border of the cell.
19849 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
19850 # for simplicity of conversion to/from color representations in various
19851 # languages over compactness; for example, the fields of this representation
19852 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19853 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19854 # method in iOS; and, with just a little work, it can be easily formatted into
19855 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19856 #
19857 # Example (Java):
19858 #
19859 # import com.google.type.Color;
19860 #
19861 # // ...
19862 # public static java.awt.Color fromProto(Color protocolor) {
19863 # float alpha = protocolor.hasAlpha()
19864 # ? protocolor.getAlpha().getValue()
19865 # : 1.0;
19866 #
19867 # return new java.awt.Color(
19868 # protocolor.getRed(),
19869 # protocolor.getGreen(),
19870 # protocolor.getBlue(),
19871 # alpha);
19872 # }
19873 #
19874 # public static Color toProto(java.awt.Color color) {
19875 # float red = (float) color.getRed();
19876 # float green = (float) color.getGreen();
19877 # float blue = (float) color.getBlue();
19878 # float denominator = 255.0;
19879 # Color.Builder resultBuilder =
19880 # Color
19881 # .newBuilder()
19882 # .setRed(red / denominator)
19883 # .setGreen(green / denominator)
19884 # .setBlue(blue / denominator);
19885 # int alpha = color.getAlpha();
19886 # if (alpha != 255) {
19887 # result.setAlpha(
19888 # FloatValue
19889 # .newBuilder()
19890 # .setValue(((float) alpha) / denominator)
19891 # .build());
19892 # }
19893 # return resultBuilder.build();
19894 # }
19895 # // ...
19896 #
19897 # Example (iOS / Obj-C):
19898 #
19899 # // ...
19900 # static UIColor* fromProto(Color* protocolor) {
19901 # float red = [protocolor red];
19902 # float green = [protocolor green];
19903 # float blue = [protocolor blue];
19904 # FloatValue* alpha_wrapper = [protocolor alpha];
19905 # float alpha = 1.0;
19906 # if (alpha_wrapper != nil) {
19907 # alpha = [alpha_wrapper value];
19908 # }
19909 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19910 # }
19911 #
19912 # static Color* toProto(UIColor* color) {
19913 # CGFloat red, green, blue, alpha;
19914 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19915 # return nil;
19916 # }
19917 # Color* result = [Color alloc] init];
19918 # [result setRed:red];
19919 # [result setGreen:green];
19920 # [result setBlue:blue];
19921 # if (alpha <= 0.9999) {
19922 # [result setAlpha:floatWrapperWithValue(alpha)];
19923 # }
19924 # [result autorelease];
19925 # return result;
19926 # }
19927 # // ...
19928 #
19929 # Example (JavaScript):
19930 #
19931 # // ...
19932 #
19933 # var protoToCssColor = function(rgb_color) {
19934 # var redFrac = rgb_color.red || 0.0;
19935 # var greenFrac = rgb_color.green || 0.0;
19936 # var blueFrac = rgb_color.blue || 0.0;
19937 # var red = Math.floor(redFrac * 255);
19938 # var green = Math.floor(greenFrac * 255);
19939 # var blue = Math.floor(blueFrac * 255);
19940 #
19941 # if (!('alpha' in rgb_color)) {
19942 # return rgbToCssColor_(red, green, blue);
19943 # }
19944 #
19945 # var alphaFrac = rgb_color.alpha.value || 0.0;
19946 # var rgbParams = [red, green, blue].join(',');
19947 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19948 # };
19949 #
19950 # var rgbToCssColor_ = function(red, green, blue) {
19951 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19952 # var hexString = rgbNumber.toString(16);
19953 # var missingZeros = 6 - hexString.length;
19954 # var resultBuilder = ['#'];
19955 # for (var i = 0; i < missingZeros; i++) {
19956 # resultBuilder.push('0');
19957 # }
19958 # resultBuilder.push(hexString);
19959 # return resultBuilder.join('');
19960 # };
19961 #
19962 # // ...
19963 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19964 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19965 # the final pixel color is defined by the equation:
19966 #
19967 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19968 #
19969 # This means that a value of 1.0 corresponds to a solid color, whereas
19970 # a value of 0.0 corresponds to a completely transparent color. This
19971 # uses a wrapper message rather than a simple float scalar so that it is
19972 # possible to distinguish between a default value and the value being unset.
19973 # If omitted, this color object is to be rendered as a solid color
19974 # (as if the alpha value had been explicitly given with a value of 1.0).
19975 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19976 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19977 },
19978 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019979 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019980 "style": "A String", # The style of the border.
19981 },
19982 "bottom": { # A border along a cell. # The bottom border of the cell.
19983 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
19984 # for simplicity of conversion to/from color representations in various
19985 # languages over compactness; for example, the fields of this representation
19986 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19987 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19988 # method in iOS; and, with just a little work, it can be easily formatted into
19989 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19990 #
19991 # Example (Java):
19992 #
19993 # import com.google.type.Color;
19994 #
19995 # // ...
19996 # public static java.awt.Color fromProto(Color protocolor) {
19997 # float alpha = protocolor.hasAlpha()
19998 # ? protocolor.getAlpha().getValue()
19999 # : 1.0;
20000 #
20001 # return new java.awt.Color(
20002 # protocolor.getRed(),
20003 # protocolor.getGreen(),
20004 # protocolor.getBlue(),
20005 # alpha);
20006 # }
20007 #
20008 # public static Color toProto(java.awt.Color color) {
20009 # float red = (float) color.getRed();
20010 # float green = (float) color.getGreen();
20011 # float blue = (float) color.getBlue();
20012 # float denominator = 255.0;
20013 # Color.Builder resultBuilder =
20014 # Color
20015 # .newBuilder()
20016 # .setRed(red / denominator)
20017 # .setGreen(green / denominator)
20018 # .setBlue(blue / denominator);
20019 # int alpha = color.getAlpha();
20020 # if (alpha != 255) {
20021 # result.setAlpha(
20022 # FloatValue
20023 # .newBuilder()
20024 # .setValue(((float) alpha) / denominator)
20025 # .build());
20026 # }
20027 # return resultBuilder.build();
20028 # }
20029 # // ...
20030 #
20031 # Example (iOS / Obj-C):
20032 #
20033 # // ...
20034 # static UIColor* fromProto(Color* protocolor) {
20035 # float red = [protocolor red];
20036 # float green = [protocolor green];
20037 # float blue = [protocolor blue];
20038 # FloatValue* alpha_wrapper = [protocolor alpha];
20039 # float alpha = 1.0;
20040 # if (alpha_wrapper != nil) {
20041 # alpha = [alpha_wrapper value];
20042 # }
20043 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20044 # }
20045 #
20046 # static Color* toProto(UIColor* color) {
20047 # CGFloat red, green, blue, alpha;
20048 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20049 # return nil;
20050 # }
20051 # Color* result = [Color alloc] init];
20052 # [result setRed:red];
20053 # [result setGreen:green];
20054 # [result setBlue:blue];
20055 # if (alpha <= 0.9999) {
20056 # [result setAlpha:floatWrapperWithValue(alpha)];
20057 # }
20058 # [result autorelease];
20059 # return result;
20060 # }
20061 # // ...
20062 #
20063 # Example (JavaScript):
20064 #
20065 # // ...
20066 #
20067 # var protoToCssColor = function(rgb_color) {
20068 # var redFrac = rgb_color.red || 0.0;
20069 # var greenFrac = rgb_color.green || 0.0;
20070 # var blueFrac = rgb_color.blue || 0.0;
20071 # var red = Math.floor(redFrac * 255);
20072 # var green = Math.floor(greenFrac * 255);
20073 # var blue = Math.floor(blueFrac * 255);
20074 #
20075 # if (!('alpha' in rgb_color)) {
20076 # return rgbToCssColor_(red, green, blue);
20077 # }
20078 #
20079 # var alphaFrac = rgb_color.alpha.value || 0.0;
20080 # var rgbParams = [red, green, blue].join(',');
20081 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20082 # };
20083 #
20084 # var rgbToCssColor_ = function(red, green, blue) {
20085 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20086 # var hexString = rgbNumber.toString(16);
20087 # var missingZeros = 6 - hexString.length;
20088 # var resultBuilder = ['#'];
20089 # for (var i = 0; i < missingZeros; i++) {
20090 # resultBuilder.push('0');
20091 # }
20092 # resultBuilder.push(hexString);
20093 # return resultBuilder.join('');
20094 # };
20095 #
20096 # // ...
20097 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20098 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20099 # the final pixel color is defined by the equation:
20100 #
20101 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20102 #
20103 # This means that a value of 1.0 corresponds to a solid color, whereas
20104 # a value of 0.0 corresponds to a completely transparent color. This
20105 # uses a wrapper message rather than a simple float scalar so that it is
20106 # possible to distinguish between a default value and the value being unset.
20107 # If omitted, this color object is to be rendered as a solid color
20108 # (as if the alpha value had been explicitly given with a value of 1.0).
20109 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20110 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20111 },
20112 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020113 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020114 "style": "A String", # The style of the border.
20115 },
20116 "left": { # A border along a cell. # The left border of the cell.
20117 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
20118 # for simplicity of conversion to/from color representations in various
20119 # languages over compactness; for example, the fields of this representation
20120 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20121 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20122 # method in iOS; and, with just a little work, it can be easily formatted into
20123 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20124 #
20125 # Example (Java):
20126 #
20127 # import com.google.type.Color;
20128 #
20129 # // ...
20130 # public static java.awt.Color fromProto(Color protocolor) {
20131 # float alpha = protocolor.hasAlpha()
20132 # ? protocolor.getAlpha().getValue()
20133 # : 1.0;
20134 #
20135 # return new java.awt.Color(
20136 # protocolor.getRed(),
20137 # protocolor.getGreen(),
20138 # protocolor.getBlue(),
20139 # alpha);
20140 # }
20141 #
20142 # public static Color toProto(java.awt.Color color) {
20143 # float red = (float) color.getRed();
20144 # float green = (float) color.getGreen();
20145 # float blue = (float) color.getBlue();
20146 # float denominator = 255.0;
20147 # Color.Builder resultBuilder =
20148 # Color
20149 # .newBuilder()
20150 # .setRed(red / denominator)
20151 # .setGreen(green / denominator)
20152 # .setBlue(blue / denominator);
20153 # int alpha = color.getAlpha();
20154 # if (alpha != 255) {
20155 # result.setAlpha(
20156 # FloatValue
20157 # .newBuilder()
20158 # .setValue(((float) alpha) / denominator)
20159 # .build());
20160 # }
20161 # return resultBuilder.build();
20162 # }
20163 # // ...
20164 #
20165 # Example (iOS / Obj-C):
20166 #
20167 # // ...
20168 # static UIColor* fromProto(Color* protocolor) {
20169 # float red = [protocolor red];
20170 # float green = [protocolor green];
20171 # float blue = [protocolor blue];
20172 # FloatValue* alpha_wrapper = [protocolor alpha];
20173 # float alpha = 1.0;
20174 # if (alpha_wrapper != nil) {
20175 # alpha = [alpha_wrapper value];
20176 # }
20177 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20178 # }
20179 #
20180 # static Color* toProto(UIColor* color) {
20181 # CGFloat red, green, blue, alpha;
20182 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20183 # return nil;
20184 # }
20185 # Color* result = [Color alloc] init];
20186 # [result setRed:red];
20187 # [result setGreen:green];
20188 # [result setBlue:blue];
20189 # if (alpha <= 0.9999) {
20190 # [result setAlpha:floatWrapperWithValue(alpha)];
20191 # }
20192 # [result autorelease];
20193 # return result;
20194 # }
20195 # // ...
20196 #
20197 # Example (JavaScript):
20198 #
20199 # // ...
20200 #
20201 # var protoToCssColor = function(rgb_color) {
20202 # var redFrac = rgb_color.red || 0.0;
20203 # var greenFrac = rgb_color.green || 0.0;
20204 # var blueFrac = rgb_color.blue || 0.0;
20205 # var red = Math.floor(redFrac * 255);
20206 # var green = Math.floor(greenFrac * 255);
20207 # var blue = Math.floor(blueFrac * 255);
20208 #
20209 # if (!('alpha' in rgb_color)) {
20210 # return rgbToCssColor_(red, green, blue);
20211 # }
20212 #
20213 # var alphaFrac = rgb_color.alpha.value || 0.0;
20214 # var rgbParams = [red, green, blue].join(',');
20215 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20216 # };
20217 #
20218 # var rgbToCssColor_ = function(red, green, blue) {
20219 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20220 # var hexString = rgbNumber.toString(16);
20221 # var missingZeros = 6 - hexString.length;
20222 # var resultBuilder = ['#'];
20223 # for (var i = 0; i < missingZeros; i++) {
20224 # resultBuilder.push('0');
20225 # }
20226 # resultBuilder.push(hexString);
20227 # return resultBuilder.join('');
20228 # };
20229 #
20230 # // ...
20231 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20232 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20233 # the final pixel color is defined by the equation:
20234 #
20235 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20236 #
20237 # This means that a value of 1.0 corresponds to a solid color, whereas
20238 # a value of 0.0 corresponds to a completely transparent color. This
20239 # uses a wrapper message rather than a simple float scalar so that it is
20240 # possible to distinguish between a default value and the value being unset.
20241 # If omitted, this color object is to be rendered as a solid color
20242 # (as if the alpha value had been explicitly given with a value of 1.0).
20243 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20244 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20245 },
20246 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020247 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020248 "style": "A String", # The style of the border.
20249 },
20250 },
20251 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
20252 },
20253 },
20254 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
20255 # the interpolation points listed. The format of a cell will vary
20256 # based on its contents as compared to the values of the interpolation
20257 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020258 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020259 # These pin the gradient color scale according to the color,
20260 # type and value chosen.
20261 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
20262 # for simplicity of conversion to/from color representations in various
20263 # languages over compactness; for example, the fields of this representation
20264 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20265 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20266 # method in iOS; and, with just a little work, it can be easily formatted into
20267 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20268 #
20269 # Example (Java):
20270 #
20271 # import com.google.type.Color;
20272 #
20273 # // ...
20274 # public static java.awt.Color fromProto(Color protocolor) {
20275 # float alpha = protocolor.hasAlpha()
20276 # ? protocolor.getAlpha().getValue()
20277 # : 1.0;
20278 #
20279 # return new java.awt.Color(
20280 # protocolor.getRed(),
20281 # protocolor.getGreen(),
20282 # protocolor.getBlue(),
20283 # alpha);
20284 # }
20285 #
20286 # public static Color toProto(java.awt.Color color) {
20287 # float red = (float) color.getRed();
20288 # float green = (float) color.getGreen();
20289 # float blue = (float) color.getBlue();
20290 # float denominator = 255.0;
20291 # Color.Builder resultBuilder =
20292 # Color
20293 # .newBuilder()
20294 # .setRed(red / denominator)
20295 # .setGreen(green / denominator)
20296 # .setBlue(blue / denominator);
20297 # int alpha = color.getAlpha();
20298 # if (alpha != 255) {
20299 # result.setAlpha(
20300 # FloatValue
20301 # .newBuilder()
20302 # .setValue(((float) alpha) / denominator)
20303 # .build());
20304 # }
20305 # return resultBuilder.build();
20306 # }
20307 # // ...
20308 #
20309 # Example (iOS / Obj-C):
20310 #
20311 # // ...
20312 # static UIColor* fromProto(Color* protocolor) {
20313 # float red = [protocolor red];
20314 # float green = [protocolor green];
20315 # float blue = [protocolor blue];
20316 # FloatValue* alpha_wrapper = [protocolor alpha];
20317 # float alpha = 1.0;
20318 # if (alpha_wrapper != nil) {
20319 # alpha = [alpha_wrapper value];
20320 # }
20321 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20322 # }
20323 #
20324 # static Color* toProto(UIColor* color) {
20325 # CGFloat red, green, blue, alpha;
20326 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20327 # return nil;
20328 # }
20329 # Color* result = [Color alloc] init];
20330 # [result setRed:red];
20331 # [result setGreen:green];
20332 # [result setBlue:blue];
20333 # if (alpha <= 0.9999) {
20334 # [result setAlpha:floatWrapperWithValue(alpha)];
20335 # }
20336 # [result autorelease];
20337 # return result;
20338 # }
20339 # // ...
20340 #
20341 # Example (JavaScript):
20342 #
20343 # // ...
20344 #
20345 # var protoToCssColor = function(rgb_color) {
20346 # var redFrac = rgb_color.red || 0.0;
20347 # var greenFrac = rgb_color.green || 0.0;
20348 # var blueFrac = rgb_color.blue || 0.0;
20349 # var red = Math.floor(redFrac * 255);
20350 # var green = Math.floor(greenFrac * 255);
20351 # var blue = Math.floor(blueFrac * 255);
20352 #
20353 # if (!('alpha' in rgb_color)) {
20354 # return rgbToCssColor_(red, green, blue);
20355 # }
20356 #
20357 # var alphaFrac = rgb_color.alpha.value || 0.0;
20358 # var rgbParams = [red, green, blue].join(',');
20359 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20360 # };
20361 #
20362 # var rgbToCssColor_ = function(red, green, blue) {
20363 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20364 # var hexString = rgbNumber.toString(16);
20365 # var missingZeros = 6 - hexString.length;
20366 # var resultBuilder = ['#'];
20367 # for (var i = 0; i < missingZeros; i++) {
20368 # resultBuilder.push('0');
20369 # }
20370 # resultBuilder.push(hexString);
20371 # return resultBuilder.join('');
20372 # };
20373 #
20374 # // ...
20375 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20376 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20377 # the final pixel color is defined by the equation:
20378 #
20379 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20380 #
20381 # This means that a value of 1.0 corresponds to a solid color, whereas
20382 # a value of 0.0 corresponds to a completely transparent color. This
20383 # uses a wrapper message rather than a simple float scalar so that it is
20384 # possible to distinguish between a default value and the value being unset.
20385 # If omitted, this color object is to be rendered as a solid color
20386 # (as if the alpha value had been explicitly given with a value of 1.0).
20387 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20388 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20389 },
20390 "type": "A String", # How the value should be interpreted.
20391 "value": "A String", # The value this interpolation point uses. May be a formula.
20392 # Unused if type is MIN or
20393 # MAX.
20394 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020395 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020396 # These pin the gradient color scale according to the color,
20397 # type and value chosen.
20398 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
20399 # for simplicity of conversion to/from color representations in various
20400 # languages over compactness; for example, the fields of this representation
20401 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20402 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20403 # method in iOS; and, with just a little work, it can be easily formatted into
20404 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20405 #
20406 # Example (Java):
20407 #
20408 # import com.google.type.Color;
20409 #
20410 # // ...
20411 # public static java.awt.Color fromProto(Color protocolor) {
20412 # float alpha = protocolor.hasAlpha()
20413 # ? protocolor.getAlpha().getValue()
20414 # : 1.0;
20415 #
20416 # return new java.awt.Color(
20417 # protocolor.getRed(),
20418 # protocolor.getGreen(),
20419 # protocolor.getBlue(),
20420 # alpha);
20421 # }
20422 #
20423 # public static Color toProto(java.awt.Color color) {
20424 # float red = (float) color.getRed();
20425 # float green = (float) color.getGreen();
20426 # float blue = (float) color.getBlue();
20427 # float denominator = 255.0;
20428 # Color.Builder resultBuilder =
20429 # Color
20430 # .newBuilder()
20431 # .setRed(red / denominator)
20432 # .setGreen(green / denominator)
20433 # .setBlue(blue / denominator);
20434 # int alpha = color.getAlpha();
20435 # if (alpha != 255) {
20436 # result.setAlpha(
20437 # FloatValue
20438 # .newBuilder()
20439 # .setValue(((float) alpha) / denominator)
20440 # .build());
20441 # }
20442 # return resultBuilder.build();
20443 # }
20444 # // ...
20445 #
20446 # Example (iOS / Obj-C):
20447 #
20448 # // ...
20449 # static UIColor* fromProto(Color* protocolor) {
20450 # float red = [protocolor red];
20451 # float green = [protocolor green];
20452 # float blue = [protocolor blue];
20453 # FloatValue* alpha_wrapper = [protocolor alpha];
20454 # float alpha = 1.0;
20455 # if (alpha_wrapper != nil) {
20456 # alpha = [alpha_wrapper value];
20457 # }
20458 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20459 # }
20460 #
20461 # static Color* toProto(UIColor* color) {
20462 # CGFloat red, green, blue, alpha;
20463 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20464 # return nil;
20465 # }
20466 # Color* result = [Color alloc] init];
20467 # [result setRed:red];
20468 # [result setGreen:green];
20469 # [result setBlue:blue];
20470 # if (alpha <= 0.9999) {
20471 # [result setAlpha:floatWrapperWithValue(alpha)];
20472 # }
20473 # [result autorelease];
20474 # return result;
20475 # }
20476 # // ...
20477 #
20478 # Example (JavaScript):
20479 #
20480 # // ...
20481 #
20482 # var protoToCssColor = function(rgb_color) {
20483 # var redFrac = rgb_color.red || 0.0;
20484 # var greenFrac = rgb_color.green || 0.0;
20485 # var blueFrac = rgb_color.blue || 0.0;
20486 # var red = Math.floor(redFrac * 255);
20487 # var green = Math.floor(greenFrac * 255);
20488 # var blue = Math.floor(blueFrac * 255);
20489 #
20490 # if (!('alpha' in rgb_color)) {
20491 # return rgbToCssColor_(red, green, blue);
20492 # }
20493 #
20494 # var alphaFrac = rgb_color.alpha.value || 0.0;
20495 # var rgbParams = [red, green, blue].join(',');
20496 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20497 # };
20498 #
20499 # var rgbToCssColor_ = function(red, green, blue) {
20500 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20501 # var hexString = rgbNumber.toString(16);
20502 # var missingZeros = 6 - hexString.length;
20503 # var resultBuilder = ['#'];
20504 # for (var i = 0; i < missingZeros; i++) {
20505 # resultBuilder.push('0');
20506 # }
20507 # resultBuilder.push(hexString);
20508 # return resultBuilder.join('');
20509 # };
20510 #
20511 # // ...
20512 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20513 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20514 # the final pixel color is defined by the equation:
20515 #
20516 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20517 #
20518 # This means that a value of 1.0 corresponds to a solid color, whereas
20519 # a value of 0.0 corresponds to a completely transparent color. This
20520 # uses a wrapper message rather than a simple float scalar so that it is
20521 # possible to distinguish between a default value and the value being unset.
20522 # If omitted, this color object is to be rendered as a solid color
20523 # (as if the alpha value had been explicitly given with a value of 1.0).
20524 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20525 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20526 },
20527 "type": "A String", # How the value should be interpreted.
20528 "value": "A String", # The value this interpolation point uses. May be a formula.
20529 # Unused if type is MIN or
20530 # MAX.
20531 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020532 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020533 # These pin the gradient color scale according to the color,
20534 # type and value chosen.
20535 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
20536 # for simplicity of conversion to/from color representations in various
20537 # languages over compactness; for example, the fields of this representation
20538 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20539 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20540 # method in iOS; and, with just a little work, it can be easily formatted into
20541 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20542 #
20543 # Example (Java):
20544 #
20545 # import com.google.type.Color;
20546 #
20547 # // ...
20548 # public static java.awt.Color fromProto(Color protocolor) {
20549 # float alpha = protocolor.hasAlpha()
20550 # ? protocolor.getAlpha().getValue()
20551 # : 1.0;
20552 #
20553 # return new java.awt.Color(
20554 # protocolor.getRed(),
20555 # protocolor.getGreen(),
20556 # protocolor.getBlue(),
20557 # alpha);
20558 # }
20559 #
20560 # public static Color toProto(java.awt.Color color) {
20561 # float red = (float) color.getRed();
20562 # float green = (float) color.getGreen();
20563 # float blue = (float) color.getBlue();
20564 # float denominator = 255.0;
20565 # Color.Builder resultBuilder =
20566 # Color
20567 # .newBuilder()
20568 # .setRed(red / denominator)
20569 # .setGreen(green / denominator)
20570 # .setBlue(blue / denominator);
20571 # int alpha = color.getAlpha();
20572 # if (alpha != 255) {
20573 # result.setAlpha(
20574 # FloatValue
20575 # .newBuilder()
20576 # .setValue(((float) alpha) / denominator)
20577 # .build());
20578 # }
20579 # return resultBuilder.build();
20580 # }
20581 # // ...
20582 #
20583 # Example (iOS / Obj-C):
20584 #
20585 # // ...
20586 # static UIColor* fromProto(Color* protocolor) {
20587 # float red = [protocolor red];
20588 # float green = [protocolor green];
20589 # float blue = [protocolor blue];
20590 # FloatValue* alpha_wrapper = [protocolor alpha];
20591 # float alpha = 1.0;
20592 # if (alpha_wrapper != nil) {
20593 # alpha = [alpha_wrapper value];
20594 # }
20595 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20596 # }
20597 #
20598 # static Color* toProto(UIColor* color) {
20599 # CGFloat red, green, blue, alpha;
20600 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20601 # return nil;
20602 # }
20603 # Color* result = [Color alloc] init];
20604 # [result setRed:red];
20605 # [result setGreen:green];
20606 # [result setBlue:blue];
20607 # if (alpha <= 0.9999) {
20608 # [result setAlpha:floatWrapperWithValue(alpha)];
20609 # }
20610 # [result autorelease];
20611 # return result;
20612 # }
20613 # // ...
20614 #
20615 # Example (JavaScript):
20616 #
20617 # // ...
20618 #
20619 # var protoToCssColor = function(rgb_color) {
20620 # var redFrac = rgb_color.red || 0.0;
20621 # var greenFrac = rgb_color.green || 0.0;
20622 # var blueFrac = rgb_color.blue || 0.0;
20623 # var red = Math.floor(redFrac * 255);
20624 # var green = Math.floor(greenFrac * 255);
20625 # var blue = Math.floor(blueFrac * 255);
20626 #
20627 # if (!('alpha' in rgb_color)) {
20628 # return rgbToCssColor_(red, green, blue);
20629 # }
20630 #
20631 # var alphaFrac = rgb_color.alpha.value || 0.0;
20632 # var rgbParams = [red, green, blue].join(',');
20633 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20634 # };
20635 #
20636 # var rgbToCssColor_ = function(red, green, blue) {
20637 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20638 # var hexString = rgbNumber.toString(16);
20639 # var missingZeros = 6 - hexString.length;
20640 # var resultBuilder = ['#'];
20641 # for (var i = 0; i < missingZeros; i++) {
20642 # resultBuilder.push('0');
20643 # }
20644 # resultBuilder.push(hexString);
20645 # return resultBuilder.join('');
20646 # };
20647 #
20648 # // ...
20649 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20650 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20651 # the final pixel color is defined by the equation:
20652 #
20653 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20654 #
20655 # This means that a value of 1.0 corresponds to a solid color, whereas
20656 # a value of 0.0 corresponds to a completely transparent color. This
20657 # uses a wrapper message rather than a simple float scalar so that it is
20658 # possible to distinguish between a default value and the value being unset.
20659 # If omitted, this color object is to be rendered as a solid color
20660 # (as if the alpha value had been explicitly given with a value of 1.0).
20661 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20662 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20663 },
20664 "type": "A String", # How the value should be interpreted.
20665 "value": "A String", # The value this interpolation point uses. May be a formula.
20666 # Unused if type is MIN or
20667 # MAX.
20668 },
20669 },
20670 },
20671 ],
20672 "merges": [ # The ranges that are merged together.
20673 { # A range on a sheet.
20674 # All indexes are zero-based.
20675 # Indexes are half open, e.g the start index is inclusive
20676 # and the end index is exclusive -- [start_index, end_index).
20677 # Missing indexes indicate the range is unbounded on that side.
20678 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020679 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020680 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020681 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020682 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020683 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020684 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020685 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020686 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020687 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020688 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020689 # `Sheet1!A:B == sheet_id: 0,
20690 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020691 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020692 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020693 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020694 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020695 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020696 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020697 #
20698 # The start index must always be less than or equal to the end index.
20699 # If the start index equals the end index, then the range is empty.
20700 # Empty ranges are typically not meaningful and are usually rendered in the
20701 # UI as `#REF!`.
20702 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
20703 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
20704 "sheetId": 42, # The sheet this range is on.
20705 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
20706 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
20707 },
20708 ],
20709 "basicFilter": { # The default filter associated with a sheet. # The filter on this sheet, if any.
20710 "range": { # A range on a sheet. # The range the filter covers.
20711 # All indexes are zero-based.
20712 # Indexes are half open, e.g the start index is inclusive
20713 # and the end index is exclusive -- [start_index, end_index).
20714 # Missing indexes indicate the range is unbounded on that side.
20715 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020716 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020717 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020718 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020719 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020720 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020721 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020722 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020723 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020724 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020725 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020726 # `Sheet1!A:B == sheet_id: 0,
20727 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020728 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020729 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020730 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020731 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020732 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020733 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020734 #
20735 # The start index must always be less than or equal to the end index.
20736 # If the start index equals the end index, then the range is empty.
20737 # Empty ranges are typically not meaningful and are usually rendered in the
20738 # UI as `#REF!`.
20739 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
20740 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
20741 "sheetId": 42, # The sheet this range is on.
20742 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
20743 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
20744 },
20745 "sortSpecs": [ # The sort order per column. Later specifications are used when values
20746 # are equal in the earlier specifications.
20747 { # A sort order associated with a specific column or row.
20748 "sortOrder": "A String", # The order data should be sorted.
20749 "dimensionIndex": 42, # The dimension the sort should be applied to.
20750 },
20751 ],
20752 "criteria": { # The criteria for showing/hiding values per column.
20753 # The map's key is the column index, and the value is the criteria for
20754 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020755 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020756 "hiddenValues": [ # Values that should be hidden.
20757 "A String",
20758 ],
20759 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
20760 # (This does not override hiddenValues -- if a value is listed there,
20761 # it will still be hidden.)
20762 # BooleanConditions are used by conditional formatting,
20763 # data validation, and the criteria in filters.
20764 "type": "A String", # The type of condition.
20765 "values": [ # The values of the condition. The number of supported values depends
20766 # on the condition type. Some support zero values,
20767 # others one or two values,
20768 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
20769 { # The value of the condition.
20770 "relativeDate": "A String", # A relative date (based on the current date).
20771 # Valid only if the type is
20772 # DATE_BEFORE,
20773 # DATE_AFTER,
20774 # DATE_ON_OR_BEFORE or
20775 # DATE_ON_OR_AFTER.
20776 #
20777 # Relative dates are not supported in data validation.
20778 # They are supported only in conditional formatting and
20779 # conditional filters.
20780 "userEnteredValue": "A String", # A value the condition is based on.
20781 # The value will be parsed as if the user typed into a cell.
20782 # Formulas are supported (and must begin with an `=`).
20783 },
20784 ],
20785 },
20786 },
20787 },
20788 },
20789 "charts": [ # The specifications of every chart on this sheet.
20790 { # A chart embedded in a sheet.
20791 "chartId": 42, # The ID of the chart.
20792 "position": { # The position of an embedded object such as a chart. # The position of the chart.
20793 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
20794 # is chosen for you. Used only when writing.
20795 "sheetId": 42, # The sheet this is on. Set only if the embedded object
20796 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020797 "overlayPosition": { # The location an object is overlaid on top of a grid. # The position at which the object is overlaid on top of a grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020798 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
20799 # All indexes are zero-based.
20800 "rowIndex": 42, # The row index of the coordinate.
20801 "columnIndex": 42, # The column index of the coordinate.
20802 "sheetId": 42, # The sheet this coordinate is on.
20803 },
20804 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
20805 # from the anchor cell.
20806 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
20807 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
20808 # from the anchor cell.
20809 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
20810 },
20811 },
20812 "spec": { # The specifications of a chart. # The specification of the chart.
20813 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020814 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
20815 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
20816 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
20817 "sources": [ # The ranges of data for a series or domain.
20818 # Exactly one dimension must have a length of 1,
20819 # and all sources in the list must have the same dimension
20820 # with length 1.
20821 # The domain (if it exists) & all series must have the same number
20822 # of source ranges. If using more than one source range, then the source
20823 # range at a given offset must be contiguous across the domain and series.
20824 #
20825 # For example, these are valid configurations:
20826 #
20827 # domain sources: A1:A5
20828 # series1 sources: B1:B5
20829 # series2 sources: D6:D10
20830 #
20831 # domain sources: A1:A5, C10:C12
20832 # series1 sources: B1:B5, D10:D12
20833 # series2 sources: C1:C5, E10:E12
20834 { # A range on a sheet.
20835 # All indexes are zero-based.
20836 # Indexes are half open, e.g the start index is inclusive
20837 # and the end index is exclusive -- [start_index, end_index).
20838 # Missing indexes indicate the range is unbounded on that side.
20839 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020840 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020841 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020842 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020843 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020844 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020845 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020846 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020847 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020848 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020849 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020850 # `Sheet1!A:B == sheet_id: 0,
20851 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020852 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020853 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020854 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020855 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020856 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020857 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020858 #
20859 # The start index must always be less than or equal to the end index.
20860 # If the start index equals the end index, then the range is empty.
20861 # Empty ranges are typically not meaningful and are usually rendered in the
20862 # UI as `#REF!`.
20863 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
20864 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
20865 "sheetId": 42, # The sheet this range is on.
20866 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
20867 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
20868 },
20869 ],
20870 },
20871 },
20872 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
20873 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
20874 "sources": [ # The ranges of data for a series or domain.
20875 # Exactly one dimension must have a length of 1,
20876 # and all sources in the list must have the same dimension
20877 # with length 1.
20878 # The domain (if it exists) & all series must have the same number
20879 # of source ranges. If using more than one source range, then the source
20880 # range at a given offset must be contiguous across the domain and series.
20881 #
20882 # For example, these are valid configurations:
20883 #
20884 # domain sources: A1:A5
20885 # series1 sources: B1:B5
20886 # series2 sources: D6:D10
20887 #
20888 # domain sources: A1:A5, C10:C12
20889 # series1 sources: B1:B5, D10:D12
20890 # series2 sources: C1:C5, E10:E12
20891 { # A range on a sheet.
20892 # All indexes are zero-based.
20893 # Indexes are half open, e.g the start index is inclusive
20894 # and the end index is exclusive -- [start_index, end_index).
20895 # Missing indexes indicate the range is unbounded on that side.
20896 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020897 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020898 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020899 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020900 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020901 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020902 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020903 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020904 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020905 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020906 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020907 # `Sheet1!A:B == sheet_id: 0,
20908 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020909 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020910 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020911 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020912 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020913 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020914 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020915 #
20916 # The start index must always be less than or equal to the end index.
20917 # If the start index equals the end index, then the range is empty.
20918 # Empty ranges are typically not meaningful and are usually rendered in the
20919 # UI as `#REF!`.
20920 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
20921 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
20922 "sheetId": 42, # The sheet this range is on.
20923 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
20924 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
20925 },
20926 ],
20927 },
20928 },
20929 "threeDimensional": True or False, # True if the pie is three dimensional.
20930 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
20931 "pieHole": 3.14, # The size of the hole in the pie chart.
20932 },
20933 "basicChart": { # The specification for a basic chart. See BasicChartType for the list # A basic chart specification, can be one of many kinds of charts.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020934 # See BasicChartType for the list of all
20935 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020936 # of charts this supports.
20937 "headerCount": 42, # The number of rows or columns in the data that are "headers".
20938 # If not set, Google Sheets will guess how many rows are headers based
20939 # on the data.
20940 #
20941 # (Note that BasicChartAxis.title may override the axis title
20942 # inferred from the header values.)
20943 "series": [ # The data this chart is visualizing.
20944 { # A single series of data in a chart.
20945 # For example, if charting stock prices over time, multiple series may exist,
20946 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
20947 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
20948 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
20949 "sources": [ # The ranges of data for a series or domain.
20950 # Exactly one dimension must have a length of 1,
20951 # and all sources in the list must have the same dimension
20952 # with length 1.
20953 # The domain (if it exists) & all series must have the same number
20954 # of source ranges. If using more than one source range, then the source
20955 # range at a given offset must be contiguous across the domain and series.
20956 #
20957 # For example, these are valid configurations:
20958 #
20959 # domain sources: A1:A5
20960 # series1 sources: B1:B5
20961 # series2 sources: D6:D10
20962 #
20963 # domain sources: A1:A5, C10:C12
20964 # series1 sources: B1:B5, D10:D12
20965 # series2 sources: C1:C5, E10:E12
20966 { # A range on a sheet.
20967 # All indexes are zero-based.
20968 # Indexes are half open, e.g the start index is inclusive
20969 # and the end index is exclusive -- [start_index, end_index).
20970 # Missing indexes indicate the range is unbounded on that side.
20971 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020972 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020973 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020974 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020975 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020976 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020977 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020978 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020979 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020980 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020981 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020982 # `Sheet1!A:B == sheet_id: 0,
20983 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020984 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020985 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020986 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020987 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020988 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020989 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020990 #
20991 # The start index must always be less than or equal to the end index.
20992 # If the start index equals the end index, then the range is empty.
20993 # Empty ranges are typically not meaningful and are usually rendered in the
20994 # UI as `#REF!`.
20995 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
20996 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
20997 "sheetId": 42, # The sheet this range is on.
20998 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
20999 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
21000 },
21001 ],
21002 },
21003 },
21004 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
21005 # For example, if charting stocks over time, the "Volume" series
21006 # may want to be pinned to the right with the prices pinned to the left,
21007 # because the scale of trading volume is different than the scale of
21008 # prices.
21009 # It is an error to specify an axis that isn't a valid minor axis
21010 # for the chart's type.
21011 "type": "A String", # The type of this series. Valid only if the
21012 # chartType is
21013 # COMBO.
21014 # Different types will change the way the series is visualized.
21015 # Only LINE, AREA,
21016 # and COLUMN are supported.
21017 },
21018 ],
21019 "legendPosition": "A String", # The position of the chart legend.
21020 "domains": [ # The domain of data this is charting.
21021 # Only a single domain is currently supported.
21022 { # The domain of a chart.
21023 # For example, if charting stock prices over time, this would be the date.
21024 "domain": { # The data included in a domain or series. # The data of the domain. For example, if charting stock prices over time,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021025 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021026 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
21027 "sources": [ # The ranges of data for a series or domain.
21028 # Exactly one dimension must have a length of 1,
21029 # and all sources in the list must have the same dimension
21030 # with length 1.
21031 # The domain (if it exists) & all series must have the same number
21032 # of source ranges. If using more than one source range, then the source
21033 # range at a given offset must be contiguous across the domain and series.
21034 #
21035 # For example, these are valid configurations:
21036 #
21037 # domain sources: A1:A5
21038 # series1 sources: B1:B5
21039 # series2 sources: D6:D10
21040 #
21041 # domain sources: A1:A5, C10:C12
21042 # series1 sources: B1:B5, D10:D12
21043 # series2 sources: C1:C5, E10:E12
21044 { # A range on a sheet.
21045 # All indexes are zero-based.
21046 # Indexes are half open, e.g the start index is inclusive
21047 # and the end index is exclusive -- [start_index, end_index).
21048 # Missing indexes indicate the range is unbounded on that side.
21049 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021050 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021051 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021052 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021053 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021054 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021055 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021056 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021057 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021058 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021059 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021060 # `Sheet1!A:B == sheet_id: 0,
21061 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021062 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021063 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021064 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021065 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021066 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021067 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021068 #
21069 # The start index must always be less than or equal to the end index.
21070 # If the start index equals the end index, then the range is empty.
21071 # Empty ranges are typically not meaningful and are usually rendered in the
21072 # UI as `#REF!`.
21073 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
21074 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
21075 "sheetId": 42, # The sheet this range is on.
21076 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
21077 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
21078 },
21079 ],
21080 },
21081 },
21082 },
21083 ],
21084 "chartType": "A String", # The type of the chart.
21085 "axis": [ # The axis on the chart.
21086 { # An axis of the chart.
21087 # A chart may not have more than one axis per
21088 # axis position.
21089 "position": "A String", # The position of this axis.
21090 "format": { # The format of a run of text in a cell. # The format of the title.
21091 # Only valid if the axis is not associated with the domain.
21092 # Absent values indicate that the field isn't specified.
21093 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
21094 # for simplicity of conversion to/from color representations in various
21095 # languages over compactness; for example, the fields of this representation
21096 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21097 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21098 # method in iOS; and, with just a little work, it can be easily formatted into
21099 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21100 #
21101 # Example (Java):
21102 #
21103 # import com.google.type.Color;
21104 #
21105 # // ...
21106 # public static java.awt.Color fromProto(Color protocolor) {
21107 # float alpha = protocolor.hasAlpha()
21108 # ? protocolor.getAlpha().getValue()
21109 # : 1.0;
21110 #
21111 # return new java.awt.Color(
21112 # protocolor.getRed(),
21113 # protocolor.getGreen(),
21114 # protocolor.getBlue(),
21115 # alpha);
21116 # }
21117 #
21118 # public static Color toProto(java.awt.Color color) {
21119 # float red = (float) color.getRed();
21120 # float green = (float) color.getGreen();
21121 # float blue = (float) color.getBlue();
21122 # float denominator = 255.0;
21123 # Color.Builder resultBuilder =
21124 # Color
21125 # .newBuilder()
21126 # .setRed(red / denominator)
21127 # .setGreen(green / denominator)
21128 # .setBlue(blue / denominator);
21129 # int alpha = color.getAlpha();
21130 # if (alpha != 255) {
21131 # result.setAlpha(
21132 # FloatValue
21133 # .newBuilder()
21134 # .setValue(((float) alpha) / denominator)
21135 # .build());
21136 # }
21137 # return resultBuilder.build();
21138 # }
21139 # // ...
21140 #
21141 # Example (iOS / Obj-C):
21142 #
21143 # // ...
21144 # static UIColor* fromProto(Color* protocolor) {
21145 # float red = [protocolor red];
21146 # float green = [protocolor green];
21147 # float blue = [protocolor blue];
21148 # FloatValue* alpha_wrapper = [protocolor alpha];
21149 # float alpha = 1.0;
21150 # if (alpha_wrapper != nil) {
21151 # alpha = [alpha_wrapper value];
21152 # }
21153 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21154 # }
21155 #
21156 # static Color* toProto(UIColor* color) {
21157 # CGFloat red, green, blue, alpha;
21158 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21159 # return nil;
21160 # }
21161 # Color* result = [Color alloc] init];
21162 # [result setRed:red];
21163 # [result setGreen:green];
21164 # [result setBlue:blue];
21165 # if (alpha <= 0.9999) {
21166 # [result setAlpha:floatWrapperWithValue(alpha)];
21167 # }
21168 # [result autorelease];
21169 # return result;
21170 # }
21171 # // ...
21172 #
21173 # Example (JavaScript):
21174 #
21175 # // ...
21176 #
21177 # var protoToCssColor = function(rgb_color) {
21178 # var redFrac = rgb_color.red || 0.0;
21179 # var greenFrac = rgb_color.green || 0.0;
21180 # var blueFrac = rgb_color.blue || 0.0;
21181 # var red = Math.floor(redFrac * 255);
21182 # var green = Math.floor(greenFrac * 255);
21183 # var blue = Math.floor(blueFrac * 255);
21184 #
21185 # if (!('alpha' in rgb_color)) {
21186 # return rgbToCssColor_(red, green, blue);
21187 # }
21188 #
21189 # var alphaFrac = rgb_color.alpha.value || 0.0;
21190 # var rgbParams = [red, green, blue].join(',');
21191 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21192 # };
21193 #
21194 # var rgbToCssColor_ = function(red, green, blue) {
21195 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21196 # var hexString = rgbNumber.toString(16);
21197 # var missingZeros = 6 - hexString.length;
21198 # var resultBuilder = ['#'];
21199 # for (var i = 0; i < missingZeros; i++) {
21200 # resultBuilder.push('0');
21201 # }
21202 # resultBuilder.push(hexString);
21203 # return resultBuilder.join('');
21204 # };
21205 #
21206 # // ...
21207 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21208 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21209 # the final pixel color is defined by the equation:
21210 #
21211 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21212 #
21213 # This means that a value of 1.0 corresponds to a solid color, whereas
21214 # a value of 0.0 corresponds to a completely transparent color. This
21215 # uses a wrapper message rather than a simple float scalar so that it is
21216 # possible to distinguish between a default value and the value being unset.
21217 # If omitted, this color object is to be rendered as a solid color
21218 # (as if the alpha value had been explicitly given with a value of 1.0).
21219 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21220 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21221 },
21222 "bold": True or False, # True if the text is bold.
21223 "strikethrough": True or False, # True if the text has a strikethrough.
21224 "fontFamily": "A String", # The font family.
21225 "fontSize": 42, # The size of the font.
21226 "italic": True or False, # True if the text is italicized.
21227 "underline": True or False, # True if the text is underlined.
21228 },
21229 "title": "A String", # The title of this axis. If set, this overrides any title inferred
21230 # from headers of the data.
21231 },
21232 ],
21233 },
21234 "title": "A String", # The title of the chart.
21235 },
21236 },
21237 ],
21238 "filterViews": [ # The filter views in this sheet.
21239 { # A filter view.
21240 "title": "A String", # The name of the filter view.
21241 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
21242 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021243 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021244 # may be set.
21245 "filterViewId": 42, # The ID of the filter view.
21246 "range": { # A range on a sheet. # The range this filter view covers.
21247 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021248 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021249 # may be set.
21250 # All indexes are zero-based.
21251 # Indexes are half open, e.g the start index is inclusive
21252 # and the end index is exclusive -- [start_index, end_index).
21253 # Missing indexes indicate the range is unbounded on that side.
21254 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021255 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021256 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021257 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021258 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021259 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021260 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021261 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021262 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021263 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021264 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021265 # `Sheet1!A:B == sheet_id: 0,
21266 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021267 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021268 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021269 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021270 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021271 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021272 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021273 #
21274 # The start index must always be less than or equal to the end index.
21275 # If the start index equals the end index, then the range is empty.
21276 # Empty ranges are typically not meaningful and are usually rendered in the
21277 # UI as `#REF!`.
21278 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
21279 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
21280 "sheetId": 42, # The sheet this range is on.
21281 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
21282 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
21283 },
21284 "sortSpecs": [ # The sort order per column. Later specifications are used when values
21285 # are equal in the earlier specifications.
21286 { # A sort order associated with a specific column or row.
21287 "sortOrder": "A String", # The order data should be sorted.
21288 "dimensionIndex": 42, # The dimension the sort should be applied to.
21289 },
21290 ],
21291 "criteria": { # The criteria for showing/hiding values per column.
21292 # The map's key is the column index, and the value is the criteria for
21293 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021294 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021295 "hiddenValues": [ # Values that should be hidden.
21296 "A String",
21297 ],
21298 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
21299 # (This does not override hiddenValues -- if a value is listed there,
21300 # it will still be hidden.)
21301 # BooleanConditions are used by conditional formatting,
21302 # data validation, and the criteria in filters.
21303 "type": "A String", # The type of condition.
21304 "values": [ # The values of the condition. The number of supported values depends
21305 # on the condition type. Some support zero values,
21306 # others one or two values,
21307 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
21308 { # The value of the condition.
21309 "relativeDate": "A String", # A relative date (based on the current date).
21310 # Valid only if the type is
21311 # DATE_BEFORE,
21312 # DATE_AFTER,
21313 # DATE_ON_OR_BEFORE or
21314 # DATE_ON_OR_AFTER.
21315 #
21316 # Relative dates are not supported in data validation.
21317 # They are supported only in conditional formatting and
21318 # conditional filters.
21319 "userEnteredValue": "A String", # A value the condition is based on.
21320 # The value will be parsed as if the user typed into a cell.
21321 # Formulas are supported (and must begin with an `=`).
21322 },
21323 ],
21324 },
21325 },
21326 },
21327 },
21328 ],
21329 "protectedRanges": [ # The protected ranges in this sheet.
21330 { # A protected range.
21331 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
21332 # Unprotected ranges are only supported on protected sheets.
21333 { # A range on a sheet.
21334 # All indexes are zero-based.
21335 # Indexes are half open, e.g the start index is inclusive
21336 # and the end index is exclusive -- [start_index, end_index).
21337 # Missing indexes indicate the range is unbounded on that side.
21338 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021339 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021340 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021341 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021342 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021343 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021344 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021345 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021346 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021347 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021348 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021349 # `Sheet1!A:B == sheet_id: 0,
21350 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021351 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021352 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021353 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021354 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021355 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021356 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021357 #
21358 # The start index must always be less than or equal to the end index.
21359 # If the start index equals the end index, then the range is empty.
21360 # Empty ranges are typically not meaningful and are usually rendered in the
21361 # UI as `#REF!`.
21362 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
21363 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
21364 "sheetId": 42, # The sheet this range is on.
21365 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
21366 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
21367 },
21368 ],
21369 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
21370 # protected area.
21371 # This field is read-only.
21372 "description": "A String", # The description of this protected range.
21373 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
21374 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021375 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021376 # may be set.
21377 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
21378 # This field is only visible to users with edit access to the protected
21379 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021380 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021381 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
21382 # range. Domain protection is only supported on documents within a domain.
21383 "users": [ # The email addresses of users with edit access to the protected range.
21384 "A String",
21385 ],
21386 "groups": [ # The email addresses of groups with edit access to the protected range.
21387 "A String",
21388 ],
21389 },
21390 "protectedRangeId": 42, # The ID of the protected range.
21391 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021392 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021393 # Warning-based protection means that every user can edit data in the
21394 # protected range, except editing will prompt a warning asking the user
21395 # to confirm the edit.
21396 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021397 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021398 # Additionally, if this field is changed from true to false and the
21399 # `editors` field is not set (nor included in the field mask), then
21400 # the editors will be set to all the editors in the document.
21401 "range": { # A range on a sheet. # The range that is being protected.
21402 # The range may be fully unbounded, in which case this is considered
21403 # a protected sheet.
21404 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021405 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021406 # may be set.
21407 # All indexes are zero-based.
21408 # Indexes are half open, e.g the start index is inclusive
21409 # and the end index is exclusive -- [start_index, end_index).
21410 # Missing indexes indicate the range is unbounded on that side.
21411 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021412 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021413 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021414 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021415 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021416 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021417 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021418 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021419 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021420 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021421 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021422 # `Sheet1!A:B == sheet_id: 0,
21423 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021424 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021425 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021426 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021427 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021428 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021429 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021430 #
21431 # The start index must always be less than or equal to the end index.
21432 # If the start index equals the end index, then the range is empty.
21433 # Empty ranges are typically not meaningful and are usually rendered in the
21434 # UI as `#REF!`.
21435 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
21436 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
21437 "sheetId": 42, # The sheet this range is on.
21438 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
21439 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
21440 },
21441 },
21442 ],
21443 "data": [ # Data in the grid, if this is a grid sheet.
21444 # The number of GridData objects returned is dependent on the number of
21445 # ranges requested on this sheet. For example, if this is representing
21446 # `Sheet1`, and the spreadsheet was requested with ranges
21447 # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a
21448 # startRow/startColumn of `0`,
21449 # while the second one will have `startRow 14` (zero-based row 15),
21450 # and `startColumn 3` (zero-based column D).
21451 { # Data in the grid, as well as metadata about the dimensions.
21452 "startRow": 42, # The first row this GridData refers to, zero-based.
21453 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021454 # in start_row.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021455 { # Properties about a dimension.
21456 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
21457 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
21458 "hiddenByFilter": True or False, # True if this dimension is being filtered.
21459 # This field is read-only.
21460 },
21461 ],
21462 "startColumn": 42, # The first column this GridData refers to, zero-based.
21463 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021464 # in start_column.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021465 { # Properties about a dimension.
21466 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
21467 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
21468 "hiddenByFilter": True or False, # True if this dimension is being filtered.
21469 # This field is read-only.
21470 },
21471 ],
21472 "rowData": [ # The data in the grid, one entry per row,
21473 # starting with the row in startRow.
21474 # The values in RowData will correspond to columns starting
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021475 # at start_column.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021476 { # Data about each cell in a row.
21477 "values": [ # The values in the row, one per column.
21478 { # Data about a specific cell.
21479 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
21480 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021481 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021482 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021483 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021484 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
21485 # or vertically (as rows).
21486 "rows": [ # Each row grouping in the pivot table.
21487 { # A single grouping (either row or column) in a pivot table.
21488 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
21489 "valueMetadata": [ # Metadata about values in the grouping.
21490 { # Metadata about a value in a pivot grouping.
21491 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
21492 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
21493 # (Note that formulaValue is not valid,
21494 # because the values will be calculated.)
21495 "numberValue": 3.14, # Represents a double value.
21496 # Note: Dates, Times and DateTimes are represented as doubles in
21497 # "serial number" format.
21498 "boolValue": True or False, # Represents a boolean value.
21499 "formulaValue": "A String", # Represents a formula.
21500 "stringValue": "A String", # Represents a string value.
21501 # Leading single quotes are not included. For example, if the user typed
21502 # `'123` into the UI, this would be represented as a `stringValue` of
21503 # `"123"`.
21504 "errorValue": { # An error in a cell. # Represents an error.
21505 # This field is read-only.
21506 "message": "A String", # A message with more information about the error
21507 # (in the spreadsheet's locale).
21508 "type": "A String", # The type of error.
21509 },
21510 },
21511 },
21512 ],
21513 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
21514 # If not specified, sorting is alphabetical by this group's values.
21515 "buckets": [ # Determines the bucket from which values are chosen to sort.
21516 #
21517 # For example, in a pivot table with one row group & two column groups,
21518 # the row group can list up to two values. The first value corresponds
21519 # to a value within the first column group, and the second value
21520 # corresponds to a value in the second column group. If no values
21521 # are listed, this would indicate that the row should be sorted according
21522 # to the "Grand Total" over the column groups. If a single value is listed,
21523 # this would correspond to using the "Total" of that bucket.
21524 { # The kinds of value that a cell in a spreadsheet can have.
21525 "numberValue": 3.14, # Represents a double value.
21526 # Note: Dates, Times and DateTimes are represented as doubles in
21527 # "serial number" format.
21528 "boolValue": True or False, # Represents a boolean value.
21529 "formulaValue": "A String", # Represents a formula.
21530 "stringValue": "A String", # Represents a string value.
21531 # Leading single quotes are not included. For example, if the user typed
21532 # `'123` into the UI, this would be represented as a `stringValue` of
21533 # `"123"`.
21534 "errorValue": { # An error in a cell. # Represents an error.
21535 # This field is read-only.
21536 "message": "A String", # A message with more information about the error
21537 # (in the spreadsheet's locale).
21538 "type": "A String", # The type of error.
21539 },
21540 },
21541 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021542 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021543 # grouping should be sorted by.
21544 },
21545 "sortOrder": "A String", # The order the values in this group should be sorted.
21546 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
21547 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021548 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021549 # means this group refers to column `C`, whereas the offset `1` would refer
21550 # to column `D`.
21551 },
21552 ],
21553 "source": { # A range on a sheet. # The range the pivot table is reading data from.
21554 # All indexes are zero-based.
21555 # Indexes are half open, e.g the start index is inclusive
21556 # and the end index is exclusive -- [start_index, end_index).
21557 # Missing indexes indicate the range is unbounded on that side.
21558 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021559 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021560 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021561 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021562 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021563 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021564 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021565 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021566 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021567 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021568 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021569 # `Sheet1!A:B == sheet_id: 0,
21570 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021571 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021572 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021573 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021574 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021575 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021576 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021577 #
21578 # The start index must always be less than or equal to the end index.
21579 # If the start index equals the end index, then the range is empty.
21580 # Empty ranges are typically not meaningful and are usually rendered in the
21581 # UI as `#REF!`.
21582 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
21583 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
21584 "sheetId": 42, # The sheet this range is on.
21585 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
21586 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
21587 },
21588 "values": [ # A list of values to include in the pivot table.
21589 { # The definition of how a value in a pivot table should be calculated.
21590 "formula": "A String", # A custom formula to calculate the value. The formula must start
21591 # with an `=` character.
21592 "summarizeFunction": "A String", # A function to summarize the value.
21593 # If formula is set, the only supported values are
21594 # SUM and
21595 # CUSTOM.
21596 # If sourceColumnOffset is set, then `CUSTOM`
21597 # is not supported.
21598 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
21599 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021600 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021601 # means this value refers to column `C`, whereas the offset `1` would
21602 # refer to column `D`.
21603 "name": "A String", # A name to use for the value. This is only used if formula was set.
21604 # Otherwise, the column name is used.
21605 },
21606 ],
21607 "criteria": { # An optional mapping of filters per source column offset.
21608 #
21609 # The filters will be applied before aggregating data into the pivot table.
21610 # The map's key is the column offset of the source range that you want to
21611 # filter, and the value is the criteria for that column.
21612 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021613 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021614 # for column `C`, whereas the key `1` is for column `D`.
21615 "a_key": { # Criteria for showing/hiding rows in a pivot table.
21616 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
21617 "A String",
21618 ],
21619 },
21620 },
21621 "columns": [ # Each column grouping in the pivot table.
21622 { # A single grouping (either row or column) in a pivot table.
21623 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
21624 "valueMetadata": [ # Metadata about values in the grouping.
21625 { # Metadata about a value in a pivot grouping.
21626 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
21627 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
21628 # (Note that formulaValue is not valid,
21629 # because the values will be calculated.)
21630 "numberValue": 3.14, # Represents a double value.
21631 # Note: Dates, Times and DateTimes are represented as doubles in
21632 # "serial number" format.
21633 "boolValue": True or False, # Represents a boolean value.
21634 "formulaValue": "A String", # Represents a formula.
21635 "stringValue": "A String", # Represents a string value.
21636 # Leading single quotes are not included. For example, if the user typed
21637 # `'123` into the UI, this would be represented as a `stringValue` of
21638 # `"123"`.
21639 "errorValue": { # An error in a cell. # Represents an error.
21640 # This field is read-only.
21641 "message": "A String", # A message with more information about the error
21642 # (in the spreadsheet's locale).
21643 "type": "A String", # The type of error.
21644 },
21645 },
21646 },
21647 ],
21648 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
21649 # If not specified, sorting is alphabetical by this group's values.
21650 "buckets": [ # Determines the bucket from which values are chosen to sort.
21651 #
21652 # For example, in a pivot table with one row group & two column groups,
21653 # the row group can list up to two values. The first value corresponds
21654 # to a value within the first column group, and the second value
21655 # corresponds to a value in the second column group. If no values
21656 # are listed, this would indicate that the row should be sorted according
21657 # to the "Grand Total" over the column groups. If a single value is listed,
21658 # this would correspond to using the "Total" of that bucket.
21659 { # The kinds of value that a cell in a spreadsheet can have.
21660 "numberValue": 3.14, # Represents a double value.
21661 # Note: Dates, Times and DateTimes are represented as doubles in
21662 # "serial number" format.
21663 "boolValue": True or False, # Represents a boolean value.
21664 "formulaValue": "A String", # Represents a formula.
21665 "stringValue": "A String", # Represents a string value.
21666 # Leading single quotes are not included. For example, if the user typed
21667 # `'123` into the UI, this would be represented as a `stringValue` of
21668 # `"123"`.
21669 "errorValue": { # An error in a cell. # Represents an error.
21670 # This field is read-only.
21671 "message": "A String", # A message with more information about the error
21672 # (in the spreadsheet's locale).
21673 "type": "A String", # The type of error.
21674 },
21675 },
21676 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021677 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021678 # grouping should be sorted by.
21679 },
21680 "sortOrder": "A String", # The order the values in this group should be sorted.
21681 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
21682 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021683 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021684 # means this group refers to column `C`, whereas the offset `1` would refer
21685 # to column `D`.
21686 },
21687 ],
21688 },
21689 "hyperlink": "A String", # A hyperlink this cell points to, if any.
21690 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
21691 "effectiveValue": { # The kinds of value that a cell in a spreadsheet can have. # The effective value of the cell. For cells with formulas, this will be
21692 # the calculated value. For cells with literals, this will be
21693 # the same as the user_entered_value.
21694 # This field is read-only.
21695 "numberValue": 3.14, # Represents a double value.
21696 # Note: Dates, Times and DateTimes are represented as doubles in
21697 # "serial number" format.
21698 "boolValue": True or False, # Represents a boolean value.
21699 "formulaValue": "A String", # Represents a formula.
21700 "stringValue": "A String", # Represents a string value.
21701 # Leading single quotes are not included. For example, if the user typed
21702 # `'123` into the UI, this would be represented as a `stringValue` of
21703 # `"123"`.
21704 "errorValue": { # An error in a cell. # Represents an error.
21705 # This field is read-only.
21706 "message": "A String", # A message with more information about the error
21707 # (in the spreadsheet's locale).
21708 "type": "A String", # The type of error.
21709 },
21710 },
21711 "formattedValue": "A String", # The formatted value of the cell.
21712 # This is the value as it's shown to the user.
21713 # This field is read-only.
21714 "userEnteredValue": { # The kinds of value that a cell in a spreadsheet can have. # The value the user entered in the cell. e.g, `1234`, `'Hello'`, or `=NOW()`
21715 # Note: Dates, Times and DateTimes are represented as doubles in
21716 # serial number format.
21717 "numberValue": 3.14, # Represents a double value.
21718 # Note: Dates, Times and DateTimes are represented as doubles in
21719 # "serial number" format.
21720 "boolValue": True or False, # Represents a boolean value.
21721 "formulaValue": "A String", # Represents a formula.
21722 "stringValue": "A String", # Represents a string value.
21723 # Leading single quotes are not included. For example, if the user typed
21724 # `'123` into the UI, this would be represented as a `stringValue` of
21725 # `"123"`.
21726 "errorValue": { # An error in a cell. # Represents an error.
21727 # This field is read-only.
21728 "message": "A String", # A message with more information about the error
21729 # (in the spreadsheet's locale).
21730 "type": "A String", # The type of error.
21731 },
21732 },
21733 "note": "A String", # Any note on the cell.
21734 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
21735 # This includes the results of applying any conditional formatting and,
21736 # if the cell contains a formula, the computed number format.
21737 # If the effective format is the default format, effective format will
21738 # not be written.
21739 # This field is read-only.
21740 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021741 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
21742 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021743 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021744 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021745 },
21746 "textDirection": "A String", # The direction of the text in the cell.
21747 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
21748 # When updating padding, every field must be specified.
21749 "top": 42, # The top padding of the cell.
21750 "right": 42, # The right padding of the cell.
21751 "bottom": 42, # The bottom padding of the cell.
21752 "left": 42, # The left padding of the cell.
21753 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021754 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021755 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
21756 # for simplicity of conversion to/from color representations in various
21757 # languages over compactness; for example, the fields of this representation
21758 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21759 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21760 # method in iOS; and, with just a little work, it can be easily formatted into
21761 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21762 #
21763 # Example (Java):
21764 #
21765 # import com.google.type.Color;
21766 #
21767 # // ...
21768 # public static java.awt.Color fromProto(Color protocolor) {
21769 # float alpha = protocolor.hasAlpha()
21770 # ? protocolor.getAlpha().getValue()
21771 # : 1.0;
21772 #
21773 # return new java.awt.Color(
21774 # protocolor.getRed(),
21775 # protocolor.getGreen(),
21776 # protocolor.getBlue(),
21777 # alpha);
21778 # }
21779 #
21780 # public static Color toProto(java.awt.Color color) {
21781 # float red = (float) color.getRed();
21782 # float green = (float) color.getGreen();
21783 # float blue = (float) color.getBlue();
21784 # float denominator = 255.0;
21785 # Color.Builder resultBuilder =
21786 # Color
21787 # .newBuilder()
21788 # .setRed(red / denominator)
21789 # .setGreen(green / denominator)
21790 # .setBlue(blue / denominator);
21791 # int alpha = color.getAlpha();
21792 # if (alpha != 255) {
21793 # result.setAlpha(
21794 # FloatValue
21795 # .newBuilder()
21796 # .setValue(((float) alpha) / denominator)
21797 # .build());
21798 # }
21799 # return resultBuilder.build();
21800 # }
21801 # // ...
21802 #
21803 # Example (iOS / Obj-C):
21804 #
21805 # // ...
21806 # static UIColor* fromProto(Color* protocolor) {
21807 # float red = [protocolor red];
21808 # float green = [protocolor green];
21809 # float blue = [protocolor blue];
21810 # FloatValue* alpha_wrapper = [protocolor alpha];
21811 # float alpha = 1.0;
21812 # if (alpha_wrapper != nil) {
21813 # alpha = [alpha_wrapper value];
21814 # }
21815 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21816 # }
21817 #
21818 # static Color* toProto(UIColor* color) {
21819 # CGFloat red, green, blue, alpha;
21820 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21821 # return nil;
21822 # }
21823 # Color* result = [Color alloc] init];
21824 # [result setRed:red];
21825 # [result setGreen:green];
21826 # [result setBlue:blue];
21827 # if (alpha <= 0.9999) {
21828 # [result setAlpha:floatWrapperWithValue(alpha)];
21829 # }
21830 # [result autorelease];
21831 # return result;
21832 # }
21833 # // ...
21834 #
21835 # Example (JavaScript):
21836 #
21837 # // ...
21838 #
21839 # var protoToCssColor = function(rgb_color) {
21840 # var redFrac = rgb_color.red || 0.0;
21841 # var greenFrac = rgb_color.green || 0.0;
21842 # var blueFrac = rgb_color.blue || 0.0;
21843 # var red = Math.floor(redFrac * 255);
21844 # var green = Math.floor(greenFrac * 255);
21845 # var blue = Math.floor(blueFrac * 255);
21846 #
21847 # if (!('alpha' in rgb_color)) {
21848 # return rgbToCssColor_(red, green, blue);
21849 # }
21850 #
21851 # var alphaFrac = rgb_color.alpha.value || 0.0;
21852 # var rgbParams = [red, green, blue].join(',');
21853 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21854 # };
21855 #
21856 # var rgbToCssColor_ = function(red, green, blue) {
21857 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21858 # var hexString = rgbNumber.toString(16);
21859 # var missingZeros = 6 - hexString.length;
21860 # var resultBuilder = ['#'];
21861 # for (var i = 0; i < missingZeros; i++) {
21862 # resultBuilder.push('0');
21863 # }
21864 # resultBuilder.push(hexString);
21865 # return resultBuilder.join('');
21866 # };
21867 #
21868 # // ...
21869 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21870 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21871 # the final pixel color is defined by the equation:
21872 #
21873 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21874 #
21875 # This means that a value of 1.0 corresponds to a solid color, whereas
21876 # a value of 0.0 corresponds to a completely transparent color. This
21877 # uses a wrapper message rather than a simple float scalar so that it is
21878 # possible to distinguish between a default value and the value being unset.
21879 # If omitted, this color object is to be rendered as a solid color
21880 # (as if the alpha value had been explicitly given with a value of 1.0).
21881 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21882 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21883 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021884 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021885 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
21886 # Absent values indicate that the field isn't specified.
21887 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
21888 # for simplicity of conversion to/from color representations in various
21889 # languages over compactness; for example, the fields of this representation
21890 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21891 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21892 # method in iOS; and, with just a little work, it can be easily formatted into
21893 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21894 #
21895 # Example (Java):
21896 #
21897 # import com.google.type.Color;
21898 #
21899 # // ...
21900 # public static java.awt.Color fromProto(Color protocolor) {
21901 # float alpha = protocolor.hasAlpha()
21902 # ? protocolor.getAlpha().getValue()
21903 # : 1.0;
21904 #
21905 # return new java.awt.Color(
21906 # protocolor.getRed(),
21907 # protocolor.getGreen(),
21908 # protocolor.getBlue(),
21909 # alpha);
21910 # }
21911 #
21912 # public static Color toProto(java.awt.Color color) {
21913 # float red = (float) color.getRed();
21914 # float green = (float) color.getGreen();
21915 # float blue = (float) color.getBlue();
21916 # float denominator = 255.0;
21917 # Color.Builder resultBuilder =
21918 # Color
21919 # .newBuilder()
21920 # .setRed(red / denominator)
21921 # .setGreen(green / denominator)
21922 # .setBlue(blue / denominator);
21923 # int alpha = color.getAlpha();
21924 # if (alpha != 255) {
21925 # result.setAlpha(
21926 # FloatValue
21927 # .newBuilder()
21928 # .setValue(((float) alpha) / denominator)
21929 # .build());
21930 # }
21931 # return resultBuilder.build();
21932 # }
21933 # // ...
21934 #
21935 # Example (iOS / Obj-C):
21936 #
21937 # // ...
21938 # static UIColor* fromProto(Color* protocolor) {
21939 # float red = [protocolor red];
21940 # float green = [protocolor green];
21941 # float blue = [protocolor blue];
21942 # FloatValue* alpha_wrapper = [protocolor alpha];
21943 # float alpha = 1.0;
21944 # if (alpha_wrapper != nil) {
21945 # alpha = [alpha_wrapper value];
21946 # }
21947 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21948 # }
21949 #
21950 # static Color* toProto(UIColor* color) {
21951 # CGFloat red, green, blue, alpha;
21952 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21953 # return nil;
21954 # }
21955 # Color* result = [Color alloc] init];
21956 # [result setRed:red];
21957 # [result setGreen:green];
21958 # [result setBlue:blue];
21959 # if (alpha <= 0.9999) {
21960 # [result setAlpha:floatWrapperWithValue(alpha)];
21961 # }
21962 # [result autorelease];
21963 # return result;
21964 # }
21965 # // ...
21966 #
21967 # Example (JavaScript):
21968 #
21969 # // ...
21970 #
21971 # var protoToCssColor = function(rgb_color) {
21972 # var redFrac = rgb_color.red || 0.0;
21973 # var greenFrac = rgb_color.green || 0.0;
21974 # var blueFrac = rgb_color.blue || 0.0;
21975 # var red = Math.floor(redFrac * 255);
21976 # var green = Math.floor(greenFrac * 255);
21977 # var blue = Math.floor(blueFrac * 255);
21978 #
21979 # if (!('alpha' in rgb_color)) {
21980 # return rgbToCssColor_(red, green, blue);
21981 # }
21982 #
21983 # var alphaFrac = rgb_color.alpha.value || 0.0;
21984 # var rgbParams = [red, green, blue].join(',');
21985 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21986 # };
21987 #
21988 # var rgbToCssColor_ = function(red, green, blue) {
21989 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21990 # var hexString = rgbNumber.toString(16);
21991 # var missingZeros = 6 - hexString.length;
21992 # var resultBuilder = ['#'];
21993 # for (var i = 0; i < missingZeros; i++) {
21994 # resultBuilder.push('0');
21995 # }
21996 # resultBuilder.push(hexString);
21997 # return resultBuilder.join('');
21998 # };
21999 #
22000 # // ...
22001 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22002 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22003 # the final pixel color is defined by the equation:
22004 #
22005 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22006 #
22007 # This means that a value of 1.0 corresponds to a solid color, whereas
22008 # a value of 0.0 corresponds to a completely transparent color. This
22009 # uses a wrapper message rather than a simple float scalar so that it is
22010 # possible to distinguish between a default value and the value being unset.
22011 # If omitted, this color object is to be rendered as a solid color
22012 # (as if the alpha value had been explicitly given with a value of 1.0).
22013 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22014 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22015 },
22016 "bold": True or False, # True if the text is bold.
22017 "strikethrough": True or False, # True if the text has a strikethrough.
22018 "fontFamily": "A String", # The font family.
22019 "fontSize": 42, # The size of the font.
22020 "italic": True or False, # True if the text is italicized.
22021 "underline": True or False, # True if the text is underlined.
22022 },
22023 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
22024 "borders": { # The borders of the cell. # The borders of the cell.
22025 "top": { # A border along a cell. # The top border of the cell.
22026 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
22027 # for simplicity of conversion to/from color representations in various
22028 # languages over compactness; for example, the fields of this representation
22029 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22030 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22031 # method in iOS; and, with just a little work, it can be easily formatted into
22032 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22033 #
22034 # Example (Java):
22035 #
22036 # import com.google.type.Color;
22037 #
22038 # // ...
22039 # public static java.awt.Color fromProto(Color protocolor) {
22040 # float alpha = protocolor.hasAlpha()
22041 # ? protocolor.getAlpha().getValue()
22042 # : 1.0;
22043 #
22044 # return new java.awt.Color(
22045 # protocolor.getRed(),
22046 # protocolor.getGreen(),
22047 # protocolor.getBlue(),
22048 # alpha);
22049 # }
22050 #
22051 # public static Color toProto(java.awt.Color color) {
22052 # float red = (float) color.getRed();
22053 # float green = (float) color.getGreen();
22054 # float blue = (float) color.getBlue();
22055 # float denominator = 255.0;
22056 # Color.Builder resultBuilder =
22057 # Color
22058 # .newBuilder()
22059 # .setRed(red / denominator)
22060 # .setGreen(green / denominator)
22061 # .setBlue(blue / denominator);
22062 # int alpha = color.getAlpha();
22063 # if (alpha != 255) {
22064 # result.setAlpha(
22065 # FloatValue
22066 # .newBuilder()
22067 # .setValue(((float) alpha) / denominator)
22068 # .build());
22069 # }
22070 # return resultBuilder.build();
22071 # }
22072 # // ...
22073 #
22074 # Example (iOS / Obj-C):
22075 #
22076 # // ...
22077 # static UIColor* fromProto(Color* protocolor) {
22078 # float red = [protocolor red];
22079 # float green = [protocolor green];
22080 # float blue = [protocolor blue];
22081 # FloatValue* alpha_wrapper = [protocolor alpha];
22082 # float alpha = 1.0;
22083 # if (alpha_wrapper != nil) {
22084 # alpha = [alpha_wrapper value];
22085 # }
22086 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22087 # }
22088 #
22089 # static Color* toProto(UIColor* color) {
22090 # CGFloat red, green, blue, alpha;
22091 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22092 # return nil;
22093 # }
22094 # Color* result = [Color alloc] init];
22095 # [result setRed:red];
22096 # [result setGreen:green];
22097 # [result setBlue:blue];
22098 # if (alpha <= 0.9999) {
22099 # [result setAlpha:floatWrapperWithValue(alpha)];
22100 # }
22101 # [result autorelease];
22102 # return result;
22103 # }
22104 # // ...
22105 #
22106 # Example (JavaScript):
22107 #
22108 # // ...
22109 #
22110 # var protoToCssColor = function(rgb_color) {
22111 # var redFrac = rgb_color.red || 0.0;
22112 # var greenFrac = rgb_color.green || 0.0;
22113 # var blueFrac = rgb_color.blue || 0.0;
22114 # var red = Math.floor(redFrac * 255);
22115 # var green = Math.floor(greenFrac * 255);
22116 # var blue = Math.floor(blueFrac * 255);
22117 #
22118 # if (!('alpha' in rgb_color)) {
22119 # return rgbToCssColor_(red, green, blue);
22120 # }
22121 #
22122 # var alphaFrac = rgb_color.alpha.value || 0.0;
22123 # var rgbParams = [red, green, blue].join(',');
22124 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22125 # };
22126 #
22127 # var rgbToCssColor_ = function(red, green, blue) {
22128 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22129 # var hexString = rgbNumber.toString(16);
22130 # var missingZeros = 6 - hexString.length;
22131 # var resultBuilder = ['#'];
22132 # for (var i = 0; i < missingZeros; i++) {
22133 # resultBuilder.push('0');
22134 # }
22135 # resultBuilder.push(hexString);
22136 # return resultBuilder.join('');
22137 # };
22138 #
22139 # // ...
22140 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22141 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22142 # the final pixel color is defined by the equation:
22143 #
22144 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22145 #
22146 # This means that a value of 1.0 corresponds to a solid color, whereas
22147 # a value of 0.0 corresponds to a completely transparent color. This
22148 # uses a wrapper message rather than a simple float scalar so that it is
22149 # possible to distinguish between a default value and the value being unset.
22150 # If omitted, this color object is to be rendered as a solid color
22151 # (as if the alpha value had been explicitly given with a value of 1.0).
22152 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22153 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22154 },
22155 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022156 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022157 "style": "A String", # The style of the border.
22158 },
22159 "right": { # A border along a cell. # The right border of the cell.
22160 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
22161 # for simplicity of conversion to/from color representations in various
22162 # languages over compactness; for example, the fields of this representation
22163 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22164 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22165 # method in iOS; and, with just a little work, it can be easily formatted into
22166 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22167 #
22168 # Example (Java):
22169 #
22170 # import com.google.type.Color;
22171 #
22172 # // ...
22173 # public static java.awt.Color fromProto(Color protocolor) {
22174 # float alpha = protocolor.hasAlpha()
22175 # ? protocolor.getAlpha().getValue()
22176 # : 1.0;
22177 #
22178 # return new java.awt.Color(
22179 # protocolor.getRed(),
22180 # protocolor.getGreen(),
22181 # protocolor.getBlue(),
22182 # alpha);
22183 # }
22184 #
22185 # public static Color toProto(java.awt.Color color) {
22186 # float red = (float) color.getRed();
22187 # float green = (float) color.getGreen();
22188 # float blue = (float) color.getBlue();
22189 # float denominator = 255.0;
22190 # Color.Builder resultBuilder =
22191 # Color
22192 # .newBuilder()
22193 # .setRed(red / denominator)
22194 # .setGreen(green / denominator)
22195 # .setBlue(blue / denominator);
22196 # int alpha = color.getAlpha();
22197 # if (alpha != 255) {
22198 # result.setAlpha(
22199 # FloatValue
22200 # .newBuilder()
22201 # .setValue(((float) alpha) / denominator)
22202 # .build());
22203 # }
22204 # return resultBuilder.build();
22205 # }
22206 # // ...
22207 #
22208 # Example (iOS / Obj-C):
22209 #
22210 # // ...
22211 # static UIColor* fromProto(Color* protocolor) {
22212 # float red = [protocolor red];
22213 # float green = [protocolor green];
22214 # float blue = [protocolor blue];
22215 # FloatValue* alpha_wrapper = [protocolor alpha];
22216 # float alpha = 1.0;
22217 # if (alpha_wrapper != nil) {
22218 # alpha = [alpha_wrapper value];
22219 # }
22220 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22221 # }
22222 #
22223 # static Color* toProto(UIColor* color) {
22224 # CGFloat red, green, blue, alpha;
22225 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22226 # return nil;
22227 # }
22228 # Color* result = [Color alloc] init];
22229 # [result setRed:red];
22230 # [result setGreen:green];
22231 # [result setBlue:blue];
22232 # if (alpha <= 0.9999) {
22233 # [result setAlpha:floatWrapperWithValue(alpha)];
22234 # }
22235 # [result autorelease];
22236 # return result;
22237 # }
22238 # // ...
22239 #
22240 # Example (JavaScript):
22241 #
22242 # // ...
22243 #
22244 # var protoToCssColor = function(rgb_color) {
22245 # var redFrac = rgb_color.red || 0.0;
22246 # var greenFrac = rgb_color.green || 0.0;
22247 # var blueFrac = rgb_color.blue || 0.0;
22248 # var red = Math.floor(redFrac * 255);
22249 # var green = Math.floor(greenFrac * 255);
22250 # var blue = Math.floor(blueFrac * 255);
22251 #
22252 # if (!('alpha' in rgb_color)) {
22253 # return rgbToCssColor_(red, green, blue);
22254 # }
22255 #
22256 # var alphaFrac = rgb_color.alpha.value || 0.0;
22257 # var rgbParams = [red, green, blue].join(',');
22258 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22259 # };
22260 #
22261 # var rgbToCssColor_ = function(red, green, blue) {
22262 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22263 # var hexString = rgbNumber.toString(16);
22264 # var missingZeros = 6 - hexString.length;
22265 # var resultBuilder = ['#'];
22266 # for (var i = 0; i < missingZeros; i++) {
22267 # resultBuilder.push('0');
22268 # }
22269 # resultBuilder.push(hexString);
22270 # return resultBuilder.join('');
22271 # };
22272 #
22273 # // ...
22274 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22275 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22276 # the final pixel color is defined by the equation:
22277 #
22278 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22279 #
22280 # This means that a value of 1.0 corresponds to a solid color, whereas
22281 # a value of 0.0 corresponds to a completely transparent color. This
22282 # uses a wrapper message rather than a simple float scalar so that it is
22283 # possible to distinguish between a default value and the value being unset.
22284 # If omitted, this color object is to be rendered as a solid color
22285 # (as if the alpha value had been explicitly given with a value of 1.0).
22286 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22287 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22288 },
22289 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022290 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022291 "style": "A String", # The style of the border.
22292 },
22293 "bottom": { # A border along a cell. # The bottom border of the cell.
22294 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
22295 # for simplicity of conversion to/from color representations in various
22296 # languages over compactness; for example, the fields of this representation
22297 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22298 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22299 # method in iOS; and, with just a little work, it can be easily formatted into
22300 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22301 #
22302 # Example (Java):
22303 #
22304 # import com.google.type.Color;
22305 #
22306 # // ...
22307 # public static java.awt.Color fromProto(Color protocolor) {
22308 # float alpha = protocolor.hasAlpha()
22309 # ? protocolor.getAlpha().getValue()
22310 # : 1.0;
22311 #
22312 # return new java.awt.Color(
22313 # protocolor.getRed(),
22314 # protocolor.getGreen(),
22315 # protocolor.getBlue(),
22316 # alpha);
22317 # }
22318 #
22319 # public static Color toProto(java.awt.Color color) {
22320 # float red = (float) color.getRed();
22321 # float green = (float) color.getGreen();
22322 # float blue = (float) color.getBlue();
22323 # float denominator = 255.0;
22324 # Color.Builder resultBuilder =
22325 # Color
22326 # .newBuilder()
22327 # .setRed(red / denominator)
22328 # .setGreen(green / denominator)
22329 # .setBlue(blue / denominator);
22330 # int alpha = color.getAlpha();
22331 # if (alpha != 255) {
22332 # result.setAlpha(
22333 # FloatValue
22334 # .newBuilder()
22335 # .setValue(((float) alpha) / denominator)
22336 # .build());
22337 # }
22338 # return resultBuilder.build();
22339 # }
22340 # // ...
22341 #
22342 # Example (iOS / Obj-C):
22343 #
22344 # // ...
22345 # static UIColor* fromProto(Color* protocolor) {
22346 # float red = [protocolor red];
22347 # float green = [protocolor green];
22348 # float blue = [protocolor blue];
22349 # FloatValue* alpha_wrapper = [protocolor alpha];
22350 # float alpha = 1.0;
22351 # if (alpha_wrapper != nil) {
22352 # alpha = [alpha_wrapper value];
22353 # }
22354 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22355 # }
22356 #
22357 # static Color* toProto(UIColor* color) {
22358 # CGFloat red, green, blue, alpha;
22359 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22360 # return nil;
22361 # }
22362 # Color* result = [Color alloc] init];
22363 # [result setRed:red];
22364 # [result setGreen:green];
22365 # [result setBlue:blue];
22366 # if (alpha <= 0.9999) {
22367 # [result setAlpha:floatWrapperWithValue(alpha)];
22368 # }
22369 # [result autorelease];
22370 # return result;
22371 # }
22372 # // ...
22373 #
22374 # Example (JavaScript):
22375 #
22376 # // ...
22377 #
22378 # var protoToCssColor = function(rgb_color) {
22379 # var redFrac = rgb_color.red || 0.0;
22380 # var greenFrac = rgb_color.green || 0.0;
22381 # var blueFrac = rgb_color.blue || 0.0;
22382 # var red = Math.floor(redFrac * 255);
22383 # var green = Math.floor(greenFrac * 255);
22384 # var blue = Math.floor(blueFrac * 255);
22385 #
22386 # if (!('alpha' in rgb_color)) {
22387 # return rgbToCssColor_(red, green, blue);
22388 # }
22389 #
22390 # var alphaFrac = rgb_color.alpha.value || 0.0;
22391 # var rgbParams = [red, green, blue].join(',');
22392 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22393 # };
22394 #
22395 # var rgbToCssColor_ = function(red, green, blue) {
22396 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22397 # var hexString = rgbNumber.toString(16);
22398 # var missingZeros = 6 - hexString.length;
22399 # var resultBuilder = ['#'];
22400 # for (var i = 0; i < missingZeros; i++) {
22401 # resultBuilder.push('0');
22402 # }
22403 # resultBuilder.push(hexString);
22404 # return resultBuilder.join('');
22405 # };
22406 #
22407 # // ...
22408 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22409 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22410 # the final pixel color is defined by the equation:
22411 #
22412 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22413 #
22414 # This means that a value of 1.0 corresponds to a solid color, whereas
22415 # a value of 0.0 corresponds to a completely transparent color. This
22416 # uses a wrapper message rather than a simple float scalar so that it is
22417 # possible to distinguish between a default value and the value being unset.
22418 # If omitted, this color object is to be rendered as a solid color
22419 # (as if the alpha value had been explicitly given with a value of 1.0).
22420 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22421 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22422 },
22423 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022424 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022425 "style": "A String", # The style of the border.
22426 },
22427 "left": { # A border along a cell. # The left border of the cell.
22428 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
22429 # for simplicity of conversion to/from color representations in various
22430 # languages over compactness; for example, the fields of this representation
22431 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22432 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22433 # method in iOS; and, with just a little work, it can be easily formatted into
22434 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22435 #
22436 # Example (Java):
22437 #
22438 # import com.google.type.Color;
22439 #
22440 # // ...
22441 # public static java.awt.Color fromProto(Color protocolor) {
22442 # float alpha = protocolor.hasAlpha()
22443 # ? protocolor.getAlpha().getValue()
22444 # : 1.0;
22445 #
22446 # return new java.awt.Color(
22447 # protocolor.getRed(),
22448 # protocolor.getGreen(),
22449 # protocolor.getBlue(),
22450 # alpha);
22451 # }
22452 #
22453 # public static Color toProto(java.awt.Color color) {
22454 # float red = (float) color.getRed();
22455 # float green = (float) color.getGreen();
22456 # float blue = (float) color.getBlue();
22457 # float denominator = 255.0;
22458 # Color.Builder resultBuilder =
22459 # Color
22460 # .newBuilder()
22461 # .setRed(red / denominator)
22462 # .setGreen(green / denominator)
22463 # .setBlue(blue / denominator);
22464 # int alpha = color.getAlpha();
22465 # if (alpha != 255) {
22466 # result.setAlpha(
22467 # FloatValue
22468 # .newBuilder()
22469 # .setValue(((float) alpha) / denominator)
22470 # .build());
22471 # }
22472 # return resultBuilder.build();
22473 # }
22474 # // ...
22475 #
22476 # Example (iOS / Obj-C):
22477 #
22478 # // ...
22479 # static UIColor* fromProto(Color* protocolor) {
22480 # float red = [protocolor red];
22481 # float green = [protocolor green];
22482 # float blue = [protocolor blue];
22483 # FloatValue* alpha_wrapper = [protocolor alpha];
22484 # float alpha = 1.0;
22485 # if (alpha_wrapper != nil) {
22486 # alpha = [alpha_wrapper value];
22487 # }
22488 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22489 # }
22490 #
22491 # static Color* toProto(UIColor* color) {
22492 # CGFloat red, green, blue, alpha;
22493 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22494 # return nil;
22495 # }
22496 # Color* result = [Color alloc] init];
22497 # [result setRed:red];
22498 # [result setGreen:green];
22499 # [result setBlue:blue];
22500 # if (alpha <= 0.9999) {
22501 # [result setAlpha:floatWrapperWithValue(alpha)];
22502 # }
22503 # [result autorelease];
22504 # return result;
22505 # }
22506 # // ...
22507 #
22508 # Example (JavaScript):
22509 #
22510 # // ...
22511 #
22512 # var protoToCssColor = function(rgb_color) {
22513 # var redFrac = rgb_color.red || 0.0;
22514 # var greenFrac = rgb_color.green || 0.0;
22515 # var blueFrac = rgb_color.blue || 0.0;
22516 # var red = Math.floor(redFrac * 255);
22517 # var green = Math.floor(greenFrac * 255);
22518 # var blue = Math.floor(blueFrac * 255);
22519 #
22520 # if (!('alpha' in rgb_color)) {
22521 # return rgbToCssColor_(red, green, blue);
22522 # }
22523 #
22524 # var alphaFrac = rgb_color.alpha.value || 0.0;
22525 # var rgbParams = [red, green, blue].join(',');
22526 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22527 # };
22528 #
22529 # var rgbToCssColor_ = function(red, green, blue) {
22530 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22531 # var hexString = rgbNumber.toString(16);
22532 # var missingZeros = 6 - hexString.length;
22533 # var resultBuilder = ['#'];
22534 # for (var i = 0; i < missingZeros; i++) {
22535 # resultBuilder.push('0');
22536 # }
22537 # resultBuilder.push(hexString);
22538 # return resultBuilder.join('');
22539 # };
22540 #
22541 # // ...
22542 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22543 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22544 # the final pixel color is defined by the equation:
22545 #
22546 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22547 #
22548 # This means that a value of 1.0 corresponds to a solid color, whereas
22549 # a value of 0.0 corresponds to a completely transparent color. This
22550 # uses a wrapper message rather than a simple float scalar so that it is
22551 # possible to distinguish between a default value and the value being unset.
22552 # If omitted, this color object is to be rendered as a solid color
22553 # (as if the alpha value had been explicitly given with a value of 1.0).
22554 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22555 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22556 },
22557 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022558 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022559 "style": "A String", # The style of the border.
22560 },
22561 },
22562 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
22563 },
22564 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
22565 #
22566 # When writing, the new format will be merged with the existing format.
22567 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022568 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
22569 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022570 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022571 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022572 },
22573 "textDirection": "A String", # The direction of the text in the cell.
22574 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
22575 # When updating padding, every field must be specified.
22576 "top": 42, # The top padding of the cell.
22577 "right": 42, # The right padding of the cell.
22578 "bottom": 42, # The bottom padding of the cell.
22579 "left": 42, # The left padding of the cell.
22580 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022581 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022582 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
22583 # for simplicity of conversion to/from color representations in various
22584 # languages over compactness; for example, the fields of this representation
22585 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22586 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22587 # method in iOS; and, with just a little work, it can be easily formatted into
22588 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22589 #
22590 # Example (Java):
22591 #
22592 # import com.google.type.Color;
22593 #
22594 # // ...
22595 # public static java.awt.Color fromProto(Color protocolor) {
22596 # float alpha = protocolor.hasAlpha()
22597 # ? protocolor.getAlpha().getValue()
22598 # : 1.0;
22599 #
22600 # return new java.awt.Color(
22601 # protocolor.getRed(),
22602 # protocolor.getGreen(),
22603 # protocolor.getBlue(),
22604 # alpha);
22605 # }
22606 #
22607 # public static Color toProto(java.awt.Color color) {
22608 # float red = (float) color.getRed();
22609 # float green = (float) color.getGreen();
22610 # float blue = (float) color.getBlue();
22611 # float denominator = 255.0;
22612 # Color.Builder resultBuilder =
22613 # Color
22614 # .newBuilder()
22615 # .setRed(red / denominator)
22616 # .setGreen(green / denominator)
22617 # .setBlue(blue / denominator);
22618 # int alpha = color.getAlpha();
22619 # if (alpha != 255) {
22620 # result.setAlpha(
22621 # FloatValue
22622 # .newBuilder()
22623 # .setValue(((float) alpha) / denominator)
22624 # .build());
22625 # }
22626 # return resultBuilder.build();
22627 # }
22628 # // ...
22629 #
22630 # Example (iOS / Obj-C):
22631 #
22632 # // ...
22633 # static UIColor* fromProto(Color* protocolor) {
22634 # float red = [protocolor red];
22635 # float green = [protocolor green];
22636 # float blue = [protocolor blue];
22637 # FloatValue* alpha_wrapper = [protocolor alpha];
22638 # float alpha = 1.0;
22639 # if (alpha_wrapper != nil) {
22640 # alpha = [alpha_wrapper value];
22641 # }
22642 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22643 # }
22644 #
22645 # static Color* toProto(UIColor* color) {
22646 # CGFloat red, green, blue, alpha;
22647 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22648 # return nil;
22649 # }
22650 # Color* result = [Color alloc] init];
22651 # [result setRed:red];
22652 # [result setGreen:green];
22653 # [result setBlue:blue];
22654 # if (alpha <= 0.9999) {
22655 # [result setAlpha:floatWrapperWithValue(alpha)];
22656 # }
22657 # [result autorelease];
22658 # return result;
22659 # }
22660 # // ...
22661 #
22662 # Example (JavaScript):
22663 #
22664 # // ...
22665 #
22666 # var protoToCssColor = function(rgb_color) {
22667 # var redFrac = rgb_color.red || 0.0;
22668 # var greenFrac = rgb_color.green || 0.0;
22669 # var blueFrac = rgb_color.blue || 0.0;
22670 # var red = Math.floor(redFrac * 255);
22671 # var green = Math.floor(greenFrac * 255);
22672 # var blue = Math.floor(blueFrac * 255);
22673 #
22674 # if (!('alpha' in rgb_color)) {
22675 # return rgbToCssColor_(red, green, blue);
22676 # }
22677 #
22678 # var alphaFrac = rgb_color.alpha.value || 0.0;
22679 # var rgbParams = [red, green, blue].join(',');
22680 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22681 # };
22682 #
22683 # var rgbToCssColor_ = function(red, green, blue) {
22684 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22685 # var hexString = rgbNumber.toString(16);
22686 # var missingZeros = 6 - hexString.length;
22687 # var resultBuilder = ['#'];
22688 # for (var i = 0; i < missingZeros; i++) {
22689 # resultBuilder.push('0');
22690 # }
22691 # resultBuilder.push(hexString);
22692 # return resultBuilder.join('');
22693 # };
22694 #
22695 # // ...
22696 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22697 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22698 # the final pixel color is defined by the equation:
22699 #
22700 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22701 #
22702 # This means that a value of 1.0 corresponds to a solid color, whereas
22703 # a value of 0.0 corresponds to a completely transparent color. This
22704 # uses a wrapper message rather than a simple float scalar so that it is
22705 # possible to distinguish between a default value and the value being unset.
22706 # If omitted, this color object is to be rendered as a solid color
22707 # (as if the alpha value had been explicitly given with a value of 1.0).
22708 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22709 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22710 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022711 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022712 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
22713 # Absent values indicate that the field isn't specified.
22714 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
22715 # for simplicity of conversion to/from color representations in various
22716 # languages over compactness; for example, the fields of this representation
22717 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22718 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22719 # method in iOS; and, with just a little work, it can be easily formatted into
22720 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22721 #
22722 # Example (Java):
22723 #
22724 # import com.google.type.Color;
22725 #
22726 # // ...
22727 # public static java.awt.Color fromProto(Color protocolor) {
22728 # float alpha = protocolor.hasAlpha()
22729 # ? protocolor.getAlpha().getValue()
22730 # : 1.0;
22731 #
22732 # return new java.awt.Color(
22733 # protocolor.getRed(),
22734 # protocolor.getGreen(),
22735 # protocolor.getBlue(),
22736 # alpha);
22737 # }
22738 #
22739 # public static Color toProto(java.awt.Color color) {
22740 # float red = (float) color.getRed();
22741 # float green = (float) color.getGreen();
22742 # float blue = (float) color.getBlue();
22743 # float denominator = 255.0;
22744 # Color.Builder resultBuilder =
22745 # Color
22746 # .newBuilder()
22747 # .setRed(red / denominator)
22748 # .setGreen(green / denominator)
22749 # .setBlue(blue / denominator);
22750 # int alpha = color.getAlpha();
22751 # if (alpha != 255) {
22752 # result.setAlpha(
22753 # FloatValue
22754 # .newBuilder()
22755 # .setValue(((float) alpha) / denominator)
22756 # .build());
22757 # }
22758 # return resultBuilder.build();
22759 # }
22760 # // ...
22761 #
22762 # Example (iOS / Obj-C):
22763 #
22764 # // ...
22765 # static UIColor* fromProto(Color* protocolor) {
22766 # float red = [protocolor red];
22767 # float green = [protocolor green];
22768 # float blue = [protocolor blue];
22769 # FloatValue* alpha_wrapper = [protocolor alpha];
22770 # float alpha = 1.0;
22771 # if (alpha_wrapper != nil) {
22772 # alpha = [alpha_wrapper value];
22773 # }
22774 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22775 # }
22776 #
22777 # static Color* toProto(UIColor* color) {
22778 # CGFloat red, green, blue, alpha;
22779 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22780 # return nil;
22781 # }
22782 # Color* result = [Color alloc] init];
22783 # [result setRed:red];
22784 # [result setGreen:green];
22785 # [result setBlue:blue];
22786 # if (alpha <= 0.9999) {
22787 # [result setAlpha:floatWrapperWithValue(alpha)];
22788 # }
22789 # [result autorelease];
22790 # return result;
22791 # }
22792 # // ...
22793 #
22794 # Example (JavaScript):
22795 #
22796 # // ...
22797 #
22798 # var protoToCssColor = function(rgb_color) {
22799 # var redFrac = rgb_color.red || 0.0;
22800 # var greenFrac = rgb_color.green || 0.0;
22801 # var blueFrac = rgb_color.blue || 0.0;
22802 # var red = Math.floor(redFrac * 255);
22803 # var green = Math.floor(greenFrac * 255);
22804 # var blue = Math.floor(blueFrac * 255);
22805 #
22806 # if (!('alpha' in rgb_color)) {
22807 # return rgbToCssColor_(red, green, blue);
22808 # }
22809 #
22810 # var alphaFrac = rgb_color.alpha.value || 0.0;
22811 # var rgbParams = [red, green, blue].join(',');
22812 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22813 # };
22814 #
22815 # var rgbToCssColor_ = function(red, green, blue) {
22816 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22817 # var hexString = rgbNumber.toString(16);
22818 # var missingZeros = 6 - hexString.length;
22819 # var resultBuilder = ['#'];
22820 # for (var i = 0; i < missingZeros; i++) {
22821 # resultBuilder.push('0');
22822 # }
22823 # resultBuilder.push(hexString);
22824 # return resultBuilder.join('');
22825 # };
22826 #
22827 # // ...
22828 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22829 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22830 # the final pixel color is defined by the equation:
22831 #
22832 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22833 #
22834 # This means that a value of 1.0 corresponds to a solid color, whereas
22835 # a value of 0.0 corresponds to a completely transparent color. This
22836 # uses a wrapper message rather than a simple float scalar so that it is
22837 # possible to distinguish between a default value and the value being unset.
22838 # If omitted, this color object is to be rendered as a solid color
22839 # (as if the alpha value had been explicitly given with a value of 1.0).
22840 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22841 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22842 },
22843 "bold": True or False, # True if the text is bold.
22844 "strikethrough": True or False, # True if the text has a strikethrough.
22845 "fontFamily": "A String", # The font family.
22846 "fontSize": 42, # The size of the font.
22847 "italic": True or False, # True if the text is italicized.
22848 "underline": True or False, # True if the text is underlined.
22849 },
22850 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
22851 "borders": { # The borders of the cell. # The borders of the cell.
22852 "top": { # A border along a cell. # The top border of the cell.
22853 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
22854 # for simplicity of conversion to/from color representations in various
22855 # languages over compactness; for example, the fields of this representation
22856 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22857 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22858 # method in iOS; and, with just a little work, it can be easily formatted into
22859 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22860 #
22861 # Example (Java):
22862 #
22863 # import com.google.type.Color;
22864 #
22865 # // ...
22866 # public static java.awt.Color fromProto(Color protocolor) {
22867 # float alpha = protocolor.hasAlpha()
22868 # ? protocolor.getAlpha().getValue()
22869 # : 1.0;
22870 #
22871 # return new java.awt.Color(
22872 # protocolor.getRed(),
22873 # protocolor.getGreen(),
22874 # protocolor.getBlue(),
22875 # alpha);
22876 # }
22877 #
22878 # public static Color toProto(java.awt.Color color) {
22879 # float red = (float) color.getRed();
22880 # float green = (float) color.getGreen();
22881 # float blue = (float) color.getBlue();
22882 # float denominator = 255.0;
22883 # Color.Builder resultBuilder =
22884 # Color
22885 # .newBuilder()
22886 # .setRed(red / denominator)
22887 # .setGreen(green / denominator)
22888 # .setBlue(blue / denominator);
22889 # int alpha = color.getAlpha();
22890 # if (alpha != 255) {
22891 # result.setAlpha(
22892 # FloatValue
22893 # .newBuilder()
22894 # .setValue(((float) alpha) / denominator)
22895 # .build());
22896 # }
22897 # return resultBuilder.build();
22898 # }
22899 # // ...
22900 #
22901 # Example (iOS / Obj-C):
22902 #
22903 # // ...
22904 # static UIColor* fromProto(Color* protocolor) {
22905 # float red = [protocolor red];
22906 # float green = [protocolor green];
22907 # float blue = [protocolor blue];
22908 # FloatValue* alpha_wrapper = [protocolor alpha];
22909 # float alpha = 1.0;
22910 # if (alpha_wrapper != nil) {
22911 # alpha = [alpha_wrapper value];
22912 # }
22913 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22914 # }
22915 #
22916 # static Color* toProto(UIColor* color) {
22917 # CGFloat red, green, blue, alpha;
22918 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22919 # return nil;
22920 # }
22921 # Color* result = [Color alloc] init];
22922 # [result setRed:red];
22923 # [result setGreen:green];
22924 # [result setBlue:blue];
22925 # if (alpha <= 0.9999) {
22926 # [result setAlpha:floatWrapperWithValue(alpha)];
22927 # }
22928 # [result autorelease];
22929 # return result;
22930 # }
22931 # // ...
22932 #
22933 # Example (JavaScript):
22934 #
22935 # // ...
22936 #
22937 # var protoToCssColor = function(rgb_color) {
22938 # var redFrac = rgb_color.red || 0.0;
22939 # var greenFrac = rgb_color.green || 0.0;
22940 # var blueFrac = rgb_color.blue || 0.0;
22941 # var red = Math.floor(redFrac * 255);
22942 # var green = Math.floor(greenFrac * 255);
22943 # var blue = Math.floor(blueFrac * 255);
22944 #
22945 # if (!('alpha' in rgb_color)) {
22946 # return rgbToCssColor_(red, green, blue);
22947 # }
22948 #
22949 # var alphaFrac = rgb_color.alpha.value || 0.0;
22950 # var rgbParams = [red, green, blue].join(',');
22951 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22952 # };
22953 #
22954 # var rgbToCssColor_ = function(red, green, blue) {
22955 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22956 # var hexString = rgbNumber.toString(16);
22957 # var missingZeros = 6 - hexString.length;
22958 # var resultBuilder = ['#'];
22959 # for (var i = 0; i < missingZeros; i++) {
22960 # resultBuilder.push('0');
22961 # }
22962 # resultBuilder.push(hexString);
22963 # return resultBuilder.join('');
22964 # };
22965 #
22966 # // ...
22967 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22968 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22969 # the final pixel color is defined by the equation:
22970 #
22971 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22972 #
22973 # This means that a value of 1.0 corresponds to a solid color, whereas
22974 # a value of 0.0 corresponds to a completely transparent color. This
22975 # uses a wrapper message rather than a simple float scalar so that it is
22976 # possible to distinguish between a default value and the value being unset.
22977 # If omitted, this color object is to be rendered as a solid color
22978 # (as if the alpha value had been explicitly given with a value of 1.0).
22979 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22980 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22981 },
22982 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022983 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022984 "style": "A String", # The style of the border.
22985 },
22986 "right": { # A border along a cell. # The right border of the cell.
22987 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
22988 # for simplicity of conversion to/from color representations in various
22989 # languages over compactness; for example, the fields of this representation
22990 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22991 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22992 # method in iOS; and, with just a little work, it can be easily formatted into
22993 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22994 #
22995 # Example (Java):
22996 #
22997 # import com.google.type.Color;
22998 #
22999 # // ...
23000 # public static java.awt.Color fromProto(Color protocolor) {
23001 # float alpha = protocolor.hasAlpha()
23002 # ? protocolor.getAlpha().getValue()
23003 # : 1.0;
23004 #
23005 # return new java.awt.Color(
23006 # protocolor.getRed(),
23007 # protocolor.getGreen(),
23008 # protocolor.getBlue(),
23009 # alpha);
23010 # }
23011 #
23012 # public static Color toProto(java.awt.Color color) {
23013 # float red = (float) color.getRed();
23014 # float green = (float) color.getGreen();
23015 # float blue = (float) color.getBlue();
23016 # float denominator = 255.0;
23017 # Color.Builder resultBuilder =
23018 # Color
23019 # .newBuilder()
23020 # .setRed(red / denominator)
23021 # .setGreen(green / denominator)
23022 # .setBlue(blue / denominator);
23023 # int alpha = color.getAlpha();
23024 # if (alpha != 255) {
23025 # result.setAlpha(
23026 # FloatValue
23027 # .newBuilder()
23028 # .setValue(((float) alpha) / denominator)
23029 # .build());
23030 # }
23031 # return resultBuilder.build();
23032 # }
23033 # // ...
23034 #
23035 # Example (iOS / Obj-C):
23036 #
23037 # // ...
23038 # static UIColor* fromProto(Color* protocolor) {
23039 # float red = [protocolor red];
23040 # float green = [protocolor green];
23041 # float blue = [protocolor blue];
23042 # FloatValue* alpha_wrapper = [protocolor alpha];
23043 # float alpha = 1.0;
23044 # if (alpha_wrapper != nil) {
23045 # alpha = [alpha_wrapper value];
23046 # }
23047 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23048 # }
23049 #
23050 # static Color* toProto(UIColor* color) {
23051 # CGFloat red, green, blue, alpha;
23052 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23053 # return nil;
23054 # }
23055 # Color* result = [Color alloc] init];
23056 # [result setRed:red];
23057 # [result setGreen:green];
23058 # [result setBlue:blue];
23059 # if (alpha <= 0.9999) {
23060 # [result setAlpha:floatWrapperWithValue(alpha)];
23061 # }
23062 # [result autorelease];
23063 # return result;
23064 # }
23065 # // ...
23066 #
23067 # Example (JavaScript):
23068 #
23069 # // ...
23070 #
23071 # var protoToCssColor = function(rgb_color) {
23072 # var redFrac = rgb_color.red || 0.0;
23073 # var greenFrac = rgb_color.green || 0.0;
23074 # var blueFrac = rgb_color.blue || 0.0;
23075 # var red = Math.floor(redFrac * 255);
23076 # var green = Math.floor(greenFrac * 255);
23077 # var blue = Math.floor(blueFrac * 255);
23078 #
23079 # if (!('alpha' in rgb_color)) {
23080 # return rgbToCssColor_(red, green, blue);
23081 # }
23082 #
23083 # var alphaFrac = rgb_color.alpha.value || 0.0;
23084 # var rgbParams = [red, green, blue].join(',');
23085 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23086 # };
23087 #
23088 # var rgbToCssColor_ = function(red, green, blue) {
23089 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23090 # var hexString = rgbNumber.toString(16);
23091 # var missingZeros = 6 - hexString.length;
23092 # var resultBuilder = ['#'];
23093 # for (var i = 0; i < missingZeros; i++) {
23094 # resultBuilder.push('0');
23095 # }
23096 # resultBuilder.push(hexString);
23097 # return resultBuilder.join('');
23098 # };
23099 #
23100 # // ...
23101 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23102 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23103 # the final pixel color is defined by the equation:
23104 #
23105 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23106 #
23107 # This means that a value of 1.0 corresponds to a solid color, whereas
23108 # a value of 0.0 corresponds to a completely transparent color. This
23109 # uses a wrapper message rather than a simple float scalar so that it is
23110 # possible to distinguish between a default value and the value being unset.
23111 # If omitted, this color object is to be rendered as a solid color
23112 # (as if the alpha value had been explicitly given with a value of 1.0).
23113 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23114 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23115 },
23116 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023117 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023118 "style": "A String", # The style of the border.
23119 },
23120 "bottom": { # A border along a cell. # The bottom border of the cell.
23121 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23122 # for simplicity of conversion to/from color representations in various
23123 # languages over compactness; for example, the fields of this representation
23124 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23125 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23126 # method in iOS; and, with just a little work, it can be easily formatted into
23127 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23128 #
23129 # Example (Java):
23130 #
23131 # import com.google.type.Color;
23132 #
23133 # // ...
23134 # public static java.awt.Color fromProto(Color protocolor) {
23135 # float alpha = protocolor.hasAlpha()
23136 # ? protocolor.getAlpha().getValue()
23137 # : 1.0;
23138 #
23139 # return new java.awt.Color(
23140 # protocolor.getRed(),
23141 # protocolor.getGreen(),
23142 # protocolor.getBlue(),
23143 # alpha);
23144 # }
23145 #
23146 # public static Color toProto(java.awt.Color color) {
23147 # float red = (float) color.getRed();
23148 # float green = (float) color.getGreen();
23149 # float blue = (float) color.getBlue();
23150 # float denominator = 255.0;
23151 # Color.Builder resultBuilder =
23152 # Color
23153 # .newBuilder()
23154 # .setRed(red / denominator)
23155 # .setGreen(green / denominator)
23156 # .setBlue(blue / denominator);
23157 # int alpha = color.getAlpha();
23158 # if (alpha != 255) {
23159 # result.setAlpha(
23160 # FloatValue
23161 # .newBuilder()
23162 # .setValue(((float) alpha) / denominator)
23163 # .build());
23164 # }
23165 # return resultBuilder.build();
23166 # }
23167 # // ...
23168 #
23169 # Example (iOS / Obj-C):
23170 #
23171 # // ...
23172 # static UIColor* fromProto(Color* protocolor) {
23173 # float red = [protocolor red];
23174 # float green = [protocolor green];
23175 # float blue = [protocolor blue];
23176 # FloatValue* alpha_wrapper = [protocolor alpha];
23177 # float alpha = 1.0;
23178 # if (alpha_wrapper != nil) {
23179 # alpha = [alpha_wrapper value];
23180 # }
23181 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23182 # }
23183 #
23184 # static Color* toProto(UIColor* color) {
23185 # CGFloat red, green, blue, alpha;
23186 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23187 # return nil;
23188 # }
23189 # Color* result = [Color alloc] init];
23190 # [result setRed:red];
23191 # [result setGreen:green];
23192 # [result setBlue:blue];
23193 # if (alpha <= 0.9999) {
23194 # [result setAlpha:floatWrapperWithValue(alpha)];
23195 # }
23196 # [result autorelease];
23197 # return result;
23198 # }
23199 # // ...
23200 #
23201 # Example (JavaScript):
23202 #
23203 # // ...
23204 #
23205 # var protoToCssColor = function(rgb_color) {
23206 # var redFrac = rgb_color.red || 0.0;
23207 # var greenFrac = rgb_color.green || 0.0;
23208 # var blueFrac = rgb_color.blue || 0.0;
23209 # var red = Math.floor(redFrac * 255);
23210 # var green = Math.floor(greenFrac * 255);
23211 # var blue = Math.floor(blueFrac * 255);
23212 #
23213 # if (!('alpha' in rgb_color)) {
23214 # return rgbToCssColor_(red, green, blue);
23215 # }
23216 #
23217 # var alphaFrac = rgb_color.alpha.value || 0.0;
23218 # var rgbParams = [red, green, blue].join(',');
23219 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23220 # };
23221 #
23222 # var rgbToCssColor_ = function(red, green, blue) {
23223 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23224 # var hexString = rgbNumber.toString(16);
23225 # var missingZeros = 6 - hexString.length;
23226 # var resultBuilder = ['#'];
23227 # for (var i = 0; i < missingZeros; i++) {
23228 # resultBuilder.push('0');
23229 # }
23230 # resultBuilder.push(hexString);
23231 # return resultBuilder.join('');
23232 # };
23233 #
23234 # // ...
23235 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23236 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23237 # the final pixel color is defined by the equation:
23238 #
23239 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23240 #
23241 # This means that a value of 1.0 corresponds to a solid color, whereas
23242 # a value of 0.0 corresponds to a completely transparent color. This
23243 # uses a wrapper message rather than a simple float scalar so that it is
23244 # possible to distinguish between a default value and the value being unset.
23245 # If omitted, this color object is to be rendered as a solid color
23246 # (as if the alpha value had been explicitly given with a value of 1.0).
23247 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23248 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23249 },
23250 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023251 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023252 "style": "A String", # The style of the border.
23253 },
23254 "left": { # A border along a cell. # The left border of the cell.
23255 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23256 # for simplicity of conversion to/from color representations in various
23257 # languages over compactness; for example, the fields of this representation
23258 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23259 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23260 # method in iOS; and, with just a little work, it can be easily formatted into
23261 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23262 #
23263 # Example (Java):
23264 #
23265 # import com.google.type.Color;
23266 #
23267 # // ...
23268 # public static java.awt.Color fromProto(Color protocolor) {
23269 # float alpha = protocolor.hasAlpha()
23270 # ? protocolor.getAlpha().getValue()
23271 # : 1.0;
23272 #
23273 # return new java.awt.Color(
23274 # protocolor.getRed(),
23275 # protocolor.getGreen(),
23276 # protocolor.getBlue(),
23277 # alpha);
23278 # }
23279 #
23280 # public static Color toProto(java.awt.Color color) {
23281 # float red = (float) color.getRed();
23282 # float green = (float) color.getGreen();
23283 # float blue = (float) color.getBlue();
23284 # float denominator = 255.0;
23285 # Color.Builder resultBuilder =
23286 # Color
23287 # .newBuilder()
23288 # .setRed(red / denominator)
23289 # .setGreen(green / denominator)
23290 # .setBlue(blue / denominator);
23291 # int alpha = color.getAlpha();
23292 # if (alpha != 255) {
23293 # result.setAlpha(
23294 # FloatValue
23295 # .newBuilder()
23296 # .setValue(((float) alpha) / denominator)
23297 # .build());
23298 # }
23299 # return resultBuilder.build();
23300 # }
23301 # // ...
23302 #
23303 # Example (iOS / Obj-C):
23304 #
23305 # // ...
23306 # static UIColor* fromProto(Color* protocolor) {
23307 # float red = [protocolor red];
23308 # float green = [protocolor green];
23309 # float blue = [protocolor blue];
23310 # FloatValue* alpha_wrapper = [protocolor alpha];
23311 # float alpha = 1.0;
23312 # if (alpha_wrapper != nil) {
23313 # alpha = [alpha_wrapper value];
23314 # }
23315 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23316 # }
23317 #
23318 # static Color* toProto(UIColor* color) {
23319 # CGFloat red, green, blue, alpha;
23320 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23321 # return nil;
23322 # }
23323 # Color* result = [Color alloc] init];
23324 # [result setRed:red];
23325 # [result setGreen:green];
23326 # [result setBlue:blue];
23327 # if (alpha <= 0.9999) {
23328 # [result setAlpha:floatWrapperWithValue(alpha)];
23329 # }
23330 # [result autorelease];
23331 # return result;
23332 # }
23333 # // ...
23334 #
23335 # Example (JavaScript):
23336 #
23337 # // ...
23338 #
23339 # var protoToCssColor = function(rgb_color) {
23340 # var redFrac = rgb_color.red || 0.0;
23341 # var greenFrac = rgb_color.green || 0.0;
23342 # var blueFrac = rgb_color.blue || 0.0;
23343 # var red = Math.floor(redFrac * 255);
23344 # var green = Math.floor(greenFrac * 255);
23345 # var blue = Math.floor(blueFrac * 255);
23346 #
23347 # if (!('alpha' in rgb_color)) {
23348 # return rgbToCssColor_(red, green, blue);
23349 # }
23350 #
23351 # var alphaFrac = rgb_color.alpha.value || 0.0;
23352 # var rgbParams = [red, green, blue].join(',');
23353 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23354 # };
23355 #
23356 # var rgbToCssColor_ = function(red, green, blue) {
23357 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23358 # var hexString = rgbNumber.toString(16);
23359 # var missingZeros = 6 - hexString.length;
23360 # var resultBuilder = ['#'];
23361 # for (var i = 0; i < missingZeros; i++) {
23362 # resultBuilder.push('0');
23363 # }
23364 # resultBuilder.push(hexString);
23365 # return resultBuilder.join('');
23366 # };
23367 #
23368 # // ...
23369 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23370 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23371 # the final pixel color is defined by the equation:
23372 #
23373 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23374 #
23375 # This means that a value of 1.0 corresponds to a solid color, whereas
23376 # a value of 0.0 corresponds to a completely transparent color. This
23377 # uses a wrapper message rather than a simple float scalar so that it is
23378 # possible to distinguish between a default value and the value being unset.
23379 # If omitted, this color object is to be rendered as a solid color
23380 # (as if the alpha value had been explicitly given with a value of 1.0).
23381 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23382 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23383 },
23384 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023385 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023386 "style": "A String", # The style of the border.
23387 },
23388 },
23389 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
23390 },
23391 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
23392 #
23393 # When writing, the new data validation rule will overwrite any prior rule.
23394 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
23395 # If true, "List" conditions will show a dropdown.
23396 "strict": True or False, # True if invalid data should be rejected.
23397 "inputMessage": "A String", # A message to show the user when adding data to the cell.
23398 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
23399 # BooleanConditions are used by conditional formatting,
23400 # data validation, and the criteria in filters.
23401 "type": "A String", # The type of condition.
23402 "values": [ # The values of the condition. The number of supported values depends
23403 # on the condition type. Some support zero values,
23404 # others one or two values,
23405 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
23406 { # The value of the condition.
23407 "relativeDate": "A String", # A relative date (based on the current date).
23408 # Valid only if the type is
23409 # DATE_BEFORE,
23410 # DATE_AFTER,
23411 # DATE_ON_OR_BEFORE or
23412 # DATE_ON_OR_AFTER.
23413 #
23414 # Relative dates are not supported in data validation.
23415 # They are supported only in conditional formatting and
23416 # conditional filters.
23417 "userEnteredValue": "A String", # A value the condition is based on.
23418 # The value will be parsed as if the user typed into a cell.
23419 # Formulas are supported (and must begin with an `=`).
23420 },
23421 ],
23422 },
23423 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023424 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
23425 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023426 # Runs start at specific indexes in the text and continue until the next
23427 # run. Properties of a run will continue unless explicitly changed
23428 # in a subsequent run (and properties of the first run will continue
23429 # the properties of the cell unless explicitly changed).
23430 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023431 # When writing, the new runs will overwrite any prior runs. When writing a
23432 # new user_entered_value, previous runs will be erased.
23433 { # A run of a text format. The format of this run continues until the start
23434 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023435 # When updating, all fields must be set.
23436 "startIndex": 42, # The character index where this run starts.
23437 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
23438 # Absent values indicate that the field isn't specified.
23439 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
23440 # for simplicity of conversion to/from color representations in various
23441 # languages over compactness; for example, the fields of this representation
23442 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23443 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23444 # method in iOS; and, with just a little work, it can be easily formatted into
23445 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23446 #
23447 # Example (Java):
23448 #
23449 # import com.google.type.Color;
23450 #
23451 # // ...
23452 # public static java.awt.Color fromProto(Color protocolor) {
23453 # float alpha = protocolor.hasAlpha()
23454 # ? protocolor.getAlpha().getValue()
23455 # : 1.0;
23456 #
23457 # return new java.awt.Color(
23458 # protocolor.getRed(),
23459 # protocolor.getGreen(),
23460 # protocolor.getBlue(),
23461 # alpha);
23462 # }
23463 #
23464 # public static Color toProto(java.awt.Color color) {
23465 # float red = (float) color.getRed();
23466 # float green = (float) color.getGreen();
23467 # float blue = (float) color.getBlue();
23468 # float denominator = 255.0;
23469 # Color.Builder resultBuilder =
23470 # Color
23471 # .newBuilder()
23472 # .setRed(red / denominator)
23473 # .setGreen(green / denominator)
23474 # .setBlue(blue / denominator);
23475 # int alpha = color.getAlpha();
23476 # if (alpha != 255) {
23477 # result.setAlpha(
23478 # FloatValue
23479 # .newBuilder()
23480 # .setValue(((float) alpha) / denominator)
23481 # .build());
23482 # }
23483 # return resultBuilder.build();
23484 # }
23485 # // ...
23486 #
23487 # Example (iOS / Obj-C):
23488 #
23489 # // ...
23490 # static UIColor* fromProto(Color* protocolor) {
23491 # float red = [protocolor red];
23492 # float green = [protocolor green];
23493 # float blue = [protocolor blue];
23494 # FloatValue* alpha_wrapper = [protocolor alpha];
23495 # float alpha = 1.0;
23496 # if (alpha_wrapper != nil) {
23497 # alpha = [alpha_wrapper value];
23498 # }
23499 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23500 # }
23501 #
23502 # static Color* toProto(UIColor* color) {
23503 # CGFloat red, green, blue, alpha;
23504 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23505 # return nil;
23506 # }
23507 # Color* result = [Color alloc] init];
23508 # [result setRed:red];
23509 # [result setGreen:green];
23510 # [result setBlue:blue];
23511 # if (alpha <= 0.9999) {
23512 # [result setAlpha:floatWrapperWithValue(alpha)];
23513 # }
23514 # [result autorelease];
23515 # return result;
23516 # }
23517 # // ...
23518 #
23519 # Example (JavaScript):
23520 #
23521 # // ...
23522 #
23523 # var protoToCssColor = function(rgb_color) {
23524 # var redFrac = rgb_color.red || 0.0;
23525 # var greenFrac = rgb_color.green || 0.0;
23526 # var blueFrac = rgb_color.blue || 0.0;
23527 # var red = Math.floor(redFrac * 255);
23528 # var green = Math.floor(greenFrac * 255);
23529 # var blue = Math.floor(blueFrac * 255);
23530 #
23531 # if (!('alpha' in rgb_color)) {
23532 # return rgbToCssColor_(red, green, blue);
23533 # }
23534 #
23535 # var alphaFrac = rgb_color.alpha.value || 0.0;
23536 # var rgbParams = [red, green, blue].join(',');
23537 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23538 # };
23539 #
23540 # var rgbToCssColor_ = function(red, green, blue) {
23541 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23542 # var hexString = rgbNumber.toString(16);
23543 # var missingZeros = 6 - hexString.length;
23544 # var resultBuilder = ['#'];
23545 # for (var i = 0; i < missingZeros; i++) {
23546 # resultBuilder.push('0');
23547 # }
23548 # resultBuilder.push(hexString);
23549 # return resultBuilder.join('');
23550 # };
23551 #
23552 # // ...
23553 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23554 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23555 # the final pixel color is defined by the equation:
23556 #
23557 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23558 #
23559 # This means that a value of 1.0 corresponds to a solid color, whereas
23560 # a value of 0.0 corresponds to a completely transparent color. This
23561 # uses a wrapper message rather than a simple float scalar so that it is
23562 # possible to distinguish between a default value and the value being unset.
23563 # If omitted, this color object is to be rendered as a solid color
23564 # (as if the alpha value had been explicitly given with a value of 1.0).
23565 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23566 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23567 },
23568 "bold": True or False, # True if the text is bold.
23569 "strikethrough": True or False, # True if the text has a strikethrough.
23570 "fontFamily": "A String", # The font family.
23571 "fontSize": 42, # The size of the font.
23572 "italic": True or False, # True if the text is italicized.
23573 "underline": True or False, # True if the text is underlined.
23574 },
23575 },
23576 ],
23577 },
23578 ],
23579 },
23580 ],
23581 },
23582 ],
23583 "properties": { # Properties of a sheet. # The properties of the sheet.
23584 "sheetType": "A String", # The type of sheet. Defaults to GRID.
23585 # This field cannot be changed once set.
23586 "index": 42, # The index of the sheet within the spreadsheet.
23587 # When adding or updating sheet properties, if this field
23588 # is excluded then the sheet will be added or moved to the end
23589 # of the sheet list.
23590 "title": "A String", # The name of the sheet.
23591 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
23592 # (If the sheet is an object sheet, containing a chart or image, then
23593 # this field will be absent.)
23594 # When writing it is an error to set any grid properties on non-grid sheets.
23595 "columnCount": 42, # The number of columns in the grid.
23596 "rowCount": 42, # The number of rows in the grid.
23597 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
23598 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
23599 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
23600 },
23601 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
23602 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
23603 # for simplicity of conversion to/from color representations in various
23604 # languages over compactness; for example, the fields of this representation
23605 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23606 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23607 # method in iOS; and, with just a little work, it can be easily formatted into
23608 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23609 #
23610 # Example (Java):
23611 #
23612 # import com.google.type.Color;
23613 #
23614 # // ...
23615 # public static java.awt.Color fromProto(Color protocolor) {
23616 # float alpha = protocolor.hasAlpha()
23617 # ? protocolor.getAlpha().getValue()
23618 # : 1.0;
23619 #
23620 # return new java.awt.Color(
23621 # protocolor.getRed(),
23622 # protocolor.getGreen(),
23623 # protocolor.getBlue(),
23624 # alpha);
23625 # }
23626 #
23627 # public static Color toProto(java.awt.Color color) {
23628 # float red = (float) color.getRed();
23629 # float green = (float) color.getGreen();
23630 # float blue = (float) color.getBlue();
23631 # float denominator = 255.0;
23632 # Color.Builder resultBuilder =
23633 # Color
23634 # .newBuilder()
23635 # .setRed(red / denominator)
23636 # .setGreen(green / denominator)
23637 # .setBlue(blue / denominator);
23638 # int alpha = color.getAlpha();
23639 # if (alpha != 255) {
23640 # result.setAlpha(
23641 # FloatValue
23642 # .newBuilder()
23643 # .setValue(((float) alpha) / denominator)
23644 # .build());
23645 # }
23646 # return resultBuilder.build();
23647 # }
23648 # // ...
23649 #
23650 # Example (iOS / Obj-C):
23651 #
23652 # // ...
23653 # static UIColor* fromProto(Color* protocolor) {
23654 # float red = [protocolor red];
23655 # float green = [protocolor green];
23656 # float blue = [protocolor blue];
23657 # FloatValue* alpha_wrapper = [protocolor alpha];
23658 # float alpha = 1.0;
23659 # if (alpha_wrapper != nil) {
23660 # alpha = [alpha_wrapper value];
23661 # }
23662 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23663 # }
23664 #
23665 # static Color* toProto(UIColor* color) {
23666 # CGFloat red, green, blue, alpha;
23667 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23668 # return nil;
23669 # }
23670 # Color* result = [Color alloc] init];
23671 # [result setRed:red];
23672 # [result setGreen:green];
23673 # [result setBlue:blue];
23674 # if (alpha <= 0.9999) {
23675 # [result setAlpha:floatWrapperWithValue(alpha)];
23676 # }
23677 # [result autorelease];
23678 # return result;
23679 # }
23680 # // ...
23681 #
23682 # Example (JavaScript):
23683 #
23684 # // ...
23685 #
23686 # var protoToCssColor = function(rgb_color) {
23687 # var redFrac = rgb_color.red || 0.0;
23688 # var greenFrac = rgb_color.green || 0.0;
23689 # var blueFrac = rgb_color.blue || 0.0;
23690 # var red = Math.floor(redFrac * 255);
23691 # var green = Math.floor(greenFrac * 255);
23692 # var blue = Math.floor(blueFrac * 255);
23693 #
23694 # if (!('alpha' in rgb_color)) {
23695 # return rgbToCssColor_(red, green, blue);
23696 # }
23697 #
23698 # var alphaFrac = rgb_color.alpha.value || 0.0;
23699 # var rgbParams = [red, green, blue].join(',');
23700 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23701 # };
23702 #
23703 # var rgbToCssColor_ = function(red, green, blue) {
23704 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23705 # var hexString = rgbNumber.toString(16);
23706 # var missingZeros = 6 - hexString.length;
23707 # var resultBuilder = ['#'];
23708 # for (var i = 0; i < missingZeros; i++) {
23709 # resultBuilder.push('0');
23710 # }
23711 # resultBuilder.push(hexString);
23712 # return resultBuilder.join('');
23713 # };
23714 #
23715 # // ...
23716 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23717 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23718 # the final pixel color is defined by the equation:
23719 #
23720 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23721 #
23722 # This means that a value of 1.0 corresponds to a solid color, whereas
23723 # a value of 0.0 corresponds to a completely transparent color. This
23724 # uses a wrapper message rather than a simple float scalar so that it is
23725 # possible to distinguish between a default value and the value being unset.
23726 # If omitted, this color object is to be rendered as a solid color
23727 # (as if the alpha value had been explicitly given with a value of 1.0).
23728 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23729 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23730 },
23731 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
23732 "sheetId": 42, # The ID of the sheet. Must be non-negative.
23733 # This field cannot be changed once set.
23734 },
23735 },
23736 ],
23737 }
23738
23739 x__xgafv: string, V1 error format.
23740 Allowed values
23741 1 - v1 error format
23742 2 - v2 error format
23743
23744Returns:
23745 An object of the form:
23746
23747 { # Resource that represents a spreadsheet.
23748 "spreadsheetId": "A String", # The ID of the spreadsheet.
23749 # This field is read-only.
23750 "namedRanges": [ # The named ranges defined in a spreadsheet.
23751 { # A named range.
23752 "namedRangeId": "A String", # The ID of the named range.
23753 "range": { # A range on a sheet. # The range this represents.
23754 # All indexes are zero-based.
23755 # Indexes are half open, e.g the start index is inclusive
23756 # and the end index is exclusive -- [start_index, end_index).
23757 # Missing indexes indicate the range is unbounded on that side.
23758 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023759 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023760 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023761 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023762 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023763 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023764 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023765 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023766 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023767 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023768 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023769 # `Sheet1!A:B == sheet_id: 0,
23770 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023771 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023772 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023773 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023774 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023775 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023776 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023777 #
23778 # The start index must always be less than or equal to the end index.
23779 # If the start index equals the end index, then the range is empty.
23780 # Empty ranges are typically not meaningful and are usually rendered in the
23781 # UI as `#REF!`.
23782 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
23783 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
23784 "sheetId": 42, # The sheet this range is on.
23785 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
23786 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
23787 },
23788 "name": "A String", # The name of the named range.
23789 },
23790 ],
23791 "properties": { # Properties of a spreadsheet. # Overall properties of a spreadsheet.
23792 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023793 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023794 # * an ISO 639-1 language code such as `en`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023795 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023796 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023797 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023798 # * a combination of the ISO language code and country code, such as `en_US`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023799 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023800 # Note: when updating this field, not all locales/languages are supported.
23801 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
23802 # `America/New_York`. If the time zone isn't recognized, this may
23803 # be a custom time zone such as `GMT-07:00`.
23804 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
23805 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023806 # CellData.effectiveFormat will not be set if the
23807 # cell's format is equal to this default format.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023808 # This field is read-only.
23809 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023810 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
23811 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023812 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023813 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023814 },
23815 "textDirection": "A String", # The direction of the text in the cell.
23816 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
23817 # When updating padding, every field must be specified.
23818 "top": 42, # The top padding of the cell.
23819 "right": 42, # The right padding of the cell.
23820 "bottom": 42, # The bottom padding of the cell.
23821 "left": 42, # The left padding of the cell.
23822 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023823 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023824 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
23825 # for simplicity of conversion to/from color representations in various
23826 # languages over compactness; for example, the fields of this representation
23827 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23828 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23829 # method in iOS; and, with just a little work, it can be easily formatted into
23830 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23831 #
23832 # Example (Java):
23833 #
23834 # import com.google.type.Color;
23835 #
23836 # // ...
23837 # public static java.awt.Color fromProto(Color protocolor) {
23838 # float alpha = protocolor.hasAlpha()
23839 # ? protocolor.getAlpha().getValue()
23840 # : 1.0;
23841 #
23842 # return new java.awt.Color(
23843 # protocolor.getRed(),
23844 # protocolor.getGreen(),
23845 # protocolor.getBlue(),
23846 # alpha);
23847 # }
23848 #
23849 # public static Color toProto(java.awt.Color color) {
23850 # float red = (float) color.getRed();
23851 # float green = (float) color.getGreen();
23852 # float blue = (float) color.getBlue();
23853 # float denominator = 255.0;
23854 # Color.Builder resultBuilder =
23855 # Color
23856 # .newBuilder()
23857 # .setRed(red / denominator)
23858 # .setGreen(green / denominator)
23859 # .setBlue(blue / denominator);
23860 # int alpha = color.getAlpha();
23861 # if (alpha != 255) {
23862 # result.setAlpha(
23863 # FloatValue
23864 # .newBuilder()
23865 # .setValue(((float) alpha) / denominator)
23866 # .build());
23867 # }
23868 # return resultBuilder.build();
23869 # }
23870 # // ...
23871 #
23872 # Example (iOS / Obj-C):
23873 #
23874 # // ...
23875 # static UIColor* fromProto(Color* protocolor) {
23876 # float red = [protocolor red];
23877 # float green = [protocolor green];
23878 # float blue = [protocolor blue];
23879 # FloatValue* alpha_wrapper = [protocolor alpha];
23880 # float alpha = 1.0;
23881 # if (alpha_wrapper != nil) {
23882 # alpha = [alpha_wrapper value];
23883 # }
23884 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23885 # }
23886 #
23887 # static Color* toProto(UIColor* color) {
23888 # CGFloat red, green, blue, alpha;
23889 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23890 # return nil;
23891 # }
23892 # Color* result = [Color alloc] init];
23893 # [result setRed:red];
23894 # [result setGreen:green];
23895 # [result setBlue:blue];
23896 # if (alpha <= 0.9999) {
23897 # [result setAlpha:floatWrapperWithValue(alpha)];
23898 # }
23899 # [result autorelease];
23900 # return result;
23901 # }
23902 # // ...
23903 #
23904 # Example (JavaScript):
23905 #
23906 # // ...
23907 #
23908 # var protoToCssColor = function(rgb_color) {
23909 # var redFrac = rgb_color.red || 0.0;
23910 # var greenFrac = rgb_color.green || 0.0;
23911 # var blueFrac = rgb_color.blue || 0.0;
23912 # var red = Math.floor(redFrac * 255);
23913 # var green = Math.floor(greenFrac * 255);
23914 # var blue = Math.floor(blueFrac * 255);
23915 #
23916 # if (!('alpha' in rgb_color)) {
23917 # return rgbToCssColor_(red, green, blue);
23918 # }
23919 #
23920 # var alphaFrac = rgb_color.alpha.value || 0.0;
23921 # var rgbParams = [red, green, blue].join(',');
23922 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23923 # };
23924 #
23925 # var rgbToCssColor_ = function(red, green, blue) {
23926 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23927 # var hexString = rgbNumber.toString(16);
23928 # var missingZeros = 6 - hexString.length;
23929 # var resultBuilder = ['#'];
23930 # for (var i = 0; i < missingZeros; i++) {
23931 # resultBuilder.push('0');
23932 # }
23933 # resultBuilder.push(hexString);
23934 # return resultBuilder.join('');
23935 # };
23936 #
23937 # // ...
23938 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23939 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23940 # the final pixel color is defined by the equation:
23941 #
23942 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23943 #
23944 # This means that a value of 1.0 corresponds to a solid color, whereas
23945 # a value of 0.0 corresponds to a completely transparent color. This
23946 # uses a wrapper message rather than a simple float scalar so that it is
23947 # possible to distinguish between a default value and the value being unset.
23948 # If omitted, this color object is to be rendered as a solid color
23949 # (as if the alpha value had been explicitly given with a value of 1.0).
23950 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23951 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23952 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023953 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023954 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
23955 # Absent values indicate that the field isn't specified.
23956 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
23957 # for simplicity of conversion to/from color representations in various
23958 # languages over compactness; for example, the fields of this representation
23959 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23960 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23961 # method in iOS; and, with just a little work, it can be easily formatted into
23962 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23963 #
23964 # Example (Java):
23965 #
23966 # import com.google.type.Color;
23967 #
23968 # // ...
23969 # public static java.awt.Color fromProto(Color protocolor) {
23970 # float alpha = protocolor.hasAlpha()
23971 # ? protocolor.getAlpha().getValue()
23972 # : 1.0;
23973 #
23974 # return new java.awt.Color(
23975 # protocolor.getRed(),
23976 # protocolor.getGreen(),
23977 # protocolor.getBlue(),
23978 # alpha);
23979 # }
23980 #
23981 # public static Color toProto(java.awt.Color color) {
23982 # float red = (float) color.getRed();
23983 # float green = (float) color.getGreen();
23984 # float blue = (float) color.getBlue();
23985 # float denominator = 255.0;
23986 # Color.Builder resultBuilder =
23987 # Color
23988 # .newBuilder()
23989 # .setRed(red / denominator)
23990 # .setGreen(green / denominator)
23991 # .setBlue(blue / denominator);
23992 # int alpha = color.getAlpha();
23993 # if (alpha != 255) {
23994 # result.setAlpha(
23995 # FloatValue
23996 # .newBuilder()
23997 # .setValue(((float) alpha) / denominator)
23998 # .build());
23999 # }
24000 # return resultBuilder.build();
24001 # }
24002 # // ...
24003 #
24004 # Example (iOS / Obj-C):
24005 #
24006 # // ...
24007 # static UIColor* fromProto(Color* protocolor) {
24008 # float red = [protocolor red];
24009 # float green = [protocolor green];
24010 # float blue = [protocolor blue];
24011 # FloatValue* alpha_wrapper = [protocolor alpha];
24012 # float alpha = 1.0;
24013 # if (alpha_wrapper != nil) {
24014 # alpha = [alpha_wrapper value];
24015 # }
24016 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24017 # }
24018 #
24019 # static Color* toProto(UIColor* color) {
24020 # CGFloat red, green, blue, alpha;
24021 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24022 # return nil;
24023 # }
24024 # Color* result = [Color alloc] init];
24025 # [result setRed:red];
24026 # [result setGreen:green];
24027 # [result setBlue:blue];
24028 # if (alpha <= 0.9999) {
24029 # [result setAlpha:floatWrapperWithValue(alpha)];
24030 # }
24031 # [result autorelease];
24032 # return result;
24033 # }
24034 # // ...
24035 #
24036 # Example (JavaScript):
24037 #
24038 # // ...
24039 #
24040 # var protoToCssColor = function(rgb_color) {
24041 # var redFrac = rgb_color.red || 0.0;
24042 # var greenFrac = rgb_color.green || 0.0;
24043 # var blueFrac = rgb_color.blue || 0.0;
24044 # var red = Math.floor(redFrac * 255);
24045 # var green = Math.floor(greenFrac * 255);
24046 # var blue = Math.floor(blueFrac * 255);
24047 #
24048 # if (!('alpha' in rgb_color)) {
24049 # return rgbToCssColor_(red, green, blue);
24050 # }
24051 #
24052 # var alphaFrac = rgb_color.alpha.value || 0.0;
24053 # var rgbParams = [red, green, blue].join(',');
24054 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24055 # };
24056 #
24057 # var rgbToCssColor_ = function(red, green, blue) {
24058 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24059 # var hexString = rgbNumber.toString(16);
24060 # var missingZeros = 6 - hexString.length;
24061 # var resultBuilder = ['#'];
24062 # for (var i = 0; i < missingZeros; i++) {
24063 # resultBuilder.push('0');
24064 # }
24065 # resultBuilder.push(hexString);
24066 # return resultBuilder.join('');
24067 # };
24068 #
24069 # // ...
24070 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24071 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24072 # the final pixel color is defined by the equation:
24073 #
24074 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24075 #
24076 # This means that a value of 1.0 corresponds to a solid color, whereas
24077 # a value of 0.0 corresponds to a completely transparent color. This
24078 # uses a wrapper message rather than a simple float scalar so that it is
24079 # possible to distinguish between a default value and the value being unset.
24080 # If omitted, this color object is to be rendered as a solid color
24081 # (as if the alpha value had been explicitly given with a value of 1.0).
24082 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24083 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24084 },
24085 "bold": True or False, # True if the text is bold.
24086 "strikethrough": True or False, # True if the text has a strikethrough.
24087 "fontFamily": "A String", # The font family.
24088 "fontSize": 42, # The size of the font.
24089 "italic": True or False, # True if the text is italicized.
24090 "underline": True or False, # True if the text is underlined.
24091 },
24092 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
24093 "borders": { # The borders of the cell. # The borders of the cell.
24094 "top": { # A border along a cell. # The top border of the cell.
24095 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
24096 # for simplicity of conversion to/from color representations in various
24097 # languages over compactness; for example, the fields of this representation
24098 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24099 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24100 # method in iOS; and, with just a little work, it can be easily formatted into
24101 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24102 #
24103 # Example (Java):
24104 #
24105 # import com.google.type.Color;
24106 #
24107 # // ...
24108 # public static java.awt.Color fromProto(Color protocolor) {
24109 # float alpha = protocolor.hasAlpha()
24110 # ? protocolor.getAlpha().getValue()
24111 # : 1.0;
24112 #
24113 # return new java.awt.Color(
24114 # protocolor.getRed(),
24115 # protocolor.getGreen(),
24116 # protocolor.getBlue(),
24117 # alpha);
24118 # }
24119 #
24120 # public static Color toProto(java.awt.Color color) {
24121 # float red = (float) color.getRed();
24122 # float green = (float) color.getGreen();
24123 # float blue = (float) color.getBlue();
24124 # float denominator = 255.0;
24125 # Color.Builder resultBuilder =
24126 # Color
24127 # .newBuilder()
24128 # .setRed(red / denominator)
24129 # .setGreen(green / denominator)
24130 # .setBlue(blue / denominator);
24131 # int alpha = color.getAlpha();
24132 # if (alpha != 255) {
24133 # result.setAlpha(
24134 # FloatValue
24135 # .newBuilder()
24136 # .setValue(((float) alpha) / denominator)
24137 # .build());
24138 # }
24139 # return resultBuilder.build();
24140 # }
24141 # // ...
24142 #
24143 # Example (iOS / Obj-C):
24144 #
24145 # // ...
24146 # static UIColor* fromProto(Color* protocolor) {
24147 # float red = [protocolor red];
24148 # float green = [protocolor green];
24149 # float blue = [protocolor blue];
24150 # FloatValue* alpha_wrapper = [protocolor alpha];
24151 # float alpha = 1.0;
24152 # if (alpha_wrapper != nil) {
24153 # alpha = [alpha_wrapper value];
24154 # }
24155 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24156 # }
24157 #
24158 # static Color* toProto(UIColor* color) {
24159 # CGFloat red, green, blue, alpha;
24160 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24161 # return nil;
24162 # }
24163 # Color* result = [Color alloc] init];
24164 # [result setRed:red];
24165 # [result setGreen:green];
24166 # [result setBlue:blue];
24167 # if (alpha <= 0.9999) {
24168 # [result setAlpha:floatWrapperWithValue(alpha)];
24169 # }
24170 # [result autorelease];
24171 # return result;
24172 # }
24173 # // ...
24174 #
24175 # Example (JavaScript):
24176 #
24177 # // ...
24178 #
24179 # var protoToCssColor = function(rgb_color) {
24180 # var redFrac = rgb_color.red || 0.0;
24181 # var greenFrac = rgb_color.green || 0.0;
24182 # var blueFrac = rgb_color.blue || 0.0;
24183 # var red = Math.floor(redFrac * 255);
24184 # var green = Math.floor(greenFrac * 255);
24185 # var blue = Math.floor(blueFrac * 255);
24186 #
24187 # if (!('alpha' in rgb_color)) {
24188 # return rgbToCssColor_(red, green, blue);
24189 # }
24190 #
24191 # var alphaFrac = rgb_color.alpha.value || 0.0;
24192 # var rgbParams = [red, green, blue].join(',');
24193 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24194 # };
24195 #
24196 # var rgbToCssColor_ = function(red, green, blue) {
24197 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24198 # var hexString = rgbNumber.toString(16);
24199 # var missingZeros = 6 - hexString.length;
24200 # var resultBuilder = ['#'];
24201 # for (var i = 0; i < missingZeros; i++) {
24202 # resultBuilder.push('0');
24203 # }
24204 # resultBuilder.push(hexString);
24205 # return resultBuilder.join('');
24206 # };
24207 #
24208 # // ...
24209 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24210 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24211 # the final pixel color is defined by the equation:
24212 #
24213 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24214 #
24215 # This means that a value of 1.0 corresponds to a solid color, whereas
24216 # a value of 0.0 corresponds to a completely transparent color. This
24217 # uses a wrapper message rather than a simple float scalar so that it is
24218 # possible to distinguish between a default value and the value being unset.
24219 # If omitted, this color object is to be rendered as a solid color
24220 # (as if the alpha value had been explicitly given with a value of 1.0).
24221 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24222 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24223 },
24224 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024225 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024226 "style": "A String", # The style of the border.
24227 },
24228 "right": { # A border along a cell. # The right border of the cell.
24229 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
24230 # for simplicity of conversion to/from color representations in various
24231 # languages over compactness; for example, the fields of this representation
24232 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24233 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24234 # method in iOS; and, with just a little work, it can be easily formatted into
24235 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24236 #
24237 # Example (Java):
24238 #
24239 # import com.google.type.Color;
24240 #
24241 # // ...
24242 # public static java.awt.Color fromProto(Color protocolor) {
24243 # float alpha = protocolor.hasAlpha()
24244 # ? protocolor.getAlpha().getValue()
24245 # : 1.0;
24246 #
24247 # return new java.awt.Color(
24248 # protocolor.getRed(),
24249 # protocolor.getGreen(),
24250 # protocolor.getBlue(),
24251 # alpha);
24252 # }
24253 #
24254 # public static Color toProto(java.awt.Color color) {
24255 # float red = (float) color.getRed();
24256 # float green = (float) color.getGreen();
24257 # float blue = (float) color.getBlue();
24258 # float denominator = 255.0;
24259 # Color.Builder resultBuilder =
24260 # Color
24261 # .newBuilder()
24262 # .setRed(red / denominator)
24263 # .setGreen(green / denominator)
24264 # .setBlue(blue / denominator);
24265 # int alpha = color.getAlpha();
24266 # if (alpha != 255) {
24267 # result.setAlpha(
24268 # FloatValue
24269 # .newBuilder()
24270 # .setValue(((float) alpha) / denominator)
24271 # .build());
24272 # }
24273 # return resultBuilder.build();
24274 # }
24275 # // ...
24276 #
24277 # Example (iOS / Obj-C):
24278 #
24279 # // ...
24280 # static UIColor* fromProto(Color* protocolor) {
24281 # float red = [protocolor red];
24282 # float green = [protocolor green];
24283 # float blue = [protocolor blue];
24284 # FloatValue* alpha_wrapper = [protocolor alpha];
24285 # float alpha = 1.0;
24286 # if (alpha_wrapper != nil) {
24287 # alpha = [alpha_wrapper value];
24288 # }
24289 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24290 # }
24291 #
24292 # static Color* toProto(UIColor* color) {
24293 # CGFloat red, green, blue, alpha;
24294 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24295 # return nil;
24296 # }
24297 # Color* result = [Color alloc] init];
24298 # [result setRed:red];
24299 # [result setGreen:green];
24300 # [result setBlue:blue];
24301 # if (alpha <= 0.9999) {
24302 # [result setAlpha:floatWrapperWithValue(alpha)];
24303 # }
24304 # [result autorelease];
24305 # return result;
24306 # }
24307 # // ...
24308 #
24309 # Example (JavaScript):
24310 #
24311 # // ...
24312 #
24313 # var protoToCssColor = function(rgb_color) {
24314 # var redFrac = rgb_color.red || 0.0;
24315 # var greenFrac = rgb_color.green || 0.0;
24316 # var blueFrac = rgb_color.blue || 0.0;
24317 # var red = Math.floor(redFrac * 255);
24318 # var green = Math.floor(greenFrac * 255);
24319 # var blue = Math.floor(blueFrac * 255);
24320 #
24321 # if (!('alpha' in rgb_color)) {
24322 # return rgbToCssColor_(red, green, blue);
24323 # }
24324 #
24325 # var alphaFrac = rgb_color.alpha.value || 0.0;
24326 # var rgbParams = [red, green, blue].join(',');
24327 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24328 # };
24329 #
24330 # var rgbToCssColor_ = function(red, green, blue) {
24331 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24332 # var hexString = rgbNumber.toString(16);
24333 # var missingZeros = 6 - hexString.length;
24334 # var resultBuilder = ['#'];
24335 # for (var i = 0; i < missingZeros; i++) {
24336 # resultBuilder.push('0');
24337 # }
24338 # resultBuilder.push(hexString);
24339 # return resultBuilder.join('');
24340 # };
24341 #
24342 # // ...
24343 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24344 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24345 # the final pixel color is defined by the equation:
24346 #
24347 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24348 #
24349 # This means that a value of 1.0 corresponds to a solid color, whereas
24350 # a value of 0.0 corresponds to a completely transparent color. This
24351 # uses a wrapper message rather than a simple float scalar so that it is
24352 # possible to distinguish between a default value and the value being unset.
24353 # If omitted, this color object is to be rendered as a solid color
24354 # (as if the alpha value had been explicitly given with a value of 1.0).
24355 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24356 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24357 },
24358 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024359 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024360 "style": "A String", # The style of the border.
24361 },
24362 "bottom": { # A border along a cell. # The bottom border of the cell.
24363 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
24364 # for simplicity of conversion to/from color representations in various
24365 # languages over compactness; for example, the fields of this representation
24366 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24367 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24368 # method in iOS; and, with just a little work, it can be easily formatted into
24369 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24370 #
24371 # Example (Java):
24372 #
24373 # import com.google.type.Color;
24374 #
24375 # // ...
24376 # public static java.awt.Color fromProto(Color protocolor) {
24377 # float alpha = protocolor.hasAlpha()
24378 # ? protocolor.getAlpha().getValue()
24379 # : 1.0;
24380 #
24381 # return new java.awt.Color(
24382 # protocolor.getRed(),
24383 # protocolor.getGreen(),
24384 # protocolor.getBlue(),
24385 # alpha);
24386 # }
24387 #
24388 # public static Color toProto(java.awt.Color color) {
24389 # float red = (float) color.getRed();
24390 # float green = (float) color.getGreen();
24391 # float blue = (float) color.getBlue();
24392 # float denominator = 255.0;
24393 # Color.Builder resultBuilder =
24394 # Color
24395 # .newBuilder()
24396 # .setRed(red / denominator)
24397 # .setGreen(green / denominator)
24398 # .setBlue(blue / denominator);
24399 # int alpha = color.getAlpha();
24400 # if (alpha != 255) {
24401 # result.setAlpha(
24402 # FloatValue
24403 # .newBuilder()
24404 # .setValue(((float) alpha) / denominator)
24405 # .build());
24406 # }
24407 # return resultBuilder.build();
24408 # }
24409 # // ...
24410 #
24411 # Example (iOS / Obj-C):
24412 #
24413 # // ...
24414 # static UIColor* fromProto(Color* protocolor) {
24415 # float red = [protocolor red];
24416 # float green = [protocolor green];
24417 # float blue = [protocolor blue];
24418 # FloatValue* alpha_wrapper = [protocolor alpha];
24419 # float alpha = 1.0;
24420 # if (alpha_wrapper != nil) {
24421 # alpha = [alpha_wrapper value];
24422 # }
24423 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24424 # }
24425 #
24426 # static Color* toProto(UIColor* color) {
24427 # CGFloat red, green, blue, alpha;
24428 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24429 # return nil;
24430 # }
24431 # Color* result = [Color alloc] init];
24432 # [result setRed:red];
24433 # [result setGreen:green];
24434 # [result setBlue:blue];
24435 # if (alpha <= 0.9999) {
24436 # [result setAlpha:floatWrapperWithValue(alpha)];
24437 # }
24438 # [result autorelease];
24439 # return result;
24440 # }
24441 # // ...
24442 #
24443 # Example (JavaScript):
24444 #
24445 # // ...
24446 #
24447 # var protoToCssColor = function(rgb_color) {
24448 # var redFrac = rgb_color.red || 0.0;
24449 # var greenFrac = rgb_color.green || 0.0;
24450 # var blueFrac = rgb_color.blue || 0.0;
24451 # var red = Math.floor(redFrac * 255);
24452 # var green = Math.floor(greenFrac * 255);
24453 # var blue = Math.floor(blueFrac * 255);
24454 #
24455 # if (!('alpha' in rgb_color)) {
24456 # return rgbToCssColor_(red, green, blue);
24457 # }
24458 #
24459 # var alphaFrac = rgb_color.alpha.value || 0.0;
24460 # var rgbParams = [red, green, blue].join(',');
24461 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24462 # };
24463 #
24464 # var rgbToCssColor_ = function(red, green, blue) {
24465 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24466 # var hexString = rgbNumber.toString(16);
24467 # var missingZeros = 6 - hexString.length;
24468 # var resultBuilder = ['#'];
24469 # for (var i = 0; i < missingZeros; i++) {
24470 # resultBuilder.push('0');
24471 # }
24472 # resultBuilder.push(hexString);
24473 # return resultBuilder.join('');
24474 # };
24475 #
24476 # // ...
24477 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24478 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24479 # the final pixel color is defined by the equation:
24480 #
24481 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24482 #
24483 # This means that a value of 1.0 corresponds to a solid color, whereas
24484 # a value of 0.0 corresponds to a completely transparent color. This
24485 # uses a wrapper message rather than a simple float scalar so that it is
24486 # possible to distinguish between a default value and the value being unset.
24487 # If omitted, this color object is to be rendered as a solid color
24488 # (as if the alpha value had been explicitly given with a value of 1.0).
24489 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24490 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24491 },
24492 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024493 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024494 "style": "A String", # The style of the border.
24495 },
24496 "left": { # A border along a cell. # The left border of the cell.
24497 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
24498 # for simplicity of conversion to/from color representations in various
24499 # languages over compactness; for example, the fields of this representation
24500 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24501 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24502 # method in iOS; and, with just a little work, it can be easily formatted into
24503 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24504 #
24505 # Example (Java):
24506 #
24507 # import com.google.type.Color;
24508 #
24509 # // ...
24510 # public static java.awt.Color fromProto(Color protocolor) {
24511 # float alpha = protocolor.hasAlpha()
24512 # ? protocolor.getAlpha().getValue()
24513 # : 1.0;
24514 #
24515 # return new java.awt.Color(
24516 # protocolor.getRed(),
24517 # protocolor.getGreen(),
24518 # protocolor.getBlue(),
24519 # alpha);
24520 # }
24521 #
24522 # public static Color toProto(java.awt.Color color) {
24523 # float red = (float) color.getRed();
24524 # float green = (float) color.getGreen();
24525 # float blue = (float) color.getBlue();
24526 # float denominator = 255.0;
24527 # Color.Builder resultBuilder =
24528 # Color
24529 # .newBuilder()
24530 # .setRed(red / denominator)
24531 # .setGreen(green / denominator)
24532 # .setBlue(blue / denominator);
24533 # int alpha = color.getAlpha();
24534 # if (alpha != 255) {
24535 # result.setAlpha(
24536 # FloatValue
24537 # .newBuilder()
24538 # .setValue(((float) alpha) / denominator)
24539 # .build());
24540 # }
24541 # return resultBuilder.build();
24542 # }
24543 # // ...
24544 #
24545 # Example (iOS / Obj-C):
24546 #
24547 # // ...
24548 # static UIColor* fromProto(Color* protocolor) {
24549 # float red = [protocolor red];
24550 # float green = [protocolor green];
24551 # float blue = [protocolor blue];
24552 # FloatValue* alpha_wrapper = [protocolor alpha];
24553 # float alpha = 1.0;
24554 # if (alpha_wrapper != nil) {
24555 # alpha = [alpha_wrapper value];
24556 # }
24557 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24558 # }
24559 #
24560 # static Color* toProto(UIColor* color) {
24561 # CGFloat red, green, blue, alpha;
24562 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24563 # return nil;
24564 # }
24565 # Color* result = [Color alloc] init];
24566 # [result setRed:red];
24567 # [result setGreen:green];
24568 # [result setBlue:blue];
24569 # if (alpha <= 0.9999) {
24570 # [result setAlpha:floatWrapperWithValue(alpha)];
24571 # }
24572 # [result autorelease];
24573 # return result;
24574 # }
24575 # // ...
24576 #
24577 # Example (JavaScript):
24578 #
24579 # // ...
24580 #
24581 # var protoToCssColor = function(rgb_color) {
24582 # var redFrac = rgb_color.red || 0.0;
24583 # var greenFrac = rgb_color.green || 0.0;
24584 # var blueFrac = rgb_color.blue || 0.0;
24585 # var red = Math.floor(redFrac * 255);
24586 # var green = Math.floor(greenFrac * 255);
24587 # var blue = Math.floor(blueFrac * 255);
24588 #
24589 # if (!('alpha' in rgb_color)) {
24590 # return rgbToCssColor_(red, green, blue);
24591 # }
24592 #
24593 # var alphaFrac = rgb_color.alpha.value || 0.0;
24594 # var rgbParams = [red, green, blue].join(',');
24595 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24596 # };
24597 #
24598 # var rgbToCssColor_ = function(red, green, blue) {
24599 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24600 # var hexString = rgbNumber.toString(16);
24601 # var missingZeros = 6 - hexString.length;
24602 # var resultBuilder = ['#'];
24603 # for (var i = 0; i < missingZeros; i++) {
24604 # resultBuilder.push('0');
24605 # }
24606 # resultBuilder.push(hexString);
24607 # return resultBuilder.join('');
24608 # };
24609 #
24610 # // ...
24611 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24612 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24613 # the final pixel color is defined by the equation:
24614 #
24615 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24616 #
24617 # This means that a value of 1.0 corresponds to a solid color, whereas
24618 # a value of 0.0 corresponds to a completely transparent color. This
24619 # uses a wrapper message rather than a simple float scalar so that it is
24620 # possible to distinguish between a default value and the value being unset.
24621 # If omitted, this color object is to be rendered as a solid color
24622 # (as if the alpha value had been explicitly given with a value of 1.0).
24623 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24624 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24625 },
24626 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024627 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024628 "style": "A String", # The style of the border.
24629 },
24630 },
24631 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
24632 },
24633 "title": "A String", # The title of the spreadsheet.
24634 },
24635 "sheets": [ # The sheets that are part of a spreadsheet.
24636 { # A sheet in a spreadsheet.
24637 "conditionalFormats": [ # The conditional format rules in this sheet.
24638 { # A rule describing a conditional format.
24639 "ranges": [ # The ranges that will be formatted if the condition is true.
24640 # All the ranges must be on the same grid.
24641 { # A range on a sheet.
24642 # All indexes are zero-based.
24643 # Indexes are half open, e.g the start index is inclusive
24644 # and the end index is exclusive -- [start_index, end_index).
24645 # Missing indexes indicate the range is unbounded on that side.
24646 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024647 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024648 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024649 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024650 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024651 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024652 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024653 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024654 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024655 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024656 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024657 # `Sheet1!A:B == sheet_id: 0,
24658 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024659 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024660 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024661 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024662 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024663 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024664 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024665 #
24666 # The start index must always be less than or equal to the end index.
24667 # If the start index equals the end index, then the range is empty.
24668 # Empty ranges are typically not meaningful and are usually rendered in the
24669 # UI as `#REF!`.
24670 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
24671 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
24672 "sheetId": 42, # The sheet this range is on.
24673 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
24674 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
24675 },
24676 ],
24677 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
24678 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
24679 # the format will be applied.
24680 # BooleanConditions are used by conditional formatting,
24681 # data validation, and the criteria in filters.
24682 "type": "A String", # The type of condition.
24683 "values": [ # The values of the condition. The number of supported values depends
24684 # on the condition type. Some support zero values,
24685 # others one or two values,
24686 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
24687 { # The value of the condition.
24688 "relativeDate": "A String", # A relative date (based on the current date).
24689 # Valid only if the type is
24690 # DATE_BEFORE,
24691 # DATE_AFTER,
24692 # DATE_ON_OR_BEFORE or
24693 # DATE_ON_OR_AFTER.
24694 #
24695 # Relative dates are not supported in data validation.
24696 # They are supported only in conditional formatting and
24697 # conditional filters.
24698 "userEnteredValue": "A String", # A value the condition is based on.
24699 # The value will be parsed as if the user typed into a cell.
24700 # Formulas are supported (and must begin with an `=`).
24701 },
24702 ],
24703 },
24704 "format": { # The format of a cell. # The format to apply.
24705 # Conditional formatting can only apply a subset of formatting:
24706 # bold, italic,
24707 # strikethrough,
24708 # foreground color &
24709 # background color.
24710 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024711 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
24712 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024713 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024714 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024715 },
24716 "textDirection": "A String", # The direction of the text in the cell.
24717 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
24718 # When updating padding, every field must be specified.
24719 "top": 42, # The top padding of the cell.
24720 "right": 42, # The right padding of the cell.
24721 "bottom": 42, # The bottom padding of the cell.
24722 "left": 42, # The left padding of the cell.
24723 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024724 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024725 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
24726 # for simplicity of conversion to/from color representations in various
24727 # languages over compactness; for example, the fields of this representation
24728 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24729 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24730 # method in iOS; and, with just a little work, it can be easily formatted into
24731 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24732 #
24733 # Example (Java):
24734 #
24735 # import com.google.type.Color;
24736 #
24737 # // ...
24738 # public static java.awt.Color fromProto(Color protocolor) {
24739 # float alpha = protocolor.hasAlpha()
24740 # ? protocolor.getAlpha().getValue()
24741 # : 1.0;
24742 #
24743 # return new java.awt.Color(
24744 # protocolor.getRed(),
24745 # protocolor.getGreen(),
24746 # protocolor.getBlue(),
24747 # alpha);
24748 # }
24749 #
24750 # public static Color toProto(java.awt.Color color) {
24751 # float red = (float) color.getRed();
24752 # float green = (float) color.getGreen();
24753 # float blue = (float) color.getBlue();
24754 # float denominator = 255.0;
24755 # Color.Builder resultBuilder =
24756 # Color
24757 # .newBuilder()
24758 # .setRed(red / denominator)
24759 # .setGreen(green / denominator)
24760 # .setBlue(blue / denominator);
24761 # int alpha = color.getAlpha();
24762 # if (alpha != 255) {
24763 # result.setAlpha(
24764 # FloatValue
24765 # .newBuilder()
24766 # .setValue(((float) alpha) / denominator)
24767 # .build());
24768 # }
24769 # return resultBuilder.build();
24770 # }
24771 # // ...
24772 #
24773 # Example (iOS / Obj-C):
24774 #
24775 # // ...
24776 # static UIColor* fromProto(Color* protocolor) {
24777 # float red = [protocolor red];
24778 # float green = [protocolor green];
24779 # float blue = [protocolor blue];
24780 # FloatValue* alpha_wrapper = [protocolor alpha];
24781 # float alpha = 1.0;
24782 # if (alpha_wrapper != nil) {
24783 # alpha = [alpha_wrapper value];
24784 # }
24785 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24786 # }
24787 #
24788 # static Color* toProto(UIColor* color) {
24789 # CGFloat red, green, blue, alpha;
24790 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24791 # return nil;
24792 # }
24793 # Color* result = [Color alloc] init];
24794 # [result setRed:red];
24795 # [result setGreen:green];
24796 # [result setBlue:blue];
24797 # if (alpha <= 0.9999) {
24798 # [result setAlpha:floatWrapperWithValue(alpha)];
24799 # }
24800 # [result autorelease];
24801 # return result;
24802 # }
24803 # // ...
24804 #
24805 # Example (JavaScript):
24806 #
24807 # // ...
24808 #
24809 # var protoToCssColor = function(rgb_color) {
24810 # var redFrac = rgb_color.red || 0.0;
24811 # var greenFrac = rgb_color.green || 0.0;
24812 # var blueFrac = rgb_color.blue || 0.0;
24813 # var red = Math.floor(redFrac * 255);
24814 # var green = Math.floor(greenFrac * 255);
24815 # var blue = Math.floor(blueFrac * 255);
24816 #
24817 # if (!('alpha' in rgb_color)) {
24818 # return rgbToCssColor_(red, green, blue);
24819 # }
24820 #
24821 # var alphaFrac = rgb_color.alpha.value || 0.0;
24822 # var rgbParams = [red, green, blue].join(',');
24823 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24824 # };
24825 #
24826 # var rgbToCssColor_ = function(red, green, blue) {
24827 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24828 # var hexString = rgbNumber.toString(16);
24829 # var missingZeros = 6 - hexString.length;
24830 # var resultBuilder = ['#'];
24831 # for (var i = 0; i < missingZeros; i++) {
24832 # resultBuilder.push('0');
24833 # }
24834 # resultBuilder.push(hexString);
24835 # return resultBuilder.join('');
24836 # };
24837 #
24838 # // ...
24839 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24840 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24841 # the final pixel color is defined by the equation:
24842 #
24843 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24844 #
24845 # This means that a value of 1.0 corresponds to a solid color, whereas
24846 # a value of 0.0 corresponds to a completely transparent color. This
24847 # uses a wrapper message rather than a simple float scalar so that it is
24848 # possible to distinguish between a default value and the value being unset.
24849 # If omitted, this color object is to be rendered as a solid color
24850 # (as if the alpha value had been explicitly given with a value of 1.0).
24851 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24852 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24853 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024854 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024855 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
24856 # Absent values indicate that the field isn't specified.
24857 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
24858 # for simplicity of conversion to/from color representations in various
24859 # languages over compactness; for example, the fields of this representation
24860 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24861 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24862 # method in iOS; and, with just a little work, it can be easily formatted into
24863 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24864 #
24865 # Example (Java):
24866 #
24867 # import com.google.type.Color;
24868 #
24869 # // ...
24870 # public static java.awt.Color fromProto(Color protocolor) {
24871 # float alpha = protocolor.hasAlpha()
24872 # ? protocolor.getAlpha().getValue()
24873 # : 1.0;
24874 #
24875 # return new java.awt.Color(
24876 # protocolor.getRed(),
24877 # protocolor.getGreen(),
24878 # protocolor.getBlue(),
24879 # alpha);
24880 # }
24881 #
24882 # public static Color toProto(java.awt.Color color) {
24883 # float red = (float) color.getRed();
24884 # float green = (float) color.getGreen();
24885 # float blue = (float) color.getBlue();
24886 # float denominator = 255.0;
24887 # Color.Builder resultBuilder =
24888 # Color
24889 # .newBuilder()
24890 # .setRed(red / denominator)
24891 # .setGreen(green / denominator)
24892 # .setBlue(blue / denominator);
24893 # int alpha = color.getAlpha();
24894 # if (alpha != 255) {
24895 # result.setAlpha(
24896 # FloatValue
24897 # .newBuilder()
24898 # .setValue(((float) alpha) / denominator)
24899 # .build());
24900 # }
24901 # return resultBuilder.build();
24902 # }
24903 # // ...
24904 #
24905 # Example (iOS / Obj-C):
24906 #
24907 # // ...
24908 # static UIColor* fromProto(Color* protocolor) {
24909 # float red = [protocolor red];
24910 # float green = [protocolor green];
24911 # float blue = [protocolor blue];
24912 # FloatValue* alpha_wrapper = [protocolor alpha];
24913 # float alpha = 1.0;
24914 # if (alpha_wrapper != nil) {
24915 # alpha = [alpha_wrapper value];
24916 # }
24917 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24918 # }
24919 #
24920 # static Color* toProto(UIColor* color) {
24921 # CGFloat red, green, blue, alpha;
24922 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24923 # return nil;
24924 # }
24925 # Color* result = [Color alloc] init];
24926 # [result setRed:red];
24927 # [result setGreen:green];
24928 # [result setBlue:blue];
24929 # if (alpha <= 0.9999) {
24930 # [result setAlpha:floatWrapperWithValue(alpha)];
24931 # }
24932 # [result autorelease];
24933 # return result;
24934 # }
24935 # // ...
24936 #
24937 # Example (JavaScript):
24938 #
24939 # // ...
24940 #
24941 # var protoToCssColor = function(rgb_color) {
24942 # var redFrac = rgb_color.red || 0.0;
24943 # var greenFrac = rgb_color.green || 0.0;
24944 # var blueFrac = rgb_color.blue || 0.0;
24945 # var red = Math.floor(redFrac * 255);
24946 # var green = Math.floor(greenFrac * 255);
24947 # var blue = Math.floor(blueFrac * 255);
24948 #
24949 # if (!('alpha' in rgb_color)) {
24950 # return rgbToCssColor_(red, green, blue);
24951 # }
24952 #
24953 # var alphaFrac = rgb_color.alpha.value || 0.0;
24954 # var rgbParams = [red, green, blue].join(',');
24955 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24956 # };
24957 #
24958 # var rgbToCssColor_ = function(red, green, blue) {
24959 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24960 # var hexString = rgbNumber.toString(16);
24961 # var missingZeros = 6 - hexString.length;
24962 # var resultBuilder = ['#'];
24963 # for (var i = 0; i < missingZeros; i++) {
24964 # resultBuilder.push('0');
24965 # }
24966 # resultBuilder.push(hexString);
24967 # return resultBuilder.join('');
24968 # };
24969 #
24970 # // ...
24971 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24972 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24973 # the final pixel color is defined by the equation:
24974 #
24975 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24976 #
24977 # This means that a value of 1.0 corresponds to a solid color, whereas
24978 # a value of 0.0 corresponds to a completely transparent color. This
24979 # uses a wrapper message rather than a simple float scalar so that it is
24980 # possible to distinguish between a default value and the value being unset.
24981 # If omitted, this color object is to be rendered as a solid color
24982 # (as if the alpha value had been explicitly given with a value of 1.0).
24983 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24984 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24985 },
24986 "bold": True or False, # True if the text is bold.
24987 "strikethrough": True or False, # True if the text has a strikethrough.
24988 "fontFamily": "A String", # The font family.
24989 "fontSize": 42, # The size of the font.
24990 "italic": True or False, # True if the text is italicized.
24991 "underline": True or False, # True if the text is underlined.
24992 },
24993 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
24994 "borders": { # The borders of the cell. # The borders of the cell.
24995 "top": { # A border along a cell. # The top border of the cell.
24996 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
24997 # for simplicity of conversion to/from color representations in various
24998 # languages over compactness; for example, the fields of this representation
24999 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25000 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25001 # method in iOS; and, with just a little work, it can be easily formatted into
25002 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25003 #
25004 # Example (Java):
25005 #
25006 # import com.google.type.Color;
25007 #
25008 # // ...
25009 # public static java.awt.Color fromProto(Color protocolor) {
25010 # float alpha = protocolor.hasAlpha()
25011 # ? protocolor.getAlpha().getValue()
25012 # : 1.0;
25013 #
25014 # return new java.awt.Color(
25015 # protocolor.getRed(),
25016 # protocolor.getGreen(),
25017 # protocolor.getBlue(),
25018 # alpha);
25019 # }
25020 #
25021 # public static Color toProto(java.awt.Color color) {
25022 # float red = (float) color.getRed();
25023 # float green = (float) color.getGreen();
25024 # float blue = (float) color.getBlue();
25025 # float denominator = 255.0;
25026 # Color.Builder resultBuilder =
25027 # Color
25028 # .newBuilder()
25029 # .setRed(red / denominator)
25030 # .setGreen(green / denominator)
25031 # .setBlue(blue / denominator);
25032 # int alpha = color.getAlpha();
25033 # if (alpha != 255) {
25034 # result.setAlpha(
25035 # FloatValue
25036 # .newBuilder()
25037 # .setValue(((float) alpha) / denominator)
25038 # .build());
25039 # }
25040 # return resultBuilder.build();
25041 # }
25042 # // ...
25043 #
25044 # Example (iOS / Obj-C):
25045 #
25046 # // ...
25047 # static UIColor* fromProto(Color* protocolor) {
25048 # float red = [protocolor red];
25049 # float green = [protocolor green];
25050 # float blue = [protocolor blue];
25051 # FloatValue* alpha_wrapper = [protocolor alpha];
25052 # float alpha = 1.0;
25053 # if (alpha_wrapper != nil) {
25054 # alpha = [alpha_wrapper value];
25055 # }
25056 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25057 # }
25058 #
25059 # static Color* toProto(UIColor* color) {
25060 # CGFloat red, green, blue, alpha;
25061 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25062 # return nil;
25063 # }
25064 # Color* result = [Color alloc] init];
25065 # [result setRed:red];
25066 # [result setGreen:green];
25067 # [result setBlue:blue];
25068 # if (alpha <= 0.9999) {
25069 # [result setAlpha:floatWrapperWithValue(alpha)];
25070 # }
25071 # [result autorelease];
25072 # return result;
25073 # }
25074 # // ...
25075 #
25076 # Example (JavaScript):
25077 #
25078 # // ...
25079 #
25080 # var protoToCssColor = function(rgb_color) {
25081 # var redFrac = rgb_color.red || 0.0;
25082 # var greenFrac = rgb_color.green || 0.0;
25083 # var blueFrac = rgb_color.blue || 0.0;
25084 # var red = Math.floor(redFrac * 255);
25085 # var green = Math.floor(greenFrac * 255);
25086 # var blue = Math.floor(blueFrac * 255);
25087 #
25088 # if (!('alpha' in rgb_color)) {
25089 # return rgbToCssColor_(red, green, blue);
25090 # }
25091 #
25092 # var alphaFrac = rgb_color.alpha.value || 0.0;
25093 # var rgbParams = [red, green, blue].join(',');
25094 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25095 # };
25096 #
25097 # var rgbToCssColor_ = function(red, green, blue) {
25098 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25099 # var hexString = rgbNumber.toString(16);
25100 # var missingZeros = 6 - hexString.length;
25101 # var resultBuilder = ['#'];
25102 # for (var i = 0; i < missingZeros; i++) {
25103 # resultBuilder.push('0');
25104 # }
25105 # resultBuilder.push(hexString);
25106 # return resultBuilder.join('');
25107 # };
25108 #
25109 # // ...
25110 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25111 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25112 # the final pixel color is defined by the equation:
25113 #
25114 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25115 #
25116 # This means that a value of 1.0 corresponds to a solid color, whereas
25117 # a value of 0.0 corresponds to a completely transparent color. This
25118 # uses a wrapper message rather than a simple float scalar so that it is
25119 # possible to distinguish between a default value and the value being unset.
25120 # If omitted, this color object is to be rendered as a solid color
25121 # (as if the alpha value had been explicitly given with a value of 1.0).
25122 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25123 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25124 },
25125 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025126 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025127 "style": "A String", # The style of the border.
25128 },
25129 "right": { # A border along a cell. # The right border of the cell.
25130 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
25131 # for simplicity of conversion to/from color representations in various
25132 # languages over compactness; for example, the fields of this representation
25133 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25134 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25135 # method in iOS; and, with just a little work, it can be easily formatted into
25136 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25137 #
25138 # Example (Java):
25139 #
25140 # import com.google.type.Color;
25141 #
25142 # // ...
25143 # public static java.awt.Color fromProto(Color protocolor) {
25144 # float alpha = protocolor.hasAlpha()
25145 # ? protocolor.getAlpha().getValue()
25146 # : 1.0;
25147 #
25148 # return new java.awt.Color(
25149 # protocolor.getRed(),
25150 # protocolor.getGreen(),
25151 # protocolor.getBlue(),
25152 # alpha);
25153 # }
25154 #
25155 # public static Color toProto(java.awt.Color color) {
25156 # float red = (float) color.getRed();
25157 # float green = (float) color.getGreen();
25158 # float blue = (float) color.getBlue();
25159 # float denominator = 255.0;
25160 # Color.Builder resultBuilder =
25161 # Color
25162 # .newBuilder()
25163 # .setRed(red / denominator)
25164 # .setGreen(green / denominator)
25165 # .setBlue(blue / denominator);
25166 # int alpha = color.getAlpha();
25167 # if (alpha != 255) {
25168 # result.setAlpha(
25169 # FloatValue
25170 # .newBuilder()
25171 # .setValue(((float) alpha) / denominator)
25172 # .build());
25173 # }
25174 # return resultBuilder.build();
25175 # }
25176 # // ...
25177 #
25178 # Example (iOS / Obj-C):
25179 #
25180 # // ...
25181 # static UIColor* fromProto(Color* protocolor) {
25182 # float red = [protocolor red];
25183 # float green = [protocolor green];
25184 # float blue = [protocolor blue];
25185 # FloatValue* alpha_wrapper = [protocolor alpha];
25186 # float alpha = 1.0;
25187 # if (alpha_wrapper != nil) {
25188 # alpha = [alpha_wrapper value];
25189 # }
25190 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25191 # }
25192 #
25193 # static Color* toProto(UIColor* color) {
25194 # CGFloat red, green, blue, alpha;
25195 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25196 # return nil;
25197 # }
25198 # Color* result = [Color alloc] init];
25199 # [result setRed:red];
25200 # [result setGreen:green];
25201 # [result setBlue:blue];
25202 # if (alpha <= 0.9999) {
25203 # [result setAlpha:floatWrapperWithValue(alpha)];
25204 # }
25205 # [result autorelease];
25206 # return result;
25207 # }
25208 # // ...
25209 #
25210 # Example (JavaScript):
25211 #
25212 # // ...
25213 #
25214 # var protoToCssColor = function(rgb_color) {
25215 # var redFrac = rgb_color.red || 0.0;
25216 # var greenFrac = rgb_color.green || 0.0;
25217 # var blueFrac = rgb_color.blue || 0.0;
25218 # var red = Math.floor(redFrac * 255);
25219 # var green = Math.floor(greenFrac * 255);
25220 # var blue = Math.floor(blueFrac * 255);
25221 #
25222 # if (!('alpha' in rgb_color)) {
25223 # return rgbToCssColor_(red, green, blue);
25224 # }
25225 #
25226 # var alphaFrac = rgb_color.alpha.value || 0.0;
25227 # var rgbParams = [red, green, blue].join(',');
25228 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25229 # };
25230 #
25231 # var rgbToCssColor_ = function(red, green, blue) {
25232 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25233 # var hexString = rgbNumber.toString(16);
25234 # var missingZeros = 6 - hexString.length;
25235 # var resultBuilder = ['#'];
25236 # for (var i = 0; i < missingZeros; i++) {
25237 # resultBuilder.push('0');
25238 # }
25239 # resultBuilder.push(hexString);
25240 # return resultBuilder.join('');
25241 # };
25242 #
25243 # // ...
25244 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25245 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25246 # the final pixel color is defined by the equation:
25247 #
25248 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25249 #
25250 # This means that a value of 1.0 corresponds to a solid color, whereas
25251 # a value of 0.0 corresponds to a completely transparent color. This
25252 # uses a wrapper message rather than a simple float scalar so that it is
25253 # possible to distinguish between a default value and the value being unset.
25254 # If omitted, this color object is to be rendered as a solid color
25255 # (as if the alpha value had been explicitly given with a value of 1.0).
25256 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25257 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25258 },
25259 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025260 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025261 "style": "A String", # The style of the border.
25262 },
25263 "bottom": { # A border along a cell. # The bottom border of the cell.
25264 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
25265 # for simplicity of conversion to/from color representations in various
25266 # languages over compactness; for example, the fields of this representation
25267 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25268 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25269 # method in iOS; and, with just a little work, it can be easily formatted into
25270 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25271 #
25272 # Example (Java):
25273 #
25274 # import com.google.type.Color;
25275 #
25276 # // ...
25277 # public static java.awt.Color fromProto(Color protocolor) {
25278 # float alpha = protocolor.hasAlpha()
25279 # ? protocolor.getAlpha().getValue()
25280 # : 1.0;
25281 #
25282 # return new java.awt.Color(
25283 # protocolor.getRed(),
25284 # protocolor.getGreen(),
25285 # protocolor.getBlue(),
25286 # alpha);
25287 # }
25288 #
25289 # public static Color toProto(java.awt.Color color) {
25290 # float red = (float) color.getRed();
25291 # float green = (float) color.getGreen();
25292 # float blue = (float) color.getBlue();
25293 # float denominator = 255.0;
25294 # Color.Builder resultBuilder =
25295 # Color
25296 # .newBuilder()
25297 # .setRed(red / denominator)
25298 # .setGreen(green / denominator)
25299 # .setBlue(blue / denominator);
25300 # int alpha = color.getAlpha();
25301 # if (alpha != 255) {
25302 # result.setAlpha(
25303 # FloatValue
25304 # .newBuilder()
25305 # .setValue(((float) alpha) / denominator)
25306 # .build());
25307 # }
25308 # return resultBuilder.build();
25309 # }
25310 # // ...
25311 #
25312 # Example (iOS / Obj-C):
25313 #
25314 # // ...
25315 # static UIColor* fromProto(Color* protocolor) {
25316 # float red = [protocolor red];
25317 # float green = [protocolor green];
25318 # float blue = [protocolor blue];
25319 # FloatValue* alpha_wrapper = [protocolor alpha];
25320 # float alpha = 1.0;
25321 # if (alpha_wrapper != nil) {
25322 # alpha = [alpha_wrapper value];
25323 # }
25324 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25325 # }
25326 #
25327 # static Color* toProto(UIColor* color) {
25328 # CGFloat red, green, blue, alpha;
25329 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25330 # return nil;
25331 # }
25332 # Color* result = [Color alloc] init];
25333 # [result setRed:red];
25334 # [result setGreen:green];
25335 # [result setBlue:blue];
25336 # if (alpha <= 0.9999) {
25337 # [result setAlpha:floatWrapperWithValue(alpha)];
25338 # }
25339 # [result autorelease];
25340 # return result;
25341 # }
25342 # // ...
25343 #
25344 # Example (JavaScript):
25345 #
25346 # // ...
25347 #
25348 # var protoToCssColor = function(rgb_color) {
25349 # var redFrac = rgb_color.red || 0.0;
25350 # var greenFrac = rgb_color.green || 0.0;
25351 # var blueFrac = rgb_color.blue || 0.0;
25352 # var red = Math.floor(redFrac * 255);
25353 # var green = Math.floor(greenFrac * 255);
25354 # var blue = Math.floor(blueFrac * 255);
25355 #
25356 # if (!('alpha' in rgb_color)) {
25357 # return rgbToCssColor_(red, green, blue);
25358 # }
25359 #
25360 # var alphaFrac = rgb_color.alpha.value || 0.0;
25361 # var rgbParams = [red, green, blue].join(',');
25362 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25363 # };
25364 #
25365 # var rgbToCssColor_ = function(red, green, blue) {
25366 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25367 # var hexString = rgbNumber.toString(16);
25368 # var missingZeros = 6 - hexString.length;
25369 # var resultBuilder = ['#'];
25370 # for (var i = 0; i < missingZeros; i++) {
25371 # resultBuilder.push('0');
25372 # }
25373 # resultBuilder.push(hexString);
25374 # return resultBuilder.join('');
25375 # };
25376 #
25377 # // ...
25378 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25379 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25380 # the final pixel color is defined by the equation:
25381 #
25382 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25383 #
25384 # This means that a value of 1.0 corresponds to a solid color, whereas
25385 # a value of 0.0 corresponds to a completely transparent color. This
25386 # uses a wrapper message rather than a simple float scalar so that it is
25387 # possible to distinguish between a default value and the value being unset.
25388 # If omitted, this color object is to be rendered as a solid color
25389 # (as if the alpha value had been explicitly given with a value of 1.0).
25390 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25391 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25392 },
25393 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025394 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025395 "style": "A String", # The style of the border.
25396 },
25397 "left": { # A border along a cell. # The left border of the cell.
25398 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
25399 # for simplicity of conversion to/from color representations in various
25400 # languages over compactness; for example, the fields of this representation
25401 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25402 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25403 # method in iOS; and, with just a little work, it can be easily formatted into
25404 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25405 #
25406 # Example (Java):
25407 #
25408 # import com.google.type.Color;
25409 #
25410 # // ...
25411 # public static java.awt.Color fromProto(Color protocolor) {
25412 # float alpha = protocolor.hasAlpha()
25413 # ? protocolor.getAlpha().getValue()
25414 # : 1.0;
25415 #
25416 # return new java.awt.Color(
25417 # protocolor.getRed(),
25418 # protocolor.getGreen(),
25419 # protocolor.getBlue(),
25420 # alpha);
25421 # }
25422 #
25423 # public static Color toProto(java.awt.Color color) {
25424 # float red = (float) color.getRed();
25425 # float green = (float) color.getGreen();
25426 # float blue = (float) color.getBlue();
25427 # float denominator = 255.0;
25428 # Color.Builder resultBuilder =
25429 # Color
25430 # .newBuilder()
25431 # .setRed(red / denominator)
25432 # .setGreen(green / denominator)
25433 # .setBlue(blue / denominator);
25434 # int alpha = color.getAlpha();
25435 # if (alpha != 255) {
25436 # result.setAlpha(
25437 # FloatValue
25438 # .newBuilder()
25439 # .setValue(((float) alpha) / denominator)
25440 # .build());
25441 # }
25442 # return resultBuilder.build();
25443 # }
25444 # // ...
25445 #
25446 # Example (iOS / Obj-C):
25447 #
25448 # // ...
25449 # static UIColor* fromProto(Color* protocolor) {
25450 # float red = [protocolor red];
25451 # float green = [protocolor green];
25452 # float blue = [protocolor blue];
25453 # FloatValue* alpha_wrapper = [protocolor alpha];
25454 # float alpha = 1.0;
25455 # if (alpha_wrapper != nil) {
25456 # alpha = [alpha_wrapper value];
25457 # }
25458 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25459 # }
25460 #
25461 # static Color* toProto(UIColor* color) {
25462 # CGFloat red, green, blue, alpha;
25463 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25464 # return nil;
25465 # }
25466 # Color* result = [Color alloc] init];
25467 # [result setRed:red];
25468 # [result setGreen:green];
25469 # [result setBlue:blue];
25470 # if (alpha <= 0.9999) {
25471 # [result setAlpha:floatWrapperWithValue(alpha)];
25472 # }
25473 # [result autorelease];
25474 # return result;
25475 # }
25476 # // ...
25477 #
25478 # Example (JavaScript):
25479 #
25480 # // ...
25481 #
25482 # var protoToCssColor = function(rgb_color) {
25483 # var redFrac = rgb_color.red || 0.0;
25484 # var greenFrac = rgb_color.green || 0.0;
25485 # var blueFrac = rgb_color.blue || 0.0;
25486 # var red = Math.floor(redFrac * 255);
25487 # var green = Math.floor(greenFrac * 255);
25488 # var blue = Math.floor(blueFrac * 255);
25489 #
25490 # if (!('alpha' in rgb_color)) {
25491 # return rgbToCssColor_(red, green, blue);
25492 # }
25493 #
25494 # var alphaFrac = rgb_color.alpha.value || 0.0;
25495 # var rgbParams = [red, green, blue].join(',');
25496 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25497 # };
25498 #
25499 # var rgbToCssColor_ = function(red, green, blue) {
25500 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25501 # var hexString = rgbNumber.toString(16);
25502 # var missingZeros = 6 - hexString.length;
25503 # var resultBuilder = ['#'];
25504 # for (var i = 0; i < missingZeros; i++) {
25505 # resultBuilder.push('0');
25506 # }
25507 # resultBuilder.push(hexString);
25508 # return resultBuilder.join('');
25509 # };
25510 #
25511 # // ...
25512 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25513 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25514 # the final pixel color is defined by the equation:
25515 #
25516 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25517 #
25518 # This means that a value of 1.0 corresponds to a solid color, whereas
25519 # a value of 0.0 corresponds to a completely transparent color. This
25520 # uses a wrapper message rather than a simple float scalar so that it is
25521 # possible to distinguish between a default value and the value being unset.
25522 # If omitted, this color object is to be rendered as a solid color
25523 # (as if the alpha value had been explicitly given with a value of 1.0).
25524 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25525 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25526 },
25527 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025528 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025529 "style": "A String", # The style of the border.
25530 },
25531 },
25532 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
25533 },
25534 },
25535 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
25536 # the interpolation points listed. The format of a cell will vary
25537 # based on its contents as compared to the values of the interpolation
25538 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025539 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025540 # These pin the gradient color scale according to the color,
25541 # type and value chosen.
25542 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
25543 # for simplicity of conversion to/from color representations in various
25544 # languages over compactness; for example, the fields of this representation
25545 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25546 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25547 # method in iOS; and, with just a little work, it can be easily formatted into
25548 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25549 #
25550 # Example (Java):
25551 #
25552 # import com.google.type.Color;
25553 #
25554 # // ...
25555 # public static java.awt.Color fromProto(Color protocolor) {
25556 # float alpha = protocolor.hasAlpha()
25557 # ? protocolor.getAlpha().getValue()
25558 # : 1.0;
25559 #
25560 # return new java.awt.Color(
25561 # protocolor.getRed(),
25562 # protocolor.getGreen(),
25563 # protocolor.getBlue(),
25564 # alpha);
25565 # }
25566 #
25567 # public static Color toProto(java.awt.Color color) {
25568 # float red = (float) color.getRed();
25569 # float green = (float) color.getGreen();
25570 # float blue = (float) color.getBlue();
25571 # float denominator = 255.0;
25572 # Color.Builder resultBuilder =
25573 # Color
25574 # .newBuilder()
25575 # .setRed(red / denominator)
25576 # .setGreen(green / denominator)
25577 # .setBlue(blue / denominator);
25578 # int alpha = color.getAlpha();
25579 # if (alpha != 255) {
25580 # result.setAlpha(
25581 # FloatValue
25582 # .newBuilder()
25583 # .setValue(((float) alpha) / denominator)
25584 # .build());
25585 # }
25586 # return resultBuilder.build();
25587 # }
25588 # // ...
25589 #
25590 # Example (iOS / Obj-C):
25591 #
25592 # // ...
25593 # static UIColor* fromProto(Color* protocolor) {
25594 # float red = [protocolor red];
25595 # float green = [protocolor green];
25596 # float blue = [protocolor blue];
25597 # FloatValue* alpha_wrapper = [protocolor alpha];
25598 # float alpha = 1.0;
25599 # if (alpha_wrapper != nil) {
25600 # alpha = [alpha_wrapper value];
25601 # }
25602 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25603 # }
25604 #
25605 # static Color* toProto(UIColor* color) {
25606 # CGFloat red, green, blue, alpha;
25607 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25608 # return nil;
25609 # }
25610 # Color* result = [Color alloc] init];
25611 # [result setRed:red];
25612 # [result setGreen:green];
25613 # [result setBlue:blue];
25614 # if (alpha <= 0.9999) {
25615 # [result setAlpha:floatWrapperWithValue(alpha)];
25616 # }
25617 # [result autorelease];
25618 # return result;
25619 # }
25620 # // ...
25621 #
25622 # Example (JavaScript):
25623 #
25624 # // ...
25625 #
25626 # var protoToCssColor = function(rgb_color) {
25627 # var redFrac = rgb_color.red || 0.0;
25628 # var greenFrac = rgb_color.green || 0.0;
25629 # var blueFrac = rgb_color.blue || 0.0;
25630 # var red = Math.floor(redFrac * 255);
25631 # var green = Math.floor(greenFrac * 255);
25632 # var blue = Math.floor(blueFrac * 255);
25633 #
25634 # if (!('alpha' in rgb_color)) {
25635 # return rgbToCssColor_(red, green, blue);
25636 # }
25637 #
25638 # var alphaFrac = rgb_color.alpha.value || 0.0;
25639 # var rgbParams = [red, green, blue].join(',');
25640 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25641 # };
25642 #
25643 # var rgbToCssColor_ = function(red, green, blue) {
25644 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25645 # var hexString = rgbNumber.toString(16);
25646 # var missingZeros = 6 - hexString.length;
25647 # var resultBuilder = ['#'];
25648 # for (var i = 0; i < missingZeros; i++) {
25649 # resultBuilder.push('0');
25650 # }
25651 # resultBuilder.push(hexString);
25652 # return resultBuilder.join('');
25653 # };
25654 #
25655 # // ...
25656 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25657 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25658 # the final pixel color is defined by the equation:
25659 #
25660 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25661 #
25662 # This means that a value of 1.0 corresponds to a solid color, whereas
25663 # a value of 0.0 corresponds to a completely transparent color. This
25664 # uses a wrapper message rather than a simple float scalar so that it is
25665 # possible to distinguish between a default value and the value being unset.
25666 # If omitted, this color object is to be rendered as a solid color
25667 # (as if the alpha value had been explicitly given with a value of 1.0).
25668 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25669 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25670 },
25671 "type": "A String", # How the value should be interpreted.
25672 "value": "A String", # The value this interpolation point uses. May be a formula.
25673 # Unused if type is MIN or
25674 # MAX.
25675 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025676 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025677 # These pin the gradient color scale according to the color,
25678 # type and value chosen.
25679 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
25680 # for simplicity of conversion to/from color representations in various
25681 # languages over compactness; for example, the fields of this representation
25682 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25683 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25684 # method in iOS; and, with just a little work, it can be easily formatted into
25685 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25686 #
25687 # Example (Java):
25688 #
25689 # import com.google.type.Color;
25690 #
25691 # // ...
25692 # public static java.awt.Color fromProto(Color protocolor) {
25693 # float alpha = protocolor.hasAlpha()
25694 # ? protocolor.getAlpha().getValue()
25695 # : 1.0;
25696 #
25697 # return new java.awt.Color(
25698 # protocolor.getRed(),
25699 # protocolor.getGreen(),
25700 # protocolor.getBlue(),
25701 # alpha);
25702 # }
25703 #
25704 # public static Color toProto(java.awt.Color color) {
25705 # float red = (float) color.getRed();
25706 # float green = (float) color.getGreen();
25707 # float blue = (float) color.getBlue();
25708 # float denominator = 255.0;
25709 # Color.Builder resultBuilder =
25710 # Color
25711 # .newBuilder()
25712 # .setRed(red / denominator)
25713 # .setGreen(green / denominator)
25714 # .setBlue(blue / denominator);
25715 # int alpha = color.getAlpha();
25716 # if (alpha != 255) {
25717 # result.setAlpha(
25718 # FloatValue
25719 # .newBuilder()
25720 # .setValue(((float) alpha) / denominator)
25721 # .build());
25722 # }
25723 # return resultBuilder.build();
25724 # }
25725 # // ...
25726 #
25727 # Example (iOS / Obj-C):
25728 #
25729 # // ...
25730 # static UIColor* fromProto(Color* protocolor) {
25731 # float red = [protocolor red];
25732 # float green = [protocolor green];
25733 # float blue = [protocolor blue];
25734 # FloatValue* alpha_wrapper = [protocolor alpha];
25735 # float alpha = 1.0;
25736 # if (alpha_wrapper != nil) {
25737 # alpha = [alpha_wrapper value];
25738 # }
25739 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25740 # }
25741 #
25742 # static Color* toProto(UIColor* color) {
25743 # CGFloat red, green, blue, alpha;
25744 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25745 # return nil;
25746 # }
25747 # Color* result = [Color alloc] init];
25748 # [result setRed:red];
25749 # [result setGreen:green];
25750 # [result setBlue:blue];
25751 # if (alpha <= 0.9999) {
25752 # [result setAlpha:floatWrapperWithValue(alpha)];
25753 # }
25754 # [result autorelease];
25755 # return result;
25756 # }
25757 # // ...
25758 #
25759 # Example (JavaScript):
25760 #
25761 # // ...
25762 #
25763 # var protoToCssColor = function(rgb_color) {
25764 # var redFrac = rgb_color.red || 0.0;
25765 # var greenFrac = rgb_color.green || 0.0;
25766 # var blueFrac = rgb_color.blue || 0.0;
25767 # var red = Math.floor(redFrac * 255);
25768 # var green = Math.floor(greenFrac * 255);
25769 # var blue = Math.floor(blueFrac * 255);
25770 #
25771 # if (!('alpha' in rgb_color)) {
25772 # return rgbToCssColor_(red, green, blue);
25773 # }
25774 #
25775 # var alphaFrac = rgb_color.alpha.value || 0.0;
25776 # var rgbParams = [red, green, blue].join(',');
25777 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25778 # };
25779 #
25780 # var rgbToCssColor_ = function(red, green, blue) {
25781 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25782 # var hexString = rgbNumber.toString(16);
25783 # var missingZeros = 6 - hexString.length;
25784 # var resultBuilder = ['#'];
25785 # for (var i = 0; i < missingZeros; i++) {
25786 # resultBuilder.push('0');
25787 # }
25788 # resultBuilder.push(hexString);
25789 # return resultBuilder.join('');
25790 # };
25791 #
25792 # // ...
25793 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25794 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25795 # the final pixel color is defined by the equation:
25796 #
25797 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25798 #
25799 # This means that a value of 1.0 corresponds to a solid color, whereas
25800 # a value of 0.0 corresponds to a completely transparent color. This
25801 # uses a wrapper message rather than a simple float scalar so that it is
25802 # possible to distinguish between a default value and the value being unset.
25803 # If omitted, this color object is to be rendered as a solid color
25804 # (as if the alpha value had been explicitly given with a value of 1.0).
25805 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25806 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25807 },
25808 "type": "A String", # How the value should be interpreted.
25809 "value": "A String", # The value this interpolation point uses. May be a formula.
25810 # Unused if type is MIN or
25811 # MAX.
25812 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025813 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025814 # These pin the gradient color scale according to the color,
25815 # type and value chosen.
25816 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
25817 # for simplicity of conversion to/from color representations in various
25818 # languages over compactness; for example, the fields of this representation
25819 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25820 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25821 # method in iOS; and, with just a little work, it can be easily formatted into
25822 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25823 #
25824 # Example (Java):
25825 #
25826 # import com.google.type.Color;
25827 #
25828 # // ...
25829 # public static java.awt.Color fromProto(Color protocolor) {
25830 # float alpha = protocolor.hasAlpha()
25831 # ? protocolor.getAlpha().getValue()
25832 # : 1.0;
25833 #
25834 # return new java.awt.Color(
25835 # protocolor.getRed(),
25836 # protocolor.getGreen(),
25837 # protocolor.getBlue(),
25838 # alpha);
25839 # }
25840 #
25841 # public static Color toProto(java.awt.Color color) {
25842 # float red = (float) color.getRed();
25843 # float green = (float) color.getGreen();
25844 # float blue = (float) color.getBlue();
25845 # float denominator = 255.0;
25846 # Color.Builder resultBuilder =
25847 # Color
25848 # .newBuilder()
25849 # .setRed(red / denominator)
25850 # .setGreen(green / denominator)
25851 # .setBlue(blue / denominator);
25852 # int alpha = color.getAlpha();
25853 # if (alpha != 255) {
25854 # result.setAlpha(
25855 # FloatValue
25856 # .newBuilder()
25857 # .setValue(((float) alpha) / denominator)
25858 # .build());
25859 # }
25860 # return resultBuilder.build();
25861 # }
25862 # // ...
25863 #
25864 # Example (iOS / Obj-C):
25865 #
25866 # // ...
25867 # static UIColor* fromProto(Color* protocolor) {
25868 # float red = [protocolor red];
25869 # float green = [protocolor green];
25870 # float blue = [protocolor blue];
25871 # FloatValue* alpha_wrapper = [protocolor alpha];
25872 # float alpha = 1.0;
25873 # if (alpha_wrapper != nil) {
25874 # alpha = [alpha_wrapper value];
25875 # }
25876 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25877 # }
25878 #
25879 # static Color* toProto(UIColor* color) {
25880 # CGFloat red, green, blue, alpha;
25881 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25882 # return nil;
25883 # }
25884 # Color* result = [Color alloc] init];
25885 # [result setRed:red];
25886 # [result setGreen:green];
25887 # [result setBlue:blue];
25888 # if (alpha <= 0.9999) {
25889 # [result setAlpha:floatWrapperWithValue(alpha)];
25890 # }
25891 # [result autorelease];
25892 # return result;
25893 # }
25894 # // ...
25895 #
25896 # Example (JavaScript):
25897 #
25898 # // ...
25899 #
25900 # var protoToCssColor = function(rgb_color) {
25901 # var redFrac = rgb_color.red || 0.0;
25902 # var greenFrac = rgb_color.green || 0.0;
25903 # var blueFrac = rgb_color.blue || 0.0;
25904 # var red = Math.floor(redFrac * 255);
25905 # var green = Math.floor(greenFrac * 255);
25906 # var blue = Math.floor(blueFrac * 255);
25907 #
25908 # if (!('alpha' in rgb_color)) {
25909 # return rgbToCssColor_(red, green, blue);
25910 # }
25911 #
25912 # var alphaFrac = rgb_color.alpha.value || 0.0;
25913 # var rgbParams = [red, green, blue].join(',');
25914 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25915 # };
25916 #
25917 # var rgbToCssColor_ = function(red, green, blue) {
25918 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25919 # var hexString = rgbNumber.toString(16);
25920 # var missingZeros = 6 - hexString.length;
25921 # var resultBuilder = ['#'];
25922 # for (var i = 0; i < missingZeros; i++) {
25923 # resultBuilder.push('0');
25924 # }
25925 # resultBuilder.push(hexString);
25926 # return resultBuilder.join('');
25927 # };
25928 #
25929 # // ...
25930 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25931 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25932 # the final pixel color is defined by the equation:
25933 #
25934 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25935 #
25936 # This means that a value of 1.0 corresponds to a solid color, whereas
25937 # a value of 0.0 corresponds to a completely transparent color. This
25938 # uses a wrapper message rather than a simple float scalar so that it is
25939 # possible to distinguish between a default value and the value being unset.
25940 # If omitted, this color object is to be rendered as a solid color
25941 # (as if the alpha value had been explicitly given with a value of 1.0).
25942 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25943 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25944 },
25945 "type": "A String", # How the value should be interpreted.
25946 "value": "A String", # The value this interpolation point uses. May be a formula.
25947 # Unused if type is MIN or
25948 # MAX.
25949 },
25950 },
25951 },
25952 ],
25953 "merges": [ # The ranges that are merged together.
25954 { # A range on a sheet.
25955 # All indexes are zero-based.
25956 # Indexes are half open, e.g the start index is inclusive
25957 # and the end index is exclusive -- [start_index, end_index).
25958 # Missing indexes indicate the range is unbounded on that side.
25959 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025960 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025961 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025962 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025963 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025964 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025965 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025966 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025967 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025968 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025969 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025970 # `Sheet1!A:B == sheet_id: 0,
25971 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025972 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025973 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025974 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025975 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025976 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025977 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025978 #
25979 # The start index must always be less than or equal to the end index.
25980 # If the start index equals the end index, then the range is empty.
25981 # Empty ranges are typically not meaningful and are usually rendered in the
25982 # UI as `#REF!`.
25983 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
25984 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
25985 "sheetId": 42, # The sheet this range is on.
25986 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
25987 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
25988 },
25989 ],
25990 "basicFilter": { # The default filter associated with a sheet. # The filter on this sheet, if any.
25991 "range": { # A range on a sheet. # The range the filter covers.
25992 # All indexes are zero-based.
25993 # Indexes are half open, e.g the start index is inclusive
25994 # and the end index is exclusive -- [start_index, end_index).
25995 # Missing indexes indicate the range is unbounded on that side.
25996 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025997 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025998 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025999 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026000 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026001 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026002 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026003 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026004 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026005 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026006 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026007 # `Sheet1!A:B == sheet_id: 0,
26008 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026009 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026010 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026011 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026012 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026013 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026014 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026015 #
26016 # The start index must always be less than or equal to the end index.
26017 # If the start index equals the end index, then the range is empty.
26018 # Empty ranges are typically not meaningful and are usually rendered in the
26019 # UI as `#REF!`.
26020 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26021 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26022 "sheetId": 42, # The sheet this range is on.
26023 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26024 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26025 },
26026 "sortSpecs": [ # The sort order per column. Later specifications are used when values
26027 # are equal in the earlier specifications.
26028 { # A sort order associated with a specific column or row.
26029 "sortOrder": "A String", # The order data should be sorted.
26030 "dimensionIndex": 42, # The dimension the sort should be applied to.
26031 },
26032 ],
26033 "criteria": { # The criteria for showing/hiding values per column.
26034 # The map's key is the column index, and the value is the criteria for
26035 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026036 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026037 "hiddenValues": [ # Values that should be hidden.
26038 "A String",
26039 ],
26040 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
26041 # (This does not override hiddenValues -- if a value is listed there,
26042 # it will still be hidden.)
26043 # BooleanConditions are used by conditional formatting,
26044 # data validation, and the criteria in filters.
26045 "type": "A String", # The type of condition.
26046 "values": [ # The values of the condition. The number of supported values depends
26047 # on the condition type. Some support zero values,
26048 # others one or two values,
26049 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
26050 { # The value of the condition.
26051 "relativeDate": "A String", # A relative date (based on the current date).
26052 # Valid only if the type is
26053 # DATE_BEFORE,
26054 # DATE_AFTER,
26055 # DATE_ON_OR_BEFORE or
26056 # DATE_ON_OR_AFTER.
26057 #
26058 # Relative dates are not supported in data validation.
26059 # They are supported only in conditional formatting and
26060 # conditional filters.
26061 "userEnteredValue": "A String", # A value the condition is based on.
26062 # The value will be parsed as if the user typed into a cell.
26063 # Formulas are supported (and must begin with an `=`).
26064 },
26065 ],
26066 },
26067 },
26068 },
26069 },
26070 "charts": [ # The specifications of every chart on this sheet.
26071 { # A chart embedded in a sheet.
26072 "chartId": 42, # The ID of the chart.
26073 "position": { # The position of an embedded object such as a chart. # The position of the chart.
26074 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
26075 # is chosen for you. Used only when writing.
26076 "sheetId": 42, # The sheet this is on. Set only if the embedded object
26077 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026078 "overlayPosition": { # The location an object is overlaid on top of a grid. # The position at which the object is overlaid on top of a grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026079 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
26080 # All indexes are zero-based.
26081 "rowIndex": 42, # The row index of the coordinate.
26082 "columnIndex": 42, # The column index of the coordinate.
26083 "sheetId": 42, # The sheet this coordinate is on.
26084 },
26085 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
26086 # from the anchor cell.
26087 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
26088 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
26089 # from the anchor cell.
26090 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
26091 },
26092 },
26093 "spec": { # The specifications of a chart. # The specification of the chart.
26094 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026095 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
26096 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
26097 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
26098 "sources": [ # The ranges of data for a series or domain.
26099 # Exactly one dimension must have a length of 1,
26100 # and all sources in the list must have the same dimension
26101 # with length 1.
26102 # The domain (if it exists) & all series must have the same number
26103 # of source ranges. If using more than one source range, then the source
26104 # range at a given offset must be contiguous across the domain and series.
26105 #
26106 # For example, these are valid configurations:
26107 #
26108 # domain sources: A1:A5
26109 # series1 sources: B1:B5
26110 # series2 sources: D6:D10
26111 #
26112 # domain sources: A1:A5, C10:C12
26113 # series1 sources: B1:B5, D10:D12
26114 # series2 sources: C1:C5, E10:E12
26115 { # A range on a sheet.
26116 # All indexes are zero-based.
26117 # Indexes are half open, e.g the start index is inclusive
26118 # and the end index is exclusive -- [start_index, end_index).
26119 # Missing indexes indicate the range is unbounded on that side.
26120 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026121 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026122 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026123 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026124 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026125 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026126 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026127 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026128 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026129 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026130 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026131 # `Sheet1!A:B == sheet_id: 0,
26132 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026133 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026134 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026135 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026136 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026137 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026138 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026139 #
26140 # The start index must always be less than or equal to the end index.
26141 # If the start index equals the end index, then the range is empty.
26142 # Empty ranges are typically not meaningful and are usually rendered in the
26143 # UI as `#REF!`.
26144 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26145 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26146 "sheetId": 42, # The sheet this range is on.
26147 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26148 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26149 },
26150 ],
26151 },
26152 },
26153 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
26154 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
26155 "sources": [ # The ranges of data for a series or domain.
26156 # Exactly one dimension must have a length of 1,
26157 # and all sources in the list must have the same dimension
26158 # with length 1.
26159 # The domain (if it exists) & all series must have the same number
26160 # of source ranges. If using more than one source range, then the source
26161 # range at a given offset must be contiguous across the domain and series.
26162 #
26163 # For example, these are valid configurations:
26164 #
26165 # domain sources: A1:A5
26166 # series1 sources: B1:B5
26167 # series2 sources: D6:D10
26168 #
26169 # domain sources: A1:A5, C10:C12
26170 # series1 sources: B1:B5, D10:D12
26171 # series2 sources: C1:C5, E10:E12
26172 { # A range on a sheet.
26173 # All indexes are zero-based.
26174 # Indexes are half open, e.g the start index is inclusive
26175 # and the end index is exclusive -- [start_index, end_index).
26176 # Missing indexes indicate the range is unbounded on that side.
26177 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026178 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026179 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026180 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026181 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026182 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026183 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026184 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026185 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026186 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026187 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026188 # `Sheet1!A:B == sheet_id: 0,
26189 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026190 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026191 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026192 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026193 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026194 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026195 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026196 #
26197 # The start index must always be less than or equal to the end index.
26198 # If the start index equals the end index, then the range is empty.
26199 # Empty ranges are typically not meaningful and are usually rendered in the
26200 # UI as `#REF!`.
26201 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26202 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26203 "sheetId": 42, # The sheet this range is on.
26204 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26205 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26206 },
26207 ],
26208 },
26209 },
26210 "threeDimensional": True or False, # True if the pie is three dimensional.
26211 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
26212 "pieHole": 3.14, # The size of the hole in the pie chart.
26213 },
26214 "basicChart": { # The specification for a basic chart. See BasicChartType for the list # A basic chart specification, can be one of many kinds of charts.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026215 # See BasicChartType for the list of all
26216 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026217 # of charts this supports.
26218 "headerCount": 42, # The number of rows or columns in the data that are "headers".
26219 # If not set, Google Sheets will guess how many rows are headers based
26220 # on the data.
26221 #
26222 # (Note that BasicChartAxis.title may override the axis title
26223 # inferred from the header values.)
26224 "series": [ # The data this chart is visualizing.
26225 { # A single series of data in a chart.
26226 # For example, if charting stock prices over time, multiple series may exist,
26227 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
26228 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
26229 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
26230 "sources": [ # The ranges of data for a series or domain.
26231 # Exactly one dimension must have a length of 1,
26232 # and all sources in the list must have the same dimension
26233 # with length 1.
26234 # The domain (if it exists) & all series must have the same number
26235 # of source ranges. If using more than one source range, then the source
26236 # range at a given offset must be contiguous across the domain and series.
26237 #
26238 # For example, these are valid configurations:
26239 #
26240 # domain sources: A1:A5
26241 # series1 sources: B1:B5
26242 # series2 sources: D6:D10
26243 #
26244 # domain sources: A1:A5, C10:C12
26245 # series1 sources: B1:B5, D10:D12
26246 # series2 sources: C1:C5, E10:E12
26247 { # A range on a sheet.
26248 # All indexes are zero-based.
26249 # Indexes are half open, e.g the start index is inclusive
26250 # and the end index is exclusive -- [start_index, end_index).
26251 # Missing indexes indicate the range is unbounded on that side.
26252 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026253 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026254 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026255 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026256 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026257 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026258 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026259 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026260 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026261 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026262 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026263 # `Sheet1!A:B == sheet_id: 0,
26264 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026265 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026266 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026267 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026268 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026269 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026270 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026271 #
26272 # The start index must always be less than or equal to the end index.
26273 # If the start index equals the end index, then the range is empty.
26274 # Empty ranges are typically not meaningful and are usually rendered in the
26275 # UI as `#REF!`.
26276 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26277 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26278 "sheetId": 42, # The sheet this range is on.
26279 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26280 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26281 },
26282 ],
26283 },
26284 },
26285 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
26286 # For example, if charting stocks over time, the "Volume" series
26287 # may want to be pinned to the right with the prices pinned to the left,
26288 # because the scale of trading volume is different than the scale of
26289 # prices.
26290 # It is an error to specify an axis that isn't a valid minor axis
26291 # for the chart's type.
26292 "type": "A String", # The type of this series. Valid only if the
26293 # chartType is
26294 # COMBO.
26295 # Different types will change the way the series is visualized.
26296 # Only LINE, AREA,
26297 # and COLUMN are supported.
26298 },
26299 ],
26300 "legendPosition": "A String", # The position of the chart legend.
26301 "domains": [ # The domain of data this is charting.
26302 # Only a single domain is currently supported.
26303 { # The domain of a chart.
26304 # For example, if charting stock prices over time, this would be the date.
26305 "domain": { # The data included in a domain or series. # The data of the domain. For example, if charting stock prices over time,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026306 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026307 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
26308 "sources": [ # The ranges of data for a series or domain.
26309 # Exactly one dimension must have a length of 1,
26310 # and all sources in the list must have the same dimension
26311 # with length 1.
26312 # The domain (if it exists) & all series must have the same number
26313 # of source ranges. If using more than one source range, then the source
26314 # range at a given offset must be contiguous across the domain and series.
26315 #
26316 # For example, these are valid configurations:
26317 #
26318 # domain sources: A1:A5
26319 # series1 sources: B1:B5
26320 # series2 sources: D6:D10
26321 #
26322 # domain sources: A1:A5, C10:C12
26323 # series1 sources: B1:B5, D10:D12
26324 # series2 sources: C1:C5, E10:E12
26325 { # A range on a sheet.
26326 # All indexes are zero-based.
26327 # Indexes are half open, e.g the start index is inclusive
26328 # and the end index is exclusive -- [start_index, end_index).
26329 # Missing indexes indicate the range is unbounded on that side.
26330 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026331 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026332 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026333 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026334 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026335 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026336 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026337 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026338 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026339 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026340 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026341 # `Sheet1!A:B == sheet_id: 0,
26342 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026343 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026344 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026345 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026346 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026347 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026348 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026349 #
26350 # The start index must always be less than or equal to the end index.
26351 # If the start index equals the end index, then the range is empty.
26352 # Empty ranges are typically not meaningful and are usually rendered in the
26353 # UI as `#REF!`.
26354 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26355 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26356 "sheetId": 42, # The sheet this range is on.
26357 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26358 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26359 },
26360 ],
26361 },
26362 },
26363 },
26364 ],
26365 "chartType": "A String", # The type of the chart.
26366 "axis": [ # The axis on the chart.
26367 { # An axis of the chart.
26368 # A chart may not have more than one axis per
26369 # axis position.
26370 "position": "A String", # The position of this axis.
26371 "format": { # The format of a run of text in a cell. # The format of the title.
26372 # Only valid if the axis is not associated with the domain.
26373 # Absent values indicate that the field isn't specified.
26374 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
26375 # for simplicity of conversion to/from color representations in various
26376 # languages over compactness; for example, the fields of this representation
26377 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26378 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26379 # method in iOS; and, with just a little work, it can be easily formatted into
26380 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26381 #
26382 # Example (Java):
26383 #
26384 # import com.google.type.Color;
26385 #
26386 # // ...
26387 # public static java.awt.Color fromProto(Color protocolor) {
26388 # float alpha = protocolor.hasAlpha()
26389 # ? protocolor.getAlpha().getValue()
26390 # : 1.0;
26391 #
26392 # return new java.awt.Color(
26393 # protocolor.getRed(),
26394 # protocolor.getGreen(),
26395 # protocolor.getBlue(),
26396 # alpha);
26397 # }
26398 #
26399 # public static Color toProto(java.awt.Color color) {
26400 # float red = (float) color.getRed();
26401 # float green = (float) color.getGreen();
26402 # float blue = (float) color.getBlue();
26403 # float denominator = 255.0;
26404 # Color.Builder resultBuilder =
26405 # Color
26406 # .newBuilder()
26407 # .setRed(red / denominator)
26408 # .setGreen(green / denominator)
26409 # .setBlue(blue / denominator);
26410 # int alpha = color.getAlpha();
26411 # if (alpha != 255) {
26412 # result.setAlpha(
26413 # FloatValue
26414 # .newBuilder()
26415 # .setValue(((float) alpha) / denominator)
26416 # .build());
26417 # }
26418 # return resultBuilder.build();
26419 # }
26420 # // ...
26421 #
26422 # Example (iOS / Obj-C):
26423 #
26424 # // ...
26425 # static UIColor* fromProto(Color* protocolor) {
26426 # float red = [protocolor red];
26427 # float green = [protocolor green];
26428 # float blue = [protocolor blue];
26429 # FloatValue* alpha_wrapper = [protocolor alpha];
26430 # float alpha = 1.0;
26431 # if (alpha_wrapper != nil) {
26432 # alpha = [alpha_wrapper value];
26433 # }
26434 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26435 # }
26436 #
26437 # static Color* toProto(UIColor* color) {
26438 # CGFloat red, green, blue, alpha;
26439 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26440 # return nil;
26441 # }
26442 # Color* result = [Color alloc] init];
26443 # [result setRed:red];
26444 # [result setGreen:green];
26445 # [result setBlue:blue];
26446 # if (alpha <= 0.9999) {
26447 # [result setAlpha:floatWrapperWithValue(alpha)];
26448 # }
26449 # [result autorelease];
26450 # return result;
26451 # }
26452 # // ...
26453 #
26454 # Example (JavaScript):
26455 #
26456 # // ...
26457 #
26458 # var protoToCssColor = function(rgb_color) {
26459 # var redFrac = rgb_color.red || 0.0;
26460 # var greenFrac = rgb_color.green || 0.0;
26461 # var blueFrac = rgb_color.blue || 0.0;
26462 # var red = Math.floor(redFrac * 255);
26463 # var green = Math.floor(greenFrac * 255);
26464 # var blue = Math.floor(blueFrac * 255);
26465 #
26466 # if (!('alpha' in rgb_color)) {
26467 # return rgbToCssColor_(red, green, blue);
26468 # }
26469 #
26470 # var alphaFrac = rgb_color.alpha.value || 0.0;
26471 # var rgbParams = [red, green, blue].join(',');
26472 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
26473 # };
26474 #
26475 # var rgbToCssColor_ = function(red, green, blue) {
26476 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
26477 # var hexString = rgbNumber.toString(16);
26478 # var missingZeros = 6 - hexString.length;
26479 # var resultBuilder = ['#'];
26480 # for (var i = 0; i < missingZeros; i++) {
26481 # resultBuilder.push('0');
26482 # }
26483 # resultBuilder.push(hexString);
26484 # return resultBuilder.join('');
26485 # };
26486 #
26487 # // ...
26488 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
26489 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
26490 # the final pixel color is defined by the equation:
26491 #
26492 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
26493 #
26494 # This means that a value of 1.0 corresponds to a solid color, whereas
26495 # a value of 0.0 corresponds to a completely transparent color. This
26496 # uses a wrapper message rather than a simple float scalar so that it is
26497 # possible to distinguish between a default value and the value being unset.
26498 # If omitted, this color object is to be rendered as a solid color
26499 # (as if the alpha value had been explicitly given with a value of 1.0).
26500 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
26501 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
26502 },
26503 "bold": True or False, # True if the text is bold.
26504 "strikethrough": True or False, # True if the text has a strikethrough.
26505 "fontFamily": "A String", # The font family.
26506 "fontSize": 42, # The size of the font.
26507 "italic": True or False, # True if the text is italicized.
26508 "underline": True or False, # True if the text is underlined.
26509 },
26510 "title": "A String", # The title of this axis. If set, this overrides any title inferred
26511 # from headers of the data.
26512 },
26513 ],
26514 },
26515 "title": "A String", # The title of the chart.
26516 },
26517 },
26518 ],
26519 "filterViews": [ # The filter views in this sheet.
26520 { # A filter view.
26521 "title": "A String", # The name of the filter view.
26522 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
26523 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026524 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026525 # may be set.
26526 "filterViewId": 42, # The ID of the filter view.
26527 "range": { # A range on a sheet. # The range this filter view covers.
26528 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026529 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026530 # may be set.
26531 # All indexes are zero-based.
26532 # Indexes are half open, e.g the start index is inclusive
26533 # and the end index is exclusive -- [start_index, end_index).
26534 # Missing indexes indicate the range is unbounded on that side.
26535 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026536 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026537 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026538 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026539 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026540 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026541 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026542 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026543 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026544 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026545 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026546 # `Sheet1!A:B == sheet_id: 0,
26547 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026548 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026549 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026550 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026551 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026552 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026553 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026554 #
26555 # The start index must always be less than or equal to the end index.
26556 # If the start index equals the end index, then the range is empty.
26557 # Empty ranges are typically not meaningful and are usually rendered in the
26558 # UI as `#REF!`.
26559 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26560 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26561 "sheetId": 42, # The sheet this range is on.
26562 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26563 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26564 },
26565 "sortSpecs": [ # The sort order per column. Later specifications are used when values
26566 # are equal in the earlier specifications.
26567 { # A sort order associated with a specific column or row.
26568 "sortOrder": "A String", # The order data should be sorted.
26569 "dimensionIndex": 42, # The dimension the sort should be applied to.
26570 },
26571 ],
26572 "criteria": { # The criteria for showing/hiding values per column.
26573 # The map's key is the column index, and the value is the criteria for
26574 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026575 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026576 "hiddenValues": [ # Values that should be hidden.
26577 "A String",
26578 ],
26579 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
26580 # (This does not override hiddenValues -- if a value is listed there,
26581 # it will still be hidden.)
26582 # BooleanConditions are used by conditional formatting,
26583 # data validation, and the criteria in filters.
26584 "type": "A String", # The type of condition.
26585 "values": [ # The values of the condition. The number of supported values depends
26586 # on the condition type. Some support zero values,
26587 # others one or two values,
26588 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
26589 { # The value of the condition.
26590 "relativeDate": "A String", # A relative date (based on the current date).
26591 # Valid only if the type is
26592 # DATE_BEFORE,
26593 # DATE_AFTER,
26594 # DATE_ON_OR_BEFORE or
26595 # DATE_ON_OR_AFTER.
26596 #
26597 # Relative dates are not supported in data validation.
26598 # They are supported only in conditional formatting and
26599 # conditional filters.
26600 "userEnteredValue": "A String", # A value the condition is based on.
26601 # The value will be parsed as if the user typed into a cell.
26602 # Formulas are supported (and must begin with an `=`).
26603 },
26604 ],
26605 },
26606 },
26607 },
26608 },
26609 ],
26610 "protectedRanges": [ # The protected ranges in this sheet.
26611 { # A protected range.
26612 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
26613 # Unprotected ranges are only supported on protected sheets.
26614 { # A range on a sheet.
26615 # All indexes are zero-based.
26616 # Indexes are half open, e.g the start index is inclusive
26617 # and the end index is exclusive -- [start_index, end_index).
26618 # Missing indexes indicate the range is unbounded on that side.
26619 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026620 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026621 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026622 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026623 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026624 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026625 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026626 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026627 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026628 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026629 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026630 # `Sheet1!A:B == sheet_id: 0,
26631 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026632 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026633 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026634 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026635 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026636 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026637 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026638 #
26639 # The start index must always be less than or equal to the end index.
26640 # If the start index equals the end index, then the range is empty.
26641 # Empty ranges are typically not meaningful and are usually rendered in the
26642 # UI as `#REF!`.
26643 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26644 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26645 "sheetId": 42, # The sheet this range is on.
26646 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26647 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26648 },
26649 ],
26650 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
26651 # protected area.
26652 # This field is read-only.
26653 "description": "A String", # The description of this protected range.
26654 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
26655 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026656 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026657 # may be set.
26658 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
26659 # This field is only visible to users with edit access to the protected
26660 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026661 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026662 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
26663 # range. Domain protection is only supported on documents within a domain.
26664 "users": [ # The email addresses of users with edit access to the protected range.
26665 "A String",
26666 ],
26667 "groups": [ # The email addresses of groups with edit access to the protected range.
26668 "A String",
26669 ],
26670 },
26671 "protectedRangeId": 42, # The ID of the protected range.
26672 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026673 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026674 # Warning-based protection means that every user can edit data in the
26675 # protected range, except editing will prompt a warning asking the user
26676 # to confirm the edit.
26677 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026678 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026679 # Additionally, if this field is changed from true to false and the
26680 # `editors` field is not set (nor included in the field mask), then
26681 # the editors will be set to all the editors in the document.
26682 "range": { # A range on a sheet. # The range that is being protected.
26683 # The range may be fully unbounded, in which case this is considered
26684 # a protected sheet.
26685 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026686 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026687 # may be set.
26688 # All indexes are zero-based.
26689 # Indexes are half open, e.g the start index is inclusive
26690 # and the end index is exclusive -- [start_index, end_index).
26691 # Missing indexes indicate the range is unbounded on that side.
26692 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026693 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026694 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026695 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026696 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026697 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026698 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026699 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026700 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026701 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026702 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026703 # `Sheet1!A:B == sheet_id: 0,
26704 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026705 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026706 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026707 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026708 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026709 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026710 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026711 #
26712 # The start index must always be less than or equal to the end index.
26713 # If the start index equals the end index, then the range is empty.
26714 # Empty ranges are typically not meaningful and are usually rendered in the
26715 # UI as `#REF!`.
26716 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26717 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26718 "sheetId": 42, # The sheet this range is on.
26719 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26720 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26721 },
26722 },
26723 ],
26724 "data": [ # Data in the grid, if this is a grid sheet.
26725 # The number of GridData objects returned is dependent on the number of
26726 # ranges requested on this sheet. For example, if this is representing
26727 # `Sheet1`, and the spreadsheet was requested with ranges
26728 # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a
26729 # startRow/startColumn of `0`,
26730 # while the second one will have `startRow 14` (zero-based row 15),
26731 # and `startColumn 3` (zero-based column D).
26732 { # Data in the grid, as well as metadata about the dimensions.
26733 "startRow": 42, # The first row this GridData refers to, zero-based.
26734 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026735 # in start_row.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026736 { # Properties about a dimension.
26737 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
26738 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
26739 "hiddenByFilter": True or False, # True if this dimension is being filtered.
26740 # This field is read-only.
26741 },
26742 ],
26743 "startColumn": 42, # The first column this GridData refers to, zero-based.
26744 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026745 # in start_column.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026746 { # Properties about a dimension.
26747 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
26748 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
26749 "hiddenByFilter": True or False, # True if this dimension is being filtered.
26750 # This field is read-only.
26751 },
26752 ],
26753 "rowData": [ # The data in the grid, one entry per row,
26754 # starting with the row in startRow.
26755 # The values in RowData will correspond to columns starting
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026756 # at start_column.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026757 { # Data about each cell in a row.
26758 "values": [ # The values in the row, one per column.
26759 { # Data about a specific cell.
26760 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
26761 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026762 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026763 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026764 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026765 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
26766 # or vertically (as rows).
26767 "rows": [ # Each row grouping in the pivot table.
26768 { # A single grouping (either row or column) in a pivot table.
26769 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
26770 "valueMetadata": [ # Metadata about values in the grouping.
26771 { # Metadata about a value in a pivot grouping.
26772 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
26773 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
26774 # (Note that formulaValue is not valid,
26775 # because the values will be calculated.)
26776 "numberValue": 3.14, # Represents a double value.
26777 # Note: Dates, Times and DateTimes are represented as doubles in
26778 # "serial number" format.
26779 "boolValue": True or False, # Represents a boolean value.
26780 "formulaValue": "A String", # Represents a formula.
26781 "stringValue": "A String", # Represents a string value.
26782 # Leading single quotes are not included. For example, if the user typed
26783 # `'123` into the UI, this would be represented as a `stringValue` of
26784 # `"123"`.
26785 "errorValue": { # An error in a cell. # Represents an error.
26786 # This field is read-only.
26787 "message": "A String", # A message with more information about the error
26788 # (in the spreadsheet's locale).
26789 "type": "A String", # The type of error.
26790 },
26791 },
26792 },
26793 ],
26794 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
26795 # If not specified, sorting is alphabetical by this group's values.
26796 "buckets": [ # Determines the bucket from which values are chosen to sort.
26797 #
26798 # For example, in a pivot table with one row group & two column groups,
26799 # the row group can list up to two values. The first value corresponds
26800 # to a value within the first column group, and the second value
26801 # corresponds to a value in the second column group. If no values
26802 # are listed, this would indicate that the row should be sorted according
26803 # to the "Grand Total" over the column groups. If a single value is listed,
26804 # this would correspond to using the "Total" of that bucket.
26805 { # The kinds of value that a cell in a spreadsheet can have.
26806 "numberValue": 3.14, # Represents a double value.
26807 # Note: Dates, Times and DateTimes are represented as doubles in
26808 # "serial number" format.
26809 "boolValue": True or False, # Represents a boolean value.
26810 "formulaValue": "A String", # Represents a formula.
26811 "stringValue": "A String", # Represents a string value.
26812 # Leading single quotes are not included. For example, if the user typed
26813 # `'123` into the UI, this would be represented as a `stringValue` of
26814 # `"123"`.
26815 "errorValue": { # An error in a cell. # Represents an error.
26816 # This field is read-only.
26817 "message": "A String", # A message with more information about the error
26818 # (in the spreadsheet's locale).
26819 "type": "A String", # The type of error.
26820 },
26821 },
26822 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026823 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026824 # grouping should be sorted by.
26825 },
26826 "sortOrder": "A String", # The order the values in this group should be sorted.
26827 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
26828 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026829 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026830 # means this group refers to column `C`, whereas the offset `1` would refer
26831 # to column `D`.
26832 },
26833 ],
26834 "source": { # A range on a sheet. # The range the pivot table is reading data from.
26835 # All indexes are zero-based.
26836 # Indexes are half open, e.g the start index is inclusive
26837 # and the end index is exclusive -- [start_index, end_index).
26838 # Missing indexes indicate the range is unbounded on that side.
26839 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026840 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026841 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026842 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026843 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026844 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026845 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026846 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026847 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026848 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026849 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026850 # `Sheet1!A:B == sheet_id: 0,
26851 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026852 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026853 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026854 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026855 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026856 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026857 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026858 #
26859 # The start index must always be less than or equal to the end index.
26860 # If the start index equals the end index, then the range is empty.
26861 # Empty ranges are typically not meaningful and are usually rendered in the
26862 # UI as `#REF!`.
26863 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26864 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26865 "sheetId": 42, # The sheet this range is on.
26866 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26867 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26868 },
26869 "values": [ # A list of values to include in the pivot table.
26870 { # The definition of how a value in a pivot table should be calculated.
26871 "formula": "A String", # A custom formula to calculate the value. The formula must start
26872 # with an `=` character.
26873 "summarizeFunction": "A String", # A function to summarize the value.
26874 # If formula is set, the only supported values are
26875 # SUM and
26876 # CUSTOM.
26877 # If sourceColumnOffset is set, then `CUSTOM`
26878 # is not supported.
26879 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
26880 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026881 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026882 # means this value refers to column `C`, whereas the offset `1` would
26883 # refer to column `D`.
26884 "name": "A String", # A name to use for the value. This is only used if formula was set.
26885 # Otherwise, the column name is used.
26886 },
26887 ],
26888 "criteria": { # An optional mapping of filters per source column offset.
26889 #
26890 # The filters will be applied before aggregating data into the pivot table.
26891 # The map's key is the column offset of the source range that you want to
26892 # filter, and the value is the criteria for that column.
26893 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026894 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026895 # for column `C`, whereas the key `1` is for column `D`.
26896 "a_key": { # Criteria for showing/hiding rows in a pivot table.
26897 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
26898 "A String",
26899 ],
26900 },
26901 },
26902 "columns": [ # Each column grouping in the pivot table.
26903 { # A single grouping (either row or column) in a pivot table.
26904 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
26905 "valueMetadata": [ # Metadata about values in the grouping.
26906 { # Metadata about a value in a pivot grouping.
26907 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
26908 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
26909 # (Note that formulaValue is not valid,
26910 # because the values will be calculated.)
26911 "numberValue": 3.14, # Represents a double value.
26912 # Note: Dates, Times and DateTimes are represented as doubles in
26913 # "serial number" format.
26914 "boolValue": True or False, # Represents a boolean value.
26915 "formulaValue": "A String", # Represents a formula.
26916 "stringValue": "A String", # Represents a string value.
26917 # Leading single quotes are not included. For example, if the user typed
26918 # `'123` into the UI, this would be represented as a `stringValue` of
26919 # `"123"`.
26920 "errorValue": { # An error in a cell. # Represents an error.
26921 # This field is read-only.
26922 "message": "A String", # A message with more information about the error
26923 # (in the spreadsheet's locale).
26924 "type": "A String", # The type of error.
26925 },
26926 },
26927 },
26928 ],
26929 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
26930 # If not specified, sorting is alphabetical by this group's values.
26931 "buckets": [ # Determines the bucket from which values are chosen to sort.
26932 #
26933 # For example, in a pivot table with one row group & two column groups,
26934 # the row group can list up to two values. The first value corresponds
26935 # to a value within the first column group, and the second value
26936 # corresponds to a value in the second column group. If no values
26937 # are listed, this would indicate that the row should be sorted according
26938 # to the "Grand Total" over the column groups. If a single value is listed,
26939 # this would correspond to using the "Total" of that bucket.
26940 { # The kinds of value that a cell in a spreadsheet can have.
26941 "numberValue": 3.14, # Represents a double value.
26942 # Note: Dates, Times and DateTimes are represented as doubles in
26943 # "serial number" format.
26944 "boolValue": True or False, # Represents a boolean value.
26945 "formulaValue": "A String", # Represents a formula.
26946 "stringValue": "A String", # Represents a string value.
26947 # Leading single quotes are not included. For example, if the user typed
26948 # `'123` into the UI, this would be represented as a `stringValue` of
26949 # `"123"`.
26950 "errorValue": { # An error in a cell. # Represents an error.
26951 # This field is read-only.
26952 "message": "A String", # A message with more information about the error
26953 # (in the spreadsheet's locale).
26954 "type": "A String", # The type of error.
26955 },
26956 },
26957 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026958 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026959 # grouping should be sorted by.
26960 },
26961 "sortOrder": "A String", # The order the values in this group should be sorted.
26962 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
26963 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026964 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026965 # means this group refers to column `C`, whereas the offset `1` would refer
26966 # to column `D`.
26967 },
26968 ],
26969 },
26970 "hyperlink": "A String", # A hyperlink this cell points to, if any.
26971 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
26972 "effectiveValue": { # The kinds of value that a cell in a spreadsheet can have. # The effective value of the cell. For cells with formulas, this will be
26973 # the calculated value. For cells with literals, this will be
26974 # the same as the user_entered_value.
26975 # This field is read-only.
26976 "numberValue": 3.14, # Represents a double value.
26977 # Note: Dates, Times and DateTimes are represented as doubles in
26978 # "serial number" format.
26979 "boolValue": True or False, # Represents a boolean value.
26980 "formulaValue": "A String", # Represents a formula.
26981 "stringValue": "A String", # Represents a string value.
26982 # Leading single quotes are not included. For example, if the user typed
26983 # `'123` into the UI, this would be represented as a `stringValue` of
26984 # `"123"`.
26985 "errorValue": { # An error in a cell. # Represents an error.
26986 # This field is read-only.
26987 "message": "A String", # A message with more information about the error
26988 # (in the spreadsheet's locale).
26989 "type": "A String", # The type of error.
26990 },
26991 },
26992 "formattedValue": "A String", # The formatted value of the cell.
26993 # This is the value as it's shown to the user.
26994 # This field is read-only.
26995 "userEnteredValue": { # The kinds of value that a cell in a spreadsheet can have. # The value the user entered in the cell. e.g, `1234`, `'Hello'`, or `=NOW()`
26996 # Note: Dates, Times and DateTimes are represented as doubles in
26997 # serial number format.
26998 "numberValue": 3.14, # Represents a double value.
26999 # Note: Dates, Times and DateTimes are represented as doubles in
27000 # "serial number" format.
27001 "boolValue": True or False, # Represents a boolean value.
27002 "formulaValue": "A String", # Represents a formula.
27003 "stringValue": "A String", # Represents a string value.
27004 # Leading single quotes are not included. For example, if the user typed
27005 # `'123` into the UI, this would be represented as a `stringValue` of
27006 # `"123"`.
27007 "errorValue": { # An error in a cell. # Represents an error.
27008 # This field is read-only.
27009 "message": "A String", # A message with more information about the error
27010 # (in the spreadsheet's locale).
27011 "type": "A String", # The type of error.
27012 },
27013 },
27014 "note": "A String", # Any note on the cell.
27015 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
27016 # This includes the results of applying any conditional formatting and,
27017 # if the cell contains a formula, the computed number format.
27018 # If the effective format is the default format, effective format will
27019 # not be written.
27020 # This field is read-only.
27021 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027022 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
27023 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027024 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027025 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027026 },
27027 "textDirection": "A String", # The direction of the text in the cell.
27028 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
27029 # When updating padding, every field must be specified.
27030 "top": 42, # The top padding of the cell.
27031 "right": 42, # The right padding of the cell.
27032 "bottom": 42, # The bottom padding of the cell.
27033 "left": 42, # The left padding of the cell.
27034 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027035 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027036 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
27037 # for simplicity of conversion to/from color representations in various
27038 # languages over compactness; for example, the fields of this representation
27039 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27040 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27041 # method in iOS; and, with just a little work, it can be easily formatted into
27042 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27043 #
27044 # Example (Java):
27045 #
27046 # import com.google.type.Color;
27047 #
27048 # // ...
27049 # public static java.awt.Color fromProto(Color protocolor) {
27050 # float alpha = protocolor.hasAlpha()
27051 # ? protocolor.getAlpha().getValue()
27052 # : 1.0;
27053 #
27054 # return new java.awt.Color(
27055 # protocolor.getRed(),
27056 # protocolor.getGreen(),
27057 # protocolor.getBlue(),
27058 # alpha);
27059 # }
27060 #
27061 # public static Color toProto(java.awt.Color color) {
27062 # float red = (float) color.getRed();
27063 # float green = (float) color.getGreen();
27064 # float blue = (float) color.getBlue();
27065 # float denominator = 255.0;
27066 # Color.Builder resultBuilder =
27067 # Color
27068 # .newBuilder()
27069 # .setRed(red / denominator)
27070 # .setGreen(green / denominator)
27071 # .setBlue(blue / denominator);
27072 # int alpha = color.getAlpha();
27073 # if (alpha != 255) {
27074 # result.setAlpha(
27075 # FloatValue
27076 # .newBuilder()
27077 # .setValue(((float) alpha) / denominator)
27078 # .build());
27079 # }
27080 # return resultBuilder.build();
27081 # }
27082 # // ...
27083 #
27084 # Example (iOS / Obj-C):
27085 #
27086 # // ...
27087 # static UIColor* fromProto(Color* protocolor) {
27088 # float red = [protocolor red];
27089 # float green = [protocolor green];
27090 # float blue = [protocolor blue];
27091 # FloatValue* alpha_wrapper = [protocolor alpha];
27092 # float alpha = 1.0;
27093 # if (alpha_wrapper != nil) {
27094 # alpha = [alpha_wrapper value];
27095 # }
27096 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27097 # }
27098 #
27099 # static Color* toProto(UIColor* color) {
27100 # CGFloat red, green, blue, alpha;
27101 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27102 # return nil;
27103 # }
27104 # Color* result = [Color alloc] init];
27105 # [result setRed:red];
27106 # [result setGreen:green];
27107 # [result setBlue:blue];
27108 # if (alpha <= 0.9999) {
27109 # [result setAlpha:floatWrapperWithValue(alpha)];
27110 # }
27111 # [result autorelease];
27112 # return result;
27113 # }
27114 # // ...
27115 #
27116 # Example (JavaScript):
27117 #
27118 # // ...
27119 #
27120 # var protoToCssColor = function(rgb_color) {
27121 # var redFrac = rgb_color.red || 0.0;
27122 # var greenFrac = rgb_color.green || 0.0;
27123 # var blueFrac = rgb_color.blue || 0.0;
27124 # var red = Math.floor(redFrac * 255);
27125 # var green = Math.floor(greenFrac * 255);
27126 # var blue = Math.floor(blueFrac * 255);
27127 #
27128 # if (!('alpha' in rgb_color)) {
27129 # return rgbToCssColor_(red, green, blue);
27130 # }
27131 #
27132 # var alphaFrac = rgb_color.alpha.value || 0.0;
27133 # var rgbParams = [red, green, blue].join(',');
27134 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27135 # };
27136 #
27137 # var rgbToCssColor_ = function(red, green, blue) {
27138 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27139 # var hexString = rgbNumber.toString(16);
27140 # var missingZeros = 6 - hexString.length;
27141 # var resultBuilder = ['#'];
27142 # for (var i = 0; i < missingZeros; i++) {
27143 # resultBuilder.push('0');
27144 # }
27145 # resultBuilder.push(hexString);
27146 # return resultBuilder.join('');
27147 # };
27148 #
27149 # // ...
27150 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27151 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27152 # the final pixel color is defined by the equation:
27153 #
27154 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27155 #
27156 # This means that a value of 1.0 corresponds to a solid color, whereas
27157 # a value of 0.0 corresponds to a completely transparent color. This
27158 # uses a wrapper message rather than a simple float scalar so that it is
27159 # possible to distinguish between a default value and the value being unset.
27160 # If omitted, this color object is to be rendered as a solid color
27161 # (as if the alpha value had been explicitly given with a value of 1.0).
27162 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27163 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27164 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027165 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027166 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
27167 # Absent values indicate that the field isn't specified.
27168 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
27169 # for simplicity of conversion to/from color representations in various
27170 # languages over compactness; for example, the fields of this representation
27171 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27172 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27173 # method in iOS; and, with just a little work, it can be easily formatted into
27174 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27175 #
27176 # Example (Java):
27177 #
27178 # import com.google.type.Color;
27179 #
27180 # // ...
27181 # public static java.awt.Color fromProto(Color protocolor) {
27182 # float alpha = protocolor.hasAlpha()
27183 # ? protocolor.getAlpha().getValue()
27184 # : 1.0;
27185 #
27186 # return new java.awt.Color(
27187 # protocolor.getRed(),
27188 # protocolor.getGreen(),
27189 # protocolor.getBlue(),
27190 # alpha);
27191 # }
27192 #
27193 # public static Color toProto(java.awt.Color color) {
27194 # float red = (float) color.getRed();
27195 # float green = (float) color.getGreen();
27196 # float blue = (float) color.getBlue();
27197 # float denominator = 255.0;
27198 # Color.Builder resultBuilder =
27199 # Color
27200 # .newBuilder()
27201 # .setRed(red / denominator)
27202 # .setGreen(green / denominator)
27203 # .setBlue(blue / denominator);
27204 # int alpha = color.getAlpha();
27205 # if (alpha != 255) {
27206 # result.setAlpha(
27207 # FloatValue
27208 # .newBuilder()
27209 # .setValue(((float) alpha) / denominator)
27210 # .build());
27211 # }
27212 # return resultBuilder.build();
27213 # }
27214 # // ...
27215 #
27216 # Example (iOS / Obj-C):
27217 #
27218 # // ...
27219 # static UIColor* fromProto(Color* protocolor) {
27220 # float red = [protocolor red];
27221 # float green = [protocolor green];
27222 # float blue = [protocolor blue];
27223 # FloatValue* alpha_wrapper = [protocolor alpha];
27224 # float alpha = 1.0;
27225 # if (alpha_wrapper != nil) {
27226 # alpha = [alpha_wrapper value];
27227 # }
27228 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27229 # }
27230 #
27231 # static Color* toProto(UIColor* color) {
27232 # CGFloat red, green, blue, alpha;
27233 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27234 # return nil;
27235 # }
27236 # Color* result = [Color alloc] init];
27237 # [result setRed:red];
27238 # [result setGreen:green];
27239 # [result setBlue:blue];
27240 # if (alpha <= 0.9999) {
27241 # [result setAlpha:floatWrapperWithValue(alpha)];
27242 # }
27243 # [result autorelease];
27244 # return result;
27245 # }
27246 # // ...
27247 #
27248 # Example (JavaScript):
27249 #
27250 # // ...
27251 #
27252 # var protoToCssColor = function(rgb_color) {
27253 # var redFrac = rgb_color.red || 0.0;
27254 # var greenFrac = rgb_color.green || 0.0;
27255 # var blueFrac = rgb_color.blue || 0.0;
27256 # var red = Math.floor(redFrac * 255);
27257 # var green = Math.floor(greenFrac * 255);
27258 # var blue = Math.floor(blueFrac * 255);
27259 #
27260 # if (!('alpha' in rgb_color)) {
27261 # return rgbToCssColor_(red, green, blue);
27262 # }
27263 #
27264 # var alphaFrac = rgb_color.alpha.value || 0.0;
27265 # var rgbParams = [red, green, blue].join(',');
27266 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27267 # };
27268 #
27269 # var rgbToCssColor_ = function(red, green, blue) {
27270 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27271 # var hexString = rgbNumber.toString(16);
27272 # var missingZeros = 6 - hexString.length;
27273 # var resultBuilder = ['#'];
27274 # for (var i = 0; i < missingZeros; i++) {
27275 # resultBuilder.push('0');
27276 # }
27277 # resultBuilder.push(hexString);
27278 # return resultBuilder.join('');
27279 # };
27280 #
27281 # // ...
27282 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27283 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27284 # the final pixel color is defined by the equation:
27285 #
27286 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27287 #
27288 # This means that a value of 1.0 corresponds to a solid color, whereas
27289 # a value of 0.0 corresponds to a completely transparent color. This
27290 # uses a wrapper message rather than a simple float scalar so that it is
27291 # possible to distinguish between a default value and the value being unset.
27292 # If omitted, this color object is to be rendered as a solid color
27293 # (as if the alpha value had been explicitly given with a value of 1.0).
27294 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27295 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27296 },
27297 "bold": True or False, # True if the text is bold.
27298 "strikethrough": True or False, # True if the text has a strikethrough.
27299 "fontFamily": "A String", # The font family.
27300 "fontSize": 42, # The size of the font.
27301 "italic": True or False, # True if the text is italicized.
27302 "underline": True or False, # True if the text is underlined.
27303 },
27304 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
27305 "borders": { # The borders of the cell. # The borders of the cell.
27306 "top": { # A border along a cell. # The top border of the cell.
27307 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
27308 # for simplicity of conversion to/from color representations in various
27309 # languages over compactness; for example, the fields of this representation
27310 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27311 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27312 # method in iOS; and, with just a little work, it can be easily formatted into
27313 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27314 #
27315 # Example (Java):
27316 #
27317 # import com.google.type.Color;
27318 #
27319 # // ...
27320 # public static java.awt.Color fromProto(Color protocolor) {
27321 # float alpha = protocolor.hasAlpha()
27322 # ? protocolor.getAlpha().getValue()
27323 # : 1.0;
27324 #
27325 # return new java.awt.Color(
27326 # protocolor.getRed(),
27327 # protocolor.getGreen(),
27328 # protocolor.getBlue(),
27329 # alpha);
27330 # }
27331 #
27332 # public static Color toProto(java.awt.Color color) {
27333 # float red = (float) color.getRed();
27334 # float green = (float) color.getGreen();
27335 # float blue = (float) color.getBlue();
27336 # float denominator = 255.0;
27337 # Color.Builder resultBuilder =
27338 # Color
27339 # .newBuilder()
27340 # .setRed(red / denominator)
27341 # .setGreen(green / denominator)
27342 # .setBlue(blue / denominator);
27343 # int alpha = color.getAlpha();
27344 # if (alpha != 255) {
27345 # result.setAlpha(
27346 # FloatValue
27347 # .newBuilder()
27348 # .setValue(((float) alpha) / denominator)
27349 # .build());
27350 # }
27351 # return resultBuilder.build();
27352 # }
27353 # // ...
27354 #
27355 # Example (iOS / Obj-C):
27356 #
27357 # // ...
27358 # static UIColor* fromProto(Color* protocolor) {
27359 # float red = [protocolor red];
27360 # float green = [protocolor green];
27361 # float blue = [protocolor blue];
27362 # FloatValue* alpha_wrapper = [protocolor alpha];
27363 # float alpha = 1.0;
27364 # if (alpha_wrapper != nil) {
27365 # alpha = [alpha_wrapper value];
27366 # }
27367 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27368 # }
27369 #
27370 # static Color* toProto(UIColor* color) {
27371 # CGFloat red, green, blue, alpha;
27372 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27373 # return nil;
27374 # }
27375 # Color* result = [Color alloc] init];
27376 # [result setRed:red];
27377 # [result setGreen:green];
27378 # [result setBlue:blue];
27379 # if (alpha <= 0.9999) {
27380 # [result setAlpha:floatWrapperWithValue(alpha)];
27381 # }
27382 # [result autorelease];
27383 # return result;
27384 # }
27385 # // ...
27386 #
27387 # Example (JavaScript):
27388 #
27389 # // ...
27390 #
27391 # var protoToCssColor = function(rgb_color) {
27392 # var redFrac = rgb_color.red || 0.0;
27393 # var greenFrac = rgb_color.green || 0.0;
27394 # var blueFrac = rgb_color.blue || 0.0;
27395 # var red = Math.floor(redFrac * 255);
27396 # var green = Math.floor(greenFrac * 255);
27397 # var blue = Math.floor(blueFrac * 255);
27398 #
27399 # if (!('alpha' in rgb_color)) {
27400 # return rgbToCssColor_(red, green, blue);
27401 # }
27402 #
27403 # var alphaFrac = rgb_color.alpha.value || 0.0;
27404 # var rgbParams = [red, green, blue].join(',');
27405 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27406 # };
27407 #
27408 # var rgbToCssColor_ = function(red, green, blue) {
27409 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27410 # var hexString = rgbNumber.toString(16);
27411 # var missingZeros = 6 - hexString.length;
27412 # var resultBuilder = ['#'];
27413 # for (var i = 0; i < missingZeros; i++) {
27414 # resultBuilder.push('0');
27415 # }
27416 # resultBuilder.push(hexString);
27417 # return resultBuilder.join('');
27418 # };
27419 #
27420 # // ...
27421 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27422 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27423 # the final pixel color is defined by the equation:
27424 #
27425 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27426 #
27427 # This means that a value of 1.0 corresponds to a solid color, whereas
27428 # a value of 0.0 corresponds to a completely transparent color. This
27429 # uses a wrapper message rather than a simple float scalar so that it is
27430 # possible to distinguish between a default value and the value being unset.
27431 # If omitted, this color object is to be rendered as a solid color
27432 # (as if the alpha value had been explicitly given with a value of 1.0).
27433 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27434 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27435 },
27436 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027437 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027438 "style": "A String", # The style of the border.
27439 },
27440 "right": { # A border along a cell. # The right border of the cell.
27441 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
27442 # for simplicity of conversion to/from color representations in various
27443 # languages over compactness; for example, the fields of this representation
27444 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27445 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27446 # method in iOS; and, with just a little work, it can be easily formatted into
27447 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27448 #
27449 # Example (Java):
27450 #
27451 # import com.google.type.Color;
27452 #
27453 # // ...
27454 # public static java.awt.Color fromProto(Color protocolor) {
27455 # float alpha = protocolor.hasAlpha()
27456 # ? protocolor.getAlpha().getValue()
27457 # : 1.0;
27458 #
27459 # return new java.awt.Color(
27460 # protocolor.getRed(),
27461 # protocolor.getGreen(),
27462 # protocolor.getBlue(),
27463 # alpha);
27464 # }
27465 #
27466 # public static Color toProto(java.awt.Color color) {
27467 # float red = (float) color.getRed();
27468 # float green = (float) color.getGreen();
27469 # float blue = (float) color.getBlue();
27470 # float denominator = 255.0;
27471 # Color.Builder resultBuilder =
27472 # Color
27473 # .newBuilder()
27474 # .setRed(red / denominator)
27475 # .setGreen(green / denominator)
27476 # .setBlue(blue / denominator);
27477 # int alpha = color.getAlpha();
27478 # if (alpha != 255) {
27479 # result.setAlpha(
27480 # FloatValue
27481 # .newBuilder()
27482 # .setValue(((float) alpha) / denominator)
27483 # .build());
27484 # }
27485 # return resultBuilder.build();
27486 # }
27487 # // ...
27488 #
27489 # Example (iOS / Obj-C):
27490 #
27491 # // ...
27492 # static UIColor* fromProto(Color* protocolor) {
27493 # float red = [protocolor red];
27494 # float green = [protocolor green];
27495 # float blue = [protocolor blue];
27496 # FloatValue* alpha_wrapper = [protocolor alpha];
27497 # float alpha = 1.0;
27498 # if (alpha_wrapper != nil) {
27499 # alpha = [alpha_wrapper value];
27500 # }
27501 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27502 # }
27503 #
27504 # static Color* toProto(UIColor* color) {
27505 # CGFloat red, green, blue, alpha;
27506 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27507 # return nil;
27508 # }
27509 # Color* result = [Color alloc] init];
27510 # [result setRed:red];
27511 # [result setGreen:green];
27512 # [result setBlue:blue];
27513 # if (alpha <= 0.9999) {
27514 # [result setAlpha:floatWrapperWithValue(alpha)];
27515 # }
27516 # [result autorelease];
27517 # return result;
27518 # }
27519 # // ...
27520 #
27521 # Example (JavaScript):
27522 #
27523 # // ...
27524 #
27525 # var protoToCssColor = function(rgb_color) {
27526 # var redFrac = rgb_color.red || 0.0;
27527 # var greenFrac = rgb_color.green || 0.0;
27528 # var blueFrac = rgb_color.blue || 0.0;
27529 # var red = Math.floor(redFrac * 255);
27530 # var green = Math.floor(greenFrac * 255);
27531 # var blue = Math.floor(blueFrac * 255);
27532 #
27533 # if (!('alpha' in rgb_color)) {
27534 # return rgbToCssColor_(red, green, blue);
27535 # }
27536 #
27537 # var alphaFrac = rgb_color.alpha.value || 0.0;
27538 # var rgbParams = [red, green, blue].join(',');
27539 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27540 # };
27541 #
27542 # var rgbToCssColor_ = function(red, green, blue) {
27543 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27544 # var hexString = rgbNumber.toString(16);
27545 # var missingZeros = 6 - hexString.length;
27546 # var resultBuilder = ['#'];
27547 # for (var i = 0; i < missingZeros; i++) {
27548 # resultBuilder.push('0');
27549 # }
27550 # resultBuilder.push(hexString);
27551 # return resultBuilder.join('');
27552 # };
27553 #
27554 # // ...
27555 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27556 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27557 # the final pixel color is defined by the equation:
27558 #
27559 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27560 #
27561 # This means that a value of 1.0 corresponds to a solid color, whereas
27562 # a value of 0.0 corresponds to a completely transparent color. This
27563 # uses a wrapper message rather than a simple float scalar so that it is
27564 # possible to distinguish between a default value and the value being unset.
27565 # If omitted, this color object is to be rendered as a solid color
27566 # (as if the alpha value had been explicitly given with a value of 1.0).
27567 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27568 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27569 },
27570 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027571 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027572 "style": "A String", # The style of the border.
27573 },
27574 "bottom": { # A border along a cell. # The bottom border of the cell.
27575 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
27576 # for simplicity of conversion to/from color representations in various
27577 # languages over compactness; for example, the fields of this representation
27578 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27579 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27580 # method in iOS; and, with just a little work, it can be easily formatted into
27581 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27582 #
27583 # Example (Java):
27584 #
27585 # import com.google.type.Color;
27586 #
27587 # // ...
27588 # public static java.awt.Color fromProto(Color protocolor) {
27589 # float alpha = protocolor.hasAlpha()
27590 # ? protocolor.getAlpha().getValue()
27591 # : 1.0;
27592 #
27593 # return new java.awt.Color(
27594 # protocolor.getRed(),
27595 # protocolor.getGreen(),
27596 # protocolor.getBlue(),
27597 # alpha);
27598 # }
27599 #
27600 # public static Color toProto(java.awt.Color color) {
27601 # float red = (float) color.getRed();
27602 # float green = (float) color.getGreen();
27603 # float blue = (float) color.getBlue();
27604 # float denominator = 255.0;
27605 # Color.Builder resultBuilder =
27606 # Color
27607 # .newBuilder()
27608 # .setRed(red / denominator)
27609 # .setGreen(green / denominator)
27610 # .setBlue(blue / denominator);
27611 # int alpha = color.getAlpha();
27612 # if (alpha != 255) {
27613 # result.setAlpha(
27614 # FloatValue
27615 # .newBuilder()
27616 # .setValue(((float) alpha) / denominator)
27617 # .build());
27618 # }
27619 # return resultBuilder.build();
27620 # }
27621 # // ...
27622 #
27623 # Example (iOS / Obj-C):
27624 #
27625 # // ...
27626 # static UIColor* fromProto(Color* protocolor) {
27627 # float red = [protocolor red];
27628 # float green = [protocolor green];
27629 # float blue = [protocolor blue];
27630 # FloatValue* alpha_wrapper = [protocolor alpha];
27631 # float alpha = 1.0;
27632 # if (alpha_wrapper != nil) {
27633 # alpha = [alpha_wrapper value];
27634 # }
27635 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27636 # }
27637 #
27638 # static Color* toProto(UIColor* color) {
27639 # CGFloat red, green, blue, alpha;
27640 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27641 # return nil;
27642 # }
27643 # Color* result = [Color alloc] init];
27644 # [result setRed:red];
27645 # [result setGreen:green];
27646 # [result setBlue:blue];
27647 # if (alpha <= 0.9999) {
27648 # [result setAlpha:floatWrapperWithValue(alpha)];
27649 # }
27650 # [result autorelease];
27651 # return result;
27652 # }
27653 # // ...
27654 #
27655 # Example (JavaScript):
27656 #
27657 # // ...
27658 #
27659 # var protoToCssColor = function(rgb_color) {
27660 # var redFrac = rgb_color.red || 0.0;
27661 # var greenFrac = rgb_color.green || 0.0;
27662 # var blueFrac = rgb_color.blue || 0.0;
27663 # var red = Math.floor(redFrac * 255);
27664 # var green = Math.floor(greenFrac * 255);
27665 # var blue = Math.floor(blueFrac * 255);
27666 #
27667 # if (!('alpha' in rgb_color)) {
27668 # return rgbToCssColor_(red, green, blue);
27669 # }
27670 #
27671 # var alphaFrac = rgb_color.alpha.value || 0.0;
27672 # var rgbParams = [red, green, blue].join(',');
27673 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27674 # };
27675 #
27676 # var rgbToCssColor_ = function(red, green, blue) {
27677 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27678 # var hexString = rgbNumber.toString(16);
27679 # var missingZeros = 6 - hexString.length;
27680 # var resultBuilder = ['#'];
27681 # for (var i = 0; i < missingZeros; i++) {
27682 # resultBuilder.push('0');
27683 # }
27684 # resultBuilder.push(hexString);
27685 # return resultBuilder.join('');
27686 # };
27687 #
27688 # // ...
27689 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27690 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27691 # the final pixel color is defined by the equation:
27692 #
27693 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27694 #
27695 # This means that a value of 1.0 corresponds to a solid color, whereas
27696 # a value of 0.0 corresponds to a completely transparent color. This
27697 # uses a wrapper message rather than a simple float scalar so that it is
27698 # possible to distinguish between a default value and the value being unset.
27699 # If omitted, this color object is to be rendered as a solid color
27700 # (as if the alpha value had been explicitly given with a value of 1.0).
27701 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27702 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27703 },
27704 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027705 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027706 "style": "A String", # The style of the border.
27707 },
27708 "left": { # A border along a cell. # The left border of the cell.
27709 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
27710 # for simplicity of conversion to/from color representations in various
27711 # languages over compactness; for example, the fields of this representation
27712 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27713 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27714 # method in iOS; and, with just a little work, it can be easily formatted into
27715 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27716 #
27717 # Example (Java):
27718 #
27719 # import com.google.type.Color;
27720 #
27721 # // ...
27722 # public static java.awt.Color fromProto(Color protocolor) {
27723 # float alpha = protocolor.hasAlpha()
27724 # ? protocolor.getAlpha().getValue()
27725 # : 1.0;
27726 #
27727 # return new java.awt.Color(
27728 # protocolor.getRed(),
27729 # protocolor.getGreen(),
27730 # protocolor.getBlue(),
27731 # alpha);
27732 # }
27733 #
27734 # public static Color toProto(java.awt.Color color) {
27735 # float red = (float) color.getRed();
27736 # float green = (float) color.getGreen();
27737 # float blue = (float) color.getBlue();
27738 # float denominator = 255.0;
27739 # Color.Builder resultBuilder =
27740 # Color
27741 # .newBuilder()
27742 # .setRed(red / denominator)
27743 # .setGreen(green / denominator)
27744 # .setBlue(blue / denominator);
27745 # int alpha = color.getAlpha();
27746 # if (alpha != 255) {
27747 # result.setAlpha(
27748 # FloatValue
27749 # .newBuilder()
27750 # .setValue(((float) alpha) / denominator)
27751 # .build());
27752 # }
27753 # return resultBuilder.build();
27754 # }
27755 # // ...
27756 #
27757 # Example (iOS / Obj-C):
27758 #
27759 # // ...
27760 # static UIColor* fromProto(Color* protocolor) {
27761 # float red = [protocolor red];
27762 # float green = [protocolor green];
27763 # float blue = [protocolor blue];
27764 # FloatValue* alpha_wrapper = [protocolor alpha];
27765 # float alpha = 1.0;
27766 # if (alpha_wrapper != nil) {
27767 # alpha = [alpha_wrapper value];
27768 # }
27769 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27770 # }
27771 #
27772 # static Color* toProto(UIColor* color) {
27773 # CGFloat red, green, blue, alpha;
27774 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27775 # return nil;
27776 # }
27777 # Color* result = [Color alloc] init];
27778 # [result setRed:red];
27779 # [result setGreen:green];
27780 # [result setBlue:blue];
27781 # if (alpha <= 0.9999) {
27782 # [result setAlpha:floatWrapperWithValue(alpha)];
27783 # }
27784 # [result autorelease];
27785 # return result;
27786 # }
27787 # // ...
27788 #
27789 # Example (JavaScript):
27790 #
27791 # // ...
27792 #
27793 # var protoToCssColor = function(rgb_color) {
27794 # var redFrac = rgb_color.red || 0.0;
27795 # var greenFrac = rgb_color.green || 0.0;
27796 # var blueFrac = rgb_color.blue || 0.0;
27797 # var red = Math.floor(redFrac * 255);
27798 # var green = Math.floor(greenFrac * 255);
27799 # var blue = Math.floor(blueFrac * 255);
27800 #
27801 # if (!('alpha' in rgb_color)) {
27802 # return rgbToCssColor_(red, green, blue);
27803 # }
27804 #
27805 # var alphaFrac = rgb_color.alpha.value || 0.0;
27806 # var rgbParams = [red, green, blue].join(',');
27807 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27808 # };
27809 #
27810 # var rgbToCssColor_ = function(red, green, blue) {
27811 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27812 # var hexString = rgbNumber.toString(16);
27813 # var missingZeros = 6 - hexString.length;
27814 # var resultBuilder = ['#'];
27815 # for (var i = 0; i < missingZeros; i++) {
27816 # resultBuilder.push('0');
27817 # }
27818 # resultBuilder.push(hexString);
27819 # return resultBuilder.join('');
27820 # };
27821 #
27822 # // ...
27823 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27824 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27825 # the final pixel color is defined by the equation:
27826 #
27827 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27828 #
27829 # This means that a value of 1.0 corresponds to a solid color, whereas
27830 # a value of 0.0 corresponds to a completely transparent color. This
27831 # uses a wrapper message rather than a simple float scalar so that it is
27832 # possible to distinguish between a default value and the value being unset.
27833 # If omitted, this color object is to be rendered as a solid color
27834 # (as if the alpha value had been explicitly given with a value of 1.0).
27835 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27836 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27837 },
27838 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027839 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027840 "style": "A String", # The style of the border.
27841 },
27842 },
27843 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
27844 },
27845 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
27846 #
27847 # When writing, the new format will be merged with the existing format.
27848 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027849 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
27850 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027851 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027852 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027853 },
27854 "textDirection": "A String", # The direction of the text in the cell.
27855 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
27856 # When updating padding, every field must be specified.
27857 "top": 42, # The top padding of the cell.
27858 "right": 42, # The right padding of the cell.
27859 "bottom": 42, # The bottom padding of the cell.
27860 "left": 42, # The left padding of the cell.
27861 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027862 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027863 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
27864 # for simplicity of conversion to/from color representations in various
27865 # languages over compactness; for example, the fields of this representation
27866 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27867 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27868 # method in iOS; and, with just a little work, it can be easily formatted into
27869 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27870 #
27871 # Example (Java):
27872 #
27873 # import com.google.type.Color;
27874 #
27875 # // ...
27876 # public static java.awt.Color fromProto(Color protocolor) {
27877 # float alpha = protocolor.hasAlpha()
27878 # ? protocolor.getAlpha().getValue()
27879 # : 1.0;
27880 #
27881 # return new java.awt.Color(
27882 # protocolor.getRed(),
27883 # protocolor.getGreen(),
27884 # protocolor.getBlue(),
27885 # alpha);
27886 # }
27887 #
27888 # public static Color toProto(java.awt.Color color) {
27889 # float red = (float) color.getRed();
27890 # float green = (float) color.getGreen();
27891 # float blue = (float) color.getBlue();
27892 # float denominator = 255.0;
27893 # Color.Builder resultBuilder =
27894 # Color
27895 # .newBuilder()
27896 # .setRed(red / denominator)
27897 # .setGreen(green / denominator)
27898 # .setBlue(blue / denominator);
27899 # int alpha = color.getAlpha();
27900 # if (alpha != 255) {
27901 # result.setAlpha(
27902 # FloatValue
27903 # .newBuilder()
27904 # .setValue(((float) alpha) / denominator)
27905 # .build());
27906 # }
27907 # return resultBuilder.build();
27908 # }
27909 # // ...
27910 #
27911 # Example (iOS / Obj-C):
27912 #
27913 # // ...
27914 # static UIColor* fromProto(Color* protocolor) {
27915 # float red = [protocolor red];
27916 # float green = [protocolor green];
27917 # float blue = [protocolor blue];
27918 # FloatValue* alpha_wrapper = [protocolor alpha];
27919 # float alpha = 1.0;
27920 # if (alpha_wrapper != nil) {
27921 # alpha = [alpha_wrapper value];
27922 # }
27923 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27924 # }
27925 #
27926 # static Color* toProto(UIColor* color) {
27927 # CGFloat red, green, blue, alpha;
27928 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27929 # return nil;
27930 # }
27931 # Color* result = [Color alloc] init];
27932 # [result setRed:red];
27933 # [result setGreen:green];
27934 # [result setBlue:blue];
27935 # if (alpha <= 0.9999) {
27936 # [result setAlpha:floatWrapperWithValue(alpha)];
27937 # }
27938 # [result autorelease];
27939 # return result;
27940 # }
27941 # // ...
27942 #
27943 # Example (JavaScript):
27944 #
27945 # // ...
27946 #
27947 # var protoToCssColor = function(rgb_color) {
27948 # var redFrac = rgb_color.red || 0.0;
27949 # var greenFrac = rgb_color.green || 0.0;
27950 # var blueFrac = rgb_color.blue || 0.0;
27951 # var red = Math.floor(redFrac * 255);
27952 # var green = Math.floor(greenFrac * 255);
27953 # var blue = Math.floor(blueFrac * 255);
27954 #
27955 # if (!('alpha' in rgb_color)) {
27956 # return rgbToCssColor_(red, green, blue);
27957 # }
27958 #
27959 # var alphaFrac = rgb_color.alpha.value || 0.0;
27960 # var rgbParams = [red, green, blue].join(',');
27961 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27962 # };
27963 #
27964 # var rgbToCssColor_ = function(red, green, blue) {
27965 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27966 # var hexString = rgbNumber.toString(16);
27967 # var missingZeros = 6 - hexString.length;
27968 # var resultBuilder = ['#'];
27969 # for (var i = 0; i < missingZeros; i++) {
27970 # resultBuilder.push('0');
27971 # }
27972 # resultBuilder.push(hexString);
27973 # return resultBuilder.join('');
27974 # };
27975 #
27976 # // ...
27977 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27978 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27979 # the final pixel color is defined by the equation:
27980 #
27981 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27982 #
27983 # This means that a value of 1.0 corresponds to a solid color, whereas
27984 # a value of 0.0 corresponds to a completely transparent color. This
27985 # uses a wrapper message rather than a simple float scalar so that it is
27986 # possible to distinguish between a default value and the value being unset.
27987 # If omitted, this color object is to be rendered as a solid color
27988 # (as if the alpha value had been explicitly given with a value of 1.0).
27989 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27990 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27991 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027992 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027993 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
27994 # Absent values indicate that the field isn't specified.
27995 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
27996 # for simplicity of conversion to/from color representations in various
27997 # languages over compactness; for example, the fields of this representation
27998 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27999 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28000 # method in iOS; and, with just a little work, it can be easily formatted into
28001 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28002 #
28003 # Example (Java):
28004 #
28005 # import com.google.type.Color;
28006 #
28007 # // ...
28008 # public static java.awt.Color fromProto(Color protocolor) {
28009 # float alpha = protocolor.hasAlpha()
28010 # ? protocolor.getAlpha().getValue()
28011 # : 1.0;
28012 #
28013 # return new java.awt.Color(
28014 # protocolor.getRed(),
28015 # protocolor.getGreen(),
28016 # protocolor.getBlue(),
28017 # alpha);
28018 # }
28019 #
28020 # public static Color toProto(java.awt.Color color) {
28021 # float red = (float) color.getRed();
28022 # float green = (float) color.getGreen();
28023 # float blue = (float) color.getBlue();
28024 # float denominator = 255.0;
28025 # Color.Builder resultBuilder =
28026 # Color
28027 # .newBuilder()
28028 # .setRed(red / denominator)
28029 # .setGreen(green / denominator)
28030 # .setBlue(blue / denominator);
28031 # int alpha = color.getAlpha();
28032 # if (alpha != 255) {
28033 # result.setAlpha(
28034 # FloatValue
28035 # .newBuilder()
28036 # .setValue(((float) alpha) / denominator)
28037 # .build());
28038 # }
28039 # return resultBuilder.build();
28040 # }
28041 # // ...
28042 #
28043 # Example (iOS / Obj-C):
28044 #
28045 # // ...
28046 # static UIColor* fromProto(Color* protocolor) {
28047 # float red = [protocolor red];
28048 # float green = [protocolor green];
28049 # float blue = [protocolor blue];
28050 # FloatValue* alpha_wrapper = [protocolor alpha];
28051 # float alpha = 1.0;
28052 # if (alpha_wrapper != nil) {
28053 # alpha = [alpha_wrapper value];
28054 # }
28055 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28056 # }
28057 #
28058 # static Color* toProto(UIColor* color) {
28059 # CGFloat red, green, blue, alpha;
28060 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28061 # return nil;
28062 # }
28063 # Color* result = [Color alloc] init];
28064 # [result setRed:red];
28065 # [result setGreen:green];
28066 # [result setBlue:blue];
28067 # if (alpha <= 0.9999) {
28068 # [result setAlpha:floatWrapperWithValue(alpha)];
28069 # }
28070 # [result autorelease];
28071 # return result;
28072 # }
28073 # // ...
28074 #
28075 # Example (JavaScript):
28076 #
28077 # // ...
28078 #
28079 # var protoToCssColor = function(rgb_color) {
28080 # var redFrac = rgb_color.red || 0.0;
28081 # var greenFrac = rgb_color.green || 0.0;
28082 # var blueFrac = rgb_color.blue || 0.0;
28083 # var red = Math.floor(redFrac * 255);
28084 # var green = Math.floor(greenFrac * 255);
28085 # var blue = Math.floor(blueFrac * 255);
28086 #
28087 # if (!('alpha' in rgb_color)) {
28088 # return rgbToCssColor_(red, green, blue);
28089 # }
28090 #
28091 # var alphaFrac = rgb_color.alpha.value || 0.0;
28092 # var rgbParams = [red, green, blue].join(',');
28093 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28094 # };
28095 #
28096 # var rgbToCssColor_ = function(red, green, blue) {
28097 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28098 # var hexString = rgbNumber.toString(16);
28099 # var missingZeros = 6 - hexString.length;
28100 # var resultBuilder = ['#'];
28101 # for (var i = 0; i < missingZeros; i++) {
28102 # resultBuilder.push('0');
28103 # }
28104 # resultBuilder.push(hexString);
28105 # return resultBuilder.join('');
28106 # };
28107 #
28108 # // ...
28109 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28110 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28111 # the final pixel color is defined by the equation:
28112 #
28113 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28114 #
28115 # This means that a value of 1.0 corresponds to a solid color, whereas
28116 # a value of 0.0 corresponds to a completely transparent color. This
28117 # uses a wrapper message rather than a simple float scalar so that it is
28118 # possible to distinguish between a default value and the value being unset.
28119 # If omitted, this color object is to be rendered as a solid color
28120 # (as if the alpha value had been explicitly given with a value of 1.0).
28121 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28122 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28123 },
28124 "bold": True or False, # True if the text is bold.
28125 "strikethrough": True or False, # True if the text has a strikethrough.
28126 "fontFamily": "A String", # The font family.
28127 "fontSize": 42, # The size of the font.
28128 "italic": True or False, # True if the text is italicized.
28129 "underline": True or False, # True if the text is underlined.
28130 },
28131 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
28132 "borders": { # The borders of the cell. # The borders of the cell.
28133 "top": { # A border along a cell. # The top border of the cell.
28134 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
28135 # for simplicity of conversion to/from color representations in various
28136 # languages over compactness; for example, the fields of this representation
28137 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28138 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28139 # method in iOS; and, with just a little work, it can be easily formatted into
28140 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28141 #
28142 # Example (Java):
28143 #
28144 # import com.google.type.Color;
28145 #
28146 # // ...
28147 # public static java.awt.Color fromProto(Color protocolor) {
28148 # float alpha = protocolor.hasAlpha()
28149 # ? protocolor.getAlpha().getValue()
28150 # : 1.0;
28151 #
28152 # return new java.awt.Color(
28153 # protocolor.getRed(),
28154 # protocolor.getGreen(),
28155 # protocolor.getBlue(),
28156 # alpha);
28157 # }
28158 #
28159 # public static Color toProto(java.awt.Color color) {
28160 # float red = (float) color.getRed();
28161 # float green = (float) color.getGreen();
28162 # float blue = (float) color.getBlue();
28163 # float denominator = 255.0;
28164 # Color.Builder resultBuilder =
28165 # Color
28166 # .newBuilder()
28167 # .setRed(red / denominator)
28168 # .setGreen(green / denominator)
28169 # .setBlue(blue / denominator);
28170 # int alpha = color.getAlpha();
28171 # if (alpha != 255) {
28172 # result.setAlpha(
28173 # FloatValue
28174 # .newBuilder()
28175 # .setValue(((float) alpha) / denominator)
28176 # .build());
28177 # }
28178 # return resultBuilder.build();
28179 # }
28180 # // ...
28181 #
28182 # Example (iOS / Obj-C):
28183 #
28184 # // ...
28185 # static UIColor* fromProto(Color* protocolor) {
28186 # float red = [protocolor red];
28187 # float green = [protocolor green];
28188 # float blue = [protocolor blue];
28189 # FloatValue* alpha_wrapper = [protocolor alpha];
28190 # float alpha = 1.0;
28191 # if (alpha_wrapper != nil) {
28192 # alpha = [alpha_wrapper value];
28193 # }
28194 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28195 # }
28196 #
28197 # static Color* toProto(UIColor* color) {
28198 # CGFloat red, green, blue, alpha;
28199 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28200 # return nil;
28201 # }
28202 # Color* result = [Color alloc] init];
28203 # [result setRed:red];
28204 # [result setGreen:green];
28205 # [result setBlue:blue];
28206 # if (alpha <= 0.9999) {
28207 # [result setAlpha:floatWrapperWithValue(alpha)];
28208 # }
28209 # [result autorelease];
28210 # return result;
28211 # }
28212 # // ...
28213 #
28214 # Example (JavaScript):
28215 #
28216 # // ...
28217 #
28218 # var protoToCssColor = function(rgb_color) {
28219 # var redFrac = rgb_color.red || 0.0;
28220 # var greenFrac = rgb_color.green || 0.0;
28221 # var blueFrac = rgb_color.blue || 0.0;
28222 # var red = Math.floor(redFrac * 255);
28223 # var green = Math.floor(greenFrac * 255);
28224 # var blue = Math.floor(blueFrac * 255);
28225 #
28226 # if (!('alpha' in rgb_color)) {
28227 # return rgbToCssColor_(red, green, blue);
28228 # }
28229 #
28230 # var alphaFrac = rgb_color.alpha.value || 0.0;
28231 # var rgbParams = [red, green, blue].join(',');
28232 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28233 # };
28234 #
28235 # var rgbToCssColor_ = function(red, green, blue) {
28236 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28237 # var hexString = rgbNumber.toString(16);
28238 # var missingZeros = 6 - hexString.length;
28239 # var resultBuilder = ['#'];
28240 # for (var i = 0; i < missingZeros; i++) {
28241 # resultBuilder.push('0');
28242 # }
28243 # resultBuilder.push(hexString);
28244 # return resultBuilder.join('');
28245 # };
28246 #
28247 # // ...
28248 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28249 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28250 # the final pixel color is defined by the equation:
28251 #
28252 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28253 #
28254 # This means that a value of 1.0 corresponds to a solid color, whereas
28255 # a value of 0.0 corresponds to a completely transparent color. This
28256 # uses a wrapper message rather than a simple float scalar so that it is
28257 # possible to distinguish between a default value and the value being unset.
28258 # If omitted, this color object is to be rendered as a solid color
28259 # (as if the alpha value had been explicitly given with a value of 1.0).
28260 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28261 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28262 },
28263 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028264 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028265 "style": "A String", # The style of the border.
28266 },
28267 "right": { # A border along a cell. # The right border of the cell.
28268 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
28269 # for simplicity of conversion to/from color representations in various
28270 # languages over compactness; for example, the fields of this representation
28271 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28272 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28273 # method in iOS; and, with just a little work, it can be easily formatted into
28274 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28275 #
28276 # Example (Java):
28277 #
28278 # import com.google.type.Color;
28279 #
28280 # // ...
28281 # public static java.awt.Color fromProto(Color protocolor) {
28282 # float alpha = protocolor.hasAlpha()
28283 # ? protocolor.getAlpha().getValue()
28284 # : 1.0;
28285 #
28286 # return new java.awt.Color(
28287 # protocolor.getRed(),
28288 # protocolor.getGreen(),
28289 # protocolor.getBlue(),
28290 # alpha);
28291 # }
28292 #
28293 # public static Color toProto(java.awt.Color color) {
28294 # float red = (float) color.getRed();
28295 # float green = (float) color.getGreen();
28296 # float blue = (float) color.getBlue();
28297 # float denominator = 255.0;
28298 # Color.Builder resultBuilder =
28299 # Color
28300 # .newBuilder()
28301 # .setRed(red / denominator)
28302 # .setGreen(green / denominator)
28303 # .setBlue(blue / denominator);
28304 # int alpha = color.getAlpha();
28305 # if (alpha != 255) {
28306 # result.setAlpha(
28307 # FloatValue
28308 # .newBuilder()
28309 # .setValue(((float) alpha) / denominator)
28310 # .build());
28311 # }
28312 # return resultBuilder.build();
28313 # }
28314 # // ...
28315 #
28316 # Example (iOS / Obj-C):
28317 #
28318 # // ...
28319 # static UIColor* fromProto(Color* protocolor) {
28320 # float red = [protocolor red];
28321 # float green = [protocolor green];
28322 # float blue = [protocolor blue];
28323 # FloatValue* alpha_wrapper = [protocolor alpha];
28324 # float alpha = 1.0;
28325 # if (alpha_wrapper != nil) {
28326 # alpha = [alpha_wrapper value];
28327 # }
28328 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28329 # }
28330 #
28331 # static Color* toProto(UIColor* color) {
28332 # CGFloat red, green, blue, alpha;
28333 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28334 # return nil;
28335 # }
28336 # Color* result = [Color alloc] init];
28337 # [result setRed:red];
28338 # [result setGreen:green];
28339 # [result setBlue:blue];
28340 # if (alpha <= 0.9999) {
28341 # [result setAlpha:floatWrapperWithValue(alpha)];
28342 # }
28343 # [result autorelease];
28344 # return result;
28345 # }
28346 # // ...
28347 #
28348 # Example (JavaScript):
28349 #
28350 # // ...
28351 #
28352 # var protoToCssColor = function(rgb_color) {
28353 # var redFrac = rgb_color.red || 0.0;
28354 # var greenFrac = rgb_color.green || 0.0;
28355 # var blueFrac = rgb_color.blue || 0.0;
28356 # var red = Math.floor(redFrac * 255);
28357 # var green = Math.floor(greenFrac * 255);
28358 # var blue = Math.floor(blueFrac * 255);
28359 #
28360 # if (!('alpha' in rgb_color)) {
28361 # return rgbToCssColor_(red, green, blue);
28362 # }
28363 #
28364 # var alphaFrac = rgb_color.alpha.value || 0.0;
28365 # var rgbParams = [red, green, blue].join(',');
28366 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28367 # };
28368 #
28369 # var rgbToCssColor_ = function(red, green, blue) {
28370 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28371 # var hexString = rgbNumber.toString(16);
28372 # var missingZeros = 6 - hexString.length;
28373 # var resultBuilder = ['#'];
28374 # for (var i = 0; i < missingZeros; i++) {
28375 # resultBuilder.push('0');
28376 # }
28377 # resultBuilder.push(hexString);
28378 # return resultBuilder.join('');
28379 # };
28380 #
28381 # // ...
28382 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28383 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28384 # the final pixel color is defined by the equation:
28385 #
28386 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28387 #
28388 # This means that a value of 1.0 corresponds to a solid color, whereas
28389 # a value of 0.0 corresponds to a completely transparent color. This
28390 # uses a wrapper message rather than a simple float scalar so that it is
28391 # possible to distinguish between a default value and the value being unset.
28392 # If omitted, this color object is to be rendered as a solid color
28393 # (as if the alpha value had been explicitly given with a value of 1.0).
28394 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28395 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28396 },
28397 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028398 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028399 "style": "A String", # The style of the border.
28400 },
28401 "bottom": { # A border along a cell. # The bottom border of the cell.
28402 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
28403 # for simplicity of conversion to/from color representations in various
28404 # languages over compactness; for example, the fields of this representation
28405 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28406 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28407 # method in iOS; and, with just a little work, it can be easily formatted into
28408 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28409 #
28410 # Example (Java):
28411 #
28412 # import com.google.type.Color;
28413 #
28414 # // ...
28415 # public static java.awt.Color fromProto(Color protocolor) {
28416 # float alpha = protocolor.hasAlpha()
28417 # ? protocolor.getAlpha().getValue()
28418 # : 1.0;
28419 #
28420 # return new java.awt.Color(
28421 # protocolor.getRed(),
28422 # protocolor.getGreen(),
28423 # protocolor.getBlue(),
28424 # alpha);
28425 # }
28426 #
28427 # public static Color toProto(java.awt.Color color) {
28428 # float red = (float) color.getRed();
28429 # float green = (float) color.getGreen();
28430 # float blue = (float) color.getBlue();
28431 # float denominator = 255.0;
28432 # Color.Builder resultBuilder =
28433 # Color
28434 # .newBuilder()
28435 # .setRed(red / denominator)
28436 # .setGreen(green / denominator)
28437 # .setBlue(blue / denominator);
28438 # int alpha = color.getAlpha();
28439 # if (alpha != 255) {
28440 # result.setAlpha(
28441 # FloatValue
28442 # .newBuilder()
28443 # .setValue(((float) alpha) / denominator)
28444 # .build());
28445 # }
28446 # return resultBuilder.build();
28447 # }
28448 # // ...
28449 #
28450 # Example (iOS / Obj-C):
28451 #
28452 # // ...
28453 # static UIColor* fromProto(Color* protocolor) {
28454 # float red = [protocolor red];
28455 # float green = [protocolor green];
28456 # float blue = [protocolor blue];
28457 # FloatValue* alpha_wrapper = [protocolor alpha];
28458 # float alpha = 1.0;
28459 # if (alpha_wrapper != nil) {
28460 # alpha = [alpha_wrapper value];
28461 # }
28462 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28463 # }
28464 #
28465 # static Color* toProto(UIColor* color) {
28466 # CGFloat red, green, blue, alpha;
28467 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28468 # return nil;
28469 # }
28470 # Color* result = [Color alloc] init];
28471 # [result setRed:red];
28472 # [result setGreen:green];
28473 # [result setBlue:blue];
28474 # if (alpha <= 0.9999) {
28475 # [result setAlpha:floatWrapperWithValue(alpha)];
28476 # }
28477 # [result autorelease];
28478 # return result;
28479 # }
28480 # // ...
28481 #
28482 # Example (JavaScript):
28483 #
28484 # // ...
28485 #
28486 # var protoToCssColor = function(rgb_color) {
28487 # var redFrac = rgb_color.red || 0.0;
28488 # var greenFrac = rgb_color.green || 0.0;
28489 # var blueFrac = rgb_color.blue || 0.0;
28490 # var red = Math.floor(redFrac * 255);
28491 # var green = Math.floor(greenFrac * 255);
28492 # var blue = Math.floor(blueFrac * 255);
28493 #
28494 # if (!('alpha' in rgb_color)) {
28495 # return rgbToCssColor_(red, green, blue);
28496 # }
28497 #
28498 # var alphaFrac = rgb_color.alpha.value || 0.0;
28499 # var rgbParams = [red, green, blue].join(',');
28500 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28501 # };
28502 #
28503 # var rgbToCssColor_ = function(red, green, blue) {
28504 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28505 # var hexString = rgbNumber.toString(16);
28506 # var missingZeros = 6 - hexString.length;
28507 # var resultBuilder = ['#'];
28508 # for (var i = 0; i < missingZeros; i++) {
28509 # resultBuilder.push('0');
28510 # }
28511 # resultBuilder.push(hexString);
28512 # return resultBuilder.join('');
28513 # };
28514 #
28515 # // ...
28516 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28517 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28518 # the final pixel color is defined by the equation:
28519 #
28520 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28521 #
28522 # This means that a value of 1.0 corresponds to a solid color, whereas
28523 # a value of 0.0 corresponds to a completely transparent color. This
28524 # uses a wrapper message rather than a simple float scalar so that it is
28525 # possible to distinguish between a default value and the value being unset.
28526 # If omitted, this color object is to be rendered as a solid color
28527 # (as if the alpha value had been explicitly given with a value of 1.0).
28528 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28529 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28530 },
28531 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028532 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028533 "style": "A String", # The style of the border.
28534 },
28535 "left": { # A border along a cell. # The left border of the cell.
28536 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
28537 # for simplicity of conversion to/from color representations in various
28538 # languages over compactness; for example, the fields of this representation
28539 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28540 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28541 # method in iOS; and, with just a little work, it can be easily formatted into
28542 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28543 #
28544 # Example (Java):
28545 #
28546 # import com.google.type.Color;
28547 #
28548 # // ...
28549 # public static java.awt.Color fromProto(Color protocolor) {
28550 # float alpha = protocolor.hasAlpha()
28551 # ? protocolor.getAlpha().getValue()
28552 # : 1.0;
28553 #
28554 # return new java.awt.Color(
28555 # protocolor.getRed(),
28556 # protocolor.getGreen(),
28557 # protocolor.getBlue(),
28558 # alpha);
28559 # }
28560 #
28561 # public static Color toProto(java.awt.Color color) {
28562 # float red = (float) color.getRed();
28563 # float green = (float) color.getGreen();
28564 # float blue = (float) color.getBlue();
28565 # float denominator = 255.0;
28566 # Color.Builder resultBuilder =
28567 # Color
28568 # .newBuilder()
28569 # .setRed(red / denominator)
28570 # .setGreen(green / denominator)
28571 # .setBlue(blue / denominator);
28572 # int alpha = color.getAlpha();
28573 # if (alpha != 255) {
28574 # result.setAlpha(
28575 # FloatValue
28576 # .newBuilder()
28577 # .setValue(((float) alpha) / denominator)
28578 # .build());
28579 # }
28580 # return resultBuilder.build();
28581 # }
28582 # // ...
28583 #
28584 # Example (iOS / Obj-C):
28585 #
28586 # // ...
28587 # static UIColor* fromProto(Color* protocolor) {
28588 # float red = [protocolor red];
28589 # float green = [protocolor green];
28590 # float blue = [protocolor blue];
28591 # FloatValue* alpha_wrapper = [protocolor alpha];
28592 # float alpha = 1.0;
28593 # if (alpha_wrapper != nil) {
28594 # alpha = [alpha_wrapper value];
28595 # }
28596 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28597 # }
28598 #
28599 # static Color* toProto(UIColor* color) {
28600 # CGFloat red, green, blue, alpha;
28601 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28602 # return nil;
28603 # }
28604 # Color* result = [Color alloc] init];
28605 # [result setRed:red];
28606 # [result setGreen:green];
28607 # [result setBlue:blue];
28608 # if (alpha <= 0.9999) {
28609 # [result setAlpha:floatWrapperWithValue(alpha)];
28610 # }
28611 # [result autorelease];
28612 # return result;
28613 # }
28614 # // ...
28615 #
28616 # Example (JavaScript):
28617 #
28618 # // ...
28619 #
28620 # var protoToCssColor = function(rgb_color) {
28621 # var redFrac = rgb_color.red || 0.0;
28622 # var greenFrac = rgb_color.green || 0.0;
28623 # var blueFrac = rgb_color.blue || 0.0;
28624 # var red = Math.floor(redFrac * 255);
28625 # var green = Math.floor(greenFrac * 255);
28626 # var blue = Math.floor(blueFrac * 255);
28627 #
28628 # if (!('alpha' in rgb_color)) {
28629 # return rgbToCssColor_(red, green, blue);
28630 # }
28631 #
28632 # var alphaFrac = rgb_color.alpha.value || 0.0;
28633 # var rgbParams = [red, green, blue].join(',');
28634 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28635 # };
28636 #
28637 # var rgbToCssColor_ = function(red, green, blue) {
28638 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28639 # var hexString = rgbNumber.toString(16);
28640 # var missingZeros = 6 - hexString.length;
28641 # var resultBuilder = ['#'];
28642 # for (var i = 0; i < missingZeros; i++) {
28643 # resultBuilder.push('0');
28644 # }
28645 # resultBuilder.push(hexString);
28646 # return resultBuilder.join('');
28647 # };
28648 #
28649 # // ...
28650 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28651 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28652 # the final pixel color is defined by the equation:
28653 #
28654 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28655 #
28656 # This means that a value of 1.0 corresponds to a solid color, whereas
28657 # a value of 0.0 corresponds to a completely transparent color. This
28658 # uses a wrapper message rather than a simple float scalar so that it is
28659 # possible to distinguish between a default value and the value being unset.
28660 # If omitted, this color object is to be rendered as a solid color
28661 # (as if the alpha value had been explicitly given with a value of 1.0).
28662 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28663 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28664 },
28665 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028666 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028667 "style": "A String", # The style of the border.
28668 },
28669 },
28670 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
28671 },
28672 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
28673 #
28674 # When writing, the new data validation rule will overwrite any prior rule.
28675 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
28676 # If true, "List" conditions will show a dropdown.
28677 "strict": True or False, # True if invalid data should be rejected.
28678 "inputMessage": "A String", # A message to show the user when adding data to the cell.
28679 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
28680 # BooleanConditions are used by conditional formatting,
28681 # data validation, and the criteria in filters.
28682 "type": "A String", # The type of condition.
28683 "values": [ # The values of the condition. The number of supported values depends
28684 # on the condition type. Some support zero values,
28685 # others one or two values,
28686 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
28687 { # The value of the condition.
28688 "relativeDate": "A String", # A relative date (based on the current date).
28689 # Valid only if the type is
28690 # DATE_BEFORE,
28691 # DATE_AFTER,
28692 # DATE_ON_OR_BEFORE or
28693 # DATE_ON_OR_AFTER.
28694 #
28695 # Relative dates are not supported in data validation.
28696 # They are supported only in conditional formatting and
28697 # conditional filters.
28698 "userEnteredValue": "A String", # A value the condition is based on.
28699 # The value will be parsed as if the user typed into a cell.
28700 # Formulas are supported (and must begin with an `=`).
28701 },
28702 ],
28703 },
28704 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028705 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
28706 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028707 # Runs start at specific indexes in the text and continue until the next
28708 # run. Properties of a run will continue unless explicitly changed
28709 # in a subsequent run (and properties of the first run will continue
28710 # the properties of the cell unless explicitly changed).
28711 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028712 # When writing, the new runs will overwrite any prior runs. When writing a
28713 # new user_entered_value, previous runs will be erased.
28714 { # A run of a text format. The format of this run continues until the start
28715 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028716 # When updating, all fields must be set.
28717 "startIndex": 42, # The character index where this run starts.
28718 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
28719 # Absent values indicate that the field isn't specified.
28720 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
28721 # for simplicity of conversion to/from color representations in various
28722 # languages over compactness; for example, the fields of this representation
28723 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28724 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28725 # method in iOS; and, with just a little work, it can be easily formatted into
28726 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28727 #
28728 # Example (Java):
28729 #
28730 # import com.google.type.Color;
28731 #
28732 # // ...
28733 # public static java.awt.Color fromProto(Color protocolor) {
28734 # float alpha = protocolor.hasAlpha()
28735 # ? protocolor.getAlpha().getValue()
28736 # : 1.0;
28737 #
28738 # return new java.awt.Color(
28739 # protocolor.getRed(),
28740 # protocolor.getGreen(),
28741 # protocolor.getBlue(),
28742 # alpha);
28743 # }
28744 #
28745 # public static Color toProto(java.awt.Color color) {
28746 # float red = (float) color.getRed();
28747 # float green = (float) color.getGreen();
28748 # float blue = (float) color.getBlue();
28749 # float denominator = 255.0;
28750 # Color.Builder resultBuilder =
28751 # Color
28752 # .newBuilder()
28753 # .setRed(red / denominator)
28754 # .setGreen(green / denominator)
28755 # .setBlue(blue / denominator);
28756 # int alpha = color.getAlpha();
28757 # if (alpha != 255) {
28758 # result.setAlpha(
28759 # FloatValue
28760 # .newBuilder()
28761 # .setValue(((float) alpha) / denominator)
28762 # .build());
28763 # }
28764 # return resultBuilder.build();
28765 # }
28766 # // ...
28767 #
28768 # Example (iOS / Obj-C):
28769 #
28770 # // ...
28771 # static UIColor* fromProto(Color* protocolor) {
28772 # float red = [protocolor red];
28773 # float green = [protocolor green];
28774 # float blue = [protocolor blue];
28775 # FloatValue* alpha_wrapper = [protocolor alpha];
28776 # float alpha = 1.0;
28777 # if (alpha_wrapper != nil) {
28778 # alpha = [alpha_wrapper value];
28779 # }
28780 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28781 # }
28782 #
28783 # static Color* toProto(UIColor* color) {
28784 # CGFloat red, green, blue, alpha;
28785 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28786 # return nil;
28787 # }
28788 # Color* result = [Color alloc] init];
28789 # [result setRed:red];
28790 # [result setGreen:green];
28791 # [result setBlue:blue];
28792 # if (alpha <= 0.9999) {
28793 # [result setAlpha:floatWrapperWithValue(alpha)];
28794 # }
28795 # [result autorelease];
28796 # return result;
28797 # }
28798 # // ...
28799 #
28800 # Example (JavaScript):
28801 #
28802 # // ...
28803 #
28804 # var protoToCssColor = function(rgb_color) {
28805 # var redFrac = rgb_color.red || 0.0;
28806 # var greenFrac = rgb_color.green || 0.0;
28807 # var blueFrac = rgb_color.blue || 0.0;
28808 # var red = Math.floor(redFrac * 255);
28809 # var green = Math.floor(greenFrac * 255);
28810 # var blue = Math.floor(blueFrac * 255);
28811 #
28812 # if (!('alpha' in rgb_color)) {
28813 # return rgbToCssColor_(red, green, blue);
28814 # }
28815 #
28816 # var alphaFrac = rgb_color.alpha.value || 0.0;
28817 # var rgbParams = [red, green, blue].join(',');
28818 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28819 # };
28820 #
28821 # var rgbToCssColor_ = function(red, green, blue) {
28822 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28823 # var hexString = rgbNumber.toString(16);
28824 # var missingZeros = 6 - hexString.length;
28825 # var resultBuilder = ['#'];
28826 # for (var i = 0; i < missingZeros; i++) {
28827 # resultBuilder.push('0');
28828 # }
28829 # resultBuilder.push(hexString);
28830 # return resultBuilder.join('');
28831 # };
28832 #
28833 # // ...
28834 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28835 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28836 # the final pixel color is defined by the equation:
28837 #
28838 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28839 #
28840 # This means that a value of 1.0 corresponds to a solid color, whereas
28841 # a value of 0.0 corresponds to a completely transparent color. This
28842 # uses a wrapper message rather than a simple float scalar so that it is
28843 # possible to distinguish between a default value and the value being unset.
28844 # If omitted, this color object is to be rendered as a solid color
28845 # (as if the alpha value had been explicitly given with a value of 1.0).
28846 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28847 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28848 },
28849 "bold": True or False, # True if the text is bold.
28850 "strikethrough": True or False, # True if the text has a strikethrough.
28851 "fontFamily": "A String", # The font family.
28852 "fontSize": 42, # The size of the font.
28853 "italic": True or False, # True if the text is italicized.
28854 "underline": True or False, # True if the text is underlined.
28855 },
28856 },
28857 ],
28858 },
28859 ],
28860 },
28861 ],
28862 },
28863 ],
28864 "properties": { # Properties of a sheet. # The properties of the sheet.
28865 "sheetType": "A String", # The type of sheet. Defaults to GRID.
28866 # This field cannot be changed once set.
28867 "index": 42, # The index of the sheet within the spreadsheet.
28868 # When adding or updating sheet properties, if this field
28869 # is excluded then the sheet will be added or moved to the end
28870 # of the sheet list.
28871 "title": "A String", # The name of the sheet.
28872 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
28873 # (If the sheet is an object sheet, containing a chart or image, then
28874 # this field will be absent.)
28875 # When writing it is an error to set any grid properties on non-grid sheets.
28876 "columnCount": 42, # The number of columns in the grid.
28877 "rowCount": 42, # The number of rows in the grid.
28878 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
28879 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
28880 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
28881 },
28882 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
28883 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
28884 # for simplicity of conversion to/from color representations in various
28885 # languages over compactness; for example, the fields of this representation
28886 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28887 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28888 # method in iOS; and, with just a little work, it can be easily formatted into
28889 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28890 #
28891 # Example (Java):
28892 #
28893 # import com.google.type.Color;
28894 #
28895 # // ...
28896 # public static java.awt.Color fromProto(Color protocolor) {
28897 # float alpha = protocolor.hasAlpha()
28898 # ? protocolor.getAlpha().getValue()
28899 # : 1.0;
28900 #
28901 # return new java.awt.Color(
28902 # protocolor.getRed(),
28903 # protocolor.getGreen(),
28904 # protocolor.getBlue(),
28905 # alpha);
28906 # }
28907 #
28908 # public static Color toProto(java.awt.Color color) {
28909 # float red = (float) color.getRed();
28910 # float green = (float) color.getGreen();
28911 # float blue = (float) color.getBlue();
28912 # float denominator = 255.0;
28913 # Color.Builder resultBuilder =
28914 # Color
28915 # .newBuilder()
28916 # .setRed(red / denominator)
28917 # .setGreen(green / denominator)
28918 # .setBlue(blue / denominator);
28919 # int alpha = color.getAlpha();
28920 # if (alpha != 255) {
28921 # result.setAlpha(
28922 # FloatValue
28923 # .newBuilder()
28924 # .setValue(((float) alpha) / denominator)
28925 # .build());
28926 # }
28927 # return resultBuilder.build();
28928 # }
28929 # // ...
28930 #
28931 # Example (iOS / Obj-C):
28932 #
28933 # // ...
28934 # static UIColor* fromProto(Color* protocolor) {
28935 # float red = [protocolor red];
28936 # float green = [protocolor green];
28937 # float blue = [protocolor blue];
28938 # FloatValue* alpha_wrapper = [protocolor alpha];
28939 # float alpha = 1.0;
28940 # if (alpha_wrapper != nil) {
28941 # alpha = [alpha_wrapper value];
28942 # }
28943 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28944 # }
28945 #
28946 # static Color* toProto(UIColor* color) {
28947 # CGFloat red, green, blue, alpha;
28948 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28949 # return nil;
28950 # }
28951 # Color* result = [Color alloc] init];
28952 # [result setRed:red];
28953 # [result setGreen:green];
28954 # [result setBlue:blue];
28955 # if (alpha <= 0.9999) {
28956 # [result setAlpha:floatWrapperWithValue(alpha)];
28957 # }
28958 # [result autorelease];
28959 # return result;
28960 # }
28961 # // ...
28962 #
28963 # Example (JavaScript):
28964 #
28965 # // ...
28966 #
28967 # var protoToCssColor = function(rgb_color) {
28968 # var redFrac = rgb_color.red || 0.0;
28969 # var greenFrac = rgb_color.green || 0.0;
28970 # var blueFrac = rgb_color.blue || 0.0;
28971 # var red = Math.floor(redFrac * 255);
28972 # var green = Math.floor(greenFrac * 255);
28973 # var blue = Math.floor(blueFrac * 255);
28974 #
28975 # if (!('alpha' in rgb_color)) {
28976 # return rgbToCssColor_(red, green, blue);
28977 # }
28978 #
28979 # var alphaFrac = rgb_color.alpha.value || 0.0;
28980 # var rgbParams = [red, green, blue].join(',');
28981 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28982 # };
28983 #
28984 # var rgbToCssColor_ = function(red, green, blue) {
28985 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28986 # var hexString = rgbNumber.toString(16);
28987 # var missingZeros = 6 - hexString.length;
28988 # var resultBuilder = ['#'];
28989 # for (var i = 0; i < missingZeros; i++) {
28990 # resultBuilder.push('0');
28991 # }
28992 # resultBuilder.push(hexString);
28993 # return resultBuilder.join('');
28994 # };
28995 #
28996 # // ...
28997 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28998 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28999 # the final pixel color is defined by the equation:
29000 #
29001 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29002 #
29003 # This means that a value of 1.0 corresponds to a solid color, whereas
29004 # a value of 0.0 corresponds to a completely transparent color. This
29005 # uses a wrapper message rather than a simple float scalar so that it is
29006 # possible to distinguish between a default value and the value being unset.
29007 # If omitted, this color object is to be rendered as a solid color
29008 # (as if the alpha value had been explicitly given with a value of 1.0).
29009 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29010 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29011 },
29012 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
29013 "sheetId": 42, # The ID of the sheet. Must be non-negative.
29014 # This field cannot be changed once set.
29015 },
29016 },
29017 ],
29018 }</pre>
29019</div>
29020
29021<div class="method">
29022 <code class="details" id="get">get(spreadsheetId, ranges=None, x__xgafv=None, includeGridData=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029023 <pre>Returns the spreadsheet at the given ID.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029024The caller must specify the spreadsheet ID.
29025
29026By default, data within grids will not be returned.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029027You can include grid data one of two ways:
29028
29029* Specify a field mask listing your desired fields using the `fields` URL
29030parameter in HTTP
29031
29032* Set the includeGridData
29033URL parameter to true. If a field mask is set, the `includeGridData`
29034parameter is ignored
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029035
29036For large spreadsheets, it is recommended to retrieve only the specific
29037fields of the spreadsheet that you want.
29038
29039To retrieve only subsets of the spreadsheet, use the
29040ranges URL parameter.
29041Multiple ranges can be specified. Limiting the range will
29042return only the portions of the spreadsheet that intersect the requested
29043ranges. Ranges are specified using A1 notation.
29044
29045Args:
29046 spreadsheetId: string, The spreadsheet to request. (required)
29047 ranges: string, The ranges to retrieve from the spreadsheet. (repeated)
29048 x__xgafv: string, V1 error format.
29049 Allowed values
29050 1 - v1 error format
29051 2 - v2 error format
29052 includeGridData: boolean, True if grid data should be returned.
29053This parameter is ignored if a field mask was set in the request.
29054
29055Returns:
29056 An object of the form:
29057
29058 { # Resource that represents a spreadsheet.
29059 "spreadsheetId": "A String", # The ID of the spreadsheet.
29060 # This field is read-only.
29061 "namedRanges": [ # The named ranges defined in a spreadsheet.
29062 { # A named range.
29063 "namedRangeId": "A String", # The ID of the named range.
29064 "range": { # A range on a sheet. # The range this represents.
29065 # All indexes are zero-based.
29066 # Indexes are half open, e.g the start index is inclusive
29067 # and the end index is exclusive -- [start_index, end_index).
29068 # Missing indexes indicate the range is unbounded on that side.
29069 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029070 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029071 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029072 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029073 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029074 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029075 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029076 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029077 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029078 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029079 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029080 # `Sheet1!A:B == sheet_id: 0,
29081 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029082 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029083 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029084 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029085 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029086 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029087 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029088 #
29089 # The start index must always be less than or equal to the end index.
29090 # If the start index equals the end index, then the range is empty.
29091 # Empty ranges are typically not meaningful and are usually rendered in the
29092 # UI as `#REF!`.
29093 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
29094 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
29095 "sheetId": 42, # The sheet this range is on.
29096 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
29097 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
29098 },
29099 "name": "A String", # The name of the named range.
29100 },
29101 ],
29102 "properties": { # Properties of a spreadsheet. # Overall properties of a spreadsheet.
29103 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029104 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029105 # * an ISO 639-1 language code such as `en`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029106 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029107 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029108 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029109 # * a combination of the ISO language code and country code, such as `en_US`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029110 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029111 # Note: when updating this field, not all locales/languages are supported.
29112 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
29113 # `America/New_York`. If the time zone isn't recognized, this may
29114 # be a custom time zone such as `GMT-07:00`.
29115 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
29116 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029117 # CellData.effectiveFormat will not be set if the
29118 # cell's format is equal to this default format.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029119 # This field is read-only.
29120 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029121 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
29122 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029123 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029124 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029125 },
29126 "textDirection": "A String", # The direction of the text in the cell.
29127 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
29128 # When updating padding, every field must be specified.
29129 "top": 42, # The top padding of the cell.
29130 "right": 42, # The right padding of the cell.
29131 "bottom": 42, # The bottom padding of the cell.
29132 "left": 42, # The left padding of the cell.
29133 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029134 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029135 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
29136 # for simplicity of conversion to/from color representations in various
29137 # languages over compactness; for example, the fields of this representation
29138 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29139 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29140 # method in iOS; and, with just a little work, it can be easily formatted into
29141 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29142 #
29143 # Example (Java):
29144 #
29145 # import com.google.type.Color;
29146 #
29147 # // ...
29148 # public static java.awt.Color fromProto(Color protocolor) {
29149 # float alpha = protocolor.hasAlpha()
29150 # ? protocolor.getAlpha().getValue()
29151 # : 1.0;
29152 #
29153 # return new java.awt.Color(
29154 # protocolor.getRed(),
29155 # protocolor.getGreen(),
29156 # protocolor.getBlue(),
29157 # alpha);
29158 # }
29159 #
29160 # public static Color toProto(java.awt.Color color) {
29161 # float red = (float) color.getRed();
29162 # float green = (float) color.getGreen();
29163 # float blue = (float) color.getBlue();
29164 # float denominator = 255.0;
29165 # Color.Builder resultBuilder =
29166 # Color
29167 # .newBuilder()
29168 # .setRed(red / denominator)
29169 # .setGreen(green / denominator)
29170 # .setBlue(blue / denominator);
29171 # int alpha = color.getAlpha();
29172 # if (alpha != 255) {
29173 # result.setAlpha(
29174 # FloatValue
29175 # .newBuilder()
29176 # .setValue(((float) alpha) / denominator)
29177 # .build());
29178 # }
29179 # return resultBuilder.build();
29180 # }
29181 # // ...
29182 #
29183 # Example (iOS / Obj-C):
29184 #
29185 # // ...
29186 # static UIColor* fromProto(Color* protocolor) {
29187 # float red = [protocolor red];
29188 # float green = [protocolor green];
29189 # float blue = [protocolor blue];
29190 # FloatValue* alpha_wrapper = [protocolor alpha];
29191 # float alpha = 1.0;
29192 # if (alpha_wrapper != nil) {
29193 # alpha = [alpha_wrapper value];
29194 # }
29195 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29196 # }
29197 #
29198 # static Color* toProto(UIColor* color) {
29199 # CGFloat red, green, blue, alpha;
29200 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29201 # return nil;
29202 # }
29203 # Color* result = [Color alloc] init];
29204 # [result setRed:red];
29205 # [result setGreen:green];
29206 # [result setBlue:blue];
29207 # if (alpha <= 0.9999) {
29208 # [result setAlpha:floatWrapperWithValue(alpha)];
29209 # }
29210 # [result autorelease];
29211 # return result;
29212 # }
29213 # // ...
29214 #
29215 # Example (JavaScript):
29216 #
29217 # // ...
29218 #
29219 # var protoToCssColor = function(rgb_color) {
29220 # var redFrac = rgb_color.red || 0.0;
29221 # var greenFrac = rgb_color.green || 0.0;
29222 # var blueFrac = rgb_color.blue || 0.0;
29223 # var red = Math.floor(redFrac * 255);
29224 # var green = Math.floor(greenFrac * 255);
29225 # var blue = Math.floor(blueFrac * 255);
29226 #
29227 # if (!('alpha' in rgb_color)) {
29228 # return rgbToCssColor_(red, green, blue);
29229 # }
29230 #
29231 # var alphaFrac = rgb_color.alpha.value || 0.0;
29232 # var rgbParams = [red, green, blue].join(',');
29233 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29234 # };
29235 #
29236 # var rgbToCssColor_ = function(red, green, blue) {
29237 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29238 # var hexString = rgbNumber.toString(16);
29239 # var missingZeros = 6 - hexString.length;
29240 # var resultBuilder = ['#'];
29241 # for (var i = 0; i < missingZeros; i++) {
29242 # resultBuilder.push('0');
29243 # }
29244 # resultBuilder.push(hexString);
29245 # return resultBuilder.join('');
29246 # };
29247 #
29248 # // ...
29249 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29250 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29251 # the final pixel color is defined by the equation:
29252 #
29253 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29254 #
29255 # This means that a value of 1.0 corresponds to a solid color, whereas
29256 # a value of 0.0 corresponds to a completely transparent color. This
29257 # uses a wrapper message rather than a simple float scalar so that it is
29258 # possible to distinguish between a default value and the value being unset.
29259 # If omitted, this color object is to be rendered as a solid color
29260 # (as if the alpha value had been explicitly given with a value of 1.0).
29261 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29262 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29263 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029264 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029265 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
29266 # Absent values indicate that the field isn't specified.
29267 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
29268 # for simplicity of conversion to/from color representations in various
29269 # languages over compactness; for example, the fields of this representation
29270 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29271 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29272 # method in iOS; and, with just a little work, it can be easily formatted into
29273 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29274 #
29275 # Example (Java):
29276 #
29277 # import com.google.type.Color;
29278 #
29279 # // ...
29280 # public static java.awt.Color fromProto(Color protocolor) {
29281 # float alpha = protocolor.hasAlpha()
29282 # ? protocolor.getAlpha().getValue()
29283 # : 1.0;
29284 #
29285 # return new java.awt.Color(
29286 # protocolor.getRed(),
29287 # protocolor.getGreen(),
29288 # protocolor.getBlue(),
29289 # alpha);
29290 # }
29291 #
29292 # public static Color toProto(java.awt.Color color) {
29293 # float red = (float) color.getRed();
29294 # float green = (float) color.getGreen();
29295 # float blue = (float) color.getBlue();
29296 # float denominator = 255.0;
29297 # Color.Builder resultBuilder =
29298 # Color
29299 # .newBuilder()
29300 # .setRed(red / denominator)
29301 # .setGreen(green / denominator)
29302 # .setBlue(blue / denominator);
29303 # int alpha = color.getAlpha();
29304 # if (alpha != 255) {
29305 # result.setAlpha(
29306 # FloatValue
29307 # .newBuilder()
29308 # .setValue(((float) alpha) / denominator)
29309 # .build());
29310 # }
29311 # return resultBuilder.build();
29312 # }
29313 # // ...
29314 #
29315 # Example (iOS / Obj-C):
29316 #
29317 # // ...
29318 # static UIColor* fromProto(Color* protocolor) {
29319 # float red = [protocolor red];
29320 # float green = [protocolor green];
29321 # float blue = [protocolor blue];
29322 # FloatValue* alpha_wrapper = [protocolor alpha];
29323 # float alpha = 1.0;
29324 # if (alpha_wrapper != nil) {
29325 # alpha = [alpha_wrapper value];
29326 # }
29327 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29328 # }
29329 #
29330 # static Color* toProto(UIColor* color) {
29331 # CGFloat red, green, blue, alpha;
29332 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29333 # return nil;
29334 # }
29335 # Color* result = [Color alloc] init];
29336 # [result setRed:red];
29337 # [result setGreen:green];
29338 # [result setBlue:blue];
29339 # if (alpha <= 0.9999) {
29340 # [result setAlpha:floatWrapperWithValue(alpha)];
29341 # }
29342 # [result autorelease];
29343 # return result;
29344 # }
29345 # // ...
29346 #
29347 # Example (JavaScript):
29348 #
29349 # // ...
29350 #
29351 # var protoToCssColor = function(rgb_color) {
29352 # var redFrac = rgb_color.red || 0.0;
29353 # var greenFrac = rgb_color.green || 0.0;
29354 # var blueFrac = rgb_color.blue || 0.0;
29355 # var red = Math.floor(redFrac * 255);
29356 # var green = Math.floor(greenFrac * 255);
29357 # var blue = Math.floor(blueFrac * 255);
29358 #
29359 # if (!('alpha' in rgb_color)) {
29360 # return rgbToCssColor_(red, green, blue);
29361 # }
29362 #
29363 # var alphaFrac = rgb_color.alpha.value || 0.0;
29364 # var rgbParams = [red, green, blue].join(',');
29365 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29366 # };
29367 #
29368 # var rgbToCssColor_ = function(red, green, blue) {
29369 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29370 # var hexString = rgbNumber.toString(16);
29371 # var missingZeros = 6 - hexString.length;
29372 # var resultBuilder = ['#'];
29373 # for (var i = 0; i < missingZeros; i++) {
29374 # resultBuilder.push('0');
29375 # }
29376 # resultBuilder.push(hexString);
29377 # return resultBuilder.join('');
29378 # };
29379 #
29380 # // ...
29381 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29382 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29383 # the final pixel color is defined by the equation:
29384 #
29385 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29386 #
29387 # This means that a value of 1.0 corresponds to a solid color, whereas
29388 # a value of 0.0 corresponds to a completely transparent color. This
29389 # uses a wrapper message rather than a simple float scalar so that it is
29390 # possible to distinguish between a default value and the value being unset.
29391 # If omitted, this color object is to be rendered as a solid color
29392 # (as if the alpha value had been explicitly given with a value of 1.0).
29393 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29394 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29395 },
29396 "bold": True or False, # True if the text is bold.
29397 "strikethrough": True or False, # True if the text has a strikethrough.
29398 "fontFamily": "A String", # The font family.
29399 "fontSize": 42, # The size of the font.
29400 "italic": True or False, # True if the text is italicized.
29401 "underline": True or False, # True if the text is underlined.
29402 },
29403 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
29404 "borders": { # The borders of the cell. # The borders of the cell.
29405 "top": { # A border along a cell. # The top border of the cell.
29406 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29407 # for simplicity of conversion to/from color representations in various
29408 # languages over compactness; for example, the fields of this representation
29409 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29410 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29411 # method in iOS; and, with just a little work, it can be easily formatted into
29412 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29413 #
29414 # Example (Java):
29415 #
29416 # import com.google.type.Color;
29417 #
29418 # // ...
29419 # public static java.awt.Color fromProto(Color protocolor) {
29420 # float alpha = protocolor.hasAlpha()
29421 # ? protocolor.getAlpha().getValue()
29422 # : 1.0;
29423 #
29424 # return new java.awt.Color(
29425 # protocolor.getRed(),
29426 # protocolor.getGreen(),
29427 # protocolor.getBlue(),
29428 # alpha);
29429 # }
29430 #
29431 # public static Color toProto(java.awt.Color color) {
29432 # float red = (float) color.getRed();
29433 # float green = (float) color.getGreen();
29434 # float blue = (float) color.getBlue();
29435 # float denominator = 255.0;
29436 # Color.Builder resultBuilder =
29437 # Color
29438 # .newBuilder()
29439 # .setRed(red / denominator)
29440 # .setGreen(green / denominator)
29441 # .setBlue(blue / denominator);
29442 # int alpha = color.getAlpha();
29443 # if (alpha != 255) {
29444 # result.setAlpha(
29445 # FloatValue
29446 # .newBuilder()
29447 # .setValue(((float) alpha) / denominator)
29448 # .build());
29449 # }
29450 # return resultBuilder.build();
29451 # }
29452 # // ...
29453 #
29454 # Example (iOS / Obj-C):
29455 #
29456 # // ...
29457 # static UIColor* fromProto(Color* protocolor) {
29458 # float red = [protocolor red];
29459 # float green = [protocolor green];
29460 # float blue = [protocolor blue];
29461 # FloatValue* alpha_wrapper = [protocolor alpha];
29462 # float alpha = 1.0;
29463 # if (alpha_wrapper != nil) {
29464 # alpha = [alpha_wrapper value];
29465 # }
29466 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29467 # }
29468 #
29469 # static Color* toProto(UIColor* color) {
29470 # CGFloat red, green, blue, alpha;
29471 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29472 # return nil;
29473 # }
29474 # Color* result = [Color alloc] init];
29475 # [result setRed:red];
29476 # [result setGreen:green];
29477 # [result setBlue:blue];
29478 # if (alpha <= 0.9999) {
29479 # [result setAlpha:floatWrapperWithValue(alpha)];
29480 # }
29481 # [result autorelease];
29482 # return result;
29483 # }
29484 # // ...
29485 #
29486 # Example (JavaScript):
29487 #
29488 # // ...
29489 #
29490 # var protoToCssColor = function(rgb_color) {
29491 # var redFrac = rgb_color.red || 0.0;
29492 # var greenFrac = rgb_color.green || 0.0;
29493 # var blueFrac = rgb_color.blue || 0.0;
29494 # var red = Math.floor(redFrac * 255);
29495 # var green = Math.floor(greenFrac * 255);
29496 # var blue = Math.floor(blueFrac * 255);
29497 #
29498 # if (!('alpha' in rgb_color)) {
29499 # return rgbToCssColor_(red, green, blue);
29500 # }
29501 #
29502 # var alphaFrac = rgb_color.alpha.value || 0.0;
29503 # var rgbParams = [red, green, blue].join(',');
29504 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29505 # };
29506 #
29507 # var rgbToCssColor_ = function(red, green, blue) {
29508 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29509 # var hexString = rgbNumber.toString(16);
29510 # var missingZeros = 6 - hexString.length;
29511 # var resultBuilder = ['#'];
29512 # for (var i = 0; i < missingZeros; i++) {
29513 # resultBuilder.push('0');
29514 # }
29515 # resultBuilder.push(hexString);
29516 # return resultBuilder.join('');
29517 # };
29518 #
29519 # // ...
29520 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29521 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29522 # the final pixel color is defined by the equation:
29523 #
29524 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29525 #
29526 # This means that a value of 1.0 corresponds to a solid color, whereas
29527 # a value of 0.0 corresponds to a completely transparent color. This
29528 # uses a wrapper message rather than a simple float scalar so that it is
29529 # possible to distinguish between a default value and the value being unset.
29530 # If omitted, this color object is to be rendered as a solid color
29531 # (as if the alpha value had been explicitly given with a value of 1.0).
29532 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29533 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29534 },
29535 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029536 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029537 "style": "A String", # The style of the border.
29538 },
29539 "right": { # A border along a cell. # The right border of the cell.
29540 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29541 # for simplicity of conversion to/from color representations in various
29542 # languages over compactness; for example, the fields of this representation
29543 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29544 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29545 # method in iOS; and, with just a little work, it can be easily formatted into
29546 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29547 #
29548 # Example (Java):
29549 #
29550 # import com.google.type.Color;
29551 #
29552 # // ...
29553 # public static java.awt.Color fromProto(Color protocolor) {
29554 # float alpha = protocolor.hasAlpha()
29555 # ? protocolor.getAlpha().getValue()
29556 # : 1.0;
29557 #
29558 # return new java.awt.Color(
29559 # protocolor.getRed(),
29560 # protocolor.getGreen(),
29561 # protocolor.getBlue(),
29562 # alpha);
29563 # }
29564 #
29565 # public static Color toProto(java.awt.Color color) {
29566 # float red = (float) color.getRed();
29567 # float green = (float) color.getGreen();
29568 # float blue = (float) color.getBlue();
29569 # float denominator = 255.0;
29570 # Color.Builder resultBuilder =
29571 # Color
29572 # .newBuilder()
29573 # .setRed(red / denominator)
29574 # .setGreen(green / denominator)
29575 # .setBlue(blue / denominator);
29576 # int alpha = color.getAlpha();
29577 # if (alpha != 255) {
29578 # result.setAlpha(
29579 # FloatValue
29580 # .newBuilder()
29581 # .setValue(((float) alpha) / denominator)
29582 # .build());
29583 # }
29584 # return resultBuilder.build();
29585 # }
29586 # // ...
29587 #
29588 # Example (iOS / Obj-C):
29589 #
29590 # // ...
29591 # static UIColor* fromProto(Color* protocolor) {
29592 # float red = [protocolor red];
29593 # float green = [protocolor green];
29594 # float blue = [protocolor blue];
29595 # FloatValue* alpha_wrapper = [protocolor alpha];
29596 # float alpha = 1.0;
29597 # if (alpha_wrapper != nil) {
29598 # alpha = [alpha_wrapper value];
29599 # }
29600 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29601 # }
29602 #
29603 # static Color* toProto(UIColor* color) {
29604 # CGFloat red, green, blue, alpha;
29605 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29606 # return nil;
29607 # }
29608 # Color* result = [Color alloc] init];
29609 # [result setRed:red];
29610 # [result setGreen:green];
29611 # [result setBlue:blue];
29612 # if (alpha <= 0.9999) {
29613 # [result setAlpha:floatWrapperWithValue(alpha)];
29614 # }
29615 # [result autorelease];
29616 # return result;
29617 # }
29618 # // ...
29619 #
29620 # Example (JavaScript):
29621 #
29622 # // ...
29623 #
29624 # var protoToCssColor = function(rgb_color) {
29625 # var redFrac = rgb_color.red || 0.0;
29626 # var greenFrac = rgb_color.green || 0.0;
29627 # var blueFrac = rgb_color.blue || 0.0;
29628 # var red = Math.floor(redFrac * 255);
29629 # var green = Math.floor(greenFrac * 255);
29630 # var blue = Math.floor(blueFrac * 255);
29631 #
29632 # if (!('alpha' in rgb_color)) {
29633 # return rgbToCssColor_(red, green, blue);
29634 # }
29635 #
29636 # var alphaFrac = rgb_color.alpha.value || 0.0;
29637 # var rgbParams = [red, green, blue].join(',');
29638 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29639 # };
29640 #
29641 # var rgbToCssColor_ = function(red, green, blue) {
29642 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29643 # var hexString = rgbNumber.toString(16);
29644 # var missingZeros = 6 - hexString.length;
29645 # var resultBuilder = ['#'];
29646 # for (var i = 0; i < missingZeros; i++) {
29647 # resultBuilder.push('0');
29648 # }
29649 # resultBuilder.push(hexString);
29650 # return resultBuilder.join('');
29651 # };
29652 #
29653 # // ...
29654 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29655 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29656 # the final pixel color is defined by the equation:
29657 #
29658 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29659 #
29660 # This means that a value of 1.0 corresponds to a solid color, whereas
29661 # a value of 0.0 corresponds to a completely transparent color. This
29662 # uses a wrapper message rather than a simple float scalar so that it is
29663 # possible to distinguish between a default value and the value being unset.
29664 # If omitted, this color object is to be rendered as a solid color
29665 # (as if the alpha value had been explicitly given with a value of 1.0).
29666 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29667 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29668 },
29669 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029670 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029671 "style": "A String", # The style of the border.
29672 },
29673 "bottom": { # A border along a cell. # The bottom border of the cell.
29674 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29675 # for simplicity of conversion to/from color representations in various
29676 # languages over compactness; for example, the fields of this representation
29677 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29678 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29679 # method in iOS; and, with just a little work, it can be easily formatted into
29680 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29681 #
29682 # Example (Java):
29683 #
29684 # import com.google.type.Color;
29685 #
29686 # // ...
29687 # public static java.awt.Color fromProto(Color protocolor) {
29688 # float alpha = protocolor.hasAlpha()
29689 # ? protocolor.getAlpha().getValue()
29690 # : 1.0;
29691 #
29692 # return new java.awt.Color(
29693 # protocolor.getRed(),
29694 # protocolor.getGreen(),
29695 # protocolor.getBlue(),
29696 # alpha);
29697 # }
29698 #
29699 # public static Color toProto(java.awt.Color color) {
29700 # float red = (float) color.getRed();
29701 # float green = (float) color.getGreen();
29702 # float blue = (float) color.getBlue();
29703 # float denominator = 255.0;
29704 # Color.Builder resultBuilder =
29705 # Color
29706 # .newBuilder()
29707 # .setRed(red / denominator)
29708 # .setGreen(green / denominator)
29709 # .setBlue(blue / denominator);
29710 # int alpha = color.getAlpha();
29711 # if (alpha != 255) {
29712 # result.setAlpha(
29713 # FloatValue
29714 # .newBuilder()
29715 # .setValue(((float) alpha) / denominator)
29716 # .build());
29717 # }
29718 # return resultBuilder.build();
29719 # }
29720 # // ...
29721 #
29722 # Example (iOS / Obj-C):
29723 #
29724 # // ...
29725 # static UIColor* fromProto(Color* protocolor) {
29726 # float red = [protocolor red];
29727 # float green = [protocolor green];
29728 # float blue = [protocolor blue];
29729 # FloatValue* alpha_wrapper = [protocolor alpha];
29730 # float alpha = 1.0;
29731 # if (alpha_wrapper != nil) {
29732 # alpha = [alpha_wrapper value];
29733 # }
29734 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29735 # }
29736 #
29737 # static Color* toProto(UIColor* color) {
29738 # CGFloat red, green, blue, alpha;
29739 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29740 # return nil;
29741 # }
29742 # Color* result = [Color alloc] init];
29743 # [result setRed:red];
29744 # [result setGreen:green];
29745 # [result setBlue:blue];
29746 # if (alpha <= 0.9999) {
29747 # [result setAlpha:floatWrapperWithValue(alpha)];
29748 # }
29749 # [result autorelease];
29750 # return result;
29751 # }
29752 # // ...
29753 #
29754 # Example (JavaScript):
29755 #
29756 # // ...
29757 #
29758 # var protoToCssColor = function(rgb_color) {
29759 # var redFrac = rgb_color.red || 0.0;
29760 # var greenFrac = rgb_color.green || 0.0;
29761 # var blueFrac = rgb_color.blue || 0.0;
29762 # var red = Math.floor(redFrac * 255);
29763 # var green = Math.floor(greenFrac * 255);
29764 # var blue = Math.floor(blueFrac * 255);
29765 #
29766 # if (!('alpha' in rgb_color)) {
29767 # return rgbToCssColor_(red, green, blue);
29768 # }
29769 #
29770 # var alphaFrac = rgb_color.alpha.value || 0.0;
29771 # var rgbParams = [red, green, blue].join(',');
29772 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29773 # };
29774 #
29775 # var rgbToCssColor_ = function(red, green, blue) {
29776 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29777 # var hexString = rgbNumber.toString(16);
29778 # var missingZeros = 6 - hexString.length;
29779 # var resultBuilder = ['#'];
29780 # for (var i = 0; i < missingZeros; i++) {
29781 # resultBuilder.push('0');
29782 # }
29783 # resultBuilder.push(hexString);
29784 # return resultBuilder.join('');
29785 # };
29786 #
29787 # // ...
29788 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29789 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29790 # the final pixel color is defined by the equation:
29791 #
29792 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29793 #
29794 # This means that a value of 1.0 corresponds to a solid color, whereas
29795 # a value of 0.0 corresponds to a completely transparent color. This
29796 # uses a wrapper message rather than a simple float scalar so that it is
29797 # possible to distinguish between a default value and the value being unset.
29798 # If omitted, this color object is to be rendered as a solid color
29799 # (as if the alpha value had been explicitly given with a value of 1.0).
29800 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29801 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29802 },
29803 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029804 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029805 "style": "A String", # The style of the border.
29806 },
29807 "left": { # A border along a cell. # The left border of the cell.
29808 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29809 # for simplicity of conversion to/from color representations in various
29810 # languages over compactness; for example, the fields of this representation
29811 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29812 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29813 # method in iOS; and, with just a little work, it can be easily formatted into
29814 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29815 #
29816 # Example (Java):
29817 #
29818 # import com.google.type.Color;
29819 #
29820 # // ...
29821 # public static java.awt.Color fromProto(Color protocolor) {
29822 # float alpha = protocolor.hasAlpha()
29823 # ? protocolor.getAlpha().getValue()
29824 # : 1.0;
29825 #
29826 # return new java.awt.Color(
29827 # protocolor.getRed(),
29828 # protocolor.getGreen(),
29829 # protocolor.getBlue(),
29830 # alpha);
29831 # }
29832 #
29833 # public static Color toProto(java.awt.Color color) {
29834 # float red = (float) color.getRed();
29835 # float green = (float) color.getGreen();
29836 # float blue = (float) color.getBlue();
29837 # float denominator = 255.0;
29838 # Color.Builder resultBuilder =
29839 # Color
29840 # .newBuilder()
29841 # .setRed(red / denominator)
29842 # .setGreen(green / denominator)
29843 # .setBlue(blue / denominator);
29844 # int alpha = color.getAlpha();
29845 # if (alpha != 255) {
29846 # result.setAlpha(
29847 # FloatValue
29848 # .newBuilder()
29849 # .setValue(((float) alpha) / denominator)
29850 # .build());
29851 # }
29852 # return resultBuilder.build();
29853 # }
29854 # // ...
29855 #
29856 # Example (iOS / Obj-C):
29857 #
29858 # // ...
29859 # static UIColor* fromProto(Color* protocolor) {
29860 # float red = [protocolor red];
29861 # float green = [protocolor green];
29862 # float blue = [protocolor blue];
29863 # FloatValue* alpha_wrapper = [protocolor alpha];
29864 # float alpha = 1.0;
29865 # if (alpha_wrapper != nil) {
29866 # alpha = [alpha_wrapper value];
29867 # }
29868 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29869 # }
29870 #
29871 # static Color* toProto(UIColor* color) {
29872 # CGFloat red, green, blue, alpha;
29873 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29874 # return nil;
29875 # }
29876 # Color* result = [Color alloc] init];
29877 # [result setRed:red];
29878 # [result setGreen:green];
29879 # [result setBlue:blue];
29880 # if (alpha <= 0.9999) {
29881 # [result setAlpha:floatWrapperWithValue(alpha)];
29882 # }
29883 # [result autorelease];
29884 # return result;
29885 # }
29886 # // ...
29887 #
29888 # Example (JavaScript):
29889 #
29890 # // ...
29891 #
29892 # var protoToCssColor = function(rgb_color) {
29893 # var redFrac = rgb_color.red || 0.0;
29894 # var greenFrac = rgb_color.green || 0.0;
29895 # var blueFrac = rgb_color.blue || 0.0;
29896 # var red = Math.floor(redFrac * 255);
29897 # var green = Math.floor(greenFrac * 255);
29898 # var blue = Math.floor(blueFrac * 255);
29899 #
29900 # if (!('alpha' in rgb_color)) {
29901 # return rgbToCssColor_(red, green, blue);
29902 # }
29903 #
29904 # var alphaFrac = rgb_color.alpha.value || 0.0;
29905 # var rgbParams = [red, green, blue].join(',');
29906 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29907 # };
29908 #
29909 # var rgbToCssColor_ = function(red, green, blue) {
29910 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29911 # var hexString = rgbNumber.toString(16);
29912 # var missingZeros = 6 - hexString.length;
29913 # var resultBuilder = ['#'];
29914 # for (var i = 0; i < missingZeros; i++) {
29915 # resultBuilder.push('0');
29916 # }
29917 # resultBuilder.push(hexString);
29918 # return resultBuilder.join('');
29919 # };
29920 #
29921 # // ...
29922 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29923 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29924 # the final pixel color is defined by the equation:
29925 #
29926 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29927 #
29928 # This means that a value of 1.0 corresponds to a solid color, whereas
29929 # a value of 0.0 corresponds to a completely transparent color. This
29930 # uses a wrapper message rather than a simple float scalar so that it is
29931 # possible to distinguish between a default value and the value being unset.
29932 # If omitted, this color object is to be rendered as a solid color
29933 # (as if the alpha value had been explicitly given with a value of 1.0).
29934 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29935 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29936 },
29937 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029938 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029939 "style": "A String", # The style of the border.
29940 },
29941 },
29942 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
29943 },
29944 "title": "A String", # The title of the spreadsheet.
29945 },
29946 "sheets": [ # The sheets that are part of a spreadsheet.
29947 { # A sheet in a spreadsheet.
29948 "conditionalFormats": [ # The conditional format rules in this sheet.
29949 { # A rule describing a conditional format.
29950 "ranges": [ # The ranges that will be formatted if the condition is true.
29951 # All the ranges must be on the same grid.
29952 { # A range on a sheet.
29953 # All indexes are zero-based.
29954 # Indexes are half open, e.g the start index is inclusive
29955 # and the end index is exclusive -- [start_index, end_index).
29956 # Missing indexes indicate the range is unbounded on that side.
29957 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029958 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029959 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029960 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029961 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029962 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029963 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029964 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029965 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029966 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029967 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029968 # `Sheet1!A:B == sheet_id: 0,
29969 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029970 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029971 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029972 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029973 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029974 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029975 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029976 #
29977 # The start index must always be less than or equal to the end index.
29978 # If the start index equals the end index, then the range is empty.
29979 # Empty ranges are typically not meaningful and are usually rendered in the
29980 # UI as `#REF!`.
29981 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
29982 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
29983 "sheetId": 42, # The sheet this range is on.
29984 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
29985 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
29986 },
29987 ],
29988 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
29989 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
29990 # the format will be applied.
29991 # BooleanConditions are used by conditional formatting,
29992 # data validation, and the criteria in filters.
29993 "type": "A String", # The type of condition.
29994 "values": [ # The values of the condition. The number of supported values depends
29995 # on the condition type. Some support zero values,
29996 # others one or two values,
29997 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
29998 { # The value of the condition.
29999 "relativeDate": "A String", # A relative date (based on the current date).
30000 # Valid only if the type is
30001 # DATE_BEFORE,
30002 # DATE_AFTER,
30003 # DATE_ON_OR_BEFORE or
30004 # DATE_ON_OR_AFTER.
30005 #
30006 # Relative dates are not supported in data validation.
30007 # They are supported only in conditional formatting and
30008 # conditional filters.
30009 "userEnteredValue": "A String", # A value the condition is based on.
30010 # The value will be parsed as if the user typed into a cell.
30011 # Formulas are supported (and must begin with an `=`).
30012 },
30013 ],
30014 },
30015 "format": { # The format of a cell. # The format to apply.
30016 # Conditional formatting can only apply a subset of formatting:
30017 # bold, italic,
30018 # strikethrough,
30019 # foreground color &
30020 # background color.
30021 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030022 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
30023 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030024 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030025 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030026 },
30027 "textDirection": "A String", # The direction of the text in the cell.
30028 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
30029 # When updating padding, every field must be specified.
30030 "top": 42, # The top padding of the cell.
30031 "right": 42, # The right padding of the cell.
30032 "bottom": 42, # The bottom padding of the cell.
30033 "left": 42, # The left padding of the cell.
30034 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030035 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030036 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
30037 # for simplicity of conversion to/from color representations in various
30038 # languages over compactness; for example, the fields of this representation
30039 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30040 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30041 # method in iOS; and, with just a little work, it can be easily formatted into
30042 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30043 #
30044 # Example (Java):
30045 #
30046 # import com.google.type.Color;
30047 #
30048 # // ...
30049 # public static java.awt.Color fromProto(Color protocolor) {
30050 # float alpha = protocolor.hasAlpha()
30051 # ? protocolor.getAlpha().getValue()
30052 # : 1.0;
30053 #
30054 # return new java.awt.Color(
30055 # protocolor.getRed(),
30056 # protocolor.getGreen(),
30057 # protocolor.getBlue(),
30058 # alpha);
30059 # }
30060 #
30061 # public static Color toProto(java.awt.Color color) {
30062 # float red = (float) color.getRed();
30063 # float green = (float) color.getGreen();
30064 # float blue = (float) color.getBlue();
30065 # float denominator = 255.0;
30066 # Color.Builder resultBuilder =
30067 # Color
30068 # .newBuilder()
30069 # .setRed(red / denominator)
30070 # .setGreen(green / denominator)
30071 # .setBlue(blue / denominator);
30072 # int alpha = color.getAlpha();
30073 # if (alpha != 255) {
30074 # result.setAlpha(
30075 # FloatValue
30076 # .newBuilder()
30077 # .setValue(((float) alpha) / denominator)
30078 # .build());
30079 # }
30080 # return resultBuilder.build();
30081 # }
30082 # // ...
30083 #
30084 # Example (iOS / Obj-C):
30085 #
30086 # // ...
30087 # static UIColor* fromProto(Color* protocolor) {
30088 # float red = [protocolor red];
30089 # float green = [protocolor green];
30090 # float blue = [protocolor blue];
30091 # FloatValue* alpha_wrapper = [protocolor alpha];
30092 # float alpha = 1.0;
30093 # if (alpha_wrapper != nil) {
30094 # alpha = [alpha_wrapper value];
30095 # }
30096 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30097 # }
30098 #
30099 # static Color* toProto(UIColor* color) {
30100 # CGFloat red, green, blue, alpha;
30101 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30102 # return nil;
30103 # }
30104 # Color* result = [Color alloc] init];
30105 # [result setRed:red];
30106 # [result setGreen:green];
30107 # [result setBlue:blue];
30108 # if (alpha <= 0.9999) {
30109 # [result setAlpha:floatWrapperWithValue(alpha)];
30110 # }
30111 # [result autorelease];
30112 # return result;
30113 # }
30114 # // ...
30115 #
30116 # Example (JavaScript):
30117 #
30118 # // ...
30119 #
30120 # var protoToCssColor = function(rgb_color) {
30121 # var redFrac = rgb_color.red || 0.0;
30122 # var greenFrac = rgb_color.green || 0.0;
30123 # var blueFrac = rgb_color.blue || 0.0;
30124 # var red = Math.floor(redFrac * 255);
30125 # var green = Math.floor(greenFrac * 255);
30126 # var blue = Math.floor(blueFrac * 255);
30127 #
30128 # if (!('alpha' in rgb_color)) {
30129 # return rgbToCssColor_(red, green, blue);
30130 # }
30131 #
30132 # var alphaFrac = rgb_color.alpha.value || 0.0;
30133 # var rgbParams = [red, green, blue].join(',');
30134 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30135 # };
30136 #
30137 # var rgbToCssColor_ = function(red, green, blue) {
30138 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30139 # var hexString = rgbNumber.toString(16);
30140 # var missingZeros = 6 - hexString.length;
30141 # var resultBuilder = ['#'];
30142 # for (var i = 0; i < missingZeros; i++) {
30143 # resultBuilder.push('0');
30144 # }
30145 # resultBuilder.push(hexString);
30146 # return resultBuilder.join('');
30147 # };
30148 #
30149 # // ...
30150 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30151 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30152 # the final pixel color is defined by the equation:
30153 #
30154 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30155 #
30156 # This means that a value of 1.0 corresponds to a solid color, whereas
30157 # a value of 0.0 corresponds to a completely transparent color. This
30158 # uses a wrapper message rather than a simple float scalar so that it is
30159 # possible to distinguish between a default value and the value being unset.
30160 # If omitted, this color object is to be rendered as a solid color
30161 # (as if the alpha value had been explicitly given with a value of 1.0).
30162 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30163 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30164 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030165 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030166 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
30167 # Absent values indicate that the field isn't specified.
30168 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
30169 # for simplicity of conversion to/from color representations in various
30170 # languages over compactness; for example, the fields of this representation
30171 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30172 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30173 # method in iOS; and, with just a little work, it can be easily formatted into
30174 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30175 #
30176 # Example (Java):
30177 #
30178 # import com.google.type.Color;
30179 #
30180 # // ...
30181 # public static java.awt.Color fromProto(Color protocolor) {
30182 # float alpha = protocolor.hasAlpha()
30183 # ? protocolor.getAlpha().getValue()
30184 # : 1.0;
30185 #
30186 # return new java.awt.Color(
30187 # protocolor.getRed(),
30188 # protocolor.getGreen(),
30189 # protocolor.getBlue(),
30190 # alpha);
30191 # }
30192 #
30193 # public static Color toProto(java.awt.Color color) {
30194 # float red = (float) color.getRed();
30195 # float green = (float) color.getGreen();
30196 # float blue = (float) color.getBlue();
30197 # float denominator = 255.0;
30198 # Color.Builder resultBuilder =
30199 # Color
30200 # .newBuilder()
30201 # .setRed(red / denominator)
30202 # .setGreen(green / denominator)
30203 # .setBlue(blue / denominator);
30204 # int alpha = color.getAlpha();
30205 # if (alpha != 255) {
30206 # result.setAlpha(
30207 # FloatValue
30208 # .newBuilder()
30209 # .setValue(((float) alpha) / denominator)
30210 # .build());
30211 # }
30212 # return resultBuilder.build();
30213 # }
30214 # // ...
30215 #
30216 # Example (iOS / Obj-C):
30217 #
30218 # // ...
30219 # static UIColor* fromProto(Color* protocolor) {
30220 # float red = [protocolor red];
30221 # float green = [protocolor green];
30222 # float blue = [protocolor blue];
30223 # FloatValue* alpha_wrapper = [protocolor alpha];
30224 # float alpha = 1.0;
30225 # if (alpha_wrapper != nil) {
30226 # alpha = [alpha_wrapper value];
30227 # }
30228 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30229 # }
30230 #
30231 # static Color* toProto(UIColor* color) {
30232 # CGFloat red, green, blue, alpha;
30233 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30234 # return nil;
30235 # }
30236 # Color* result = [Color alloc] init];
30237 # [result setRed:red];
30238 # [result setGreen:green];
30239 # [result setBlue:blue];
30240 # if (alpha <= 0.9999) {
30241 # [result setAlpha:floatWrapperWithValue(alpha)];
30242 # }
30243 # [result autorelease];
30244 # return result;
30245 # }
30246 # // ...
30247 #
30248 # Example (JavaScript):
30249 #
30250 # // ...
30251 #
30252 # var protoToCssColor = function(rgb_color) {
30253 # var redFrac = rgb_color.red || 0.0;
30254 # var greenFrac = rgb_color.green || 0.0;
30255 # var blueFrac = rgb_color.blue || 0.0;
30256 # var red = Math.floor(redFrac * 255);
30257 # var green = Math.floor(greenFrac * 255);
30258 # var blue = Math.floor(blueFrac * 255);
30259 #
30260 # if (!('alpha' in rgb_color)) {
30261 # return rgbToCssColor_(red, green, blue);
30262 # }
30263 #
30264 # var alphaFrac = rgb_color.alpha.value || 0.0;
30265 # var rgbParams = [red, green, blue].join(',');
30266 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30267 # };
30268 #
30269 # var rgbToCssColor_ = function(red, green, blue) {
30270 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30271 # var hexString = rgbNumber.toString(16);
30272 # var missingZeros = 6 - hexString.length;
30273 # var resultBuilder = ['#'];
30274 # for (var i = 0; i < missingZeros; i++) {
30275 # resultBuilder.push('0');
30276 # }
30277 # resultBuilder.push(hexString);
30278 # return resultBuilder.join('');
30279 # };
30280 #
30281 # // ...
30282 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30283 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30284 # the final pixel color is defined by the equation:
30285 #
30286 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30287 #
30288 # This means that a value of 1.0 corresponds to a solid color, whereas
30289 # a value of 0.0 corresponds to a completely transparent color. This
30290 # uses a wrapper message rather than a simple float scalar so that it is
30291 # possible to distinguish between a default value and the value being unset.
30292 # If omitted, this color object is to be rendered as a solid color
30293 # (as if the alpha value had been explicitly given with a value of 1.0).
30294 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30295 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30296 },
30297 "bold": True or False, # True if the text is bold.
30298 "strikethrough": True or False, # True if the text has a strikethrough.
30299 "fontFamily": "A String", # The font family.
30300 "fontSize": 42, # The size of the font.
30301 "italic": True or False, # True if the text is italicized.
30302 "underline": True or False, # True if the text is underlined.
30303 },
30304 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
30305 "borders": { # The borders of the cell. # The borders of the cell.
30306 "top": { # A border along a cell. # The top border of the cell.
30307 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
30308 # for simplicity of conversion to/from color representations in various
30309 # languages over compactness; for example, the fields of this representation
30310 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30311 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30312 # method in iOS; and, with just a little work, it can be easily formatted into
30313 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30314 #
30315 # Example (Java):
30316 #
30317 # import com.google.type.Color;
30318 #
30319 # // ...
30320 # public static java.awt.Color fromProto(Color protocolor) {
30321 # float alpha = protocolor.hasAlpha()
30322 # ? protocolor.getAlpha().getValue()
30323 # : 1.0;
30324 #
30325 # return new java.awt.Color(
30326 # protocolor.getRed(),
30327 # protocolor.getGreen(),
30328 # protocolor.getBlue(),
30329 # alpha);
30330 # }
30331 #
30332 # public static Color toProto(java.awt.Color color) {
30333 # float red = (float) color.getRed();
30334 # float green = (float) color.getGreen();
30335 # float blue = (float) color.getBlue();
30336 # float denominator = 255.0;
30337 # Color.Builder resultBuilder =
30338 # Color
30339 # .newBuilder()
30340 # .setRed(red / denominator)
30341 # .setGreen(green / denominator)
30342 # .setBlue(blue / denominator);
30343 # int alpha = color.getAlpha();
30344 # if (alpha != 255) {
30345 # result.setAlpha(
30346 # FloatValue
30347 # .newBuilder()
30348 # .setValue(((float) alpha) / denominator)
30349 # .build());
30350 # }
30351 # return resultBuilder.build();
30352 # }
30353 # // ...
30354 #
30355 # Example (iOS / Obj-C):
30356 #
30357 # // ...
30358 # static UIColor* fromProto(Color* protocolor) {
30359 # float red = [protocolor red];
30360 # float green = [protocolor green];
30361 # float blue = [protocolor blue];
30362 # FloatValue* alpha_wrapper = [protocolor alpha];
30363 # float alpha = 1.0;
30364 # if (alpha_wrapper != nil) {
30365 # alpha = [alpha_wrapper value];
30366 # }
30367 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30368 # }
30369 #
30370 # static Color* toProto(UIColor* color) {
30371 # CGFloat red, green, blue, alpha;
30372 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30373 # return nil;
30374 # }
30375 # Color* result = [Color alloc] init];
30376 # [result setRed:red];
30377 # [result setGreen:green];
30378 # [result setBlue:blue];
30379 # if (alpha <= 0.9999) {
30380 # [result setAlpha:floatWrapperWithValue(alpha)];
30381 # }
30382 # [result autorelease];
30383 # return result;
30384 # }
30385 # // ...
30386 #
30387 # Example (JavaScript):
30388 #
30389 # // ...
30390 #
30391 # var protoToCssColor = function(rgb_color) {
30392 # var redFrac = rgb_color.red || 0.0;
30393 # var greenFrac = rgb_color.green || 0.0;
30394 # var blueFrac = rgb_color.blue || 0.0;
30395 # var red = Math.floor(redFrac * 255);
30396 # var green = Math.floor(greenFrac * 255);
30397 # var blue = Math.floor(blueFrac * 255);
30398 #
30399 # if (!('alpha' in rgb_color)) {
30400 # return rgbToCssColor_(red, green, blue);
30401 # }
30402 #
30403 # var alphaFrac = rgb_color.alpha.value || 0.0;
30404 # var rgbParams = [red, green, blue].join(',');
30405 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30406 # };
30407 #
30408 # var rgbToCssColor_ = function(red, green, blue) {
30409 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30410 # var hexString = rgbNumber.toString(16);
30411 # var missingZeros = 6 - hexString.length;
30412 # var resultBuilder = ['#'];
30413 # for (var i = 0; i < missingZeros; i++) {
30414 # resultBuilder.push('0');
30415 # }
30416 # resultBuilder.push(hexString);
30417 # return resultBuilder.join('');
30418 # };
30419 #
30420 # // ...
30421 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30422 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30423 # the final pixel color is defined by the equation:
30424 #
30425 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30426 #
30427 # This means that a value of 1.0 corresponds to a solid color, whereas
30428 # a value of 0.0 corresponds to a completely transparent color. This
30429 # uses a wrapper message rather than a simple float scalar so that it is
30430 # possible to distinguish between a default value and the value being unset.
30431 # If omitted, this color object is to be rendered as a solid color
30432 # (as if the alpha value had been explicitly given with a value of 1.0).
30433 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30434 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30435 },
30436 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030437 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030438 "style": "A String", # The style of the border.
30439 },
30440 "right": { # A border along a cell. # The right border of the cell.
30441 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
30442 # for simplicity of conversion to/from color representations in various
30443 # languages over compactness; for example, the fields of this representation
30444 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30445 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30446 # method in iOS; and, with just a little work, it can be easily formatted into
30447 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30448 #
30449 # Example (Java):
30450 #
30451 # import com.google.type.Color;
30452 #
30453 # // ...
30454 # public static java.awt.Color fromProto(Color protocolor) {
30455 # float alpha = protocolor.hasAlpha()
30456 # ? protocolor.getAlpha().getValue()
30457 # : 1.0;
30458 #
30459 # return new java.awt.Color(
30460 # protocolor.getRed(),
30461 # protocolor.getGreen(),
30462 # protocolor.getBlue(),
30463 # alpha);
30464 # }
30465 #
30466 # public static Color toProto(java.awt.Color color) {
30467 # float red = (float) color.getRed();
30468 # float green = (float) color.getGreen();
30469 # float blue = (float) color.getBlue();
30470 # float denominator = 255.0;
30471 # Color.Builder resultBuilder =
30472 # Color
30473 # .newBuilder()
30474 # .setRed(red / denominator)
30475 # .setGreen(green / denominator)
30476 # .setBlue(blue / denominator);
30477 # int alpha = color.getAlpha();
30478 # if (alpha != 255) {
30479 # result.setAlpha(
30480 # FloatValue
30481 # .newBuilder()
30482 # .setValue(((float) alpha) / denominator)
30483 # .build());
30484 # }
30485 # return resultBuilder.build();
30486 # }
30487 # // ...
30488 #
30489 # Example (iOS / Obj-C):
30490 #
30491 # // ...
30492 # static UIColor* fromProto(Color* protocolor) {
30493 # float red = [protocolor red];
30494 # float green = [protocolor green];
30495 # float blue = [protocolor blue];
30496 # FloatValue* alpha_wrapper = [protocolor alpha];
30497 # float alpha = 1.0;
30498 # if (alpha_wrapper != nil) {
30499 # alpha = [alpha_wrapper value];
30500 # }
30501 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30502 # }
30503 #
30504 # static Color* toProto(UIColor* color) {
30505 # CGFloat red, green, blue, alpha;
30506 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30507 # return nil;
30508 # }
30509 # Color* result = [Color alloc] init];
30510 # [result setRed:red];
30511 # [result setGreen:green];
30512 # [result setBlue:blue];
30513 # if (alpha <= 0.9999) {
30514 # [result setAlpha:floatWrapperWithValue(alpha)];
30515 # }
30516 # [result autorelease];
30517 # return result;
30518 # }
30519 # // ...
30520 #
30521 # Example (JavaScript):
30522 #
30523 # // ...
30524 #
30525 # var protoToCssColor = function(rgb_color) {
30526 # var redFrac = rgb_color.red || 0.0;
30527 # var greenFrac = rgb_color.green || 0.0;
30528 # var blueFrac = rgb_color.blue || 0.0;
30529 # var red = Math.floor(redFrac * 255);
30530 # var green = Math.floor(greenFrac * 255);
30531 # var blue = Math.floor(blueFrac * 255);
30532 #
30533 # if (!('alpha' in rgb_color)) {
30534 # return rgbToCssColor_(red, green, blue);
30535 # }
30536 #
30537 # var alphaFrac = rgb_color.alpha.value || 0.0;
30538 # var rgbParams = [red, green, blue].join(',');
30539 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30540 # };
30541 #
30542 # var rgbToCssColor_ = function(red, green, blue) {
30543 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30544 # var hexString = rgbNumber.toString(16);
30545 # var missingZeros = 6 - hexString.length;
30546 # var resultBuilder = ['#'];
30547 # for (var i = 0; i < missingZeros; i++) {
30548 # resultBuilder.push('0');
30549 # }
30550 # resultBuilder.push(hexString);
30551 # return resultBuilder.join('');
30552 # };
30553 #
30554 # // ...
30555 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30556 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30557 # the final pixel color is defined by the equation:
30558 #
30559 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30560 #
30561 # This means that a value of 1.0 corresponds to a solid color, whereas
30562 # a value of 0.0 corresponds to a completely transparent color. This
30563 # uses a wrapper message rather than a simple float scalar so that it is
30564 # possible to distinguish between a default value and the value being unset.
30565 # If omitted, this color object is to be rendered as a solid color
30566 # (as if the alpha value had been explicitly given with a value of 1.0).
30567 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30568 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30569 },
30570 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030571 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030572 "style": "A String", # The style of the border.
30573 },
30574 "bottom": { # A border along a cell. # The bottom border of the cell.
30575 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
30576 # for simplicity of conversion to/from color representations in various
30577 # languages over compactness; for example, the fields of this representation
30578 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30579 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30580 # method in iOS; and, with just a little work, it can be easily formatted into
30581 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30582 #
30583 # Example (Java):
30584 #
30585 # import com.google.type.Color;
30586 #
30587 # // ...
30588 # public static java.awt.Color fromProto(Color protocolor) {
30589 # float alpha = protocolor.hasAlpha()
30590 # ? protocolor.getAlpha().getValue()
30591 # : 1.0;
30592 #
30593 # return new java.awt.Color(
30594 # protocolor.getRed(),
30595 # protocolor.getGreen(),
30596 # protocolor.getBlue(),
30597 # alpha);
30598 # }
30599 #
30600 # public static Color toProto(java.awt.Color color) {
30601 # float red = (float) color.getRed();
30602 # float green = (float) color.getGreen();
30603 # float blue = (float) color.getBlue();
30604 # float denominator = 255.0;
30605 # Color.Builder resultBuilder =
30606 # Color
30607 # .newBuilder()
30608 # .setRed(red / denominator)
30609 # .setGreen(green / denominator)
30610 # .setBlue(blue / denominator);
30611 # int alpha = color.getAlpha();
30612 # if (alpha != 255) {
30613 # result.setAlpha(
30614 # FloatValue
30615 # .newBuilder()
30616 # .setValue(((float) alpha) / denominator)
30617 # .build());
30618 # }
30619 # return resultBuilder.build();
30620 # }
30621 # // ...
30622 #
30623 # Example (iOS / Obj-C):
30624 #
30625 # // ...
30626 # static UIColor* fromProto(Color* protocolor) {
30627 # float red = [protocolor red];
30628 # float green = [protocolor green];
30629 # float blue = [protocolor blue];
30630 # FloatValue* alpha_wrapper = [protocolor alpha];
30631 # float alpha = 1.0;
30632 # if (alpha_wrapper != nil) {
30633 # alpha = [alpha_wrapper value];
30634 # }
30635 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30636 # }
30637 #
30638 # static Color* toProto(UIColor* color) {
30639 # CGFloat red, green, blue, alpha;
30640 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30641 # return nil;
30642 # }
30643 # Color* result = [Color alloc] init];
30644 # [result setRed:red];
30645 # [result setGreen:green];
30646 # [result setBlue:blue];
30647 # if (alpha <= 0.9999) {
30648 # [result setAlpha:floatWrapperWithValue(alpha)];
30649 # }
30650 # [result autorelease];
30651 # return result;
30652 # }
30653 # // ...
30654 #
30655 # Example (JavaScript):
30656 #
30657 # // ...
30658 #
30659 # var protoToCssColor = function(rgb_color) {
30660 # var redFrac = rgb_color.red || 0.0;
30661 # var greenFrac = rgb_color.green || 0.0;
30662 # var blueFrac = rgb_color.blue || 0.0;
30663 # var red = Math.floor(redFrac * 255);
30664 # var green = Math.floor(greenFrac * 255);
30665 # var blue = Math.floor(blueFrac * 255);
30666 #
30667 # if (!('alpha' in rgb_color)) {
30668 # return rgbToCssColor_(red, green, blue);
30669 # }
30670 #
30671 # var alphaFrac = rgb_color.alpha.value || 0.0;
30672 # var rgbParams = [red, green, blue].join(',');
30673 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30674 # };
30675 #
30676 # var rgbToCssColor_ = function(red, green, blue) {
30677 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30678 # var hexString = rgbNumber.toString(16);
30679 # var missingZeros = 6 - hexString.length;
30680 # var resultBuilder = ['#'];
30681 # for (var i = 0; i < missingZeros; i++) {
30682 # resultBuilder.push('0');
30683 # }
30684 # resultBuilder.push(hexString);
30685 # return resultBuilder.join('');
30686 # };
30687 #
30688 # // ...
30689 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30690 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30691 # the final pixel color is defined by the equation:
30692 #
30693 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30694 #
30695 # This means that a value of 1.0 corresponds to a solid color, whereas
30696 # a value of 0.0 corresponds to a completely transparent color. This
30697 # uses a wrapper message rather than a simple float scalar so that it is
30698 # possible to distinguish between a default value and the value being unset.
30699 # If omitted, this color object is to be rendered as a solid color
30700 # (as if the alpha value had been explicitly given with a value of 1.0).
30701 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30702 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30703 },
30704 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030705 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030706 "style": "A String", # The style of the border.
30707 },
30708 "left": { # A border along a cell. # The left border of the cell.
30709 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
30710 # for simplicity of conversion to/from color representations in various
30711 # languages over compactness; for example, the fields of this representation
30712 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30713 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30714 # method in iOS; and, with just a little work, it can be easily formatted into
30715 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30716 #
30717 # Example (Java):
30718 #
30719 # import com.google.type.Color;
30720 #
30721 # // ...
30722 # public static java.awt.Color fromProto(Color protocolor) {
30723 # float alpha = protocolor.hasAlpha()
30724 # ? protocolor.getAlpha().getValue()
30725 # : 1.0;
30726 #
30727 # return new java.awt.Color(
30728 # protocolor.getRed(),
30729 # protocolor.getGreen(),
30730 # protocolor.getBlue(),
30731 # alpha);
30732 # }
30733 #
30734 # public static Color toProto(java.awt.Color color) {
30735 # float red = (float) color.getRed();
30736 # float green = (float) color.getGreen();
30737 # float blue = (float) color.getBlue();
30738 # float denominator = 255.0;
30739 # Color.Builder resultBuilder =
30740 # Color
30741 # .newBuilder()
30742 # .setRed(red / denominator)
30743 # .setGreen(green / denominator)
30744 # .setBlue(blue / denominator);
30745 # int alpha = color.getAlpha();
30746 # if (alpha != 255) {
30747 # result.setAlpha(
30748 # FloatValue
30749 # .newBuilder()
30750 # .setValue(((float) alpha) / denominator)
30751 # .build());
30752 # }
30753 # return resultBuilder.build();
30754 # }
30755 # // ...
30756 #
30757 # Example (iOS / Obj-C):
30758 #
30759 # // ...
30760 # static UIColor* fromProto(Color* protocolor) {
30761 # float red = [protocolor red];
30762 # float green = [protocolor green];
30763 # float blue = [protocolor blue];
30764 # FloatValue* alpha_wrapper = [protocolor alpha];
30765 # float alpha = 1.0;
30766 # if (alpha_wrapper != nil) {
30767 # alpha = [alpha_wrapper value];
30768 # }
30769 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30770 # }
30771 #
30772 # static Color* toProto(UIColor* color) {
30773 # CGFloat red, green, blue, alpha;
30774 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30775 # return nil;
30776 # }
30777 # Color* result = [Color alloc] init];
30778 # [result setRed:red];
30779 # [result setGreen:green];
30780 # [result setBlue:blue];
30781 # if (alpha <= 0.9999) {
30782 # [result setAlpha:floatWrapperWithValue(alpha)];
30783 # }
30784 # [result autorelease];
30785 # return result;
30786 # }
30787 # // ...
30788 #
30789 # Example (JavaScript):
30790 #
30791 # // ...
30792 #
30793 # var protoToCssColor = function(rgb_color) {
30794 # var redFrac = rgb_color.red || 0.0;
30795 # var greenFrac = rgb_color.green || 0.0;
30796 # var blueFrac = rgb_color.blue || 0.0;
30797 # var red = Math.floor(redFrac * 255);
30798 # var green = Math.floor(greenFrac * 255);
30799 # var blue = Math.floor(blueFrac * 255);
30800 #
30801 # if (!('alpha' in rgb_color)) {
30802 # return rgbToCssColor_(red, green, blue);
30803 # }
30804 #
30805 # var alphaFrac = rgb_color.alpha.value || 0.0;
30806 # var rgbParams = [red, green, blue].join(',');
30807 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30808 # };
30809 #
30810 # var rgbToCssColor_ = function(red, green, blue) {
30811 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30812 # var hexString = rgbNumber.toString(16);
30813 # var missingZeros = 6 - hexString.length;
30814 # var resultBuilder = ['#'];
30815 # for (var i = 0; i < missingZeros; i++) {
30816 # resultBuilder.push('0');
30817 # }
30818 # resultBuilder.push(hexString);
30819 # return resultBuilder.join('');
30820 # };
30821 #
30822 # // ...
30823 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30824 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30825 # the final pixel color is defined by the equation:
30826 #
30827 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30828 #
30829 # This means that a value of 1.0 corresponds to a solid color, whereas
30830 # a value of 0.0 corresponds to a completely transparent color. This
30831 # uses a wrapper message rather than a simple float scalar so that it is
30832 # possible to distinguish between a default value and the value being unset.
30833 # If omitted, this color object is to be rendered as a solid color
30834 # (as if the alpha value had been explicitly given with a value of 1.0).
30835 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30836 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30837 },
30838 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030839 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030840 "style": "A String", # The style of the border.
30841 },
30842 },
30843 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
30844 },
30845 },
30846 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
30847 # the interpolation points listed. The format of a cell will vary
30848 # based on its contents as compared to the values of the interpolation
30849 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030850 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030851 # These pin the gradient color scale according to the color,
30852 # type and value chosen.
30853 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
30854 # for simplicity of conversion to/from color representations in various
30855 # languages over compactness; for example, the fields of this representation
30856 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30857 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30858 # method in iOS; and, with just a little work, it can be easily formatted into
30859 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30860 #
30861 # Example (Java):
30862 #
30863 # import com.google.type.Color;
30864 #
30865 # // ...
30866 # public static java.awt.Color fromProto(Color protocolor) {
30867 # float alpha = protocolor.hasAlpha()
30868 # ? protocolor.getAlpha().getValue()
30869 # : 1.0;
30870 #
30871 # return new java.awt.Color(
30872 # protocolor.getRed(),
30873 # protocolor.getGreen(),
30874 # protocolor.getBlue(),
30875 # alpha);
30876 # }
30877 #
30878 # public static Color toProto(java.awt.Color color) {
30879 # float red = (float) color.getRed();
30880 # float green = (float) color.getGreen();
30881 # float blue = (float) color.getBlue();
30882 # float denominator = 255.0;
30883 # Color.Builder resultBuilder =
30884 # Color
30885 # .newBuilder()
30886 # .setRed(red / denominator)
30887 # .setGreen(green / denominator)
30888 # .setBlue(blue / denominator);
30889 # int alpha = color.getAlpha();
30890 # if (alpha != 255) {
30891 # result.setAlpha(
30892 # FloatValue
30893 # .newBuilder()
30894 # .setValue(((float) alpha) / denominator)
30895 # .build());
30896 # }
30897 # return resultBuilder.build();
30898 # }
30899 # // ...
30900 #
30901 # Example (iOS / Obj-C):
30902 #
30903 # // ...
30904 # static UIColor* fromProto(Color* protocolor) {
30905 # float red = [protocolor red];
30906 # float green = [protocolor green];
30907 # float blue = [protocolor blue];
30908 # FloatValue* alpha_wrapper = [protocolor alpha];
30909 # float alpha = 1.0;
30910 # if (alpha_wrapper != nil) {
30911 # alpha = [alpha_wrapper value];
30912 # }
30913 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30914 # }
30915 #
30916 # static Color* toProto(UIColor* color) {
30917 # CGFloat red, green, blue, alpha;
30918 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30919 # return nil;
30920 # }
30921 # Color* result = [Color alloc] init];
30922 # [result setRed:red];
30923 # [result setGreen:green];
30924 # [result setBlue:blue];
30925 # if (alpha <= 0.9999) {
30926 # [result setAlpha:floatWrapperWithValue(alpha)];
30927 # }
30928 # [result autorelease];
30929 # return result;
30930 # }
30931 # // ...
30932 #
30933 # Example (JavaScript):
30934 #
30935 # // ...
30936 #
30937 # var protoToCssColor = function(rgb_color) {
30938 # var redFrac = rgb_color.red || 0.0;
30939 # var greenFrac = rgb_color.green || 0.0;
30940 # var blueFrac = rgb_color.blue || 0.0;
30941 # var red = Math.floor(redFrac * 255);
30942 # var green = Math.floor(greenFrac * 255);
30943 # var blue = Math.floor(blueFrac * 255);
30944 #
30945 # if (!('alpha' in rgb_color)) {
30946 # return rgbToCssColor_(red, green, blue);
30947 # }
30948 #
30949 # var alphaFrac = rgb_color.alpha.value || 0.0;
30950 # var rgbParams = [red, green, blue].join(',');
30951 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30952 # };
30953 #
30954 # var rgbToCssColor_ = function(red, green, blue) {
30955 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30956 # var hexString = rgbNumber.toString(16);
30957 # var missingZeros = 6 - hexString.length;
30958 # var resultBuilder = ['#'];
30959 # for (var i = 0; i < missingZeros; i++) {
30960 # resultBuilder.push('0');
30961 # }
30962 # resultBuilder.push(hexString);
30963 # return resultBuilder.join('');
30964 # };
30965 #
30966 # // ...
30967 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30968 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30969 # the final pixel color is defined by the equation:
30970 #
30971 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30972 #
30973 # This means that a value of 1.0 corresponds to a solid color, whereas
30974 # a value of 0.0 corresponds to a completely transparent color. This
30975 # uses a wrapper message rather than a simple float scalar so that it is
30976 # possible to distinguish between a default value and the value being unset.
30977 # If omitted, this color object is to be rendered as a solid color
30978 # (as if the alpha value had been explicitly given with a value of 1.0).
30979 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30980 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30981 },
30982 "type": "A String", # How the value should be interpreted.
30983 "value": "A String", # The value this interpolation point uses. May be a formula.
30984 # Unused if type is MIN or
30985 # MAX.
30986 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030987 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030988 # These pin the gradient color scale according to the color,
30989 # type and value chosen.
30990 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
30991 # for simplicity of conversion to/from color representations in various
30992 # languages over compactness; for example, the fields of this representation
30993 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30994 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30995 # method in iOS; and, with just a little work, it can be easily formatted into
30996 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30997 #
30998 # Example (Java):
30999 #
31000 # import com.google.type.Color;
31001 #
31002 # // ...
31003 # public static java.awt.Color fromProto(Color protocolor) {
31004 # float alpha = protocolor.hasAlpha()
31005 # ? protocolor.getAlpha().getValue()
31006 # : 1.0;
31007 #
31008 # return new java.awt.Color(
31009 # protocolor.getRed(),
31010 # protocolor.getGreen(),
31011 # protocolor.getBlue(),
31012 # alpha);
31013 # }
31014 #
31015 # public static Color toProto(java.awt.Color color) {
31016 # float red = (float) color.getRed();
31017 # float green = (float) color.getGreen();
31018 # float blue = (float) color.getBlue();
31019 # float denominator = 255.0;
31020 # Color.Builder resultBuilder =
31021 # Color
31022 # .newBuilder()
31023 # .setRed(red / denominator)
31024 # .setGreen(green / denominator)
31025 # .setBlue(blue / denominator);
31026 # int alpha = color.getAlpha();
31027 # if (alpha != 255) {
31028 # result.setAlpha(
31029 # FloatValue
31030 # .newBuilder()
31031 # .setValue(((float) alpha) / denominator)
31032 # .build());
31033 # }
31034 # return resultBuilder.build();
31035 # }
31036 # // ...
31037 #
31038 # Example (iOS / Obj-C):
31039 #
31040 # // ...
31041 # static UIColor* fromProto(Color* protocolor) {
31042 # float red = [protocolor red];
31043 # float green = [protocolor green];
31044 # float blue = [protocolor blue];
31045 # FloatValue* alpha_wrapper = [protocolor alpha];
31046 # float alpha = 1.0;
31047 # if (alpha_wrapper != nil) {
31048 # alpha = [alpha_wrapper value];
31049 # }
31050 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31051 # }
31052 #
31053 # static Color* toProto(UIColor* color) {
31054 # CGFloat red, green, blue, alpha;
31055 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31056 # return nil;
31057 # }
31058 # Color* result = [Color alloc] init];
31059 # [result setRed:red];
31060 # [result setGreen:green];
31061 # [result setBlue:blue];
31062 # if (alpha <= 0.9999) {
31063 # [result setAlpha:floatWrapperWithValue(alpha)];
31064 # }
31065 # [result autorelease];
31066 # return result;
31067 # }
31068 # // ...
31069 #
31070 # Example (JavaScript):
31071 #
31072 # // ...
31073 #
31074 # var protoToCssColor = function(rgb_color) {
31075 # var redFrac = rgb_color.red || 0.0;
31076 # var greenFrac = rgb_color.green || 0.0;
31077 # var blueFrac = rgb_color.blue || 0.0;
31078 # var red = Math.floor(redFrac * 255);
31079 # var green = Math.floor(greenFrac * 255);
31080 # var blue = Math.floor(blueFrac * 255);
31081 #
31082 # if (!('alpha' in rgb_color)) {
31083 # return rgbToCssColor_(red, green, blue);
31084 # }
31085 #
31086 # var alphaFrac = rgb_color.alpha.value || 0.0;
31087 # var rgbParams = [red, green, blue].join(',');
31088 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31089 # };
31090 #
31091 # var rgbToCssColor_ = function(red, green, blue) {
31092 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31093 # var hexString = rgbNumber.toString(16);
31094 # var missingZeros = 6 - hexString.length;
31095 # var resultBuilder = ['#'];
31096 # for (var i = 0; i < missingZeros; i++) {
31097 # resultBuilder.push('0');
31098 # }
31099 # resultBuilder.push(hexString);
31100 # return resultBuilder.join('');
31101 # };
31102 #
31103 # // ...
31104 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31105 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31106 # the final pixel color is defined by the equation:
31107 #
31108 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31109 #
31110 # This means that a value of 1.0 corresponds to a solid color, whereas
31111 # a value of 0.0 corresponds to a completely transparent color. This
31112 # uses a wrapper message rather than a simple float scalar so that it is
31113 # possible to distinguish between a default value and the value being unset.
31114 # If omitted, this color object is to be rendered as a solid color
31115 # (as if the alpha value had been explicitly given with a value of 1.0).
31116 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31117 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31118 },
31119 "type": "A String", # How the value should be interpreted.
31120 "value": "A String", # The value this interpolation point uses. May be a formula.
31121 # Unused if type is MIN or
31122 # MAX.
31123 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031124 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031125 # These pin the gradient color scale according to the color,
31126 # type and value chosen.
31127 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
31128 # for simplicity of conversion to/from color representations in various
31129 # languages over compactness; for example, the fields of this representation
31130 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
31131 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
31132 # method in iOS; and, with just a little work, it can be easily formatted into
31133 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
31134 #
31135 # Example (Java):
31136 #
31137 # import com.google.type.Color;
31138 #
31139 # // ...
31140 # public static java.awt.Color fromProto(Color protocolor) {
31141 # float alpha = protocolor.hasAlpha()
31142 # ? protocolor.getAlpha().getValue()
31143 # : 1.0;
31144 #
31145 # return new java.awt.Color(
31146 # protocolor.getRed(),
31147 # protocolor.getGreen(),
31148 # protocolor.getBlue(),
31149 # alpha);
31150 # }
31151 #
31152 # public static Color toProto(java.awt.Color color) {
31153 # float red = (float) color.getRed();
31154 # float green = (float) color.getGreen();
31155 # float blue = (float) color.getBlue();
31156 # float denominator = 255.0;
31157 # Color.Builder resultBuilder =
31158 # Color
31159 # .newBuilder()
31160 # .setRed(red / denominator)
31161 # .setGreen(green / denominator)
31162 # .setBlue(blue / denominator);
31163 # int alpha = color.getAlpha();
31164 # if (alpha != 255) {
31165 # result.setAlpha(
31166 # FloatValue
31167 # .newBuilder()
31168 # .setValue(((float) alpha) / denominator)
31169 # .build());
31170 # }
31171 # return resultBuilder.build();
31172 # }
31173 # // ...
31174 #
31175 # Example (iOS / Obj-C):
31176 #
31177 # // ...
31178 # static UIColor* fromProto(Color* protocolor) {
31179 # float red = [protocolor red];
31180 # float green = [protocolor green];
31181 # float blue = [protocolor blue];
31182 # FloatValue* alpha_wrapper = [protocolor alpha];
31183 # float alpha = 1.0;
31184 # if (alpha_wrapper != nil) {
31185 # alpha = [alpha_wrapper value];
31186 # }
31187 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31188 # }
31189 #
31190 # static Color* toProto(UIColor* color) {
31191 # CGFloat red, green, blue, alpha;
31192 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31193 # return nil;
31194 # }
31195 # Color* result = [Color alloc] init];
31196 # [result setRed:red];
31197 # [result setGreen:green];
31198 # [result setBlue:blue];
31199 # if (alpha <= 0.9999) {
31200 # [result setAlpha:floatWrapperWithValue(alpha)];
31201 # }
31202 # [result autorelease];
31203 # return result;
31204 # }
31205 # // ...
31206 #
31207 # Example (JavaScript):
31208 #
31209 # // ...
31210 #
31211 # var protoToCssColor = function(rgb_color) {
31212 # var redFrac = rgb_color.red || 0.0;
31213 # var greenFrac = rgb_color.green || 0.0;
31214 # var blueFrac = rgb_color.blue || 0.0;
31215 # var red = Math.floor(redFrac * 255);
31216 # var green = Math.floor(greenFrac * 255);
31217 # var blue = Math.floor(blueFrac * 255);
31218 #
31219 # if (!('alpha' in rgb_color)) {
31220 # return rgbToCssColor_(red, green, blue);
31221 # }
31222 #
31223 # var alphaFrac = rgb_color.alpha.value || 0.0;
31224 # var rgbParams = [red, green, blue].join(',');
31225 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31226 # };
31227 #
31228 # var rgbToCssColor_ = function(red, green, blue) {
31229 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31230 # var hexString = rgbNumber.toString(16);
31231 # var missingZeros = 6 - hexString.length;
31232 # var resultBuilder = ['#'];
31233 # for (var i = 0; i < missingZeros; i++) {
31234 # resultBuilder.push('0');
31235 # }
31236 # resultBuilder.push(hexString);
31237 # return resultBuilder.join('');
31238 # };
31239 #
31240 # // ...
31241 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31242 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31243 # the final pixel color is defined by the equation:
31244 #
31245 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31246 #
31247 # This means that a value of 1.0 corresponds to a solid color, whereas
31248 # a value of 0.0 corresponds to a completely transparent color. This
31249 # uses a wrapper message rather than a simple float scalar so that it is
31250 # possible to distinguish between a default value and the value being unset.
31251 # If omitted, this color object is to be rendered as a solid color
31252 # (as if the alpha value had been explicitly given with a value of 1.0).
31253 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31254 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31255 },
31256 "type": "A String", # How the value should be interpreted.
31257 "value": "A String", # The value this interpolation point uses. May be a formula.
31258 # Unused if type is MIN or
31259 # MAX.
31260 },
31261 },
31262 },
31263 ],
31264 "merges": [ # The ranges that are merged together.
31265 { # A range on a sheet.
31266 # All indexes are zero-based.
31267 # Indexes are half open, e.g the start index is inclusive
31268 # and the end index is exclusive -- [start_index, end_index).
31269 # Missing indexes indicate the range is unbounded on that side.
31270 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031271 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031272 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031273 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031274 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031275 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031276 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031277 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031278 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031279 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031280 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031281 # `Sheet1!A:B == sheet_id: 0,
31282 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031283 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031284 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031285 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031286 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031287 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031288 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031289 #
31290 # The start index must always be less than or equal to the end index.
31291 # If the start index equals the end index, then the range is empty.
31292 # Empty ranges are typically not meaningful and are usually rendered in the
31293 # UI as `#REF!`.
31294 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31295 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31296 "sheetId": 42, # The sheet this range is on.
31297 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31298 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31299 },
31300 ],
31301 "basicFilter": { # The default filter associated with a sheet. # The filter on this sheet, if any.
31302 "range": { # A range on a sheet. # The range the filter covers.
31303 # All indexes are zero-based.
31304 # Indexes are half open, e.g the start index is inclusive
31305 # and the end index is exclusive -- [start_index, end_index).
31306 # Missing indexes indicate the range is unbounded on that side.
31307 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031308 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031309 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031310 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031311 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031312 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031313 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031314 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031315 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031316 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031317 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031318 # `Sheet1!A:B == sheet_id: 0,
31319 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031320 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031321 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031322 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031323 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031324 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031325 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031326 #
31327 # The start index must always be less than or equal to the end index.
31328 # If the start index equals the end index, then the range is empty.
31329 # Empty ranges are typically not meaningful and are usually rendered in the
31330 # UI as `#REF!`.
31331 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31332 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31333 "sheetId": 42, # The sheet this range is on.
31334 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31335 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31336 },
31337 "sortSpecs": [ # The sort order per column. Later specifications are used when values
31338 # are equal in the earlier specifications.
31339 { # A sort order associated with a specific column or row.
31340 "sortOrder": "A String", # The order data should be sorted.
31341 "dimensionIndex": 42, # The dimension the sort should be applied to.
31342 },
31343 ],
31344 "criteria": { # The criteria for showing/hiding values per column.
31345 # The map's key is the column index, and the value is the criteria for
31346 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031347 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031348 "hiddenValues": [ # Values that should be hidden.
31349 "A String",
31350 ],
31351 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
31352 # (This does not override hiddenValues -- if a value is listed there,
31353 # it will still be hidden.)
31354 # BooleanConditions are used by conditional formatting,
31355 # data validation, and the criteria in filters.
31356 "type": "A String", # The type of condition.
31357 "values": [ # The values of the condition. The number of supported values depends
31358 # on the condition type. Some support zero values,
31359 # others one or two values,
31360 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
31361 { # The value of the condition.
31362 "relativeDate": "A String", # A relative date (based on the current date).
31363 # Valid only if the type is
31364 # DATE_BEFORE,
31365 # DATE_AFTER,
31366 # DATE_ON_OR_BEFORE or
31367 # DATE_ON_OR_AFTER.
31368 #
31369 # Relative dates are not supported in data validation.
31370 # They are supported only in conditional formatting and
31371 # conditional filters.
31372 "userEnteredValue": "A String", # A value the condition is based on.
31373 # The value will be parsed as if the user typed into a cell.
31374 # Formulas are supported (and must begin with an `=`).
31375 },
31376 ],
31377 },
31378 },
31379 },
31380 },
31381 "charts": [ # The specifications of every chart on this sheet.
31382 { # A chart embedded in a sheet.
31383 "chartId": 42, # The ID of the chart.
31384 "position": { # The position of an embedded object such as a chart. # The position of the chart.
31385 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
31386 # is chosen for you. Used only when writing.
31387 "sheetId": 42, # The sheet this is on. Set only if the embedded object
31388 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031389 "overlayPosition": { # The location an object is overlaid on top of a grid. # The position at which the object is overlaid on top of a grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031390 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
31391 # All indexes are zero-based.
31392 "rowIndex": 42, # The row index of the coordinate.
31393 "columnIndex": 42, # The column index of the coordinate.
31394 "sheetId": 42, # The sheet this coordinate is on.
31395 },
31396 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
31397 # from the anchor cell.
31398 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
31399 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
31400 # from the anchor cell.
31401 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
31402 },
31403 },
31404 "spec": { # The specifications of a chart. # The specification of the chart.
31405 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031406 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
31407 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
31408 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
31409 "sources": [ # The ranges of data for a series or domain.
31410 # Exactly one dimension must have a length of 1,
31411 # and all sources in the list must have the same dimension
31412 # with length 1.
31413 # The domain (if it exists) & all series must have the same number
31414 # of source ranges. If using more than one source range, then the source
31415 # range at a given offset must be contiguous across the domain and series.
31416 #
31417 # For example, these are valid configurations:
31418 #
31419 # domain sources: A1:A5
31420 # series1 sources: B1:B5
31421 # series2 sources: D6:D10
31422 #
31423 # domain sources: A1:A5, C10:C12
31424 # series1 sources: B1:B5, D10:D12
31425 # series2 sources: C1:C5, E10:E12
31426 { # A range on a sheet.
31427 # All indexes are zero-based.
31428 # Indexes are half open, e.g the start index is inclusive
31429 # and the end index is exclusive -- [start_index, end_index).
31430 # Missing indexes indicate the range is unbounded on that side.
31431 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031432 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031433 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031434 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031435 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031436 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031437 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031438 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031439 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031440 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031441 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031442 # `Sheet1!A:B == sheet_id: 0,
31443 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031444 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031445 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031446 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031447 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031448 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031449 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031450 #
31451 # The start index must always be less than or equal to the end index.
31452 # If the start index equals the end index, then the range is empty.
31453 # Empty ranges are typically not meaningful and are usually rendered in the
31454 # UI as `#REF!`.
31455 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31456 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31457 "sheetId": 42, # The sheet this range is on.
31458 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31459 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31460 },
31461 ],
31462 },
31463 },
31464 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
31465 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
31466 "sources": [ # The ranges of data for a series or domain.
31467 # Exactly one dimension must have a length of 1,
31468 # and all sources in the list must have the same dimension
31469 # with length 1.
31470 # The domain (if it exists) & all series must have the same number
31471 # of source ranges. If using more than one source range, then the source
31472 # range at a given offset must be contiguous across the domain and series.
31473 #
31474 # For example, these are valid configurations:
31475 #
31476 # domain sources: A1:A5
31477 # series1 sources: B1:B5
31478 # series2 sources: D6:D10
31479 #
31480 # domain sources: A1:A5, C10:C12
31481 # series1 sources: B1:B5, D10:D12
31482 # series2 sources: C1:C5, E10:E12
31483 { # A range on a sheet.
31484 # All indexes are zero-based.
31485 # Indexes are half open, e.g the start index is inclusive
31486 # and the end index is exclusive -- [start_index, end_index).
31487 # Missing indexes indicate the range is unbounded on that side.
31488 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031489 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031490 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031491 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031492 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031493 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031494 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031495 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031496 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031497 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031498 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031499 # `Sheet1!A:B == sheet_id: 0,
31500 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031501 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031502 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031503 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031504 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031505 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031506 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031507 #
31508 # The start index must always be less than or equal to the end index.
31509 # If the start index equals the end index, then the range is empty.
31510 # Empty ranges are typically not meaningful and are usually rendered in the
31511 # UI as `#REF!`.
31512 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31513 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31514 "sheetId": 42, # The sheet this range is on.
31515 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31516 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31517 },
31518 ],
31519 },
31520 },
31521 "threeDimensional": True or False, # True if the pie is three dimensional.
31522 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
31523 "pieHole": 3.14, # The size of the hole in the pie chart.
31524 },
31525 "basicChart": { # The specification for a basic chart. See BasicChartType for the list # A basic chart specification, can be one of many kinds of charts.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031526 # See BasicChartType for the list of all
31527 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031528 # of charts this supports.
31529 "headerCount": 42, # The number of rows or columns in the data that are "headers".
31530 # If not set, Google Sheets will guess how many rows are headers based
31531 # on the data.
31532 #
31533 # (Note that BasicChartAxis.title may override the axis title
31534 # inferred from the header values.)
31535 "series": [ # The data this chart is visualizing.
31536 { # A single series of data in a chart.
31537 # For example, if charting stock prices over time, multiple series may exist,
31538 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
31539 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
31540 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
31541 "sources": [ # The ranges of data for a series or domain.
31542 # Exactly one dimension must have a length of 1,
31543 # and all sources in the list must have the same dimension
31544 # with length 1.
31545 # The domain (if it exists) & all series must have the same number
31546 # of source ranges. If using more than one source range, then the source
31547 # range at a given offset must be contiguous across the domain and series.
31548 #
31549 # For example, these are valid configurations:
31550 #
31551 # domain sources: A1:A5
31552 # series1 sources: B1:B5
31553 # series2 sources: D6:D10
31554 #
31555 # domain sources: A1:A5, C10:C12
31556 # series1 sources: B1:B5, D10:D12
31557 # series2 sources: C1:C5, E10:E12
31558 { # A range on a sheet.
31559 # All indexes are zero-based.
31560 # Indexes are half open, e.g the start index is inclusive
31561 # and the end index is exclusive -- [start_index, end_index).
31562 # Missing indexes indicate the range is unbounded on that side.
31563 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031564 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031565 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031566 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031567 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031568 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031569 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031570 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031571 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031572 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031573 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031574 # `Sheet1!A:B == sheet_id: 0,
31575 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031576 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031577 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031578 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031579 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031580 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031581 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031582 #
31583 # The start index must always be less than or equal to the end index.
31584 # If the start index equals the end index, then the range is empty.
31585 # Empty ranges are typically not meaningful and are usually rendered in the
31586 # UI as `#REF!`.
31587 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31588 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31589 "sheetId": 42, # The sheet this range is on.
31590 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31591 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31592 },
31593 ],
31594 },
31595 },
31596 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
31597 # For example, if charting stocks over time, the "Volume" series
31598 # may want to be pinned to the right with the prices pinned to the left,
31599 # because the scale of trading volume is different than the scale of
31600 # prices.
31601 # It is an error to specify an axis that isn't a valid minor axis
31602 # for the chart's type.
31603 "type": "A String", # The type of this series. Valid only if the
31604 # chartType is
31605 # COMBO.
31606 # Different types will change the way the series is visualized.
31607 # Only LINE, AREA,
31608 # and COLUMN are supported.
31609 },
31610 ],
31611 "legendPosition": "A String", # The position of the chart legend.
31612 "domains": [ # The domain of data this is charting.
31613 # Only a single domain is currently supported.
31614 { # The domain of a chart.
31615 # For example, if charting stock prices over time, this would be the date.
31616 "domain": { # The data included in a domain or series. # The data of the domain. For example, if charting stock prices over time,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031617 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031618 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
31619 "sources": [ # The ranges of data for a series or domain.
31620 # Exactly one dimension must have a length of 1,
31621 # and all sources in the list must have the same dimension
31622 # with length 1.
31623 # The domain (if it exists) & all series must have the same number
31624 # of source ranges. If using more than one source range, then the source
31625 # range at a given offset must be contiguous across the domain and series.
31626 #
31627 # For example, these are valid configurations:
31628 #
31629 # domain sources: A1:A5
31630 # series1 sources: B1:B5
31631 # series2 sources: D6:D10
31632 #
31633 # domain sources: A1:A5, C10:C12
31634 # series1 sources: B1:B5, D10:D12
31635 # series2 sources: C1:C5, E10:E12
31636 { # A range on a sheet.
31637 # All indexes are zero-based.
31638 # Indexes are half open, e.g the start index is inclusive
31639 # and the end index is exclusive -- [start_index, end_index).
31640 # Missing indexes indicate the range is unbounded on that side.
31641 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031642 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031643 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031644 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031645 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031646 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031647 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031648 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031649 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031650 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031651 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031652 # `Sheet1!A:B == sheet_id: 0,
31653 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031654 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031655 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031656 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031657 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031658 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031659 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031660 #
31661 # The start index must always be less than or equal to the end index.
31662 # If the start index equals the end index, then the range is empty.
31663 # Empty ranges are typically not meaningful and are usually rendered in the
31664 # UI as `#REF!`.
31665 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31666 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31667 "sheetId": 42, # The sheet this range is on.
31668 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31669 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31670 },
31671 ],
31672 },
31673 },
31674 },
31675 ],
31676 "chartType": "A String", # The type of the chart.
31677 "axis": [ # The axis on the chart.
31678 { # An axis of the chart.
31679 # A chart may not have more than one axis per
31680 # axis position.
31681 "position": "A String", # The position of this axis.
31682 "format": { # The format of a run of text in a cell. # The format of the title.
31683 # Only valid if the axis is not associated with the domain.
31684 # Absent values indicate that the field isn't specified.
31685 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
31686 # for simplicity of conversion to/from color representations in various
31687 # languages over compactness; for example, the fields of this representation
31688 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
31689 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
31690 # method in iOS; and, with just a little work, it can be easily formatted into
31691 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
31692 #
31693 # Example (Java):
31694 #
31695 # import com.google.type.Color;
31696 #
31697 # // ...
31698 # public static java.awt.Color fromProto(Color protocolor) {
31699 # float alpha = protocolor.hasAlpha()
31700 # ? protocolor.getAlpha().getValue()
31701 # : 1.0;
31702 #
31703 # return new java.awt.Color(
31704 # protocolor.getRed(),
31705 # protocolor.getGreen(),
31706 # protocolor.getBlue(),
31707 # alpha);
31708 # }
31709 #
31710 # public static Color toProto(java.awt.Color color) {
31711 # float red = (float) color.getRed();
31712 # float green = (float) color.getGreen();
31713 # float blue = (float) color.getBlue();
31714 # float denominator = 255.0;
31715 # Color.Builder resultBuilder =
31716 # Color
31717 # .newBuilder()
31718 # .setRed(red / denominator)
31719 # .setGreen(green / denominator)
31720 # .setBlue(blue / denominator);
31721 # int alpha = color.getAlpha();
31722 # if (alpha != 255) {
31723 # result.setAlpha(
31724 # FloatValue
31725 # .newBuilder()
31726 # .setValue(((float) alpha) / denominator)
31727 # .build());
31728 # }
31729 # return resultBuilder.build();
31730 # }
31731 # // ...
31732 #
31733 # Example (iOS / Obj-C):
31734 #
31735 # // ...
31736 # static UIColor* fromProto(Color* protocolor) {
31737 # float red = [protocolor red];
31738 # float green = [protocolor green];
31739 # float blue = [protocolor blue];
31740 # FloatValue* alpha_wrapper = [protocolor alpha];
31741 # float alpha = 1.0;
31742 # if (alpha_wrapper != nil) {
31743 # alpha = [alpha_wrapper value];
31744 # }
31745 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31746 # }
31747 #
31748 # static Color* toProto(UIColor* color) {
31749 # CGFloat red, green, blue, alpha;
31750 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31751 # return nil;
31752 # }
31753 # Color* result = [Color alloc] init];
31754 # [result setRed:red];
31755 # [result setGreen:green];
31756 # [result setBlue:blue];
31757 # if (alpha <= 0.9999) {
31758 # [result setAlpha:floatWrapperWithValue(alpha)];
31759 # }
31760 # [result autorelease];
31761 # return result;
31762 # }
31763 # // ...
31764 #
31765 # Example (JavaScript):
31766 #
31767 # // ...
31768 #
31769 # var protoToCssColor = function(rgb_color) {
31770 # var redFrac = rgb_color.red || 0.0;
31771 # var greenFrac = rgb_color.green || 0.0;
31772 # var blueFrac = rgb_color.blue || 0.0;
31773 # var red = Math.floor(redFrac * 255);
31774 # var green = Math.floor(greenFrac * 255);
31775 # var blue = Math.floor(blueFrac * 255);
31776 #
31777 # if (!('alpha' in rgb_color)) {
31778 # return rgbToCssColor_(red, green, blue);
31779 # }
31780 #
31781 # var alphaFrac = rgb_color.alpha.value || 0.0;
31782 # var rgbParams = [red, green, blue].join(',');
31783 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31784 # };
31785 #
31786 # var rgbToCssColor_ = function(red, green, blue) {
31787 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31788 # var hexString = rgbNumber.toString(16);
31789 # var missingZeros = 6 - hexString.length;
31790 # var resultBuilder = ['#'];
31791 # for (var i = 0; i < missingZeros; i++) {
31792 # resultBuilder.push('0');
31793 # }
31794 # resultBuilder.push(hexString);
31795 # return resultBuilder.join('');
31796 # };
31797 #
31798 # // ...
31799 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31800 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31801 # the final pixel color is defined by the equation:
31802 #
31803 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31804 #
31805 # This means that a value of 1.0 corresponds to a solid color, whereas
31806 # a value of 0.0 corresponds to a completely transparent color. This
31807 # uses a wrapper message rather than a simple float scalar so that it is
31808 # possible to distinguish between a default value and the value being unset.
31809 # If omitted, this color object is to be rendered as a solid color
31810 # (as if the alpha value had been explicitly given with a value of 1.0).
31811 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31812 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31813 },
31814 "bold": True or False, # True if the text is bold.
31815 "strikethrough": True or False, # True if the text has a strikethrough.
31816 "fontFamily": "A String", # The font family.
31817 "fontSize": 42, # The size of the font.
31818 "italic": True or False, # True if the text is italicized.
31819 "underline": True or False, # True if the text is underlined.
31820 },
31821 "title": "A String", # The title of this axis. If set, this overrides any title inferred
31822 # from headers of the data.
31823 },
31824 ],
31825 },
31826 "title": "A String", # The title of the chart.
31827 },
31828 },
31829 ],
31830 "filterViews": [ # The filter views in this sheet.
31831 { # A filter view.
31832 "title": "A String", # The name of the filter view.
31833 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
31834 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031835 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031836 # may be set.
31837 "filterViewId": 42, # The ID of the filter view.
31838 "range": { # A range on a sheet. # The range this filter view covers.
31839 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031840 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031841 # may be set.
31842 # All indexes are zero-based.
31843 # Indexes are half open, e.g the start index is inclusive
31844 # and the end index is exclusive -- [start_index, end_index).
31845 # Missing indexes indicate the range is unbounded on that side.
31846 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031847 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031848 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031849 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031850 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031851 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031852 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031853 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031854 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031855 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031856 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031857 # `Sheet1!A:B == sheet_id: 0,
31858 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031859 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031860 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031861 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031862 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031863 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031864 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031865 #
31866 # The start index must always be less than or equal to the end index.
31867 # If the start index equals the end index, then the range is empty.
31868 # Empty ranges are typically not meaningful and are usually rendered in the
31869 # UI as `#REF!`.
31870 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31871 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31872 "sheetId": 42, # The sheet this range is on.
31873 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31874 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31875 },
31876 "sortSpecs": [ # The sort order per column. Later specifications are used when values
31877 # are equal in the earlier specifications.
31878 { # A sort order associated with a specific column or row.
31879 "sortOrder": "A String", # The order data should be sorted.
31880 "dimensionIndex": 42, # The dimension the sort should be applied to.
31881 },
31882 ],
31883 "criteria": { # The criteria for showing/hiding values per column.
31884 # The map's key is the column index, and the value is the criteria for
31885 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031886 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031887 "hiddenValues": [ # Values that should be hidden.
31888 "A String",
31889 ],
31890 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
31891 # (This does not override hiddenValues -- if a value is listed there,
31892 # it will still be hidden.)
31893 # BooleanConditions are used by conditional formatting,
31894 # data validation, and the criteria in filters.
31895 "type": "A String", # The type of condition.
31896 "values": [ # The values of the condition. The number of supported values depends
31897 # on the condition type. Some support zero values,
31898 # others one or two values,
31899 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
31900 { # The value of the condition.
31901 "relativeDate": "A String", # A relative date (based on the current date).
31902 # Valid only if the type is
31903 # DATE_BEFORE,
31904 # DATE_AFTER,
31905 # DATE_ON_OR_BEFORE or
31906 # DATE_ON_OR_AFTER.
31907 #
31908 # Relative dates are not supported in data validation.
31909 # They are supported only in conditional formatting and
31910 # conditional filters.
31911 "userEnteredValue": "A String", # A value the condition is based on.
31912 # The value will be parsed as if the user typed into a cell.
31913 # Formulas are supported (and must begin with an `=`).
31914 },
31915 ],
31916 },
31917 },
31918 },
31919 },
31920 ],
31921 "protectedRanges": [ # The protected ranges in this sheet.
31922 { # A protected range.
31923 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
31924 # Unprotected ranges are only supported on protected sheets.
31925 { # A range on a sheet.
31926 # All indexes are zero-based.
31927 # Indexes are half open, e.g the start index is inclusive
31928 # and the end index is exclusive -- [start_index, end_index).
31929 # Missing indexes indicate the range is unbounded on that side.
31930 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031931 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031932 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031933 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031934 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031935 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031936 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031937 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031938 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031939 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031940 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031941 # `Sheet1!A:B == sheet_id: 0,
31942 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031943 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031944 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031945 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031946 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031947 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031948 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031949 #
31950 # The start index must always be less than or equal to the end index.
31951 # If the start index equals the end index, then the range is empty.
31952 # Empty ranges are typically not meaningful and are usually rendered in the
31953 # UI as `#REF!`.
31954 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31955 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31956 "sheetId": 42, # The sheet this range is on.
31957 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31958 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31959 },
31960 ],
31961 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
31962 # protected area.
31963 # This field is read-only.
31964 "description": "A String", # The description of this protected range.
31965 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
31966 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031967 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031968 # may be set.
31969 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
31970 # This field is only visible to users with edit access to the protected
31971 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031972 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031973 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
31974 # range. Domain protection is only supported on documents within a domain.
31975 "users": [ # The email addresses of users with edit access to the protected range.
31976 "A String",
31977 ],
31978 "groups": [ # The email addresses of groups with edit access to the protected range.
31979 "A String",
31980 ],
31981 },
31982 "protectedRangeId": 42, # The ID of the protected range.
31983 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031984 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031985 # Warning-based protection means that every user can edit data in the
31986 # protected range, except editing will prompt a warning asking the user
31987 # to confirm the edit.
31988 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031989 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031990 # Additionally, if this field is changed from true to false and the
31991 # `editors` field is not set (nor included in the field mask), then
31992 # the editors will be set to all the editors in the document.
31993 "range": { # A range on a sheet. # The range that is being protected.
31994 # The range may be fully unbounded, in which case this is considered
31995 # a protected sheet.
31996 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031997 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031998 # may be set.
31999 # All indexes are zero-based.
32000 # Indexes are half open, e.g the start index is inclusive
32001 # and the end index is exclusive -- [start_index, end_index).
32002 # Missing indexes indicate the range is unbounded on that side.
32003 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032004 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032005 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032006 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032007 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032008 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032009 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032010 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032011 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032012 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032013 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032014 # `Sheet1!A:B == sheet_id: 0,
32015 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032016 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032017 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032018 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032019 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032020 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032021 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032022 #
32023 # The start index must always be less than or equal to the end index.
32024 # If the start index equals the end index, then the range is empty.
32025 # Empty ranges are typically not meaningful and are usually rendered in the
32026 # UI as `#REF!`.
32027 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
32028 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
32029 "sheetId": 42, # The sheet this range is on.
32030 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
32031 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
32032 },
32033 },
32034 ],
32035 "data": [ # Data in the grid, if this is a grid sheet.
32036 # The number of GridData objects returned is dependent on the number of
32037 # ranges requested on this sheet. For example, if this is representing
32038 # `Sheet1`, and the spreadsheet was requested with ranges
32039 # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a
32040 # startRow/startColumn of `0`,
32041 # while the second one will have `startRow 14` (zero-based row 15),
32042 # and `startColumn 3` (zero-based column D).
32043 { # Data in the grid, as well as metadata about the dimensions.
32044 "startRow": 42, # The first row this GridData refers to, zero-based.
32045 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032046 # in start_row.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032047 { # Properties about a dimension.
32048 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
32049 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
32050 "hiddenByFilter": True or False, # True if this dimension is being filtered.
32051 # This field is read-only.
32052 },
32053 ],
32054 "startColumn": 42, # The first column this GridData refers to, zero-based.
32055 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032056 # in start_column.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032057 { # Properties about a dimension.
32058 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
32059 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
32060 "hiddenByFilter": True or False, # True if this dimension is being filtered.
32061 # This field is read-only.
32062 },
32063 ],
32064 "rowData": [ # The data in the grid, one entry per row,
32065 # starting with the row in startRow.
32066 # The values in RowData will correspond to columns starting
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032067 # at start_column.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032068 { # Data about each cell in a row.
32069 "values": [ # The values in the row, one per column.
32070 { # Data about a specific cell.
32071 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
32072 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032073 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032074 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032075 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032076 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
32077 # or vertically (as rows).
32078 "rows": [ # Each row grouping in the pivot table.
32079 { # A single grouping (either row or column) in a pivot table.
32080 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
32081 "valueMetadata": [ # Metadata about values in the grouping.
32082 { # Metadata about a value in a pivot grouping.
32083 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
32084 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
32085 # (Note that formulaValue is not valid,
32086 # because the values will be calculated.)
32087 "numberValue": 3.14, # Represents a double value.
32088 # Note: Dates, Times and DateTimes are represented as doubles in
32089 # "serial number" format.
32090 "boolValue": True or False, # Represents a boolean value.
32091 "formulaValue": "A String", # Represents a formula.
32092 "stringValue": "A String", # Represents a string value.
32093 # Leading single quotes are not included. For example, if the user typed
32094 # `'123` into the UI, this would be represented as a `stringValue` of
32095 # `"123"`.
32096 "errorValue": { # An error in a cell. # Represents an error.
32097 # This field is read-only.
32098 "message": "A String", # A message with more information about the error
32099 # (in the spreadsheet's locale).
32100 "type": "A String", # The type of error.
32101 },
32102 },
32103 },
32104 ],
32105 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
32106 # If not specified, sorting is alphabetical by this group's values.
32107 "buckets": [ # Determines the bucket from which values are chosen to sort.
32108 #
32109 # For example, in a pivot table with one row group & two column groups,
32110 # the row group can list up to two values. The first value corresponds
32111 # to a value within the first column group, and the second value
32112 # corresponds to a value in the second column group. If no values
32113 # are listed, this would indicate that the row should be sorted according
32114 # to the "Grand Total" over the column groups. If a single value is listed,
32115 # this would correspond to using the "Total" of that bucket.
32116 { # The kinds of value that a cell in a spreadsheet can have.
32117 "numberValue": 3.14, # Represents a double value.
32118 # Note: Dates, Times and DateTimes are represented as doubles in
32119 # "serial number" format.
32120 "boolValue": True or False, # Represents a boolean value.
32121 "formulaValue": "A String", # Represents a formula.
32122 "stringValue": "A String", # Represents a string value.
32123 # Leading single quotes are not included. For example, if the user typed
32124 # `'123` into the UI, this would be represented as a `stringValue` of
32125 # `"123"`.
32126 "errorValue": { # An error in a cell. # Represents an error.
32127 # This field is read-only.
32128 "message": "A String", # A message with more information about the error
32129 # (in the spreadsheet's locale).
32130 "type": "A String", # The type of error.
32131 },
32132 },
32133 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032134 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032135 # grouping should be sorted by.
32136 },
32137 "sortOrder": "A String", # The order the values in this group should be sorted.
32138 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
32139 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032140 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032141 # means this group refers to column `C`, whereas the offset `1` would refer
32142 # to column `D`.
32143 },
32144 ],
32145 "source": { # A range on a sheet. # The range the pivot table is reading data from.
32146 # All indexes are zero-based.
32147 # Indexes are half open, e.g the start index is inclusive
32148 # and the end index is exclusive -- [start_index, end_index).
32149 # Missing indexes indicate the range is unbounded on that side.
32150 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032151 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032152 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032153 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032154 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032155 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032156 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032157 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032158 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032159 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032160 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032161 # `Sheet1!A:B == sheet_id: 0,
32162 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032163 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032164 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032165 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032166 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032167 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032168 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032169 #
32170 # The start index must always be less than or equal to the end index.
32171 # If the start index equals the end index, then the range is empty.
32172 # Empty ranges are typically not meaningful and are usually rendered in the
32173 # UI as `#REF!`.
32174 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
32175 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
32176 "sheetId": 42, # The sheet this range is on.
32177 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
32178 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
32179 },
32180 "values": [ # A list of values to include in the pivot table.
32181 { # The definition of how a value in a pivot table should be calculated.
32182 "formula": "A String", # A custom formula to calculate the value. The formula must start
32183 # with an `=` character.
32184 "summarizeFunction": "A String", # A function to summarize the value.
32185 # If formula is set, the only supported values are
32186 # SUM and
32187 # CUSTOM.
32188 # If sourceColumnOffset is set, then `CUSTOM`
32189 # is not supported.
32190 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
32191 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032192 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032193 # means this value refers to column `C`, whereas the offset `1` would
32194 # refer to column `D`.
32195 "name": "A String", # A name to use for the value. This is only used if formula was set.
32196 # Otherwise, the column name is used.
32197 },
32198 ],
32199 "criteria": { # An optional mapping of filters per source column offset.
32200 #
32201 # The filters will be applied before aggregating data into the pivot table.
32202 # The map's key is the column offset of the source range that you want to
32203 # filter, and the value is the criteria for that column.
32204 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032205 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032206 # for column `C`, whereas the key `1` is for column `D`.
32207 "a_key": { # Criteria for showing/hiding rows in a pivot table.
32208 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
32209 "A String",
32210 ],
32211 },
32212 },
32213 "columns": [ # Each column grouping in the pivot table.
32214 { # A single grouping (either row or column) in a pivot table.
32215 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
32216 "valueMetadata": [ # Metadata about values in the grouping.
32217 { # Metadata about a value in a pivot grouping.
32218 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
32219 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
32220 # (Note that formulaValue is not valid,
32221 # because the values will be calculated.)
32222 "numberValue": 3.14, # Represents a double value.
32223 # Note: Dates, Times and DateTimes are represented as doubles in
32224 # "serial number" format.
32225 "boolValue": True or False, # Represents a boolean value.
32226 "formulaValue": "A String", # Represents a formula.
32227 "stringValue": "A String", # Represents a string value.
32228 # Leading single quotes are not included. For example, if the user typed
32229 # `'123` into the UI, this would be represented as a `stringValue` of
32230 # `"123"`.
32231 "errorValue": { # An error in a cell. # Represents an error.
32232 # This field is read-only.
32233 "message": "A String", # A message with more information about the error
32234 # (in the spreadsheet's locale).
32235 "type": "A String", # The type of error.
32236 },
32237 },
32238 },
32239 ],
32240 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
32241 # If not specified, sorting is alphabetical by this group's values.
32242 "buckets": [ # Determines the bucket from which values are chosen to sort.
32243 #
32244 # For example, in a pivot table with one row group & two column groups,
32245 # the row group can list up to two values. The first value corresponds
32246 # to a value within the first column group, and the second value
32247 # corresponds to a value in the second column group. If no values
32248 # are listed, this would indicate that the row should be sorted according
32249 # to the "Grand Total" over the column groups. If a single value is listed,
32250 # this would correspond to using the "Total" of that bucket.
32251 { # The kinds of value that a cell in a spreadsheet can have.
32252 "numberValue": 3.14, # Represents a double value.
32253 # Note: Dates, Times and DateTimes are represented as doubles in
32254 # "serial number" format.
32255 "boolValue": True or False, # Represents a boolean value.
32256 "formulaValue": "A String", # Represents a formula.
32257 "stringValue": "A String", # Represents a string value.
32258 # Leading single quotes are not included. For example, if the user typed
32259 # `'123` into the UI, this would be represented as a `stringValue` of
32260 # `"123"`.
32261 "errorValue": { # An error in a cell. # Represents an error.
32262 # This field is read-only.
32263 "message": "A String", # A message with more information about the error
32264 # (in the spreadsheet's locale).
32265 "type": "A String", # The type of error.
32266 },
32267 },
32268 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032269 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032270 # grouping should be sorted by.
32271 },
32272 "sortOrder": "A String", # The order the values in this group should be sorted.
32273 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
32274 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032275 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032276 # means this group refers to column `C`, whereas the offset `1` would refer
32277 # to column `D`.
32278 },
32279 ],
32280 },
32281 "hyperlink": "A String", # A hyperlink this cell points to, if any.
32282 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
32283 "effectiveValue": { # The kinds of value that a cell in a spreadsheet can have. # The effective value of the cell. For cells with formulas, this will be
32284 # the calculated value. For cells with literals, this will be
32285 # the same as the user_entered_value.
32286 # This field is read-only.
32287 "numberValue": 3.14, # Represents a double value.
32288 # Note: Dates, Times and DateTimes are represented as doubles in
32289 # "serial number" format.
32290 "boolValue": True or False, # Represents a boolean value.
32291 "formulaValue": "A String", # Represents a formula.
32292 "stringValue": "A String", # Represents a string value.
32293 # Leading single quotes are not included. For example, if the user typed
32294 # `'123` into the UI, this would be represented as a `stringValue` of
32295 # `"123"`.
32296 "errorValue": { # An error in a cell. # Represents an error.
32297 # This field is read-only.
32298 "message": "A String", # A message with more information about the error
32299 # (in the spreadsheet's locale).
32300 "type": "A String", # The type of error.
32301 },
32302 },
32303 "formattedValue": "A String", # The formatted value of the cell.
32304 # This is the value as it's shown to the user.
32305 # This field is read-only.
32306 "userEnteredValue": { # The kinds of value that a cell in a spreadsheet can have. # The value the user entered in the cell. e.g, `1234`, `'Hello'`, or `=NOW()`
32307 # Note: Dates, Times and DateTimes are represented as doubles in
32308 # serial number format.
32309 "numberValue": 3.14, # Represents a double value.
32310 # Note: Dates, Times and DateTimes are represented as doubles in
32311 # "serial number" format.
32312 "boolValue": True or False, # Represents a boolean value.
32313 "formulaValue": "A String", # Represents a formula.
32314 "stringValue": "A String", # Represents a string value.
32315 # Leading single quotes are not included. For example, if the user typed
32316 # `'123` into the UI, this would be represented as a `stringValue` of
32317 # `"123"`.
32318 "errorValue": { # An error in a cell. # Represents an error.
32319 # This field is read-only.
32320 "message": "A String", # A message with more information about the error
32321 # (in the spreadsheet's locale).
32322 "type": "A String", # The type of error.
32323 },
32324 },
32325 "note": "A String", # Any note on the cell.
32326 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
32327 # This includes the results of applying any conditional formatting and,
32328 # if the cell contains a formula, the computed number format.
32329 # If the effective format is the default format, effective format will
32330 # not be written.
32331 # This field is read-only.
32332 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032333 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
32334 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032335 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032336 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032337 },
32338 "textDirection": "A String", # The direction of the text in the cell.
32339 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
32340 # When updating padding, every field must be specified.
32341 "top": 42, # The top padding of the cell.
32342 "right": 42, # The right padding of the cell.
32343 "bottom": 42, # The bottom padding of the cell.
32344 "left": 42, # The left padding of the cell.
32345 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032346 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032347 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
32348 # for simplicity of conversion to/from color representations in various
32349 # languages over compactness; for example, the fields of this representation
32350 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
32351 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
32352 # method in iOS; and, with just a little work, it can be easily formatted into
32353 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32354 #
32355 # Example (Java):
32356 #
32357 # import com.google.type.Color;
32358 #
32359 # // ...
32360 # public static java.awt.Color fromProto(Color protocolor) {
32361 # float alpha = protocolor.hasAlpha()
32362 # ? protocolor.getAlpha().getValue()
32363 # : 1.0;
32364 #
32365 # return new java.awt.Color(
32366 # protocolor.getRed(),
32367 # protocolor.getGreen(),
32368 # protocolor.getBlue(),
32369 # alpha);
32370 # }
32371 #
32372 # public static Color toProto(java.awt.Color color) {
32373 # float red = (float) color.getRed();
32374 # float green = (float) color.getGreen();
32375 # float blue = (float) color.getBlue();
32376 # float denominator = 255.0;
32377 # Color.Builder resultBuilder =
32378 # Color
32379 # .newBuilder()
32380 # .setRed(red / denominator)
32381 # .setGreen(green / denominator)
32382 # .setBlue(blue / denominator);
32383 # int alpha = color.getAlpha();
32384 # if (alpha != 255) {
32385 # result.setAlpha(
32386 # FloatValue
32387 # .newBuilder()
32388 # .setValue(((float) alpha) / denominator)
32389 # .build());
32390 # }
32391 # return resultBuilder.build();
32392 # }
32393 # // ...
32394 #
32395 # Example (iOS / Obj-C):
32396 #
32397 # // ...
32398 # static UIColor* fromProto(Color* protocolor) {
32399 # float red = [protocolor red];
32400 # float green = [protocolor green];
32401 # float blue = [protocolor blue];
32402 # FloatValue* alpha_wrapper = [protocolor alpha];
32403 # float alpha = 1.0;
32404 # if (alpha_wrapper != nil) {
32405 # alpha = [alpha_wrapper value];
32406 # }
32407 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
32408 # }
32409 #
32410 # static Color* toProto(UIColor* color) {
32411 # CGFloat red, green, blue, alpha;
32412 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
32413 # return nil;
32414 # }
32415 # Color* result = [Color alloc] init];
32416 # [result setRed:red];
32417 # [result setGreen:green];
32418 # [result setBlue:blue];
32419 # if (alpha <= 0.9999) {
32420 # [result setAlpha:floatWrapperWithValue(alpha)];
32421 # }
32422 # [result autorelease];
32423 # return result;
32424 # }
32425 # // ...
32426 #
32427 # Example (JavaScript):
32428 #
32429 # // ...
32430 #
32431 # var protoToCssColor = function(rgb_color) {
32432 # var redFrac = rgb_color.red || 0.0;
32433 # var greenFrac = rgb_color.green || 0.0;
32434 # var blueFrac = rgb_color.blue || 0.0;
32435 # var red = Math.floor(redFrac * 255);
32436 # var green = Math.floor(greenFrac * 255);
32437 # var blue = Math.floor(blueFrac * 255);
32438 #
32439 # if (!('alpha' in rgb_color)) {
32440 # return rgbToCssColor_(red, green, blue);
32441 # }
32442 #
32443 # var alphaFrac = rgb_color.alpha.value || 0.0;
32444 # var rgbParams = [red, green, blue].join(',');
32445 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
32446 # };
32447 #
32448 # var rgbToCssColor_ = function(red, green, blue) {
32449 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
32450 # var hexString = rgbNumber.toString(16);
32451 # var missingZeros = 6 - hexString.length;
32452 # var resultBuilder = ['#'];
32453 # for (var i = 0; i < missingZeros; i++) {
32454 # resultBuilder.push('0');
32455 # }
32456 # resultBuilder.push(hexString);
32457 # return resultBuilder.join('');
32458 # };
32459 #
32460 # // ...
32461 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
32462 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
32463 # the final pixel color is defined by the equation:
32464 #
32465 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
32466 #
32467 # This means that a value of 1.0 corresponds to a solid color, whereas
32468 # a value of 0.0 corresponds to a completely transparent color. This
32469 # uses a wrapper message rather than a simple float scalar so that it is
32470 # possible to distinguish between a default value and the value being unset.
32471 # If omitted, this color object is to be rendered as a solid color
32472 # (as if the alpha value had been explicitly given with a value of 1.0).
32473 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
32474 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
32475 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032476 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032477 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
32478 # Absent values indicate that the field isn't specified.
32479 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
32480 # for simplicity of conversion to/from color representations in various
32481 # languages over compactness; for example, the fields of this representation
32482 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
32483 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
32484 # method in iOS; and, with just a little work, it can be easily formatted into
32485 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32486 #
32487 # Example (Java):
32488 #
32489 # import com.google.type.Color;
32490 #
32491 # // ...
32492 # public static java.awt.Color fromProto(Color protocolor) {
32493 # float alpha = protocolor.hasAlpha()
32494 # ? protocolor.getAlpha().getValue()
32495 # : 1.0;
32496 #
32497 # return new java.awt.Color(
32498 # protocolor.getRed(),
32499 # protocolor.getGreen(),
32500 # protocolor.getBlue(),
32501 # alpha);
32502 # }
32503 #
32504 # public static Color toProto(java.awt.Color color) {
32505 # float red = (float) color.getRed();
32506 # float green = (float) color.getGreen();
32507 # float blue = (float) color.getBlue();
32508 # float denominator = 255.0;
32509 # Color.Builder resultBuilder =
32510 # Color
32511 # .newBuilder()
32512 # .setRed(red / denominator)
32513 # .setGreen(green / denominator)
32514 # .setBlue(blue / denominator);
32515 # int alpha = color.getAlpha();
32516 # if (alpha != 255) {
32517 # result.setAlpha(
32518 # FloatValue
32519 # .newBuilder()
32520 # .setValue(((float) alpha) / denominator)
32521 # .build());
32522 # }
32523 # return resultBuilder.build();
32524 # }
32525 # // ...
32526 #
32527 # Example (iOS / Obj-C):
32528 #
32529 # // ...
32530 # static UIColor* fromProto(Color* protocolor) {
32531 # float red = [protocolor red];
32532 # float green = [protocolor green];
32533 # float blue = [protocolor blue];
32534 # FloatValue* alpha_wrapper = [protocolor alpha];
32535 # float alpha = 1.0;
32536 # if (alpha_wrapper != nil) {
32537 # alpha = [alpha_wrapper value];
32538 # }
32539 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
32540 # }
32541 #
32542 # static Color* toProto(UIColor* color) {
32543 # CGFloat red, green, blue, alpha;
32544 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
32545 # return nil;
32546 # }
32547 # Color* result = [Color alloc] init];
32548 # [result setRed:red];
32549 # [result setGreen:green];
32550 # [result setBlue:blue];
32551 # if (alpha <= 0.9999) {
32552 # [result setAlpha:floatWrapperWithValue(alpha)];
32553 # }
32554 # [result autorelease];
32555 # return result;
32556 # }
32557 # // ...
32558 #
32559 # Example (JavaScript):
32560 #
32561 # // ...
32562 #
32563 # var protoToCssColor = function(rgb_color) {
32564 # var redFrac = rgb_color.red || 0.0;
32565 # var greenFrac = rgb_color.green || 0.0;
32566 # var blueFrac = rgb_color.blue || 0.0;
32567 # var red = Math.floor(redFrac * 255);
32568 # var green = Math.floor(greenFrac * 255);
32569 # var blue = Math.floor(blueFrac * 255);
32570 #
32571 # if (!('alpha' in rgb_color)) {
32572 # return rgbToCssColor_(red, green, blue);
32573 # }
32574 #
32575 # var alphaFrac = rgb_color.alpha.value || 0.0;
32576 # var rgbParams = [red, green, blue].join(',');
32577 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
32578 # };
32579 #
32580 # var rgbToCssColor_ = function(red, green, blue) {
32581 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
32582 # var hexString = rgbNumber.toString(16);
32583 # var missingZeros = 6 - hexString.length;
32584 # var resultBuilder = ['#'];
32585 # for (var i = 0; i < missingZeros; i++) {
32586 # resultBuilder.push('0');
32587 # }
32588 # resultBuilder.push(hexString);
32589 # return resultBuilder.join('');
32590 # };
32591 #
32592 # // ...
32593 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
32594 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
32595 # the final pixel color is defined by the equation:
32596 #
32597 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
32598 #
32599 # This means that a value of 1.0 corresponds to a solid color, whereas
32600 # a value of 0.0 corresponds to a completely transparent color. This
32601 # uses a wrapper message rather than a simple float scalar so that it is
32602 # possible to distinguish between a default value and the value being unset.
32603 # If omitted, this color object is to be rendered as a solid color
32604 # (as if the alpha value had been explicitly given with a value of 1.0).
32605 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
32606 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
32607 },
32608 "bold": True or False, # True if the text is bold.
32609 "strikethrough": True or False, # True if the text has a strikethrough.
32610 "fontFamily": "A String", # The font family.
32611 "fontSize": 42, # The size of the font.
32612 "italic": True or False, # True if the text is italicized.
32613 "underline": True or False, # True if the text is underlined.
32614 },
32615 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
32616 "borders": { # The borders of the cell. # The borders of the cell.
32617 "top": { # A border along a cell. # The top border of the cell.
32618 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
32619 # for simplicity of conversion to/from color representations in various
32620 # languages over compactness; for example, the fields of this representation
32621 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
32622 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
32623 # method in iOS; and, with just a little work, it can be easily formatted into
32624 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32625 #
32626 # Example (Java):
32627 #
32628 # import com.google.type.Color;
32629 #
32630 # // ...
32631 # public static java.awt.Color fromProto(Color protocolor) {
32632 # float alpha = protocolor.hasAlpha()
32633 # ? protocolor.getAlpha().getValue()
32634 # : 1.0;
32635 #
32636 # return new java.awt.Color(
32637 # protocolor.getRed(),
32638 # protocolor.getGreen(),
32639 # protocolor.getBlue(),
32640 # alpha);
32641 # }
32642 #
32643 # public static Color toProto(java.awt.Color color) {
32644 # float red = (float) color.getRed();
32645 # float green = (float) color.getGreen();
32646 # float blue = (float) color.getBlue();
32647 # float denominator = 255.0;
32648 # Color.Builder resultBuilder =
32649 # Color
32650 # .newBuilder()
32651 # .setRed(red / denominator)
32652 # .setGreen(green / denominator)
32653 # .setBlue(blue / denominator);
32654 # int alpha = color.getAlpha();
32655 # if (alpha != 255) {
32656 # result.setAlpha(
32657 # FloatValue
32658 # .newBuilder()
32659 # .setValue(((float) alpha) / denominator)
32660 # .build());
32661 # }
32662 # return resultBuilder.build();
32663 # }
32664 # // ...
32665 #
32666 # Example (iOS / Obj-C):
32667 #
32668 # // ...
32669 # static UIColor* fromProto(Color* protocolor) {
32670 # float red = [protocolor red];
32671 # float green = [protocolor green];
32672 # float blue = [protocolor blue];
32673 # FloatValue* alpha_wrapper = [protocolor alpha];
32674 # float alpha = 1.0;
32675 # if (alpha_wrapper != nil) {
32676 # alpha = [alpha_wrapper value];
32677 # }
32678 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
32679 # }
32680 #
32681 # static Color* toProto(UIColor* color) {
32682 # CGFloat red, green, blue, alpha;
32683 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
32684 # return nil;
32685 # }
32686 # Color* result = [Color alloc] init];
32687 # [result setRed:red];
32688 # [result setGreen:green];
32689 # [result setBlue:blue];
32690 # if (alpha <= 0.9999) {
32691 # [result setAlpha:floatWrapperWithValue(alpha)];
32692 # }
32693 # [result autorelease];
32694 # return result;
32695 # }
32696 # // ...
32697 #
32698 # Example (JavaScript):
32699 #
32700 # // ...
32701 #
32702 # var protoToCssColor = function(rgb_color) {
32703 # var redFrac = rgb_color.red || 0.0;
32704 # var greenFrac = rgb_color.green || 0.0;
32705 # var blueFrac = rgb_color.blue || 0.0;
32706 # var red = Math.floor(redFrac * 255);
32707 # var green = Math.floor(greenFrac * 255);
32708 # var blue = Math.floor(blueFrac * 255);
32709 #
32710 # if (!('alpha' in rgb_color)) {
32711 # return rgbToCssColor_(red, green, blue);
32712 # }
32713 #
32714 # var alphaFrac = rgb_color.alpha.value || 0.0;
32715 # var rgbParams = [red, green, blue].join(',');
32716 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
32717 # };
32718 #
32719 # var rgbToCssColor_ = function(red, green, blue) {
32720 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
32721 # var hexString = rgbNumber.toString(16);
32722 # var missingZeros = 6 - hexString.length;
32723 # var resultBuilder = ['#'];
32724 # for (var i = 0; i < missingZeros; i++) {
32725 # resultBuilder.push('0');
32726 # }
32727 # resultBuilder.push(hexString);
32728 # return resultBuilder.join('');
32729 # };
32730 #
32731 # // ...
32732 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
32733 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
32734 # the final pixel color is defined by the equation:
32735 #
32736 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
32737 #
32738 # This means that a value of 1.0 corresponds to a solid color, whereas
32739 # a value of 0.0 corresponds to a completely transparent color. This
32740 # uses a wrapper message rather than a simple float scalar so that it is
32741 # possible to distinguish between a default value and the value being unset.
32742 # If omitted, this color object is to be rendered as a solid color
32743 # (as if the alpha value had been explicitly given with a value of 1.0).
32744 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
32745 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
32746 },
32747 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032748 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032749 "style": "A String", # The style of the border.
32750 },
32751 "right": { # A border along a cell. # The right border of the cell.
32752 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
32753 # for simplicity of conversion to/from color representations in various
32754 # languages over compactness; for example, the fields of this representation
32755 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
32756 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
32757 # method in iOS; and, with just a little work, it can be easily formatted into
32758 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32759 #
32760 # Example (Java):
32761 #
32762 # import com.google.type.Color;
32763 #
32764 # // ...
32765 # public static java.awt.Color fromProto(Color protocolor) {
32766 # float alpha = protocolor.hasAlpha()
32767 # ? protocolor.getAlpha().getValue()
32768 # : 1.0;
32769 #
32770 # return new java.awt.Color(
32771 # protocolor.getRed(),
32772 # protocolor.getGreen(),
32773 # protocolor.getBlue(),
32774 # alpha);
32775 # }
32776 #
32777 # public static Color toProto(java.awt.Color color) {
32778 # float red = (float) color.getRed();
32779 # float green = (float) color.getGreen();
32780 # float blue = (float) color.getBlue();
32781 # float denominator = 255.0;
32782 # Color.Builder resultBuilder =
32783 # Color
32784 # .newBuilder()
32785 # .setRed(red / denominator)
32786 # .setGreen(green / denominator)
32787 # .setBlue(blue / denominator);
32788 # int alpha = color.getAlpha();
32789 # if (alpha != 255) {
32790 # result.setAlpha(
32791 # FloatValue
32792 # .newBuilder()
32793 # .setValue(((float) alpha) / denominator)
32794 # .build());
32795 # }
32796 # return resultBuilder.build();
32797 # }
32798 # // ...
32799 #
32800 # Example (iOS / Obj-C):
32801 #
32802 # // ...
32803 # static UIColor* fromProto(Color* protocolor) {
32804 # float red = [protocolor red];
32805 # float green = [protocolor green];
32806 # float blue = [protocolor blue];
32807 # FloatValue* alpha_wrapper = [protocolor alpha];
32808 # float alpha = 1.0;
32809 # if (alpha_wrapper != nil) {
32810 # alpha = [alpha_wrapper value];
32811 # }
32812 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
32813 # }
32814 #
32815 # static Color* toProto(UIColor* color) {
32816 # CGFloat red, green, blue, alpha;
32817 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
32818 # return nil;
32819 # }
32820 # Color* result = [Color alloc] init];
32821 # [result setRed:red];
32822 # [result setGreen:green];
32823 # [result setBlue:blue];
32824 # if (alpha <= 0.9999) {
32825 # [result setAlpha:floatWrapperWithValue(alpha)];
32826 # }
32827 # [result autorelease];
32828 # return result;
32829 # }
32830 # // ...
32831 #
32832 # Example (JavaScript):
32833 #
32834 # // ...
32835 #
32836 # var protoToCssColor = function(rgb_color) {
32837 # var redFrac = rgb_color.red || 0.0;
32838 # var greenFrac = rgb_color.green || 0.0;
32839 # var blueFrac = rgb_color.blue || 0.0;
32840 # var red = Math.floor(redFrac * 255);
32841 # var green = Math.floor(greenFrac * 255);
32842 # var blue = Math.floor(blueFrac * 255);
32843 #
32844 # if (!('alpha' in rgb_color)) {
32845 # return rgbToCssColor_(red, green, blue);
32846 # }
32847 #
32848 # var alphaFrac = rgb_color.alpha.value || 0.0;
32849 # var rgbParams = [red, green, blue].join(',');
32850 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
32851 # };
32852 #
32853 # var rgbToCssColor_ = function(red, green, blue) {
32854 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
32855 # var hexString = rgbNumber.toString(16);
32856 # var missingZeros = 6 - hexString.length;
32857 # var resultBuilder = ['#'];
32858 # for (var i = 0; i < missingZeros; i++) {
32859 # resultBuilder.push('0');
32860 # }
32861 # resultBuilder.push(hexString);
32862 # return resultBuilder.join('');
32863 # };
32864 #
32865 # // ...
32866 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
32867 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
32868 # the final pixel color is defined by the equation:
32869 #
32870 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
32871 #
32872 # This means that a value of 1.0 corresponds to a solid color, whereas
32873 # a value of 0.0 corresponds to a completely transparent color. This
32874 # uses a wrapper message rather than a simple float scalar so that it is
32875 # possible to distinguish between a default value and the value being unset.
32876 # If omitted, this color object is to be rendered as a solid color
32877 # (as if the alpha value had been explicitly given with a value of 1.0).
32878 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
32879 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
32880 },
32881 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032882 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032883 "style": "A String", # The style of the border.
32884 },
32885 "bottom": { # A border along a cell. # The bottom border of the cell.
32886 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
32887 # for simplicity of conversion to/from color representations in various
32888 # languages over compactness; for example, the fields of this representation
32889 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
32890 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
32891 # method in iOS; and, with just a little work, it can be easily formatted into
32892 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32893 #
32894 # Example (Java):
32895 #
32896 # import com.google.type.Color;
32897 #
32898 # // ...
32899 # public static java.awt.Color fromProto(Color protocolor) {
32900 # float alpha = protocolor.hasAlpha()
32901 # ? protocolor.getAlpha().getValue()
32902 # : 1.0;
32903 #
32904 # return new java.awt.Color(
32905 # protocolor.getRed(),
32906 # protocolor.getGreen(),
32907 # protocolor.getBlue(),
32908 # alpha);
32909 # }
32910 #
32911 # public static Color toProto(java.awt.Color color) {
32912 # float red = (float) color.getRed();
32913 # float green = (float) color.getGreen();
32914 # float blue = (float) color.getBlue();
32915 # float denominator = 255.0;
32916 # Color.Builder resultBuilder =
32917 # Color
32918 # .newBuilder()
32919 # .setRed(red / denominator)
32920 # .setGreen(green / denominator)
32921 # .setBlue(blue / denominator);
32922 # int alpha = color.getAlpha();
32923 # if (alpha != 255) {
32924 # result.setAlpha(
32925 # FloatValue
32926 # .newBuilder()
32927 # .setValue(((float) alpha) / denominator)
32928 # .build());
32929 # }
32930 # return resultBuilder.build();
32931 # }
32932 # // ...
32933 #
32934 # Example (iOS / Obj-C):
32935 #
32936 # // ...
32937 # static UIColor* fromProto(Color* protocolor) {
32938 # float red = [protocolor red];
32939 # float green = [protocolor green];
32940 # float blue = [protocolor blue];
32941 # FloatValue* alpha_wrapper = [protocolor alpha];
32942 # float alpha = 1.0;
32943 # if (alpha_wrapper != nil) {
32944 # alpha = [alpha_wrapper value];
32945 # }
32946 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
32947 # }
32948 #
32949 # static Color* toProto(UIColor* color) {
32950 # CGFloat red, green, blue, alpha;
32951 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
32952 # return nil;
32953 # }
32954 # Color* result = [Color alloc] init];
32955 # [result setRed:red];
32956 # [result setGreen:green];
32957 # [result setBlue:blue];
32958 # if (alpha <= 0.9999) {
32959 # [result setAlpha:floatWrapperWithValue(alpha)];
32960 # }
32961 # [result autorelease];
32962 # return result;
32963 # }
32964 # // ...
32965 #
32966 # Example (JavaScript):
32967 #
32968 # // ...
32969 #
32970 # var protoToCssColor = function(rgb_color) {
32971 # var redFrac = rgb_color.red || 0.0;
32972 # var greenFrac = rgb_color.green || 0.0;
32973 # var blueFrac = rgb_color.blue || 0.0;
32974 # var red = Math.floor(redFrac * 255);
32975 # var green = Math.floor(greenFrac * 255);
32976 # var blue = Math.floor(blueFrac * 255);
32977 #
32978 # if (!('alpha' in rgb_color)) {
32979 # return rgbToCssColor_(red, green, blue);
32980 # }
32981 #
32982 # var alphaFrac = rgb_color.alpha.value || 0.0;
32983 # var rgbParams = [red, green, blue].join(',');
32984 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
32985 # };
32986 #
32987 # var rgbToCssColor_ = function(red, green, blue) {
32988 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
32989 # var hexString = rgbNumber.toString(16);
32990 # var missingZeros = 6 - hexString.length;
32991 # var resultBuilder = ['#'];
32992 # for (var i = 0; i < missingZeros; i++) {
32993 # resultBuilder.push('0');
32994 # }
32995 # resultBuilder.push(hexString);
32996 # return resultBuilder.join('');
32997 # };
32998 #
32999 # // ...
33000 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33001 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33002 # the final pixel color is defined by the equation:
33003 #
33004 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33005 #
33006 # This means that a value of 1.0 corresponds to a solid color, whereas
33007 # a value of 0.0 corresponds to a completely transparent color. This
33008 # uses a wrapper message rather than a simple float scalar so that it is
33009 # possible to distinguish between a default value and the value being unset.
33010 # If omitted, this color object is to be rendered as a solid color
33011 # (as if the alpha value had been explicitly given with a value of 1.0).
33012 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33013 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33014 },
33015 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033016 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033017 "style": "A String", # The style of the border.
33018 },
33019 "left": { # A border along a cell. # The left border of the cell.
33020 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33021 # for simplicity of conversion to/from color representations in various
33022 # languages over compactness; for example, the fields of this representation
33023 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33024 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33025 # method in iOS; and, with just a little work, it can be easily formatted into
33026 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33027 #
33028 # Example (Java):
33029 #
33030 # import com.google.type.Color;
33031 #
33032 # // ...
33033 # public static java.awt.Color fromProto(Color protocolor) {
33034 # float alpha = protocolor.hasAlpha()
33035 # ? protocolor.getAlpha().getValue()
33036 # : 1.0;
33037 #
33038 # return new java.awt.Color(
33039 # protocolor.getRed(),
33040 # protocolor.getGreen(),
33041 # protocolor.getBlue(),
33042 # alpha);
33043 # }
33044 #
33045 # public static Color toProto(java.awt.Color color) {
33046 # float red = (float) color.getRed();
33047 # float green = (float) color.getGreen();
33048 # float blue = (float) color.getBlue();
33049 # float denominator = 255.0;
33050 # Color.Builder resultBuilder =
33051 # Color
33052 # .newBuilder()
33053 # .setRed(red / denominator)
33054 # .setGreen(green / denominator)
33055 # .setBlue(blue / denominator);
33056 # int alpha = color.getAlpha();
33057 # if (alpha != 255) {
33058 # result.setAlpha(
33059 # FloatValue
33060 # .newBuilder()
33061 # .setValue(((float) alpha) / denominator)
33062 # .build());
33063 # }
33064 # return resultBuilder.build();
33065 # }
33066 # // ...
33067 #
33068 # Example (iOS / Obj-C):
33069 #
33070 # // ...
33071 # static UIColor* fromProto(Color* protocolor) {
33072 # float red = [protocolor red];
33073 # float green = [protocolor green];
33074 # float blue = [protocolor blue];
33075 # FloatValue* alpha_wrapper = [protocolor alpha];
33076 # float alpha = 1.0;
33077 # if (alpha_wrapper != nil) {
33078 # alpha = [alpha_wrapper value];
33079 # }
33080 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33081 # }
33082 #
33083 # static Color* toProto(UIColor* color) {
33084 # CGFloat red, green, blue, alpha;
33085 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33086 # return nil;
33087 # }
33088 # Color* result = [Color alloc] init];
33089 # [result setRed:red];
33090 # [result setGreen:green];
33091 # [result setBlue:blue];
33092 # if (alpha <= 0.9999) {
33093 # [result setAlpha:floatWrapperWithValue(alpha)];
33094 # }
33095 # [result autorelease];
33096 # return result;
33097 # }
33098 # // ...
33099 #
33100 # Example (JavaScript):
33101 #
33102 # // ...
33103 #
33104 # var protoToCssColor = function(rgb_color) {
33105 # var redFrac = rgb_color.red || 0.0;
33106 # var greenFrac = rgb_color.green || 0.0;
33107 # var blueFrac = rgb_color.blue || 0.0;
33108 # var red = Math.floor(redFrac * 255);
33109 # var green = Math.floor(greenFrac * 255);
33110 # var blue = Math.floor(blueFrac * 255);
33111 #
33112 # if (!('alpha' in rgb_color)) {
33113 # return rgbToCssColor_(red, green, blue);
33114 # }
33115 #
33116 # var alphaFrac = rgb_color.alpha.value || 0.0;
33117 # var rgbParams = [red, green, blue].join(',');
33118 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33119 # };
33120 #
33121 # var rgbToCssColor_ = function(red, green, blue) {
33122 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33123 # var hexString = rgbNumber.toString(16);
33124 # var missingZeros = 6 - hexString.length;
33125 # var resultBuilder = ['#'];
33126 # for (var i = 0; i < missingZeros; i++) {
33127 # resultBuilder.push('0');
33128 # }
33129 # resultBuilder.push(hexString);
33130 # return resultBuilder.join('');
33131 # };
33132 #
33133 # // ...
33134 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33135 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33136 # the final pixel color is defined by the equation:
33137 #
33138 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33139 #
33140 # This means that a value of 1.0 corresponds to a solid color, whereas
33141 # a value of 0.0 corresponds to a completely transparent color. This
33142 # uses a wrapper message rather than a simple float scalar so that it is
33143 # possible to distinguish between a default value and the value being unset.
33144 # If omitted, this color object is to be rendered as a solid color
33145 # (as if the alpha value had been explicitly given with a value of 1.0).
33146 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33147 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33148 },
33149 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033150 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033151 "style": "A String", # The style of the border.
33152 },
33153 },
33154 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
33155 },
33156 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
33157 #
33158 # When writing, the new format will be merged with the existing format.
33159 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033160 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
33161 # the user's locale will be used if necessary for the given type.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033162 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033163 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033164 },
33165 "textDirection": "A String", # The direction of the text in the cell.
33166 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
33167 # When updating padding, every field must be specified.
33168 "top": 42, # The top padding of the cell.
33169 "right": 42, # The right padding of the cell.
33170 "bottom": 42, # The bottom padding of the cell.
33171 "left": 42, # The left padding of the cell.
33172 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033173 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033174 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
33175 # for simplicity of conversion to/from color representations in various
33176 # languages over compactness; for example, the fields of this representation
33177 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33178 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33179 # method in iOS; and, with just a little work, it can be easily formatted into
33180 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33181 #
33182 # Example (Java):
33183 #
33184 # import com.google.type.Color;
33185 #
33186 # // ...
33187 # public static java.awt.Color fromProto(Color protocolor) {
33188 # float alpha = protocolor.hasAlpha()
33189 # ? protocolor.getAlpha().getValue()
33190 # : 1.0;
33191 #
33192 # return new java.awt.Color(
33193 # protocolor.getRed(),
33194 # protocolor.getGreen(),
33195 # protocolor.getBlue(),
33196 # alpha);
33197 # }
33198 #
33199 # public static Color toProto(java.awt.Color color) {
33200 # float red = (float) color.getRed();
33201 # float green = (float) color.getGreen();
33202 # float blue = (float) color.getBlue();
33203 # float denominator = 255.0;
33204 # Color.Builder resultBuilder =
33205 # Color
33206 # .newBuilder()
33207 # .setRed(red / denominator)
33208 # .setGreen(green / denominator)
33209 # .setBlue(blue / denominator);
33210 # int alpha = color.getAlpha();
33211 # if (alpha != 255) {
33212 # result.setAlpha(
33213 # FloatValue
33214 # .newBuilder()
33215 # .setValue(((float) alpha) / denominator)
33216 # .build());
33217 # }
33218 # return resultBuilder.build();
33219 # }
33220 # // ...
33221 #
33222 # Example (iOS / Obj-C):
33223 #
33224 # // ...
33225 # static UIColor* fromProto(Color* protocolor) {
33226 # float red = [protocolor red];
33227 # float green = [protocolor green];
33228 # float blue = [protocolor blue];
33229 # FloatValue* alpha_wrapper = [protocolor alpha];
33230 # float alpha = 1.0;
33231 # if (alpha_wrapper != nil) {
33232 # alpha = [alpha_wrapper value];
33233 # }
33234 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33235 # }
33236 #
33237 # static Color* toProto(UIColor* color) {
33238 # CGFloat red, green, blue, alpha;
33239 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33240 # return nil;
33241 # }
33242 # Color* result = [Color alloc] init];
33243 # [result setRed:red];
33244 # [result setGreen:green];
33245 # [result setBlue:blue];
33246 # if (alpha <= 0.9999) {
33247 # [result setAlpha:floatWrapperWithValue(alpha)];
33248 # }
33249 # [result autorelease];
33250 # return result;
33251 # }
33252 # // ...
33253 #
33254 # Example (JavaScript):
33255 #
33256 # // ...
33257 #
33258 # var protoToCssColor = function(rgb_color) {
33259 # var redFrac = rgb_color.red || 0.0;
33260 # var greenFrac = rgb_color.green || 0.0;
33261 # var blueFrac = rgb_color.blue || 0.0;
33262 # var red = Math.floor(redFrac * 255);
33263 # var green = Math.floor(greenFrac * 255);
33264 # var blue = Math.floor(blueFrac * 255);
33265 #
33266 # if (!('alpha' in rgb_color)) {
33267 # return rgbToCssColor_(red, green, blue);
33268 # }
33269 #
33270 # var alphaFrac = rgb_color.alpha.value || 0.0;
33271 # var rgbParams = [red, green, blue].join(',');
33272 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33273 # };
33274 #
33275 # var rgbToCssColor_ = function(red, green, blue) {
33276 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33277 # var hexString = rgbNumber.toString(16);
33278 # var missingZeros = 6 - hexString.length;
33279 # var resultBuilder = ['#'];
33280 # for (var i = 0; i < missingZeros; i++) {
33281 # resultBuilder.push('0');
33282 # }
33283 # resultBuilder.push(hexString);
33284 # return resultBuilder.join('');
33285 # };
33286 #
33287 # // ...
33288 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33289 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33290 # the final pixel color is defined by the equation:
33291 #
33292 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33293 #
33294 # This means that a value of 1.0 corresponds to a solid color, whereas
33295 # a value of 0.0 corresponds to a completely transparent color. This
33296 # uses a wrapper message rather than a simple float scalar so that it is
33297 # possible to distinguish between a default value and the value being unset.
33298 # If omitted, this color object is to be rendered as a solid color
33299 # (as if the alpha value had been explicitly given with a value of 1.0).
33300 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33301 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33302 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033303 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033304 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
33305 # Absent values indicate that the field isn't specified.
33306 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
33307 # for simplicity of conversion to/from color representations in various
33308 # languages over compactness; for example, the fields of this representation
33309 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33310 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33311 # method in iOS; and, with just a little work, it can be easily formatted into
33312 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33313 #
33314 # Example (Java):
33315 #
33316 # import com.google.type.Color;
33317 #
33318 # // ...
33319 # public static java.awt.Color fromProto(Color protocolor) {
33320 # float alpha = protocolor.hasAlpha()
33321 # ? protocolor.getAlpha().getValue()
33322 # : 1.0;
33323 #
33324 # return new java.awt.Color(
33325 # protocolor.getRed(),
33326 # protocolor.getGreen(),
33327 # protocolor.getBlue(),
33328 # alpha);
33329 # }
33330 #
33331 # public static Color toProto(java.awt.Color color) {
33332 # float red = (float) color.getRed();
33333 # float green = (float) color.getGreen();
33334 # float blue = (float) color.getBlue();
33335 # float denominator = 255.0;
33336 # Color.Builder resultBuilder =
33337 # Color
33338 # .newBuilder()
33339 # .setRed(red / denominator)
33340 # .setGreen(green / denominator)
33341 # .setBlue(blue / denominator);
33342 # int alpha = color.getAlpha();
33343 # if (alpha != 255) {
33344 # result.setAlpha(
33345 # FloatValue
33346 # .newBuilder()
33347 # .setValue(((float) alpha) / denominator)
33348 # .build());
33349 # }
33350 # return resultBuilder.build();
33351 # }
33352 # // ...
33353 #
33354 # Example (iOS / Obj-C):
33355 #
33356 # // ...
33357 # static UIColor* fromProto(Color* protocolor) {
33358 # float red = [protocolor red];
33359 # float green = [protocolor green];
33360 # float blue = [protocolor blue];
33361 # FloatValue* alpha_wrapper = [protocolor alpha];
33362 # float alpha = 1.0;
33363 # if (alpha_wrapper != nil) {
33364 # alpha = [alpha_wrapper value];
33365 # }
33366 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33367 # }
33368 #
33369 # static Color* toProto(UIColor* color) {
33370 # CGFloat red, green, blue, alpha;
33371 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33372 # return nil;
33373 # }
33374 # Color* result = [Color alloc] init];
33375 # [result setRed:red];
33376 # [result setGreen:green];
33377 # [result setBlue:blue];
33378 # if (alpha <= 0.9999) {
33379 # [result setAlpha:floatWrapperWithValue(alpha)];
33380 # }
33381 # [result autorelease];
33382 # return result;
33383 # }
33384 # // ...
33385 #
33386 # Example (JavaScript):
33387 #
33388 # // ...
33389 #
33390 # var protoToCssColor = function(rgb_color) {
33391 # var redFrac = rgb_color.red || 0.0;
33392 # var greenFrac = rgb_color.green || 0.0;
33393 # var blueFrac = rgb_color.blue || 0.0;
33394 # var red = Math.floor(redFrac * 255);
33395 # var green = Math.floor(greenFrac * 255);
33396 # var blue = Math.floor(blueFrac * 255);
33397 #
33398 # if (!('alpha' in rgb_color)) {
33399 # return rgbToCssColor_(red, green, blue);
33400 # }
33401 #
33402 # var alphaFrac = rgb_color.alpha.value || 0.0;
33403 # var rgbParams = [red, green, blue].join(',');
33404 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33405 # };
33406 #
33407 # var rgbToCssColor_ = function(red, green, blue) {
33408 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33409 # var hexString = rgbNumber.toString(16);
33410 # var missingZeros = 6 - hexString.length;
33411 # var resultBuilder = ['#'];
33412 # for (var i = 0; i < missingZeros; i++) {
33413 # resultBuilder.push('0');
33414 # }
33415 # resultBuilder.push(hexString);
33416 # return resultBuilder.join('');
33417 # };
33418 #
33419 # // ...
33420 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33421 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33422 # the final pixel color is defined by the equation:
33423 #
33424 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33425 #
33426 # This means that a value of 1.0 corresponds to a solid color, whereas
33427 # a value of 0.0 corresponds to a completely transparent color. This
33428 # uses a wrapper message rather than a simple float scalar so that it is
33429 # possible to distinguish between a default value and the value being unset.
33430 # If omitted, this color object is to be rendered as a solid color
33431 # (as if the alpha value had been explicitly given with a value of 1.0).
33432 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33433 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33434 },
33435 "bold": True or False, # True if the text is bold.
33436 "strikethrough": True or False, # True if the text has a strikethrough.
33437 "fontFamily": "A String", # The font family.
33438 "fontSize": 42, # The size of the font.
33439 "italic": True or False, # True if the text is italicized.
33440 "underline": True or False, # True if the text is underlined.
33441 },
33442 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
33443 "borders": { # The borders of the cell. # The borders of the cell.
33444 "top": { # A border along a cell. # The top border of the cell.
33445 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33446 # for simplicity of conversion to/from color representations in various
33447 # languages over compactness; for example, the fields of this representation
33448 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33449 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33450 # method in iOS; and, with just a little work, it can be easily formatted into
33451 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33452 #
33453 # Example (Java):
33454 #
33455 # import com.google.type.Color;
33456 #
33457 # // ...
33458 # public static java.awt.Color fromProto(Color protocolor) {
33459 # float alpha = protocolor.hasAlpha()
33460 # ? protocolor.getAlpha().getValue()
33461 # : 1.0;
33462 #
33463 # return new java.awt.Color(
33464 # protocolor.getRed(),
33465 # protocolor.getGreen(),
33466 # protocolor.getBlue(),
33467 # alpha);
33468 # }
33469 #
33470 # public static Color toProto(java.awt.Color color) {
33471 # float red = (float) color.getRed();
33472 # float green = (float) color.getGreen();
33473 # float blue = (float) color.getBlue();
33474 # float denominator = 255.0;
33475 # Color.Builder resultBuilder =
33476 # Color
33477 # .newBuilder()
33478 # .setRed(red / denominator)
33479 # .setGreen(green / denominator)
33480 # .setBlue(blue / denominator);
33481 # int alpha = color.getAlpha();
33482 # if (alpha != 255) {
33483 # result.setAlpha(
33484 # FloatValue
33485 # .newBuilder()
33486 # .setValue(((float) alpha) / denominator)
33487 # .build());
33488 # }
33489 # return resultBuilder.build();
33490 # }
33491 # // ...
33492 #
33493 # Example (iOS / Obj-C):
33494 #
33495 # // ...
33496 # static UIColor* fromProto(Color* protocolor) {
33497 # float red = [protocolor red];
33498 # float green = [protocolor green];
33499 # float blue = [protocolor blue];
33500 # FloatValue* alpha_wrapper = [protocolor alpha];
33501 # float alpha = 1.0;
33502 # if (alpha_wrapper != nil) {
33503 # alpha = [alpha_wrapper value];
33504 # }
33505 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33506 # }
33507 #
33508 # static Color* toProto(UIColor* color) {
33509 # CGFloat red, green, blue, alpha;
33510 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33511 # return nil;
33512 # }
33513 # Color* result = [Color alloc] init];
33514 # [result setRed:red];
33515 # [result setGreen:green];
33516 # [result setBlue:blue];
33517 # if (alpha <= 0.9999) {
33518 # [result setAlpha:floatWrapperWithValue(alpha)];
33519 # }
33520 # [result autorelease];
33521 # return result;
33522 # }
33523 # // ...
33524 #
33525 # Example (JavaScript):
33526 #
33527 # // ...
33528 #
33529 # var protoToCssColor = function(rgb_color) {
33530 # var redFrac = rgb_color.red || 0.0;
33531 # var greenFrac = rgb_color.green || 0.0;
33532 # var blueFrac = rgb_color.blue || 0.0;
33533 # var red = Math.floor(redFrac * 255);
33534 # var green = Math.floor(greenFrac * 255);
33535 # var blue = Math.floor(blueFrac * 255);
33536 #
33537 # if (!('alpha' in rgb_color)) {
33538 # return rgbToCssColor_(red, green, blue);
33539 # }
33540 #
33541 # var alphaFrac = rgb_color.alpha.value || 0.0;
33542 # var rgbParams = [red, green, blue].join(',');
33543 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33544 # };
33545 #
33546 # var rgbToCssColor_ = function(red, green, blue) {
33547 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33548 # var hexString = rgbNumber.toString(16);
33549 # var missingZeros = 6 - hexString.length;
33550 # var resultBuilder = ['#'];
33551 # for (var i = 0; i < missingZeros; i++) {
33552 # resultBuilder.push('0');
33553 # }
33554 # resultBuilder.push(hexString);
33555 # return resultBuilder.join('');
33556 # };
33557 #
33558 # // ...
33559 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33560 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33561 # the final pixel color is defined by the equation:
33562 #
33563 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33564 #
33565 # This means that a value of 1.0 corresponds to a solid color, whereas
33566 # a value of 0.0 corresponds to a completely transparent color. This
33567 # uses a wrapper message rather than a simple float scalar so that it is
33568 # possible to distinguish between a default value and the value being unset.
33569 # If omitted, this color object is to be rendered as a solid color
33570 # (as if the alpha value had been explicitly given with a value of 1.0).
33571 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33572 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33573 },
33574 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033575 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033576 "style": "A String", # The style of the border.
33577 },
33578 "right": { # A border along a cell. # The right border of the cell.
33579 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33580 # for simplicity of conversion to/from color representations in various
33581 # languages over compactness; for example, the fields of this representation
33582 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33583 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33584 # method in iOS; and, with just a little work, it can be easily formatted into
33585 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33586 #
33587 # Example (Java):
33588 #
33589 # import com.google.type.Color;
33590 #
33591 # // ...
33592 # public static java.awt.Color fromProto(Color protocolor) {
33593 # float alpha = protocolor.hasAlpha()
33594 # ? protocolor.getAlpha().getValue()
33595 # : 1.0;
33596 #
33597 # return new java.awt.Color(
33598 # protocolor.getRed(),
33599 # protocolor.getGreen(),
33600 # protocolor.getBlue(),
33601 # alpha);
33602 # }
33603 #
33604 # public static Color toProto(java.awt.Color color) {
33605 # float red = (float) color.getRed();
33606 # float green = (float) color.getGreen();
33607 # float blue = (float) color.getBlue();
33608 # float denominator = 255.0;
33609 # Color.Builder resultBuilder =
33610 # Color
33611 # .newBuilder()
33612 # .setRed(red / denominator)
33613 # .setGreen(green / denominator)
33614 # .setBlue(blue / denominator);
33615 # int alpha = color.getAlpha();
33616 # if (alpha != 255) {
33617 # result.setAlpha(
33618 # FloatValue
33619 # .newBuilder()
33620 # .setValue(((float) alpha) / denominator)
33621 # .build());
33622 # }
33623 # return resultBuilder.build();
33624 # }
33625 # // ...
33626 #
33627 # Example (iOS / Obj-C):
33628 #
33629 # // ...
33630 # static UIColor* fromProto(Color* protocolor) {
33631 # float red = [protocolor red];
33632 # float green = [protocolor green];
33633 # float blue = [protocolor blue];
33634 # FloatValue* alpha_wrapper = [protocolor alpha];
33635 # float alpha = 1.0;
33636 # if (alpha_wrapper != nil) {
33637 # alpha = [alpha_wrapper value];
33638 # }
33639 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33640 # }
33641 #
33642 # static Color* toProto(UIColor* color) {
33643 # CGFloat red, green, blue, alpha;
33644 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33645 # return nil;
33646 # }
33647 # Color* result = [Color alloc] init];
33648 # [result setRed:red];
33649 # [result setGreen:green];
33650 # [result setBlue:blue];
33651 # if (alpha <= 0.9999) {
33652 # [result setAlpha:floatWrapperWithValue(alpha)];
33653 # }
33654 # [result autorelease];
33655 # return result;
33656 # }
33657 # // ...
33658 #
33659 # Example (JavaScript):
33660 #
33661 # // ...
33662 #
33663 # var protoToCssColor = function(rgb_color) {
33664 # var redFrac = rgb_color.red || 0.0;
33665 # var greenFrac = rgb_color.green || 0.0;
33666 # var blueFrac = rgb_color.blue || 0.0;
33667 # var red = Math.floor(redFrac * 255);
33668 # var green = Math.floor(greenFrac * 255);
33669 # var blue = Math.floor(blueFrac * 255);
33670 #
33671 # if (!('alpha' in rgb_color)) {
33672 # return rgbToCssColor_(red, green, blue);
33673 # }
33674 #
33675 # var alphaFrac = rgb_color.alpha.value || 0.0;
33676 # var rgbParams = [red, green, blue].join(',');
33677 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33678 # };
33679 #
33680 # var rgbToCssColor_ = function(red, green, blue) {
33681 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33682 # var hexString = rgbNumber.toString(16);
33683 # var missingZeros = 6 - hexString.length;
33684 # var resultBuilder = ['#'];
33685 # for (var i = 0; i < missingZeros; i++) {
33686 # resultBuilder.push('0');
33687 # }
33688 # resultBuilder.push(hexString);
33689 # return resultBuilder.join('');
33690 # };
33691 #
33692 # // ...
33693 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33694 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33695 # the final pixel color is defined by the equation:
33696 #
33697 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33698 #
33699 # This means that a value of 1.0 corresponds to a solid color, whereas
33700 # a value of 0.0 corresponds to a completely transparent color. This
33701 # uses a wrapper message rather than a simple float scalar so that it is
33702 # possible to distinguish between a default value and the value being unset.
33703 # If omitted, this color object is to be rendered as a solid color
33704 # (as if the alpha value had been explicitly given with a value of 1.0).
33705 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33706 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33707 },
33708 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033709 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033710 "style": "A String", # The style of the border.
33711 },
33712 "bottom": { # A border along a cell. # The bottom border of the cell.
33713 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33714 # for simplicity of conversion to/from color representations in various
33715 # languages over compactness; for example, the fields of this representation
33716 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33717 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33718 # method in iOS; and, with just a little work, it can be easily formatted into
33719 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33720 #
33721 # Example (Java):
33722 #
33723 # import com.google.type.Color;
33724 #
33725 # // ...
33726 # public static java.awt.Color fromProto(Color protocolor) {
33727 # float alpha = protocolor.hasAlpha()
33728 # ? protocolor.getAlpha().getValue()
33729 # : 1.0;
33730 #
33731 # return new java.awt.Color(
33732 # protocolor.getRed(),
33733 # protocolor.getGreen(),
33734 # protocolor.getBlue(),
33735 # alpha);
33736 # }
33737 #
33738 # public static Color toProto(java.awt.Color color) {
33739 # float red = (float) color.getRed();
33740 # float green = (float) color.getGreen();
33741 # float blue = (float) color.getBlue();
33742 # float denominator = 255.0;
33743 # Color.Builder resultBuilder =
33744 # Color
33745 # .newBuilder()
33746 # .setRed(red / denominator)
33747 # .setGreen(green / denominator)
33748 # .setBlue(blue / denominator);
33749 # int alpha = color.getAlpha();
33750 # if (alpha != 255) {
33751 # result.setAlpha(
33752 # FloatValue
33753 # .newBuilder()
33754 # .setValue(((float) alpha) / denominator)
33755 # .build());
33756 # }
33757 # return resultBuilder.build();
33758 # }
33759 # // ...
33760 #
33761 # Example (iOS / Obj-C):
33762 #
33763 # // ...
33764 # static UIColor* fromProto(Color* protocolor) {
33765 # float red = [protocolor red];
33766 # float green = [protocolor green];
33767 # float blue = [protocolor blue];
33768 # FloatValue* alpha_wrapper = [protocolor alpha];
33769 # float alpha = 1.0;
33770 # if (alpha_wrapper != nil) {
33771 # alpha = [alpha_wrapper value];
33772 # }
33773 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33774 # }
33775 #
33776 # static Color* toProto(UIColor* color) {
33777 # CGFloat red, green, blue, alpha;
33778 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33779 # return nil;
33780 # }
33781 # Color* result = [Color alloc] init];
33782 # [result setRed:red];
33783 # [result setGreen:green];
33784 # [result setBlue:blue];
33785 # if (alpha <= 0.9999) {
33786 # [result setAlpha:floatWrapperWithValue(alpha)];
33787 # }
33788 # [result autorelease];
33789 # return result;
33790 # }
33791 # // ...
33792 #
33793 # Example (JavaScript):
33794 #
33795 # // ...
33796 #
33797 # var protoToCssColor = function(rgb_color) {
33798 # var redFrac = rgb_color.red || 0.0;
33799 # var greenFrac = rgb_color.green || 0.0;
33800 # var blueFrac = rgb_color.blue || 0.0;
33801 # var red = Math.floor(redFrac * 255);
33802 # var green = Math.floor(greenFrac * 255);
33803 # var blue = Math.floor(blueFrac * 255);
33804 #
33805 # if (!('alpha' in rgb_color)) {
33806 # return rgbToCssColor_(red, green, blue);
33807 # }
33808 #
33809 # var alphaFrac = rgb_color.alpha.value || 0.0;
33810 # var rgbParams = [red, green, blue].join(',');
33811 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33812 # };
33813 #
33814 # var rgbToCssColor_ = function(red, green, blue) {
33815 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33816 # var hexString = rgbNumber.toString(16);
33817 # var missingZeros = 6 - hexString.length;
33818 # var resultBuilder = ['#'];
33819 # for (var i = 0; i < missingZeros; i++) {
33820 # resultBuilder.push('0');
33821 # }
33822 # resultBuilder.push(hexString);
33823 # return resultBuilder.join('');
33824 # };
33825 #
33826 # // ...
33827 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33828 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33829 # the final pixel color is defined by the equation:
33830 #
33831 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33832 #
33833 # This means that a value of 1.0 corresponds to a solid color, whereas
33834 # a value of 0.0 corresponds to a completely transparent color. This
33835 # uses a wrapper message rather than a simple float scalar so that it is
33836 # possible to distinguish between a default value and the value being unset.
33837 # If omitted, this color object is to be rendered as a solid color
33838 # (as if the alpha value had been explicitly given with a value of 1.0).
33839 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33840 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33841 },
33842 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033843 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033844 "style": "A String", # The style of the border.
33845 },
33846 "left": { # A border along a cell. # The left border of the cell.
33847 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33848 # for simplicity of conversion to/from color representations in various
33849 # languages over compactness; for example, the fields of this representation
33850 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33851 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33852 # method in iOS; and, with just a little work, it can be easily formatted into
33853 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33854 #
33855 # Example (Java):
33856 #
33857 # import com.google.type.Color;
33858 #
33859 # // ...
33860 # public static java.awt.Color fromProto(Color protocolor) {
33861 # float alpha = protocolor.hasAlpha()
33862 # ? protocolor.getAlpha().getValue()
33863 # : 1.0;
33864 #
33865 # return new java.awt.Color(
33866 # protocolor.getRed(),
33867 # protocolor.getGreen(),
33868 # protocolor.getBlue(),
33869 # alpha);
33870 # }
33871 #
33872 # public static Color toProto(java.awt.Color color) {
33873 # float red = (float) color.getRed();
33874 # float green = (float) color.getGreen();
33875 # float blue = (float) color.getBlue();
33876 # float denominator = 255.0;
33877 # Color.Builder resultBuilder =
33878 # Color
33879 # .newBuilder()
33880 # .setRed(red / denominator)
33881 # .setGreen(green / denominator)
33882 # .setBlue(blue / denominator);
33883 # int alpha = color.getAlpha();
33884 # if (alpha != 255) {
33885 # result.setAlpha(
33886 # FloatValue
33887 # .newBuilder()
33888 # .setValue(((float) alpha) / denominator)
33889 # .build());
33890 # }
33891 # return resultBuilder.build();
33892 # }
33893 # // ...
33894 #
33895 # Example (iOS / Obj-C):
33896 #
33897 # // ...
33898 # static UIColor* fromProto(Color* protocolor) {
33899 # float red = [protocolor red];
33900 # float green = [protocolor green];
33901 # float blue = [protocolor blue];
33902 # FloatValue* alpha_wrapper = [protocolor alpha];
33903 # float alpha = 1.0;
33904 # if (alpha_wrapper != nil) {
33905 # alpha = [alpha_wrapper value];
33906 # }
33907 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33908 # }
33909 #
33910 # static Color* toProto(UIColor* color) {
33911 # CGFloat red, green, blue, alpha;
33912 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33913 # return nil;
33914 # }
33915 # Color* result = [Color alloc] init];
33916 # [result setRed:red];
33917 # [result setGreen:green];
33918 # [result setBlue:blue];
33919 # if (alpha <= 0.9999) {
33920 # [result setAlpha:floatWrapperWithValue(alpha)];
33921 # }
33922 # [result autorelease];
33923 # return result;
33924 # }
33925 # // ...
33926 #
33927 # Example (JavaScript):
33928 #
33929 # // ...
33930 #
33931 # var protoToCssColor = function(rgb_color) {
33932 # var redFrac = rgb_color.red || 0.0;
33933 # var greenFrac = rgb_color.green || 0.0;
33934 # var blueFrac = rgb_color.blue || 0.0;
33935 # var red = Math.floor(redFrac * 255);
33936 # var green = Math.floor(greenFrac * 255);
33937 # var blue = Math.floor(blueFrac * 255);
33938 #
33939 # if (!('alpha' in rgb_color)) {
33940 # return rgbToCssColor_(red, green, blue);
33941 # }
33942 #
33943 # var alphaFrac = rgb_color.alpha.value || 0.0;
33944 # var rgbParams = [red, green, blue].join(',');
33945 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33946 # };
33947 #
33948 # var rgbToCssColor_ = function(red, green, blue) {
33949 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33950 # var hexString = rgbNumber.toString(16);
33951 # var missingZeros = 6 - hexString.length;
33952 # var resultBuilder = ['#'];
33953 # for (var i = 0; i < missingZeros; i++) {
33954 # resultBuilder.push('0');
33955 # }
33956 # resultBuilder.push(hexString);
33957 # return resultBuilder.join('');
33958 # };
33959 #
33960 # // ...
33961 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33962 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33963 # the final pixel color is defined by the equation:
33964 #
33965 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33966 #
33967 # This means that a value of 1.0 corresponds to a solid color, whereas
33968 # a value of 0.0 corresponds to a completely transparent color. This
33969 # uses a wrapper message rather than a simple float scalar so that it is
33970 # possible to distinguish between a default value and the value being unset.
33971 # If omitted, this color object is to be rendered as a solid color
33972 # (as if the alpha value had been explicitly given with a value of 1.0).
33973 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33974 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33975 },
33976 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033977 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033978 "style": "A String", # The style of the border.
33979 },
33980 },
33981 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
33982 },
33983 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
33984 #
33985 # When writing, the new data validation rule will overwrite any prior rule.
33986 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
33987 # If true, "List" conditions will show a dropdown.
33988 "strict": True or False, # True if invalid data should be rejected.
33989 "inputMessage": "A String", # A message to show the user when adding data to the cell.
33990 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
33991 # BooleanConditions are used by conditional formatting,
33992 # data validation, and the criteria in filters.
33993 "type": "A String", # The type of condition.
33994 "values": [ # The values of the condition. The number of supported values depends
33995 # on the condition type. Some support zero values,
33996 # others one or two values,
33997 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
33998 { # The value of the condition.
33999 "relativeDate": "A String", # A relative date (based on the current date).
34000 # Valid only if the type is
34001 # DATE_BEFORE,
34002 # DATE_AFTER,
34003 # DATE_ON_OR_BEFORE or
34004 # DATE_ON_OR_AFTER.
34005 #
34006 # Relative dates are not supported in data validation.
34007 # They are supported only in conditional formatting and
34008 # conditional filters.
34009 "userEnteredValue": "A String", # A value the condition is based on.
34010 # The value will be parsed as if the user typed into a cell.
34011 # Formulas are supported (and must begin with an `=`).
34012 },
34013 ],
34014 },
34015 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034016 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
34017 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034018 # Runs start at specific indexes in the text and continue until the next
34019 # run. Properties of a run will continue unless explicitly changed
34020 # in a subsequent run (and properties of the first run will continue
34021 # the properties of the cell unless explicitly changed).
34022 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034023 # When writing, the new runs will overwrite any prior runs. When writing a
34024 # new user_entered_value, previous runs will be erased.
34025 { # A run of a text format. The format of this run continues until the start
34026 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034027 # When updating, all fields must be set.
34028 "startIndex": 42, # The character index where this run starts.
34029 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
34030 # Absent values indicate that the field isn't specified.
34031 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
34032 # for simplicity of conversion to/from color representations in various
34033 # languages over compactness; for example, the fields of this representation
34034 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34035 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34036 # method in iOS; and, with just a little work, it can be easily formatted into
34037 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34038 #
34039 # Example (Java):
34040 #
34041 # import com.google.type.Color;
34042 #
34043 # // ...
34044 # public static java.awt.Color fromProto(Color protocolor) {
34045 # float alpha = protocolor.hasAlpha()
34046 # ? protocolor.getAlpha().getValue()
34047 # : 1.0;
34048 #
34049 # return new java.awt.Color(
34050 # protocolor.getRed(),
34051 # protocolor.getGreen(),
34052 # protocolor.getBlue(),
34053 # alpha);
34054 # }
34055 #
34056 # public static Color toProto(java.awt.Color color) {
34057 # float red = (float) color.getRed();
34058 # float green = (float) color.getGreen();
34059 # float blue = (float) color.getBlue();
34060 # float denominator = 255.0;
34061 # Color.Builder resultBuilder =
34062 # Color
34063 # .newBuilder()
34064 # .setRed(red / denominator)
34065 # .setGreen(green / denominator)
34066 # .setBlue(blue / denominator);
34067 # int alpha = color.getAlpha();
34068 # if (alpha != 255) {
34069 # result.setAlpha(
34070 # FloatValue
34071 # .newBuilder()
34072 # .setValue(((float) alpha) / denominator)
34073 # .build());
34074 # }
34075 # return resultBuilder.build();
34076 # }
34077 # // ...
34078 #
34079 # Example (iOS / Obj-C):
34080 #
34081 # // ...
34082 # static UIColor* fromProto(Color* protocolor) {
34083 # float red = [protocolor red];
34084 # float green = [protocolor green];
34085 # float blue = [protocolor blue];
34086 # FloatValue* alpha_wrapper = [protocolor alpha];
34087 # float alpha = 1.0;
34088 # if (alpha_wrapper != nil) {
34089 # alpha = [alpha_wrapper value];
34090 # }
34091 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34092 # }
34093 #
34094 # static Color* toProto(UIColor* color) {
34095 # CGFloat red, green, blue, alpha;
34096 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34097 # return nil;
34098 # }
34099 # Color* result = [Color alloc] init];
34100 # [result setRed:red];
34101 # [result setGreen:green];
34102 # [result setBlue:blue];
34103 # if (alpha <= 0.9999) {
34104 # [result setAlpha:floatWrapperWithValue(alpha)];
34105 # }
34106 # [result autorelease];
34107 # return result;
34108 # }
34109 # // ...
34110 #
34111 # Example (JavaScript):
34112 #
34113 # // ...
34114 #
34115 # var protoToCssColor = function(rgb_color) {
34116 # var redFrac = rgb_color.red || 0.0;
34117 # var greenFrac = rgb_color.green || 0.0;
34118 # var blueFrac = rgb_color.blue || 0.0;
34119 # var red = Math.floor(redFrac * 255);
34120 # var green = Math.floor(greenFrac * 255);
34121 # var blue = Math.floor(blueFrac * 255);
34122 #
34123 # if (!('alpha' in rgb_color)) {
34124 # return rgbToCssColor_(red, green, blue);
34125 # }
34126 #
34127 # var alphaFrac = rgb_color.alpha.value || 0.0;
34128 # var rgbParams = [red, green, blue].join(',');
34129 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34130 # };
34131 #
34132 # var rgbToCssColor_ = function(red, green, blue) {
34133 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34134 # var hexString = rgbNumber.toString(16);
34135 # var missingZeros = 6 - hexString.length;
34136 # var resultBuilder = ['#'];
34137 # for (var i = 0; i < missingZeros; i++) {
34138 # resultBuilder.push('0');
34139 # }
34140 # resultBuilder.push(hexString);
34141 # return resultBuilder.join('');
34142 # };
34143 #
34144 # // ...
34145 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34146 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34147 # the final pixel color is defined by the equation:
34148 #
34149 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34150 #
34151 # This means that a value of 1.0 corresponds to a solid color, whereas
34152 # a value of 0.0 corresponds to a completely transparent color. This
34153 # uses a wrapper message rather than a simple float scalar so that it is
34154 # possible to distinguish between a default value and the value being unset.
34155 # If omitted, this color object is to be rendered as a solid color
34156 # (as if the alpha value had been explicitly given with a value of 1.0).
34157 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34158 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34159 },
34160 "bold": True or False, # True if the text is bold.
34161 "strikethrough": True or False, # True if the text has a strikethrough.
34162 "fontFamily": "A String", # The font family.
34163 "fontSize": 42, # The size of the font.
34164 "italic": True or False, # True if the text is italicized.
34165 "underline": True or False, # True if the text is underlined.
34166 },
34167 },
34168 ],
34169 },
34170 ],
34171 },
34172 ],
34173 },
34174 ],
34175 "properties": { # Properties of a sheet. # The properties of the sheet.
34176 "sheetType": "A String", # The type of sheet. Defaults to GRID.
34177 # This field cannot be changed once set.
34178 "index": 42, # The index of the sheet within the spreadsheet.
34179 # When adding or updating sheet properties, if this field
34180 # is excluded then the sheet will be added or moved to the end
34181 # of the sheet list.
34182 "title": "A String", # The name of the sheet.
34183 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
34184 # (If the sheet is an object sheet, containing a chart or image, then
34185 # this field will be absent.)
34186 # When writing it is an error to set any grid properties on non-grid sheets.
34187 "columnCount": 42, # The number of columns in the grid.
34188 "rowCount": 42, # The number of rows in the grid.
34189 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
34190 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
34191 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
34192 },
34193 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
34194 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
34195 # for simplicity of conversion to/from color representations in various
34196 # languages over compactness; for example, the fields of this representation
34197 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34198 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34199 # method in iOS; and, with just a little work, it can be easily formatted into
34200 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34201 #
34202 # Example (Java):
34203 #
34204 # import com.google.type.Color;
34205 #
34206 # // ...
34207 # public static java.awt.Color fromProto(Color protocolor) {
34208 # float alpha = protocolor.hasAlpha()
34209 # ? protocolor.getAlpha().getValue()
34210 # : 1.0;
34211 #
34212 # return new java.awt.Color(
34213 # protocolor.getRed(),
34214 # protocolor.getGreen(),
34215 # protocolor.getBlue(),
34216 # alpha);
34217 # }
34218 #
34219 # public static Color toProto(java.awt.Color color) {
34220 # float red = (float) color.getRed();
34221 # float green = (float) color.getGreen();
34222 # float blue = (float) color.getBlue();
34223 # float denominator = 255.0;
34224 # Color.Builder resultBuilder =
34225 # Color
34226 # .newBuilder()
34227 # .setRed(red / denominator)
34228 # .setGreen(green / denominator)
34229 # .setBlue(blue / denominator);
34230 # int alpha = color.getAlpha();
34231 # if (alpha != 255) {
34232 # result.setAlpha(
34233 # FloatValue
34234 # .newBuilder()
34235 # .setValue(((float) alpha) / denominator)
34236 # .build());
34237 # }
34238 # return resultBuilder.build();
34239 # }
34240 # // ...
34241 #
34242 # Example (iOS / Obj-C):
34243 #
34244 # // ...
34245 # static UIColor* fromProto(Color* protocolor) {
34246 # float red = [protocolor red];
34247 # float green = [protocolor green];
34248 # float blue = [protocolor blue];
34249 # FloatValue* alpha_wrapper = [protocolor alpha];
34250 # float alpha = 1.0;
34251 # if (alpha_wrapper != nil) {
34252 # alpha = [alpha_wrapper value];
34253 # }
34254 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34255 # }
34256 #
34257 # static Color* toProto(UIColor* color) {
34258 # CGFloat red, green, blue, alpha;
34259 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34260 # return nil;
34261 # }
34262 # Color* result = [Color alloc] init];
34263 # [result setRed:red];
34264 # [result setGreen:green];
34265 # [result setBlue:blue];
34266 # if (alpha <= 0.9999) {
34267 # [result setAlpha:floatWrapperWithValue(alpha)];
34268 # }
34269 # [result autorelease];
34270 # return result;
34271 # }
34272 # // ...
34273 #
34274 # Example (JavaScript):
34275 #
34276 # // ...
34277 #
34278 # var protoToCssColor = function(rgb_color) {
34279 # var redFrac = rgb_color.red || 0.0;
34280 # var greenFrac = rgb_color.green || 0.0;
34281 # var blueFrac = rgb_color.blue || 0.0;
34282 # var red = Math.floor(redFrac * 255);
34283 # var green = Math.floor(greenFrac * 255);
34284 # var blue = Math.floor(blueFrac * 255);
34285 #
34286 # if (!('alpha' in rgb_color)) {
34287 # return rgbToCssColor_(red, green, blue);
34288 # }
34289 #
34290 # var alphaFrac = rgb_color.alpha.value || 0.0;
34291 # var rgbParams = [red, green, blue].join(',');
34292 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34293 # };
34294 #
34295 # var rgbToCssColor_ = function(red, green, blue) {
34296 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34297 # var hexString = rgbNumber.toString(16);
34298 # var missingZeros = 6 - hexString.length;
34299 # var resultBuilder = ['#'];
34300 # for (var i = 0; i < missingZeros; i++) {
34301 # resultBuilder.push('0');
34302 # }
34303 # resultBuilder.push(hexString);
34304 # return resultBuilder.join('');
34305 # };
34306 #
34307 # // ...
34308 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34309 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34310 # the final pixel color is defined by the equation:
34311 #
34312 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34313 #
34314 # This means that a value of 1.0 corresponds to a solid color, whereas
34315 # a value of 0.0 corresponds to a completely transparent color. This
34316 # uses a wrapper message rather than a simple float scalar so that it is
34317 # possible to distinguish between a default value and the value being unset.
34318 # If omitted, this color object is to be rendered as a solid color
34319 # (as if the alpha value had been explicitly given with a value of 1.0).
34320 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34321 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34322 },
34323 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
34324 "sheetId": 42, # The ID of the sheet. Must be non-negative.
34325 # This field cannot be changed once set.
34326 },
34327 },
34328 ],
34329 }</pre>
34330</div>
34331
34332</body></html>