blob: 79f396b1b25964524fe2d75c3a26a467e1267892 [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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700290 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
291 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700292 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700293 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700294 },
295 "textDirection": "A String", # The direction of the text in the cell.
296 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
297 # When updating padding, every field must be specified.
298 "top": 42, # The top padding of the cell.
299 "right": 42, # The right padding of the cell.
300 "bottom": 42, # The bottom padding of the cell.
301 "left": 42, # The left padding of the cell.
302 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700303 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700304 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
305 # for simplicity of conversion to/from color representations in various
306 # languages over compactness; for example, the fields of this representation
307 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
308 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
309 # method in iOS; and, with just a little work, it can be easily formatted into
310 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
311 #
312 # Example (Java):
313 #
314 # import com.google.type.Color;
315 #
316 # // ...
317 # public static java.awt.Color fromProto(Color protocolor) {
318 # float alpha = protocolor.hasAlpha()
319 # ? protocolor.getAlpha().getValue()
320 # : 1.0;
321 #
322 # return new java.awt.Color(
323 # protocolor.getRed(),
324 # protocolor.getGreen(),
325 # protocolor.getBlue(),
326 # alpha);
327 # }
328 #
329 # public static Color toProto(java.awt.Color color) {
330 # float red = (float) color.getRed();
331 # float green = (float) color.getGreen();
332 # float blue = (float) color.getBlue();
333 # float denominator = 255.0;
334 # Color.Builder resultBuilder =
335 # Color
336 # .newBuilder()
337 # .setRed(red / denominator)
338 # .setGreen(green / denominator)
339 # .setBlue(blue / denominator);
340 # int alpha = color.getAlpha();
341 # if (alpha != 255) {
342 # result.setAlpha(
343 # FloatValue
344 # .newBuilder()
345 # .setValue(((float) alpha) / denominator)
346 # .build());
347 # }
348 # return resultBuilder.build();
349 # }
350 # // ...
351 #
352 # Example (iOS / Obj-C):
353 #
354 # // ...
355 # static UIColor* fromProto(Color* protocolor) {
356 # float red = [protocolor red];
357 # float green = [protocolor green];
358 # float blue = [protocolor blue];
359 # FloatValue* alpha_wrapper = [protocolor alpha];
360 # float alpha = 1.0;
361 # if (alpha_wrapper != nil) {
362 # alpha = [alpha_wrapper value];
363 # }
364 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
365 # }
366 #
367 # static Color* toProto(UIColor* color) {
368 # CGFloat red, green, blue, alpha;
369 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
370 # return nil;
371 # }
372 # Color* result = [Color alloc] init];
373 # [result setRed:red];
374 # [result setGreen:green];
375 # [result setBlue:blue];
376 # if (alpha <= 0.9999) {
377 # [result setAlpha:floatWrapperWithValue(alpha)];
378 # }
379 # [result autorelease];
380 # return result;
381 # }
382 # // ...
383 #
384 # Example (JavaScript):
385 #
386 # // ...
387 #
388 # var protoToCssColor = function(rgb_color) {
389 # var redFrac = rgb_color.red || 0.0;
390 # var greenFrac = rgb_color.green || 0.0;
391 # var blueFrac = rgb_color.blue || 0.0;
392 # var red = Math.floor(redFrac * 255);
393 # var green = Math.floor(greenFrac * 255);
394 # var blue = Math.floor(blueFrac * 255);
395 #
396 # if (!('alpha' in rgb_color)) {
397 # return rgbToCssColor_(red, green, blue);
398 # }
399 #
400 # var alphaFrac = rgb_color.alpha.value || 0.0;
401 # var rgbParams = [red, green, blue].join(',');
402 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
403 # };
404 #
405 # var rgbToCssColor_ = function(red, green, blue) {
406 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
407 # var hexString = rgbNumber.toString(16);
408 # var missingZeros = 6 - hexString.length;
409 # var resultBuilder = ['#'];
410 # for (var i = 0; i < missingZeros; i++) {
411 # resultBuilder.push('0');
412 # }
413 # resultBuilder.push(hexString);
414 # return resultBuilder.join('');
415 # };
416 #
417 # // ...
418 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
419 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
420 # the final pixel color is defined by the equation:
421 #
422 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
423 #
424 # This means that a value of 1.0 corresponds to a solid color, whereas
425 # a value of 0.0 corresponds to a completely transparent color. This
426 # uses a wrapper message rather than a simple float scalar so that it is
427 # possible to distinguish between a default value and the value being unset.
428 # If omitted, this color object is to be rendered as a solid color
429 # (as if the alpha value had been explicitly given with a value of 1.0).
430 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
431 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
432 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700433 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700434 "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).
435 # Absent values indicate that the field isn't specified.
436 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
437 # for simplicity of conversion to/from color representations in various
438 # languages over compactness; for example, the fields of this representation
439 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
440 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
441 # method in iOS; and, with just a little work, it can be easily formatted into
442 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
443 #
444 # Example (Java):
445 #
446 # import com.google.type.Color;
447 #
448 # // ...
449 # public static java.awt.Color fromProto(Color protocolor) {
450 # float alpha = protocolor.hasAlpha()
451 # ? protocolor.getAlpha().getValue()
452 # : 1.0;
453 #
454 # return new java.awt.Color(
455 # protocolor.getRed(),
456 # protocolor.getGreen(),
457 # protocolor.getBlue(),
458 # alpha);
459 # }
460 #
461 # public static Color toProto(java.awt.Color color) {
462 # float red = (float) color.getRed();
463 # float green = (float) color.getGreen();
464 # float blue = (float) color.getBlue();
465 # float denominator = 255.0;
466 # Color.Builder resultBuilder =
467 # Color
468 # .newBuilder()
469 # .setRed(red / denominator)
470 # .setGreen(green / denominator)
471 # .setBlue(blue / denominator);
472 # int alpha = color.getAlpha();
473 # if (alpha != 255) {
474 # result.setAlpha(
475 # FloatValue
476 # .newBuilder()
477 # .setValue(((float) alpha) / denominator)
478 # .build());
479 # }
480 # return resultBuilder.build();
481 # }
482 # // ...
483 #
484 # Example (iOS / Obj-C):
485 #
486 # // ...
487 # static UIColor* fromProto(Color* protocolor) {
488 # float red = [protocolor red];
489 # float green = [protocolor green];
490 # float blue = [protocolor blue];
491 # FloatValue* alpha_wrapper = [protocolor alpha];
492 # float alpha = 1.0;
493 # if (alpha_wrapper != nil) {
494 # alpha = [alpha_wrapper value];
495 # }
496 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
497 # }
498 #
499 # static Color* toProto(UIColor* color) {
500 # CGFloat red, green, blue, alpha;
501 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
502 # return nil;
503 # }
504 # Color* result = [Color alloc] init];
505 # [result setRed:red];
506 # [result setGreen:green];
507 # [result setBlue:blue];
508 # if (alpha <= 0.9999) {
509 # [result setAlpha:floatWrapperWithValue(alpha)];
510 # }
511 # [result autorelease];
512 # return result;
513 # }
514 # // ...
515 #
516 # Example (JavaScript):
517 #
518 # // ...
519 #
520 # var protoToCssColor = function(rgb_color) {
521 # var redFrac = rgb_color.red || 0.0;
522 # var greenFrac = rgb_color.green || 0.0;
523 # var blueFrac = rgb_color.blue || 0.0;
524 # var red = Math.floor(redFrac * 255);
525 # var green = Math.floor(greenFrac * 255);
526 # var blue = Math.floor(blueFrac * 255);
527 #
528 # if (!('alpha' in rgb_color)) {
529 # return rgbToCssColor_(red, green, blue);
530 # }
531 #
532 # var alphaFrac = rgb_color.alpha.value || 0.0;
533 # var rgbParams = [red, green, blue].join(',');
534 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
535 # };
536 #
537 # var rgbToCssColor_ = function(red, green, blue) {
538 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
539 # var hexString = rgbNumber.toString(16);
540 # var missingZeros = 6 - hexString.length;
541 # var resultBuilder = ['#'];
542 # for (var i = 0; i < missingZeros; i++) {
543 # resultBuilder.push('0');
544 # }
545 # resultBuilder.push(hexString);
546 # return resultBuilder.join('');
547 # };
548 #
549 # // ...
550 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
551 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
552 # the final pixel color is defined by the equation:
553 #
554 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
555 #
556 # This means that a value of 1.0 corresponds to a solid color, whereas
557 # a value of 0.0 corresponds to a completely transparent color. This
558 # uses a wrapper message rather than a simple float scalar so that it is
559 # possible to distinguish between a default value and the value being unset.
560 # If omitted, this color object is to be rendered as a solid color
561 # (as if the alpha value had been explicitly given with a value of 1.0).
562 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
563 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
564 },
565 "bold": True or False, # True if the text is bold.
566 "strikethrough": True or False, # True if the text has a strikethrough.
567 "fontFamily": "A String", # The font family.
568 "fontSize": 42, # The size of the font.
569 "italic": True or False, # True if the text is italicized.
570 "underline": True or False, # True if the text is underlined.
571 },
572 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
573 "borders": { # The borders of the cell. # The borders of the cell.
574 "top": { # A border along a cell. # The top border of the cell.
575 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
576 # for simplicity of conversion to/from color representations in various
577 # languages over compactness; for example, the fields of this representation
578 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
579 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
580 # method in iOS; and, with just a little work, it can be easily formatted into
581 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
582 #
583 # Example (Java):
584 #
585 # import com.google.type.Color;
586 #
587 # // ...
588 # public static java.awt.Color fromProto(Color protocolor) {
589 # float alpha = protocolor.hasAlpha()
590 # ? protocolor.getAlpha().getValue()
591 # : 1.0;
592 #
593 # return new java.awt.Color(
594 # protocolor.getRed(),
595 # protocolor.getGreen(),
596 # protocolor.getBlue(),
597 # alpha);
598 # }
599 #
600 # public static Color toProto(java.awt.Color color) {
601 # float red = (float) color.getRed();
602 # float green = (float) color.getGreen();
603 # float blue = (float) color.getBlue();
604 # float denominator = 255.0;
605 # Color.Builder resultBuilder =
606 # Color
607 # .newBuilder()
608 # .setRed(red / denominator)
609 # .setGreen(green / denominator)
610 # .setBlue(blue / denominator);
611 # int alpha = color.getAlpha();
612 # if (alpha != 255) {
613 # result.setAlpha(
614 # FloatValue
615 # .newBuilder()
616 # .setValue(((float) alpha) / denominator)
617 # .build());
618 # }
619 # return resultBuilder.build();
620 # }
621 # // ...
622 #
623 # Example (iOS / Obj-C):
624 #
625 # // ...
626 # static UIColor* fromProto(Color* protocolor) {
627 # float red = [protocolor red];
628 # float green = [protocolor green];
629 # float blue = [protocolor blue];
630 # FloatValue* alpha_wrapper = [protocolor alpha];
631 # float alpha = 1.0;
632 # if (alpha_wrapper != nil) {
633 # alpha = [alpha_wrapper value];
634 # }
635 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
636 # }
637 #
638 # static Color* toProto(UIColor* color) {
639 # CGFloat red, green, blue, alpha;
640 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
641 # return nil;
642 # }
643 # Color* result = [Color alloc] init];
644 # [result setRed:red];
645 # [result setGreen:green];
646 # [result setBlue:blue];
647 # if (alpha <= 0.9999) {
648 # [result setAlpha:floatWrapperWithValue(alpha)];
649 # }
650 # [result autorelease];
651 # return result;
652 # }
653 # // ...
654 #
655 # Example (JavaScript):
656 #
657 # // ...
658 #
659 # var protoToCssColor = function(rgb_color) {
660 # var redFrac = rgb_color.red || 0.0;
661 # var greenFrac = rgb_color.green || 0.0;
662 # var blueFrac = rgb_color.blue || 0.0;
663 # var red = Math.floor(redFrac * 255);
664 # var green = Math.floor(greenFrac * 255);
665 # var blue = Math.floor(blueFrac * 255);
666 #
667 # if (!('alpha' in rgb_color)) {
668 # return rgbToCssColor_(red, green, blue);
669 # }
670 #
671 # var alphaFrac = rgb_color.alpha.value || 0.0;
672 # var rgbParams = [red, green, blue].join(',');
673 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
674 # };
675 #
676 # var rgbToCssColor_ = function(red, green, blue) {
677 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
678 # var hexString = rgbNumber.toString(16);
679 # var missingZeros = 6 - hexString.length;
680 # var resultBuilder = ['#'];
681 # for (var i = 0; i < missingZeros; i++) {
682 # resultBuilder.push('0');
683 # }
684 # resultBuilder.push(hexString);
685 # return resultBuilder.join('');
686 # };
687 #
688 # // ...
689 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
690 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
691 # the final pixel color is defined by the equation:
692 #
693 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
694 #
695 # This means that a value of 1.0 corresponds to a solid color, whereas
696 # a value of 0.0 corresponds to a completely transparent color. This
697 # uses a wrapper message rather than a simple float scalar so that it is
698 # possible to distinguish between a default value and the value being unset.
699 # If omitted, this color object is to be rendered as a solid color
700 # (as if the alpha value had been explicitly given with a value of 1.0).
701 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
702 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
703 },
704 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700705 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700706 "style": "A String", # The style of the border.
707 },
708 "right": { # A border along a cell. # The right border of the cell.
709 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
710 # for simplicity of conversion to/from color representations in various
711 # languages over compactness; for example, the fields of this representation
712 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
713 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
714 # method in iOS; and, with just a little work, it can be easily formatted into
715 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
716 #
717 # Example (Java):
718 #
719 # import com.google.type.Color;
720 #
721 # // ...
722 # public static java.awt.Color fromProto(Color protocolor) {
723 # float alpha = protocolor.hasAlpha()
724 # ? protocolor.getAlpha().getValue()
725 # : 1.0;
726 #
727 # return new java.awt.Color(
728 # protocolor.getRed(),
729 # protocolor.getGreen(),
730 # protocolor.getBlue(),
731 # alpha);
732 # }
733 #
734 # public static Color toProto(java.awt.Color color) {
735 # float red = (float) color.getRed();
736 # float green = (float) color.getGreen();
737 # float blue = (float) color.getBlue();
738 # float denominator = 255.0;
739 # Color.Builder resultBuilder =
740 # Color
741 # .newBuilder()
742 # .setRed(red / denominator)
743 # .setGreen(green / denominator)
744 # .setBlue(blue / denominator);
745 # int alpha = color.getAlpha();
746 # if (alpha != 255) {
747 # result.setAlpha(
748 # FloatValue
749 # .newBuilder()
750 # .setValue(((float) alpha) / denominator)
751 # .build());
752 # }
753 # return resultBuilder.build();
754 # }
755 # // ...
756 #
757 # Example (iOS / Obj-C):
758 #
759 # // ...
760 # static UIColor* fromProto(Color* protocolor) {
761 # float red = [protocolor red];
762 # float green = [protocolor green];
763 # float blue = [protocolor blue];
764 # FloatValue* alpha_wrapper = [protocolor alpha];
765 # float alpha = 1.0;
766 # if (alpha_wrapper != nil) {
767 # alpha = [alpha_wrapper value];
768 # }
769 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
770 # }
771 #
772 # static Color* toProto(UIColor* color) {
773 # CGFloat red, green, blue, alpha;
774 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
775 # return nil;
776 # }
777 # Color* result = [Color alloc] init];
778 # [result setRed:red];
779 # [result setGreen:green];
780 # [result setBlue:blue];
781 # if (alpha <= 0.9999) {
782 # [result setAlpha:floatWrapperWithValue(alpha)];
783 # }
784 # [result autorelease];
785 # return result;
786 # }
787 # // ...
788 #
789 # Example (JavaScript):
790 #
791 # // ...
792 #
793 # var protoToCssColor = function(rgb_color) {
794 # var redFrac = rgb_color.red || 0.0;
795 # var greenFrac = rgb_color.green || 0.0;
796 # var blueFrac = rgb_color.blue || 0.0;
797 # var red = Math.floor(redFrac * 255);
798 # var green = Math.floor(greenFrac * 255);
799 # var blue = Math.floor(blueFrac * 255);
800 #
801 # if (!('alpha' in rgb_color)) {
802 # return rgbToCssColor_(red, green, blue);
803 # }
804 #
805 # var alphaFrac = rgb_color.alpha.value || 0.0;
806 # var rgbParams = [red, green, blue].join(',');
807 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
808 # };
809 #
810 # var rgbToCssColor_ = function(red, green, blue) {
811 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
812 # var hexString = rgbNumber.toString(16);
813 # var missingZeros = 6 - hexString.length;
814 # var resultBuilder = ['#'];
815 # for (var i = 0; i < missingZeros; i++) {
816 # resultBuilder.push('0');
817 # }
818 # resultBuilder.push(hexString);
819 # return resultBuilder.join('');
820 # };
821 #
822 # // ...
823 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
824 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
825 # the final pixel color is defined by the equation:
826 #
827 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
828 #
829 # This means that a value of 1.0 corresponds to a solid color, whereas
830 # a value of 0.0 corresponds to a completely transparent color. This
831 # uses a wrapper message rather than a simple float scalar so that it is
832 # possible to distinguish between a default value and the value being unset.
833 # If omitted, this color object is to be rendered as a solid color
834 # (as if the alpha value had been explicitly given with a value of 1.0).
835 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
836 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
837 },
838 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700839 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700840 "style": "A String", # The style of the border.
841 },
842 "bottom": { # A border along a cell. # The bottom border of the cell.
843 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
844 # for simplicity of conversion to/from color representations in various
845 # languages over compactness; for example, the fields of this representation
846 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
847 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
848 # method in iOS; and, with just a little work, it can be easily formatted into
849 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
850 #
851 # Example (Java):
852 #
853 # import com.google.type.Color;
854 #
855 # // ...
856 # public static java.awt.Color fromProto(Color protocolor) {
857 # float alpha = protocolor.hasAlpha()
858 # ? protocolor.getAlpha().getValue()
859 # : 1.0;
860 #
861 # return new java.awt.Color(
862 # protocolor.getRed(),
863 # protocolor.getGreen(),
864 # protocolor.getBlue(),
865 # alpha);
866 # }
867 #
868 # public static Color toProto(java.awt.Color color) {
869 # float red = (float) color.getRed();
870 # float green = (float) color.getGreen();
871 # float blue = (float) color.getBlue();
872 # float denominator = 255.0;
873 # Color.Builder resultBuilder =
874 # Color
875 # .newBuilder()
876 # .setRed(red / denominator)
877 # .setGreen(green / denominator)
878 # .setBlue(blue / denominator);
879 # int alpha = color.getAlpha();
880 # if (alpha != 255) {
881 # result.setAlpha(
882 # FloatValue
883 # .newBuilder()
884 # .setValue(((float) alpha) / denominator)
885 # .build());
886 # }
887 # return resultBuilder.build();
888 # }
889 # // ...
890 #
891 # Example (iOS / Obj-C):
892 #
893 # // ...
894 # static UIColor* fromProto(Color* protocolor) {
895 # float red = [protocolor red];
896 # float green = [protocolor green];
897 # float blue = [protocolor blue];
898 # FloatValue* alpha_wrapper = [protocolor alpha];
899 # float alpha = 1.0;
900 # if (alpha_wrapper != nil) {
901 # alpha = [alpha_wrapper value];
902 # }
903 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
904 # }
905 #
906 # static Color* toProto(UIColor* color) {
907 # CGFloat red, green, blue, alpha;
908 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
909 # return nil;
910 # }
911 # Color* result = [Color alloc] init];
912 # [result setRed:red];
913 # [result setGreen:green];
914 # [result setBlue:blue];
915 # if (alpha <= 0.9999) {
916 # [result setAlpha:floatWrapperWithValue(alpha)];
917 # }
918 # [result autorelease];
919 # return result;
920 # }
921 # // ...
922 #
923 # Example (JavaScript):
924 #
925 # // ...
926 #
927 # var protoToCssColor = function(rgb_color) {
928 # var redFrac = rgb_color.red || 0.0;
929 # var greenFrac = rgb_color.green || 0.0;
930 # var blueFrac = rgb_color.blue || 0.0;
931 # var red = Math.floor(redFrac * 255);
932 # var green = Math.floor(greenFrac * 255);
933 # var blue = Math.floor(blueFrac * 255);
934 #
935 # if (!('alpha' in rgb_color)) {
936 # return rgbToCssColor_(red, green, blue);
937 # }
938 #
939 # var alphaFrac = rgb_color.alpha.value || 0.0;
940 # var rgbParams = [red, green, blue].join(',');
941 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
942 # };
943 #
944 # var rgbToCssColor_ = function(red, green, blue) {
945 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
946 # var hexString = rgbNumber.toString(16);
947 # var missingZeros = 6 - hexString.length;
948 # var resultBuilder = ['#'];
949 # for (var i = 0; i < missingZeros; i++) {
950 # resultBuilder.push('0');
951 # }
952 # resultBuilder.push(hexString);
953 # return resultBuilder.join('');
954 # };
955 #
956 # // ...
957 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
958 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
959 # the final pixel color is defined by the equation:
960 #
961 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
962 #
963 # This means that a value of 1.0 corresponds to a solid color, whereas
964 # a value of 0.0 corresponds to a completely transparent color. This
965 # uses a wrapper message rather than a simple float scalar so that it is
966 # possible to distinguish between a default value and the value being unset.
967 # If omitted, this color object is to be rendered as a solid color
968 # (as if the alpha value had been explicitly given with a value of 1.0).
969 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
970 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
971 },
972 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700973 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700974 "style": "A String", # The style of the border.
975 },
976 "left": { # A border along a cell. # The left border of the cell.
977 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
978 # for simplicity of conversion to/from color representations in various
979 # languages over compactness; for example, the fields of this representation
980 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
981 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
982 # method in iOS; and, with just a little work, it can be easily formatted into
983 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
984 #
985 # Example (Java):
986 #
987 # import com.google.type.Color;
988 #
989 # // ...
990 # public static java.awt.Color fromProto(Color protocolor) {
991 # float alpha = protocolor.hasAlpha()
992 # ? protocolor.getAlpha().getValue()
993 # : 1.0;
994 #
995 # return new java.awt.Color(
996 # protocolor.getRed(),
997 # protocolor.getGreen(),
998 # protocolor.getBlue(),
999 # alpha);
1000 # }
1001 #
1002 # public static Color toProto(java.awt.Color color) {
1003 # float red = (float) color.getRed();
1004 # float green = (float) color.getGreen();
1005 # float blue = (float) color.getBlue();
1006 # float denominator = 255.0;
1007 # Color.Builder resultBuilder =
1008 # Color
1009 # .newBuilder()
1010 # .setRed(red / denominator)
1011 # .setGreen(green / denominator)
1012 # .setBlue(blue / denominator);
1013 # int alpha = color.getAlpha();
1014 # if (alpha != 255) {
1015 # result.setAlpha(
1016 # FloatValue
1017 # .newBuilder()
1018 # .setValue(((float) alpha) / denominator)
1019 # .build());
1020 # }
1021 # return resultBuilder.build();
1022 # }
1023 # // ...
1024 #
1025 # Example (iOS / Obj-C):
1026 #
1027 # // ...
1028 # static UIColor* fromProto(Color* protocolor) {
1029 # float red = [protocolor red];
1030 # float green = [protocolor green];
1031 # float blue = [protocolor blue];
1032 # FloatValue* alpha_wrapper = [protocolor alpha];
1033 # float alpha = 1.0;
1034 # if (alpha_wrapper != nil) {
1035 # alpha = [alpha_wrapper value];
1036 # }
1037 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1038 # }
1039 #
1040 # static Color* toProto(UIColor* color) {
1041 # CGFloat red, green, blue, alpha;
1042 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1043 # return nil;
1044 # }
1045 # Color* result = [Color alloc] init];
1046 # [result setRed:red];
1047 # [result setGreen:green];
1048 # [result setBlue:blue];
1049 # if (alpha <= 0.9999) {
1050 # [result setAlpha:floatWrapperWithValue(alpha)];
1051 # }
1052 # [result autorelease];
1053 # return result;
1054 # }
1055 # // ...
1056 #
1057 # Example (JavaScript):
1058 #
1059 # // ...
1060 #
1061 # var protoToCssColor = function(rgb_color) {
1062 # var redFrac = rgb_color.red || 0.0;
1063 # var greenFrac = rgb_color.green || 0.0;
1064 # var blueFrac = rgb_color.blue || 0.0;
1065 # var red = Math.floor(redFrac * 255);
1066 # var green = Math.floor(greenFrac * 255);
1067 # var blue = Math.floor(blueFrac * 255);
1068 #
1069 # if (!('alpha' in rgb_color)) {
1070 # return rgbToCssColor_(red, green, blue);
1071 # }
1072 #
1073 # var alphaFrac = rgb_color.alpha.value || 0.0;
1074 # var rgbParams = [red, green, blue].join(',');
1075 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1076 # };
1077 #
1078 # var rgbToCssColor_ = function(red, green, blue) {
1079 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1080 # var hexString = rgbNumber.toString(16);
1081 # var missingZeros = 6 - hexString.length;
1082 # var resultBuilder = ['#'];
1083 # for (var i = 0; i < missingZeros; i++) {
1084 # resultBuilder.push('0');
1085 # }
1086 # resultBuilder.push(hexString);
1087 # return resultBuilder.join('');
1088 # };
1089 #
1090 # // ...
1091 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1092 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1093 # the final pixel color is defined by the equation:
1094 #
1095 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1096 #
1097 # This means that a value of 1.0 corresponds to a solid color, whereas
1098 # a value of 0.0 corresponds to a completely transparent color. This
1099 # uses a wrapper message rather than a simple float scalar so that it is
1100 # possible to distinguish between a default value and the value being unset.
1101 # If omitted, this color object is to be rendered as a solid color
1102 # (as if the alpha value had been explicitly given with a value of 1.0).
1103 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1104 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1105 },
1106 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001107 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001108 "style": "A String", # The style of the border.
1109 },
1110 },
1111 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
1112 },
1113 },
1114 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
1115 # the interpolation points listed. The format of a cell will vary
1116 # based on its contents as compared to the values of the interpolation
1117 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001118 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001119 # These pin the gradient color scale according to the color,
1120 # type and value chosen.
1121 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1122 # for simplicity of conversion to/from color representations in various
1123 # languages over compactness; for example, the fields of this representation
1124 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1125 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1126 # method in iOS; and, with just a little work, it can be easily formatted into
1127 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1128 #
1129 # Example (Java):
1130 #
1131 # import com.google.type.Color;
1132 #
1133 # // ...
1134 # public static java.awt.Color fromProto(Color protocolor) {
1135 # float alpha = protocolor.hasAlpha()
1136 # ? protocolor.getAlpha().getValue()
1137 # : 1.0;
1138 #
1139 # return new java.awt.Color(
1140 # protocolor.getRed(),
1141 # protocolor.getGreen(),
1142 # protocolor.getBlue(),
1143 # alpha);
1144 # }
1145 #
1146 # public static Color toProto(java.awt.Color color) {
1147 # float red = (float) color.getRed();
1148 # float green = (float) color.getGreen();
1149 # float blue = (float) color.getBlue();
1150 # float denominator = 255.0;
1151 # Color.Builder resultBuilder =
1152 # Color
1153 # .newBuilder()
1154 # .setRed(red / denominator)
1155 # .setGreen(green / denominator)
1156 # .setBlue(blue / denominator);
1157 # int alpha = color.getAlpha();
1158 # if (alpha != 255) {
1159 # result.setAlpha(
1160 # FloatValue
1161 # .newBuilder()
1162 # .setValue(((float) alpha) / denominator)
1163 # .build());
1164 # }
1165 # return resultBuilder.build();
1166 # }
1167 # // ...
1168 #
1169 # Example (iOS / Obj-C):
1170 #
1171 # // ...
1172 # static UIColor* fromProto(Color* protocolor) {
1173 # float red = [protocolor red];
1174 # float green = [protocolor green];
1175 # float blue = [protocolor blue];
1176 # FloatValue* alpha_wrapper = [protocolor alpha];
1177 # float alpha = 1.0;
1178 # if (alpha_wrapper != nil) {
1179 # alpha = [alpha_wrapper value];
1180 # }
1181 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1182 # }
1183 #
1184 # static Color* toProto(UIColor* color) {
1185 # CGFloat red, green, blue, alpha;
1186 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1187 # return nil;
1188 # }
1189 # Color* result = [Color alloc] init];
1190 # [result setRed:red];
1191 # [result setGreen:green];
1192 # [result setBlue:blue];
1193 # if (alpha <= 0.9999) {
1194 # [result setAlpha:floatWrapperWithValue(alpha)];
1195 # }
1196 # [result autorelease];
1197 # return result;
1198 # }
1199 # // ...
1200 #
1201 # Example (JavaScript):
1202 #
1203 # // ...
1204 #
1205 # var protoToCssColor = function(rgb_color) {
1206 # var redFrac = rgb_color.red || 0.0;
1207 # var greenFrac = rgb_color.green || 0.0;
1208 # var blueFrac = rgb_color.blue || 0.0;
1209 # var red = Math.floor(redFrac * 255);
1210 # var green = Math.floor(greenFrac * 255);
1211 # var blue = Math.floor(blueFrac * 255);
1212 #
1213 # if (!('alpha' in rgb_color)) {
1214 # return rgbToCssColor_(red, green, blue);
1215 # }
1216 #
1217 # var alphaFrac = rgb_color.alpha.value || 0.0;
1218 # var rgbParams = [red, green, blue].join(',');
1219 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1220 # };
1221 #
1222 # var rgbToCssColor_ = function(red, green, blue) {
1223 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1224 # var hexString = rgbNumber.toString(16);
1225 # var missingZeros = 6 - hexString.length;
1226 # var resultBuilder = ['#'];
1227 # for (var i = 0; i < missingZeros; i++) {
1228 # resultBuilder.push('0');
1229 # }
1230 # resultBuilder.push(hexString);
1231 # return resultBuilder.join('');
1232 # };
1233 #
1234 # // ...
1235 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1236 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1237 # the final pixel color is defined by the equation:
1238 #
1239 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1240 #
1241 # This means that a value of 1.0 corresponds to a solid color, whereas
1242 # a value of 0.0 corresponds to a completely transparent color. This
1243 # uses a wrapper message rather than a simple float scalar so that it is
1244 # possible to distinguish between a default value and the value being unset.
1245 # If omitted, this color object is to be rendered as a solid color
1246 # (as if the alpha value had been explicitly given with a value of 1.0).
1247 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1248 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1249 },
1250 "type": "A String", # How the value should be interpreted.
1251 "value": "A String", # The value this interpolation point uses. May be a formula.
1252 # Unused if type is MIN or
1253 # MAX.
1254 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001255 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001256 # These pin the gradient color scale according to the color,
1257 # type and value chosen.
1258 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1259 # for simplicity of conversion to/from color representations in various
1260 # languages over compactness; for example, the fields of this representation
1261 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1262 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1263 # method in iOS; and, with just a little work, it can be easily formatted into
1264 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1265 #
1266 # Example (Java):
1267 #
1268 # import com.google.type.Color;
1269 #
1270 # // ...
1271 # public static java.awt.Color fromProto(Color protocolor) {
1272 # float alpha = protocolor.hasAlpha()
1273 # ? protocolor.getAlpha().getValue()
1274 # : 1.0;
1275 #
1276 # return new java.awt.Color(
1277 # protocolor.getRed(),
1278 # protocolor.getGreen(),
1279 # protocolor.getBlue(),
1280 # alpha);
1281 # }
1282 #
1283 # public static Color toProto(java.awt.Color color) {
1284 # float red = (float) color.getRed();
1285 # float green = (float) color.getGreen();
1286 # float blue = (float) color.getBlue();
1287 # float denominator = 255.0;
1288 # Color.Builder resultBuilder =
1289 # Color
1290 # .newBuilder()
1291 # .setRed(red / denominator)
1292 # .setGreen(green / denominator)
1293 # .setBlue(blue / denominator);
1294 # int alpha = color.getAlpha();
1295 # if (alpha != 255) {
1296 # result.setAlpha(
1297 # FloatValue
1298 # .newBuilder()
1299 # .setValue(((float) alpha) / denominator)
1300 # .build());
1301 # }
1302 # return resultBuilder.build();
1303 # }
1304 # // ...
1305 #
1306 # Example (iOS / Obj-C):
1307 #
1308 # // ...
1309 # static UIColor* fromProto(Color* protocolor) {
1310 # float red = [protocolor red];
1311 # float green = [protocolor green];
1312 # float blue = [protocolor blue];
1313 # FloatValue* alpha_wrapper = [protocolor alpha];
1314 # float alpha = 1.0;
1315 # if (alpha_wrapper != nil) {
1316 # alpha = [alpha_wrapper value];
1317 # }
1318 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1319 # }
1320 #
1321 # static Color* toProto(UIColor* color) {
1322 # CGFloat red, green, blue, alpha;
1323 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1324 # return nil;
1325 # }
1326 # Color* result = [Color alloc] init];
1327 # [result setRed:red];
1328 # [result setGreen:green];
1329 # [result setBlue:blue];
1330 # if (alpha <= 0.9999) {
1331 # [result setAlpha:floatWrapperWithValue(alpha)];
1332 # }
1333 # [result autorelease];
1334 # return result;
1335 # }
1336 # // ...
1337 #
1338 # Example (JavaScript):
1339 #
1340 # // ...
1341 #
1342 # var protoToCssColor = function(rgb_color) {
1343 # var redFrac = rgb_color.red || 0.0;
1344 # var greenFrac = rgb_color.green || 0.0;
1345 # var blueFrac = rgb_color.blue || 0.0;
1346 # var red = Math.floor(redFrac * 255);
1347 # var green = Math.floor(greenFrac * 255);
1348 # var blue = Math.floor(blueFrac * 255);
1349 #
1350 # if (!('alpha' in rgb_color)) {
1351 # return rgbToCssColor_(red, green, blue);
1352 # }
1353 #
1354 # var alphaFrac = rgb_color.alpha.value || 0.0;
1355 # var rgbParams = [red, green, blue].join(',');
1356 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1357 # };
1358 #
1359 # var rgbToCssColor_ = function(red, green, blue) {
1360 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1361 # var hexString = rgbNumber.toString(16);
1362 # var missingZeros = 6 - hexString.length;
1363 # var resultBuilder = ['#'];
1364 # for (var i = 0; i < missingZeros; i++) {
1365 # resultBuilder.push('0');
1366 # }
1367 # resultBuilder.push(hexString);
1368 # return resultBuilder.join('');
1369 # };
1370 #
1371 # // ...
1372 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1373 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1374 # the final pixel color is defined by the equation:
1375 #
1376 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1377 #
1378 # This means that a value of 1.0 corresponds to a solid color, whereas
1379 # a value of 0.0 corresponds to a completely transparent color. This
1380 # uses a wrapper message rather than a simple float scalar so that it is
1381 # possible to distinguish between a default value and the value being unset.
1382 # If omitted, this color object is to be rendered as a solid color
1383 # (as if the alpha value had been explicitly given with a value of 1.0).
1384 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1385 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1386 },
1387 "type": "A String", # How the value should be interpreted.
1388 "value": "A String", # The value this interpolation point uses. May be a formula.
1389 # Unused if type is MIN or
1390 # MAX.
1391 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001392 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001393 # These pin the gradient color scale according to the color,
1394 # type and value chosen.
1395 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1396 # for simplicity of conversion to/from color representations in various
1397 # languages over compactness; for example, the fields of this representation
1398 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1399 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1400 # method in iOS; and, with just a little work, it can be easily formatted into
1401 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1402 #
1403 # Example (Java):
1404 #
1405 # import com.google.type.Color;
1406 #
1407 # // ...
1408 # public static java.awt.Color fromProto(Color protocolor) {
1409 # float alpha = protocolor.hasAlpha()
1410 # ? protocolor.getAlpha().getValue()
1411 # : 1.0;
1412 #
1413 # return new java.awt.Color(
1414 # protocolor.getRed(),
1415 # protocolor.getGreen(),
1416 # protocolor.getBlue(),
1417 # alpha);
1418 # }
1419 #
1420 # public static Color toProto(java.awt.Color color) {
1421 # float red = (float) color.getRed();
1422 # float green = (float) color.getGreen();
1423 # float blue = (float) color.getBlue();
1424 # float denominator = 255.0;
1425 # Color.Builder resultBuilder =
1426 # Color
1427 # .newBuilder()
1428 # .setRed(red / denominator)
1429 # .setGreen(green / denominator)
1430 # .setBlue(blue / denominator);
1431 # int alpha = color.getAlpha();
1432 # if (alpha != 255) {
1433 # result.setAlpha(
1434 # FloatValue
1435 # .newBuilder()
1436 # .setValue(((float) alpha) / denominator)
1437 # .build());
1438 # }
1439 # return resultBuilder.build();
1440 # }
1441 # // ...
1442 #
1443 # Example (iOS / Obj-C):
1444 #
1445 # // ...
1446 # static UIColor* fromProto(Color* protocolor) {
1447 # float red = [protocolor red];
1448 # float green = [protocolor green];
1449 # float blue = [protocolor blue];
1450 # FloatValue* alpha_wrapper = [protocolor alpha];
1451 # float alpha = 1.0;
1452 # if (alpha_wrapper != nil) {
1453 # alpha = [alpha_wrapper value];
1454 # }
1455 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1456 # }
1457 #
1458 # static Color* toProto(UIColor* color) {
1459 # CGFloat red, green, blue, alpha;
1460 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1461 # return nil;
1462 # }
1463 # Color* result = [Color alloc] init];
1464 # [result setRed:red];
1465 # [result setGreen:green];
1466 # [result setBlue:blue];
1467 # if (alpha <= 0.9999) {
1468 # [result setAlpha:floatWrapperWithValue(alpha)];
1469 # }
1470 # [result autorelease];
1471 # return result;
1472 # }
1473 # // ...
1474 #
1475 # Example (JavaScript):
1476 #
1477 # // ...
1478 #
1479 # var protoToCssColor = function(rgb_color) {
1480 # var redFrac = rgb_color.red || 0.0;
1481 # var greenFrac = rgb_color.green || 0.0;
1482 # var blueFrac = rgb_color.blue || 0.0;
1483 # var red = Math.floor(redFrac * 255);
1484 # var green = Math.floor(greenFrac * 255);
1485 # var blue = Math.floor(blueFrac * 255);
1486 #
1487 # if (!('alpha' in rgb_color)) {
1488 # return rgbToCssColor_(red, green, blue);
1489 # }
1490 #
1491 # var alphaFrac = rgb_color.alpha.value || 0.0;
1492 # var rgbParams = [red, green, blue].join(',');
1493 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1494 # };
1495 #
1496 # var rgbToCssColor_ = function(red, green, blue) {
1497 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1498 # var hexString = rgbNumber.toString(16);
1499 # var missingZeros = 6 - hexString.length;
1500 # var resultBuilder = ['#'];
1501 # for (var i = 0; i < missingZeros; i++) {
1502 # resultBuilder.push('0');
1503 # }
1504 # resultBuilder.push(hexString);
1505 # return resultBuilder.join('');
1506 # };
1507 #
1508 # // ...
1509 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1510 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1511 # the final pixel color is defined by the equation:
1512 #
1513 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1514 #
1515 # This means that a value of 1.0 corresponds to a solid color, whereas
1516 # a value of 0.0 corresponds to a completely transparent color. This
1517 # uses a wrapper message rather than a simple float scalar so that it is
1518 # possible to distinguish between a default value and the value being unset.
1519 # If omitted, this color object is to be rendered as a solid color
1520 # (as if the alpha value had been explicitly given with a value of 1.0).
1521 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1522 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1523 },
1524 "type": "A String", # How the value should be interpreted.
1525 "value": "A String", # The value this interpolation point uses. May be a formula.
1526 # Unused if type is MIN or
1527 # MAX.
1528 },
1529 },
1530 },
1531 },
1532 "updateProtectedRange": { # Updates an existing protected range with the specified # Updates a protected range.
1533 # protectedRangeId.
1534 "fields": "A String", # The fields that should be updated. At least one field must be specified.
1535 # The root `protectedRange` is implied and should not be specified.
1536 # A single `"*"` can be used as short-hand for listing every field.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001537 "protectedRange": { # A protected range. # The protected range to update with the new properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001538 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
1539 # Unprotected ranges are only supported on protected sheets.
1540 { # A range on a sheet.
1541 # All indexes are zero-based.
1542 # Indexes are half open, e.g the start index is inclusive
1543 # and the end index is exclusive -- [start_index, end_index).
1544 # Missing indexes indicate the range is unbounded on that side.
1545 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001546 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001547 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001548 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001549 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001550 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001551 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001552 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001553 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001554 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001555 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001556 # `Sheet1!A:B == sheet_id: 0,
1557 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001558 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001559 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001560 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001561 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001562 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001563 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001564 #
1565 # The start index must always be less than or equal to the end index.
1566 # If the start index equals the end index, then the range is empty.
1567 # Empty ranges are typically not meaningful and are usually rendered in the
1568 # UI as `#REF!`.
1569 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
1570 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
1571 "sheetId": 42, # The sheet this range is on.
1572 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
1573 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
1574 },
1575 ],
1576 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
1577 # protected area.
1578 # This field is read-only.
1579 "description": "A String", # The description of this protected range.
1580 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
1581 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001582 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001583 # may be set.
1584 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
1585 # This field is only visible to users with edit access to the protected
1586 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001587 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001588 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
1589 # range. Domain protection is only supported on documents within a domain.
1590 "users": [ # The email addresses of users with edit access to the protected range.
1591 "A String",
1592 ],
1593 "groups": [ # The email addresses of groups with edit access to the protected range.
1594 "A String",
1595 ],
1596 },
1597 "protectedRangeId": 42, # The ID of the protected range.
1598 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001599 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001600 # Warning-based protection means that every user can edit data in the
1601 # protected range, except editing will prompt a warning asking the user
1602 # to confirm the edit.
1603 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001604 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001605 # Additionally, if this field is changed from true to false and the
1606 # `editors` field is not set (nor included in the field mask), then
1607 # the editors will be set to all the editors in the document.
1608 "range": { # A range on a sheet. # The range that is being protected.
1609 # The range may be fully unbounded, in which case this is considered
1610 # a protected sheet.
1611 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001612 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001613 # may be set.
1614 # All indexes are zero-based.
1615 # Indexes are half open, e.g the start index is inclusive
1616 # and the end index is exclusive -- [start_index, end_index).
1617 # Missing indexes indicate the range is unbounded on that side.
1618 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001619 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001620 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001621 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001622 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001623 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001624 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001625 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001626 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001627 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001628 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001629 # `Sheet1!A:B == sheet_id: 0,
1630 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001631 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001632 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001633 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001634 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001635 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001636 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001637 #
1638 # The start index must always be less than or equal to the end index.
1639 # If the start index equals the end index, then the range is empty.
1640 # Empty ranges are typically not meaningful and are usually rendered in the
1641 # UI as `#REF!`.
1642 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
1643 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
1644 "sheetId": 42, # The sheet this range is on.
1645 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
1646 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
1647 },
1648 },
1649 },
1650 "deleteDimension": { # Deletes the dimensions from the sheet. # Deletes rows or columns in a sheet.
1651 "range": { # A range along a single dimension on a sheet. # The dimensions to delete from the sheet.
1652 # All indexes are zero-based.
1653 # Indexes are half open: the start index is inclusive
1654 # and the end index is exclusive.
1655 # Missing indexes indicate the range is unbounded on that side.
1656 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
1657 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
1658 "sheetId": 42, # The sheet this span is on.
1659 "dimension": "A String", # The dimension of the span.
1660 },
1661 },
1662 "addProtectedRange": { # Adds a new protected range. # Adds a protected range.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001663 "protectedRange": { # A protected range. # The protected range to be added. The
1664 # protectedRangeId field is optional; if
1665 # one is not set, an id will be randomly generated. (It is an error to
1666 # specify the ID of a range that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001667 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
1668 # Unprotected ranges are only supported on protected sheets.
1669 { # A range on a sheet.
1670 # All indexes are zero-based.
1671 # Indexes are half open, e.g the start index is inclusive
1672 # and the end index is exclusive -- [start_index, end_index).
1673 # Missing indexes indicate the range is unbounded on that side.
1674 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001675 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001676 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001677 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001678 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001679 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001680 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001681 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001682 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001683 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001684 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001685 # `Sheet1!A:B == sheet_id: 0,
1686 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001687 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001688 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001689 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001690 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001691 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001692 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001693 #
1694 # The start index must always be less than or equal to the end index.
1695 # If the start index equals the end index, then the range is empty.
1696 # Empty ranges are typically not meaningful and are usually rendered in the
1697 # UI as `#REF!`.
1698 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
1699 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
1700 "sheetId": 42, # The sheet this range is on.
1701 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
1702 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
1703 },
1704 ],
1705 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
1706 # protected area.
1707 # This field is read-only.
1708 "description": "A String", # The description of this protected range.
1709 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
1710 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001711 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001712 # may be set.
1713 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
1714 # This field is only visible to users with edit access to the protected
1715 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001716 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001717 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
1718 # range. Domain protection is only supported on documents within a domain.
1719 "users": [ # The email addresses of users with edit access to the protected range.
1720 "A String",
1721 ],
1722 "groups": [ # The email addresses of groups with edit access to the protected range.
1723 "A String",
1724 ],
1725 },
1726 "protectedRangeId": 42, # The ID of the protected range.
1727 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001728 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001729 # Warning-based protection means that every user can edit data in the
1730 # protected range, except editing will prompt a warning asking the user
1731 # to confirm the edit.
1732 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001733 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001734 # Additionally, if this field is changed from true to false and the
1735 # `editors` field is not set (nor included in the field mask), then
1736 # the editors will be set to all the editors in the document.
1737 "range": { # A range on a sheet. # The range that is being protected.
1738 # The range may be fully unbounded, in which case this is considered
1739 # a protected sheet.
1740 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001741 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001742 # may be set.
1743 # All indexes are zero-based.
1744 # Indexes are half open, e.g the start index is inclusive
1745 # and the end index is exclusive -- [start_index, end_index).
1746 # Missing indexes indicate the range is unbounded on that side.
1747 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001748 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001749 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001750 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001751 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001752 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001753 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001754 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001755 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001756 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001757 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001758 # `Sheet1!A:B == sheet_id: 0,
1759 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001760 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001761 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001762 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001763 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001764 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001765 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001766 #
1767 # The start index must always be less than or equal to the end index.
1768 # If the start index equals the end index, then the range is empty.
1769 # Empty ranges are typically not meaningful and are usually rendered in the
1770 # UI as `#REF!`.
1771 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
1772 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
1773 "sheetId": 42, # The sheet this range is on.
1774 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
1775 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
1776 },
1777 },
1778 },
1779 "deleteEmbeddedObject": { # Deletes the embedded object with the given ID. # Deletes an embedded object (e.g, chart, image) in a sheet.
1780 "objectId": 42, # The ID of the embedded object to delete.
1781 },
1782 "pasteData": { # Inserts data into the spreadsheet starting at the specified coordinate. # Pastes data (HTML or delimited) into a sheet.
1783 "coordinate": { # A coordinate in a sheet. # The coordinate at which the data should start being inserted.
1784 # All indexes are zero-based.
1785 "rowIndex": 42, # The row index of the coordinate.
1786 "columnIndex": 42, # The column index of the coordinate.
1787 "sheetId": 42, # The sheet this coordinate is on.
1788 },
1789 "type": "A String", # How the data should be pasted.
1790 "delimiter": "A String", # The delimiter in the data.
1791 "html": True or False, # True if the data is HTML.
1792 "data": "A String", # The data to insert.
1793 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001794 "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 -07001795 # inserting new rows into the sheet if necessary.
1796 "fields": "A String", # The fields of CellData that should be updated.
1797 # At least one field must be specified.
1798 # The root is the CellData; 'row.values.' should not be specified.
1799 # A single `"*"` can be used as short-hand for listing every field.
1800 "rows": [ # The data to append.
1801 { # Data about each cell in a row.
1802 "values": [ # The values in the row, one per column.
1803 { # Data about a specific cell.
1804 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
1805 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001806 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001807 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001808 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001809 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
1810 # or vertically (as rows).
1811 "rows": [ # Each row grouping in the pivot table.
1812 { # A single grouping (either row or column) in a pivot table.
1813 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
1814 "valueMetadata": [ # Metadata about values in the grouping.
1815 { # Metadata about a value in a pivot grouping.
1816 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
1817 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
1818 # (Note that formulaValue is not valid,
1819 # because the values will be calculated.)
1820 "numberValue": 3.14, # Represents a double value.
1821 # Note: Dates, Times and DateTimes are represented as doubles in
1822 # "serial number" format.
1823 "boolValue": True or False, # Represents a boolean value.
1824 "formulaValue": "A String", # Represents a formula.
1825 "stringValue": "A String", # Represents a string value.
1826 # Leading single quotes are not included. For example, if the user typed
1827 # `'123` into the UI, this would be represented as a `stringValue` of
1828 # `"123"`.
1829 "errorValue": { # An error in a cell. # Represents an error.
1830 # This field is read-only.
1831 "message": "A String", # A message with more information about the error
1832 # (in the spreadsheet's locale).
1833 "type": "A String", # The type of error.
1834 },
1835 },
1836 },
1837 ],
1838 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
1839 # If not specified, sorting is alphabetical by this group's values.
1840 "buckets": [ # Determines the bucket from which values are chosen to sort.
1841 #
1842 # For example, in a pivot table with one row group & two column groups,
1843 # the row group can list up to two values. The first value corresponds
1844 # to a value within the first column group, and the second value
1845 # corresponds to a value in the second column group. If no values
1846 # are listed, this would indicate that the row should be sorted according
1847 # to the "Grand Total" over the column groups. If a single value is listed,
1848 # this would correspond to using the "Total" of that bucket.
1849 { # The kinds of value that a cell in a spreadsheet can have.
1850 "numberValue": 3.14, # Represents a double value.
1851 # Note: Dates, Times and DateTimes are represented as doubles in
1852 # "serial number" format.
1853 "boolValue": True or False, # Represents a boolean value.
1854 "formulaValue": "A String", # Represents a formula.
1855 "stringValue": "A String", # Represents a string value.
1856 # Leading single quotes are not included. For example, if the user typed
1857 # `'123` into the UI, this would be represented as a `stringValue` of
1858 # `"123"`.
1859 "errorValue": { # An error in a cell. # Represents an error.
1860 # This field is read-only.
1861 "message": "A String", # A message with more information about the error
1862 # (in the spreadsheet's locale).
1863 "type": "A String", # The type of error.
1864 },
1865 },
1866 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001867 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001868 # grouping should be sorted by.
1869 },
1870 "sortOrder": "A String", # The order the values in this group should be sorted.
1871 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
1872 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001873 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001874 # means this group refers to column `C`, whereas the offset `1` would refer
1875 # to column `D`.
1876 },
1877 ],
1878 "source": { # A range on a sheet. # The range the pivot table is reading data from.
1879 # All indexes are zero-based.
1880 # Indexes are half open, e.g the start index is inclusive
1881 # and the end index is exclusive -- [start_index, end_index).
1882 # Missing indexes indicate the range is unbounded on that side.
1883 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001884 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001885 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001886 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001887 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001888 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001889 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001890 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001891 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001892 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001893 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001894 # `Sheet1!A:B == sheet_id: 0,
1895 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001896 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001897 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001898 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001899 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001900 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001901 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001902 #
1903 # The start index must always be less than or equal to the end index.
1904 # If the start index equals the end index, then the range is empty.
1905 # Empty ranges are typically not meaningful and are usually rendered in the
1906 # UI as `#REF!`.
1907 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
1908 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
1909 "sheetId": 42, # The sheet this range is on.
1910 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
1911 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
1912 },
1913 "values": [ # A list of values to include in the pivot table.
1914 { # The definition of how a value in a pivot table should be calculated.
1915 "formula": "A String", # A custom formula to calculate the value. The formula must start
1916 # with an `=` character.
1917 "summarizeFunction": "A String", # A function to summarize the value.
1918 # If formula is set, the only supported values are
1919 # SUM and
1920 # CUSTOM.
1921 # If sourceColumnOffset is set, then `CUSTOM`
1922 # is not supported.
1923 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
1924 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001925 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001926 # means this value refers to column `C`, whereas the offset `1` would
1927 # refer to column `D`.
1928 "name": "A String", # A name to use for the value. This is only used if formula was set.
1929 # Otherwise, the column name is used.
1930 },
1931 ],
1932 "criteria": { # An optional mapping of filters per source column offset.
1933 #
1934 # The filters will be applied before aggregating data into the pivot table.
1935 # The map's key is the column offset of the source range that you want to
1936 # filter, and the value is the criteria for that column.
1937 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001938 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001939 # for column `C`, whereas the key `1` is for column `D`.
1940 "a_key": { # Criteria for showing/hiding rows in a pivot table.
1941 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
1942 "A String",
1943 ],
1944 },
1945 },
1946 "columns": [ # Each column grouping in the pivot table.
1947 { # A single grouping (either row or column) in a pivot table.
1948 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
1949 "valueMetadata": [ # Metadata about values in the grouping.
1950 { # Metadata about a value in a pivot grouping.
1951 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
1952 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
1953 # (Note that formulaValue is not valid,
1954 # because the values will be calculated.)
1955 "numberValue": 3.14, # Represents a double value.
1956 # Note: Dates, Times and DateTimes are represented as doubles in
1957 # "serial number" format.
1958 "boolValue": True or False, # Represents a boolean value.
1959 "formulaValue": "A String", # Represents a formula.
1960 "stringValue": "A String", # Represents a string value.
1961 # Leading single quotes are not included. For example, if the user typed
1962 # `'123` into the UI, this would be represented as a `stringValue` of
1963 # `"123"`.
1964 "errorValue": { # An error in a cell. # Represents an error.
1965 # This field is read-only.
1966 "message": "A String", # A message with more information about the error
1967 # (in the spreadsheet's locale).
1968 "type": "A String", # The type of error.
1969 },
1970 },
1971 },
1972 ],
1973 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
1974 # If not specified, sorting is alphabetical by this group's values.
1975 "buckets": [ # Determines the bucket from which values are chosen to sort.
1976 #
1977 # For example, in a pivot table with one row group & two column groups,
1978 # the row group can list up to two values. The first value corresponds
1979 # to a value within the first column group, and the second value
1980 # corresponds to a value in the second column group. If no values
1981 # are listed, this would indicate that the row should be sorted according
1982 # to the "Grand Total" over the column groups. If a single value is listed,
1983 # this would correspond to using the "Total" of that bucket.
1984 { # The kinds of value that a cell in a spreadsheet can have.
1985 "numberValue": 3.14, # Represents a double value.
1986 # Note: Dates, Times and DateTimes are represented as doubles in
1987 # "serial number" format.
1988 "boolValue": True or False, # Represents a boolean value.
1989 "formulaValue": "A String", # Represents a formula.
1990 "stringValue": "A String", # Represents a string value.
1991 # Leading single quotes are not included. For example, if the user typed
1992 # `'123` into the UI, this would be represented as a `stringValue` of
1993 # `"123"`.
1994 "errorValue": { # An error in a cell. # Represents an error.
1995 # This field is read-only.
1996 "message": "A String", # A message with more information about the error
1997 # (in the spreadsheet's locale).
1998 "type": "A String", # The type of error.
1999 },
2000 },
2001 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002002 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002003 # grouping should be sorted by.
2004 },
2005 "sortOrder": "A String", # The order the values in this group should be sorted.
2006 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
2007 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002008 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002009 # means this group refers to column `C`, whereas the offset `1` would refer
2010 # to column `D`.
2011 },
2012 ],
2013 },
2014 "hyperlink": "A String", # A hyperlink this cell points to, if any.
2015 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
2016 "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
2017 # the calculated value. For cells with literals, this will be
2018 # the same as the user_entered_value.
2019 # This field is read-only.
2020 "numberValue": 3.14, # Represents a double value.
2021 # Note: Dates, Times and DateTimes are represented as doubles in
2022 # "serial number" format.
2023 "boolValue": True or False, # Represents a boolean value.
2024 "formulaValue": "A String", # Represents a formula.
2025 "stringValue": "A String", # Represents a string value.
2026 # Leading single quotes are not included. For example, if the user typed
2027 # `'123` into the UI, this would be represented as a `stringValue` of
2028 # `"123"`.
2029 "errorValue": { # An error in a cell. # Represents an error.
2030 # This field is read-only.
2031 "message": "A String", # A message with more information about the error
2032 # (in the spreadsheet's locale).
2033 "type": "A String", # The type of error.
2034 },
2035 },
2036 "formattedValue": "A String", # The formatted value of the cell.
2037 # This is the value as it's shown to the user.
2038 # This field is read-only.
2039 "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()`
2040 # Note: Dates, Times and DateTimes are represented as doubles in
2041 # serial number format.
2042 "numberValue": 3.14, # Represents a double value.
2043 # Note: Dates, Times and DateTimes are represented as doubles in
2044 # "serial number" format.
2045 "boolValue": True or False, # Represents a boolean value.
2046 "formulaValue": "A String", # Represents a formula.
2047 "stringValue": "A String", # Represents a string value.
2048 # Leading single quotes are not included. For example, if the user typed
2049 # `'123` into the UI, this would be represented as a `stringValue` of
2050 # `"123"`.
2051 "errorValue": { # An error in a cell. # Represents an error.
2052 # This field is read-only.
2053 "message": "A String", # A message with more information about the error
2054 # (in the spreadsheet's locale).
2055 "type": "A String", # The type of error.
2056 },
2057 },
2058 "note": "A String", # Any note on the cell.
2059 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
2060 # This includes the results of applying any conditional formatting and,
2061 # if the cell contains a formula, the computed number format.
2062 # If the effective format is the default format, effective format will
2063 # not be written.
2064 # This field is read-only.
2065 "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 -07002066 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
2067 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07002068 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
2069 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002070 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002071 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002072 },
2073 "textDirection": "A String", # The direction of the text in the cell.
2074 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
2075 # When updating padding, every field must be specified.
2076 "top": 42, # The top padding of the cell.
2077 "right": 42, # The right padding of the cell.
2078 "bottom": 42, # The bottom padding of the cell.
2079 "left": 42, # The left padding of the cell.
2080 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002081 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002082 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
2083 # for simplicity of conversion to/from color representations in various
2084 # languages over compactness; for example, the fields of this representation
2085 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2086 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2087 # method in iOS; and, with just a little work, it can be easily formatted into
2088 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2089 #
2090 # Example (Java):
2091 #
2092 # import com.google.type.Color;
2093 #
2094 # // ...
2095 # public static java.awt.Color fromProto(Color protocolor) {
2096 # float alpha = protocolor.hasAlpha()
2097 # ? protocolor.getAlpha().getValue()
2098 # : 1.0;
2099 #
2100 # return new java.awt.Color(
2101 # protocolor.getRed(),
2102 # protocolor.getGreen(),
2103 # protocolor.getBlue(),
2104 # alpha);
2105 # }
2106 #
2107 # public static Color toProto(java.awt.Color color) {
2108 # float red = (float) color.getRed();
2109 # float green = (float) color.getGreen();
2110 # float blue = (float) color.getBlue();
2111 # float denominator = 255.0;
2112 # Color.Builder resultBuilder =
2113 # Color
2114 # .newBuilder()
2115 # .setRed(red / denominator)
2116 # .setGreen(green / denominator)
2117 # .setBlue(blue / denominator);
2118 # int alpha = color.getAlpha();
2119 # if (alpha != 255) {
2120 # result.setAlpha(
2121 # FloatValue
2122 # .newBuilder()
2123 # .setValue(((float) alpha) / denominator)
2124 # .build());
2125 # }
2126 # return resultBuilder.build();
2127 # }
2128 # // ...
2129 #
2130 # Example (iOS / Obj-C):
2131 #
2132 # // ...
2133 # static UIColor* fromProto(Color* protocolor) {
2134 # float red = [protocolor red];
2135 # float green = [protocolor green];
2136 # float blue = [protocolor blue];
2137 # FloatValue* alpha_wrapper = [protocolor alpha];
2138 # float alpha = 1.0;
2139 # if (alpha_wrapper != nil) {
2140 # alpha = [alpha_wrapper value];
2141 # }
2142 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2143 # }
2144 #
2145 # static Color* toProto(UIColor* color) {
2146 # CGFloat red, green, blue, alpha;
2147 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2148 # return nil;
2149 # }
2150 # Color* result = [Color alloc] init];
2151 # [result setRed:red];
2152 # [result setGreen:green];
2153 # [result setBlue:blue];
2154 # if (alpha <= 0.9999) {
2155 # [result setAlpha:floatWrapperWithValue(alpha)];
2156 # }
2157 # [result autorelease];
2158 # return result;
2159 # }
2160 # // ...
2161 #
2162 # Example (JavaScript):
2163 #
2164 # // ...
2165 #
2166 # var protoToCssColor = function(rgb_color) {
2167 # var redFrac = rgb_color.red || 0.0;
2168 # var greenFrac = rgb_color.green || 0.0;
2169 # var blueFrac = rgb_color.blue || 0.0;
2170 # var red = Math.floor(redFrac * 255);
2171 # var green = Math.floor(greenFrac * 255);
2172 # var blue = Math.floor(blueFrac * 255);
2173 #
2174 # if (!('alpha' in rgb_color)) {
2175 # return rgbToCssColor_(red, green, blue);
2176 # }
2177 #
2178 # var alphaFrac = rgb_color.alpha.value || 0.0;
2179 # var rgbParams = [red, green, blue].join(',');
2180 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2181 # };
2182 #
2183 # var rgbToCssColor_ = function(red, green, blue) {
2184 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2185 # var hexString = rgbNumber.toString(16);
2186 # var missingZeros = 6 - hexString.length;
2187 # var resultBuilder = ['#'];
2188 # for (var i = 0; i < missingZeros; i++) {
2189 # resultBuilder.push('0');
2190 # }
2191 # resultBuilder.push(hexString);
2192 # return resultBuilder.join('');
2193 # };
2194 #
2195 # // ...
2196 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2197 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2198 # the final pixel color is defined by the equation:
2199 #
2200 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2201 #
2202 # This means that a value of 1.0 corresponds to a solid color, whereas
2203 # a value of 0.0 corresponds to a completely transparent color. This
2204 # uses a wrapper message rather than a simple float scalar so that it is
2205 # possible to distinguish between a default value and the value being unset.
2206 # If omitted, this color object is to be rendered as a solid color
2207 # (as if the alpha value had been explicitly given with a value of 1.0).
2208 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2209 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2210 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002211 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002212 "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).
2213 # Absent values indicate that the field isn't specified.
2214 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
2215 # for simplicity of conversion to/from color representations in various
2216 # languages over compactness; for example, the fields of this representation
2217 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2218 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2219 # method in iOS; and, with just a little work, it can be easily formatted into
2220 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2221 #
2222 # Example (Java):
2223 #
2224 # import com.google.type.Color;
2225 #
2226 # // ...
2227 # public static java.awt.Color fromProto(Color protocolor) {
2228 # float alpha = protocolor.hasAlpha()
2229 # ? protocolor.getAlpha().getValue()
2230 # : 1.0;
2231 #
2232 # return new java.awt.Color(
2233 # protocolor.getRed(),
2234 # protocolor.getGreen(),
2235 # protocolor.getBlue(),
2236 # alpha);
2237 # }
2238 #
2239 # public static Color toProto(java.awt.Color color) {
2240 # float red = (float) color.getRed();
2241 # float green = (float) color.getGreen();
2242 # float blue = (float) color.getBlue();
2243 # float denominator = 255.0;
2244 # Color.Builder resultBuilder =
2245 # Color
2246 # .newBuilder()
2247 # .setRed(red / denominator)
2248 # .setGreen(green / denominator)
2249 # .setBlue(blue / denominator);
2250 # int alpha = color.getAlpha();
2251 # if (alpha != 255) {
2252 # result.setAlpha(
2253 # FloatValue
2254 # .newBuilder()
2255 # .setValue(((float) alpha) / denominator)
2256 # .build());
2257 # }
2258 # return resultBuilder.build();
2259 # }
2260 # // ...
2261 #
2262 # Example (iOS / Obj-C):
2263 #
2264 # // ...
2265 # static UIColor* fromProto(Color* protocolor) {
2266 # float red = [protocolor red];
2267 # float green = [protocolor green];
2268 # float blue = [protocolor blue];
2269 # FloatValue* alpha_wrapper = [protocolor alpha];
2270 # float alpha = 1.0;
2271 # if (alpha_wrapper != nil) {
2272 # alpha = [alpha_wrapper value];
2273 # }
2274 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2275 # }
2276 #
2277 # static Color* toProto(UIColor* color) {
2278 # CGFloat red, green, blue, alpha;
2279 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2280 # return nil;
2281 # }
2282 # Color* result = [Color alloc] init];
2283 # [result setRed:red];
2284 # [result setGreen:green];
2285 # [result setBlue:blue];
2286 # if (alpha <= 0.9999) {
2287 # [result setAlpha:floatWrapperWithValue(alpha)];
2288 # }
2289 # [result autorelease];
2290 # return result;
2291 # }
2292 # // ...
2293 #
2294 # Example (JavaScript):
2295 #
2296 # // ...
2297 #
2298 # var protoToCssColor = function(rgb_color) {
2299 # var redFrac = rgb_color.red || 0.0;
2300 # var greenFrac = rgb_color.green || 0.0;
2301 # var blueFrac = rgb_color.blue || 0.0;
2302 # var red = Math.floor(redFrac * 255);
2303 # var green = Math.floor(greenFrac * 255);
2304 # var blue = Math.floor(blueFrac * 255);
2305 #
2306 # if (!('alpha' in rgb_color)) {
2307 # return rgbToCssColor_(red, green, blue);
2308 # }
2309 #
2310 # var alphaFrac = rgb_color.alpha.value || 0.0;
2311 # var rgbParams = [red, green, blue].join(',');
2312 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2313 # };
2314 #
2315 # var rgbToCssColor_ = function(red, green, blue) {
2316 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2317 # var hexString = rgbNumber.toString(16);
2318 # var missingZeros = 6 - hexString.length;
2319 # var resultBuilder = ['#'];
2320 # for (var i = 0; i < missingZeros; i++) {
2321 # resultBuilder.push('0');
2322 # }
2323 # resultBuilder.push(hexString);
2324 # return resultBuilder.join('');
2325 # };
2326 #
2327 # // ...
2328 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2329 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2330 # the final pixel color is defined by the equation:
2331 #
2332 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2333 #
2334 # This means that a value of 1.0 corresponds to a solid color, whereas
2335 # a value of 0.0 corresponds to a completely transparent color. This
2336 # uses a wrapper message rather than a simple float scalar so that it is
2337 # possible to distinguish between a default value and the value being unset.
2338 # If omitted, this color object is to be rendered as a solid color
2339 # (as if the alpha value had been explicitly given with a value of 1.0).
2340 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2341 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2342 },
2343 "bold": True or False, # True if the text is bold.
2344 "strikethrough": True or False, # True if the text has a strikethrough.
2345 "fontFamily": "A String", # The font family.
2346 "fontSize": 42, # The size of the font.
2347 "italic": True or False, # True if the text is italicized.
2348 "underline": True or False, # True if the text is underlined.
2349 },
2350 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
2351 "borders": { # The borders of the cell. # The borders of the cell.
2352 "top": { # A border along a cell. # The top border of the cell.
2353 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2354 # for simplicity of conversion to/from color representations in various
2355 # languages over compactness; for example, the fields of this representation
2356 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2357 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2358 # method in iOS; and, with just a little work, it can be easily formatted into
2359 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2360 #
2361 # Example (Java):
2362 #
2363 # import com.google.type.Color;
2364 #
2365 # // ...
2366 # public static java.awt.Color fromProto(Color protocolor) {
2367 # float alpha = protocolor.hasAlpha()
2368 # ? protocolor.getAlpha().getValue()
2369 # : 1.0;
2370 #
2371 # return new java.awt.Color(
2372 # protocolor.getRed(),
2373 # protocolor.getGreen(),
2374 # protocolor.getBlue(),
2375 # alpha);
2376 # }
2377 #
2378 # public static Color toProto(java.awt.Color color) {
2379 # float red = (float) color.getRed();
2380 # float green = (float) color.getGreen();
2381 # float blue = (float) color.getBlue();
2382 # float denominator = 255.0;
2383 # Color.Builder resultBuilder =
2384 # Color
2385 # .newBuilder()
2386 # .setRed(red / denominator)
2387 # .setGreen(green / denominator)
2388 # .setBlue(blue / denominator);
2389 # int alpha = color.getAlpha();
2390 # if (alpha != 255) {
2391 # result.setAlpha(
2392 # FloatValue
2393 # .newBuilder()
2394 # .setValue(((float) alpha) / denominator)
2395 # .build());
2396 # }
2397 # return resultBuilder.build();
2398 # }
2399 # // ...
2400 #
2401 # Example (iOS / Obj-C):
2402 #
2403 # // ...
2404 # static UIColor* fromProto(Color* protocolor) {
2405 # float red = [protocolor red];
2406 # float green = [protocolor green];
2407 # float blue = [protocolor blue];
2408 # FloatValue* alpha_wrapper = [protocolor alpha];
2409 # float alpha = 1.0;
2410 # if (alpha_wrapper != nil) {
2411 # alpha = [alpha_wrapper value];
2412 # }
2413 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2414 # }
2415 #
2416 # static Color* toProto(UIColor* color) {
2417 # CGFloat red, green, blue, alpha;
2418 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2419 # return nil;
2420 # }
2421 # Color* result = [Color alloc] init];
2422 # [result setRed:red];
2423 # [result setGreen:green];
2424 # [result setBlue:blue];
2425 # if (alpha <= 0.9999) {
2426 # [result setAlpha:floatWrapperWithValue(alpha)];
2427 # }
2428 # [result autorelease];
2429 # return result;
2430 # }
2431 # // ...
2432 #
2433 # Example (JavaScript):
2434 #
2435 # // ...
2436 #
2437 # var protoToCssColor = function(rgb_color) {
2438 # var redFrac = rgb_color.red || 0.0;
2439 # var greenFrac = rgb_color.green || 0.0;
2440 # var blueFrac = rgb_color.blue || 0.0;
2441 # var red = Math.floor(redFrac * 255);
2442 # var green = Math.floor(greenFrac * 255);
2443 # var blue = Math.floor(blueFrac * 255);
2444 #
2445 # if (!('alpha' in rgb_color)) {
2446 # return rgbToCssColor_(red, green, blue);
2447 # }
2448 #
2449 # var alphaFrac = rgb_color.alpha.value || 0.0;
2450 # var rgbParams = [red, green, blue].join(',');
2451 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2452 # };
2453 #
2454 # var rgbToCssColor_ = function(red, green, blue) {
2455 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2456 # var hexString = rgbNumber.toString(16);
2457 # var missingZeros = 6 - hexString.length;
2458 # var resultBuilder = ['#'];
2459 # for (var i = 0; i < missingZeros; i++) {
2460 # resultBuilder.push('0');
2461 # }
2462 # resultBuilder.push(hexString);
2463 # return resultBuilder.join('');
2464 # };
2465 #
2466 # // ...
2467 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2468 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2469 # the final pixel color is defined by the equation:
2470 #
2471 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2472 #
2473 # This means that a value of 1.0 corresponds to a solid color, whereas
2474 # a value of 0.0 corresponds to a completely transparent color. This
2475 # uses a wrapper message rather than a simple float scalar so that it is
2476 # possible to distinguish between a default value and the value being unset.
2477 # If omitted, this color object is to be rendered as a solid color
2478 # (as if the alpha value had been explicitly given with a value of 1.0).
2479 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2480 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2481 },
2482 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002483 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002484 "style": "A String", # The style of the border.
2485 },
2486 "right": { # A border along a cell. # The right border of the cell.
2487 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2488 # for simplicity of conversion to/from color representations in various
2489 # languages over compactness; for example, the fields of this representation
2490 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2491 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2492 # method in iOS; and, with just a little work, it can be easily formatted into
2493 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2494 #
2495 # Example (Java):
2496 #
2497 # import com.google.type.Color;
2498 #
2499 # // ...
2500 # public static java.awt.Color fromProto(Color protocolor) {
2501 # float alpha = protocolor.hasAlpha()
2502 # ? protocolor.getAlpha().getValue()
2503 # : 1.0;
2504 #
2505 # return new java.awt.Color(
2506 # protocolor.getRed(),
2507 # protocolor.getGreen(),
2508 # protocolor.getBlue(),
2509 # alpha);
2510 # }
2511 #
2512 # public static Color toProto(java.awt.Color color) {
2513 # float red = (float) color.getRed();
2514 # float green = (float) color.getGreen();
2515 # float blue = (float) color.getBlue();
2516 # float denominator = 255.0;
2517 # Color.Builder resultBuilder =
2518 # Color
2519 # .newBuilder()
2520 # .setRed(red / denominator)
2521 # .setGreen(green / denominator)
2522 # .setBlue(blue / denominator);
2523 # int alpha = color.getAlpha();
2524 # if (alpha != 255) {
2525 # result.setAlpha(
2526 # FloatValue
2527 # .newBuilder()
2528 # .setValue(((float) alpha) / denominator)
2529 # .build());
2530 # }
2531 # return resultBuilder.build();
2532 # }
2533 # // ...
2534 #
2535 # Example (iOS / Obj-C):
2536 #
2537 # // ...
2538 # static UIColor* fromProto(Color* protocolor) {
2539 # float red = [protocolor red];
2540 # float green = [protocolor green];
2541 # float blue = [protocolor blue];
2542 # FloatValue* alpha_wrapper = [protocolor alpha];
2543 # float alpha = 1.0;
2544 # if (alpha_wrapper != nil) {
2545 # alpha = [alpha_wrapper value];
2546 # }
2547 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2548 # }
2549 #
2550 # static Color* toProto(UIColor* color) {
2551 # CGFloat red, green, blue, alpha;
2552 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2553 # return nil;
2554 # }
2555 # Color* result = [Color alloc] init];
2556 # [result setRed:red];
2557 # [result setGreen:green];
2558 # [result setBlue:blue];
2559 # if (alpha <= 0.9999) {
2560 # [result setAlpha:floatWrapperWithValue(alpha)];
2561 # }
2562 # [result autorelease];
2563 # return result;
2564 # }
2565 # // ...
2566 #
2567 # Example (JavaScript):
2568 #
2569 # // ...
2570 #
2571 # var protoToCssColor = function(rgb_color) {
2572 # var redFrac = rgb_color.red || 0.0;
2573 # var greenFrac = rgb_color.green || 0.0;
2574 # var blueFrac = rgb_color.blue || 0.0;
2575 # var red = Math.floor(redFrac * 255);
2576 # var green = Math.floor(greenFrac * 255);
2577 # var blue = Math.floor(blueFrac * 255);
2578 #
2579 # if (!('alpha' in rgb_color)) {
2580 # return rgbToCssColor_(red, green, blue);
2581 # }
2582 #
2583 # var alphaFrac = rgb_color.alpha.value || 0.0;
2584 # var rgbParams = [red, green, blue].join(',');
2585 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2586 # };
2587 #
2588 # var rgbToCssColor_ = function(red, green, blue) {
2589 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2590 # var hexString = rgbNumber.toString(16);
2591 # var missingZeros = 6 - hexString.length;
2592 # var resultBuilder = ['#'];
2593 # for (var i = 0; i < missingZeros; i++) {
2594 # resultBuilder.push('0');
2595 # }
2596 # resultBuilder.push(hexString);
2597 # return resultBuilder.join('');
2598 # };
2599 #
2600 # // ...
2601 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2602 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2603 # the final pixel color is defined by the equation:
2604 #
2605 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2606 #
2607 # This means that a value of 1.0 corresponds to a solid color, whereas
2608 # a value of 0.0 corresponds to a completely transparent color. This
2609 # uses a wrapper message rather than a simple float scalar so that it is
2610 # possible to distinguish between a default value and the value being unset.
2611 # If omitted, this color object is to be rendered as a solid color
2612 # (as if the alpha value had been explicitly given with a value of 1.0).
2613 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2614 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2615 },
2616 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002617 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002618 "style": "A String", # The style of the border.
2619 },
2620 "bottom": { # A border along a cell. # The bottom border of the cell.
2621 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2622 # for simplicity of conversion to/from color representations in various
2623 # languages over compactness; for example, the fields of this representation
2624 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2625 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2626 # method in iOS; and, with just a little work, it can be easily formatted into
2627 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2628 #
2629 # Example (Java):
2630 #
2631 # import com.google.type.Color;
2632 #
2633 # // ...
2634 # public static java.awt.Color fromProto(Color protocolor) {
2635 # float alpha = protocolor.hasAlpha()
2636 # ? protocolor.getAlpha().getValue()
2637 # : 1.0;
2638 #
2639 # return new java.awt.Color(
2640 # protocolor.getRed(),
2641 # protocolor.getGreen(),
2642 # protocolor.getBlue(),
2643 # alpha);
2644 # }
2645 #
2646 # public static Color toProto(java.awt.Color color) {
2647 # float red = (float) color.getRed();
2648 # float green = (float) color.getGreen();
2649 # float blue = (float) color.getBlue();
2650 # float denominator = 255.0;
2651 # Color.Builder resultBuilder =
2652 # Color
2653 # .newBuilder()
2654 # .setRed(red / denominator)
2655 # .setGreen(green / denominator)
2656 # .setBlue(blue / denominator);
2657 # int alpha = color.getAlpha();
2658 # if (alpha != 255) {
2659 # result.setAlpha(
2660 # FloatValue
2661 # .newBuilder()
2662 # .setValue(((float) alpha) / denominator)
2663 # .build());
2664 # }
2665 # return resultBuilder.build();
2666 # }
2667 # // ...
2668 #
2669 # Example (iOS / Obj-C):
2670 #
2671 # // ...
2672 # static UIColor* fromProto(Color* protocolor) {
2673 # float red = [protocolor red];
2674 # float green = [protocolor green];
2675 # float blue = [protocolor blue];
2676 # FloatValue* alpha_wrapper = [protocolor alpha];
2677 # float alpha = 1.0;
2678 # if (alpha_wrapper != nil) {
2679 # alpha = [alpha_wrapper value];
2680 # }
2681 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2682 # }
2683 #
2684 # static Color* toProto(UIColor* color) {
2685 # CGFloat red, green, blue, alpha;
2686 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2687 # return nil;
2688 # }
2689 # Color* result = [Color alloc] init];
2690 # [result setRed:red];
2691 # [result setGreen:green];
2692 # [result setBlue:blue];
2693 # if (alpha <= 0.9999) {
2694 # [result setAlpha:floatWrapperWithValue(alpha)];
2695 # }
2696 # [result autorelease];
2697 # return result;
2698 # }
2699 # // ...
2700 #
2701 # Example (JavaScript):
2702 #
2703 # // ...
2704 #
2705 # var protoToCssColor = function(rgb_color) {
2706 # var redFrac = rgb_color.red || 0.0;
2707 # var greenFrac = rgb_color.green || 0.0;
2708 # var blueFrac = rgb_color.blue || 0.0;
2709 # var red = Math.floor(redFrac * 255);
2710 # var green = Math.floor(greenFrac * 255);
2711 # var blue = Math.floor(blueFrac * 255);
2712 #
2713 # if (!('alpha' in rgb_color)) {
2714 # return rgbToCssColor_(red, green, blue);
2715 # }
2716 #
2717 # var alphaFrac = rgb_color.alpha.value || 0.0;
2718 # var rgbParams = [red, green, blue].join(',');
2719 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2720 # };
2721 #
2722 # var rgbToCssColor_ = function(red, green, blue) {
2723 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2724 # var hexString = rgbNumber.toString(16);
2725 # var missingZeros = 6 - hexString.length;
2726 # var resultBuilder = ['#'];
2727 # for (var i = 0; i < missingZeros; i++) {
2728 # resultBuilder.push('0');
2729 # }
2730 # resultBuilder.push(hexString);
2731 # return resultBuilder.join('');
2732 # };
2733 #
2734 # // ...
2735 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2736 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2737 # the final pixel color is defined by the equation:
2738 #
2739 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2740 #
2741 # This means that a value of 1.0 corresponds to a solid color, whereas
2742 # a value of 0.0 corresponds to a completely transparent color. This
2743 # uses a wrapper message rather than a simple float scalar so that it is
2744 # possible to distinguish between a default value and the value being unset.
2745 # If omitted, this color object is to be rendered as a solid color
2746 # (as if the alpha value had been explicitly given with a value of 1.0).
2747 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2748 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2749 },
2750 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002751 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002752 "style": "A String", # The style of the border.
2753 },
2754 "left": { # A border along a cell. # The left border of the cell.
2755 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2756 # for simplicity of conversion to/from color representations in various
2757 # languages over compactness; for example, the fields of this representation
2758 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2759 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2760 # method in iOS; and, with just a little work, it can be easily formatted into
2761 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2762 #
2763 # Example (Java):
2764 #
2765 # import com.google.type.Color;
2766 #
2767 # // ...
2768 # public static java.awt.Color fromProto(Color protocolor) {
2769 # float alpha = protocolor.hasAlpha()
2770 # ? protocolor.getAlpha().getValue()
2771 # : 1.0;
2772 #
2773 # return new java.awt.Color(
2774 # protocolor.getRed(),
2775 # protocolor.getGreen(),
2776 # protocolor.getBlue(),
2777 # alpha);
2778 # }
2779 #
2780 # public static Color toProto(java.awt.Color color) {
2781 # float red = (float) color.getRed();
2782 # float green = (float) color.getGreen();
2783 # float blue = (float) color.getBlue();
2784 # float denominator = 255.0;
2785 # Color.Builder resultBuilder =
2786 # Color
2787 # .newBuilder()
2788 # .setRed(red / denominator)
2789 # .setGreen(green / denominator)
2790 # .setBlue(blue / denominator);
2791 # int alpha = color.getAlpha();
2792 # if (alpha != 255) {
2793 # result.setAlpha(
2794 # FloatValue
2795 # .newBuilder()
2796 # .setValue(((float) alpha) / denominator)
2797 # .build());
2798 # }
2799 # return resultBuilder.build();
2800 # }
2801 # // ...
2802 #
2803 # Example (iOS / Obj-C):
2804 #
2805 # // ...
2806 # static UIColor* fromProto(Color* protocolor) {
2807 # float red = [protocolor red];
2808 # float green = [protocolor green];
2809 # float blue = [protocolor blue];
2810 # FloatValue* alpha_wrapper = [protocolor alpha];
2811 # float alpha = 1.0;
2812 # if (alpha_wrapper != nil) {
2813 # alpha = [alpha_wrapper value];
2814 # }
2815 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2816 # }
2817 #
2818 # static Color* toProto(UIColor* color) {
2819 # CGFloat red, green, blue, alpha;
2820 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2821 # return nil;
2822 # }
2823 # Color* result = [Color alloc] init];
2824 # [result setRed:red];
2825 # [result setGreen:green];
2826 # [result setBlue:blue];
2827 # if (alpha <= 0.9999) {
2828 # [result setAlpha:floatWrapperWithValue(alpha)];
2829 # }
2830 # [result autorelease];
2831 # return result;
2832 # }
2833 # // ...
2834 #
2835 # Example (JavaScript):
2836 #
2837 # // ...
2838 #
2839 # var protoToCssColor = function(rgb_color) {
2840 # var redFrac = rgb_color.red || 0.0;
2841 # var greenFrac = rgb_color.green || 0.0;
2842 # var blueFrac = rgb_color.blue || 0.0;
2843 # var red = Math.floor(redFrac * 255);
2844 # var green = Math.floor(greenFrac * 255);
2845 # var blue = Math.floor(blueFrac * 255);
2846 #
2847 # if (!('alpha' in rgb_color)) {
2848 # return rgbToCssColor_(red, green, blue);
2849 # }
2850 #
2851 # var alphaFrac = rgb_color.alpha.value || 0.0;
2852 # var rgbParams = [red, green, blue].join(',');
2853 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2854 # };
2855 #
2856 # var rgbToCssColor_ = function(red, green, blue) {
2857 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2858 # var hexString = rgbNumber.toString(16);
2859 # var missingZeros = 6 - hexString.length;
2860 # var resultBuilder = ['#'];
2861 # for (var i = 0; i < missingZeros; i++) {
2862 # resultBuilder.push('0');
2863 # }
2864 # resultBuilder.push(hexString);
2865 # return resultBuilder.join('');
2866 # };
2867 #
2868 # // ...
2869 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2870 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2871 # the final pixel color is defined by the equation:
2872 #
2873 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2874 #
2875 # This means that a value of 1.0 corresponds to a solid color, whereas
2876 # a value of 0.0 corresponds to a completely transparent color. This
2877 # uses a wrapper message rather than a simple float scalar so that it is
2878 # possible to distinguish between a default value and the value being unset.
2879 # If omitted, this color object is to be rendered as a solid color
2880 # (as if the alpha value had been explicitly given with a value of 1.0).
2881 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2882 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2883 },
2884 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002885 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002886 "style": "A String", # The style of the border.
2887 },
2888 },
2889 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
2890 },
2891 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
2892 #
2893 # When writing, the new format will be merged with the existing format.
2894 "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 -07002895 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
2896 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07002897 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
2898 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002899 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002900 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002901 },
2902 "textDirection": "A String", # The direction of the text in the cell.
2903 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
2904 # When updating padding, every field must be specified.
2905 "top": 42, # The top padding of the cell.
2906 "right": 42, # The right padding of the cell.
2907 "bottom": 42, # The bottom padding of the cell.
2908 "left": 42, # The left padding of the cell.
2909 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002910 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002911 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
2912 # for simplicity of conversion to/from color representations in various
2913 # languages over compactness; for example, the fields of this representation
2914 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2915 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2916 # method in iOS; and, with just a little work, it can be easily formatted into
2917 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2918 #
2919 # Example (Java):
2920 #
2921 # import com.google.type.Color;
2922 #
2923 # // ...
2924 # public static java.awt.Color fromProto(Color protocolor) {
2925 # float alpha = protocolor.hasAlpha()
2926 # ? protocolor.getAlpha().getValue()
2927 # : 1.0;
2928 #
2929 # return new java.awt.Color(
2930 # protocolor.getRed(),
2931 # protocolor.getGreen(),
2932 # protocolor.getBlue(),
2933 # alpha);
2934 # }
2935 #
2936 # public static Color toProto(java.awt.Color color) {
2937 # float red = (float) color.getRed();
2938 # float green = (float) color.getGreen();
2939 # float blue = (float) color.getBlue();
2940 # float denominator = 255.0;
2941 # Color.Builder resultBuilder =
2942 # Color
2943 # .newBuilder()
2944 # .setRed(red / denominator)
2945 # .setGreen(green / denominator)
2946 # .setBlue(blue / denominator);
2947 # int alpha = color.getAlpha();
2948 # if (alpha != 255) {
2949 # result.setAlpha(
2950 # FloatValue
2951 # .newBuilder()
2952 # .setValue(((float) alpha) / denominator)
2953 # .build());
2954 # }
2955 # return resultBuilder.build();
2956 # }
2957 # // ...
2958 #
2959 # Example (iOS / Obj-C):
2960 #
2961 # // ...
2962 # static UIColor* fromProto(Color* protocolor) {
2963 # float red = [protocolor red];
2964 # float green = [protocolor green];
2965 # float blue = [protocolor blue];
2966 # FloatValue* alpha_wrapper = [protocolor alpha];
2967 # float alpha = 1.0;
2968 # if (alpha_wrapper != nil) {
2969 # alpha = [alpha_wrapper value];
2970 # }
2971 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2972 # }
2973 #
2974 # static Color* toProto(UIColor* color) {
2975 # CGFloat red, green, blue, alpha;
2976 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2977 # return nil;
2978 # }
2979 # Color* result = [Color alloc] init];
2980 # [result setRed:red];
2981 # [result setGreen:green];
2982 # [result setBlue:blue];
2983 # if (alpha <= 0.9999) {
2984 # [result setAlpha:floatWrapperWithValue(alpha)];
2985 # }
2986 # [result autorelease];
2987 # return result;
2988 # }
2989 # // ...
2990 #
2991 # Example (JavaScript):
2992 #
2993 # // ...
2994 #
2995 # var protoToCssColor = function(rgb_color) {
2996 # var redFrac = rgb_color.red || 0.0;
2997 # var greenFrac = rgb_color.green || 0.0;
2998 # var blueFrac = rgb_color.blue || 0.0;
2999 # var red = Math.floor(redFrac * 255);
3000 # var green = Math.floor(greenFrac * 255);
3001 # var blue = Math.floor(blueFrac * 255);
3002 #
3003 # if (!('alpha' in rgb_color)) {
3004 # return rgbToCssColor_(red, green, blue);
3005 # }
3006 #
3007 # var alphaFrac = rgb_color.alpha.value || 0.0;
3008 # var rgbParams = [red, green, blue].join(',');
3009 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3010 # };
3011 #
3012 # var rgbToCssColor_ = function(red, green, blue) {
3013 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3014 # var hexString = rgbNumber.toString(16);
3015 # var missingZeros = 6 - hexString.length;
3016 # var resultBuilder = ['#'];
3017 # for (var i = 0; i < missingZeros; i++) {
3018 # resultBuilder.push('0');
3019 # }
3020 # resultBuilder.push(hexString);
3021 # return resultBuilder.join('');
3022 # };
3023 #
3024 # // ...
3025 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3026 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3027 # the final pixel color is defined by the equation:
3028 #
3029 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3030 #
3031 # This means that a value of 1.0 corresponds to a solid color, whereas
3032 # a value of 0.0 corresponds to a completely transparent color. This
3033 # uses a wrapper message rather than a simple float scalar so that it is
3034 # possible to distinguish between a default value and the value being unset.
3035 # If omitted, this color object is to be rendered as a solid color
3036 # (as if the alpha value had been explicitly given with a value of 1.0).
3037 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3038 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3039 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003040 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003041 "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).
3042 # Absent values indicate that the field isn't specified.
3043 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
3044 # for simplicity of conversion to/from color representations in various
3045 # languages over compactness; for example, the fields of this representation
3046 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3047 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3048 # method in iOS; and, with just a little work, it can be easily formatted into
3049 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3050 #
3051 # Example (Java):
3052 #
3053 # import com.google.type.Color;
3054 #
3055 # // ...
3056 # public static java.awt.Color fromProto(Color protocolor) {
3057 # float alpha = protocolor.hasAlpha()
3058 # ? protocolor.getAlpha().getValue()
3059 # : 1.0;
3060 #
3061 # return new java.awt.Color(
3062 # protocolor.getRed(),
3063 # protocolor.getGreen(),
3064 # protocolor.getBlue(),
3065 # alpha);
3066 # }
3067 #
3068 # public static Color toProto(java.awt.Color color) {
3069 # float red = (float) color.getRed();
3070 # float green = (float) color.getGreen();
3071 # float blue = (float) color.getBlue();
3072 # float denominator = 255.0;
3073 # Color.Builder resultBuilder =
3074 # Color
3075 # .newBuilder()
3076 # .setRed(red / denominator)
3077 # .setGreen(green / denominator)
3078 # .setBlue(blue / denominator);
3079 # int alpha = color.getAlpha();
3080 # if (alpha != 255) {
3081 # result.setAlpha(
3082 # FloatValue
3083 # .newBuilder()
3084 # .setValue(((float) alpha) / denominator)
3085 # .build());
3086 # }
3087 # return resultBuilder.build();
3088 # }
3089 # // ...
3090 #
3091 # Example (iOS / Obj-C):
3092 #
3093 # // ...
3094 # static UIColor* fromProto(Color* protocolor) {
3095 # float red = [protocolor red];
3096 # float green = [protocolor green];
3097 # float blue = [protocolor blue];
3098 # FloatValue* alpha_wrapper = [protocolor alpha];
3099 # float alpha = 1.0;
3100 # if (alpha_wrapper != nil) {
3101 # alpha = [alpha_wrapper value];
3102 # }
3103 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3104 # }
3105 #
3106 # static Color* toProto(UIColor* color) {
3107 # CGFloat red, green, blue, alpha;
3108 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3109 # return nil;
3110 # }
3111 # Color* result = [Color alloc] init];
3112 # [result setRed:red];
3113 # [result setGreen:green];
3114 # [result setBlue:blue];
3115 # if (alpha <= 0.9999) {
3116 # [result setAlpha:floatWrapperWithValue(alpha)];
3117 # }
3118 # [result autorelease];
3119 # return result;
3120 # }
3121 # // ...
3122 #
3123 # Example (JavaScript):
3124 #
3125 # // ...
3126 #
3127 # var protoToCssColor = function(rgb_color) {
3128 # var redFrac = rgb_color.red || 0.0;
3129 # var greenFrac = rgb_color.green || 0.0;
3130 # var blueFrac = rgb_color.blue || 0.0;
3131 # var red = Math.floor(redFrac * 255);
3132 # var green = Math.floor(greenFrac * 255);
3133 # var blue = Math.floor(blueFrac * 255);
3134 #
3135 # if (!('alpha' in rgb_color)) {
3136 # return rgbToCssColor_(red, green, blue);
3137 # }
3138 #
3139 # var alphaFrac = rgb_color.alpha.value || 0.0;
3140 # var rgbParams = [red, green, blue].join(',');
3141 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3142 # };
3143 #
3144 # var rgbToCssColor_ = function(red, green, blue) {
3145 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3146 # var hexString = rgbNumber.toString(16);
3147 # var missingZeros = 6 - hexString.length;
3148 # var resultBuilder = ['#'];
3149 # for (var i = 0; i < missingZeros; i++) {
3150 # resultBuilder.push('0');
3151 # }
3152 # resultBuilder.push(hexString);
3153 # return resultBuilder.join('');
3154 # };
3155 #
3156 # // ...
3157 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3158 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3159 # the final pixel color is defined by the equation:
3160 #
3161 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3162 #
3163 # This means that a value of 1.0 corresponds to a solid color, whereas
3164 # a value of 0.0 corresponds to a completely transparent color. This
3165 # uses a wrapper message rather than a simple float scalar so that it is
3166 # possible to distinguish between a default value and the value being unset.
3167 # If omitted, this color object is to be rendered as a solid color
3168 # (as if the alpha value had been explicitly given with a value of 1.0).
3169 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3170 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3171 },
3172 "bold": True or False, # True if the text is bold.
3173 "strikethrough": True or False, # True if the text has a strikethrough.
3174 "fontFamily": "A String", # The font family.
3175 "fontSize": 42, # The size of the font.
3176 "italic": True or False, # True if the text is italicized.
3177 "underline": True or False, # True if the text is underlined.
3178 },
3179 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
3180 "borders": { # The borders of the cell. # The borders of the cell.
3181 "top": { # A border along a cell. # The top border of the cell.
3182 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3183 # for simplicity of conversion to/from color representations in various
3184 # languages over compactness; for example, the fields of this representation
3185 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3186 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3187 # method in iOS; and, with just a little work, it can be easily formatted into
3188 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3189 #
3190 # Example (Java):
3191 #
3192 # import com.google.type.Color;
3193 #
3194 # // ...
3195 # public static java.awt.Color fromProto(Color protocolor) {
3196 # float alpha = protocolor.hasAlpha()
3197 # ? protocolor.getAlpha().getValue()
3198 # : 1.0;
3199 #
3200 # return new java.awt.Color(
3201 # protocolor.getRed(),
3202 # protocolor.getGreen(),
3203 # protocolor.getBlue(),
3204 # alpha);
3205 # }
3206 #
3207 # public static Color toProto(java.awt.Color color) {
3208 # float red = (float) color.getRed();
3209 # float green = (float) color.getGreen();
3210 # float blue = (float) color.getBlue();
3211 # float denominator = 255.0;
3212 # Color.Builder resultBuilder =
3213 # Color
3214 # .newBuilder()
3215 # .setRed(red / denominator)
3216 # .setGreen(green / denominator)
3217 # .setBlue(blue / denominator);
3218 # int alpha = color.getAlpha();
3219 # if (alpha != 255) {
3220 # result.setAlpha(
3221 # FloatValue
3222 # .newBuilder()
3223 # .setValue(((float) alpha) / denominator)
3224 # .build());
3225 # }
3226 # return resultBuilder.build();
3227 # }
3228 # // ...
3229 #
3230 # Example (iOS / Obj-C):
3231 #
3232 # // ...
3233 # static UIColor* fromProto(Color* protocolor) {
3234 # float red = [protocolor red];
3235 # float green = [protocolor green];
3236 # float blue = [protocolor blue];
3237 # FloatValue* alpha_wrapper = [protocolor alpha];
3238 # float alpha = 1.0;
3239 # if (alpha_wrapper != nil) {
3240 # alpha = [alpha_wrapper value];
3241 # }
3242 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3243 # }
3244 #
3245 # static Color* toProto(UIColor* color) {
3246 # CGFloat red, green, blue, alpha;
3247 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3248 # return nil;
3249 # }
3250 # Color* result = [Color alloc] init];
3251 # [result setRed:red];
3252 # [result setGreen:green];
3253 # [result setBlue:blue];
3254 # if (alpha <= 0.9999) {
3255 # [result setAlpha:floatWrapperWithValue(alpha)];
3256 # }
3257 # [result autorelease];
3258 # return result;
3259 # }
3260 # // ...
3261 #
3262 # Example (JavaScript):
3263 #
3264 # // ...
3265 #
3266 # var protoToCssColor = function(rgb_color) {
3267 # var redFrac = rgb_color.red || 0.0;
3268 # var greenFrac = rgb_color.green || 0.0;
3269 # var blueFrac = rgb_color.blue || 0.0;
3270 # var red = Math.floor(redFrac * 255);
3271 # var green = Math.floor(greenFrac * 255);
3272 # var blue = Math.floor(blueFrac * 255);
3273 #
3274 # if (!('alpha' in rgb_color)) {
3275 # return rgbToCssColor_(red, green, blue);
3276 # }
3277 #
3278 # var alphaFrac = rgb_color.alpha.value || 0.0;
3279 # var rgbParams = [red, green, blue].join(',');
3280 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3281 # };
3282 #
3283 # var rgbToCssColor_ = function(red, green, blue) {
3284 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3285 # var hexString = rgbNumber.toString(16);
3286 # var missingZeros = 6 - hexString.length;
3287 # var resultBuilder = ['#'];
3288 # for (var i = 0; i < missingZeros; i++) {
3289 # resultBuilder.push('0');
3290 # }
3291 # resultBuilder.push(hexString);
3292 # return resultBuilder.join('');
3293 # };
3294 #
3295 # // ...
3296 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3297 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3298 # the final pixel color is defined by the equation:
3299 #
3300 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3301 #
3302 # This means that a value of 1.0 corresponds to a solid color, whereas
3303 # a value of 0.0 corresponds to a completely transparent color. This
3304 # uses a wrapper message rather than a simple float scalar so that it is
3305 # possible to distinguish between a default value and the value being unset.
3306 # If omitted, this color object is to be rendered as a solid color
3307 # (as if the alpha value had been explicitly given with a value of 1.0).
3308 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3309 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3310 },
3311 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003312 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003313 "style": "A String", # The style of the border.
3314 },
3315 "right": { # A border along a cell. # The right border of the cell.
3316 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3317 # for simplicity of conversion to/from color representations in various
3318 # languages over compactness; for example, the fields of this representation
3319 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3320 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3321 # method in iOS; and, with just a little work, it can be easily formatted into
3322 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3323 #
3324 # Example (Java):
3325 #
3326 # import com.google.type.Color;
3327 #
3328 # // ...
3329 # public static java.awt.Color fromProto(Color protocolor) {
3330 # float alpha = protocolor.hasAlpha()
3331 # ? protocolor.getAlpha().getValue()
3332 # : 1.0;
3333 #
3334 # return new java.awt.Color(
3335 # protocolor.getRed(),
3336 # protocolor.getGreen(),
3337 # protocolor.getBlue(),
3338 # alpha);
3339 # }
3340 #
3341 # public static Color toProto(java.awt.Color color) {
3342 # float red = (float) color.getRed();
3343 # float green = (float) color.getGreen();
3344 # float blue = (float) color.getBlue();
3345 # float denominator = 255.0;
3346 # Color.Builder resultBuilder =
3347 # Color
3348 # .newBuilder()
3349 # .setRed(red / denominator)
3350 # .setGreen(green / denominator)
3351 # .setBlue(blue / denominator);
3352 # int alpha = color.getAlpha();
3353 # if (alpha != 255) {
3354 # result.setAlpha(
3355 # FloatValue
3356 # .newBuilder()
3357 # .setValue(((float) alpha) / denominator)
3358 # .build());
3359 # }
3360 # return resultBuilder.build();
3361 # }
3362 # // ...
3363 #
3364 # Example (iOS / Obj-C):
3365 #
3366 # // ...
3367 # static UIColor* fromProto(Color* protocolor) {
3368 # float red = [protocolor red];
3369 # float green = [protocolor green];
3370 # float blue = [protocolor blue];
3371 # FloatValue* alpha_wrapper = [protocolor alpha];
3372 # float alpha = 1.0;
3373 # if (alpha_wrapper != nil) {
3374 # alpha = [alpha_wrapper value];
3375 # }
3376 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3377 # }
3378 #
3379 # static Color* toProto(UIColor* color) {
3380 # CGFloat red, green, blue, alpha;
3381 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3382 # return nil;
3383 # }
3384 # Color* result = [Color alloc] init];
3385 # [result setRed:red];
3386 # [result setGreen:green];
3387 # [result setBlue:blue];
3388 # if (alpha <= 0.9999) {
3389 # [result setAlpha:floatWrapperWithValue(alpha)];
3390 # }
3391 # [result autorelease];
3392 # return result;
3393 # }
3394 # // ...
3395 #
3396 # Example (JavaScript):
3397 #
3398 # // ...
3399 #
3400 # var protoToCssColor = function(rgb_color) {
3401 # var redFrac = rgb_color.red || 0.0;
3402 # var greenFrac = rgb_color.green || 0.0;
3403 # var blueFrac = rgb_color.blue || 0.0;
3404 # var red = Math.floor(redFrac * 255);
3405 # var green = Math.floor(greenFrac * 255);
3406 # var blue = Math.floor(blueFrac * 255);
3407 #
3408 # if (!('alpha' in rgb_color)) {
3409 # return rgbToCssColor_(red, green, blue);
3410 # }
3411 #
3412 # var alphaFrac = rgb_color.alpha.value || 0.0;
3413 # var rgbParams = [red, green, blue].join(',');
3414 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3415 # };
3416 #
3417 # var rgbToCssColor_ = function(red, green, blue) {
3418 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3419 # var hexString = rgbNumber.toString(16);
3420 # var missingZeros = 6 - hexString.length;
3421 # var resultBuilder = ['#'];
3422 # for (var i = 0; i < missingZeros; i++) {
3423 # resultBuilder.push('0');
3424 # }
3425 # resultBuilder.push(hexString);
3426 # return resultBuilder.join('');
3427 # };
3428 #
3429 # // ...
3430 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3431 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3432 # the final pixel color is defined by the equation:
3433 #
3434 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3435 #
3436 # This means that a value of 1.0 corresponds to a solid color, whereas
3437 # a value of 0.0 corresponds to a completely transparent color. This
3438 # uses a wrapper message rather than a simple float scalar so that it is
3439 # possible to distinguish between a default value and the value being unset.
3440 # If omitted, this color object is to be rendered as a solid color
3441 # (as if the alpha value had been explicitly given with a value of 1.0).
3442 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3443 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3444 },
3445 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003446 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003447 "style": "A String", # The style of the border.
3448 },
3449 "bottom": { # A border along a cell. # The bottom border of the cell.
3450 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3451 # for simplicity of conversion to/from color representations in various
3452 # languages over compactness; for example, the fields of this representation
3453 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3454 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3455 # method in iOS; and, with just a little work, it can be easily formatted into
3456 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3457 #
3458 # Example (Java):
3459 #
3460 # import com.google.type.Color;
3461 #
3462 # // ...
3463 # public static java.awt.Color fromProto(Color protocolor) {
3464 # float alpha = protocolor.hasAlpha()
3465 # ? protocolor.getAlpha().getValue()
3466 # : 1.0;
3467 #
3468 # return new java.awt.Color(
3469 # protocolor.getRed(),
3470 # protocolor.getGreen(),
3471 # protocolor.getBlue(),
3472 # alpha);
3473 # }
3474 #
3475 # public static Color toProto(java.awt.Color color) {
3476 # float red = (float) color.getRed();
3477 # float green = (float) color.getGreen();
3478 # float blue = (float) color.getBlue();
3479 # float denominator = 255.0;
3480 # Color.Builder resultBuilder =
3481 # Color
3482 # .newBuilder()
3483 # .setRed(red / denominator)
3484 # .setGreen(green / denominator)
3485 # .setBlue(blue / denominator);
3486 # int alpha = color.getAlpha();
3487 # if (alpha != 255) {
3488 # result.setAlpha(
3489 # FloatValue
3490 # .newBuilder()
3491 # .setValue(((float) alpha) / denominator)
3492 # .build());
3493 # }
3494 # return resultBuilder.build();
3495 # }
3496 # // ...
3497 #
3498 # Example (iOS / Obj-C):
3499 #
3500 # // ...
3501 # static UIColor* fromProto(Color* protocolor) {
3502 # float red = [protocolor red];
3503 # float green = [protocolor green];
3504 # float blue = [protocolor blue];
3505 # FloatValue* alpha_wrapper = [protocolor alpha];
3506 # float alpha = 1.0;
3507 # if (alpha_wrapper != nil) {
3508 # alpha = [alpha_wrapper value];
3509 # }
3510 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3511 # }
3512 #
3513 # static Color* toProto(UIColor* color) {
3514 # CGFloat red, green, blue, alpha;
3515 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3516 # return nil;
3517 # }
3518 # Color* result = [Color alloc] init];
3519 # [result setRed:red];
3520 # [result setGreen:green];
3521 # [result setBlue:blue];
3522 # if (alpha <= 0.9999) {
3523 # [result setAlpha:floatWrapperWithValue(alpha)];
3524 # }
3525 # [result autorelease];
3526 # return result;
3527 # }
3528 # // ...
3529 #
3530 # Example (JavaScript):
3531 #
3532 # // ...
3533 #
3534 # var protoToCssColor = function(rgb_color) {
3535 # var redFrac = rgb_color.red || 0.0;
3536 # var greenFrac = rgb_color.green || 0.0;
3537 # var blueFrac = rgb_color.blue || 0.0;
3538 # var red = Math.floor(redFrac * 255);
3539 # var green = Math.floor(greenFrac * 255);
3540 # var blue = Math.floor(blueFrac * 255);
3541 #
3542 # if (!('alpha' in rgb_color)) {
3543 # return rgbToCssColor_(red, green, blue);
3544 # }
3545 #
3546 # var alphaFrac = rgb_color.alpha.value || 0.0;
3547 # var rgbParams = [red, green, blue].join(',');
3548 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3549 # };
3550 #
3551 # var rgbToCssColor_ = function(red, green, blue) {
3552 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3553 # var hexString = rgbNumber.toString(16);
3554 # var missingZeros = 6 - hexString.length;
3555 # var resultBuilder = ['#'];
3556 # for (var i = 0; i < missingZeros; i++) {
3557 # resultBuilder.push('0');
3558 # }
3559 # resultBuilder.push(hexString);
3560 # return resultBuilder.join('');
3561 # };
3562 #
3563 # // ...
3564 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3565 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3566 # the final pixel color is defined by the equation:
3567 #
3568 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3569 #
3570 # This means that a value of 1.0 corresponds to a solid color, whereas
3571 # a value of 0.0 corresponds to a completely transparent color. This
3572 # uses a wrapper message rather than a simple float scalar so that it is
3573 # possible to distinguish between a default value and the value being unset.
3574 # If omitted, this color object is to be rendered as a solid color
3575 # (as if the alpha value had been explicitly given with a value of 1.0).
3576 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3577 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3578 },
3579 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003580 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003581 "style": "A String", # The style of the border.
3582 },
3583 "left": { # A border along a cell. # The left border of the cell.
3584 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3585 # for simplicity of conversion to/from color representations in various
3586 # languages over compactness; for example, the fields of this representation
3587 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3588 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3589 # method in iOS; and, with just a little work, it can be easily formatted into
3590 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3591 #
3592 # Example (Java):
3593 #
3594 # import com.google.type.Color;
3595 #
3596 # // ...
3597 # public static java.awt.Color fromProto(Color protocolor) {
3598 # float alpha = protocolor.hasAlpha()
3599 # ? protocolor.getAlpha().getValue()
3600 # : 1.0;
3601 #
3602 # return new java.awt.Color(
3603 # protocolor.getRed(),
3604 # protocolor.getGreen(),
3605 # protocolor.getBlue(),
3606 # alpha);
3607 # }
3608 #
3609 # public static Color toProto(java.awt.Color color) {
3610 # float red = (float) color.getRed();
3611 # float green = (float) color.getGreen();
3612 # float blue = (float) color.getBlue();
3613 # float denominator = 255.0;
3614 # Color.Builder resultBuilder =
3615 # Color
3616 # .newBuilder()
3617 # .setRed(red / denominator)
3618 # .setGreen(green / denominator)
3619 # .setBlue(blue / denominator);
3620 # int alpha = color.getAlpha();
3621 # if (alpha != 255) {
3622 # result.setAlpha(
3623 # FloatValue
3624 # .newBuilder()
3625 # .setValue(((float) alpha) / denominator)
3626 # .build());
3627 # }
3628 # return resultBuilder.build();
3629 # }
3630 # // ...
3631 #
3632 # Example (iOS / Obj-C):
3633 #
3634 # // ...
3635 # static UIColor* fromProto(Color* protocolor) {
3636 # float red = [protocolor red];
3637 # float green = [protocolor green];
3638 # float blue = [protocolor blue];
3639 # FloatValue* alpha_wrapper = [protocolor alpha];
3640 # float alpha = 1.0;
3641 # if (alpha_wrapper != nil) {
3642 # alpha = [alpha_wrapper value];
3643 # }
3644 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3645 # }
3646 #
3647 # static Color* toProto(UIColor* color) {
3648 # CGFloat red, green, blue, alpha;
3649 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3650 # return nil;
3651 # }
3652 # Color* result = [Color alloc] init];
3653 # [result setRed:red];
3654 # [result setGreen:green];
3655 # [result setBlue:blue];
3656 # if (alpha <= 0.9999) {
3657 # [result setAlpha:floatWrapperWithValue(alpha)];
3658 # }
3659 # [result autorelease];
3660 # return result;
3661 # }
3662 # // ...
3663 #
3664 # Example (JavaScript):
3665 #
3666 # // ...
3667 #
3668 # var protoToCssColor = function(rgb_color) {
3669 # var redFrac = rgb_color.red || 0.0;
3670 # var greenFrac = rgb_color.green || 0.0;
3671 # var blueFrac = rgb_color.blue || 0.0;
3672 # var red = Math.floor(redFrac * 255);
3673 # var green = Math.floor(greenFrac * 255);
3674 # var blue = Math.floor(blueFrac * 255);
3675 #
3676 # if (!('alpha' in rgb_color)) {
3677 # return rgbToCssColor_(red, green, blue);
3678 # }
3679 #
3680 # var alphaFrac = rgb_color.alpha.value || 0.0;
3681 # var rgbParams = [red, green, blue].join(',');
3682 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3683 # };
3684 #
3685 # var rgbToCssColor_ = function(red, green, blue) {
3686 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3687 # var hexString = rgbNumber.toString(16);
3688 # var missingZeros = 6 - hexString.length;
3689 # var resultBuilder = ['#'];
3690 # for (var i = 0; i < missingZeros; i++) {
3691 # resultBuilder.push('0');
3692 # }
3693 # resultBuilder.push(hexString);
3694 # return resultBuilder.join('');
3695 # };
3696 #
3697 # // ...
3698 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3699 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3700 # the final pixel color is defined by the equation:
3701 #
3702 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3703 #
3704 # This means that a value of 1.0 corresponds to a solid color, whereas
3705 # a value of 0.0 corresponds to a completely transparent color. This
3706 # uses a wrapper message rather than a simple float scalar so that it is
3707 # possible to distinguish between a default value and the value being unset.
3708 # If omitted, this color object is to be rendered as a solid color
3709 # (as if the alpha value had been explicitly given with a value of 1.0).
3710 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3711 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3712 },
3713 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003714 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003715 "style": "A String", # The style of the border.
3716 },
3717 },
3718 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
3719 },
3720 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
3721 #
3722 # When writing, the new data validation rule will overwrite any prior rule.
3723 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
3724 # If true, "List" conditions will show a dropdown.
3725 "strict": True or False, # True if invalid data should be rejected.
3726 "inputMessage": "A String", # A message to show the user when adding data to the cell.
3727 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
3728 # BooleanConditions are used by conditional formatting,
3729 # data validation, and the criteria in filters.
3730 "type": "A String", # The type of condition.
3731 "values": [ # The values of the condition. The number of supported values depends
3732 # on the condition type. Some support zero values,
3733 # others one or two values,
3734 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
3735 { # The value of the condition.
3736 "relativeDate": "A String", # A relative date (based on the current date).
3737 # Valid only if the type is
3738 # DATE_BEFORE,
3739 # DATE_AFTER,
3740 # DATE_ON_OR_BEFORE or
3741 # DATE_ON_OR_AFTER.
3742 #
3743 # Relative dates are not supported in data validation.
3744 # They are supported only in conditional formatting and
3745 # conditional filters.
3746 "userEnteredValue": "A String", # A value the condition is based on.
3747 # The value will be parsed as if the user typed into a cell.
3748 # Formulas are supported (and must begin with an `=`).
3749 },
3750 ],
3751 },
3752 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003753 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
3754 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003755 # Runs start at specific indexes in the text and continue until the next
3756 # run. Properties of a run will continue unless explicitly changed
3757 # in a subsequent run (and properties of the first run will continue
3758 # the properties of the cell unless explicitly changed).
3759 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003760 # When writing, the new runs will overwrite any prior runs. When writing a
3761 # new user_entered_value, previous runs will be erased.
3762 { # A run of a text format. The format of this run continues until the start
3763 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003764 # When updating, all fields must be set.
3765 "startIndex": 42, # The character index where this run starts.
3766 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
3767 # Absent values indicate that the field isn't specified.
3768 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
3769 # for simplicity of conversion to/from color representations in various
3770 # languages over compactness; for example, the fields of this representation
3771 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3772 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3773 # method in iOS; and, with just a little work, it can be easily formatted into
3774 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3775 #
3776 # Example (Java):
3777 #
3778 # import com.google.type.Color;
3779 #
3780 # // ...
3781 # public static java.awt.Color fromProto(Color protocolor) {
3782 # float alpha = protocolor.hasAlpha()
3783 # ? protocolor.getAlpha().getValue()
3784 # : 1.0;
3785 #
3786 # return new java.awt.Color(
3787 # protocolor.getRed(),
3788 # protocolor.getGreen(),
3789 # protocolor.getBlue(),
3790 # alpha);
3791 # }
3792 #
3793 # public static Color toProto(java.awt.Color color) {
3794 # float red = (float) color.getRed();
3795 # float green = (float) color.getGreen();
3796 # float blue = (float) color.getBlue();
3797 # float denominator = 255.0;
3798 # Color.Builder resultBuilder =
3799 # Color
3800 # .newBuilder()
3801 # .setRed(red / denominator)
3802 # .setGreen(green / denominator)
3803 # .setBlue(blue / denominator);
3804 # int alpha = color.getAlpha();
3805 # if (alpha != 255) {
3806 # result.setAlpha(
3807 # FloatValue
3808 # .newBuilder()
3809 # .setValue(((float) alpha) / denominator)
3810 # .build());
3811 # }
3812 # return resultBuilder.build();
3813 # }
3814 # // ...
3815 #
3816 # Example (iOS / Obj-C):
3817 #
3818 # // ...
3819 # static UIColor* fromProto(Color* protocolor) {
3820 # float red = [protocolor red];
3821 # float green = [protocolor green];
3822 # float blue = [protocolor blue];
3823 # FloatValue* alpha_wrapper = [protocolor alpha];
3824 # float alpha = 1.0;
3825 # if (alpha_wrapper != nil) {
3826 # alpha = [alpha_wrapper value];
3827 # }
3828 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3829 # }
3830 #
3831 # static Color* toProto(UIColor* color) {
3832 # CGFloat red, green, blue, alpha;
3833 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3834 # return nil;
3835 # }
3836 # Color* result = [Color alloc] init];
3837 # [result setRed:red];
3838 # [result setGreen:green];
3839 # [result setBlue:blue];
3840 # if (alpha <= 0.9999) {
3841 # [result setAlpha:floatWrapperWithValue(alpha)];
3842 # }
3843 # [result autorelease];
3844 # return result;
3845 # }
3846 # // ...
3847 #
3848 # Example (JavaScript):
3849 #
3850 # // ...
3851 #
3852 # var protoToCssColor = function(rgb_color) {
3853 # var redFrac = rgb_color.red || 0.0;
3854 # var greenFrac = rgb_color.green || 0.0;
3855 # var blueFrac = rgb_color.blue || 0.0;
3856 # var red = Math.floor(redFrac * 255);
3857 # var green = Math.floor(greenFrac * 255);
3858 # var blue = Math.floor(blueFrac * 255);
3859 #
3860 # if (!('alpha' in rgb_color)) {
3861 # return rgbToCssColor_(red, green, blue);
3862 # }
3863 #
3864 # var alphaFrac = rgb_color.alpha.value || 0.0;
3865 # var rgbParams = [red, green, blue].join(',');
3866 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3867 # };
3868 #
3869 # var rgbToCssColor_ = function(red, green, blue) {
3870 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3871 # var hexString = rgbNumber.toString(16);
3872 # var missingZeros = 6 - hexString.length;
3873 # var resultBuilder = ['#'];
3874 # for (var i = 0; i < missingZeros; i++) {
3875 # resultBuilder.push('0');
3876 # }
3877 # resultBuilder.push(hexString);
3878 # return resultBuilder.join('');
3879 # };
3880 #
3881 # // ...
3882 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3883 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3884 # the final pixel color is defined by the equation:
3885 #
3886 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3887 #
3888 # This means that a value of 1.0 corresponds to a solid color, whereas
3889 # a value of 0.0 corresponds to a completely transparent color. This
3890 # uses a wrapper message rather than a simple float scalar so that it is
3891 # possible to distinguish between a default value and the value being unset.
3892 # If omitted, this color object is to be rendered as a solid color
3893 # (as if the alpha value had been explicitly given with a value of 1.0).
3894 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3895 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3896 },
3897 "bold": True or False, # True if the text is bold.
3898 "strikethrough": True or False, # True if the text has a strikethrough.
3899 "fontFamily": "A String", # The font family.
3900 "fontSize": 42, # The size of the font.
3901 "italic": True or False, # True if the text is italicized.
3902 "underline": True or False, # True if the text is underlined.
3903 },
3904 },
3905 ],
3906 },
3907 ],
3908 },
3909 ],
3910 "sheetId": 42, # The sheet ID to append the data to.
3911 },
3912 "duplicateSheet": { # Duplicates the contents of a sheet. # Duplicates a sheet.
3913 "sourceSheetId": 42, # The sheet to duplicate.
3914 "insertSheetIndex": 42, # The zero-based index where the new sheet should be inserted.
3915 # The index of all sheets after this are incremented.
3916 "newSheetName": "A String", # The name of the new sheet. If empty, a new name is chosen for you.
3917 "newSheetId": 42, # If set, the ID of the new sheet. If not set, an ID is chosen.
3918 # If set, the ID must not conflict with any existing sheet ID.
3919 # If set, it must be non-negative.
3920 },
3921 "updateSheetProperties": { # Updates properties of the sheet with the specified # Updates a sheet's properties.
3922 # sheetId.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003923 "fields": "A String", # The fields that should be updated. At least one field must be specified.
3924 # The root `properties` is implied and should not be specified.
3925 # A single `"*"` can be used as short-hand for listing every field.
3926 "properties": { # Properties of a sheet. # The properties to update.
3927 "sheetType": "A String", # The type of sheet. Defaults to GRID.
3928 # This field cannot be changed once set.
3929 "index": 42, # The index of the sheet within the spreadsheet.
3930 # When adding or updating sheet properties, if this field
3931 # is excluded then the sheet will be added or moved to the end
3932 # of the sheet list.
3933 "title": "A String", # The name of the sheet.
3934 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
3935 # (If the sheet is an object sheet, containing a chart or image, then
3936 # this field will be absent.)
3937 # When writing it is an error to set any grid properties on non-grid sheets.
3938 "columnCount": 42, # The number of columns in the grid.
3939 "rowCount": 42, # The number of rows in the grid.
3940 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
3941 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
3942 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
3943 },
3944 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
3945 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
3946 # for simplicity of conversion to/from color representations in various
3947 # languages over compactness; for example, the fields of this representation
3948 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3949 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3950 # method in iOS; and, with just a little work, it can be easily formatted into
3951 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3952 #
3953 # Example (Java):
3954 #
3955 # import com.google.type.Color;
3956 #
3957 # // ...
3958 # public static java.awt.Color fromProto(Color protocolor) {
3959 # float alpha = protocolor.hasAlpha()
3960 # ? protocolor.getAlpha().getValue()
3961 # : 1.0;
3962 #
3963 # return new java.awt.Color(
3964 # protocolor.getRed(),
3965 # protocolor.getGreen(),
3966 # protocolor.getBlue(),
3967 # alpha);
3968 # }
3969 #
3970 # public static Color toProto(java.awt.Color color) {
3971 # float red = (float) color.getRed();
3972 # float green = (float) color.getGreen();
3973 # float blue = (float) color.getBlue();
3974 # float denominator = 255.0;
3975 # Color.Builder resultBuilder =
3976 # Color
3977 # .newBuilder()
3978 # .setRed(red / denominator)
3979 # .setGreen(green / denominator)
3980 # .setBlue(blue / denominator);
3981 # int alpha = color.getAlpha();
3982 # if (alpha != 255) {
3983 # result.setAlpha(
3984 # FloatValue
3985 # .newBuilder()
3986 # .setValue(((float) alpha) / denominator)
3987 # .build());
3988 # }
3989 # return resultBuilder.build();
3990 # }
3991 # // ...
3992 #
3993 # Example (iOS / Obj-C):
3994 #
3995 # // ...
3996 # static UIColor* fromProto(Color* protocolor) {
3997 # float red = [protocolor red];
3998 # float green = [protocolor green];
3999 # float blue = [protocolor blue];
4000 # FloatValue* alpha_wrapper = [protocolor alpha];
4001 # float alpha = 1.0;
4002 # if (alpha_wrapper != nil) {
4003 # alpha = [alpha_wrapper value];
4004 # }
4005 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4006 # }
4007 #
4008 # static Color* toProto(UIColor* color) {
4009 # CGFloat red, green, blue, alpha;
4010 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4011 # return nil;
4012 # }
4013 # Color* result = [Color alloc] init];
4014 # [result setRed:red];
4015 # [result setGreen:green];
4016 # [result setBlue:blue];
4017 # if (alpha <= 0.9999) {
4018 # [result setAlpha:floatWrapperWithValue(alpha)];
4019 # }
4020 # [result autorelease];
4021 # return result;
4022 # }
4023 # // ...
4024 #
4025 # Example (JavaScript):
4026 #
4027 # // ...
4028 #
4029 # var protoToCssColor = function(rgb_color) {
4030 # var redFrac = rgb_color.red || 0.0;
4031 # var greenFrac = rgb_color.green || 0.0;
4032 # var blueFrac = rgb_color.blue || 0.0;
4033 # var red = Math.floor(redFrac * 255);
4034 # var green = Math.floor(greenFrac * 255);
4035 # var blue = Math.floor(blueFrac * 255);
4036 #
4037 # if (!('alpha' in rgb_color)) {
4038 # return rgbToCssColor_(red, green, blue);
4039 # }
4040 #
4041 # var alphaFrac = rgb_color.alpha.value || 0.0;
4042 # var rgbParams = [red, green, blue].join(',');
4043 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4044 # };
4045 #
4046 # var rgbToCssColor_ = function(red, green, blue) {
4047 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4048 # var hexString = rgbNumber.toString(16);
4049 # var missingZeros = 6 - hexString.length;
4050 # var resultBuilder = ['#'];
4051 # for (var i = 0; i < missingZeros; i++) {
4052 # resultBuilder.push('0');
4053 # }
4054 # resultBuilder.push(hexString);
4055 # return resultBuilder.join('');
4056 # };
4057 #
4058 # // ...
4059 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4060 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4061 # the final pixel color is defined by the equation:
4062 #
4063 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4064 #
4065 # This means that a value of 1.0 corresponds to a solid color, whereas
4066 # a value of 0.0 corresponds to a completely transparent color. This
4067 # uses a wrapper message rather than a simple float scalar so that it is
4068 # possible to distinguish between a default value and the value being unset.
4069 # If omitted, this color object is to be rendered as a solid color
4070 # (as if the alpha value had been explicitly given with a value of 1.0).
4071 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4072 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4073 },
4074 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
4075 "sheetId": 42, # The ID of the sheet. Must be non-negative.
4076 # This field cannot be changed once set.
4077 },
4078 },
4079 "addChart": { # Adds a chart to a sheet in the spreadsheet. # Adds a chart.
4080 "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 -07004081 # where it should be placed. The chartId
4082 # field is optional; if one is not set, an id will be randomly generated. (It
4083 # is an error to specify the ID of a chart that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004084 "chartId": 42, # The ID of the chart.
4085 "position": { # The position of an embedded object such as a chart. # The position of the chart.
4086 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
4087 # is chosen for you. Used only when writing.
4088 "sheetId": 42, # The sheet this is on. Set only if the embedded object
4089 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004090 "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 -07004091 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
4092 # All indexes are zero-based.
4093 "rowIndex": 42, # The row index of the coordinate.
4094 "columnIndex": 42, # The column index of the coordinate.
4095 "sheetId": 42, # The sheet this coordinate is on.
4096 },
4097 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
4098 # from the anchor cell.
4099 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
4100 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
4101 # from the anchor cell.
4102 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
4103 },
4104 },
4105 "spec": { # The specifications of a chart. # The specification of the chart.
4106 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004107 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
4108 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
4109 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
4110 "sources": [ # The ranges of data for a series or domain.
4111 # Exactly one dimension must have a length of 1,
4112 # and all sources in the list must have the same dimension
4113 # with length 1.
4114 # The domain (if it exists) & all series must have the same number
4115 # of source ranges. If using more than one source range, then the source
4116 # range at a given offset must be contiguous across the domain and series.
4117 #
4118 # For example, these are valid configurations:
4119 #
4120 # domain sources: A1:A5
4121 # series1 sources: B1:B5
4122 # series2 sources: D6:D10
4123 #
4124 # domain sources: A1:A5, C10:C12
4125 # series1 sources: B1:B5, D10:D12
4126 # series2 sources: C1:C5, E10:E12
4127 { # A range on a sheet.
4128 # All indexes are zero-based.
4129 # Indexes are half open, e.g the start index is inclusive
4130 # and the end index is exclusive -- [start_index, end_index).
4131 # Missing indexes indicate the range is unbounded on that side.
4132 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004133 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004134 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004135 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004136 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004137 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004138 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004139 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004140 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004141 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004142 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004143 # `Sheet1!A:B == sheet_id: 0,
4144 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004145 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004146 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004147 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004148 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004149 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004150 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004151 #
4152 # The start index must always be less than or equal to the end index.
4153 # If the start index equals the end index, then the range is empty.
4154 # Empty ranges are typically not meaningful and are usually rendered in the
4155 # UI as `#REF!`.
4156 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
4157 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
4158 "sheetId": 42, # The sheet this range is on.
4159 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
4160 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
4161 },
4162 ],
4163 },
4164 },
4165 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
4166 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
4167 "sources": [ # The ranges of data for a series or domain.
4168 # Exactly one dimension must have a length of 1,
4169 # and all sources in the list must have the same dimension
4170 # with length 1.
4171 # The domain (if it exists) & all series must have the same number
4172 # of source ranges. If using more than one source range, then the source
4173 # range at a given offset must be contiguous across the domain and series.
4174 #
4175 # For example, these are valid configurations:
4176 #
4177 # domain sources: A1:A5
4178 # series1 sources: B1:B5
4179 # series2 sources: D6:D10
4180 #
4181 # domain sources: A1:A5, C10:C12
4182 # series1 sources: B1:B5, D10:D12
4183 # series2 sources: C1:C5, E10:E12
4184 { # A range on a sheet.
4185 # All indexes are zero-based.
4186 # Indexes are half open, e.g the start index is inclusive
4187 # and the end index is exclusive -- [start_index, end_index).
4188 # Missing indexes indicate the range is unbounded on that side.
4189 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004190 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004191 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004192 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004193 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004194 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004195 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004196 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004197 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004198 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004199 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004200 # `Sheet1!A:B == sheet_id: 0,
4201 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004202 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004203 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004204 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004205 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004206 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004207 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004208 #
4209 # The start index must always be less than or equal to the end index.
4210 # If the start index equals the end index, then the range is empty.
4211 # Empty ranges are typically not meaningful and are usually rendered in the
4212 # UI as `#REF!`.
4213 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
4214 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
4215 "sheetId": 42, # The sheet this range is on.
4216 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
4217 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
4218 },
4219 ],
4220 },
4221 },
4222 "threeDimensional": True or False, # True if the pie is three dimensional.
4223 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
4224 "pieHole": 3.14, # The size of the hole in the pie chart.
4225 },
4226 "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 -07004227 # See BasicChartType for the list of all
4228 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004229 # of charts this supports.
4230 "headerCount": 42, # The number of rows or columns in the data that are "headers".
4231 # If not set, Google Sheets will guess how many rows are headers based
4232 # on the data.
4233 #
4234 # (Note that BasicChartAxis.title may override the axis title
4235 # inferred from the header values.)
4236 "series": [ # The data this chart is visualizing.
4237 { # A single series of data in a chart.
4238 # For example, if charting stock prices over time, multiple series may exist,
4239 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
4240 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
4241 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
4242 "sources": [ # The ranges of data for a series or domain.
4243 # Exactly one dimension must have a length of 1,
4244 # and all sources in the list must have the same dimension
4245 # with length 1.
4246 # The domain (if it exists) & all series must have the same number
4247 # of source ranges. If using more than one source range, then the source
4248 # range at a given offset must be contiguous across the domain and series.
4249 #
4250 # For example, these are valid configurations:
4251 #
4252 # domain sources: A1:A5
4253 # series1 sources: B1:B5
4254 # series2 sources: D6:D10
4255 #
4256 # domain sources: A1:A5, C10:C12
4257 # series1 sources: B1:B5, D10:D12
4258 # series2 sources: C1:C5, E10:E12
4259 { # A range on a sheet.
4260 # All indexes are zero-based.
4261 # Indexes are half open, e.g the start index is inclusive
4262 # and the end index is exclusive -- [start_index, end_index).
4263 # Missing indexes indicate the range is unbounded on that side.
4264 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004265 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004266 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004267 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004268 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004269 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004270 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004271 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004272 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004273 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004274 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004275 # `Sheet1!A:B == sheet_id: 0,
4276 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004277 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004278 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004279 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004280 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004281 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004282 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004283 #
4284 # The start index must always be less than or equal to the end index.
4285 # If the start index equals the end index, then the range is empty.
4286 # Empty ranges are typically not meaningful and are usually rendered in the
4287 # UI as `#REF!`.
4288 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
4289 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
4290 "sheetId": 42, # The sheet this range is on.
4291 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
4292 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
4293 },
4294 ],
4295 },
4296 },
4297 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
4298 # For example, if charting stocks over time, the "Volume" series
4299 # may want to be pinned to the right with the prices pinned to the left,
4300 # because the scale of trading volume is different than the scale of
4301 # prices.
4302 # It is an error to specify an axis that isn't a valid minor axis
4303 # for the chart's type.
4304 "type": "A String", # The type of this series. Valid only if the
4305 # chartType is
4306 # COMBO.
4307 # Different types will change the way the series is visualized.
4308 # Only LINE, AREA,
4309 # and COLUMN are supported.
4310 },
4311 ],
4312 "legendPosition": "A String", # The position of the chart legend.
4313 "domains": [ # The domain of data this is charting.
4314 # Only a single domain is currently supported.
4315 { # The domain of a chart.
4316 # For example, if charting stock prices over time, this would be the date.
4317 "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 -07004318 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004319 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
4320 "sources": [ # The ranges of data for a series or domain.
4321 # Exactly one dimension must have a length of 1,
4322 # and all sources in the list must have the same dimension
4323 # with length 1.
4324 # The domain (if it exists) & all series must have the same number
4325 # of source ranges. If using more than one source range, then the source
4326 # range at a given offset must be contiguous across the domain and series.
4327 #
4328 # For example, these are valid configurations:
4329 #
4330 # domain sources: A1:A5
4331 # series1 sources: B1:B5
4332 # series2 sources: D6:D10
4333 #
4334 # domain sources: A1:A5, C10:C12
4335 # series1 sources: B1:B5, D10:D12
4336 # series2 sources: C1:C5, E10:E12
4337 { # A range on a sheet.
4338 # All indexes are zero-based.
4339 # Indexes are half open, e.g the start index is inclusive
4340 # and the end index is exclusive -- [start_index, end_index).
4341 # Missing indexes indicate the range is unbounded on that side.
4342 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004343 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004344 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004345 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004346 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004347 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004348 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004349 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004350 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004351 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004352 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004353 # `Sheet1!A:B == sheet_id: 0,
4354 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004355 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004356 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004357 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004358 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004359 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004360 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004361 #
4362 # The start index must always be less than or equal to the end index.
4363 # If the start index equals the end index, then the range is empty.
4364 # Empty ranges are typically not meaningful and are usually rendered in the
4365 # UI as `#REF!`.
4366 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
4367 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
4368 "sheetId": 42, # The sheet this range is on.
4369 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
4370 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
4371 },
4372 ],
4373 },
4374 },
4375 },
4376 ],
4377 "chartType": "A String", # The type of the chart.
4378 "axis": [ # The axis on the chart.
4379 { # An axis of the chart.
4380 # A chart may not have more than one axis per
4381 # axis position.
4382 "position": "A String", # The position of this axis.
4383 "format": { # The format of a run of text in a cell. # The format of the title.
4384 # Only valid if the axis is not associated with the domain.
4385 # Absent values indicate that the field isn't specified.
4386 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
4387 # for simplicity of conversion to/from color representations in various
4388 # languages over compactness; for example, the fields of this representation
4389 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4390 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4391 # method in iOS; and, with just a little work, it can be easily formatted into
4392 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4393 #
4394 # Example (Java):
4395 #
4396 # import com.google.type.Color;
4397 #
4398 # // ...
4399 # public static java.awt.Color fromProto(Color protocolor) {
4400 # float alpha = protocolor.hasAlpha()
4401 # ? protocolor.getAlpha().getValue()
4402 # : 1.0;
4403 #
4404 # return new java.awt.Color(
4405 # protocolor.getRed(),
4406 # protocolor.getGreen(),
4407 # protocolor.getBlue(),
4408 # alpha);
4409 # }
4410 #
4411 # public static Color toProto(java.awt.Color color) {
4412 # float red = (float) color.getRed();
4413 # float green = (float) color.getGreen();
4414 # float blue = (float) color.getBlue();
4415 # float denominator = 255.0;
4416 # Color.Builder resultBuilder =
4417 # Color
4418 # .newBuilder()
4419 # .setRed(red / denominator)
4420 # .setGreen(green / denominator)
4421 # .setBlue(blue / denominator);
4422 # int alpha = color.getAlpha();
4423 # if (alpha != 255) {
4424 # result.setAlpha(
4425 # FloatValue
4426 # .newBuilder()
4427 # .setValue(((float) alpha) / denominator)
4428 # .build());
4429 # }
4430 # return resultBuilder.build();
4431 # }
4432 # // ...
4433 #
4434 # Example (iOS / Obj-C):
4435 #
4436 # // ...
4437 # static UIColor* fromProto(Color* protocolor) {
4438 # float red = [protocolor red];
4439 # float green = [protocolor green];
4440 # float blue = [protocolor blue];
4441 # FloatValue* alpha_wrapper = [protocolor alpha];
4442 # float alpha = 1.0;
4443 # if (alpha_wrapper != nil) {
4444 # alpha = [alpha_wrapper value];
4445 # }
4446 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4447 # }
4448 #
4449 # static Color* toProto(UIColor* color) {
4450 # CGFloat red, green, blue, alpha;
4451 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4452 # return nil;
4453 # }
4454 # Color* result = [Color alloc] init];
4455 # [result setRed:red];
4456 # [result setGreen:green];
4457 # [result setBlue:blue];
4458 # if (alpha <= 0.9999) {
4459 # [result setAlpha:floatWrapperWithValue(alpha)];
4460 # }
4461 # [result autorelease];
4462 # return result;
4463 # }
4464 # // ...
4465 #
4466 # Example (JavaScript):
4467 #
4468 # // ...
4469 #
4470 # var protoToCssColor = function(rgb_color) {
4471 # var redFrac = rgb_color.red || 0.0;
4472 # var greenFrac = rgb_color.green || 0.0;
4473 # var blueFrac = rgb_color.blue || 0.0;
4474 # var red = Math.floor(redFrac * 255);
4475 # var green = Math.floor(greenFrac * 255);
4476 # var blue = Math.floor(blueFrac * 255);
4477 #
4478 # if (!('alpha' in rgb_color)) {
4479 # return rgbToCssColor_(red, green, blue);
4480 # }
4481 #
4482 # var alphaFrac = rgb_color.alpha.value || 0.0;
4483 # var rgbParams = [red, green, blue].join(',');
4484 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4485 # };
4486 #
4487 # var rgbToCssColor_ = function(red, green, blue) {
4488 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4489 # var hexString = rgbNumber.toString(16);
4490 # var missingZeros = 6 - hexString.length;
4491 # var resultBuilder = ['#'];
4492 # for (var i = 0; i < missingZeros; i++) {
4493 # resultBuilder.push('0');
4494 # }
4495 # resultBuilder.push(hexString);
4496 # return resultBuilder.join('');
4497 # };
4498 #
4499 # // ...
4500 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4501 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4502 # the final pixel color is defined by the equation:
4503 #
4504 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4505 #
4506 # This means that a value of 1.0 corresponds to a solid color, whereas
4507 # a value of 0.0 corresponds to a completely transparent color. This
4508 # uses a wrapper message rather than a simple float scalar so that it is
4509 # possible to distinguish between a default value and the value being unset.
4510 # If omitted, this color object is to be rendered as a solid color
4511 # (as if the alpha value had been explicitly given with a value of 1.0).
4512 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4513 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4514 },
4515 "bold": True or False, # True if the text is bold.
4516 "strikethrough": True or False, # True if the text has a strikethrough.
4517 "fontFamily": "A String", # The font family.
4518 "fontSize": 42, # The size of the font.
4519 "italic": True or False, # True if the text is italicized.
4520 "underline": True or False, # True if the text is underlined.
4521 },
4522 "title": "A String", # The title of this axis. If set, this overrides any title inferred
4523 # from headers of the data.
4524 },
4525 ],
4526 },
4527 "title": "A String", # The title of the chart.
4528 },
4529 },
4530 },
4531 "addConditionalFormatRule": { # Adds a new conditional format rule at the given index. # Adds a new conditional format rule.
4532 # All subsequent rules' indexes are incremented.
4533 "index": 42, # The zero-based index where the rule should be inserted.
4534 "rule": { # A rule describing a conditional format. # The rule to add.
4535 "ranges": [ # The ranges that will be formatted if the condition is true.
4536 # All the ranges must be on the same grid.
4537 { # A range on a sheet.
4538 # All indexes are zero-based.
4539 # Indexes are half open, e.g the start index is inclusive
4540 # and the end index is exclusive -- [start_index, end_index).
4541 # Missing indexes indicate the range is unbounded on that side.
4542 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004543 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004544 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004545 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004546 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004547 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004548 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004549 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004550 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004551 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004552 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004553 # `Sheet1!A:B == sheet_id: 0,
4554 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004555 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004556 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004557 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004558 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004559 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004560 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004561 #
4562 # The start index must always be less than or equal to the end index.
4563 # If the start index equals the end index, then the range is empty.
4564 # Empty ranges are typically not meaningful and are usually rendered in the
4565 # UI as `#REF!`.
4566 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
4567 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
4568 "sheetId": 42, # The sheet this range is on.
4569 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
4570 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
4571 },
4572 ],
4573 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
4574 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
4575 # the format will be applied.
4576 # BooleanConditions are used by conditional formatting,
4577 # data validation, and the criteria in filters.
4578 "type": "A String", # The type of condition.
4579 "values": [ # The values of the condition. The number of supported values depends
4580 # on the condition type. Some support zero values,
4581 # others one or two values,
4582 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
4583 { # The value of the condition.
4584 "relativeDate": "A String", # A relative date (based on the current date).
4585 # Valid only if the type is
4586 # DATE_BEFORE,
4587 # DATE_AFTER,
4588 # DATE_ON_OR_BEFORE or
4589 # DATE_ON_OR_AFTER.
4590 #
4591 # Relative dates are not supported in data validation.
4592 # They are supported only in conditional formatting and
4593 # conditional filters.
4594 "userEnteredValue": "A String", # A value the condition is based on.
4595 # The value will be parsed as if the user typed into a cell.
4596 # Formulas are supported (and must begin with an `=`).
4597 },
4598 ],
4599 },
4600 "format": { # The format of a cell. # The format to apply.
4601 # Conditional formatting can only apply a subset of formatting:
4602 # bold, italic,
4603 # strikethrough,
4604 # foreground color &
4605 # background color.
4606 "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 -07004607 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
4608 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07004609 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
4610 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004611 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004612 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004613 },
4614 "textDirection": "A String", # The direction of the text in the cell.
4615 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
4616 # When updating padding, every field must be specified.
4617 "top": 42, # The top padding of the cell.
4618 "right": 42, # The right padding of the cell.
4619 "bottom": 42, # The bottom padding of the cell.
4620 "left": 42, # The left padding of the cell.
4621 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004622 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004623 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
4624 # for simplicity of conversion to/from color representations in various
4625 # languages over compactness; for example, the fields of this representation
4626 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4627 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4628 # method in iOS; and, with just a little work, it can be easily formatted into
4629 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4630 #
4631 # Example (Java):
4632 #
4633 # import com.google.type.Color;
4634 #
4635 # // ...
4636 # public static java.awt.Color fromProto(Color protocolor) {
4637 # float alpha = protocolor.hasAlpha()
4638 # ? protocolor.getAlpha().getValue()
4639 # : 1.0;
4640 #
4641 # return new java.awt.Color(
4642 # protocolor.getRed(),
4643 # protocolor.getGreen(),
4644 # protocolor.getBlue(),
4645 # alpha);
4646 # }
4647 #
4648 # public static Color toProto(java.awt.Color color) {
4649 # float red = (float) color.getRed();
4650 # float green = (float) color.getGreen();
4651 # float blue = (float) color.getBlue();
4652 # float denominator = 255.0;
4653 # Color.Builder resultBuilder =
4654 # Color
4655 # .newBuilder()
4656 # .setRed(red / denominator)
4657 # .setGreen(green / denominator)
4658 # .setBlue(blue / denominator);
4659 # int alpha = color.getAlpha();
4660 # if (alpha != 255) {
4661 # result.setAlpha(
4662 # FloatValue
4663 # .newBuilder()
4664 # .setValue(((float) alpha) / denominator)
4665 # .build());
4666 # }
4667 # return resultBuilder.build();
4668 # }
4669 # // ...
4670 #
4671 # Example (iOS / Obj-C):
4672 #
4673 # // ...
4674 # static UIColor* fromProto(Color* protocolor) {
4675 # float red = [protocolor red];
4676 # float green = [protocolor green];
4677 # float blue = [protocolor blue];
4678 # FloatValue* alpha_wrapper = [protocolor alpha];
4679 # float alpha = 1.0;
4680 # if (alpha_wrapper != nil) {
4681 # alpha = [alpha_wrapper value];
4682 # }
4683 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4684 # }
4685 #
4686 # static Color* toProto(UIColor* color) {
4687 # CGFloat red, green, blue, alpha;
4688 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4689 # return nil;
4690 # }
4691 # Color* result = [Color alloc] init];
4692 # [result setRed:red];
4693 # [result setGreen:green];
4694 # [result setBlue:blue];
4695 # if (alpha <= 0.9999) {
4696 # [result setAlpha:floatWrapperWithValue(alpha)];
4697 # }
4698 # [result autorelease];
4699 # return result;
4700 # }
4701 # // ...
4702 #
4703 # Example (JavaScript):
4704 #
4705 # // ...
4706 #
4707 # var protoToCssColor = function(rgb_color) {
4708 # var redFrac = rgb_color.red || 0.0;
4709 # var greenFrac = rgb_color.green || 0.0;
4710 # var blueFrac = rgb_color.blue || 0.0;
4711 # var red = Math.floor(redFrac * 255);
4712 # var green = Math.floor(greenFrac * 255);
4713 # var blue = Math.floor(blueFrac * 255);
4714 #
4715 # if (!('alpha' in rgb_color)) {
4716 # return rgbToCssColor_(red, green, blue);
4717 # }
4718 #
4719 # var alphaFrac = rgb_color.alpha.value || 0.0;
4720 # var rgbParams = [red, green, blue].join(',');
4721 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4722 # };
4723 #
4724 # var rgbToCssColor_ = function(red, green, blue) {
4725 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4726 # var hexString = rgbNumber.toString(16);
4727 # var missingZeros = 6 - hexString.length;
4728 # var resultBuilder = ['#'];
4729 # for (var i = 0; i < missingZeros; i++) {
4730 # resultBuilder.push('0');
4731 # }
4732 # resultBuilder.push(hexString);
4733 # return resultBuilder.join('');
4734 # };
4735 #
4736 # // ...
4737 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4738 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4739 # the final pixel color is defined by the equation:
4740 #
4741 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4742 #
4743 # This means that a value of 1.0 corresponds to a solid color, whereas
4744 # a value of 0.0 corresponds to a completely transparent color. This
4745 # uses a wrapper message rather than a simple float scalar so that it is
4746 # possible to distinguish between a default value and the value being unset.
4747 # If omitted, this color object is to be rendered as a solid color
4748 # (as if the alpha value had been explicitly given with a value of 1.0).
4749 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4750 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4751 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004752 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004753 "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).
4754 # Absent values indicate that the field isn't specified.
4755 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
4756 # for simplicity of conversion to/from color representations in various
4757 # languages over compactness; for example, the fields of this representation
4758 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4759 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4760 # method in iOS; and, with just a little work, it can be easily formatted into
4761 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4762 #
4763 # Example (Java):
4764 #
4765 # import com.google.type.Color;
4766 #
4767 # // ...
4768 # public static java.awt.Color fromProto(Color protocolor) {
4769 # float alpha = protocolor.hasAlpha()
4770 # ? protocolor.getAlpha().getValue()
4771 # : 1.0;
4772 #
4773 # return new java.awt.Color(
4774 # protocolor.getRed(),
4775 # protocolor.getGreen(),
4776 # protocolor.getBlue(),
4777 # alpha);
4778 # }
4779 #
4780 # public static Color toProto(java.awt.Color color) {
4781 # float red = (float) color.getRed();
4782 # float green = (float) color.getGreen();
4783 # float blue = (float) color.getBlue();
4784 # float denominator = 255.0;
4785 # Color.Builder resultBuilder =
4786 # Color
4787 # .newBuilder()
4788 # .setRed(red / denominator)
4789 # .setGreen(green / denominator)
4790 # .setBlue(blue / denominator);
4791 # int alpha = color.getAlpha();
4792 # if (alpha != 255) {
4793 # result.setAlpha(
4794 # FloatValue
4795 # .newBuilder()
4796 # .setValue(((float) alpha) / denominator)
4797 # .build());
4798 # }
4799 # return resultBuilder.build();
4800 # }
4801 # // ...
4802 #
4803 # Example (iOS / Obj-C):
4804 #
4805 # // ...
4806 # static UIColor* fromProto(Color* protocolor) {
4807 # float red = [protocolor red];
4808 # float green = [protocolor green];
4809 # float blue = [protocolor blue];
4810 # FloatValue* alpha_wrapper = [protocolor alpha];
4811 # float alpha = 1.0;
4812 # if (alpha_wrapper != nil) {
4813 # alpha = [alpha_wrapper value];
4814 # }
4815 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4816 # }
4817 #
4818 # static Color* toProto(UIColor* color) {
4819 # CGFloat red, green, blue, alpha;
4820 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4821 # return nil;
4822 # }
4823 # Color* result = [Color alloc] init];
4824 # [result setRed:red];
4825 # [result setGreen:green];
4826 # [result setBlue:blue];
4827 # if (alpha <= 0.9999) {
4828 # [result setAlpha:floatWrapperWithValue(alpha)];
4829 # }
4830 # [result autorelease];
4831 # return result;
4832 # }
4833 # // ...
4834 #
4835 # Example (JavaScript):
4836 #
4837 # // ...
4838 #
4839 # var protoToCssColor = function(rgb_color) {
4840 # var redFrac = rgb_color.red || 0.0;
4841 # var greenFrac = rgb_color.green || 0.0;
4842 # var blueFrac = rgb_color.blue || 0.0;
4843 # var red = Math.floor(redFrac * 255);
4844 # var green = Math.floor(greenFrac * 255);
4845 # var blue = Math.floor(blueFrac * 255);
4846 #
4847 # if (!('alpha' in rgb_color)) {
4848 # return rgbToCssColor_(red, green, blue);
4849 # }
4850 #
4851 # var alphaFrac = rgb_color.alpha.value || 0.0;
4852 # var rgbParams = [red, green, blue].join(',');
4853 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4854 # };
4855 #
4856 # var rgbToCssColor_ = function(red, green, blue) {
4857 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4858 # var hexString = rgbNumber.toString(16);
4859 # var missingZeros = 6 - hexString.length;
4860 # var resultBuilder = ['#'];
4861 # for (var i = 0; i < missingZeros; i++) {
4862 # resultBuilder.push('0');
4863 # }
4864 # resultBuilder.push(hexString);
4865 # return resultBuilder.join('');
4866 # };
4867 #
4868 # // ...
4869 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4870 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4871 # the final pixel color is defined by the equation:
4872 #
4873 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4874 #
4875 # This means that a value of 1.0 corresponds to a solid color, whereas
4876 # a value of 0.0 corresponds to a completely transparent color. This
4877 # uses a wrapper message rather than a simple float scalar so that it is
4878 # possible to distinguish between a default value and the value being unset.
4879 # If omitted, this color object is to be rendered as a solid color
4880 # (as if the alpha value had been explicitly given with a value of 1.0).
4881 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4882 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4883 },
4884 "bold": True or False, # True if the text is bold.
4885 "strikethrough": True or False, # True if the text has a strikethrough.
4886 "fontFamily": "A String", # The font family.
4887 "fontSize": 42, # The size of the font.
4888 "italic": True or False, # True if the text is italicized.
4889 "underline": True or False, # True if the text is underlined.
4890 },
4891 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
4892 "borders": { # The borders of the cell. # The borders of the cell.
4893 "top": { # A border along a cell. # The top border of the cell.
4894 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
4895 # for simplicity of conversion to/from color representations in various
4896 # languages over compactness; for example, the fields of this representation
4897 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4898 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4899 # method in iOS; and, with just a little work, it can be easily formatted into
4900 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4901 #
4902 # Example (Java):
4903 #
4904 # import com.google.type.Color;
4905 #
4906 # // ...
4907 # public static java.awt.Color fromProto(Color protocolor) {
4908 # float alpha = protocolor.hasAlpha()
4909 # ? protocolor.getAlpha().getValue()
4910 # : 1.0;
4911 #
4912 # return new java.awt.Color(
4913 # protocolor.getRed(),
4914 # protocolor.getGreen(),
4915 # protocolor.getBlue(),
4916 # alpha);
4917 # }
4918 #
4919 # public static Color toProto(java.awt.Color color) {
4920 # float red = (float) color.getRed();
4921 # float green = (float) color.getGreen();
4922 # float blue = (float) color.getBlue();
4923 # float denominator = 255.0;
4924 # Color.Builder resultBuilder =
4925 # Color
4926 # .newBuilder()
4927 # .setRed(red / denominator)
4928 # .setGreen(green / denominator)
4929 # .setBlue(blue / denominator);
4930 # int alpha = color.getAlpha();
4931 # if (alpha != 255) {
4932 # result.setAlpha(
4933 # FloatValue
4934 # .newBuilder()
4935 # .setValue(((float) alpha) / denominator)
4936 # .build());
4937 # }
4938 # return resultBuilder.build();
4939 # }
4940 # // ...
4941 #
4942 # Example (iOS / Obj-C):
4943 #
4944 # // ...
4945 # static UIColor* fromProto(Color* protocolor) {
4946 # float red = [protocolor red];
4947 # float green = [protocolor green];
4948 # float blue = [protocolor blue];
4949 # FloatValue* alpha_wrapper = [protocolor alpha];
4950 # float alpha = 1.0;
4951 # if (alpha_wrapper != nil) {
4952 # alpha = [alpha_wrapper value];
4953 # }
4954 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4955 # }
4956 #
4957 # static Color* toProto(UIColor* color) {
4958 # CGFloat red, green, blue, alpha;
4959 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4960 # return nil;
4961 # }
4962 # Color* result = [Color alloc] init];
4963 # [result setRed:red];
4964 # [result setGreen:green];
4965 # [result setBlue:blue];
4966 # if (alpha <= 0.9999) {
4967 # [result setAlpha:floatWrapperWithValue(alpha)];
4968 # }
4969 # [result autorelease];
4970 # return result;
4971 # }
4972 # // ...
4973 #
4974 # Example (JavaScript):
4975 #
4976 # // ...
4977 #
4978 # var protoToCssColor = function(rgb_color) {
4979 # var redFrac = rgb_color.red || 0.0;
4980 # var greenFrac = rgb_color.green || 0.0;
4981 # var blueFrac = rgb_color.blue || 0.0;
4982 # var red = Math.floor(redFrac * 255);
4983 # var green = Math.floor(greenFrac * 255);
4984 # var blue = Math.floor(blueFrac * 255);
4985 #
4986 # if (!('alpha' in rgb_color)) {
4987 # return rgbToCssColor_(red, green, blue);
4988 # }
4989 #
4990 # var alphaFrac = rgb_color.alpha.value || 0.0;
4991 # var rgbParams = [red, green, blue].join(',');
4992 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4993 # };
4994 #
4995 # var rgbToCssColor_ = function(red, green, blue) {
4996 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4997 # var hexString = rgbNumber.toString(16);
4998 # var missingZeros = 6 - hexString.length;
4999 # var resultBuilder = ['#'];
5000 # for (var i = 0; i < missingZeros; i++) {
5001 # resultBuilder.push('0');
5002 # }
5003 # resultBuilder.push(hexString);
5004 # return resultBuilder.join('');
5005 # };
5006 #
5007 # // ...
5008 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5009 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5010 # the final pixel color is defined by the equation:
5011 #
5012 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5013 #
5014 # This means that a value of 1.0 corresponds to a solid color, whereas
5015 # a value of 0.0 corresponds to a completely transparent color. This
5016 # uses a wrapper message rather than a simple float scalar so that it is
5017 # possible to distinguish between a default value and the value being unset.
5018 # If omitted, this color object is to be rendered as a solid color
5019 # (as if the alpha value had been explicitly given with a value of 1.0).
5020 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5021 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5022 },
5023 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005024 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005025 "style": "A String", # The style of the border.
5026 },
5027 "right": { # A border along a cell. # The right border of the cell.
5028 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
5029 # for simplicity of conversion to/from color representations in various
5030 # languages over compactness; for example, the fields of this representation
5031 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5032 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5033 # method in iOS; and, with just a little work, it can be easily formatted into
5034 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5035 #
5036 # Example (Java):
5037 #
5038 # import com.google.type.Color;
5039 #
5040 # // ...
5041 # public static java.awt.Color fromProto(Color protocolor) {
5042 # float alpha = protocolor.hasAlpha()
5043 # ? protocolor.getAlpha().getValue()
5044 # : 1.0;
5045 #
5046 # return new java.awt.Color(
5047 # protocolor.getRed(),
5048 # protocolor.getGreen(),
5049 # protocolor.getBlue(),
5050 # alpha);
5051 # }
5052 #
5053 # public static Color toProto(java.awt.Color color) {
5054 # float red = (float) color.getRed();
5055 # float green = (float) color.getGreen();
5056 # float blue = (float) color.getBlue();
5057 # float denominator = 255.0;
5058 # Color.Builder resultBuilder =
5059 # Color
5060 # .newBuilder()
5061 # .setRed(red / denominator)
5062 # .setGreen(green / denominator)
5063 # .setBlue(blue / denominator);
5064 # int alpha = color.getAlpha();
5065 # if (alpha != 255) {
5066 # result.setAlpha(
5067 # FloatValue
5068 # .newBuilder()
5069 # .setValue(((float) alpha) / denominator)
5070 # .build());
5071 # }
5072 # return resultBuilder.build();
5073 # }
5074 # // ...
5075 #
5076 # Example (iOS / Obj-C):
5077 #
5078 # // ...
5079 # static UIColor* fromProto(Color* protocolor) {
5080 # float red = [protocolor red];
5081 # float green = [protocolor green];
5082 # float blue = [protocolor blue];
5083 # FloatValue* alpha_wrapper = [protocolor alpha];
5084 # float alpha = 1.0;
5085 # if (alpha_wrapper != nil) {
5086 # alpha = [alpha_wrapper value];
5087 # }
5088 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5089 # }
5090 #
5091 # static Color* toProto(UIColor* color) {
5092 # CGFloat red, green, blue, alpha;
5093 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5094 # return nil;
5095 # }
5096 # Color* result = [Color alloc] init];
5097 # [result setRed:red];
5098 # [result setGreen:green];
5099 # [result setBlue:blue];
5100 # if (alpha <= 0.9999) {
5101 # [result setAlpha:floatWrapperWithValue(alpha)];
5102 # }
5103 # [result autorelease];
5104 # return result;
5105 # }
5106 # // ...
5107 #
5108 # Example (JavaScript):
5109 #
5110 # // ...
5111 #
5112 # var protoToCssColor = function(rgb_color) {
5113 # var redFrac = rgb_color.red || 0.0;
5114 # var greenFrac = rgb_color.green || 0.0;
5115 # var blueFrac = rgb_color.blue || 0.0;
5116 # var red = Math.floor(redFrac * 255);
5117 # var green = Math.floor(greenFrac * 255);
5118 # var blue = Math.floor(blueFrac * 255);
5119 #
5120 # if (!('alpha' in rgb_color)) {
5121 # return rgbToCssColor_(red, green, blue);
5122 # }
5123 #
5124 # var alphaFrac = rgb_color.alpha.value || 0.0;
5125 # var rgbParams = [red, green, blue].join(',');
5126 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5127 # };
5128 #
5129 # var rgbToCssColor_ = function(red, green, blue) {
5130 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5131 # var hexString = rgbNumber.toString(16);
5132 # var missingZeros = 6 - hexString.length;
5133 # var resultBuilder = ['#'];
5134 # for (var i = 0; i < missingZeros; i++) {
5135 # resultBuilder.push('0');
5136 # }
5137 # resultBuilder.push(hexString);
5138 # return resultBuilder.join('');
5139 # };
5140 #
5141 # // ...
5142 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5143 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5144 # the final pixel color is defined by the equation:
5145 #
5146 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5147 #
5148 # This means that a value of 1.0 corresponds to a solid color, whereas
5149 # a value of 0.0 corresponds to a completely transparent color. This
5150 # uses a wrapper message rather than a simple float scalar so that it is
5151 # possible to distinguish between a default value and the value being unset.
5152 # If omitted, this color object is to be rendered as a solid color
5153 # (as if the alpha value had been explicitly given with a value of 1.0).
5154 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5155 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5156 },
5157 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005158 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005159 "style": "A String", # The style of the border.
5160 },
5161 "bottom": { # A border along a cell. # The bottom border of the cell.
5162 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
5163 # for simplicity of conversion to/from color representations in various
5164 # languages over compactness; for example, the fields of this representation
5165 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5166 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5167 # method in iOS; and, with just a little work, it can be easily formatted into
5168 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5169 #
5170 # Example (Java):
5171 #
5172 # import com.google.type.Color;
5173 #
5174 # // ...
5175 # public static java.awt.Color fromProto(Color protocolor) {
5176 # float alpha = protocolor.hasAlpha()
5177 # ? protocolor.getAlpha().getValue()
5178 # : 1.0;
5179 #
5180 # return new java.awt.Color(
5181 # protocolor.getRed(),
5182 # protocolor.getGreen(),
5183 # protocolor.getBlue(),
5184 # alpha);
5185 # }
5186 #
5187 # public static Color toProto(java.awt.Color color) {
5188 # float red = (float) color.getRed();
5189 # float green = (float) color.getGreen();
5190 # float blue = (float) color.getBlue();
5191 # float denominator = 255.0;
5192 # Color.Builder resultBuilder =
5193 # Color
5194 # .newBuilder()
5195 # .setRed(red / denominator)
5196 # .setGreen(green / denominator)
5197 # .setBlue(blue / denominator);
5198 # int alpha = color.getAlpha();
5199 # if (alpha != 255) {
5200 # result.setAlpha(
5201 # FloatValue
5202 # .newBuilder()
5203 # .setValue(((float) alpha) / denominator)
5204 # .build());
5205 # }
5206 # return resultBuilder.build();
5207 # }
5208 # // ...
5209 #
5210 # Example (iOS / Obj-C):
5211 #
5212 # // ...
5213 # static UIColor* fromProto(Color* protocolor) {
5214 # float red = [protocolor red];
5215 # float green = [protocolor green];
5216 # float blue = [protocolor blue];
5217 # FloatValue* alpha_wrapper = [protocolor alpha];
5218 # float alpha = 1.0;
5219 # if (alpha_wrapper != nil) {
5220 # alpha = [alpha_wrapper value];
5221 # }
5222 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5223 # }
5224 #
5225 # static Color* toProto(UIColor* color) {
5226 # CGFloat red, green, blue, alpha;
5227 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5228 # return nil;
5229 # }
5230 # Color* result = [Color alloc] init];
5231 # [result setRed:red];
5232 # [result setGreen:green];
5233 # [result setBlue:blue];
5234 # if (alpha <= 0.9999) {
5235 # [result setAlpha:floatWrapperWithValue(alpha)];
5236 # }
5237 # [result autorelease];
5238 # return result;
5239 # }
5240 # // ...
5241 #
5242 # Example (JavaScript):
5243 #
5244 # // ...
5245 #
5246 # var protoToCssColor = function(rgb_color) {
5247 # var redFrac = rgb_color.red || 0.0;
5248 # var greenFrac = rgb_color.green || 0.0;
5249 # var blueFrac = rgb_color.blue || 0.0;
5250 # var red = Math.floor(redFrac * 255);
5251 # var green = Math.floor(greenFrac * 255);
5252 # var blue = Math.floor(blueFrac * 255);
5253 #
5254 # if (!('alpha' in rgb_color)) {
5255 # return rgbToCssColor_(red, green, blue);
5256 # }
5257 #
5258 # var alphaFrac = rgb_color.alpha.value || 0.0;
5259 # var rgbParams = [red, green, blue].join(',');
5260 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5261 # };
5262 #
5263 # var rgbToCssColor_ = function(red, green, blue) {
5264 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5265 # var hexString = rgbNumber.toString(16);
5266 # var missingZeros = 6 - hexString.length;
5267 # var resultBuilder = ['#'];
5268 # for (var i = 0; i < missingZeros; i++) {
5269 # resultBuilder.push('0');
5270 # }
5271 # resultBuilder.push(hexString);
5272 # return resultBuilder.join('');
5273 # };
5274 #
5275 # // ...
5276 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5277 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5278 # the final pixel color is defined by the equation:
5279 #
5280 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5281 #
5282 # This means that a value of 1.0 corresponds to a solid color, whereas
5283 # a value of 0.0 corresponds to a completely transparent color. This
5284 # uses a wrapper message rather than a simple float scalar so that it is
5285 # possible to distinguish between a default value and the value being unset.
5286 # If omitted, this color object is to be rendered as a solid color
5287 # (as if the alpha value had been explicitly given with a value of 1.0).
5288 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5289 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5290 },
5291 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005292 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005293 "style": "A String", # The style of the border.
5294 },
5295 "left": { # A border along a cell. # The left border of the cell.
5296 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
5297 # for simplicity of conversion to/from color representations in various
5298 # languages over compactness; for example, the fields of this representation
5299 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5300 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5301 # method in iOS; and, with just a little work, it can be easily formatted into
5302 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5303 #
5304 # Example (Java):
5305 #
5306 # import com.google.type.Color;
5307 #
5308 # // ...
5309 # public static java.awt.Color fromProto(Color protocolor) {
5310 # float alpha = protocolor.hasAlpha()
5311 # ? protocolor.getAlpha().getValue()
5312 # : 1.0;
5313 #
5314 # return new java.awt.Color(
5315 # protocolor.getRed(),
5316 # protocolor.getGreen(),
5317 # protocolor.getBlue(),
5318 # alpha);
5319 # }
5320 #
5321 # public static Color toProto(java.awt.Color color) {
5322 # float red = (float) color.getRed();
5323 # float green = (float) color.getGreen();
5324 # float blue = (float) color.getBlue();
5325 # float denominator = 255.0;
5326 # Color.Builder resultBuilder =
5327 # Color
5328 # .newBuilder()
5329 # .setRed(red / denominator)
5330 # .setGreen(green / denominator)
5331 # .setBlue(blue / denominator);
5332 # int alpha = color.getAlpha();
5333 # if (alpha != 255) {
5334 # result.setAlpha(
5335 # FloatValue
5336 # .newBuilder()
5337 # .setValue(((float) alpha) / denominator)
5338 # .build());
5339 # }
5340 # return resultBuilder.build();
5341 # }
5342 # // ...
5343 #
5344 # Example (iOS / Obj-C):
5345 #
5346 # // ...
5347 # static UIColor* fromProto(Color* protocolor) {
5348 # float red = [protocolor red];
5349 # float green = [protocolor green];
5350 # float blue = [protocolor blue];
5351 # FloatValue* alpha_wrapper = [protocolor alpha];
5352 # float alpha = 1.0;
5353 # if (alpha_wrapper != nil) {
5354 # alpha = [alpha_wrapper value];
5355 # }
5356 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5357 # }
5358 #
5359 # static Color* toProto(UIColor* color) {
5360 # CGFloat red, green, blue, alpha;
5361 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5362 # return nil;
5363 # }
5364 # Color* result = [Color alloc] init];
5365 # [result setRed:red];
5366 # [result setGreen:green];
5367 # [result setBlue:blue];
5368 # if (alpha <= 0.9999) {
5369 # [result setAlpha:floatWrapperWithValue(alpha)];
5370 # }
5371 # [result autorelease];
5372 # return result;
5373 # }
5374 # // ...
5375 #
5376 # Example (JavaScript):
5377 #
5378 # // ...
5379 #
5380 # var protoToCssColor = function(rgb_color) {
5381 # var redFrac = rgb_color.red || 0.0;
5382 # var greenFrac = rgb_color.green || 0.0;
5383 # var blueFrac = rgb_color.blue || 0.0;
5384 # var red = Math.floor(redFrac * 255);
5385 # var green = Math.floor(greenFrac * 255);
5386 # var blue = Math.floor(blueFrac * 255);
5387 #
5388 # if (!('alpha' in rgb_color)) {
5389 # return rgbToCssColor_(red, green, blue);
5390 # }
5391 #
5392 # var alphaFrac = rgb_color.alpha.value || 0.0;
5393 # var rgbParams = [red, green, blue].join(',');
5394 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5395 # };
5396 #
5397 # var rgbToCssColor_ = function(red, green, blue) {
5398 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5399 # var hexString = rgbNumber.toString(16);
5400 # var missingZeros = 6 - hexString.length;
5401 # var resultBuilder = ['#'];
5402 # for (var i = 0; i < missingZeros; i++) {
5403 # resultBuilder.push('0');
5404 # }
5405 # resultBuilder.push(hexString);
5406 # return resultBuilder.join('');
5407 # };
5408 #
5409 # // ...
5410 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5411 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5412 # the final pixel color is defined by the equation:
5413 #
5414 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5415 #
5416 # This means that a value of 1.0 corresponds to a solid color, whereas
5417 # a value of 0.0 corresponds to a completely transparent color. This
5418 # uses a wrapper message rather than a simple float scalar so that it is
5419 # possible to distinguish between a default value and the value being unset.
5420 # If omitted, this color object is to be rendered as a solid color
5421 # (as if the alpha value had been explicitly given with a value of 1.0).
5422 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5423 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5424 },
5425 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005426 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005427 "style": "A String", # The style of the border.
5428 },
5429 },
5430 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
5431 },
5432 },
5433 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
5434 # the interpolation points listed. The format of a cell will vary
5435 # based on its contents as compared to the values of the interpolation
5436 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005437 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005438 # These pin the gradient color scale according to the color,
5439 # type and value chosen.
5440 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
5441 # for simplicity of conversion to/from color representations in various
5442 # languages over compactness; for example, the fields of this representation
5443 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5444 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5445 # method in iOS; and, with just a little work, it can be easily formatted into
5446 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5447 #
5448 # Example (Java):
5449 #
5450 # import com.google.type.Color;
5451 #
5452 # // ...
5453 # public static java.awt.Color fromProto(Color protocolor) {
5454 # float alpha = protocolor.hasAlpha()
5455 # ? protocolor.getAlpha().getValue()
5456 # : 1.0;
5457 #
5458 # return new java.awt.Color(
5459 # protocolor.getRed(),
5460 # protocolor.getGreen(),
5461 # protocolor.getBlue(),
5462 # alpha);
5463 # }
5464 #
5465 # public static Color toProto(java.awt.Color color) {
5466 # float red = (float) color.getRed();
5467 # float green = (float) color.getGreen();
5468 # float blue = (float) color.getBlue();
5469 # float denominator = 255.0;
5470 # Color.Builder resultBuilder =
5471 # Color
5472 # .newBuilder()
5473 # .setRed(red / denominator)
5474 # .setGreen(green / denominator)
5475 # .setBlue(blue / denominator);
5476 # int alpha = color.getAlpha();
5477 # if (alpha != 255) {
5478 # result.setAlpha(
5479 # FloatValue
5480 # .newBuilder()
5481 # .setValue(((float) alpha) / denominator)
5482 # .build());
5483 # }
5484 # return resultBuilder.build();
5485 # }
5486 # // ...
5487 #
5488 # Example (iOS / Obj-C):
5489 #
5490 # // ...
5491 # static UIColor* fromProto(Color* protocolor) {
5492 # float red = [protocolor red];
5493 # float green = [protocolor green];
5494 # float blue = [protocolor blue];
5495 # FloatValue* alpha_wrapper = [protocolor alpha];
5496 # float alpha = 1.0;
5497 # if (alpha_wrapper != nil) {
5498 # alpha = [alpha_wrapper value];
5499 # }
5500 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5501 # }
5502 #
5503 # static Color* toProto(UIColor* color) {
5504 # CGFloat red, green, blue, alpha;
5505 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5506 # return nil;
5507 # }
5508 # Color* result = [Color alloc] init];
5509 # [result setRed:red];
5510 # [result setGreen:green];
5511 # [result setBlue:blue];
5512 # if (alpha <= 0.9999) {
5513 # [result setAlpha:floatWrapperWithValue(alpha)];
5514 # }
5515 # [result autorelease];
5516 # return result;
5517 # }
5518 # // ...
5519 #
5520 # Example (JavaScript):
5521 #
5522 # // ...
5523 #
5524 # var protoToCssColor = function(rgb_color) {
5525 # var redFrac = rgb_color.red || 0.0;
5526 # var greenFrac = rgb_color.green || 0.0;
5527 # var blueFrac = rgb_color.blue || 0.0;
5528 # var red = Math.floor(redFrac * 255);
5529 # var green = Math.floor(greenFrac * 255);
5530 # var blue = Math.floor(blueFrac * 255);
5531 #
5532 # if (!('alpha' in rgb_color)) {
5533 # return rgbToCssColor_(red, green, blue);
5534 # }
5535 #
5536 # var alphaFrac = rgb_color.alpha.value || 0.0;
5537 # var rgbParams = [red, green, blue].join(',');
5538 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5539 # };
5540 #
5541 # var rgbToCssColor_ = function(red, green, blue) {
5542 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5543 # var hexString = rgbNumber.toString(16);
5544 # var missingZeros = 6 - hexString.length;
5545 # var resultBuilder = ['#'];
5546 # for (var i = 0; i < missingZeros; i++) {
5547 # resultBuilder.push('0');
5548 # }
5549 # resultBuilder.push(hexString);
5550 # return resultBuilder.join('');
5551 # };
5552 #
5553 # // ...
5554 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5555 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5556 # the final pixel color is defined by the equation:
5557 #
5558 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5559 #
5560 # This means that a value of 1.0 corresponds to a solid color, whereas
5561 # a value of 0.0 corresponds to a completely transparent color. This
5562 # uses a wrapper message rather than a simple float scalar so that it is
5563 # possible to distinguish between a default value and the value being unset.
5564 # If omitted, this color object is to be rendered as a solid color
5565 # (as if the alpha value had been explicitly given with a value of 1.0).
5566 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5567 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5568 },
5569 "type": "A String", # How the value should be interpreted.
5570 "value": "A String", # The value this interpolation point uses. May be a formula.
5571 # Unused if type is MIN or
5572 # MAX.
5573 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005574 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005575 # These pin the gradient color scale according to the color,
5576 # type and value chosen.
5577 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
5578 # for simplicity of conversion to/from color representations in various
5579 # languages over compactness; for example, the fields of this representation
5580 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5581 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5582 # method in iOS; and, with just a little work, it can be easily formatted into
5583 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5584 #
5585 # Example (Java):
5586 #
5587 # import com.google.type.Color;
5588 #
5589 # // ...
5590 # public static java.awt.Color fromProto(Color protocolor) {
5591 # float alpha = protocolor.hasAlpha()
5592 # ? protocolor.getAlpha().getValue()
5593 # : 1.0;
5594 #
5595 # return new java.awt.Color(
5596 # protocolor.getRed(),
5597 # protocolor.getGreen(),
5598 # protocolor.getBlue(),
5599 # alpha);
5600 # }
5601 #
5602 # public static Color toProto(java.awt.Color color) {
5603 # float red = (float) color.getRed();
5604 # float green = (float) color.getGreen();
5605 # float blue = (float) color.getBlue();
5606 # float denominator = 255.0;
5607 # Color.Builder resultBuilder =
5608 # Color
5609 # .newBuilder()
5610 # .setRed(red / denominator)
5611 # .setGreen(green / denominator)
5612 # .setBlue(blue / denominator);
5613 # int alpha = color.getAlpha();
5614 # if (alpha != 255) {
5615 # result.setAlpha(
5616 # FloatValue
5617 # .newBuilder()
5618 # .setValue(((float) alpha) / denominator)
5619 # .build());
5620 # }
5621 # return resultBuilder.build();
5622 # }
5623 # // ...
5624 #
5625 # Example (iOS / Obj-C):
5626 #
5627 # // ...
5628 # static UIColor* fromProto(Color* protocolor) {
5629 # float red = [protocolor red];
5630 # float green = [protocolor green];
5631 # float blue = [protocolor blue];
5632 # FloatValue* alpha_wrapper = [protocolor alpha];
5633 # float alpha = 1.0;
5634 # if (alpha_wrapper != nil) {
5635 # alpha = [alpha_wrapper value];
5636 # }
5637 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5638 # }
5639 #
5640 # static Color* toProto(UIColor* color) {
5641 # CGFloat red, green, blue, alpha;
5642 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5643 # return nil;
5644 # }
5645 # Color* result = [Color alloc] init];
5646 # [result setRed:red];
5647 # [result setGreen:green];
5648 # [result setBlue:blue];
5649 # if (alpha <= 0.9999) {
5650 # [result setAlpha:floatWrapperWithValue(alpha)];
5651 # }
5652 # [result autorelease];
5653 # return result;
5654 # }
5655 # // ...
5656 #
5657 # Example (JavaScript):
5658 #
5659 # // ...
5660 #
5661 # var protoToCssColor = function(rgb_color) {
5662 # var redFrac = rgb_color.red || 0.0;
5663 # var greenFrac = rgb_color.green || 0.0;
5664 # var blueFrac = rgb_color.blue || 0.0;
5665 # var red = Math.floor(redFrac * 255);
5666 # var green = Math.floor(greenFrac * 255);
5667 # var blue = Math.floor(blueFrac * 255);
5668 #
5669 # if (!('alpha' in rgb_color)) {
5670 # return rgbToCssColor_(red, green, blue);
5671 # }
5672 #
5673 # var alphaFrac = rgb_color.alpha.value || 0.0;
5674 # var rgbParams = [red, green, blue].join(',');
5675 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5676 # };
5677 #
5678 # var rgbToCssColor_ = function(red, green, blue) {
5679 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5680 # var hexString = rgbNumber.toString(16);
5681 # var missingZeros = 6 - hexString.length;
5682 # var resultBuilder = ['#'];
5683 # for (var i = 0; i < missingZeros; i++) {
5684 # resultBuilder.push('0');
5685 # }
5686 # resultBuilder.push(hexString);
5687 # return resultBuilder.join('');
5688 # };
5689 #
5690 # // ...
5691 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5692 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5693 # the final pixel color is defined by the equation:
5694 #
5695 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5696 #
5697 # This means that a value of 1.0 corresponds to a solid color, whereas
5698 # a value of 0.0 corresponds to a completely transparent color. This
5699 # uses a wrapper message rather than a simple float scalar so that it is
5700 # possible to distinguish between a default value and the value being unset.
5701 # If omitted, this color object is to be rendered as a solid color
5702 # (as if the alpha value had been explicitly given with a value of 1.0).
5703 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5704 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5705 },
5706 "type": "A String", # How the value should be interpreted.
5707 "value": "A String", # The value this interpolation point uses. May be a formula.
5708 # Unused if type is MIN or
5709 # MAX.
5710 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005711 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005712 # These pin the gradient color scale according to the color,
5713 # type and value chosen.
5714 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
5715 # for simplicity of conversion to/from color representations in various
5716 # languages over compactness; for example, the fields of this representation
5717 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5718 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5719 # method in iOS; and, with just a little work, it can be easily formatted into
5720 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5721 #
5722 # Example (Java):
5723 #
5724 # import com.google.type.Color;
5725 #
5726 # // ...
5727 # public static java.awt.Color fromProto(Color protocolor) {
5728 # float alpha = protocolor.hasAlpha()
5729 # ? protocolor.getAlpha().getValue()
5730 # : 1.0;
5731 #
5732 # return new java.awt.Color(
5733 # protocolor.getRed(),
5734 # protocolor.getGreen(),
5735 # protocolor.getBlue(),
5736 # alpha);
5737 # }
5738 #
5739 # public static Color toProto(java.awt.Color color) {
5740 # float red = (float) color.getRed();
5741 # float green = (float) color.getGreen();
5742 # float blue = (float) color.getBlue();
5743 # float denominator = 255.0;
5744 # Color.Builder resultBuilder =
5745 # Color
5746 # .newBuilder()
5747 # .setRed(red / denominator)
5748 # .setGreen(green / denominator)
5749 # .setBlue(blue / denominator);
5750 # int alpha = color.getAlpha();
5751 # if (alpha != 255) {
5752 # result.setAlpha(
5753 # FloatValue
5754 # .newBuilder()
5755 # .setValue(((float) alpha) / denominator)
5756 # .build());
5757 # }
5758 # return resultBuilder.build();
5759 # }
5760 # // ...
5761 #
5762 # Example (iOS / Obj-C):
5763 #
5764 # // ...
5765 # static UIColor* fromProto(Color* protocolor) {
5766 # float red = [protocolor red];
5767 # float green = [protocolor green];
5768 # float blue = [protocolor blue];
5769 # FloatValue* alpha_wrapper = [protocolor alpha];
5770 # float alpha = 1.0;
5771 # if (alpha_wrapper != nil) {
5772 # alpha = [alpha_wrapper value];
5773 # }
5774 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5775 # }
5776 #
5777 # static Color* toProto(UIColor* color) {
5778 # CGFloat red, green, blue, alpha;
5779 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5780 # return nil;
5781 # }
5782 # Color* result = [Color alloc] init];
5783 # [result setRed:red];
5784 # [result setGreen:green];
5785 # [result setBlue:blue];
5786 # if (alpha <= 0.9999) {
5787 # [result setAlpha:floatWrapperWithValue(alpha)];
5788 # }
5789 # [result autorelease];
5790 # return result;
5791 # }
5792 # // ...
5793 #
5794 # Example (JavaScript):
5795 #
5796 # // ...
5797 #
5798 # var protoToCssColor = function(rgb_color) {
5799 # var redFrac = rgb_color.red || 0.0;
5800 # var greenFrac = rgb_color.green || 0.0;
5801 # var blueFrac = rgb_color.blue || 0.0;
5802 # var red = Math.floor(redFrac * 255);
5803 # var green = Math.floor(greenFrac * 255);
5804 # var blue = Math.floor(blueFrac * 255);
5805 #
5806 # if (!('alpha' in rgb_color)) {
5807 # return rgbToCssColor_(red, green, blue);
5808 # }
5809 #
5810 # var alphaFrac = rgb_color.alpha.value || 0.0;
5811 # var rgbParams = [red, green, blue].join(',');
5812 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5813 # };
5814 #
5815 # var rgbToCssColor_ = function(red, green, blue) {
5816 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5817 # var hexString = rgbNumber.toString(16);
5818 # var missingZeros = 6 - hexString.length;
5819 # var resultBuilder = ['#'];
5820 # for (var i = 0; i < missingZeros; i++) {
5821 # resultBuilder.push('0');
5822 # }
5823 # resultBuilder.push(hexString);
5824 # return resultBuilder.join('');
5825 # };
5826 #
5827 # // ...
5828 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5829 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5830 # the final pixel color is defined by the equation:
5831 #
5832 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5833 #
5834 # This means that a value of 1.0 corresponds to a solid color, whereas
5835 # a value of 0.0 corresponds to a completely transparent color. This
5836 # uses a wrapper message rather than a simple float scalar so that it is
5837 # possible to distinguish between a default value and the value being unset.
5838 # If omitted, this color object is to be rendered as a solid color
5839 # (as if the alpha value had been explicitly given with a value of 1.0).
5840 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5841 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5842 },
5843 "type": "A String", # How the value should be interpreted.
5844 "value": "A String", # The value this interpolation point uses. May be a formula.
5845 # Unused if type is MIN or
5846 # MAX.
5847 },
5848 },
5849 },
5850 },
5851 "repeatCell": { # Updates all cells in the range to the values in the given Cell object. # Repeats a single cell across a range.
5852 # Only the fields listed in the fields field are updated; others are
5853 # unchanged.
5854 #
5855 # If writing a cell with a formula, the formula's ranges will automatically
5856 # increment for each field in the range.
5857 # For example, if writing a cell with formula `=A1` into range B2:C4,
5858 # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`,
5859 # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`.
5860 #
5861 # To keep the formula's ranges static, use the `$` indicator.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005862 # For example, use the formula `=$A$1` to prevent both the row and the
5863 # column from incrementing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005864 "cell": { # Data about a specific cell. # The data to write.
5865 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
5866 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005867 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005868 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005869 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005870 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
5871 # or vertically (as rows).
5872 "rows": [ # Each row grouping in the pivot table.
5873 { # A single grouping (either row or column) in a pivot table.
5874 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
5875 "valueMetadata": [ # Metadata about values in the grouping.
5876 { # Metadata about a value in a pivot grouping.
5877 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
5878 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
5879 # (Note that formulaValue is not valid,
5880 # because the values will be calculated.)
5881 "numberValue": 3.14, # Represents a double value.
5882 # Note: Dates, Times and DateTimes are represented as doubles in
5883 # "serial number" format.
5884 "boolValue": True or False, # Represents a boolean value.
5885 "formulaValue": "A String", # Represents a formula.
5886 "stringValue": "A String", # Represents a string value.
5887 # Leading single quotes are not included. For example, if the user typed
5888 # `'123` into the UI, this would be represented as a `stringValue` of
5889 # `"123"`.
5890 "errorValue": { # An error in a cell. # Represents an error.
5891 # This field is read-only.
5892 "message": "A String", # A message with more information about the error
5893 # (in the spreadsheet's locale).
5894 "type": "A String", # The type of error.
5895 },
5896 },
5897 },
5898 ],
5899 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
5900 # If not specified, sorting is alphabetical by this group's values.
5901 "buckets": [ # Determines the bucket from which values are chosen to sort.
5902 #
5903 # For example, in a pivot table with one row group & two column groups,
5904 # the row group can list up to two values. The first value corresponds
5905 # to a value within the first column group, and the second value
5906 # corresponds to a value in the second column group. If no values
5907 # are listed, this would indicate that the row should be sorted according
5908 # to the "Grand Total" over the column groups. If a single value is listed,
5909 # this would correspond to using the "Total" of that bucket.
5910 { # The kinds of value that a cell in a spreadsheet can have.
5911 "numberValue": 3.14, # Represents a double value.
5912 # Note: Dates, Times and DateTimes are represented as doubles in
5913 # "serial number" format.
5914 "boolValue": True or False, # Represents a boolean value.
5915 "formulaValue": "A String", # Represents a formula.
5916 "stringValue": "A String", # Represents a string value.
5917 # Leading single quotes are not included. For example, if the user typed
5918 # `'123` into the UI, this would be represented as a `stringValue` of
5919 # `"123"`.
5920 "errorValue": { # An error in a cell. # Represents an error.
5921 # This field is read-only.
5922 "message": "A String", # A message with more information about the error
5923 # (in the spreadsheet's locale).
5924 "type": "A String", # The type of error.
5925 },
5926 },
5927 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005928 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005929 # grouping should be sorted by.
5930 },
5931 "sortOrder": "A String", # The order the values in this group should be sorted.
5932 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
5933 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005934 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005935 # means this group refers to column `C`, whereas the offset `1` would refer
5936 # to column `D`.
5937 },
5938 ],
5939 "source": { # A range on a sheet. # The range the pivot table is reading data from.
5940 # All indexes are zero-based.
5941 # Indexes are half open, e.g the start index is inclusive
5942 # and the end index is exclusive -- [start_index, end_index).
5943 # Missing indexes indicate the range is unbounded on that side.
5944 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005945 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005946 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005947 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005948 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005949 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005950 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005951 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005952 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005953 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005954 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005955 # `Sheet1!A:B == sheet_id: 0,
5956 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005957 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005958 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005959 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005960 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005961 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005962 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005963 #
5964 # The start index must always be less than or equal to the end index.
5965 # If the start index equals the end index, then the range is empty.
5966 # Empty ranges are typically not meaningful and are usually rendered in the
5967 # UI as `#REF!`.
5968 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
5969 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
5970 "sheetId": 42, # The sheet this range is on.
5971 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
5972 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
5973 },
5974 "values": [ # A list of values to include in the pivot table.
5975 { # The definition of how a value in a pivot table should be calculated.
5976 "formula": "A String", # A custom formula to calculate the value. The formula must start
5977 # with an `=` character.
5978 "summarizeFunction": "A String", # A function to summarize the value.
5979 # If formula is set, the only supported values are
5980 # SUM and
5981 # CUSTOM.
5982 # If sourceColumnOffset is set, then `CUSTOM`
5983 # is not supported.
5984 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
5985 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005986 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005987 # means this value refers to column `C`, whereas the offset `1` would
5988 # refer to column `D`.
5989 "name": "A String", # A name to use for the value. This is only used if formula was set.
5990 # Otherwise, the column name is used.
5991 },
5992 ],
5993 "criteria": { # An optional mapping of filters per source column offset.
5994 #
5995 # The filters will be applied before aggregating data into the pivot table.
5996 # The map's key is the column offset of the source range that you want to
5997 # filter, and the value is the criteria for that column.
5998 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005999 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006000 # for column `C`, whereas the key `1` is for column `D`.
6001 "a_key": { # Criteria for showing/hiding rows in a pivot table.
6002 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
6003 "A String",
6004 ],
6005 },
6006 },
6007 "columns": [ # Each column grouping in the pivot table.
6008 { # A single grouping (either row or column) in a pivot table.
6009 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
6010 "valueMetadata": [ # Metadata about values in the grouping.
6011 { # Metadata about a value in a pivot grouping.
6012 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
6013 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
6014 # (Note that formulaValue is not valid,
6015 # because the values will be calculated.)
6016 "numberValue": 3.14, # Represents a double value.
6017 # Note: Dates, Times and DateTimes are represented as doubles in
6018 # "serial number" format.
6019 "boolValue": True or False, # Represents a boolean value.
6020 "formulaValue": "A String", # Represents a formula.
6021 "stringValue": "A String", # Represents a string value.
6022 # Leading single quotes are not included. For example, if the user typed
6023 # `'123` into the UI, this would be represented as a `stringValue` of
6024 # `"123"`.
6025 "errorValue": { # An error in a cell. # Represents an error.
6026 # This field is read-only.
6027 "message": "A String", # A message with more information about the error
6028 # (in the spreadsheet's locale).
6029 "type": "A String", # The type of error.
6030 },
6031 },
6032 },
6033 ],
6034 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
6035 # If not specified, sorting is alphabetical by this group's values.
6036 "buckets": [ # Determines the bucket from which values are chosen to sort.
6037 #
6038 # For example, in a pivot table with one row group & two column groups,
6039 # the row group can list up to two values. The first value corresponds
6040 # to a value within the first column group, and the second value
6041 # corresponds to a value in the second column group. If no values
6042 # are listed, this would indicate that the row should be sorted according
6043 # to the "Grand Total" over the column groups. If a single value is listed,
6044 # this would correspond to using the "Total" of that bucket.
6045 { # The kinds of value that a cell in a spreadsheet can have.
6046 "numberValue": 3.14, # Represents a double value.
6047 # Note: Dates, Times and DateTimes are represented as doubles in
6048 # "serial number" format.
6049 "boolValue": True or False, # Represents a boolean value.
6050 "formulaValue": "A String", # Represents a formula.
6051 "stringValue": "A String", # Represents a string value.
6052 # Leading single quotes are not included. For example, if the user typed
6053 # `'123` into the UI, this would be represented as a `stringValue` of
6054 # `"123"`.
6055 "errorValue": { # An error in a cell. # Represents an error.
6056 # This field is read-only.
6057 "message": "A String", # A message with more information about the error
6058 # (in the spreadsheet's locale).
6059 "type": "A String", # The type of error.
6060 },
6061 },
6062 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006063 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006064 # grouping should be sorted by.
6065 },
6066 "sortOrder": "A String", # The order the values in this group should be sorted.
6067 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
6068 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006069 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006070 # means this group refers to column `C`, whereas the offset `1` would refer
6071 # to column `D`.
6072 },
6073 ],
6074 },
6075 "hyperlink": "A String", # A hyperlink this cell points to, if any.
6076 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
6077 "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
6078 # the calculated value. For cells with literals, this will be
6079 # the same as the user_entered_value.
6080 # This field is read-only.
6081 "numberValue": 3.14, # Represents a double value.
6082 # Note: Dates, Times and DateTimes are represented as doubles in
6083 # "serial number" format.
6084 "boolValue": True or False, # Represents a boolean value.
6085 "formulaValue": "A String", # Represents a formula.
6086 "stringValue": "A String", # Represents a string value.
6087 # Leading single quotes are not included. For example, if the user typed
6088 # `'123` into the UI, this would be represented as a `stringValue` of
6089 # `"123"`.
6090 "errorValue": { # An error in a cell. # Represents an error.
6091 # This field is read-only.
6092 "message": "A String", # A message with more information about the error
6093 # (in the spreadsheet's locale).
6094 "type": "A String", # The type of error.
6095 },
6096 },
6097 "formattedValue": "A String", # The formatted value of the cell.
6098 # This is the value as it's shown to the user.
6099 # This field is read-only.
6100 "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()`
6101 # Note: Dates, Times and DateTimes are represented as doubles in
6102 # serial number format.
6103 "numberValue": 3.14, # Represents a double value.
6104 # Note: Dates, Times and DateTimes are represented as doubles in
6105 # "serial number" format.
6106 "boolValue": True or False, # Represents a boolean value.
6107 "formulaValue": "A String", # Represents a formula.
6108 "stringValue": "A String", # Represents a string value.
6109 # Leading single quotes are not included. For example, if the user typed
6110 # `'123` into the UI, this would be represented as a `stringValue` of
6111 # `"123"`.
6112 "errorValue": { # An error in a cell. # Represents an error.
6113 # This field is read-only.
6114 "message": "A String", # A message with more information about the error
6115 # (in the spreadsheet's locale).
6116 "type": "A String", # The type of error.
6117 },
6118 },
6119 "note": "A String", # Any note on the cell.
6120 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
6121 # This includes the results of applying any conditional formatting and,
6122 # if the cell contains a formula, the computed number format.
6123 # If the effective format is the default format, effective format will
6124 # not be written.
6125 # This field is read-only.
6126 "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 -07006127 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
6128 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07006129 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
6130 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006131 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006132 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006133 },
6134 "textDirection": "A String", # The direction of the text in the cell.
6135 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
6136 # When updating padding, every field must be specified.
6137 "top": 42, # The top padding of the cell.
6138 "right": 42, # The right padding of the cell.
6139 "bottom": 42, # The bottom padding of the cell.
6140 "left": 42, # The left padding of the cell.
6141 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006142 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006143 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
6144 # for simplicity of conversion to/from color representations in various
6145 # languages over compactness; for example, the fields of this representation
6146 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6147 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6148 # method in iOS; and, with just a little work, it can be easily formatted into
6149 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6150 #
6151 # Example (Java):
6152 #
6153 # import com.google.type.Color;
6154 #
6155 # // ...
6156 # public static java.awt.Color fromProto(Color protocolor) {
6157 # float alpha = protocolor.hasAlpha()
6158 # ? protocolor.getAlpha().getValue()
6159 # : 1.0;
6160 #
6161 # return new java.awt.Color(
6162 # protocolor.getRed(),
6163 # protocolor.getGreen(),
6164 # protocolor.getBlue(),
6165 # alpha);
6166 # }
6167 #
6168 # public static Color toProto(java.awt.Color color) {
6169 # float red = (float) color.getRed();
6170 # float green = (float) color.getGreen();
6171 # float blue = (float) color.getBlue();
6172 # float denominator = 255.0;
6173 # Color.Builder resultBuilder =
6174 # Color
6175 # .newBuilder()
6176 # .setRed(red / denominator)
6177 # .setGreen(green / denominator)
6178 # .setBlue(blue / denominator);
6179 # int alpha = color.getAlpha();
6180 # if (alpha != 255) {
6181 # result.setAlpha(
6182 # FloatValue
6183 # .newBuilder()
6184 # .setValue(((float) alpha) / denominator)
6185 # .build());
6186 # }
6187 # return resultBuilder.build();
6188 # }
6189 # // ...
6190 #
6191 # Example (iOS / Obj-C):
6192 #
6193 # // ...
6194 # static UIColor* fromProto(Color* protocolor) {
6195 # float red = [protocolor red];
6196 # float green = [protocolor green];
6197 # float blue = [protocolor blue];
6198 # FloatValue* alpha_wrapper = [protocolor alpha];
6199 # float alpha = 1.0;
6200 # if (alpha_wrapper != nil) {
6201 # alpha = [alpha_wrapper value];
6202 # }
6203 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6204 # }
6205 #
6206 # static Color* toProto(UIColor* color) {
6207 # CGFloat red, green, blue, alpha;
6208 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6209 # return nil;
6210 # }
6211 # Color* result = [Color alloc] init];
6212 # [result setRed:red];
6213 # [result setGreen:green];
6214 # [result setBlue:blue];
6215 # if (alpha <= 0.9999) {
6216 # [result setAlpha:floatWrapperWithValue(alpha)];
6217 # }
6218 # [result autorelease];
6219 # return result;
6220 # }
6221 # // ...
6222 #
6223 # Example (JavaScript):
6224 #
6225 # // ...
6226 #
6227 # var protoToCssColor = function(rgb_color) {
6228 # var redFrac = rgb_color.red || 0.0;
6229 # var greenFrac = rgb_color.green || 0.0;
6230 # var blueFrac = rgb_color.blue || 0.0;
6231 # var red = Math.floor(redFrac * 255);
6232 # var green = Math.floor(greenFrac * 255);
6233 # var blue = Math.floor(blueFrac * 255);
6234 #
6235 # if (!('alpha' in rgb_color)) {
6236 # return rgbToCssColor_(red, green, blue);
6237 # }
6238 #
6239 # var alphaFrac = rgb_color.alpha.value || 0.0;
6240 # var rgbParams = [red, green, blue].join(',');
6241 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6242 # };
6243 #
6244 # var rgbToCssColor_ = function(red, green, blue) {
6245 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6246 # var hexString = rgbNumber.toString(16);
6247 # var missingZeros = 6 - hexString.length;
6248 # var resultBuilder = ['#'];
6249 # for (var i = 0; i < missingZeros; i++) {
6250 # resultBuilder.push('0');
6251 # }
6252 # resultBuilder.push(hexString);
6253 # return resultBuilder.join('');
6254 # };
6255 #
6256 # // ...
6257 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6258 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6259 # the final pixel color is defined by the equation:
6260 #
6261 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6262 #
6263 # This means that a value of 1.0 corresponds to a solid color, whereas
6264 # a value of 0.0 corresponds to a completely transparent color. This
6265 # uses a wrapper message rather than a simple float scalar so that it is
6266 # possible to distinguish between a default value and the value being unset.
6267 # If omitted, this color object is to be rendered as a solid color
6268 # (as if the alpha value had been explicitly given with a value of 1.0).
6269 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6270 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6271 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006272 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006273 "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).
6274 # Absent values indicate that the field isn't specified.
6275 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
6276 # for simplicity of conversion to/from color representations in various
6277 # languages over compactness; for example, the fields of this representation
6278 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6279 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6280 # method in iOS; and, with just a little work, it can be easily formatted into
6281 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6282 #
6283 # Example (Java):
6284 #
6285 # import com.google.type.Color;
6286 #
6287 # // ...
6288 # public static java.awt.Color fromProto(Color protocolor) {
6289 # float alpha = protocolor.hasAlpha()
6290 # ? protocolor.getAlpha().getValue()
6291 # : 1.0;
6292 #
6293 # return new java.awt.Color(
6294 # protocolor.getRed(),
6295 # protocolor.getGreen(),
6296 # protocolor.getBlue(),
6297 # alpha);
6298 # }
6299 #
6300 # public static Color toProto(java.awt.Color color) {
6301 # float red = (float) color.getRed();
6302 # float green = (float) color.getGreen();
6303 # float blue = (float) color.getBlue();
6304 # float denominator = 255.0;
6305 # Color.Builder resultBuilder =
6306 # Color
6307 # .newBuilder()
6308 # .setRed(red / denominator)
6309 # .setGreen(green / denominator)
6310 # .setBlue(blue / denominator);
6311 # int alpha = color.getAlpha();
6312 # if (alpha != 255) {
6313 # result.setAlpha(
6314 # FloatValue
6315 # .newBuilder()
6316 # .setValue(((float) alpha) / denominator)
6317 # .build());
6318 # }
6319 # return resultBuilder.build();
6320 # }
6321 # // ...
6322 #
6323 # Example (iOS / Obj-C):
6324 #
6325 # // ...
6326 # static UIColor* fromProto(Color* protocolor) {
6327 # float red = [protocolor red];
6328 # float green = [protocolor green];
6329 # float blue = [protocolor blue];
6330 # FloatValue* alpha_wrapper = [protocolor alpha];
6331 # float alpha = 1.0;
6332 # if (alpha_wrapper != nil) {
6333 # alpha = [alpha_wrapper value];
6334 # }
6335 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6336 # }
6337 #
6338 # static Color* toProto(UIColor* color) {
6339 # CGFloat red, green, blue, alpha;
6340 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6341 # return nil;
6342 # }
6343 # Color* result = [Color alloc] init];
6344 # [result setRed:red];
6345 # [result setGreen:green];
6346 # [result setBlue:blue];
6347 # if (alpha <= 0.9999) {
6348 # [result setAlpha:floatWrapperWithValue(alpha)];
6349 # }
6350 # [result autorelease];
6351 # return result;
6352 # }
6353 # // ...
6354 #
6355 # Example (JavaScript):
6356 #
6357 # // ...
6358 #
6359 # var protoToCssColor = function(rgb_color) {
6360 # var redFrac = rgb_color.red || 0.0;
6361 # var greenFrac = rgb_color.green || 0.0;
6362 # var blueFrac = rgb_color.blue || 0.0;
6363 # var red = Math.floor(redFrac * 255);
6364 # var green = Math.floor(greenFrac * 255);
6365 # var blue = Math.floor(blueFrac * 255);
6366 #
6367 # if (!('alpha' in rgb_color)) {
6368 # return rgbToCssColor_(red, green, blue);
6369 # }
6370 #
6371 # var alphaFrac = rgb_color.alpha.value || 0.0;
6372 # var rgbParams = [red, green, blue].join(',');
6373 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6374 # };
6375 #
6376 # var rgbToCssColor_ = function(red, green, blue) {
6377 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6378 # var hexString = rgbNumber.toString(16);
6379 # var missingZeros = 6 - hexString.length;
6380 # var resultBuilder = ['#'];
6381 # for (var i = 0; i < missingZeros; i++) {
6382 # resultBuilder.push('0');
6383 # }
6384 # resultBuilder.push(hexString);
6385 # return resultBuilder.join('');
6386 # };
6387 #
6388 # // ...
6389 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6390 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6391 # the final pixel color is defined by the equation:
6392 #
6393 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6394 #
6395 # This means that a value of 1.0 corresponds to a solid color, whereas
6396 # a value of 0.0 corresponds to a completely transparent color. This
6397 # uses a wrapper message rather than a simple float scalar so that it is
6398 # possible to distinguish between a default value and the value being unset.
6399 # If omitted, this color object is to be rendered as a solid color
6400 # (as if the alpha value had been explicitly given with a value of 1.0).
6401 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6402 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6403 },
6404 "bold": True or False, # True if the text is bold.
6405 "strikethrough": True or False, # True if the text has a strikethrough.
6406 "fontFamily": "A String", # The font family.
6407 "fontSize": 42, # The size of the font.
6408 "italic": True or False, # True if the text is italicized.
6409 "underline": True or False, # True if the text is underlined.
6410 },
6411 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
6412 "borders": { # The borders of the cell. # The borders of the cell.
6413 "top": { # A border along a cell. # The top border of the cell.
6414 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
6415 # for simplicity of conversion to/from color representations in various
6416 # languages over compactness; for example, the fields of this representation
6417 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6418 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6419 # method in iOS; and, with just a little work, it can be easily formatted into
6420 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6421 #
6422 # Example (Java):
6423 #
6424 # import com.google.type.Color;
6425 #
6426 # // ...
6427 # public static java.awt.Color fromProto(Color protocolor) {
6428 # float alpha = protocolor.hasAlpha()
6429 # ? protocolor.getAlpha().getValue()
6430 # : 1.0;
6431 #
6432 # return new java.awt.Color(
6433 # protocolor.getRed(),
6434 # protocolor.getGreen(),
6435 # protocolor.getBlue(),
6436 # alpha);
6437 # }
6438 #
6439 # public static Color toProto(java.awt.Color color) {
6440 # float red = (float) color.getRed();
6441 # float green = (float) color.getGreen();
6442 # float blue = (float) color.getBlue();
6443 # float denominator = 255.0;
6444 # Color.Builder resultBuilder =
6445 # Color
6446 # .newBuilder()
6447 # .setRed(red / denominator)
6448 # .setGreen(green / denominator)
6449 # .setBlue(blue / denominator);
6450 # int alpha = color.getAlpha();
6451 # if (alpha != 255) {
6452 # result.setAlpha(
6453 # FloatValue
6454 # .newBuilder()
6455 # .setValue(((float) alpha) / denominator)
6456 # .build());
6457 # }
6458 # return resultBuilder.build();
6459 # }
6460 # // ...
6461 #
6462 # Example (iOS / Obj-C):
6463 #
6464 # // ...
6465 # static UIColor* fromProto(Color* protocolor) {
6466 # float red = [protocolor red];
6467 # float green = [protocolor green];
6468 # float blue = [protocolor blue];
6469 # FloatValue* alpha_wrapper = [protocolor alpha];
6470 # float alpha = 1.0;
6471 # if (alpha_wrapper != nil) {
6472 # alpha = [alpha_wrapper value];
6473 # }
6474 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6475 # }
6476 #
6477 # static Color* toProto(UIColor* color) {
6478 # CGFloat red, green, blue, alpha;
6479 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6480 # return nil;
6481 # }
6482 # Color* result = [Color alloc] init];
6483 # [result setRed:red];
6484 # [result setGreen:green];
6485 # [result setBlue:blue];
6486 # if (alpha <= 0.9999) {
6487 # [result setAlpha:floatWrapperWithValue(alpha)];
6488 # }
6489 # [result autorelease];
6490 # return result;
6491 # }
6492 # // ...
6493 #
6494 # Example (JavaScript):
6495 #
6496 # // ...
6497 #
6498 # var protoToCssColor = function(rgb_color) {
6499 # var redFrac = rgb_color.red || 0.0;
6500 # var greenFrac = rgb_color.green || 0.0;
6501 # var blueFrac = rgb_color.blue || 0.0;
6502 # var red = Math.floor(redFrac * 255);
6503 # var green = Math.floor(greenFrac * 255);
6504 # var blue = Math.floor(blueFrac * 255);
6505 #
6506 # if (!('alpha' in rgb_color)) {
6507 # return rgbToCssColor_(red, green, blue);
6508 # }
6509 #
6510 # var alphaFrac = rgb_color.alpha.value || 0.0;
6511 # var rgbParams = [red, green, blue].join(',');
6512 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6513 # };
6514 #
6515 # var rgbToCssColor_ = function(red, green, blue) {
6516 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6517 # var hexString = rgbNumber.toString(16);
6518 # var missingZeros = 6 - hexString.length;
6519 # var resultBuilder = ['#'];
6520 # for (var i = 0; i < missingZeros; i++) {
6521 # resultBuilder.push('0');
6522 # }
6523 # resultBuilder.push(hexString);
6524 # return resultBuilder.join('');
6525 # };
6526 #
6527 # // ...
6528 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6529 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6530 # the final pixel color is defined by the equation:
6531 #
6532 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6533 #
6534 # This means that a value of 1.0 corresponds to a solid color, whereas
6535 # a value of 0.0 corresponds to a completely transparent color. This
6536 # uses a wrapper message rather than a simple float scalar so that it is
6537 # possible to distinguish between a default value and the value being unset.
6538 # If omitted, this color object is to be rendered as a solid color
6539 # (as if the alpha value had been explicitly given with a value of 1.0).
6540 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6541 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6542 },
6543 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006544 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006545 "style": "A String", # The style of the border.
6546 },
6547 "right": { # A border along a cell. # The right border of the cell.
6548 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
6549 # for simplicity of conversion to/from color representations in various
6550 # languages over compactness; for example, the fields of this representation
6551 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6552 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6553 # method in iOS; and, with just a little work, it can be easily formatted into
6554 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6555 #
6556 # Example (Java):
6557 #
6558 # import com.google.type.Color;
6559 #
6560 # // ...
6561 # public static java.awt.Color fromProto(Color protocolor) {
6562 # float alpha = protocolor.hasAlpha()
6563 # ? protocolor.getAlpha().getValue()
6564 # : 1.0;
6565 #
6566 # return new java.awt.Color(
6567 # protocolor.getRed(),
6568 # protocolor.getGreen(),
6569 # protocolor.getBlue(),
6570 # alpha);
6571 # }
6572 #
6573 # public static Color toProto(java.awt.Color color) {
6574 # float red = (float) color.getRed();
6575 # float green = (float) color.getGreen();
6576 # float blue = (float) color.getBlue();
6577 # float denominator = 255.0;
6578 # Color.Builder resultBuilder =
6579 # Color
6580 # .newBuilder()
6581 # .setRed(red / denominator)
6582 # .setGreen(green / denominator)
6583 # .setBlue(blue / denominator);
6584 # int alpha = color.getAlpha();
6585 # if (alpha != 255) {
6586 # result.setAlpha(
6587 # FloatValue
6588 # .newBuilder()
6589 # .setValue(((float) alpha) / denominator)
6590 # .build());
6591 # }
6592 # return resultBuilder.build();
6593 # }
6594 # // ...
6595 #
6596 # Example (iOS / Obj-C):
6597 #
6598 # // ...
6599 # static UIColor* fromProto(Color* protocolor) {
6600 # float red = [protocolor red];
6601 # float green = [protocolor green];
6602 # float blue = [protocolor blue];
6603 # FloatValue* alpha_wrapper = [protocolor alpha];
6604 # float alpha = 1.0;
6605 # if (alpha_wrapper != nil) {
6606 # alpha = [alpha_wrapper value];
6607 # }
6608 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6609 # }
6610 #
6611 # static Color* toProto(UIColor* color) {
6612 # CGFloat red, green, blue, alpha;
6613 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6614 # return nil;
6615 # }
6616 # Color* result = [Color alloc] init];
6617 # [result setRed:red];
6618 # [result setGreen:green];
6619 # [result setBlue:blue];
6620 # if (alpha <= 0.9999) {
6621 # [result setAlpha:floatWrapperWithValue(alpha)];
6622 # }
6623 # [result autorelease];
6624 # return result;
6625 # }
6626 # // ...
6627 #
6628 # Example (JavaScript):
6629 #
6630 # // ...
6631 #
6632 # var protoToCssColor = function(rgb_color) {
6633 # var redFrac = rgb_color.red || 0.0;
6634 # var greenFrac = rgb_color.green || 0.0;
6635 # var blueFrac = rgb_color.blue || 0.0;
6636 # var red = Math.floor(redFrac * 255);
6637 # var green = Math.floor(greenFrac * 255);
6638 # var blue = Math.floor(blueFrac * 255);
6639 #
6640 # if (!('alpha' in rgb_color)) {
6641 # return rgbToCssColor_(red, green, blue);
6642 # }
6643 #
6644 # var alphaFrac = rgb_color.alpha.value || 0.0;
6645 # var rgbParams = [red, green, blue].join(',');
6646 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6647 # };
6648 #
6649 # var rgbToCssColor_ = function(red, green, blue) {
6650 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6651 # var hexString = rgbNumber.toString(16);
6652 # var missingZeros = 6 - hexString.length;
6653 # var resultBuilder = ['#'];
6654 # for (var i = 0; i < missingZeros; i++) {
6655 # resultBuilder.push('0');
6656 # }
6657 # resultBuilder.push(hexString);
6658 # return resultBuilder.join('');
6659 # };
6660 #
6661 # // ...
6662 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6663 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6664 # the final pixel color is defined by the equation:
6665 #
6666 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6667 #
6668 # This means that a value of 1.0 corresponds to a solid color, whereas
6669 # a value of 0.0 corresponds to a completely transparent color. This
6670 # uses a wrapper message rather than a simple float scalar so that it is
6671 # possible to distinguish between a default value and the value being unset.
6672 # If omitted, this color object is to be rendered as a solid color
6673 # (as if the alpha value had been explicitly given with a value of 1.0).
6674 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6675 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6676 },
6677 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006678 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006679 "style": "A String", # The style of the border.
6680 },
6681 "bottom": { # A border along a cell. # The bottom border of the cell.
6682 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
6683 # for simplicity of conversion to/from color representations in various
6684 # languages over compactness; for example, the fields of this representation
6685 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6686 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6687 # method in iOS; and, with just a little work, it can be easily formatted into
6688 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6689 #
6690 # Example (Java):
6691 #
6692 # import com.google.type.Color;
6693 #
6694 # // ...
6695 # public static java.awt.Color fromProto(Color protocolor) {
6696 # float alpha = protocolor.hasAlpha()
6697 # ? protocolor.getAlpha().getValue()
6698 # : 1.0;
6699 #
6700 # return new java.awt.Color(
6701 # protocolor.getRed(),
6702 # protocolor.getGreen(),
6703 # protocolor.getBlue(),
6704 # alpha);
6705 # }
6706 #
6707 # public static Color toProto(java.awt.Color color) {
6708 # float red = (float) color.getRed();
6709 # float green = (float) color.getGreen();
6710 # float blue = (float) color.getBlue();
6711 # float denominator = 255.0;
6712 # Color.Builder resultBuilder =
6713 # Color
6714 # .newBuilder()
6715 # .setRed(red / denominator)
6716 # .setGreen(green / denominator)
6717 # .setBlue(blue / denominator);
6718 # int alpha = color.getAlpha();
6719 # if (alpha != 255) {
6720 # result.setAlpha(
6721 # FloatValue
6722 # .newBuilder()
6723 # .setValue(((float) alpha) / denominator)
6724 # .build());
6725 # }
6726 # return resultBuilder.build();
6727 # }
6728 # // ...
6729 #
6730 # Example (iOS / Obj-C):
6731 #
6732 # // ...
6733 # static UIColor* fromProto(Color* protocolor) {
6734 # float red = [protocolor red];
6735 # float green = [protocolor green];
6736 # float blue = [protocolor blue];
6737 # FloatValue* alpha_wrapper = [protocolor alpha];
6738 # float alpha = 1.0;
6739 # if (alpha_wrapper != nil) {
6740 # alpha = [alpha_wrapper value];
6741 # }
6742 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6743 # }
6744 #
6745 # static Color* toProto(UIColor* color) {
6746 # CGFloat red, green, blue, alpha;
6747 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6748 # return nil;
6749 # }
6750 # Color* result = [Color alloc] init];
6751 # [result setRed:red];
6752 # [result setGreen:green];
6753 # [result setBlue:blue];
6754 # if (alpha <= 0.9999) {
6755 # [result setAlpha:floatWrapperWithValue(alpha)];
6756 # }
6757 # [result autorelease];
6758 # return result;
6759 # }
6760 # // ...
6761 #
6762 # Example (JavaScript):
6763 #
6764 # // ...
6765 #
6766 # var protoToCssColor = function(rgb_color) {
6767 # var redFrac = rgb_color.red || 0.0;
6768 # var greenFrac = rgb_color.green || 0.0;
6769 # var blueFrac = rgb_color.blue || 0.0;
6770 # var red = Math.floor(redFrac * 255);
6771 # var green = Math.floor(greenFrac * 255);
6772 # var blue = Math.floor(blueFrac * 255);
6773 #
6774 # if (!('alpha' in rgb_color)) {
6775 # return rgbToCssColor_(red, green, blue);
6776 # }
6777 #
6778 # var alphaFrac = rgb_color.alpha.value || 0.0;
6779 # var rgbParams = [red, green, blue].join(',');
6780 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6781 # };
6782 #
6783 # var rgbToCssColor_ = function(red, green, blue) {
6784 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6785 # var hexString = rgbNumber.toString(16);
6786 # var missingZeros = 6 - hexString.length;
6787 # var resultBuilder = ['#'];
6788 # for (var i = 0; i < missingZeros; i++) {
6789 # resultBuilder.push('0');
6790 # }
6791 # resultBuilder.push(hexString);
6792 # return resultBuilder.join('');
6793 # };
6794 #
6795 # // ...
6796 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6797 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6798 # the final pixel color is defined by the equation:
6799 #
6800 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6801 #
6802 # This means that a value of 1.0 corresponds to a solid color, whereas
6803 # a value of 0.0 corresponds to a completely transparent color. This
6804 # uses a wrapper message rather than a simple float scalar so that it is
6805 # possible to distinguish between a default value and the value being unset.
6806 # If omitted, this color object is to be rendered as a solid color
6807 # (as if the alpha value had been explicitly given with a value of 1.0).
6808 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6809 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6810 },
6811 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006812 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006813 "style": "A String", # The style of the border.
6814 },
6815 "left": { # A border along a cell. # The left border of the cell.
6816 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
6817 # for simplicity of conversion to/from color representations in various
6818 # languages over compactness; for example, the fields of this representation
6819 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6820 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6821 # method in iOS; and, with just a little work, it can be easily formatted into
6822 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6823 #
6824 # Example (Java):
6825 #
6826 # import com.google.type.Color;
6827 #
6828 # // ...
6829 # public static java.awt.Color fromProto(Color protocolor) {
6830 # float alpha = protocolor.hasAlpha()
6831 # ? protocolor.getAlpha().getValue()
6832 # : 1.0;
6833 #
6834 # return new java.awt.Color(
6835 # protocolor.getRed(),
6836 # protocolor.getGreen(),
6837 # protocolor.getBlue(),
6838 # alpha);
6839 # }
6840 #
6841 # public static Color toProto(java.awt.Color color) {
6842 # float red = (float) color.getRed();
6843 # float green = (float) color.getGreen();
6844 # float blue = (float) color.getBlue();
6845 # float denominator = 255.0;
6846 # Color.Builder resultBuilder =
6847 # Color
6848 # .newBuilder()
6849 # .setRed(red / denominator)
6850 # .setGreen(green / denominator)
6851 # .setBlue(blue / denominator);
6852 # int alpha = color.getAlpha();
6853 # if (alpha != 255) {
6854 # result.setAlpha(
6855 # FloatValue
6856 # .newBuilder()
6857 # .setValue(((float) alpha) / denominator)
6858 # .build());
6859 # }
6860 # return resultBuilder.build();
6861 # }
6862 # // ...
6863 #
6864 # Example (iOS / Obj-C):
6865 #
6866 # // ...
6867 # static UIColor* fromProto(Color* protocolor) {
6868 # float red = [protocolor red];
6869 # float green = [protocolor green];
6870 # float blue = [protocolor blue];
6871 # FloatValue* alpha_wrapper = [protocolor alpha];
6872 # float alpha = 1.0;
6873 # if (alpha_wrapper != nil) {
6874 # alpha = [alpha_wrapper value];
6875 # }
6876 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6877 # }
6878 #
6879 # static Color* toProto(UIColor* color) {
6880 # CGFloat red, green, blue, alpha;
6881 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6882 # return nil;
6883 # }
6884 # Color* result = [Color alloc] init];
6885 # [result setRed:red];
6886 # [result setGreen:green];
6887 # [result setBlue:blue];
6888 # if (alpha <= 0.9999) {
6889 # [result setAlpha:floatWrapperWithValue(alpha)];
6890 # }
6891 # [result autorelease];
6892 # return result;
6893 # }
6894 # // ...
6895 #
6896 # Example (JavaScript):
6897 #
6898 # // ...
6899 #
6900 # var protoToCssColor = function(rgb_color) {
6901 # var redFrac = rgb_color.red || 0.0;
6902 # var greenFrac = rgb_color.green || 0.0;
6903 # var blueFrac = rgb_color.blue || 0.0;
6904 # var red = Math.floor(redFrac * 255);
6905 # var green = Math.floor(greenFrac * 255);
6906 # var blue = Math.floor(blueFrac * 255);
6907 #
6908 # if (!('alpha' in rgb_color)) {
6909 # return rgbToCssColor_(red, green, blue);
6910 # }
6911 #
6912 # var alphaFrac = rgb_color.alpha.value || 0.0;
6913 # var rgbParams = [red, green, blue].join(',');
6914 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6915 # };
6916 #
6917 # var rgbToCssColor_ = function(red, green, blue) {
6918 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6919 # var hexString = rgbNumber.toString(16);
6920 # var missingZeros = 6 - hexString.length;
6921 # var resultBuilder = ['#'];
6922 # for (var i = 0; i < missingZeros; i++) {
6923 # resultBuilder.push('0');
6924 # }
6925 # resultBuilder.push(hexString);
6926 # return resultBuilder.join('');
6927 # };
6928 #
6929 # // ...
6930 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6931 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6932 # the final pixel color is defined by the equation:
6933 #
6934 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6935 #
6936 # This means that a value of 1.0 corresponds to a solid color, whereas
6937 # a value of 0.0 corresponds to a completely transparent color. This
6938 # uses a wrapper message rather than a simple float scalar so that it is
6939 # possible to distinguish between a default value and the value being unset.
6940 # If omitted, this color object is to be rendered as a solid color
6941 # (as if the alpha value had been explicitly given with a value of 1.0).
6942 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6943 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6944 },
6945 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006946 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006947 "style": "A String", # The style of the border.
6948 },
6949 },
6950 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
6951 },
6952 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
6953 #
6954 # When writing, the new format will be merged with the existing format.
6955 "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 -07006956 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
6957 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07006958 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
6959 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006960 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006961 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006962 },
6963 "textDirection": "A String", # The direction of the text in the cell.
6964 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
6965 # When updating padding, every field must be specified.
6966 "top": 42, # The top padding of the cell.
6967 "right": 42, # The right padding of the cell.
6968 "bottom": 42, # The bottom padding of the cell.
6969 "left": 42, # The left padding of the cell.
6970 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006971 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006972 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
6973 # for simplicity of conversion to/from color representations in various
6974 # languages over compactness; for example, the fields of this representation
6975 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6976 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6977 # method in iOS; and, with just a little work, it can be easily formatted into
6978 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6979 #
6980 # Example (Java):
6981 #
6982 # import com.google.type.Color;
6983 #
6984 # // ...
6985 # public static java.awt.Color fromProto(Color protocolor) {
6986 # float alpha = protocolor.hasAlpha()
6987 # ? protocolor.getAlpha().getValue()
6988 # : 1.0;
6989 #
6990 # return new java.awt.Color(
6991 # protocolor.getRed(),
6992 # protocolor.getGreen(),
6993 # protocolor.getBlue(),
6994 # alpha);
6995 # }
6996 #
6997 # public static Color toProto(java.awt.Color color) {
6998 # float red = (float) color.getRed();
6999 # float green = (float) color.getGreen();
7000 # float blue = (float) color.getBlue();
7001 # float denominator = 255.0;
7002 # Color.Builder resultBuilder =
7003 # Color
7004 # .newBuilder()
7005 # .setRed(red / denominator)
7006 # .setGreen(green / denominator)
7007 # .setBlue(blue / denominator);
7008 # int alpha = color.getAlpha();
7009 # if (alpha != 255) {
7010 # result.setAlpha(
7011 # FloatValue
7012 # .newBuilder()
7013 # .setValue(((float) alpha) / denominator)
7014 # .build());
7015 # }
7016 # return resultBuilder.build();
7017 # }
7018 # // ...
7019 #
7020 # Example (iOS / Obj-C):
7021 #
7022 # // ...
7023 # static UIColor* fromProto(Color* protocolor) {
7024 # float red = [protocolor red];
7025 # float green = [protocolor green];
7026 # float blue = [protocolor blue];
7027 # FloatValue* alpha_wrapper = [protocolor alpha];
7028 # float alpha = 1.0;
7029 # if (alpha_wrapper != nil) {
7030 # alpha = [alpha_wrapper value];
7031 # }
7032 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7033 # }
7034 #
7035 # static Color* toProto(UIColor* color) {
7036 # CGFloat red, green, blue, alpha;
7037 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7038 # return nil;
7039 # }
7040 # Color* result = [Color alloc] init];
7041 # [result setRed:red];
7042 # [result setGreen:green];
7043 # [result setBlue:blue];
7044 # if (alpha <= 0.9999) {
7045 # [result setAlpha:floatWrapperWithValue(alpha)];
7046 # }
7047 # [result autorelease];
7048 # return result;
7049 # }
7050 # // ...
7051 #
7052 # Example (JavaScript):
7053 #
7054 # // ...
7055 #
7056 # var protoToCssColor = function(rgb_color) {
7057 # var redFrac = rgb_color.red || 0.0;
7058 # var greenFrac = rgb_color.green || 0.0;
7059 # var blueFrac = rgb_color.blue || 0.0;
7060 # var red = Math.floor(redFrac * 255);
7061 # var green = Math.floor(greenFrac * 255);
7062 # var blue = Math.floor(blueFrac * 255);
7063 #
7064 # if (!('alpha' in rgb_color)) {
7065 # return rgbToCssColor_(red, green, blue);
7066 # }
7067 #
7068 # var alphaFrac = rgb_color.alpha.value || 0.0;
7069 # var rgbParams = [red, green, blue].join(',');
7070 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7071 # };
7072 #
7073 # var rgbToCssColor_ = function(red, green, blue) {
7074 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7075 # var hexString = rgbNumber.toString(16);
7076 # var missingZeros = 6 - hexString.length;
7077 # var resultBuilder = ['#'];
7078 # for (var i = 0; i < missingZeros; i++) {
7079 # resultBuilder.push('0');
7080 # }
7081 # resultBuilder.push(hexString);
7082 # return resultBuilder.join('');
7083 # };
7084 #
7085 # // ...
7086 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7087 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7088 # the final pixel color is defined by the equation:
7089 #
7090 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7091 #
7092 # This means that a value of 1.0 corresponds to a solid color, whereas
7093 # a value of 0.0 corresponds to a completely transparent color. This
7094 # uses a wrapper message rather than a simple float scalar so that it is
7095 # possible to distinguish between a default value and the value being unset.
7096 # If omitted, this color object is to be rendered as a solid color
7097 # (as if the alpha value had been explicitly given with a value of 1.0).
7098 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7099 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7100 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007101 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007102 "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).
7103 # Absent values indicate that the field isn't specified.
7104 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
7105 # for simplicity of conversion to/from color representations in various
7106 # languages over compactness; for example, the fields of this representation
7107 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7108 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7109 # method in iOS; and, with just a little work, it can be easily formatted into
7110 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7111 #
7112 # Example (Java):
7113 #
7114 # import com.google.type.Color;
7115 #
7116 # // ...
7117 # public static java.awt.Color fromProto(Color protocolor) {
7118 # float alpha = protocolor.hasAlpha()
7119 # ? protocolor.getAlpha().getValue()
7120 # : 1.0;
7121 #
7122 # return new java.awt.Color(
7123 # protocolor.getRed(),
7124 # protocolor.getGreen(),
7125 # protocolor.getBlue(),
7126 # alpha);
7127 # }
7128 #
7129 # public static Color toProto(java.awt.Color color) {
7130 # float red = (float) color.getRed();
7131 # float green = (float) color.getGreen();
7132 # float blue = (float) color.getBlue();
7133 # float denominator = 255.0;
7134 # Color.Builder resultBuilder =
7135 # Color
7136 # .newBuilder()
7137 # .setRed(red / denominator)
7138 # .setGreen(green / denominator)
7139 # .setBlue(blue / denominator);
7140 # int alpha = color.getAlpha();
7141 # if (alpha != 255) {
7142 # result.setAlpha(
7143 # FloatValue
7144 # .newBuilder()
7145 # .setValue(((float) alpha) / denominator)
7146 # .build());
7147 # }
7148 # return resultBuilder.build();
7149 # }
7150 # // ...
7151 #
7152 # Example (iOS / Obj-C):
7153 #
7154 # // ...
7155 # static UIColor* fromProto(Color* protocolor) {
7156 # float red = [protocolor red];
7157 # float green = [protocolor green];
7158 # float blue = [protocolor blue];
7159 # FloatValue* alpha_wrapper = [protocolor alpha];
7160 # float alpha = 1.0;
7161 # if (alpha_wrapper != nil) {
7162 # alpha = [alpha_wrapper value];
7163 # }
7164 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7165 # }
7166 #
7167 # static Color* toProto(UIColor* color) {
7168 # CGFloat red, green, blue, alpha;
7169 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7170 # return nil;
7171 # }
7172 # Color* result = [Color alloc] init];
7173 # [result setRed:red];
7174 # [result setGreen:green];
7175 # [result setBlue:blue];
7176 # if (alpha <= 0.9999) {
7177 # [result setAlpha:floatWrapperWithValue(alpha)];
7178 # }
7179 # [result autorelease];
7180 # return result;
7181 # }
7182 # // ...
7183 #
7184 # Example (JavaScript):
7185 #
7186 # // ...
7187 #
7188 # var protoToCssColor = function(rgb_color) {
7189 # var redFrac = rgb_color.red || 0.0;
7190 # var greenFrac = rgb_color.green || 0.0;
7191 # var blueFrac = rgb_color.blue || 0.0;
7192 # var red = Math.floor(redFrac * 255);
7193 # var green = Math.floor(greenFrac * 255);
7194 # var blue = Math.floor(blueFrac * 255);
7195 #
7196 # if (!('alpha' in rgb_color)) {
7197 # return rgbToCssColor_(red, green, blue);
7198 # }
7199 #
7200 # var alphaFrac = rgb_color.alpha.value || 0.0;
7201 # var rgbParams = [red, green, blue].join(',');
7202 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7203 # };
7204 #
7205 # var rgbToCssColor_ = function(red, green, blue) {
7206 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7207 # var hexString = rgbNumber.toString(16);
7208 # var missingZeros = 6 - hexString.length;
7209 # var resultBuilder = ['#'];
7210 # for (var i = 0; i < missingZeros; i++) {
7211 # resultBuilder.push('0');
7212 # }
7213 # resultBuilder.push(hexString);
7214 # return resultBuilder.join('');
7215 # };
7216 #
7217 # // ...
7218 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7219 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7220 # the final pixel color is defined by the equation:
7221 #
7222 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7223 #
7224 # This means that a value of 1.0 corresponds to a solid color, whereas
7225 # a value of 0.0 corresponds to a completely transparent color. This
7226 # uses a wrapper message rather than a simple float scalar so that it is
7227 # possible to distinguish between a default value and the value being unset.
7228 # If omitted, this color object is to be rendered as a solid color
7229 # (as if the alpha value had been explicitly given with a value of 1.0).
7230 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7231 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7232 },
7233 "bold": True or False, # True if the text is bold.
7234 "strikethrough": True or False, # True if the text has a strikethrough.
7235 "fontFamily": "A String", # The font family.
7236 "fontSize": 42, # The size of the font.
7237 "italic": True or False, # True if the text is italicized.
7238 "underline": True or False, # True if the text is underlined.
7239 },
7240 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
7241 "borders": { # The borders of the cell. # The borders of the cell.
7242 "top": { # A border along a cell. # The top border of the cell.
7243 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7244 # for simplicity of conversion to/from color representations in various
7245 # languages over compactness; for example, the fields of this representation
7246 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7247 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7248 # method in iOS; and, with just a little work, it can be easily formatted into
7249 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7250 #
7251 # Example (Java):
7252 #
7253 # import com.google.type.Color;
7254 #
7255 # // ...
7256 # public static java.awt.Color fromProto(Color protocolor) {
7257 # float alpha = protocolor.hasAlpha()
7258 # ? protocolor.getAlpha().getValue()
7259 # : 1.0;
7260 #
7261 # return new java.awt.Color(
7262 # protocolor.getRed(),
7263 # protocolor.getGreen(),
7264 # protocolor.getBlue(),
7265 # alpha);
7266 # }
7267 #
7268 # public static Color toProto(java.awt.Color color) {
7269 # float red = (float) color.getRed();
7270 # float green = (float) color.getGreen();
7271 # float blue = (float) color.getBlue();
7272 # float denominator = 255.0;
7273 # Color.Builder resultBuilder =
7274 # Color
7275 # .newBuilder()
7276 # .setRed(red / denominator)
7277 # .setGreen(green / denominator)
7278 # .setBlue(blue / denominator);
7279 # int alpha = color.getAlpha();
7280 # if (alpha != 255) {
7281 # result.setAlpha(
7282 # FloatValue
7283 # .newBuilder()
7284 # .setValue(((float) alpha) / denominator)
7285 # .build());
7286 # }
7287 # return resultBuilder.build();
7288 # }
7289 # // ...
7290 #
7291 # Example (iOS / Obj-C):
7292 #
7293 # // ...
7294 # static UIColor* fromProto(Color* protocolor) {
7295 # float red = [protocolor red];
7296 # float green = [protocolor green];
7297 # float blue = [protocolor blue];
7298 # FloatValue* alpha_wrapper = [protocolor alpha];
7299 # float alpha = 1.0;
7300 # if (alpha_wrapper != nil) {
7301 # alpha = [alpha_wrapper value];
7302 # }
7303 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7304 # }
7305 #
7306 # static Color* toProto(UIColor* color) {
7307 # CGFloat red, green, blue, alpha;
7308 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7309 # return nil;
7310 # }
7311 # Color* result = [Color alloc] init];
7312 # [result setRed:red];
7313 # [result setGreen:green];
7314 # [result setBlue:blue];
7315 # if (alpha <= 0.9999) {
7316 # [result setAlpha:floatWrapperWithValue(alpha)];
7317 # }
7318 # [result autorelease];
7319 # return result;
7320 # }
7321 # // ...
7322 #
7323 # Example (JavaScript):
7324 #
7325 # // ...
7326 #
7327 # var protoToCssColor = function(rgb_color) {
7328 # var redFrac = rgb_color.red || 0.0;
7329 # var greenFrac = rgb_color.green || 0.0;
7330 # var blueFrac = rgb_color.blue || 0.0;
7331 # var red = Math.floor(redFrac * 255);
7332 # var green = Math.floor(greenFrac * 255);
7333 # var blue = Math.floor(blueFrac * 255);
7334 #
7335 # if (!('alpha' in rgb_color)) {
7336 # return rgbToCssColor_(red, green, blue);
7337 # }
7338 #
7339 # var alphaFrac = rgb_color.alpha.value || 0.0;
7340 # var rgbParams = [red, green, blue].join(',');
7341 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7342 # };
7343 #
7344 # var rgbToCssColor_ = function(red, green, blue) {
7345 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7346 # var hexString = rgbNumber.toString(16);
7347 # var missingZeros = 6 - hexString.length;
7348 # var resultBuilder = ['#'];
7349 # for (var i = 0; i < missingZeros; i++) {
7350 # resultBuilder.push('0');
7351 # }
7352 # resultBuilder.push(hexString);
7353 # return resultBuilder.join('');
7354 # };
7355 #
7356 # // ...
7357 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7358 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7359 # the final pixel color is defined by the equation:
7360 #
7361 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7362 #
7363 # This means that a value of 1.0 corresponds to a solid color, whereas
7364 # a value of 0.0 corresponds to a completely transparent color. This
7365 # uses a wrapper message rather than a simple float scalar so that it is
7366 # possible to distinguish between a default value and the value being unset.
7367 # If omitted, this color object is to be rendered as a solid color
7368 # (as if the alpha value had been explicitly given with a value of 1.0).
7369 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7370 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7371 },
7372 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007373 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007374 "style": "A String", # The style of the border.
7375 },
7376 "right": { # A border along a cell. # The right border of the cell.
7377 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7378 # for simplicity of conversion to/from color representations in various
7379 # languages over compactness; for example, the fields of this representation
7380 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7381 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7382 # method in iOS; and, with just a little work, it can be easily formatted into
7383 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7384 #
7385 # Example (Java):
7386 #
7387 # import com.google.type.Color;
7388 #
7389 # // ...
7390 # public static java.awt.Color fromProto(Color protocolor) {
7391 # float alpha = protocolor.hasAlpha()
7392 # ? protocolor.getAlpha().getValue()
7393 # : 1.0;
7394 #
7395 # return new java.awt.Color(
7396 # protocolor.getRed(),
7397 # protocolor.getGreen(),
7398 # protocolor.getBlue(),
7399 # alpha);
7400 # }
7401 #
7402 # public static Color toProto(java.awt.Color color) {
7403 # float red = (float) color.getRed();
7404 # float green = (float) color.getGreen();
7405 # float blue = (float) color.getBlue();
7406 # float denominator = 255.0;
7407 # Color.Builder resultBuilder =
7408 # Color
7409 # .newBuilder()
7410 # .setRed(red / denominator)
7411 # .setGreen(green / denominator)
7412 # .setBlue(blue / denominator);
7413 # int alpha = color.getAlpha();
7414 # if (alpha != 255) {
7415 # result.setAlpha(
7416 # FloatValue
7417 # .newBuilder()
7418 # .setValue(((float) alpha) / denominator)
7419 # .build());
7420 # }
7421 # return resultBuilder.build();
7422 # }
7423 # // ...
7424 #
7425 # Example (iOS / Obj-C):
7426 #
7427 # // ...
7428 # static UIColor* fromProto(Color* protocolor) {
7429 # float red = [protocolor red];
7430 # float green = [protocolor green];
7431 # float blue = [protocolor blue];
7432 # FloatValue* alpha_wrapper = [protocolor alpha];
7433 # float alpha = 1.0;
7434 # if (alpha_wrapper != nil) {
7435 # alpha = [alpha_wrapper value];
7436 # }
7437 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7438 # }
7439 #
7440 # static Color* toProto(UIColor* color) {
7441 # CGFloat red, green, blue, alpha;
7442 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7443 # return nil;
7444 # }
7445 # Color* result = [Color alloc] init];
7446 # [result setRed:red];
7447 # [result setGreen:green];
7448 # [result setBlue:blue];
7449 # if (alpha <= 0.9999) {
7450 # [result setAlpha:floatWrapperWithValue(alpha)];
7451 # }
7452 # [result autorelease];
7453 # return result;
7454 # }
7455 # // ...
7456 #
7457 # Example (JavaScript):
7458 #
7459 # // ...
7460 #
7461 # var protoToCssColor = function(rgb_color) {
7462 # var redFrac = rgb_color.red || 0.0;
7463 # var greenFrac = rgb_color.green || 0.0;
7464 # var blueFrac = rgb_color.blue || 0.0;
7465 # var red = Math.floor(redFrac * 255);
7466 # var green = Math.floor(greenFrac * 255);
7467 # var blue = Math.floor(blueFrac * 255);
7468 #
7469 # if (!('alpha' in rgb_color)) {
7470 # return rgbToCssColor_(red, green, blue);
7471 # }
7472 #
7473 # var alphaFrac = rgb_color.alpha.value || 0.0;
7474 # var rgbParams = [red, green, blue].join(',');
7475 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7476 # };
7477 #
7478 # var rgbToCssColor_ = function(red, green, blue) {
7479 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7480 # var hexString = rgbNumber.toString(16);
7481 # var missingZeros = 6 - hexString.length;
7482 # var resultBuilder = ['#'];
7483 # for (var i = 0; i < missingZeros; i++) {
7484 # resultBuilder.push('0');
7485 # }
7486 # resultBuilder.push(hexString);
7487 # return resultBuilder.join('');
7488 # };
7489 #
7490 # // ...
7491 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7492 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7493 # the final pixel color is defined by the equation:
7494 #
7495 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7496 #
7497 # This means that a value of 1.0 corresponds to a solid color, whereas
7498 # a value of 0.0 corresponds to a completely transparent color. This
7499 # uses a wrapper message rather than a simple float scalar so that it is
7500 # possible to distinguish between a default value and the value being unset.
7501 # If omitted, this color object is to be rendered as a solid color
7502 # (as if the alpha value had been explicitly given with a value of 1.0).
7503 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7504 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7505 },
7506 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007507 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007508 "style": "A String", # The style of the border.
7509 },
7510 "bottom": { # A border along a cell. # The bottom border of the cell.
7511 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7512 # for simplicity of conversion to/from color representations in various
7513 # languages over compactness; for example, the fields of this representation
7514 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7515 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7516 # method in iOS; and, with just a little work, it can be easily formatted into
7517 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7518 #
7519 # Example (Java):
7520 #
7521 # import com.google.type.Color;
7522 #
7523 # // ...
7524 # public static java.awt.Color fromProto(Color protocolor) {
7525 # float alpha = protocolor.hasAlpha()
7526 # ? protocolor.getAlpha().getValue()
7527 # : 1.0;
7528 #
7529 # return new java.awt.Color(
7530 # protocolor.getRed(),
7531 # protocolor.getGreen(),
7532 # protocolor.getBlue(),
7533 # alpha);
7534 # }
7535 #
7536 # public static Color toProto(java.awt.Color color) {
7537 # float red = (float) color.getRed();
7538 # float green = (float) color.getGreen();
7539 # float blue = (float) color.getBlue();
7540 # float denominator = 255.0;
7541 # Color.Builder resultBuilder =
7542 # Color
7543 # .newBuilder()
7544 # .setRed(red / denominator)
7545 # .setGreen(green / denominator)
7546 # .setBlue(blue / denominator);
7547 # int alpha = color.getAlpha();
7548 # if (alpha != 255) {
7549 # result.setAlpha(
7550 # FloatValue
7551 # .newBuilder()
7552 # .setValue(((float) alpha) / denominator)
7553 # .build());
7554 # }
7555 # return resultBuilder.build();
7556 # }
7557 # // ...
7558 #
7559 # Example (iOS / Obj-C):
7560 #
7561 # // ...
7562 # static UIColor* fromProto(Color* protocolor) {
7563 # float red = [protocolor red];
7564 # float green = [protocolor green];
7565 # float blue = [protocolor blue];
7566 # FloatValue* alpha_wrapper = [protocolor alpha];
7567 # float alpha = 1.0;
7568 # if (alpha_wrapper != nil) {
7569 # alpha = [alpha_wrapper value];
7570 # }
7571 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7572 # }
7573 #
7574 # static Color* toProto(UIColor* color) {
7575 # CGFloat red, green, blue, alpha;
7576 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7577 # return nil;
7578 # }
7579 # Color* result = [Color alloc] init];
7580 # [result setRed:red];
7581 # [result setGreen:green];
7582 # [result setBlue:blue];
7583 # if (alpha <= 0.9999) {
7584 # [result setAlpha:floatWrapperWithValue(alpha)];
7585 # }
7586 # [result autorelease];
7587 # return result;
7588 # }
7589 # // ...
7590 #
7591 # Example (JavaScript):
7592 #
7593 # // ...
7594 #
7595 # var protoToCssColor = function(rgb_color) {
7596 # var redFrac = rgb_color.red || 0.0;
7597 # var greenFrac = rgb_color.green || 0.0;
7598 # var blueFrac = rgb_color.blue || 0.0;
7599 # var red = Math.floor(redFrac * 255);
7600 # var green = Math.floor(greenFrac * 255);
7601 # var blue = Math.floor(blueFrac * 255);
7602 #
7603 # if (!('alpha' in rgb_color)) {
7604 # return rgbToCssColor_(red, green, blue);
7605 # }
7606 #
7607 # var alphaFrac = rgb_color.alpha.value || 0.0;
7608 # var rgbParams = [red, green, blue].join(',');
7609 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7610 # };
7611 #
7612 # var rgbToCssColor_ = function(red, green, blue) {
7613 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7614 # var hexString = rgbNumber.toString(16);
7615 # var missingZeros = 6 - hexString.length;
7616 # var resultBuilder = ['#'];
7617 # for (var i = 0; i < missingZeros; i++) {
7618 # resultBuilder.push('0');
7619 # }
7620 # resultBuilder.push(hexString);
7621 # return resultBuilder.join('');
7622 # };
7623 #
7624 # // ...
7625 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7626 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7627 # the final pixel color is defined by the equation:
7628 #
7629 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7630 #
7631 # This means that a value of 1.0 corresponds to a solid color, whereas
7632 # a value of 0.0 corresponds to a completely transparent color. This
7633 # uses a wrapper message rather than a simple float scalar so that it is
7634 # possible to distinguish between a default value and the value being unset.
7635 # If omitted, this color object is to be rendered as a solid color
7636 # (as if the alpha value had been explicitly given with a value of 1.0).
7637 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7638 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7639 },
7640 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007641 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007642 "style": "A String", # The style of the border.
7643 },
7644 "left": { # A border along a cell. # The left border of the cell.
7645 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7646 # for simplicity of conversion to/from color representations in various
7647 # languages over compactness; for example, the fields of this representation
7648 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7649 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7650 # method in iOS; and, with just a little work, it can be easily formatted into
7651 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7652 #
7653 # Example (Java):
7654 #
7655 # import com.google.type.Color;
7656 #
7657 # // ...
7658 # public static java.awt.Color fromProto(Color protocolor) {
7659 # float alpha = protocolor.hasAlpha()
7660 # ? protocolor.getAlpha().getValue()
7661 # : 1.0;
7662 #
7663 # return new java.awt.Color(
7664 # protocolor.getRed(),
7665 # protocolor.getGreen(),
7666 # protocolor.getBlue(),
7667 # alpha);
7668 # }
7669 #
7670 # public static Color toProto(java.awt.Color color) {
7671 # float red = (float) color.getRed();
7672 # float green = (float) color.getGreen();
7673 # float blue = (float) color.getBlue();
7674 # float denominator = 255.0;
7675 # Color.Builder resultBuilder =
7676 # Color
7677 # .newBuilder()
7678 # .setRed(red / denominator)
7679 # .setGreen(green / denominator)
7680 # .setBlue(blue / denominator);
7681 # int alpha = color.getAlpha();
7682 # if (alpha != 255) {
7683 # result.setAlpha(
7684 # FloatValue
7685 # .newBuilder()
7686 # .setValue(((float) alpha) / denominator)
7687 # .build());
7688 # }
7689 # return resultBuilder.build();
7690 # }
7691 # // ...
7692 #
7693 # Example (iOS / Obj-C):
7694 #
7695 # // ...
7696 # static UIColor* fromProto(Color* protocolor) {
7697 # float red = [protocolor red];
7698 # float green = [protocolor green];
7699 # float blue = [protocolor blue];
7700 # FloatValue* alpha_wrapper = [protocolor alpha];
7701 # float alpha = 1.0;
7702 # if (alpha_wrapper != nil) {
7703 # alpha = [alpha_wrapper value];
7704 # }
7705 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7706 # }
7707 #
7708 # static Color* toProto(UIColor* color) {
7709 # CGFloat red, green, blue, alpha;
7710 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7711 # return nil;
7712 # }
7713 # Color* result = [Color alloc] init];
7714 # [result setRed:red];
7715 # [result setGreen:green];
7716 # [result setBlue:blue];
7717 # if (alpha <= 0.9999) {
7718 # [result setAlpha:floatWrapperWithValue(alpha)];
7719 # }
7720 # [result autorelease];
7721 # return result;
7722 # }
7723 # // ...
7724 #
7725 # Example (JavaScript):
7726 #
7727 # // ...
7728 #
7729 # var protoToCssColor = function(rgb_color) {
7730 # var redFrac = rgb_color.red || 0.0;
7731 # var greenFrac = rgb_color.green || 0.0;
7732 # var blueFrac = rgb_color.blue || 0.0;
7733 # var red = Math.floor(redFrac * 255);
7734 # var green = Math.floor(greenFrac * 255);
7735 # var blue = Math.floor(blueFrac * 255);
7736 #
7737 # if (!('alpha' in rgb_color)) {
7738 # return rgbToCssColor_(red, green, blue);
7739 # }
7740 #
7741 # var alphaFrac = rgb_color.alpha.value || 0.0;
7742 # var rgbParams = [red, green, blue].join(',');
7743 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7744 # };
7745 #
7746 # var rgbToCssColor_ = function(red, green, blue) {
7747 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7748 # var hexString = rgbNumber.toString(16);
7749 # var missingZeros = 6 - hexString.length;
7750 # var resultBuilder = ['#'];
7751 # for (var i = 0; i < missingZeros; i++) {
7752 # resultBuilder.push('0');
7753 # }
7754 # resultBuilder.push(hexString);
7755 # return resultBuilder.join('');
7756 # };
7757 #
7758 # // ...
7759 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7760 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7761 # the final pixel color is defined by the equation:
7762 #
7763 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7764 #
7765 # This means that a value of 1.0 corresponds to a solid color, whereas
7766 # a value of 0.0 corresponds to a completely transparent color. This
7767 # uses a wrapper message rather than a simple float scalar so that it is
7768 # possible to distinguish between a default value and the value being unset.
7769 # If omitted, this color object is to be rendered as a solid color
7770 # (as if the alpha value had been explicitly given with a value of 1.0).
7771 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7772 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7773 },
7774 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007775 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007776 "style": "A String", # The style of the border.
7777 },
7778 },
7779 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
7780 },
7781 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
7782 #
7783 # When writing, the new data validation rule will overwrite any prior rule.
7784 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
7785 # If true, "List" conditions will show a dropdown.
7786 "strict": True or False, # True if invalid data should be rejected.
7787 "inputMessage": "A String", # A message to show the user when adding data to the cell.
7788 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
7789 # BooleanConditions are used by conditional formatting,
7790 # data validation, and the criteria in filters.
7791 "type": "A String", # The type of condition.
7792 "values": [ # The values of the condition. The number of supported values depends
7793 # on the condition type. Some support zero values,
7794 # others one or two values,
7795 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
7796 { # The value of the condition.
7797 "relativeDate": "A String", # A relative date (based on the current date).
7798 # Valid only if the type is
7799 # DATE_BEFORE,
7800 # DATE_AFTER,
7801 # DATE_ON_OR_BEFORE or
7802 # DATE_ON_OR_AFTER.
7803 #
7804 # Relative dates are not supported in data validation.
7805 # They are supported only in conditional formatting and
7806 # conditional filters.
7807 "userEnteredValue": "A String", # A value the condition is based on.
7808 # The value will be parsed as if the user typed into a cell.
7809 # Formulas are supported (and must begin with an `=`).
7810 },
7811 ],
7812 },
7813 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007814 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
7815 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007816 # Runs start at specific indexes in the text and continue until the next
7817 # run. Properties of a run will continue unless explicitly changed
7818 # in a subsequent run (and properties of the first run will continue
7819 # the properties of the cell unless explicitly changed).
7820 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007821 # When writing, the new runs will overwrite any prior runs. When writing a
7822 # new user_entered_value, previous runs will be erased.
7823 { # A run of a text format. The format of this run continues until the start
7824 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007825 # When updating, all fields must be set.
7826 "startIndex": 42, # The character index where this run starts.
7827 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
7828 # Absent values indicate that the field isn't specified.
7829 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
7830 # for simplicity of conversion to/from color representations in various
7831 # languages over compactness; for example, the fields of this representation
7832 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7833 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7834 # method in iOS; and, with just a little work, it can be easily formatted into
7835 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7836 #
7837 # Example (Java):
7838 #
7839 # import com.google.type.Color;
7840 #
7841 # // ...
7842 # public static java.awt.Color fromProto(Color protocolor) {
7843 # float alpha = protocolor.hasAlpha()
7844 # ? protocolor.getAlpha().getValue()
7845 # : 1.0;
7846 #
7847 # return new java.awt.Color(
7848 # protocolor.getRed(),
7849 # protocolor.getGreen(),
7850 # protocolor.getBlue(),
7851 # alpha);
7852 # }
7853 #
7854 # public static Color toProto(java.awt.Color color) {
7855 # float red = (float) color.getRed();
7856 # float green = (float) color.getGreen();
7857 # float blue = (float) color.getBlue();
7858 # float denominator = 255.0;
7859 # Color.Builder resultBuilder =
7860 # Color
7861 # .newBuilder()
7862 # .setRed(red / denominator)
7863 # .setGreen(green / denominator)
7864 # .setBlue(blue / denominator);
7865 # int alpha = color.getAlpha();
7866 # if (alpha != 255) {
7867 # result.setAlpha(
7868 # FloatValue
7869 # .newBuilder()
7870 # .setValue(((float) alpha) / denominator)
7871 # .build());
7872 # }
7873 # return resultBuilder.build();
7874 # }
7875 # // ...
7876 #
7877 # Example (iOS / Obj-C):
7878 #
7879 # // ...
7880 # static UIColor* fromProto(Color* protocolor) {
7881 # float red = [protocolor red];
7882 # float green = [protocolor green];
7883 # float blue = [protocolor blue];
7884 # FloatValue* alpha_wrapper = [protocolor alpha];
7885 # float alpha = 1.0;
7886 # if (alpha_wrapper != nil) {
7887 # alpha = [alpha_wrapper value];
7888 # }
7889 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7890 # }
7891 #
7892 # static Color* toProto(UIColor* color) {
7893 # CGFloat red, green, blue, alpha;
7894 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7895 # return nil;
7896 # }
7897 # Color* result = [Color alloc] init];
7898 # [result setRed:red];
7899 # [result setGreen:green];
7900 # [result setBlue:blue];
7901 # if (alpha <= 0.9999) {
7902 # [result setAlpha:floatWrapperWithValue(alpha)];
7903 # }
7904 # [result autorelease];
7905 # return result;
7906 # }
7907 # // ...
7908 #
7909 # Example (JavaScript):
7910 #
7911 # // ...
7912 #
7913 # var protoToCssColor = function(rgb_color) {
7914 # var redFrac = rgb_color.red || 0.0;
7915 # var greenFrac = rgb_color.green || 0.0;
7916 # var blueFrac = rgb_color.blue || 0.0;
7917 # var red = Math.floor(redFrac * 255);
7918 # var green = Math.floor(greenFrac * 255);
7919 # var blue = Math.floor(blueFrac * 255);
7920 #
7921 # if (!('alpha' in rgb_color)) {
7922 # return rgbToCssColor_(red, green, blue);
7923 # }
7924 #
7925 # var alphaFrac = rgb_color.alpha.value || 0.0;
7926 # var rgbParams = [red, green, blue].join(',');
7927 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7928 # };
7929 #
7930 # var rgbToCssColor_ = function(red, green, blue) {
7931 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7932 # var hexString = rgbNumber.toString(16);
7933 # var missingZeros = 6 - hexString.length;
7934 # var resultBuilder = ['#'];
7935 # for (var i = 0; i < missingZeros; i++) {
7936 # resultBuilder.push('0');
7937 # }
7938 # resultBuilder.push(hexString);
7939 # return resultBuilder.join('');
7940 # };
7941 #
7942 # // ...
7943 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7944 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7945 # the final pixel color is defined by the equation:
7946 #
7947 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7948 #
7949 # This means that a value of 1.0 corresponds to a solid color, whereas
7950 # a value of 0.0 corresponds to a completely transparent color. This
7951 # uses a wrapper message rather than a simple float scalar so that it is
7952 # possible to distinguish between a default value and the value being unset.
7953 # If omitted, this color object is to be rendered as a solid color
7954 # (as if the alpha value had been explicitly given with a value of 1.0).
7955 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7956 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7957 },
7958 "bold": True or False, # True if the text is bold.
7959 "strikethrough": True or False, # True if the text has a strikethrough.
7960 "fontFamily": "A String", # The font family.
7961 "fontSize": 42, # The size of the font.
7962 "italic": True or False, # True if the text is italicized.
7963 "underline": True or False, # True if the text is underlined.
7964 },
7965 },
7966 ],
7967 },
7968 "fields": "A String", # The fields that should be updated. At least one field must be specified.
7969 # The root `cell` is implied and should not be specified.
7970 # A single `"*"` can be used as short-hand for listing every field.
7971 "range": { # A range on a sheet. # The range to repeat the cell in.
7972 # All indexes are zero-based.
7973 # Indexes are half open, e.g the start index is inclusive
7974 # and the end index is exclusive -- [start_index, end_index).
7975 # Missing indexes indicate the range is unbounded on that side.
7976 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007977 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007978 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007979 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007980 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007981 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007982 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007983 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007984 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007985 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007986 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007987 # `Sheet1!A:B == sheet_id: 0,
7988 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007989 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007990 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007991 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007992 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007993 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007994 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007995 #
7996 # The start index must always be less than or equal to the end index.
7997 # If the start index equals the end index, then the range is empty.
7998 # Empty ranges are typically not meaningful and are usually rendered in the
7999 # UI as `#REF!`.
8000 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
8001 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
8002 "sheetId": 42, # The sheet this range is on.
8003 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
8004 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
8005 },
8006 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008007 "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 -07008008 "includeFormulas": True or False, # True if the search should include cells with formulas.
8009 # False to skip cells with formulas.
8010 "matchEntireCell": True or False, # True if the find value should match the entire cell.
8011 "allSheets": True or False, # True to find/replace over all sheets.
8012 "matchCase": True or False, # True if the search is case sensitive.
8013 "sheetId": 42, # The sheet to find/replace over.
8014 "range": { # A range on a sheet. # The range to find/replace over.
8015 # All indexes are zero-based.
8016 # Indexes are half open, e.g the start index is inclusive
8017 # and the end index is exclusive -- [start_index, end_index).
8018 # Missing indexes indicate the range is unbounded on that side.
8019 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008020 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008021 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008022 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008023 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008024 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008025 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008026 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008027 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008028 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008029 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008030 # `Sheet1!A:B == sheet_id: 0,
8031 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008032 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008033 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008034 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008035 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008036 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008037 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008038 #
8039 # The start index must always be less than or equal to the end index.
8040 # If the start index equals the end index, then the range is empty.
8041 # Empty ranges are typically not meaningful and are usually rendered in the
8042 # UI as `#REF!`.
8043 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
8044 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
8045 "sheetId": 42, # The sheet this range is on.
8046 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
8047 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
8048 },
8049 "searchByRegex": True or False, # True if the find value is a regex.
8050 # The regular expression and replacement should follow Java regex rules
8051 # at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html.
8052 # The replacement string is allowed to refer to capturing groups.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008053 # For example, if one cell has the contents `"Google Sheets"` and another
8054 # has `"Google Docs"`, then searching for `"o.* (.*)"` with a replacement of
8055 # `"$1 Rocks"` would change the contents of the cells to
8056 # `"GSheets Rocks"` and `"GDocs Rocks"` respectively.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008057 "find": "A String", # The value to search.
8058 "replacement": "A String", # The value to use as the replacement.
8059 },
8060 "setBasicFilter": { # Sets the basic filter associated with a sheet. # Sets the basic filter on a sheet.
8061 "filter": { # The default filter associated with a sheet. # The filter to set.
8062 "range": { # A range on a sheet. # The range the filter covers.
8063 # All indexes are zero-based.
8064 # Indexes are half open, e.g the start index is inclusive
8065 # and the end index is exclusive -- [start_index, end_index).
8066 # Missing indexes indicate the range is unbounded on that side.
8067 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008068 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008069 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008070 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008071 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008072 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008073 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008074 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008075 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008076 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008077 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008078 # `Sheet1!A:B == sheet_id: 0,
8079 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008080 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008081 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008082 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008083 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008084 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008085 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008086 #
8087 # The start index must always be less than or equal to the end index.
8088 # If the start index equals the end index, then the range is empty.
8089 # Empty ranges are typically not meaningful and are usually rendered in the
8090 # UI as `#REF!`.
8091 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
8092 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
8093 "sheetId": 42, # The sheet this range is on.
8094 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
8095 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
8096 },
8097 "sortSpecs": [ # The sort order per column. Later specifications are used when values
8098 # are equal in the earlier specifications.
8099 { # A sort order associated with a specific column or row.
8100 "sortOrder": "A String", # The order data should be sorted.
8101 "dimensionIndex": 42, # The dimension the sort should be applied to.
8102 },
8103 ],
8104 "criteria": { # The criteria for showing/hiding values per column.
8105 # The map's key is the column index, and the value is the criteria for
8106 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008107 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008108 "hiddenValues": [ # Values that should be hidden.
8109 "A String",
8110 ],
8111 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
8112 # (This does not override hiddenValues -- if a value is listed there,
8113 # it will still be hidden.)
8114 # BooleanConditions are used by conditional formatting,
8115 # data validation, and the criteria in filters.
8116 "type": "A String", # The type of condition.
8117 "values": [ # The values of the condition. The number of supported values depends
8118 # on the condition type. Some support zero values,
8119 # others one or two values,
8120 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
8121 { # The value of the condition.
8122 "relativeDate": "A String", # A relative date (based on the current date).
8123 # Valid only if the type is
8124 # DATE_BEFORE,
8125 # DATE_AFTER,
8126 # DATE_ON_OR_BEFORE or
8127 # DATE_ON_OR_AFTER.
8128 #
8129 # Relative dates are not supported in data validation.
8130 # They are supported only in conditional formatting and
8131 # conditional filters.
8132 "userEnteredValue": "A String", # A value the condition is based on.
8133 # The value will be parsed as if the user typed into a cell.
8134 # Formulas are supported (and must begin with an `=`).
8135 },
8136 ],
8137 },
8138 },
8139 },
8140 },
8141 },
8142 "updateSpreadsheetProperties": { # Updates properties of a spreadsheet. # Updates the spreadsheet's properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008143 "fields": "A String", # The fields that should be updated. At least one field must be specified.
8144 # The root 'properties' is implied and should not be specified.
8145 # A single `"*"` can be used as short-hand for listing every field.
8146 "properties": { # Properties of a spreadsheet. # The properties to update.
8147 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008148 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008149 # * an ISO 639-1 language code such as `en`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008150 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008151 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008152 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008153 # * a combination of the ISO language code and country code, such as `en_US`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008154 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008155 # Note: when updating this field, not all locales/languages are supported.
8156 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
8157 # `America/New_York`. If the time zone isn't recognized, this may
8158 # be a custom time zone such as `GMT-07:00`.
8159 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
8160 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008161 # CellData.effectiveFormat will not be set if the
8162 # cell's format is equal to this default format.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008163 # This field is read-only.
8164 "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 -07008165 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
8166 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07008167 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
8168 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008169 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008170 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008171 },
8172 "textDirection": "A String", # The direction of the text in the cell.
8173 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
8174 # When updating padding, every field must be specified.
8175 "top": 42, # The top padding of the cell.
8176 "right": 42, # The right padding of the cell.
8177 "bottom": 42, # The bottom padding of the cell.
8178 "left": 42, # The left padding of the cell.
8179 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008180 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008181 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
8182 # for simplicity of conversion to/from color representations in various
8183 # languages over compactness; for example, the fields of this representation
8184 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8185 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8186 # method in iOS; and, with just a little work, it can be easily formatted into
8187 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8188 #
8189 # Example (Java):
8190 #
8191 # import com.google.type.Color;
8192 #
8193 # // ...
8194 # public static java.awt.Color fromProto(Color protocolor) {
8195 # float alpha = protocolor.hasAlpha()
8196 # ? protocolor.getAlpha().getValue()
8197 # : 1.0;
8198 #
8199 # return new java.awt.Color(
8200 # protocolor.getRed(),
8201 # protocolor.getGreen(),
8202 # protocolor.getBlue(),
8203 # alpha);
8204 # }
8205 #
8206 # public static Color toProto(java.awt.Color color) {
8207 # float red = (float) color.getRed();
8208 # float green = (float) color.getGreen();
8209 # float blue = (float) color.getBlue();
8210 # float denominator = 255.0;
8211 # Color.Builder resultBuilder =
8212 # Color
8213 # .newBuilder()
8214 # .setRed(red / denominator)
8215 # .setGreen(green / denominator)
8216 # .setBlue(blue / denominator);
8217 # int alpha = color.getAlpha();
8218 # if (alpha != 255) {
8219 # result.setAlpha(
8220 # FloatValue
8221 # .newBuilder()
8222 # .setValue(((float) alpha) / denominator)
8223 # .build());
8224 # }
8225 # return resultBuilder.build();
8226 # }
8227 # // ...
8228 #
8229 # Example (iOS / Obj-C):
8230 #
8231 # // ...
8232 # static UIColor* fromProto(Color* protocolor) {
8233 # float red = [protocolor red];
8234 # float green = [protocolor green];
8235 # float blue = [protocolor blue];
8236 # FloatValue* alpha_wrapper = [protocolor alpha];
8237 # float alpha = 1.0;
8238 # if (alpha_wrapper != nil) {
8239 # alpha = [alpha_wrapper value];
8240 # }
8241 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8242 # }
8243 #
8244 # static Color* toProto(UIColor* color) {
8245 # CGFloat red, green, blue, alpha;
8246 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8247 # return nil;
8248 # }
8249 # Color* result = [Color alloc] init];
8250 # [result setRed:red];
8251 # [result setGreen:green];
8252 # [result setBlue:blue];
8253 # if (alpha <= 0.9999) {
8254 # [result setAlpha:floatWrapperWithValue(alpha)];
8255 # }
8256 # [result autorelease];
8257 # return result;
8258 # }
8259 # // ...
8260 #
8261 # Example (JavaScript):
8262 #
8263 # // ...
8264 #
8265 # var protoToCssColor = function(rgb_color) {
8266 # var redFrac = rgb_color.red || 0.0;
8267 # var greenFrac = rgb_color.green || 0.0;
8268 # var blueFrac = rgb_color.blue || 0.0;
8269 # var red = Math.floor(redFrac * 255);
8270 # var green = Math.floor(greenFrac * 255);
8271 # var blue = Math.floor(blueFrac * 255);
8272 #
8273 # if (!('alpha' in rgb_color)) {
8274 # return rgbToCssColor_(red, green, blue);
8275 # }
8276 #
8277 # var alphaFrac = rgb_color.alpha.value || 0.0;
8278 # var rgbParams = [red, green, blue].join(',');
8279 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8280 # };
8281 #
8282 # var rgbToCssColor_ = function(red, green, blue) {
8283 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8284 # var hexString = rgbNumber.toString(16);
8285 # var missingZeros = 6 - hexString.length;
8286 # var resultBuilder = ['#'];
8287 # for (var i = 0; i < missingZeros; i++) {
8288 # resultBuilder.push('0');
8289 # }
8290 # resultBuilder.push(hexString);
8291 # return resultBuilder.join('');
8292 # };
8293 #
8294 # // ...
8295 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8296 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8297 # the final pixel color is defined by the equation:
8298 #
8299 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8300 #
8301 # This means that a value of 1.0 corresponds to a solid color, whereas
8302 # a value of 0.0 corresponds to a completely transparent color. This
8303 # uses a wrapper message rather than a simple float scalar so that it is
8304 # possible to distinguish between a default value and the value being unset.
8305 # If omitted, this color object is to be rendered as a solid color
8306 # (as if the alpha value had been explicitly given with a value of 1.0).
8307 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8308 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8309 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008310 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008311 "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).
8312 # Absent values indicate that the field isn't specified.
8313 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
8314 # for simplicity of conversion to/from color representations in various
8315 # languages over compactness; for example, the fields of this representation
8316 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8317 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8318 # method in iOS; and, with just a little work, it can be easily formatted into
8319 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8320 #
8321 # Example (Java):
8322 #
8323 # import com.google.type.Color;
8324 #
8325 # // ...
8326 # public static java.awt.Color fromProto(Color protocolor) {
8327 # float alpha = protocolor.hasAlpha()
8328 # ? protocolor.getAlpha().getValue()
8329 # : 1.0;
8330 #
8331 # return new java.awt.Color(
8332 # protocolor.getRed(),
8333 # protocolor.getGreen(),
8334 # protocolor.getBlue(),
8335 # alpha);
8336 # }
8337 #
8338 # public static Color toProto(java.awt.Color color) {
8339 # float red = (float) color.getRed();
8340 # float green = (float) color.getGreen();
8341 # float blue = (float) color.getBlue();
8342 # float denominator = 255.0;
8343 # Color.Builder resultBuilder =
8344 # Color
8345 # .newBuilder()
8346 # .setRed(red / denominator)
8347 # .setGreen(green / denominator)
8348 # .setBlue(blue / denominator);
8349 # int alpha = color.getAlpha();
8350 # if (alpha != 255) {
8351 # result.setAlpha(
8352 # FloatValue
8353 # .newBuilder()
8354 # .setValue(((float) alpha) / denominator)
8355 # .build());
8356 # }
8357 # return resultBuilder.build();
8358 # }
8359 # // ...
8360 #
8361 # Example (iOS / Obj-C):
8362 #
8363 # // ...
8364 # static UIColor* fromProto(Color* protocolor) {
8365 # float red = [protocolor red];
8366 # float green = [protocolor green];
8367 # float blue = [protocolor blue];
8368 # FloatValue* alpha_wrapper = [protocolor alpha];
8369 # float alpha = 1.0;
8370 # if (alpha_wrapper != nil) {
8371 # alpha = [alpha_wrapper value];
8372 # }
8373 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8374 # }
8375 #
8376 # static Color* toProto(UIColor* color) {
8377 # CGFloat red, green, blue, alpha;
8378 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8379 # return nil;
8380 # }
8381 # Color* result = [Color alloc] init];
8382 # [result setRed:red];
8383 # [result setGreen:green];
8384 # [result setBlue:blue];
8385 # if (alpha <= 0.9999) {
8386 # [result setAlpha:floatWrapperWithValue(alpha)];
8387 # }
8388 # [result autorelease];
8389 # return result;
8390 # }
8391 # // ...
8392 #
8393 # Example (JavaScript):
8394 #
8395 # // ...
8396 #
8397 # var protoToCssColor = function(rgb_color) {
8398 # var redFrac = rgb_color.red || 0.0;
8399 # var greenFrac = rgb_color.green || 0.0;
8400 # var blueFrac = rgb_color.blue || 0.0;
8401 # var red = Math.floor(redFrac * 255);
8402 # var green = Math.floor(greenFrac * 255);
8403 # var blue = Math.floor(blueFrac * 255);
8404 #
8405 # if (!('alpha' in rgb_color)) {
8406 # return rgbToCssColor_(red, green, blue);
8407 # }
8408 #
8409 # var alphaFrac = rgb_color.alpha.value || 0.0;
8410 # var rgbParams = [red, green, blue].join(',');
8411 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8412 # };
8413 #
8414 # var rgbToCssColor_ = function(red, green, blue) {
8415 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8416 # var hexString = rgbNumber.toString(16);
8417 # var missingZeros = 6 - hexString.length;
8418 # var resultBuilder = ['#'];
8419 # for (var i = 0; i < missingZeros; i++) {
8420 # resultBuilder.push('0');
8421 # }
8422 # resultBuilder.push(hexString);
8423 # return resultBuilder.join('');
8424 # };
8425 #
8426 # // ...
8427 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8428 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8429 # the final pixel color is defined by the equation:
8430 #
8431 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8432 #
8433 # This means that a value of 1.0 corresponds to a solid color, whereas
8434 # a value of 0.0 corresponds to a completely transparent color. This
8435 # uses a wrapper message rather than a simple float scalar so that it is
8436 # possible to distinguish between a default value and the value being unset.
8437 # If omitted, this color object is to be rendered as a solid color
8438 # (as if the alpha value had been explicitly given with a value of 1.0).
8439 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8440 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8441 },
8442 "bold": True or False, # True if the text is bold.
8443 "strikethrough": True or False, # True if the text has a strikethrough.
8444 "fontFamily": "A String", # The font family.
8445 "fontSize": 42, # The size of the font.
8446 "italic": True or False, # True if the text is italicized.
8447 "underline": True or False, # True if the text is underlined.
8448 },
8449 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
8450 "borders": { # The borders of the cell. # The borders of the cell.
8451 "top": { # A border along a cell. # The top border of the cell.
8452 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8453 # for simplicity of conversion to/from color representations in various
8454 # languages over compactness; for example, the fields of this representation
8455 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8456 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8457 # method in iOS; and, with just a little work, it can be easily formatted into
8458 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8459 #
8460 # Example (Java):
8461 #
8462 # import com.google.type.Color;
8463 #
8464 # // ...
8465 # public static java.awt.Color fromProto(Color protocolor) {
8466 # float alpha = protocolor.hasAlpha()
8467 # ? protocolor.getAlpha().getValue()
8468 # : 1.0;
8469 #
8470 # return new java.awt.Color(
8471 # protocolor.getRed(),
8472 # protocolor.getGreen(),
8473 # protocolor.getBlue(),
8474 # alpha);
8475 # }
8476 #
8477 # public static Color toProto(java.awt.Color color) {
8478 # float red = (float) color.getRed();
8479 # float green = (float) color.getGreen();
8480 # float blue = (float) color.getBlue();
8481 # float denominator = 255.0;
8482 # Color.Builder resultBuilder =
8483 # Color
8484 # .newBuilder()
8485 # .setRed(red / denominator)
8486 # .setGreen(green / denominator)
8487 # .setBlue(blue / denominator);
8488 # int alpha = color.getAlpha();
8489 # if (alpha != 255) {
8490 # result.setAlpha(
8491 # FloatValue
8492 # .newBuilder()
8493 # .setValue(((float) alpha) / denominator)
8494 # .build());
8495 # }
8496 # return resultBuilder.build();
8497 # }
8498 # // ...
8499 #
8500 # Example (iOS / Obj-C):
8501 #
8502 # // ...
8503 # static UIColor* fromProto(Color* protocolor) {
8504 # float red = [protocolor red];
8505 # float green = [protocolor green];
8506 # float blue = [protocolor blue];
8507 # FloatValue* alpha_wrapper = [protocolor alpha];
8508 # float alpha = 1.0;
8509 # if (alpha_wrapper != nil) {
8510 # alpha = [alpha_wrapper value];
8511 # }
8512 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8513 # }
8514 #
8515 # static Color* toProto(UIColor* color) {
8516 # CGFloat red, green, blue, alpha;
8517 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8518 # return nil;
8519 # }
8520 # Color* result = [Color alloc] init];
8521 # [result setRed:red];
8522 # [result setGreen:green];
8523 # [result setBlue:blue];
8524 # if (alpha <= 0.9999) {
8525 # [result setAlpha:floatWrapperWithValue(alpha)];
8526 # }
8527 # [result autorelease];
8528 # return result;
8529 # }
8530 # // ...
8531 #
8532 # Example (JavaScript):
8533 #
8534 # // ...
8535 #
8536 # var protoToCssColor = function(rgb_color) {
8537 # var redFrac = rgb_color.red || 0.0;
8538 # var greenFrac = rgb_color.green || 0.0;
8539 # var blueFrac = rgb_color.blue || 0.0;
8540 # var red = Math.floor(redFrac * 255);
8541 # var green = Math.floor(greenFrac * 255);
8542 # var blue = Math.floor(blueFrac * 255);
8543 #
8544 # if (!('alpha' in rgb_color)) {
8545 # return rgbToCssColor_(red, green, blue);
8546 # }
8547 #
8548 # var alphaFrac = rgb_color.alpha.value || 0.0;
8549 # var rgbParams = [red, green, blue].join(',');
8550 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8551 # };
8552 #
8553 # var rgbToCssColor_ = function(red, green, blue) {
8554 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8555 # var hexString = rgbNumber.toString(16);
8556 # var missingZeros = 6 - hexString.length;
8557 # var resultBuilder = ['#'];
8558 # for (var i = 0; i < missingZeros; i++) {
8559 # resultBuilder.push('0');
8560 # }
8561 # resultBuilder.push(hexString);
8562 # return resultBuilder.join('');
8563 # };
8564 #
8565 # // ...
8566 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8567 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8568 # the final pixel color is defined by the equation:
8569 #
8570 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8571 #
8572 # This means that a value of 1.0 corresponds to a solid color, whereas
8573 # a value of 0.0 corresponds to a completely transparent color. This
8574 # uses a wrapper message rather than a simple float scalar so that it is
8575 # possible to distinguish between a default value and the value being unset.
8576 # If omitted, this color object is to be rendered as a solid color
8577 # (as if the alpha value had been explicitly given with a value of 1.0).
8578 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8579 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8580 },
8581 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008582 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008583 "style": "A String", # The style of the border.
8584 },
8585 "right": { # A border along a cell. # The right border of the cell.
8586 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8587 # for simplicity of conversion to/from color representations in various
8588 # languages over compactness; for example, the fields of this representation
8589 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8590 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8591 # method in iOS; and, with just a little work, it can be easily formatted into
8592 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8593 #
8594 # Example (Java):
8595 #
8596 # import com.google.type.Color;
8597 #
8598 # // ...
8599 # public static java.awt.Color fromProto(Color protocolor) {
8600 # float alpha = protocolor.hasAlpha()
8601 # ? protocolor.getAlpha().getValue()
8602 # : 1.0;
8603 #
8604 # return new java.awt.Color(
8605 # protocolor.getRed(),
8606 # protocolor.getGreen(),
8607 # protocolor.getBlue(),
8608 # alpha);
8609 # }
8610 #
8611 # public static Color toProto(java.awt.Color color) {
8612 # float red = (float) color.getRed();
8613 # float green = (float) color.getGreen();
8614 # float blue = (float) color.getBlue();
8615 # float denominator = 255.0;
8616 # Color.Builder resultBuilder =
8617 # Color
8618 # .newBuilder()
8619 # .setRed(red / denominator)
8620 # .setGreen(green / denominator)
8621 # .setBlue(blue / denominator);
8622 # int alpha = color.getAlpha();
8623 # if (alpha != 255) {
8624 # result.setAlpha(
8625 # FloatValue
8626 # .newBuilder()
8627 # .setValue(((float) alpha) / denominator)
8628 # .build());
8629 # }
8630 # return resultBuilder.build();
8631 # }
8632 # // ...
8633 #
8634 # Example (iOS / Obj-C):
8635 #
8636 # // ...
8637 # static UIColor* fromProto(Color* protocolor) {
8638 # float red = [protocolor red];
8639 # float green = [protocolor green];
8640 # float blue = [protocolor blue];
8641 # FloatValue* alpha_wrapper = [protocolor alpha];
8642 # float alpha = 1.0;
8643 # if (alpha_wrapper != nil) {
8644 # alpha = [alpha_wrapper value];
8645 # }
8646 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8647 # }
8648 #
8649 # static Color* toProto(UIColor* color) {
8650 # CGFloat red, green, blue, alpha;
8651 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8652 # return nil;
8653 # }
8654 # Color* result = [Color alloc] init];
8655 # [result setRed:red];
8656 # [result setGreen:green];
8657 # [result setBlue:blue];
8658 # if (alpha <= 0.9999) {
8659 # [result setAlpha:floatWrapperWithValue(alpha)];
8660 # }
8661 # [result autorelease];
8662 # return result;
8663 # }
8664 # // ...
8665 #
8666 # Example (JavaScript):
8667 #
8668 # // ...
8669 #
8670 # var protoToCssColor = function(rgb_color) {
8671 # var redFrac = rgb_color.red || 0.0;
8672 # var greenFrac = rgb_color.green || 0.0;
8673 # var blueFrac = rgb_color.blue || 0.0;
8674 # var red = Math.floor(redFrac * 255);
8675 # var green = Math.floor(greenFrac * 255);
8676 # var blue = Math.floor(blueFrac * 255);
8677 #
8678 # if (!('alpha' in rgb_color)) {
8679 # return rgbToCssColor_(red, green, blue);
8680 # }
8681 #
8682 # var alphaFrac = rgb_color.alpha.value || 0.0;
8683 # var rgbParams = [red, green, blue].join(',');
8684 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8685 # };
8686 #
8687 # var rgbToCssColor_ = function(red, green, blue) {
8688 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8689 # var hexString = rgbNumber.toString(16);
8690 # var missingZeros = 6 - hexString.length;
8691 # var resultBuilder = ['#'];
8692 # for (var i = 0; i < missingZeros; i++) {
8693 # resultBuilder.push('0');
8694 # }
8695 # resultBuilder.push(hexString);
8696 # return resultBuilder.join('');
8697 # };
8698 #
8699 # // ...
8700 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8701 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8702 # the final pixel color is defined by the equation:
8703 #
8704 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8705 #
8706 # This means that a value of 1.0 corresponds to a solid color, whereas
8707 # a value of 0.0 corresponds to a completely transparent color. This
8708 # uses a wrapper message rather than a simple float scalar so that it is
8709 # possible to distinguish between a default value and the value being unset.
8710 # If omitted, this color object is to be rendered as a solid color
8711 # (as if the alpha value had been explicitly given with a value of 1.0).
8712 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8713 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8714 },
8715 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008716 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008717 "style": "A String", # The style of the border.
8718 },
8719 "bottom": { # A border along a cell. # The bottom border of the cell.
8720 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8721 # for simplicity of conversion to/from color representations in various
8722 # languages over compactness; for example, the fields of this representation
8723 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8724 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8725 # method in iOS; and, with just a little work, it can be easily formatted into
8726 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8727 #
8728 # Example (Java):
8729 #
8730 # import com.google.type.Color;
8731 #
8732 # // ...
8733 # public static java.awt.Color fromProto(Color protocolor) {
8734 # float alpha = protocolor.hasAlpha()
8735 # ? protocolor.getAlpha().getValue()
8736 # : 1.0;
8737 #
8738 # return new java.awt.Color(
8739 # protocolor.getRed(),
8740 # protocolor.getGreen(),
8741 # protocolor.getBlue(),
8742 # alpha);
8743 # }
8744 #
8745 # public static Color toProto(java.awt.Color color) {
8746 # float red = (float) color.getRed();
8747 # float green = (float) color.getGreen();
8748 # float blue = (float) color.getBlue();
8749 # float denominator = 255.0;
8750 # Color.Builder resultBuilder =
8751 # Color
8752 # .newBuilder()
8753 # .setRed(red / denominator)
8754 # .setGreen(green / denominator)
8755 # .setBlue(blue / denominator);
8756 # int alpha = color.getAlpha();
8757 # if (alpha != 255) {
8758 # result.setAlpha(
8759 # FloatValue
8760 # .newBuilder()
8761 # .setValue(((float) alpha) / denominator)
8762 # .build());
8763 # }
8764 # return resultBuilder.build();
8765 # }
8766 # // ...
8767 #
8768 # Example (iOS / Obj-C):
8769 #
8770 # // ...
8771 # static UIColor* fromProto(Color* protocolor) {
8772 # float red = [protocolor red];
8773 # float green = [protocolor green];
8774 # float blue = [protocolor blue];
8775 # FloatValue* alpha_wrapper = [protocolor alpha];
8776 # float alpha = 1.0;
8777 # if (alpha_wrapper != nil) {
8778 # alpha = [alpha_wrapper value];
8779 # }
8780 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8781 # }
8782 #
8783 # static Color* toProto(UIColor* color) {
8784 # CGFloat red, green, blue, alpha;
8785 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8786 # return nil;
8787 # }
8788 # Color* result = [Color alloc] init];
8789 # [result setRed:red];
8790 # [result setGreen:green];
8791 # [result setBlue:blue];
8792 # if (alpha <= 0.9999) {
8793 # [result setAlpha:floatWrapperWithValue(alpha)];
8794 # }
8795 # [result autorelease];
8796 # return result;
8797 # }
8798 # // ...
8799 #
8800 # Example (JavaScript):
8801 #
8802 # // ...
8803 #
8804 # var protoToCssColor = function(rgb_color) {
8805 # var redFrac = rgb_color.red || 0.0;
8806 # var greenFrac = rgb_color.green || 0.0;
8807 # var blueFrac = rgb_color.blue || 0.0;
8808 # var red = Math.floor(redFrac * 255);
8809 # var green = Math.floor(greenFrac * 255);
8810 # var blue = Math.floor(blueFrac * 255);
8811 #
8812 # if (!('alpha' in rgb_color)) {
8813 # return rgbToCssColor_(red, green, blue);
8814 # }
8815 #
8816 # var alphaFrac = rgb_color.alpha.value || 0.0;
8817 # var rgbParams = [red, green, blue].join(',');
8818 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8819 # };
8820 #
8821 # var rgbToCssColor_ = function(red, green, blue) {
8822 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8823 # var hexString = rgbNumber.toString(16);
8824 # var missingZeros = 6 - hexString.length;
8825 # var resultBuilder = ['#'];
8826 # for (var i = 0; i < missingZeros; i++) {
8827 # resultBuilder.push('0');
8828 # }
8829 # resultBuilder.push(hexString);
8830 # return resultBuilder.join('');
8831 # };
8832 #
8833 # // ...
8834 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8835 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8836 # the final pixel color is defined by the equation:
8837 #
8838 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8839 #
8840 # This means that a value of 1.0 corresponds to a solid color, whereas
8841 # a value of 0.0 corresponds to a completely transparent color. This
8842 # uses a wrapper message rather than a simple float scalar so that it is
8843 # possible to distinguish between a default value and the value being unset.
8844 # If omitted, this color object is to be rendered as a solid color
8845 # (as if the alpha value had been explicitly given with a value of 1.0).
8846 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8847 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8848 },
8849 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008850 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008851 "style": "A String", # The style of the border.
8852 },
8853 "left": { # A border along a cell. # The left border of the cell.
8854 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8855 # for simplicity of conversion to/from color representations in various
8856 # languages over compactness; for example, the fields of this representation
8857 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8858 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8859 # method in iOS; and, with just a little work, it can be easily formatted into
8860 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8861 #
8862 # Example (Java):
8863 #
8864 # import com.google.type.Color;
8865 #
8866 # // ...
8867 # public static java.awt.Color fromProto(Color protocolor) {
8868 # float alpha = protocolor.hasAlpha()
8869 # ? protocolor.getAlpha().getValue()
8870 # : 1.0;
8871 #
8872 # return new java.awt.Color(
8873 # protocolor.getRed(),
8874 # protocolor.getGreen(),
8875 # protocolor.getBlue(),
8876 # alpha);
8877 # }
8878 #
8879 # public static Color toProto(java.awt.Color color) {
8880 # float red = (float) color.getRed();
8881 # float green = (float) color.getGreen();
8882 # float blue = (float) color.getBlue();
8883 # float denominator = 255.0;
8884 # Color.Builder resultBuilder =
8885 # Color
8886 # .newBuilder()
8887 # .setRed(red / denominator)
8888 # .setGreen(green / denominator)
8889 # .setBlue(blue / denominator);
8890 # int alpha = color.getAlpha();
8891 # if (alpha != 255) {
8892 # result.setAlpha(
8893 # FloatValue
8894 # .newBuilder()
8895 # .setValue(((float) alpha) / denominator)
8896 # .build());
8897 # }
8898 # return resultBuilder.build();
8899 # }
8900 # // ...
8901 #
8902 # Example (iOS / Obj-C):
8903 #
8904 # // ...
8905 # static UIColor* fromProto(Color* protocolor) {
8906 # float red = [protocolor red];
8907 # float green = [protocolor green];
8908 # float blue = [protocolor blue];
8909 # FloatValue* alpha_wrapper = [protocolor alpha];
8910 # float alpha = 1.0;
8911 # if (alpha_wrapper != nil) {
8912 # alpha = [alpha_wrapper value];
8913 # }
8914 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8915 # }
8916 #
8917 # static Color* toProto(UIColor* color) {
8918 # CGFloat red, green, blue, alpha;
8919 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8920 # return nil;
8921 # }
8922 # Color* result = [Color alloc] init];
8923 # [result setRed:red];
8924 # [result setGreen:green];
8925 # [result setBlue:blue];
8926 # if (alpha <= 0.9999) {
8927 # [result setAlpha:floatWrapperWithValue(alpha)];
8928 # }
8929 # [result autorelease];
8930 # return result;
8931 # }
8932 # // ...
8933 #
8934 # Example (JavaScript):
8935 #
8936 # // ...
8937 #
8938 # var protoToCssColor = function(rgb_color) {
8939 # var redFrac = rgb_color.red || 0.0;
8940 # var greenFrac = rgb_color.green || 0.0;
8941 # var blueFrac = rgb_color.blue || 0.0;
8942 # var red = Math.floor(redFrac * 255);
8943 # var green = Math.floor(greenFrac * 255);
8944 # var blue = Math.floor(blueFrac * 255);
8945 #
8946 # if (!('alpha' in rgb_color)) {
8947 # return rgbToCssColor_(red, green, blue);
8948 # }
8949 #
8950 # var alphaFrac = rgb_color.alpha.value || 0.0;
8951 # var rgbParams = [red, green, blue].join(',');
8952 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8953 # };
8954 #
8955 # var rgbToCssColor_ = function(red, green, blue) {
8956 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8957 # var hexString = rgbNumber.toString(16);
8958 # var missingZeros = 6 - hexString.length;
8959 # var resultBuilder = ['#'];
8960 # for (var i = 0; i < missingZeros; i++) {
8961 # resultBuilder.push('0');
8962 # }
8963 # resultBuilder.push(hexString);
8964 # return resultBuilder.join('');
8965 # };
8966 #
8967 # // ...
8968 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8969 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8970 # the final pixel color is defined by the equation:
8971 #
8972 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8973 #
8974 # This means that a value of 1.0 corresponds to a solid color, whereas
8975 # a value of 0.0 corresponds to a completely transparent color. This
8976 # uses a wrapper message rather than a simple float scalar so that it is
8977 # possible to distinguish between a default value and the value being unset.
8978 # If omitted, this color object is to be rendered as a solid color
8979 # (as if the alpha value had been explicitly given with a value of 1.0).
8980 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8981 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8982 },
8983 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008984 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008985 "style": "A String", # The style of the border.
8986 },
8987 },
8988 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
8989 },
8990 "title": "A String", # The title of the spreadsheet.
8991 },
8992 },
8993 "updateCells": { # Updates all cells in a range with new data. # Updates many cells at once.
8994 "fields": "A String", # The fields of CellData that should be updated.
8995 # At least one field must be specified.
8996 # The root is the CellData; 'row.values.' should not be specified.
8997 # A single `"*"` can be used as short-hand for listing every field.
8998 "range": { # A range on a sheet. # The range to write data to.
8999 #
9000 # If the data in rows does not cover the entire requested range,
9001 # the fields matching those set in fields will be cleared.
9002 # All indexes are zero-based.
9003 # Indexes are half open, e.g the start index is inclusive
9004 # and the end index is exclusive -- [start_index, end_index).
9005 # Missing indexes indicate the range is unbounded on that side.
9006 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009007 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009008 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009009 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009010 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009011 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009012 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009013 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009014 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009015 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009016 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009017 # `Sheet1!A:B == sheet_id: 0,
9018 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009019 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009020 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009021 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009022 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009023 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009024 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009025 #
9026 # The start index must always be less than or equal to the end index.
9027 # If the start index equals the end index, then the range is empty.
9028 # Empty ranges are typically not meaningful and are usually rendered in the
9029 # UI as `#REF!`.
9030 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
9031 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
9032 "sheetId": 42, # The sheet this range is on.
9033 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
9034 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
9035 },
9036 "rows": [ # The data to write.
9037 { # Data about each cell in a row.
9038 "values": [ # The values in the row, one per column.
9039 { # Data about a specific cell.
9040 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
9041 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009042 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009043 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009044 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009045 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
9046 # or vertically (as rows).
9047 "rows": [ # Each row grouping in the pivot table.
9048 { # A single grouping (either row or column) in a pivot table.
9049 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
9050 "valueMetadata": [ # Metadata about values in the grouping.
9051 { # Metadata about a value in a pivot grouping.
9052 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
9053 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
9054 # (Note that formulaValue is not valid,
9055 # because the values will be calculated.)
9056 "numberValue": 3.14, # Represents a double value.
9057 # Note: Dates, Times and DateTimes are represented as doubles in
9058 # "serial number" format.
9059 "boolValue": True or False, # Represents a boolean value.
9060 "formulaValue": "A String", # Represents a formula.
9061 "stringValue": "A String", # Represents a string value.
9062 # Leading single quotes are not included. For example, if the user typed
9063 # `'123` into the UI, this would be represented as a `stringValue` of
9064 # `"123"`.
9065 "errorValue": { # An error in a cell. # Represents an error.
9066 # This field is read-only.
9067 "message": "A String", # A message with more information about the error
9068 # (in the spreadsheet's locale).
9069 "type": "A String", # The type of error.
9070 },
9071 },
9072 },
9073 ],
9074 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
9075 # If not specified, sorting is alphabetical by this group's values.
9076 "buckets": [ # Determines the bucket from which values are chosen to sort.
9077 #
9078 # For example, in a pivot table with one row group & two column groups,
9079 # the row group can list up to two values. The first value corresponds
9080 # to a value within the first column group, and the second value
9081 # corresponds to a value in the second column group. If no values
9082 # are listed, this would indicate that the row should be sorted according
9083 # to the "Grand Total" over the column groups. If a single value is listed,
9084 # this would correspond to using the "Total" of that bucket.
9085 { # The kinds of value that a cell in a spreadsheet can have.
9086 "numberValue": 3.14, # Represents a double value.
9087 # Note: Dates, Times and DateTimes are represented as doubles in
9088 # "serial number" format.
9089 "boolValue": True or False, # Represents a boolean value.
9090 "formulaValue": "A String", # Represents a formula.
9091 "stringValue": "A String", # Represents a string value.
9092 # Leading single quotes are not included. For example, if the user typed
9093 # `'123` into the UI, this would be represented as a `stringValue` of
9094 # `"123"`.
9095 "errorValue": { # An error in a cell. # Represents an error.
9096 # This field is read-only.
9097 "message": "A String", # A message with more information about the error
9098 # (in the spreadsheet's locale).
9099 "type": "A String", # The type of error.
9100 },
9101 },
9102 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009103 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009104 # grouping should be sorted by.
9105 },
9106 "sortOrder": "A String", # The order the values in this group should be sorted.
9107 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
9108 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009109 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009110 # means this group refers to column `C`, whereas the offset `1` would refer
9111 # to column `D`.
9112 },
9113 ],
9114 "source": { # A range on a sheet. # The range the pivot table is reading data from.
9115 # All indexes are zero-based.
9116 # Indexes are half open, e.g the start index is inclusive
9117 # and the end index is exclusive -- [start_index, end_index).
9118 # Missing indexes indicate the range is unbounded on that side.
9119 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009120 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009121 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009122 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009123 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009124 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009125 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009126 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009127 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009128 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009129 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009130 # `Sheet1!A:B == sheet_id: 0,
9131 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009132 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009133 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009134 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009135 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009136 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009137 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009138 #
9139 # The start index must always be less than or equal to the end index.
9140 # If the start index equals the end index, then the range is empty.
9141 # Empty ranges are typically not meaningful and are usually rendered in the
9142 # UI as `#REF!`.
9143 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
9144 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
9145 "sheetId": 42, # The sheet this range is on.
9146 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
9147 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
9148 },
9149 "values": [ # A list of values to include in the pivot table.
9150 { # The definition of how a value in a pivot table should be calculated.
9151 "formula": "A String", # A custom formula to calculate the value. The formula must start
9152 # with an `=` character.
9153 "summarizeFunction": "A String", # A function to summarize the value.
9154 # If formula is set, the only supported values are
9155 # SUM and
9156 # CUSTOM.
9157 # If sourceColumnOffset is set, then `CUSTOM`
9158 # is not supported.
9159 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
9160 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009161 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009162 # means this value refers to column `C`, whereas the offset `1` would
9163 # refer to column `D`.
9164 "name": "A String", # A name to use for the value. This is only used if formula was set.
9165 # Otherwise, the column name is used.
9166 },
9167 ],
9168 "criteria": { # An optional mapping of filters per source column offset.
9169 #
9170 # The filters will be applied before aggregating data into the pivot table.
9171 # The map's key is the column offset of the source range that you want to
9172 # filter, and the value is the criteria for that column.
9173 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009174 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009175 # for column `C`, whereas the key `1` is for column `D`.
9176 "a_key": { # Criteria for showing/hiding rows in a pivot table.
9177 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
9178 "A String",
9179 ],
9180 },
9181 },
9182 "columns": [ # Each column grouping in the pivot table.
9183 { # A single grouping (either row or column) in a pivot table.
9184 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
9185 "valueMetadata": [ # Metadata about values in the grouping.
9186 { # Metadata about a value in a pivot grouping.
9187 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
9188 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
9189 # (Note that formulaValue is not valid,
9190 # because the values will be calculated.)
9191 "numberValue": 3.14, # Represents a double value.
9192 # Note: Dates, Times and DateTimes are represented as doubles in
9193 # "serial number" format.
9194 "boolValue": True or False, # Represents a boolean value.
9195 "formulaValue": "A String", # Represents a formula.
9196 "stringValue": "A String", # Represents a string value.
9197 # Leading single quotes are not included. For example, if the user typed
9198 # `'123` into the UI, this would be represented as a `stringValue` of
9199 # `"123"`.
9200 "errorValue": { # An error in a cell. # Represents an error.
9201 # This field is read-only.
9202 "message": "A String", # A message with more information about the error
9203 # (in the spreadsheet's locale).
9204 "type": "A String", # The type of error.
9205 },
9206 },
9207 },
9208 ],
9209 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
9210 # If not specified, sorting is alphabetical by this group's values.
9211 "buckets": [ # Determines the bucket from which values are chosen to sort.
9212 #
9213 # For example, in a pivot table with one row group & two column groups,
9214 # the row group can list up to two values. The first value corresponds
9215 # to a value within the first column group, and the second value
9216 # corresponds to a value in the second column group. If no values
9217 # are listed, this would indicate that the row should be sorted according
9218 # to the "Grand Total" over the column groups. If a single value is listed,
9219 # this would correspond to using the "Total" of that bucket.
9220 { # The kinds of value that a cell in a spreadsheet can have.
9221 "numberValue": 3.14, # Represents a double value.
9222 # Note: Dates, Times and DateTimes are represented as doubles in
9223 # "serial number" format.
9224 "boolValue": True or False, # Represents a boolean value.
9225 "formulaValue": "A String", # Represents a formula.
9226 "stringValue": "A String", # Represents a string value.
9227 # Leading single quotes are not included. For example, if the user typed
9228 # `'123` into the UI, this would be represented as a `stringValue` of
9229 # `"123"`.
9230 "errorValue": { # An error in a cell. # Represents an error.
9231 # This field is read-only.
9232 "message": "A String", # A message with more information about the error
9233 # (in the spreadsheet's locale).
9234 "type": "A String", # The type of error.
9235 },
9236 },
9237 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009238 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009239 # grouping should be sorted by.
9240 },
9241 "sortOrder": "A String", # The order the values in this group should be sorted.
9242 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
9243 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009244 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009245 # means this group refers to column `C`, whereas the offset `1` would refer
9246 # to column `D`.
9247 },
9248 ],
9249 },
9250 "hyperlink": "A String", # A hyperlink this cell points to, if any.
9251 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
9252 "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
9253 # the calculated value. For cells with literals, this will be
9254 # the same as the user_entered_value.
9255 # This field is read-only.
9256 "numberValue": 3.14, # Represents a double value.
9257 # Note: Dates, Times and DateTimes are represented as doubles in
9258 # "serial number" format.
9259 "boolValue": True or False, # Represents a boolean value.
9260 "formulaValue": "A String", # Represents a formula.
9261 "stringValue": "A String", # Represents a string value.
9262 # Leading single quotes are not included. For example, if the user typed
9263 # `'123` into the UI, this would be represented as a `stringValue` of
9264 # `"123"`.
9265 "errorValue": { # An error in a cell. # Represents an error.
9266 # This field is read-only.
9267 "message": "A String", # A message with more information about the error
9268 # (in the spreadsheet's locale).
9269 "type": "A String", # The type of error.
9270 },
9271 },
9272 "formattedValue": "A String", # The formatted value of the cell.
9273 # This is the value as it's shown to the user.
9274 # This field is read-only.
9275 "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()`
9276 # Note: Dates, Times and DateTimes are represented as doubles in
9277 # serial number format.
9278 "numberValue": 3.14, # Represents a double value.
9279 # Note: Dates, Times and DateTimes are represented as doubles in
9280 # "serial number" format.
9281 "boolValue": True or False, # Represents a boolean value.
9282 "formulaValue": "A String", # Represents a formula.
9283 "stringValue": "A String", # Represents a string value.
9284 # Leading single quotes are not included. For example, if the user typed
9285 # `'123` into the UI, this would be represented as a `stringValue` of
9286 # `"123"`.
9287 "errorValue": { # An error in a cell. # Represents an error.
9288 # This field is read-only.
9289 "message": "A String", # A message with more information about the error
9290 # (in the spreadsheet's locale).
9291 "type": "A String", # The type of error.
9292 },
9293 },
9294 "note": "A String", # Any note on the cell.
9295 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
9296 # This includes the results of applying any conditional formatting and,
9297 # if the cell contains a formula, the computed number format.
9298 # If the effective format is the default format, effective format will
9299 # not be written.
9300 # This field is read-only.
9301 "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 -07009302 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
9303 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07009304 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
9305 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009306 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009307 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009308 },
9309 "textDirection": "A String", # The direction of the text in the cell.
9310 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
9311 # When updating padding, every field must be specified.
9312 "top": 42, # The top padding of the cell.
9313 "right": 42, # The right padding of the cell.
9314 "bottom": 42, # The bottom padding of the cell.
9315 "left": 42, # The left padding of the cell.
9316 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009317 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009318 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
9319 # for simplicity of conversion to/from color representations in various
9320 # languages over compactness; for example, the fields of this representation
9321 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9322 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9323 # method in iOS; and, with just a little work, it can be easily formatted into
9324 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9325 #
9326 # Example (Java):
9327 #
9328 # import com.google.type.Color;
9329 #
9330 # // ...
9331 # public static java.awt.Color fromProto(Color protocolor) {
9332 # float alpha = protocolor.hasAlpha()
9333 # ? protocolor.getAlpha().getValue()
9334 # : 1.0;
9335 #
9336 # return new java.awt.Color(
9337 # protocolor.getRed(),
9338 # protocolor.getGreen(),
9339 # protocolor.getBlue(),
9340 # alpha);
9341 # }
9342 #
9343 # public static Color toProto(java.awt.Color color) {
9344 # float red = (float) color.getRed();
9345 # float green = (float) color.getGreen();
9346 # float blue = (float) color.getBlue();
9347 # float denominator = 255.0;
9348 # Color.Builder resultBuilder =
9349 # Color
9350 # .newBuilder()
9351 # .setRed(red / denominator)
9352 # .setGreen(green / denominator)
9353 # .setBlue(blue / denominator);
9354 # int alpha = color.getAlpha();
9355 # if (alpha != 255) {
9356 # result.setAlpha(
9357 # FloatValue
9358 # .newBuilder()
9359 # .setValue(((float) alpha) / denominator)
9360 # .build());
9361 # }
9362 # return resultBuilder.build();
9363 # }
9364 # // ...
9365 #
9366 # Example (iOS / Obj-C):
9367 #
9368 # // ...
9369 # static UIColor* fromProto(Color* protocolor) {
9370 # float red = [protocolor red];
9371 # float green = [protocolor green];
9372 # float blue = [protocolor blue];
9373 # FloatValue* alpha_wrapper = [protocolor alpha];
9374 # float alpha = 1.0;
9375 # if (alpha_wrapper != nil) {
9376 # alpha = [alpha_wrapper value];
9377 # }
9378 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9379 # }
9380 #
9381 # static Color* toProto(UIColor* color) {
9382 # CGFloat red, green, blue, alpha;
9383 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9384 # return nil;
9385 # }
9386 # Color* result = [Color alloc] init];
9387 # [result setRed:red];
9388 # [result setGreen:green];
9389 # [result setBlue:blue];
9390 # if (alpha <= 0.9999) {
9391 # [result setAlpha:floatWrapperWithValue(alpha)];
9392 # }
9393 # [result autorelease];
9394 # return result;
9395 # }
9396 # // ...
9397 #
9398 # Example (JavaScript):
9399 #
9400 # // ...
9401 #
9402 # var protoToCssColor = function(rgb_color) {
9403 # var redFrac = rgb_color.red || 0.0;
9404 # var greenFrac = rgb_color.green || 0.0;
9405 # var blueFrac = rgb_color.blue || 0.0;
9406 # var red = Math.floor(redFrac * 255);
9407 # var green = Math.floor(greenFrac * 255);
9408 # var blue = Math.floor(blueFrac * 255);
9409 #
9410 # if (!('alpha' in rgb_color)) {
9411 # return rgbToCssColor_(red, green, blue);
9412 # }
9413 #
9414 # var alphaFrac = rgb_color.alpha.value || 0.0;
9415 # var rgbParams = [red, green, blue].join(',');
9416 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9417 # };
9418 #
9419 # var rgbToCssColor_ = function(red, green, blue) {
9420 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9421 # var hexString = rgbNumber.toString(16);
9422 # var missingZeros = 6 - hexString.length;
9423 # var resultBuilder = ['#'];
9424 # for (var i = 0; i < missingZeros; i++) {
9425 # resultBuilder.push('0');
9426 # }
9427 # resultBuilder.push(hexString);
9428 # return resultBuilder.join('');
9429 # };
9430 #
9431 # // ...
9432 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9433 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9434 # the final pixel color is defined by the equation:
9435 #
9436 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9437 #
9438 # This means that a value of 1.0 corresponds to a solid color, whereas
9439 # a value of 0.0 corresponds to a completely transparent color. This
9440 # uses a wrapper message rather than a simple float scalar so that it is
9441 # possible to distinguish between a default value and the value being unset.
9442 # If omitted, this color object is to be rendered as a solid color
9443 # (as if the alpha value had been explicitly given with a value of 1.0).
9444 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9445 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9446 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009447 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009448 "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).
9449 # Absent values indicate that the field isn't specified.
9450 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
9451 # for simplicity of conversion to/from color representations in various
9452 # languages over compactness; for example, the fields of this representation
9453 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9454 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9455 # method in iOS; and, with just a little work, it can be easily formatted into
9456 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9457 #
9458 # Example (Java):
9459 #
9460 # import com.google.type.Color;
9461 #
9462 # // ...
9463 # public static java.awt.Color fromProto(Color protocolor) {
9464 # float alpha = protocolor.hasAlpha()
9465 # ? protocolor.getAlpha().getValue()
9466 # : 1.0;
9467 #
9468 # return new java.awt.Color(
9469 # protocolor.getRed(),
9470 # protocolor.getGreen(),
9471 # protocolor.getBlue(),
9472 # alpha);
9473 # }
9474 #
9475 # public static Color toProto(java.awt.Color color) {
9476 # float red = (float) color.getRed();
9477 # float green = (float) color.getGreen();
9478 # float blue = (float) color.getBlue();
9479 # float denominator = 255.0;
9480 # Color.Builder resultBuilder =
9481 # Color
9482 # .newBuilder()
9483 # .setRed(red / denominator)
9484 # .setGreen(green / denominator)
9485 # .setBlue(blue / denominator);
9486 # int alpha = color.getAlpha();
9487 # if (alpha != 255) {
9488 # result.setAlpha(
9489 # FloatValue
9490 # .newBuilder()
9491 # .setValue(((float) alpha) / denominator)
9492 # .build());
9493 # }
9494 # return resultBuilder.build();
9495 # }
9496 # // ...
9497 #
9498 # Example (iOS / Obj-C):
9499 #
9500 # // ...
9501 # static UIColor* fromProto(Color* protocolor) {
9502 # float red = [protocolor red];
9503 # float green = [protocolor green];
9504 # float blue = [protocolor blue];
9505 # FloatValue* alpha_wrapper = [protocolor alpha];
9506 # float alpha = 1.0;
9507 # if (alpha_wrapper != nil) {
9508 # alpha = [alpha_wrapper value];
9509 # }
9510 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9511 # }
9512 #
9513 # static Color* toProto(UIColor* color) {
9514 # CGFloat red, green, blue, alpha;
9515 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9516 # return nil;
9517 # }
9518 # Color* result = [Color alloc] init];
9519 # [result setRed:red];
9520 # [result setGreen:green];
9521 # [result setBlue:blue];
9522 # if (alpha <= 0.9999) {
9523 # [result setAlpha:floatWrapperWithValue(alpha)];
9524 # }
9525 # [result autorelease];
9526 # return result;
9527 # }
9528 # // ...
9529 #
9530 # Example (JavaScript):
9531 #
9532 # // ...
9533 #
9534 # var protoToCssColor = function(rgb_color) {
9535 # var redFrac = rgb_color.red || 0.0;
9536 # var greenFrac = rgb_color.green || 0.0;
9537 # var blueFrac = rgb_color.blue || 0.0;
9538 # var red = Math.floor(redFrac * 255);
9539 # var green = Math.floor(greenFrac * 255);
9540 # var blue = Math.floor(blueFrac * 255);
9541 #
9542 # if (!('alpha' in rgb_color)) {
9543 # return rgbToCssColor_(red, green, blue);
9544 # }
9545 #
9546 # var alphaFrac = rgb_color.alpha.value || 0.0;
9547 # var rgbParams = [red, green, blue].join(',');
9548 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9549 # };
9550 #
9551 # var rgbToCssColor_ = function(red, green, blue) {
9552 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9553 # var hexString = rgbNumber.toString(16);
9554 # var missingZeros = 6 - hexString.length;
9555 # var resultBuilder = ['#'];
9556 # for (var i = 0; i < missingZeros; i++) {
9557 # resultBuilder.push('0');
9558 # }
9559 # resultBuilder.push(hexString);
9560 # return resultBuilder.join('');
9561 # };
9562 #
9563 # // ...
9564 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9565 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9566 # the final pixel color is defined by the equation:
9567 #
9568 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9569 #
9570 # This means that a value of 1.0 corresponds to a solid color, whereas
9571 # a value of 0.0 corresponds to a completely transparent color. This
9572 # uses a wrapper message rather than a simple float scalar so that it is
9573 # possible to distinguish between a default value and the value being unset.
9574 # If omitted, this color object is to be rendered as a solid color
9575 # (as if the alpha value had been explicitly given with a value of 1.0).
9576 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9577 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9578 },
9579 "bold": True or False, # True if the text is bold.
9580 "strikethrough": True or False, # True if the text has a strikethrough.
9581 "fontFamily": "A String", # The font family.
9582 "fontSize": 42, # The size of the font.
9583 "italic": True or False, # True if the text is italicized.
9584 "underline": True or False, # True if the text is underlined.
9585 },
9586 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
9587 "borders": { # The borders of the cell. # The borders of the cell.
9588 "top": { # A border along a cell. # The top border of the cell.
9589 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
9590 # for simplicity of conversion to/from color representations in various
9591 # languages over compactness; for example, the fields of this representation
9592 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9593 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9594 # method in iOS; and, with just a little work, it can be easily formatted into
9595 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9596 #
9597 # Example (Java):
9598 #
9599 # import com.google.type.Color;
9600 #
9601 # // ...
9602 # public static java.awt.Color fromProto(Color protocolor) {
9603 # float alpha = protocolor.hasAlpha()
9604 # ? protocolor.getAlpha().getValue()
9605 # : 1.0;
9606 #
9607 # return new java.awt.Color(
9608 # protocolor.getRed(),
9609 # protocolor.getGreen(),
9610 # protocolor.getBlue(),
9611 # alpha);
9612 # }
9613 #
9614 # public static Color toProto(java.awt.Color color) {
9615 # float red = (float) color.getRed();
9616 # float green = (float) color.getGreen();
9617 # float blue = (float) color.getBlue();
9618 # float denominator = 255.0;
9619 # Color.Builder resultBuilder =
9620 # Color
9621 # .newBuilder()
9622 # .setRed(red / denominator)
9623 # .setGreen(green / denominator)
9624 # .setBlue(blue / denominator);
9625 # int alpha = color.getAlpha();
9626 # if (alpha != 255) {
9627 # result.setAlpha(
9628 # FloatValue
9629 # .newBuilder()
9630 # .setValue(((float) alpha) / denominator)
9631 # .build());
9632 # }
9633 # return resultBuilder.build();
9634 # }
9635 # // ...
9636 #
9637 # Example (iOS / Obj-C):
9638 #
9639 # // ...
9640 # static UIColor* fromProto(Color* protocolor) {
9641 # float red = [protocolor red];
9642 # float green = [protocolor green];
9643 # float blue = [protocolor blue];
9644 # FloatValue* alpha_wrapper = [protocolor alpha];
9645 # float alpha = 1.0;
9646 # if (alpha_wrapper != nil) {
9647 # alpha = [alpha_wrapper value];
9648 # }
9649 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9650 # }
9651 #
9652 # static Color* toProto(UIColor* color) {
9653 # CGFloat red, green, blue, alpha;
9654 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9655 # return nil;
9656 # }
9657 # Color* result = [Color alloc] init];
9658 # [result setRed:red];
9659 # [result setGreen:green];
9660 # [result setBlue:blue];
9661 # if (alpha <= 0.9999) {
9662 # [result setAlpha:floatWrapperWithValue(alpha)];
9663 # }
9664 # [result autorelease];
9665 # return result;
9666 # }
9667 # // ...
9668 #
9669 # Example (JavaScript):
9670 #
9671 # // ...
9672 #
9673 # var protoToCssColor = function(rgb_color) {
9674 # var redFrac = rgb_color.red || 0.0;
9675 # var greenFrac = rgb_color.green || 0.0;
9676 # var blueFrac = rgb_color.blue || 0.0;
9677 # var red = Math.floor(redFrac * 255);
9678 # var green = Math.floor(greenFrac * 255);
9679 # var blue = Math.floor(blueFrac * 255);
9680 #
9681 # if (!('alpha' in rgb_color)) {
9682 # return rgbToCssColor_(red, green, blue);
9683 # }
9684 #
9685 # var alphaFrac = rgb_color.alpha.value || 0.0;
9686 # var rgbParams = [red, green, blue].join(',');
9687 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9688 # };
9689 #
9690 # var rgbToCssColor_ = function(red, green, blue) {
9691 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9692 # var hexString = rgbNumber.toString(16);
9693 # var missingZeros = 6 - hexString.length;
9694 # var resultBuilder = ['#'];
9695 # for (var i = 0; i < missingZeros; i++) {
9696 # resultBuilder.push('0');
9697 # }
9698 # resultBuilder.push(hexString);
9699 # return resultBuilder.join('');
9700 # };
9701 #
9702 # // ...
9703 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9704 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9705 # the final pixel color is defined by the equation:
9706 #
9707 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9708 #
9709 # This means that a value of 1.0 corresponds to a solid color, whereas
9710 # a value of 0.0 corresponds to a completely transparent color. This
9711 # uses a wrapper message rather than a simple float scalar so that it is
9712 # possible to distinguish between a default value and the value being unset.
9713 # If omitted, this color object is to be rendered as a solid color
9714 # (as if the alpha value had been explicitly given with a value of 1.0).
9715 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9716 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9717 },
9718 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009719 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009720 "style": "A String", # The style of the border.
9721 },
9722 "right": { # A border along a cell. # The right border of the cell.
9723 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
9724 # for simplicity of conversion to/from color representations in various
9725 # languages over compactness; for example, the fields of this representation
9726 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9727 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9728 # method in iOS; and, with just a little work, it can be easily formatted into
9729 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9730 #
9731 # Example (Java):
9732 #
9733 # import com.google.type.Color;
9734 #
9735 # // ...
9736 # public static java.awt.Color fromProto(Color protocolor) {
9737 # float alpha = protocolor.hasAlpha()
9738 # ? protocolor.getAlpha().getValue()
9739 # : 1.0;
9740 #
9741 # return new java.awt.Color(
9742 # protocolor.getRed(),
9743 # protocolor.getGreen(),
9744 # protocolor.getBlue(),
9745 # alpha);
9746 # }
9747 #
9748 # public static Color toProto(java.awt.Color color) {
9749 # float red = (float) color.getRed();
9750 # float green = (float) color.getGreen();
9751 # float blue = (float) color.getBlue();
9752 # float denominator = 255.0;
9753 # Color.Builder resultBuilder =
9754 # Color
9755 # .newBuilder()
9756 # .setRed(red / denominator)
9757 # .setGreen(green / denominator)
9758 # .setBlue(blue / denominator);
9759 # int alpha = color.getAlpha();
9760 # if (alpha != 255) {
9761 # result.setAlpha(
9762 # FloatValue
9763 # .newBuilder()
9764 # .setValue(((float) alpha) / denominator)
9765 # .build());
9766 # }
9767 # return resultBuilder.build();
9768 # }
9769 # // ...
9770 #
9771 # Example (iOS / Obj-C):
9772 #
9773 # // ...
9774 # static UIColor* fromProto(Color* protocolor) {
9775 # float red = [protocolor red];
9776 # float green = [protocolor green];
9777 # float blue = [protocolor blue];
9778 # FloatValue* alpha_wrapper = [protocolor alpha];
9779 # float alpha = 1.0;
9780 # if (alpha_wrapper != nil) {
9781 # alpha = [alpha_wrapper value];
9782 # }
9783 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9784 # }
9785 #
9786 # static Color* toProto(UIColor* color) {
9787 # CGFloat red, green, blue, alpha;
9788 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9789 # return nil;
9790 # }
9791 # Color* result = [Color alloc] init];
9792 # [result setRed:red];
9793 # [result setGreen:green];
9794 # [result setBlue:blue];
9795 # if (alpha <= 0.9999) {
9796 # [result setAlpha:floatWrapperWithValue(alpha)];
9797 # }
9798 # [result autorelease];
9799 # return result;
9800 # }
9801 # // ...
9802 #
9803 # Example (JavaScript):
9804 #
9805 # // ...
9806 #
9807 # var protoToCssColor = function(rgb_color) {
9808 # var redFrac = rgb_color.red || 0.0;
9809 # var greenFrac = rgb_color.green || 0.0;
9810 # var blueFrac = rgb_color.blue || 0.0;
9811 # var red = Math.floor(redFrac * 255);
9812 # var green = Math.floor(greenFrac * 255);
9813 # var blue = Math.floor(blueFrac * 255);
9814 #
9815 # if (!('alpha' in rgb_color)) {
9816 # return rgbToCssColor_(red, green, blue);
9817 # }
9818 #
9819 # var alphaFrac = rgb_color.alpha.value || 0.0;
9820 # var rgbParams = [red, green, blue].join(',');
9821 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9822 # };
9823 #
9824 # var rgbToCssColor_ = function(red, green, blue) {
9825 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9826 # var hexString = rgbNumber.toString(16);
9827 # var missingZeros = 6 - hexString.length;
9828 # var resultBuilder = ['#'];
9829 # for (var i = 0; i < missingZeros; i++) {
9830 # resultBuilder.push('0');
9831 # }
9832 # resultBuilder.push(hexString);
9833 # return resultBuilder.join('');
9834 # };
9835 #
9836 # // ...
9837 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9838 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9839 # the final pixel color is defined by the equation:
9840 #
9841 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9842 #
9843 # This means that a value of 1.0 corresponds to a solid color, whereas
9844 # a value of 0.0 corresponds to a completely transparent color. This
9845 # uses a wrapper message rather than a simple float scalar so that it is
9846 # possible to distinguish between a default value and the value being unset.
9847 # If omitted, this color object is to be rendered as a solid color
9848 # (as if the alpha value had been explicitly given with a value of 1.0).
9849 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9850 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9851 },
9852 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009853 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009854 "style": "A String", # The style of the border.
9855 },
9856 "bottom": { # A border along a cell. # The bottom border of the cell.
9857 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
9858 # for simplicity of conversion to/from color representations in various
9859 # languages over compactness; for example, the fields of this representation
9860 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9861 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9862 # method in iOS; and, with just a little work, it can be easily formatted into
9863 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9864 #
9865 # Example (Java):
9866 #
9867 # import com.google.type.Color;
9868 #
9869 # // ...
9870 # public static java.awt.Color fromProto(Color protocolor) {
9871 # float alpha = protocolor.hasAlpha()
9872 # ? protocolor.getAlpha().getValue()
9873 # : 1.0;
9874 #
9875 # return new java.awt.Color(
9876 # protocolor.getRed(),
9877 # protocolor.getGreen(),
9878 # protocolor.getBlue(),
9879 # alpha);
9880 # }
9881 #
9882 # public static Color toProto(java.awt.Color color) {
9883 # float red = (float) color.getRed();
9884 # float green = (float) color.getGreen();
9885 # float blue = (float) color.getBlue();
9886 # float denominator = 255.0;
9887 # Color.Builder resultBuilder =
9888 # Color
9889 # .newBuilder()
9890 # .setRed(red / denominator)
9891 # .setGreen(green / denominator)
9892 # .setBlue(blue / denominator);
9893 # int alpha = color.getAlpha();
9894 # if (alpha != 255) {
9895 # result.setAlpha(
9896 # FloatValue
9897 # .newBuilder()
9898 # .setValue(((float) alpha) / denominator)
9899 # .build());
9900 # }
9901 # return resultBuilder.build();
9902 # }
9903 # // ...
9904 #
9905 # Example (iOS / Obj-C):
9906 #
9907 # // ...
9908 # static UIColor* fromProto(Color* protocolor) {
9909 # float red = [protocolor red];
9910 # float green = [protocolor green];
9911 # float blue = [protocolor blue];
9912 # FloatValue* alpha_wrapper = [protocolor alpha];
9913 # float alpha = 1.0;
9914 # if (alpha_wrapper != nil) {
9915 # alpha = [alpha_wrapper value];
9916 # }
9917 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9918 # }
9919 #
9920 # static Color* toProto(UIColor* color) {
9921 # CGFloat red, green, blue, alpha;
9922 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9923 # return nil;
9924 # }
9925 # Color* result = [Color alloc] init];
9926 # [result setRed:red];
9927 # [result setGreen:green];
9928 # [result setBlue:blue];
9929 # if (alpha <= 0.9999) {
9930 # [result setAlpha:floatWrapperWithValue(alpha)];
9931 # }
9932 # [result autorelease];
9933 # return result;
9934 # }
9935 # // ...
9936 #
9937 # Example (JavaScript):
9938 #
9939 # // ...
9940 #
9941 # var protoToCssColor = function(rgb_color) {
9942 # var redFrac = rgb_color.red || 0.0;
9943 # var greenFrac = rgb_color.green || 0.0;
9944 # var blueFrac = rgb_color.blue || 0.0;
9945 # var red = Math.floor(redFrac * 255);
9946 # var green = Math.floor(greenFrac * 255);
9947 # var blue = Math.floor(blueFrac * 255);
9948 #
9949 # if (!('alpha' in rgb_color)) {
9950 # return rgbToCssColor_(red, green, blue);
9951 # }
9952 #
9953 # var alphaFrac = rgb_color.alpha.value || 0.0;
9954 # var rgbParams = [red, green, blue].join(',');
9955 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9956 # };
9957 #
9958 # var rgbToCssColor_ = function(red, green, blue) {
9959 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9960 # var hexString = rgbNumber.toString(16);
9961 # var missingZeros = 6 - hexString.length;
9962 # var resultBuilder = ['#'];
9963 # for (var i = 0; i < missingZeros; i++) {
9964 # resultBuilder.push('0');
9965 # }
9966 # resultBuilder.push(hexString);
9967 # return resultBuilder.join('');
9968 # };
9969 #
9970 # // ...
9971 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9972 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9973 # the final pixel color is defined by the equation:
9974 #
9975 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9976 #
9977 # This means that a value of 1.0 corresponds to a solid color, whereas
9978 # a value of 0.0 corresponds to a completely transparent color. This
9979 # uses a wrapper message rather than a simple float scalar so that it is
9980 # possible to distinguish between a default value and the value being unset.
9981 # If omitted, this color object is to be rendered as a solid color
9982 # (as if the alpha value had been explicitly given with a value of 1.0).
9983 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9984 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9985 },
9986 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009987 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009988 "style": "A String", # The style of the border.
9989 },
9990 "left": { # A border along a cell. # The left border of the cell.
9991 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
9992 # for simplicity of conversion to/from color representations in various
9993 # languages over compactness; for example, the fields of this representation
9994 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9995 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9996 # method in iOS; and, with just a little work, it can be easily formatted into
9997 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9998 #
9999 # Example (Java):
10000 #
10001 # import com.google.type.Color;
10002 #
10003 # // ...
10004 # public static java.awt.Color fromProto(Color protocolor) {
10005 # float alpha = protocolor.hasAlpha()
10006 # ? protocolor.getAlpha().getValue()
10007 # : 1.0;
10008 #
10009 # return new java.awt.Color(
10010 # protocolor.getRed(),
10011 # protocolor.getGreen(),
10012 # protocolor.getBlue(),
10013 # alpha);
10014 # }
10015 #
10016 # public static Color toProto(java.awt.Color color) {
10017 # float red = (float) color.getRed();
10018 # float green = (float) color.getGreen();
10019 # float blue = (float) color.getBlue();
10020 # float denominator = 255.0;
10021 # Color.Builder resultBuilder =
10022 # Color
10023 # .newBuilder()
10024 # .setRed(red / denominator)
10025 # .setGreen(green / denominator)
10026 # .setBlue(blue / denominator);
10027 # int alpha = color.getAlpha();
10028 # if (alpha != 255) {
10029 # result.setAlpha(
10030 # FloatValue
10031 # .newBuilder()
10032 # .setValue(((float) alpha) / denominator)
10033 # .build());
10034 # }
10035 # return resultBuilder.build();
10036 # }
10037 # // ...
10038 #
10039 # Example (iOS / Obj-C):
10040 #
10041 # // ...
10042 # static UIColor* fromProto(Color* protocolor) {
10043 # float red = [protocolor red];
10044 # float green = [protocolor green];
10045 # float blue = [protocolor blue];
10046 # FloatValue* alpha_wrapper = [protocolor alpha];
10047 # float alpha = 1.0;
10048 # if (alpha_wrapper != nil) {
10049 # alpha = [alpha_wrapper value];
10050 # }
10051 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10052 # }
10053 #
10054 # static Color* toProto(UIColor* color) {
10055 # CGFloat red, green, blue, alpha;
10056 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10057 # return nil;
10058 # }
10059 # Color* result = [Color alloc] init];
10060 # [result setRed:red];
10061 # [result setGreen:green];
10062 # [result setBlue:blue];
10063 # if (alpha <= 0.9999) {
10064 # [result setAlpha:floatWrapperWithValue(alpha)];
10065 # }
10066 # [result autorelease];
10067 # return result;
10068 # }
10069 # // ...
10070 #
10071 # Example (JavaScript):
10072 #
10073 # // ...
10074 #
10075 # var protoToCssColor = function(rgb_color) {
10076 # var redFrac = rgb_color.red || 0.0;
10077 # var greenFrac = rgb_color.green || 0.0;
10078 # var blueFrac = rgb_color.blue || 0.0;
10079 # var red = Math.floor(redFrac * 255);
10080 # var green = Math.floor(greenFrac * 255);
10081 # var blue = Math.floor(blueFrac * 255);
10082 #
10083 # if (!('alpha' in rgb_color)) {
10084 # return rgbToCssColor_(red, green, blue);
10085 # }
10086 #
10087 # var alphaFrac = rgb_color.alpha.value || 0.0;
10088 # var rgbParams = [red, green, blue].join(',');
10089 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10090 # };
10091 #
10092 # var rgbToCssColor_ = function(red, green, blue) {
10093 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10094 # var hexString = rgbNumber.toString(16);
10095 # var missingZeros = 6 - hexString.length;
10096 # var resultBuilder = ['#'];
10097 # for (var i = 0; i < missingZeros; i++) {
10098 # resultBuilder.push('0');
10099 # }
10100 # resultBuilder.push(hexString);
10101 # return resultBuilder.join('');
10102 # };
10103 #
10104 # // ...
10105 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10106 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10107 # the final pixel color is defined by the equation:
10108 #
10109 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10110 #
10111 # This means that a value of 1.0 corresponds to a solid color, whereas
10112 # a value of 0.0 corresponds to a completely transparent color. This
10113 # uses a wrapper message rather than a simple float scalar so that it is
10114 # possible to distinguish between a default value and the value being unset.
10115 # If omitted, this color object is to be rendered as a solid color
10116 # (as if the alpha value had been explicitly given with a value of 1.0).
10117 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10118 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10119 },
10120 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010121 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010122 "style": "A String", # The style of the border.
10123 },
10124 },
10125 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
10126 },
10127 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
10128 #
10129 # When writing, the new format will be merged with the existing format.
10130 "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 -070010131 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
10132 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070010133 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
10134 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010135 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010136 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010137 },
10138 "textDirection": "A String", # The direction of the text in the cell.
10139 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
10140 # When updating padding, every field must be specified.
10141 "top": 42, # The top padding of the cell.
10142 "right": 42, # The right padding of the cell.
10143 "bottom": 42, # The bottom padding of the cell.
10144 "left": 42, # The left padding of the cell.
10145 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010146 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010147 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
10148 # for simplicity of conversion to/from color representations in various
10149 # languages over compactness; for example, the fields of this representation
10150 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10151 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10152 # method in iOS; and, with just a little work, it can be easily formatted into
10153 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10154 #
10155 # Example (Java):
10156 #
10157 # import com.google.type.Color;
10158 #
10159 # // ...
10160 # public static java.awt.Color fromProto(Color protocolor) {
10161 # float alpha = protocolor.hasAlpha()
10162 # ? protocolor.getAlpha().getValue()
10163 # : 1.0;
10164 #
10165 # return new java.awt.Color(
10166 # protocolor.getRed(),
10167 # protocolor.getGreen(),
10168 # protocolor.getBlue(),
10169 # alpha);
10170 # }
10171 #
10172 # public static Color toProto(java.awt.Color color) {
10173 # float red = (float) color.getRed();
10174 # float green = (float) color.getGreen();
10175 # float blue = (float) color.getBlue();
10176 # float denominator = 255.0;
10177 # Color.Builder resultBuilder =
10178 # Color
10179 # .newBuilder()
10180 # .setRed(red / denominator)
10181 # .setGreen(green / denominator)
10182 # .setBlue(blue / denominator);
10183 # int alpha = color.getAlpha();
10184 # if (alpha != 255) {
10185 # result.setAlpha(
10186 # FloatValue
10187 # .newBuilder()
10188 # .setValue(((float) alpha) / denominator)
10189 # .build());
10190 # }
10191 # return resultBuilder.build();
10192 # }
10193 # // ...
10194 #
10195 # Example (iOS / Obj-C):
10196 #
10197 # // ...
10198 # static UIColor* fromProto(Color* protocolor) {
10199 # float red = [protocolor red];
10200 # float green = [protocolor green];
10201 # float blue = [protocolor blue];
10202 # FloatValue* alpha_wrapper = [protocolor alpha];
10203 # float alpha = 1.0;
10204 # if (alpha_wrapper != nil) {
10205 # alpha = [alpha_wrapper value];
10206 # }
10207 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10208 # }
10209 #
10210 # static Color* toProto(UIColor* color) {
10211 # CGFloat red, green, blue, alpha;
10212 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10213 # return nil;
10214 # }
10215 # Color* result = [Color alloc] init];
10216 # [result setRed:red];
10217 # [result setGreen:green];
10218 # [result setBlue:blue];
10219 # if (alpha <= 0.9999) {
10220 # [result setAlpha:floatWrapperWithValue(alpha)];
10221 # }
10222 # [result autorelease];
10223 # return result;
10224 # }
10225 # // ...
10226 #
10227 # Example (JavaScript):
10228 #
10229 # // ...
10230 #
10231 # var protoToCssColor = function(rgb_color) {
10232 # var redFrac = rgb_color.red || 0.0;
10233 # var greenFrac = rgb_color.green || 0.0;
10234 # var blueFrac = rgb_color.blue || 0.0;
10235 # var red = Math.floor(redFrac * 255);
10236 # var green = Math.floor(greenFrac * 255);
10237 # var blue = Math.floor(blueFrac * 255);
10238 #
10239 # if (!('alpha' in rgb_color)) {
10240 # return rgbToCssColor_(red, green, blue);
10241 # }
10242 #
10243 # var alphaFrac = rgb_color.alpha.value || 0.0;
10244 # var rgbParams = [red, green, blue].join(',');
10245 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10246 # };
10247 #
10248 # var rgbToCssColor_ = function(red, green, blue) {
10249 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10250 # var hexString = rgbNumber.toString(16);
10251 # var missingZeros = 6 - hexString.length;
10252 # var resultBuilder = ['#'];
10253 # for (var i = 0; i < missingZeros; i++) {
10254 # resultBuilder.push('0');
10255 # }
10256 # resultBuilder.push(hexString);
10257 # return resultBuilder.join('');
10258 # };
10259 #
10260 # // ...
10261 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10262 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10263 # the final pixel color is defined by the equation:
10264 #
10265 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10266 #
10267 # This means that a value of 1.0 corresponds to a solid color, whereas
10268 # a value of 0.0 corresponds to a completely transparent color. This
10269 # uses a wrapper message rather than a simple float scalar so that it is
10270 # possible to distinguish between a default value and the value being unset.
10271 # If omitted, this color object is to be rendered as a solid color
10272 # (as if the alpha value had been explicitly given with a value of 1.0).
10273 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10274 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10275 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010276 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010277 "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).
10278 # Absent values indicate that the field isn't specified.
10279 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
10280 # for simplicity of conversion to/from color representations in various
10281 # languages over compactness; for example, the fields of this representation
10282 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10283 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10284 # method in iOS; and, with just a little work, it can be easily formatted into
10285 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10286 #
10287 # Example (Java):
10288 #
10289 # import com.google.type.Color;
10290 #
10291 # // ...
10292 # public static java.awt.Color fromProto(Color protocolor) {
10293 # float alpha = protocolor.hasAlpha()
10294 # ? protocolor.getAlpha().getValue()
10295 # : 1.0;
10296 #
10297 # return new java.awt.Color(
10298 # protocolor.getRed(),
10299 # protocolor.getGreen(),
10300 # protocolor.getBlue(),
10301 # alpha);
10302 # }
10303 #
10304 # public static Color toProto(java.awt.Color color) {
10305 # float red = (float) color.getRed();
10306 # float green = (float) color.getGreen();
10307 # float blue = (float) color.getBlue();
10308 # float denominator = 255.0;
10309 # Color.Builder resultBuilder =
10310 # Color
10311 # .newBuilder()
10312 # .setRed(red / denominator)
10313 # .setGreen(green / denominator)
10314 # .setBlue(blue / denominator);
10315 # int alpha = color.getAlpha();
10316 # if (alpha != 255) {
10317 # result.setAlpha(
10318 # FloatValue
10319 # .newBuilder()
10320 # .setValue(((float) alpha) / denominator)
10321 # .build());
10322 # }
10323 # return resultBuilder.build();
10324 # }
10325 # // ...
10326 #
10327 # Example (iOS / Obj-C):
10328 #
10329 # // ...
10330 # static UIColor* fromProto(Color* protocolor) {
10331 # float red = [protocolor red];
10332 # float green = [protocolor green];
10333 # float blue = [protocolor blue];
10334 # FloatValue* alpha_wrapper = [protocolor alpha];
10335 # float alpha = 1.0;
10336 # if (alpha_wrapper != nil) {
10337 # alpha = [alpha_wrapper value];
10338 # }
10339 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10340 # }
10341 #
10342 # static Color* toProto(UIColor* color) {
10343 # CGFloat red, green, blue, alpha;
10344 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10345 # return nil;
10346 # }
10347 # Color* result = [Color alloc] init];
10348 # [result setRed:red];
10349 # [result setGreen:green];
10350 # [result setBlue:blue];
10351 # if (alpha <= 0.9999) {
10352 # [result setAlpha:floatWrapperWithValue(alpha)];
10353 # }
10354 # [result autorelease];
10355 # return result;
10356 # }
10357 # // ...
10358 #
10359 # Example (JavaScript):
10360 #
10361 # // ...
10362 #
10363 # var protoToCssColor = function(rgb_color) {
10364 # var redFrac = rgb_color.red || 0.0;
10365 # var greenFrac = rgb_color.green || 0.0;
10366 # var blueFrac = rgb_color.blue || 0.0;
10367 # var red = Math.floor(redFrac * 255);
10368 # var green = Math.floor(greenFrac * 255);
10369 # var blue = Math.floor(blueFrac * 255);
10370 #
10371 # if (!('alpha' in rgb_color)) {
10372 # return rgbToCssColor_(red, green, blue);
10373 # }
10374 #
10375 # var alphaFrac = rgb_color.alpha.value || 0.0;
10376 # var rgbParams = [red, green, blue].join(',');
10377 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10378 # };
10379 #
10380 # var rgbToCssColor_ = function(red, green, blue) {
10381 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10382 # var hexString = rgbNumber.toString(16);
10383 # var missingZeros = 6 - hexString.length;
10384 # var resultBuilder = ['#'];
10385 # for (var i = 0; i < missingZeros; i++) {
10386 # resultBuilder.push('0');
10387 # }
10388 # resultBuilder.push(hexString);
10389 # return resultBuilder.join('');
10390 # };
10391 #
10392 # // ...
10393 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10394 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10395 # the final pixel color is defined by the equation:
10396 #
10397 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10398 #
10399 # This means that a value of 1.0 corresponds to a solid color, whereas
10400 # a value of 0.0 corresponds to a completely transparent color. This
10401 # uses a wrapper message rather than a simple float scalar so that it is
10402 # possible to distinguish between a default value and the value being unset.
10403 # If omitted, this color object is to be rendered as a solid color
10404 # (as if the alpha value had been explicitly given with a value of 1.0).
10405 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10406 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10407 },
10408 "bold": True or False, # True if the text is bold.
10409 "strikethrough": True or False, # True if the text has a strikethrough.
10410 "fontFamily": "A String", # The font family.
10411 "fontSize": 42, # The size of the font.
10412 "italic": True or False, # True if the text is italicized.
10413 "underline": True or False, # True if the text is underlined.
10414 },
10415 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
10416 "borders": { # The borders of the cell. # The borders of the cell.
10417 "top": { # A border along a cell. # The top border of the cell.
10418 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10419 # for simplicity of conversion to/from color representations in various
10420 # languages over compactness; for example, the fields of this representation
10421 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10422 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10423 # method in iOS; and, with just a little work, it can be easily formatted into
10424 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10425 #
10426 # Example (Java):
10427 #
10428 # import com.google.type.Color;
10429 #
10430 # // ...
10431 # public static java.awt.Color fromProto(Color protocolor) {
10432 # float alpha = protocolor.hasAlpha()
10433 # ? protocolor.getAlpha().getValue()
10434 # : 1.0;
10435 #
10436 # return new java.awt.Color(
10437 # protocolor.getRed(),
10438 # protocolor.getGreen(),
10439 # protocolor.getBlue(),
10440 # alpha);
10441 # }
10442 #
10443 # public static Color toProto(java.awt.Color color) {
10444 # float red = (float) color.getRed();
10445 # float green = (float) color.getGreen();
10446 # float blue = (float) color.getBlue();
10447 # float denominator = 255.0;
10448 # Color.Builder resultBuilder =
10449 # Color
10450 # .newBuilder()
10451 # .setRed(red / denominator)
10452 # .setGreen(green / denominator)
10453 # .setBlue(blue / denominator);
10454 # int alpha = color.getAlpha();
10455 # if (alpha != 255) {
10456 # result.setAlpha(
10457 # FloatValue
10458 # .newBuilder()
10459 # .setValue(((float) alpha) / denominator)
10460 # .build());
10461 # }
10462 # return resultBuilder.build();
10463 # }
10464 # // ...
10465 #
10466 # Example (iOS / Obj-C):
10467 #
10468 # // ...
10469 # static UIColor* fromProto(Color* protocolor) {
10470 # float red = [protocolor red];
10471 # float green = [protocolor green];
10472 # float blue = [protocolor blue];
10473 # FloatValue* alpha_wrapper = [protocolor alpha];
10474 # float alpha = 1.0;
10475 # if (alpha_wrapper != nil) {
10476 # alpha = [alpha_wrapper value];
10477 # }
10478 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10479 # }
10480 #
10481 # static Color* toProto(UIColor* color) {
10482 # CGFloat red, green, blue, alpha;
10483 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10484 # return nil;
10485 # }
10486 # Color* result = [Color alloc] init];
10487 # [result setRed:red];
10488 # [result setGreen:green];
10489 # [result setBlue:blue];
10490 # if (alpha <= 0.9999) {
10491 # [result setAlpha:floatWrapperWithValue(alpha)];
10492 # }
10493 # [result autorelease];
10494 # return result;
10495 # }
10496 # // ...
10497 #
10498 # Example (JavaScript):
10499 #
10500 # // ...
10501 #
10502 # var protoToCssColor = function(rgb_color) {
10503 # var redFrac = rgb_color.red || 0.0;
10504 # var greenFrac = rgb_color.green || 0.0;
10505 # var blueFrac = rgb_color.blue || 0.0;
10506 # var red = Math.floor(redFrac * 255);
10507 # var green = Math.floor(greenFrac * 255);
10508 # var blue = Math.floor(blueFrac * 255);
10509 #
10510 # if (!('alpha' in rgb_color)) {
10511 # return rgbToCssColor_(red, green, blue);
10512 # }
10513 #
10514 # var alphaFrac = rgb_color.alpha.value || 0.0;
10515 # var rgbParams = [red, green, blue].join(',');
10516 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10517 # };
10518 #
10519 # var rgbToCssColor_ = function(red, green, blue) {
10520 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10521 # var hexString = rgbNumber.toString(16);
10522 # var missingZeros = 6 - hexString.length;
10523 # var resultBuilder = ['#'];
10524 # for (var i = 0; i < missingZeros; i++) {
10525 # resultBuilder.push('0');
10526 # }
10527 # resultBuilder.push(hexString);
10528 # return resultBuilder.join('');
10529 # };
10530 #
10531 # // ...
10532 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10533 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10534 # the final pixel color is defined by the equation:
10535 #
10536 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10537 #
10538 # This means that a value of 1.0 corresponds to a solid color, whereas
10539 # a value of 0.0 corresponds to a completely transparent color. This
10540 # uses a wrapper message rather than a simple float scalar so that it is
10541 # possible to distinguish between a default value and the value being unset.
10542 # If omitted, this color object is to be rendered as a solid color
10543 # (as if the alpha value had been explicitly given with a value of 1.0).
10544 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10545 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10546 },
10547 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010548 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010549 "style": "A String", # The style of the border.
10550 },
10551 "right": { # A border along a cell. # The right border of the cell.
10552 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10553 # for simplicity of conversion to/from color representations in various
10554 # languages over compactness; for example, the fields of this representation
10555 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10556 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10557 # method in iOS; and, with just a little work, it can be easily formatted into
10558 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10559 #
10560 # Example (Java):
10561 #
10562 # import com.google.type.Color;
10563 #
10564 # // ...
10565 # public static java.awt.Color fromProto(Color protocolor) {
10566 # float alpha = protocolor.hasAlpha()
10567 # ? protocolor.getAlpha().getValue()
10568 # : 1.0;
10569 #
10570 # return new java.awt.Color(
10571 # protocolor.getRed(),
10572 # protocolor.getGreen(),
10573 # protocolor.getBlue(),
10574 # alpha);
10575 # }
10576 #
10577 # public static Color toProto(java.awt.Color color) {
10578 # float red = (float) color.getRed();
10579 # float green = (float) color.getGreen();
10580 # float blue = (float) color.getBlue();
10581 # float denominator = 255.0;
10582 # Color.Builder resultBuilder =
10583 # Color
10584 # .newBuilder()
10585 # .setRed(red / denominator)
10586 # .setGreen(green / denominator)
10587 # .setBlue(blue / denominator);
10588 # int alpha = color.getAlpha();
10589 # if (alpha != 255) {
10590 # result.setAlpha(
10591 # FloatValue
10592 # .newBuilder()
10593 # .setValue(((float) alpha) / denominator)
10594 # .build());
10595 # }
10596 # return resultBuilder.build();
10597 # }
10598 # // ...
10599 #
10600 # Example (iOS / Obj-C):
10601 #
10602 # // ...
10603 # static UIColor* fromProto(Color* protocolor) {
10604 # float red = [protocolor red];
10605 # float green = [protocolor green];
10606 # float blue = [protocolor blue];
10607 # FloatValue* alpha_wrapper = [protocolor alpha];
10608 # float alpha = 1.0;
10609 # if (alpha_wrapper != nil) {
10610 # alpha = [alpha_wrapper value];
10611 # }
10612 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10613 # }
10614 #
10615 # static Color* toProto(UIColor* color) {
10616 # CGFloat red, green, blue, alpha;
10617 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10618 # return nil;
10619 # }
10620 # Color* result = [Color alloc] init];
10621 # [result setRed:red];
10622 # [result setGreen:green];
10623 # [result setBlue:blue];
10624 # if (alpha <= 0.9999) {
10625 # [result setAlpha:floatWrapperWithValue(alpha)];
10626 # }
10627 # [result autorelease];
10628 # return result;
10629 # }
10630 # // ...
10631 #
10632 # Example (JavaScript):
10633 #
10634 # // ...
10635 #
10636 # var protoToCssColor = function(rgb_color) {
10637 # var redFrac = rgb_color.red || 0.0;
10638 # var greenFrac = rgb_color.green || 0.0;
10639 # var blueFrac = rgb_color.blue || 0.0;
10640 # var red = Math.floor(redFrac * 255);
10641 # var green = Math.floor(greenFrac * 255);
10642 # var blue = Math.floor(blueFrac * 255);
10643 #
10644 # if (!('alpha' in rgb_color)) {
10645 # return rgbToCssColor_(red, green, blue);
10646 # }
10647 #
10648 # var alphaFrac = rgb_color.alpha.value || 0.0;
10649 # var rgbParams = [red, green, blue].join(',');
10650 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10651 # };
10652 #
10653 # var rgbToCssColor_ = function(red, green, blue) {
10654 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10655 # var hexString = rgbNumber.toString(16);
10656 # var missingZeros = 6 - hexString.length;
10657 # var resultBuilder = ['#'];
10658 # for (var i = 0; i < missingZeros; i++) {
10659 # resultBuilder.push('0');
10660 # }
10661 # resultBuilder.push(hexString);
10662 # return resultBuilder.join('');
10663 # };
10664 #
10665 # // ...
10666 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10667 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10668 # the final pixel color is defined by the equation:
10669 #
10670 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10671 #
10672 # This means that a value of 1.0 corresponds to a solid color, whereas
10673 # a value of 0.0 corresponds to a completely transparent color. This
10674 # uses a wrapper message rather than a simple float scalar so that it is
10675 # possible to distinguish between a default value and the value being unset.
10676 # If omitted, this color object is to be rendered as a solid color
10677 # (as if the alpha value had been explicitly given with a value of 1.0).
10678 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10679 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10680 },
10681 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010682 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010683 "style": "A String", # The style of the border.
10684 },
10685 "bottom": { # A border along a cell. # The bottom border of the cell.
10686 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10687 # for simplicity of conversion to/from color representations in various
10688 # languages over compactness; for example, the fields of this representation
10689 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10690 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10691 # method in iOS; and, with just a little work, it can be easily formatted into
10692 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10693 #
10694 # Example (Java):
10695 #
10696 # import com.google.type.Color;
10697 #
10698 # // ...
10699 # public static java.awt.Color fromProto(Color protocolor) {
10700 # float alpha = protocolor.hasAlpha()
10701 # ? protocolor.getAlpha().getValue()
10702 # : 1.0;
10703 #
10704 # return new java.awt.Color(
10705 # protocolor.getRed(),
10706 # protocolor.getGreen(),
10707 # protocolor.getBlue(),
10708 # alpha);
10709 # }
10710 #
10711 # public static Color toProto(java.awt.Color color) {
10712 # float red = (float) color.getRed();
10713 # float green = (float) color.getGreen();
10714 # float blue = (float) color.getBlue();
10715 # float denominator = 255.0;
10716 # Color.Builder resultBuilder =
10717 # Color
10718 # .newBuilder()
10719 # .setRed(red / denominator)
10720 # .setGreen(green / denominator)
10721 # .setBlue(blue / denominator);
10722 # int alpha = color.getAlpha();
10723 # if (alpha != 255) {
10724 # result.setAlpha(
10725 # FloatValue
10726 # .newBuilder()
10727 # .setValue(((float) alpha) / denominator)
10728 # .build());
10729 # }
10730 # return resultBuilder.build();
10731 # }
10732 # // ...
10733 #
10734 # Example (iOS / Obj-C):
10735 #
10736 # // ...
10737 # static UIColor* fromProto(Color* protocolor) {
10738 # float red = [protocolor red];
10739 # float green = [protocolor green];
10740 # float blue = [protocolor blue];
10741 # FloatValue* alpha_wrapper = [protocolor alpha];
10742 # float alpha = 1.0;
10743 # if (alpha_wrapper != nil) {
10744 # alpha = [alpha_wrapper value];
10745 # }
10746 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10747 # }
10748 #
10749 # static Color* toProto(UIColor* color) {
10750 # CGFloat red, green, blue, alpha;
10751 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10752 # return nil;
10753 # }
10754 # Color* result = [Color alloc] init];
10755 # [result setRed:red];
10756 # [result setGreen:green];
10757 # [result setBlue:blue];
10758 # if (alpha <= 0.9999) {
10759 # [result setAlpha:floatWrapperWithValue(alpha)];
10760 # }
10761 # [result autorelease];
10762 # return result;
10763 # }
10764 # // ...
10765 #
10766 # Example (JavaScript):
10767 #
10768 # // ...
10769 #
10770 # var protoToCssColor = function(rgb_color) {
10771 # var redFrac = rgb_color.red || 0.0;
10772 # var greenFrac = rgb_color.green || 0.0;
10773 # var blueFrac = rgb_color.blue || 0.0;
10774 # var red = Math.floor(redFrac * 255);
10775 # var green = Math.floor(greenFrac * 255);
10776 # var blue = Math.floor(blueFrac * 255);
10777 #
10778 # if (!('alpha' in rgb_color)) {
10779 # return rgbToCssColor_(red, green, blue);
10780 # }
10781 #
10782 # var alphaFrac = rgb_color.alpha.value || 0.0;
10783 # var rgbParams = [red, green, blue].join(',');
10784 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10785 # };
10786 #
10787 # var rgbToCssColor_ = function(red, green, blue) {
10788 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10789 # var hexString = rgbNumber.toString(16);
10790 # var missingZeros = 6 - hexString.length;
10791 # var resultBuilder = ['#'];
10792 # for (var i = 0; i < missingZeros; i++) {
10793 # resultBuilder.push('0');
10794 # }
10795 # resultBuilder.push(hexString);
10796 # return resultBuilder.join('');
10797 # };
10798 #
10799 # // ...
10800 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10801 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10802 # the final pixel color is defined by the equation:
10803 #
10804 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10805 #
10806 # This means that a value of 1.0 corresponds to a solid color, whereas
10807 # a value of 0.0 corresponds to a completely transparent color. This
10808 # uses a wrapper message rather than a simple float scalar so that it is
10809 # possible to distinguish between a default value and the value being unset.
10810 # If omitted, this color object is to be rendered as a solid color
10811 # (as if the alpha value had been explicitly given with a value of 1.0).
10812 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10813 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10814 },
10815 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010816 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010817 "style": "A String", # The style of the border.
10818 },
10819 "left": { # A border along a cell. # The left border of the cell.
10820 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10821 # for simplicity of conversion to/from color representations in various
10822 # languages over compactness; for example, the fields of this representation
10823 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10824 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10825 # method in iOS; and, with just a little work, it can be easily formatted into
10826 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10827 #
10828 # Example (Java):
10829 #
10830 # import com.google.type.Color;
10831 #
10832 # // ...
10833 # public static java.awt.Color fromProto(Color protocolor) {
10834 # float alpha = protocolor.hasAlpha()
10835 # ? protocolor.getAlpha().getValue()
10836 # : 1.0;
10837 #
10838 # return new java.awt.Color(
10839 # protocolor.getRed(),
10840 # protocolor.getGreen(),
10841 # protocolor.getBlue(),
10842 # alpha);
10843 # }
10844 #
10845 # public static Color toProto(java.awt.Color color) {
10846 # float red = (float) color.getRed();
10847 # float green = (float) color.getGreen();
10848 # float blue = (float) color.getBlue();
10849 # float denominator = 255.0;
10850 # Color.Builder resultBuilder =
10851 # Color
10852 # .newBuilder()
10853 # .setRed(red / denominator)
10854 # .setGreen(green / denominator)
10855 # .setBlue(blue / denominator);
10856 # int alpha = color.getAlpha();
10857 # if (alpha != 255) {
10858 # result.setAlpha(
10859 # FloatValue
10860 # .newBuilder()
10861 # .setValue(((float) alpha) / denominator)
10862 # .build());
10863 # }
10864 # return resultBuilder.build();
10865 # }
10866 # // ...
10867 #
10868 # Example (iOS / Obj-C):
10869 #
10870 # // ...
10871 # static UIColor* fromProto(Color* protocolor) {
10872 # float red = [protocolor red];
10873 # float green = [protocolor green];
10874 # float blue = [protocolor blue];
10875 # FloatValue* alpha_wrapper = [protocolor alpha];
10876 # float alpha = 1.0;
10877 # if (alpha_wrapper != nil) {
10878 # alpha = [alpha_wrapper value];
10879 # }
10880 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10881 # }
10882 #
10883 # static Color* toProto(UIColor* color) {
10884 # CGFloat red, green, blue, alpha;
10885 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10886 # return nil;
10887 # }
10888 # Color* result = [Color alloc] init];
10889 # [result setRed:red];
10890 # [result setGreen:green];
10891 # [result setBlue:blue];
10892 # if (alpha <= 0.9999) {
10893 # [result setAlpha:floatWrapperWithValue(alpha)];
10894 # }
10895 # [result autorelease];
10896 # return result;
10897 # }
10898 # // ...
10899 #
10900 # Example (JavaScript):
10901 #
10902 # // ...
10903 #
10904 # var protoToCssColor = function(rgb_color) {
10905 # var redFrac = rgb_color.red || 0.0;
10906 # var greenFrac = rgb_color.green || 0.0;
10907 # var blueFrac = rgb_color.blue || 0.0;
10908 # var red = Math.floor(redFrac * 255);
10909 # var green = Math.floor(greenFrac * 255);
10910 # var blue = Math.floor(blueFrac * 255);
10911 #
10912 # if (!('alpha' in rgb_color)) {
10913 # return rgbToCssColor_(red, green, blue);
10914 # }
10915 #
10916 # var alphaFrac = rgb_color.alpha.value || 0.0;
10917 # var rgbParams = [red, green, blue].join(',');
10918 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10919 # };
10920 #
10921 # var rgbToCssColor_ = function(red, green, blue) {
10922 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10923 # var hexString = rgbNumber.toString(16);
10924 # var missingZeros = 6 - hexString.length;
10925 # var resultBuilder = ['#'];
10926 # for (var i = 0; i < missingZeros; i++) {
10927 # resultBuilder.push('0');
10928 # }
10929 # resultBuilder.push(hexString);
10930 # return resultBuilder.join('');
10931 # };
10932 #
10933 # // ...
10934 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10935 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10936 # the final pixel color is defined by the equation:
10937 #
10938 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10939 #
10940 # This means that a value of 1.0 corresponds to a solid color, whereas
10941 # a value of 0.0 corresponds to a completely transparent color. This
10942 # uses a wrapper message rather than a simple float scalar so that it is
10943 # possible to distinguish between a default value and the value being unset.
10944 # If omitted, this color object is to be rendered as a solid color
10945 # (as if the alpha value had been explicitly given with a value of 1.0).
10946 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10947 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10948 },
10949 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010950 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010951 "style": "A String", # The style of the border.
10952 },
10953 },
10954 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
10955 },
10956 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
10957 #
10958 # When writing, the new data validation rule will overwrite any prior rule.
10959 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
10960 # If true, "List" conditions will show a dropdown.
10961 "strict": True or False, # True if invalid data should be rejected.
10962 "inputMessage": "A String", # A message to show the user when adding data to the cell.
10963 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
10964 # BooleanConditions are used by conditional formatting,
10965 # data validation, and the criteria in filters.
10966 "type": "A String", # The type of condition.
10967 "values": [ # The values of the condition. The number of supported values depends
10968 # on the condition type. Some support zero values,
10969 # others one or two values,
10970 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
10971 { # The value of the condition.
10972 "relativeDate": "A String", # A relative date (based on the current date).
10973 # Valid only if the type is
10974 # DATE_BEFORE,
10975 # DATE_AFTER,
10976 # DATE_ON_OR_BEFORE or
10977 # DATE_ON_OR_AFTER.
10978 #
10979 # Relative dates are not supported in data validation.
10980 # They are supported only in conditional formatting and
10981 # conditional filters.
10982 "userEnteredValue": "A String", # A value the condition is based on.
10983 # The value will be parsed as if the user typed into a cell.
10984 # Formulas are supported (and must begin with an `=`).
10985 },
10986 ],
10987 },
10988 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010989 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
10990 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010991 # Runs start at specific indexes in the text and continue until the next
10992 # run. Properties of a run will continue unless explicitly changed
10993 # in a subsequent run (and properties of the first run will continue
10994 # the properties of the cell unless explicitly changed).
10995 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010996 # When writing, the new runs will overwrite any prior runs. When writing a
10997 # new user_entered_value, previous runs will be erased.
10998 { # A run of a text format. The format of this run continues until the start
10999 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011000 # When updating, all fields must be set.
11001 "startIndex": 42, # The character index where this run starts.
11002 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
11003 # Absent values indicate that the field isn't specified.
11004 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
11005 # for simplicity of conversion to/from color representations in various
11006 # languages over compactness; for example, the fields of this representation
11007 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11008 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11009 # method in iOS; and, with just a little work, it can be easily formatted into
11010 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11011 #
11012 # Example (Java):
11013 #
11014 # import com.google.type.Color;
11015 #
11016 # // ...
11017 # public static java.awt.Color fromProto(Color protocolor) {
11018 # float alpha = protocolor.hasAlpha()
11019 # ? protocolor.getAlpha().getValue()
11020 # : 1.0;
11021 #
11022 # return new java.awt.Color(
11023 # protocolor.getRed(),
11024 # protocolor.getGreen(),
11025 # protocolor.getBlue(),
11026 # alpha);
11027 # }
11028 #
11029 # public static Color toProto(java.awt.Color color) {
11030 # float red = (float) color.getRed();
11031 # float green = (float) color.getGreen();
11032 # float blue = (float) color.getBlue();
11033 # float denominator = 255.0;
11034 # Color.Builder resultBuilder =
11035 # Color
11036 # .newBuilder()
11037 # .setRed(red / denominator)
11038 # .setGreen(green / denominator)
11039 # .setBlue(blue / denominator);
11040 # int alpha = color.getAlpha();
11041 # if (alpha != 255) {
11042 # result.setAlpha(
11043 # FloatValue
11044 # .newBuilder()
11045 # .setValue(((float) alpha) / denominator)
11046 # .build());
11047 # }
11048 # return resultBuilder.build();
11049 # }
11050 # // ...
11051 #
11052 # Example (iOS / Obj-C):
11053 #
11054 # // ...
11055 # static UIColor* fromProto(Color* protocolor) {
11056 # float red = [protocolor red];
11057 # float green = [protocolor green];
11058 # float blue = [protocolor blue];
11059 # FloatValue* alpha_wrapper = [protocolor alpha];
11060 # float alpha = 1.0;
11061 # if (alpha_wrapper != nil) {
11062 # alpha = [alpha_wrapper value];
11063 # }
11064 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11065 # }
11066 #
11067 # static Color* toProto(UIColor* color) {
11068 # CGFloat red, green, blue, alpha;
11069 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11070 # return nil;
11071 # }
11072 # Color* result = [Color alloc] init];
11073 # [result setRed:red];
11074 # [result setGreen:green];
11075 # [result setBlue:blue];
11076 # if (alpha <= 0.9999) {
11077 # [result setAlpha:floatWrapperWithValue(alpha)];
11078 # }
11079 # [result autorelease];
11080 # return result;
11081 # }
11082 # // ...
11083 #
11084 # Example (JavaScript):
11085 #
11086 # // ...
11087 #
11088 # var protoToCssColor = function(rgb_color) {
11089 # var redFrac = rgb_color.red || 0.0;
11090 # var greenFrac = rgb_color.green || 0.0;
11091 # var blueFrac = rgb_color.blue || 0.0;
11092 # var red = Math.floor(redFrac * 255);
11093 # var green = Math.floor(greenFrac * 255);
11094 # var blue = Math.floor(blueFrac * 255);
11095 #
11096 # if (!('alpha' in rgb_color)) {
11097 # return rgbToCssColor_(red, green, blue);
11098 # }
11099 #
11100 # var alphaFrac = rgb_color.alpha.value || 0.0;
11101 # var rgbParams = [red, green, blue].join(',');
11102 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11103 # };
11104 #
11105 # var rgbToCssColor_ = function(red, green, blue) {
11106 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11107 # var hexString = rgbNumber.toString(16);
11108 # var missingZeros = 6 - hexString.length;
11109 # var resultBuilder = ['#'];
11110 # for (var i = 0; i < missingZeros; i++) {
11111 # resultBuilder.push('0');
11112 # }
11113 # resultBuilder.push(hexString);
11114 # return resultBuilder.join('');
11115 # };
11116 #
11117 # // ...
11118 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11119 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11120 # the final pixel color is defined by the equation:
11121 #
11122 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11123 #
11124 # This means that a value of 1.0 corresponds to a solid color, whereas
11125 # a value of 0.0 corresponds to a completely transparent color. This
11126 # uses a wrapper message rather than a simple float scalar so that it is
11127 # possible to distinguish between a default value and the value being unset.
11128 # If omitted, this color object is to be rendered as a solid color
11129 # (as if the alpha value had been explicitly given with a value of 1.0).
11130 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11131 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11132 },
11133 "bold": True or False, # True if the text is bold.
11134 "strikethrough": True or False, # True if the text has a strikethrough.
11135 "fontFamily": "A String", # The font family.
11136 "fontSize": 42, # The size of the font.
11137 "italic": True or False, # True if the text is italicized.
11138 "underline": True or False, # True if the text is underlined.
11139 },
11140 },
11141 ],
11142 },
11143 ],
11144 },
11145 ],
11146 "start": { # A coordinate in a sheet. # The coordinate to start writing data at.
11147 # Any number of rows and columns (including a different number of
11148 # columns per row) may be written.
11149 # All indexes are zero-based.
11150 "rowIndex": 42, # The row index of the coordinate.
11151 "columnIndex": 42, # The column index of the coordinate.
11152 "sheetId": 42, # The sheet this coordinate is on.
11153 },
11154 },
11155 "autoFill": { # Fills in more data based on existing data. # Automatically fills in more data based on existing data.
11156 "useAlternateSeries": True or False, # True if we should generate data with the "alternate" series.
11157 # This differs based on the type and amount of source data.
11158 "range": { # A range on a sheet. # The range to autofill. This will examine the range and detect
11159 # the location that has data and automatically fill that data
11160 # in to the rest of the range.
11161 # All indexes are zero-based.
11162 # Indexes are half open, e.g the start index is inclusive
11163 # and the end index is exclusive -- [start_index, end_index).
11164 # Missing indexes indicate the range is unbounded on that side.
11165 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011166 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011167 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011168 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011169 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011170 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011171 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011172 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011173 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011174 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011175 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011176 # `Sheet1!A:B == sheet_id: 0,
11177 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011178 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011179 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011180 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011181 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011182 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011183 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011184 #
11185 # The start index must always be less than or equal to the end index.
11186 # If the start index equals the end index, then the range is empty.
11187 # Empty ranges are typically not meaningful and are usually rendered in the
11188 # UI as `#REF!`.
11189 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11190 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11191 "sheetId": 42, # The sheet this range is on.
11192 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11193 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11194 },
11195 "sourceAndDestination": { # A combination of a source range and how to extend that source. # The source and destination areas to autofill.
11196 # This explicitly lists the source of the autofill and where to
11197 # extend that data.
11198 "source": { # A range on a sheet. # The location of the data to use as the source of the autofill.
11199 # All indexes are zero-based.
11200 # Indexes are half open, e.g the start index is inclusive
11201 # and the end index is exclusive -- [start_index, end_index).
11202 # Missing indexes indicate the range is unbounded on that side.
11203 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011204 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011205 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011206 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011207 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011208 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011209 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011210 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011211 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011212 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011213 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011214 # `Sheet1!A:B == sheet_id: 0,
11215 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011216 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011217 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011218 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011219 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011220 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011221 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011222 #
11223 # The start index must always be less than or equal to the end index.
11224 # If the start index equals the end index, then the range is empty.
11225 # Empty ranges are typically not meaningful and are usually rendered in the
11226 # UI as `#REF!`.
11227 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11228 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11229 "sheetId": 42, # The sheet this range is on.
11230 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11231 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11232 },
11233 "dimension": "A String", # The dimension that data should be filled into.
11234 "fillLength": 42, # The number of rows or columns that data should be filled into.
11235 # Positive numbers expand beyond the last row or last column
11236 # of the source. Negative numbers expand before the first row
11237 # or first column of the source.
11238 },
11239 },
11240 "appendDimension": { # Appends rows or columns to the end of a sheet. # Appends dimensions to the end of a sheet.
11241 "length": 42, # The number of rows or columns to append.
11242 "sheetId": 42, # The sheet to append rows or columns to.
11243 "dimension": "A String", # Whether rows or columns should be appended.
11244 },
11245 "autoResizeDimensions": { # Automatically resizes one or more dimensions based on the contents # Automatically resizes one or more dimensions based on the contents
11246 # of the cells in that dimension.
11247 # of the cells in that dimension.
11248 "dimensions": { # A range along a single dimension on a sheet. # The dimensions to automatically resize.
11249 # Only COLUMNS are supported.
11250 # All indexes are zero-based.
11251 # Indexes are half open: the start index is inclusive
11252 # and the end index is exclusive.
11253 # Missing indexes indicate the range is unbounded on that side.
11254 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
11255 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
11256 "sheetId": 42, # The sheet this span is on.
11257 "dimension": "A String", # The dimension of the span.
11258 },
11259 },
11260 "updateDimensionProperties": { # Updates properties of dimensions within the specified range. # Updates dimensions' properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011261 "fields": "A String", # The fields that should be updated. At least one field must be specified.
11262 # The root `properties` is implied and should not be specified.
11263 # A single `"*"` can be used as short-hand for listing every field.
11264 "range": { # A range along a single dimension on a sheet. # The rows or columns to update.
11265 # All indexes are zero-based.
11266 # Indexes are half open: the start index is inclusive
11267 # and the end index is exclusive.
11268 # Missing indexes indicate the range is unbounded on that side.
11269 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
11270 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
11271 "sheetId": 42, # The sheet this span is on.
11272 "dimension": "A String", # The dimension of the span.
11273 },
11274 "properties": { # Properties about a dimension. # Properties to update.
11275 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
11276 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
11277 "hiddenByFilter": True or False, # True if this dimension is being filtered.
11278 # This field is read-only.
11279 },
11280 },
11281 "unmergeCells": { # Unmerges cells in the given range. # Unmerges merged cells.
11282 "range": { # A range on a sheet. # The range within which all cells should be unmerged.
11283 # If the range spans multiple merges, all will be unmerged.
11284 # The range must not partially span any merge.
11285 # All indexes are zero-based.
11286 # Indexes are half open, e.g the start index is inclusive
11287 # and the end index is exclusive -- [start_index, end_index).
11288 # Missing indexes indicate the range is unbounded on that side.
11289 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011290 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011291 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011292 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011293 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011294 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011295 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011296 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011297 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011298 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011299 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011300 # `Sheet1!A:B == sheet_id: 0,
11301 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011302 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011303 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011304 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011305 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011306 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011307 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011308 #
11309 # The start index must always be less than or equal to the end index.
11310 # If the start index equals the end index, then the range is empty.
11311 # Empty ranges are typically not meaningful and are usually rendered in the
11312 # UI as `#REF!`.
11313 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11314 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11315 "sheetId": 42, # The sheet this range is on.
11316 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11317 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11318 },
11319 },
11320 "setDataValidation": { # Sets a data validation rule to every cell in the range. # Sets data validation for one or more cells.
11321 # To clear validation in a range, call this with no rule specified.
11322 "range": { # A range on a sheet. # The range the data validation rule should apply to.
11323 # All indexes are zero-based.
11324 # Indexes are half open, e.g the start index is inclusive
11325 # and the end index is exclusive -- [start_index, end_index).
11326 # Missing indexes indicate the range is unbounded on that side.
11327 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011328 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011329 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011330 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011331 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011332 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011333 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011334 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011335 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011336 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011337 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011338 # `Sheet1!A:B == sheet_id: 0,
11339 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011340 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011341 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011342 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011343 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011344 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011345 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011346 #
11347 # The start index must always be less than or equal to the end index.
11348 # If the start index equals the end index, then the range is empty.
11349 # Empty ranges are typically not meaningful and are usually rendered in the
11350 # UI as `#REF!`.
11351 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11352 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11353 "sheetId": 42, # The sheet this range is on.
11354 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11355 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11356 },
11357 "rule": { # A data validation rule. # The data validation rule to set on each cell in the range,
11358 # or empty to clear the data validation in the range.
11359 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
11360 # If true, "List" conditions will show a dropdown.
11361 "strict": True or False, # True if invalid data should be rejected.
11362 "inputMessage": "A String", # A message to show the user when adding data to the cell.
11363 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
11364 # BooleanConditions are used by conditional formatting,
11365 # data validation, and the criteria in filters.
11366 "type": "A String", # The type of condition.
11367 "values": [ # The values of the condition. The number of supported values depends
11368 # on the condition type. Some support zero values,
11369 # others one or two values,
11370 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
11371 { # The value of the condition.
11372 "relativeDate": "A String", # A relative date (based on the current date).
11373 # Valid only if the type is
11374 # DATE_BEFORE,
11375 # DATE_AFTER,
11376 # DATE_ON_OR_BEFORE or
11377 # DATE_ON_OR_AFTER.
11378 #
11379 # Relative dates are not supported in data validation.
11380 # They are supported only in conditional formatting and
11381 # conditional filters.
11382 "userEnteredValue": "A String", # A value the condition is based on.
11383 # The value will be parsed as if the user typed into a cell.
11384 # Formulas are supported (and must begin with an `=`).
11385 },
11386 ],
11387 },
11388 },
11389 },
11390 "clearBasicFilter": { # Clears the basic filter, if any exists on the sheet. # Clears the basic filter on a sheet.
11391 "sheetId": 42, # The sheet ID on which the basic filter should be cleared.
11392 },
11393 "addNamedRange": { # Adds a named range to the spreadsheet. # Adds a named range.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011394 "namedRange": { # A named range. # The named range to add. The namedRangeId
11395 # field is optional; if one is not set, an id will be randomly generated. (It
11396 # is an error to specify the ID of a range that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011397 "namedRangeId": "A String", # The ID of the named range.
11398 "range": { # A range on a sheet. # The range this represents.
11399 # All indexes are zero-based.
11400 # Indexes are half open, e.g the start index is inclusive
11401 # and the end index is exclusive -- [start_index, end_index).
11402 # Missing indexes indicate the range is unbounded on that side.
11403 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011404 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011405 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011406 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011407 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011408 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011409 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011410 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011411 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011412 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011413 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011414 # `Sheet1!A:B == sheet_id: 0,
11415 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011416 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011417 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011418 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011419 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011420 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011421 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011422 #
11423 # The start index must always be less than or equal to the end index.
11424 # If the start index equals the end index, then the range is empty.
11425 # Empty ranges are typically not meaningful and are usually rendered in the
11426 # UI as `#REF!`.
11427 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11428 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11429 "sheetId": 42, # The sheet this range is on.
11430 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11431 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11432 },
11433 "name": "A String", # The name of the named range.
11434 },
11435 },
11436 "updateChartSpec": { # Updates a chart's specifications. # Updates a chart's specifications.
11437 # (This does not move or resize a chart. To move or resize a chart, use
11438 # UpdateEmbeddedObjectPositionRequest.)
11439 "chartId": 42, # The ID of the chart to update.
11440 "spec": { # The specifications of a chart. # The specification to apply to the chart.
11441 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011442 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
11443 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
11444 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
11445 "sources": [ # The ranges of data for a series or domain.
11446 # Exactly one dimension must have a length of 1,
11447 # and all sources in the list must have the same dimension
11448 # with length 1.
11449 # The domain (if it exists) & all series must have the same number
11450 # of source ranges. If using more than one source range, then the source
11451 # range at a given offset must be contiguous across the domain and series.
11452 #
11453 # For example, these are valid configurations:
11454 #
11455 # domain sources: A1:A5
11456 # series1 sources: B1:B5
11457 # series2 sources: D6:D10
11458 #
11459 # domain sources: A1:A5, C10:C12
11460 # series1 sources: B1:B5, D10:D12
11461 # series2 sources: C1:C5, E10:E12
11462 { # A range on a sheet.
11463 # All indexes are zero-based.
11464 # Indexes are half open, e.g the start index is inclusive
11465 # and the end index is exclusive -- [start_index, end_index).
11466 # Missing indexes indicate the range is unbounded on that side.
11467 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011468 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011469 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011470 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011471 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011472 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011473 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011474 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011475 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011476 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011477 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011478 # `Sheet1!A:B == sheet_id: 0,
11479 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011480 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011481 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011482 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011483 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011484 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011485 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011486 #
11487 # The start index must always be less than or equal to the end index.
11488 # If the start index equals the end index, then the range is empty.
11489 # Empty ranges are typically not meaningful and are usually rendered in the
11490 # UI as `#REF!`.
11491 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11492 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11493 "sheetId": 42, # The sheet this range is on.
11494 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11495 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11496 },
11497 ],
11498 },
11499 },
11500 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
11501 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
11502 "sources": [ # The ranges of data for a series or domain.
11503 # Exactly one dimension must have a length of 1,
11504 # and all sources in the list must have the same dimension
11505 # with length 1.
11506 # The domain (if it exists) & all series must have the same number
11507 # of source ranges. If using more than one source range, then the source
11508 # range at a given offset must be contiguous across the domain and series.
11509 #
11510 # For example, these are valid configurations:
11511 #
11512 # domain sources: A1:A5
11513 # series1 sources: B1:B5
11514 # series2 sources: D6:D10
11515 #
11516 # domain sources: A1:A5, C10:C12
11517 # series1 sources: B1:B5, D10:D12
11518 # series2 sources: C1:C5, E10:E12
11519 { # A range on a sheet.
11520 # All indexes are zero-based.
11521 # Indexes are half open, e.g the start index is inclusive
11522 # and the end index is exclusive -- [start_index, end_index).
11523 # Missing indexes indicate the range is unbounded on that side.
11524 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011525 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011526 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011527 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011528 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011529 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011530 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011531 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011532 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011533 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011534 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011535 # `Sheet1!A:B == sheet_id: 0,
11536 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011537 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011538 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011539 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011540 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011541 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011542 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011543 #
11544 # The start index must always be less than or equal to the end index.
11545 # If the start index equals the end index, then the range is empty.
11546 # Empty ranges are typically not meaningful and are usually rendered in the
11547 # UI as `#REF!`.
11548 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11549 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11550 "sheetId": 42, # The sheet this range is on.
11551 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11552 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11553 },
11554 ],
11555 },
11556 },
11557 "threeDimensional": True or False, # True if the pie is three dimensional.
11558 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
11559 "pieHole": 3.14, # The size of the hole in the pie chart.
11560 },
11561 "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 -070011562 # See BasicChartType for the list of all
11563 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011564 # of charts this supports.
11565 "headerCount": 42, # The number of rows or columns in the data that are "headers".
11566 # If not set, Google Sheets will guess how many rows are headers based
11567 # on the data.
11568 #
11569 # (Note that BasicChartAxis.title may override the axis title
11570 # inferred from the header values.)
11571 "series": [ # The data this chart is visualizing.
11572 { # A single series of data in a chart.
11573 # For example, if charting stock prices over time, multiple series may exist,
11574 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
11575 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
11576 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
11577 "sources": [ # The ranges of data for a series or domain.
11578 # Exactly one dimension must have a length of 1,
11579 # and all sources in the list must have the same dimension
11580 # with length 1.
11581 # The domain (if it exists) & all series must have the same number
11582 # of source ranges. If using more than one source range, then the source
11583 # range at a given offset must be contiguous across the domain and series.
11584 #
11585 # For example, these are valid configurations:
11586 #
11587 # domain sources: A1:A5
11588 # series1 sources: B1:B5
11589 # series2 sources: D6:D10
11590 #
11591 # domain sources: A1:A5, C10:C12
11592 # series1 sources: B1:B5, D10:D12
11593 # series2 sources: C1:C5, E10:E12
11594 { # A range on a sheet.
11595 # All indexes are zero-based.
11596 # Indexes are half open, e.g the start index is inclusive
11597 # and the end index is exclusive -- [start_index, end_index).
11598 # Missing indexes indicate the range is unbounded on that side.
11599 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011600 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011601 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011602 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011603 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011604 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011605 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011606 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011607 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011608 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011609 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011610 # `Sheet1!A:B == sheet_id: 0,
11611 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011612 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011613 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011614 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011615 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011616 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011617 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011618 #
11619 # The start index must always be less than or equal to the end index.
11620 # If the start index equals the end index, then the range is empty.
11621 # Empty ranges are typically not meaningful and are usually rendered in the
11622 # UI as `#REF!`.
11623 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11624 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11625 "sheetId": 42, # The sheet this range is on.
11626 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11627 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11628 },
11629 ],
11630 },
11631 },
11632 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
11633 # For example, if charting stocks over time, the "Volume" series
11634 # may want to be pinned to the right with the prices pinned to the left,
11635 # because the scale of trading volume is different than the scale of
11636 # prices.
11637 # It is an error to specify an axis that isn't a valid minor axis
11638 # for the chart's type.
11639 "type": "A String", # The type of this series. Valid only if the
11640 # chartType is
11641 # COMBO.
11642 # Different types will change the way the series is visualized.
11643 # Only LINE, AREA,
11644 # and COLUMN are supported.
11645 },
11646 ],
11647 "legendPosition": "A String", # The position of the chart legend.
11648 "domains": [ # The domain of data this is charting.
11649 # Only a single domain is currently supported.
11650 { # The domain of a chart.
11651 # For example, if charting stock prices over time, this would be the date.
11652 "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 -070011653 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011654 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
11655 "sources": [ # The ranges of data for a series or domain.
11656 # Exactly one dimension must have a length of 1,
11657 # and all sources in the list must have the same dimension
11658 # with length 1.
11659 # The domain (if it exists) & all series must have the same number
11660 # of source ranges. If using more than one source range, then the source
11661 # range at a given offset must be contiguous across the domain and series.
11662 #
11663 # For example, these are valid configurations:
11664 #
11665 # domain sources: A1:A5
11666 # series1 sources: B1:B5
11667 # series2 sources: D6:D10
11668 #
11669 # domain sources: A1:A5, C10:C12
11670 # series1 sources: B1:B5, D10:D12
11671 # series2 sources: C1:C5, E10:E12
11672 { # A range on a sheet.
11673 # All indexes are zero-based.
11674 # Indexes are half open, e.g the start index is inclusive
11675 # and the end index is exclusive -- [start_index, end_index).
11676 # Missing indexes indicate the range is unbounded on that side.
11677 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011678 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011679 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011680 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011681 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011682 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011683 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011684 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011685 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011686 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011687 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011688 # `Sheet1!A:B == sheet_id: 0,
11689 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011690 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011691 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011692 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011693 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011694 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011695 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011696 #
11697 # The start index must always be less than or equal to the end index.
11698 # If the start index equals the end index, then the range is empty.
11699 # Empty ranges are typically not meaningful and are usually rendered in the
11700 # UI as `#REF!`.
11701 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11702 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11703 "sheetId": 42, # The sheet this range is on.
11704 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11705 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11706 },
11707 ],
11708 },
11709 },
11710 },
11711 ],
11712 "chartType": "A String", # The type of the chart.
11713 "axis": [ # The axis on the chart.
11714 { # An axis of the chart.
11715 # A chart may not have more than one axis per
11716 # axis position.
11717 "position": "A String", # The position of this axis.
11718 "format": { # The format of a run of text in a cell. # The format of the title.
11719 # Only valid if the axis is not associated with the domain.
11720 # Absent values indicate that the field isn't specified.
11721 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
11722 # for simplicity of conversion to/from color representations in various
11723 # languages over compactness; for example, the fields of this representation
11724 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11725 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11726 # method in iOS; and, with just a little work, it can be easily formatted into
11727 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11728 #
11729 # Example (Java):
11730 #
11731 # import com.google.type.Color;
11732 #
11733 # // ...
11734 # public static java.awt.Color fromProto(Color protocolor) {
11735 # float alpha = protocolor.hasAlpha()
11736 # ? protocolor.getAlpha().getValue()
11737 # : 1.0;
11738 #
11739 # return new java.awt.Color(
11740 # protocolor.getRed(),
11741 # protocolor.getGreen(),
11742 # protocolor.getBlue(),
11743 # alpha);
11744 # }
11745 #
11746 # public static Color toProto(java.awt.Color color) {
11747 # float red = (float) color.getRed();
11748 # float green = (float) color.getGreen();
11749 # float blue = (float) color.getBlue();
11750 # float denominator = 255.0;
11751 # Color.Builder resultBuilder =
11752 # Color
11753 # .newBuilder()
11754 # .setRed(red / denominator)
11755 # .setGreen(green / denominator)
11756 # .setBlue(blue / denominator);
11757 # int alpha = color.getAlpha();
11758 # if (alpha != 255) {
11759 # result.setAlpha(
11760 # FloatValue
11761 # .newBuilder()
11762 # .setValue(((float) alpha) / denominator)
11763 # .build());
11764 # }
11765 # return resultBuilder.build();
11766 # }
11767 # // ...
11768 #
11769 # Example (iOS / Obj-C):
11770 #
11771 # // ...
11772 # static UIColor* fromProto(Color* protocolor) {
11773 # float red = [protocolor red];
11774 # float green = [protocolor green];
11775 # float blue = [protocolor blue];
11776 # FloatValue* alpha_wrapper = [protocolor alpha];
11777 # float alpha = 1.0;
11778 # if (alpha_wrapper != nil) {
11779 # alpha = [alpha_wrapper value];
11780 # }
11781 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11782 # }
11783 #
11784 # static Color* toProto(UIColor* color) {
11785 # CGFloat red, green, blue, alpha;
11786 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11787 # return nil;
11788 # }
11789 # Color* result = [Color alloc] init];
11790 # [result setRed:red];
11791 # [result setGreen:green];
11792 # [result setBlue:blue];
11793 # if (alpha <= 0.9999) {
11794 # [result setAlpha:floatWrapperWithValue(alpha)];
11795 # }
11796 # [result autorelease];
11797 # return result;
11798 # }
11799 # // ...
11800 #
11801 # Example (JavaScript):
11802 #
11803 # // ...
11804 #
11805 # var protoToCssColor = function(rgb_color) {
11806 # var redFrac = rgb_color.red || 0.0;
11807 # var greenFrac = rgb_color.green || 0.0;
11808 # var blueFrac = rgb_color.blue || 0.0;
11809 # var red = Math.floor(redFrac * 255);
11810 # var green = Math.floor(greenFrac * 255);
11811 # var blue = Math.floor(blueFrac * 255);
11812 #
11813 # if (!('alpha' in rgb_color)) {
11814 # return rgbToCssColor_(red, green, blue);
11815 # }
11816 #
11817 # var alphaFrac = rgb_color.alpha.value || 0.0;
11818 # var rgbParams = [red, green, blue].join(',');
11819 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11820 # };
11821 #
11822 # var rgbToCssColor_ = function(red, green, blue) {
11823 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11824 # var hexString = rgbNumber.toString(16);
11825 # var missingZeros = 6 - hexString.length;
11826 # var resultBuilder = ['#'];
11827 # for (var i = 0; i < missingZeros; i++) {
11828 # resultBuilder.push('0');
11829 # }
11830 # resultBuilder.push(hexString);
11831 # return resultBuilder.join('');
11832 # };
11833 #
11834 # // ...
11835 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11836 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11837 # the final pixel color is defined by the equation:
11838 #
11839 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11840 #
11841 # This means that a value of 1.0 corresponds to a solid color, whereas
11842 # a value of 0.0 corresponds to a completely transparent color. This
11843 # uses a wrapper message rather than a simple float scalar so that it is
11844 # possible to distinguish between a default value and the value being unset.
11845 # If omitted, this color object is to be rendered as a solid color
11846 # (as if the alpha value had been explicitly given with a value of 1.0).
11847 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11848 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11849 },
11850 "bold": True or False, # True if the text is bold.
11851 "strikethrough": True or False, # True if the text has a strikethrough.
11852 "fontFamily": "A String", # The font family.
11853 "fontSize": 42, # The size of the font.
11854 "italic": True or False, # True if the text is italicized.
11855 "underline": True or False, # True if the text is underlined.
11856 },
11857 "title": "A String", # The title of this axis. If set, this overrides any title inferred
11858 # from headers of the data.
11859 },
11860 ],
11861 },
11862 "title": "A String", # The title of the chart.
11863 },
11864 },
11865 "moveDimension": { # Moves one or more rows or columns. # Moves rows or columns to another location in a sheet.
11866 "source": { # A range along a single dimension on a sheet. # The source dimensions to move.
11867 # All indexes are zero-based.
11868 # Indexes are half open: the start index is inclusive
11869 # and the end index is exclusive.
11870 # Missing indexes indicate the range is unbounded on that side.
11871 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
11872 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
11873 "sheetId": 42, # The sheet this span is on.
11874 "dimension": "A String", # The dimension of the span.
11875 },
11876 "destinationIndex": 42, # The zero-based start index of where to move the source data to,
11877 # based on the coordinates *before* the source data is removed
11878 # from the grid. Existing data will be shifted down or right
11879 # (depending on the dimension) to make room for the moved dimensions.
11880 # The source dimensions are removed from the grid, so the
11881 # the data may end up in a different index than specified.
11882 #
11883 # For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011884 # `"1"` and `"2"` to between `"3"` and `"4"`, the source would be
11885 # `ROWS [1..3)`,and the destination index would be `"4"`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011886 # (the zero-based index of row 5).
11887 # The end result would be `A1..A5` of `0, 3, 1, 2, 4`.
11888 },
11889 "textToColumns": { # Splits a column of text into multiple columns, # Converts a column of text into many columns of text.
11890 # based on a delimiter in each cell.
11891 "source": { # A range on a sheet. # The source data range. This must span exactly one column.
11892 # All indexes are zero-based.
11893 # Indexes are half open, e.g the start index is inclusive
11894 # and the end index is exclusive -- [start_index, end_index).
11895 # Missing indexes indicate the range is unbounded on that side.
11896 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011897 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011898 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011899 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011900 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011901 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011902 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011903 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011904 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011905 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011906 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011907 # `Sheet1!A:B == sheet_id: 0,
11908 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011909 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011910 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011911 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011912 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011913 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011914 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011915 #
11916 # The start index must always be less than or equal to the end index.
11917 # If the start index equals the end index, then the range is empty.
11918 # Empty ranges are typically not meaningful and are usually rendered in the
11919 # UI as `#REF!`.
11920 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11921 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11922 "sheetId": 42, # The sheet this range is on.
11923 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11924 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11925 },
11926 "delimiter": "A String", # The delimiter to use. Used only if delimiterType is
11927 # CUSTOM.
11928 "delimiterType": "A String", # The delimiter type to use.
11929 },
11930 "deleteFilterView": { # Deletes a particular filter view. # Deletes a filter view from a sheet.
11931 "filterId": 42, # The ID of the filter to delete.
11932 },
11933 "mergeCells": { # Merges all cells in the range. # Merges cells together.
11934 "range": { # A range on a sheet. # The range of cells to merge.
11935 # All indexes are zero-based.
11936 # Indexes are half open, e.g the start index is inclusive
11937 # and the end index is exclusive -- [start_index, end_index).
11938 # Missing indexes indicate the range is unbounded on that side.
11939 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011940 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011941 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011942 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011943 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011944 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011945 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011946 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011947 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011948 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011949 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011950 # `Sheet1!A:B == sheet_id: 0,
11951 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011952 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011953 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011954 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011955 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011956 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011957 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011958 #
11959 # The start index must always be less than or equal to the end index.
11960 # If the start index equals the end index, then the range is empty.
11961 # Empty ranges are typically not meaningful and are usually rendered in the
11962 # UI as `#REF!`.
11963 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11964 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11965 "sheetId": 42, # The sheet this range is on.
11966 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11967 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11968 },
11969 "mergeType": "A String", # How the cells should be merged.
11970 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011971 "deleteProtectedRange": { # Deletes the protected range with the given ID. # Deletes a protected range.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011972 "protectedRangeId": 42, # The ID of the protected range to delete.
11973 },
11974 "addFilterView": { # Adds a filter view. # Adds a filter view.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011975 "filter": { # A filter view. # The filter to add. The filterViewId
11976 # field is optional; if one is not set, an id will be randomly generated. (It
11977 # is an error to specify the ID of a filter that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011978 "title": "A String", # The name of the filter view.
11979 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
11980 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011981 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011982 # may be set.
11983 "filterViewId": 42, # The ID of the filter view.
11984 "range": { # A range on a sheet. # The range this filter view covers.
11985 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011986 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011987 # may be set.
11988 # All indexes are zero-based.
11989 # Indexes are half open, e.g the start index is inclusive
11990 # and the end index is exclusive -- [start_index, end_index).
11991 # Missing indexes indicate the range is unbounded on that side.
11992 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011993 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011994 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011995 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011996 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011997 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011998 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011999 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012000 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012001 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012002 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012003 # `Sheet1!A:B == sheet_id: 0,
12004 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012005 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012006 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012007 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012008 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012009 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012010 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012011 #
12012 # The start index must always be less than or equal to the end index.
12013 # If the start index equals the end index, then the range is empty.
12014 # Empty ranges are typically not meaningful and are usually rendered in the
12015 # UI as `#REF!`.
12016 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12017 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12018 "sheetId": 42, # The sheet this range is on.
12019 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12020 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12021 },
12022 "sortSpecs": [ # The sort order per column. Later specifications are used when values
12023 # are equal in the earlier specifications.
12024 { # A sort order associated with a specific column or row.
12025 "sortOrder": "A String", # The order data should be sorted.
12026 "dimensionIndex": 42, # The dimension the sort should be applied to.
12027 },
12028 ],
12029 "criteria": { # The criteria for showing/hiding values per column.
12030 # The map's key is the column index, and the value is the criteria for
12031 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012032 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012033 "hiddenValues": [ # Values that should be hidden.
12034 "A String",
12035 ],
12036 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
12037 # (This does not override hiddenValues -- if a value is listed there,
12038 # it will still be hidden.)
12039 # BooleanConditions are used by conditional formatting,
12040 # data validation, and the criteria in filters.
12041 "type": "A String", # The type of condition.
12042 "values": [ # The values of the condition. The number of supported values depends
12043 # on the condition type. Some support zero values,
12044 # others one or two values,
12045 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
12046 { # The value of the condition.
12047 "relativeDate": "A String", # A relative date (based on the current date).
12048 # Valid only if the type is
12049 # DATE_BEFORE,
12050 # DATE_AFTER,
12051 # DATE_ON_OR_BEFORE or
12052 # DATE_ON_OR_AFTER.
12053 #
12054 # Relative dates are not supported in data validation.
12055 # They are supported only in conditional formatting and
12056 # conditional filters.
12057 "userEnteredValue": "A String", # A value the condition is based on.
12058 # The value will be parsed as if the user typed into a cell.
12059 # Formulas are supported (and must begin with an `=`).
12060 },
12061 ],
12062 },
12063 },
12064 },
12065 },
12066 },
12067 "deleteSheet": { # Deletes the requested sheet. # Deletes a sheet.
12068 "sheetId": 42, # The ID of the sheet to delete.
12069 },
12070 "updateBorders": { # Updates the borders of a range. # Updates the borders in a range of cells.
12071 # If a field is not set in the request, that means the border remains as-is.
12072 # For example, with two subsequent UpdateBordersRequest:
12073 #
12074 # 1. range: A1:A5 `{ top: RED, bottom: WHITE }`
12075 # 2. range: A1:A5 `{ left: BLUE }`
12076 #
12077 # That would result in A1:A5 having a borders of
12078 # `{ top: RED, bottom: WHITE, left: BLUE }`.
12079 # If you want to clear a border, explicitly set the style to
12080 # NONE.
12081 "right": { # A border along a cell. # The border to put at the right of the range.
12082 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
12083 # for simplicity of conversion to/from color representations in various
12084 # languages over compactness; for example, the fields of this representation
12085 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12086 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12087 # method in iOS; and, with just a little work, it can be easily formatted into
12088 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12089 #
12090 # Example (Java):
12091 #
12092 # import com.google.type.Color;
12093 #
12094 # // ...
12095 # public static java.awt.Color fromProto(Color protocolor) {
12096 # float alpha = protocolor.hasAlpha()
12097 # ? protocolor.getAlpha().getValue()
12098 # : 1.0;
12099 #
12100 # return new java.awt.Color(
12101 # protocolor.getRed(),
12102 # protocolor.getGreen(),
12103 # protocolor.getBlue(),
12104 # alpha);
12105 # }
12106 #
12107 # public static Color toProto(java.awt.Color color) {
12108 # float red = (float) color.getRed();
12109 # float green = (float) color.getGreen();
12110 # float blue = (float) color.getBlue();
12111 # float denominator = 255.0;
12112 # Color.Builder resultBuilder =
12113 # Color
12114 # .newBuilder()
12115 # .setRed(red / denominator)
12116 # .setGreen(green / denominator)
12117 # .setBlue(blue / denominator);
12118 # int alpha = color.getAlpha();
12119 # if (alpha != 255) {
12120 # result.setAlpha(
12121 # FloatValue
12122 # .newBuilder()
12123 # .setValue(((float) alpha) / denominator)
12124 # .build());
12125 # }
12126 # return resultBuilder.build();
12127 # }
12128 # // ...
12129 #
12130 # Example (iOS / Obj-C):
12131 #
12132 # // ...
12133 # static UIColor* fromProto(Color* protocolor) {
12134 # float red = [protocolor red];
12135 # float green = [protocolor green];
12136 # float blue = [protocolor blue];
12137 # FloatValue* alpha_wrapper = [protocolor alpha];
12138 # float alpha = 1.0;
12139 # if (alpha_wrapper != nil) {
12140 # alpha = [alpha_wrapper value];
12141 # }
12142 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12143 # }
12144 #
12145 # static Color* toProto(UIColor* color) {
12146 # CGFloat red, green, blue, alpha;
12147 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12148 # return nil;
12149 # }
12150 # Color* result = [Color alloc] init];
12151 # [result setRed:red];
12152 # [result setGreen:green];
12153 # [result setBlue:blue];
12154 # if (alpha <= 0.9999) {
12155 # [result setAlpha:floatWrapperWithValue(alpha)];
12156 # }
12157 # [result autorelease];
12158 # return result;
12159 # }
12160 # // ...
12161 #
12162 # Example (JavaScript):
12163 #
12164 # // ...
12165 #
12166 # var protoToCssColor = function(rgb_color) {
12167 # var redFrac = rgb_color.red || 0.0;
12168 # var greenFrac = rgb_color.green || 0.0;
12169 # var blueFrac = rgb_color.blue || 0.0;
12170 # var red = Math.floor(redFrac * 255);
12171 # var green = Math.floor(greenFrac * 255);
12172 # var blue = Math.floor(blueFrac * 255);
12173 #
12174 # if (!('alpha' in rgb_color)) {
12175 # return rgbToCssColor_(red, green, blue);
12176 # }
12177 #
12178 # var alphaFrac = rgb_color.alpha.value || 0.0;
12179 # var rgbParams = [red, green, blue].join(',');
12180 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12181 # };
12182 #
12183 # var rgbToCssColor_ = function(red, green, blue) {
12184 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12185 # var hexString = rgbNumber.toString(16);
12186 # var missingZeros = 6 - hexString.length;
12187 # var resultBuilder = ['#'];
12188 # for (var i = 0; i < missingZeros; i++) {
12189 # resultBuilder.push('0');
12190 # }
12191 # resultBuilder.push(hexString);
12192 # return resultBuilder.join('');
12193 # };
12194 #
12195 # // ...
12196 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12197 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12198 # the final pixel color is defined by the equation:
12199 #
12200 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12201 #
12202 # This means that a value of 1.0 corresponds to a solid color, whereas
12203 # a value of 0.0 corresponds to a completely transparent color. This
12204 # uses a wrapper message rather than a simple float scalar so that it is
12205 # possible to distinguish between a default value and the value being unset.
12206 # If omitted, this color object is to be rendered as a solid color
12207 # (as if the alpha value had been explicitly given with a value of 1.0).
12208 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12209 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12210 },
12211 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012212 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012213 "style": "A String", # The style of the border.
12214 },
12215 "bottom": { # A border along a cell. # The border to put at the bottom of the range.
12216 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
12217 # for simplicity of conversion to/from color representations in various
12218 # languages over compactness; for example, the fields of this representation
12219 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12220 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12221 # method in iOS; and, with just a little work, it can be easily formatted into
12222 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12223 #
12224 # Example (Java):
12225 #
12226 # import com.google.type.Color;
12227 #
12228 # // ...
12229 # public static java.awt.Color fromProto(Color protocolor) {
12230 # float alpha = protocolor.hasAlpha()
12231 # ? protocolor.getAlpha().getValue()
12232 # : 1.0;
12233 #
12234 # return new java.awt.Color(
12235 # protocolor.getRed(),
12236 # protocolor.getGreen(),
12237 # protocolor.getBlue(),
12238 # alpha);
12239 # }
12240 #
12241 # public static Color toProto(java.awt.Color color) {
12242 # float red = (float) color.getRed();
12243 # float green = (float) color.getGreen();
12244 # float blue = (float) color.getBlue();
12245 # float denominator = 255.0;
12246 # Color.Builder resultBuilder =
12247 # Color
12248 # .newBuilder()
12249 # .setRed(red / denominator)
12250 # .setGreen(green / denominator)
12251 # .setBlue(blue / denominator);
12252 # int alpha = color.getAlpha();
12253 # if (alpha != 255) {
12254 # result.setAlpha(
12255 # FloatValue
12256 # .newBuilder()
12257 # .setValue(((float) alpha) / denominator)
12258 # .build());
12259 # }
12260 # return resultBuilder.build();
12261 # }
12262 # // ...
12263 #
12264 # Example (iOS / Obj-C):
12265 #
12266 # // ...
12267 # static UIColor* fromProto(Color* protocolor) {
12268 # float red = [protocolor red];
12269 # float green = [protocolor green];
12270 # float blue = [protocolor blue];
12271 # FloatValue* alpha_wrapper = [protocolor alpha];
12272 # float alpha = 1.0;
12273 # if (alpha_wrapper != nil) {
12274 # alpha = [alpha_wrapper value];
12275 # }
12276 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12277 # }
12278 #
12279 # static Color* toProto(UIColor* color) {
12280 # CGFloat red, green, blue, alpha;
12281 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12282 # return nil;
12283 # }
12284 # Color* result = [Color alloc] init];
12285 # [result setRed:red];
12286 # [result setGreen:green];
12287 # [result setBlue:blue];
12288 # if (alpha <= 0.9999) {
12289 # [result setAlpha:floatWrapperWithValue(alpha)];
12290 # }
12291 # [result autorelease];
12292 # return result;
12293 # }
12294 # // ...
12295 #
12296 # Example (JavaScript):
12297 #
12298 # // ...
12299 #
12300 # var protoToCssColor = function(rgb_color) {
12301 # var redFrac = rgb_color.red || 0.0;
12302 # var greenFrac = rgb_color.green || 0.0;
12303 # var blueFrac = rgb_color.blue || 0.0;
12304 # var red = Math.floor(redFrac * 255);
12305 # var green = Math.floor(greenFrac * 255);
12306 # var blue = Math.floor(blueFrac * 255);
12307 #
12308 # if (!('alpha' in rgb_color)) {
12309 # return rgbToCssColor_(red, green, blue);
12310 # }
12311 #
12312 # var alphaFrac = rgb_color.alpha.value || 0.0;
12313 # var rgbParams = [red, green, blue].join(',');
12314 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12315 # };
12316 #
12317 # var rgbToCssColor_ = function(red, green, blue) {
12318 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12319 # var hexString = rgbNumber.toString(16);
12320 # var missingZeros = 6 - hexString.length;
12321 # var resultBuilder = ['#'];
12322 # for (var i = 0; i < missingZeros; i++) {
12323 # resultBuilder.push('0');
12324 # }
12325 # resultBuilder.push(hexString);
12326 # return resultBuilder.join('');
12327 # };
12328 #
12329 # // ...
12330 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12331 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12332 # the final pixel color is defined by the equation:
12333 #
12334 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12335 #
12336 # This means that a value of 1.0 corresponds to a solid color, whereas
12337 # a value of 0.0 corresponds to a completely transparent color. This
12338 # uses a wrapper message rather than a simple float scalar so that it is
12339 # possible to distinguish between a default value and the value being unset.
12340 # If omitted, this color object is to be rendered as a solid color
12341 # (as if the alpha value had been explicitly given with a value of 1.0).
12342 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12343 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12344 },
12345 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012346 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012347 "style": "A String", # The style of the border.
12348 },
12349 "top": { # A border along a cell. # The border to put at the top of the range.
12350 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
12351 # for simplicity of conversion to/from color representations in various
12352 # languages over compactness; for example, the fields of this representation
12353 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12354 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12355 # method in iOS; and, with just a little work, it can be easily formatted into
12356 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12357 #
12358 # Example (Java):
12359 #
12360 # import com.google.type.Color;
12361 #
12362 # // ...
12363 # public static java.awt.Color fromProto(Color protocolor) {
12364 # float alpha = protocolor.hasAlpha()
12365 # ? protocolor.getAlpha().getValue()
12366 # : 1.0;
12367 #
12368 # return new java.awt.Color(
12369 # protocolor.getRed(),
12370 # protocolor.getGreen(),
12371 # protocolor.getBlue(),
12372 # alpha);
12373 # }
12374 #
12375 # public static Color toProto(java.awt.Color color) {
12376 # float red = (float) color.getRed();
12377 # float green = (float) color.getGreen();
12378 # float blue = (float) color.getBlue();
12379 # float denominator = 255.0;
12380 # Color.Builder resultBuilder =
12381 # Color
12382 # .newBuilder()
12383 # .setRed(red / denominator)
12384 # .setGreen(green / denominator)
12385 # .setBlue(blue / denominator);
12386 # int alpha = color.getAlpha();
12387 # if (alpha != 255) {
12388 # result.setAlpha(
12389 # FloatValue
12390 # .newBuilder()
12391 # .setValue(((float) alpha) / denominator)
12392 # .build());
12393 # }
12394 # return resultBuilder.build();
12395 # }
12396 # // ...
12397 #
12398 # Example (iOS / Obj-C):
12399 #
12400 # // ...
12401 # static UIColor* fromProto(Color* protocolor) {
12402 # float red = [protocolor red];
12403 # float green = [protocolor green];
12404 # float blue = [protocolor blue];
12405 # FloatValue* alpha_wrapper = [protocolor alpha];
12406 # float alpha = 1.0;
12407 # if (alpha_wrapper != nil) {
12408 # alpha = [alpha_wrapper value];
12409 # }
12410 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12411 # }
12412 #
12413 # static Color* toProto(UIColor* color) {
12414 # CGFloat red, green, blue, alpha;
12415 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12416 # return nil;
12417 # }
12418 # Color* result = [Color alloc] init];
12419 # [result setRed:red];
12420 # [result setGreen:green];
12421 # [result setBlue:blue];
12422 # if (alpha <= 0.9999) {
12423 # [result setAlpha:floatWrapperWithValue(alpha)];
12424 # }
12425 # [result autorelease];
12426 # return result;
12427 # }
12428 # // ...
12429 #
12430 # Example (JavaScript):
12431 #
12432 # // ...
12433 #
12434 # var protoToCssColor = function(rgb_color) {
12435 # var redFrac = rgb_color.red || 0.0;
12436 # var greenFrac = rgb_color.green || 0.0;
12437 # var blueFrac = rgb_color.blue || 0.0;
12438 # var red = Math.floor(redFrac * 255);
12439 # var green = Math.floor(greenFrac * 255);
12440 # var blue = Math.floor(blueFrac * 255);
12441 #
12442 # if (!('alpha' in rgb_color)) {
12443 # return rgbToCssColor_(red, green, blue);
12444 # }
12445 #
12446 # var alphaFrac = rgb_color.alpha.value || 0.0;
12447 # var rgbParams = [red, green, blue].join(',');
12448 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12449 # };
12450 #
12451 # var rgbToCssColor_ = function(red, green, blue) {
12452 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12453 # var hexString = rgbNumber.toString(16);
12454 # var missingZeros = 6 - hexString.length;
12455 # var resultBuilder = ['#'];
12456 # for (var i = 0; i < missingZeros; i++) {
12457 # resultBuilder.push('0');
12458 # }
12459 # resultBuilder.push(hexString);
12460 # return resultBuilder.join('');
12461 # };
12462 #
12463 # // ...
12464 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12465 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12466 # the final pixel color is defined by the equation:
12467 #
12468 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12469 #
12470 # This means that a value of 1.0 corresponds to a solid color, whereas
12471 # a value of 0.0 corresponds to a completely transparent color. This
12472 # uses a wrapper message rather than a simple float scalar so that it is
12473 # possible to distinguish between a default value and the value being unset.
12474 # If omitted, this color object is to be rendered as a solid color
12475 # (as if the alpha value had been explicitly given with a value of 1.0).
12476 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12477 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12478 },
12479 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012480 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012481 "style": "A String", # The style of the border.
12482 },
12483 "innerHorizontal": { # A border along a cell. # The horizontal border to put within the range.
12484 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
12485 # for simplicity of conversion to/from color representations in various
12486 # languages over compactness; for example, the fields of this representation
12487 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12488 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12489 # method in iOS; and, with just a little work, it can be easily formatted into
12490 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12491 #
12492 # Example (Java):
12493 #
12494 # import com.google.type.Color;
12495 #
12496 # // ...
12497 # public static java.awt.Color fromProto(Color protocolor) {
12498 # float alpha = protocolor.hasAlpha()
12499 # ? protocolor.getAlpha().getValue()
12500 # : 1.0;
12501 #
12502 # return new java.awt.Color(
12503 # protocolor.getRed(),
12504 # protocolor.getGreen(),
12505 # protocolor.getBlue(),
12506 # alpha);
12507 # }
12508 #
12509 # public static Color toProto(java.awt.Color color) {
12510 # float red = (float) color.getRed();
12511 # float green = (float) color.getGreen();
12512 # float blue = (float) color.getBlue();
12513 # float denominator = 255.0;
12514 # Color.Builder resultBuilder =
12515 # Color
12516 # .newBuilder()
12517 # .setRed(red / denominator)
12518 # .setGreen(green / denominator)
12519 # .setBlue(blue / denominator);
12520 # int alpha = color.getAlpha();
12521 # if (alpha != 255) {
12522 # result.setAlpha(
12523 # FloatValue
12524 # .newBuilder()
12525 # .setValue(((float) alpha) / denominator)
12526 # .build());
12527 # }
12528 # return resultBuilder.build();
12529 # }
12530 # // ...
12531 #
12532 # Example (iOS / Obj-C):
12533 #
12534 # // ...
12535 # static UIColor* fromProto(Color* protocolor) {
12536 # float red = [protocolor red];
12537 # float green = [protocolor green];
12538 # float blue = [protocolor blue];
12539 # FloatValue* alpha_wrapper = [protocolor alpha];
12540 # float alpha = 1.0;
12541 # if (alpha_wrapper != nil) {
12542 # alpha = [alpha_wrapper value];
12543 # }
12544 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12545 # }
12546 #
12547 # static Color* toProto(UIColor* color) {
12548 # CGFloat red, green, blue, alpha;
12549 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12550 # return nil;
12551 # }
12552 # Color* result = [Color alloc] init];
12553 # [result setRed:red];
12554 # [result setGreen:green];
12555 # [result setBlue:blue];
12556 # if (alpha <= 0.9999) {
12557 # [result setAlpha:floatWrapperWithValue(alpha)];
12558 # }
12559 # [result autorelease];
12560 # return result;
12561 # }
12562 # // ...
12563 #
12564 # Example (JavaScript):
12565 #
12566 # // ...
12567 #
12568 # var protoToCssColor = function(rgb_color) {
12569 # var redFrac = rgb_color.red || 0.0;
12570 # var greenFrac = rgb_color.green || 0.0;
12571 # var blueFrac = rgb_color.blue || 0.0;
12572 # var red = Math.floor(redFrac * 255);
12573 # var green = Math.floor(greenFrac * 255);
12574 # var blue = Math.floor(blueFrac * 255);
12575 #
12576 # if (!('alpha' in rgb_color)) {
12577 # return rgbToCssColor_(red, green, blue);
12578 # }
12579 #
12580 # var alphaFrac = rgb_color.alpha.value || 0.0;
12581 # var rgbParams = [red, green, blue].join(',');
12582 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12583 # };
12584 #
12585 # var rgbToCssColor_ = function(red, green, blue) {
12586 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12587 # var hexString = rgbNumber.toString(16);
12588 # var missingZeros = 6 - hexString.length;
12589 # var resultBuilder = ['#'];
12590 # for (var i = 0; i < missingZeros; i++) {
12591 # resultBuilder.push('0');
12592 # }
12593 # resultBuilder.push(hexString);
12594 # return resultBuilder.join('');
12595 # };
12596 #
12597 # // ...
12598 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12599 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12600 # the final pixel color is defined by the equation:
12601 #
12602 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12603 #
12604 # This means that a value of 1.0 corresponds to a solid color, whereas
12605 # a value of 0.0 corresponds to a completely transparent color. This
12606 # uses a wrapper message rather than a simple float scalar so that it is
12607 # possible to distinguish between a default value and the value being unset.
12608 # If omitted, this color object is to be rendered as a solid color
12609 # (as if the alpha value had been explicitly given with a value of 1.0).
12610 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12611 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12612 },
12613 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012614 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012615 "style": "A String", # The style of the border.
12616 },
12617 "range": { # A range on a sheet. # The range whose borders should be updated.
12618 # All indexes are zero-based.
12619 # Indexes are half open, e.g the start index is inclusive
12620 # and the end index is exclusive -- [start_index, end_index).
12621 # Missing indexes indicate the range is unbounded on that side.
12622 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012623 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012624 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012625 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012626 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012627 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012628 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012629 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012630 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012631 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012632 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012633 # `Sheet1!A:B == sheet_id: 0,
12634 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012635 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012636 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012637 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012638 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012639 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012640 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012641 #
12642 # The start index must always be less than or equal to the end index.
12643 # If the start index equals the end index, then the range is empty.
12644 # Empty ranges are typically not meaningful and are usually rendered in the
12645 # UI as `#REF!`.
12646 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12647 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12648 "sheetId": 42, # The sheet this range is on.
12649 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12650 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12651 },
12652 "innerVertical": { # A border along a cell. # The vertical border to put within the range.
12653 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
12654 # for simplicity of conversion to/from color representations in various
12655 # languages over compactness; for example, the fields of this representation
12656 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12657 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12658 # method in iOS; and, with just a little work, it can be easily formatted into
12659 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12660 #
12661 # Example (Java):
12662 #
12663 # import com.google.type.Color;
12664 #
12665 # // ...
12666 # public static java.awt.Color fromProto(Color protocolor) {
12667 # float alpha = protocolor.hasAlpha()
12668 # ? protocolor.getAlpha().getValue()
12669 # : 1.0;
12670 #
12671 # return new java.awt.Color(
12672 # protocolor.getRed(),
12673 # protocolor.getGreen(),
12674 # protocolor.getBlue(),
12675 # alpha);
12676 # }
12677 #
12678 # public static Color toProto(java.awt.Color color) {
12679 # float red = (float) color.getRed();
12680 # float green = (float) color.getGreen();
12681 # float blue = (float) color.getBlue();
12682 # float denominator = 255.0;
12683 # Color.Builder resultBuilder =
12684 # Color
12685 # .newBuilder()
12686 # .setRed(red / denominator)
12687 # .setGreen(green / denominator)
12688 # .setBlue(blue / denominator);
12689 # int alpha = color.getAlpha();
12690 # if (alpha != 255) {
12691 # result.setAlpha(
12692 # FloatValue
12693 # .newBuilder()
12694 # .setValue(((float) alpha) / denominator)
12695 # .build());
12696 # }
12697 # return resultBuilder.build();
12698 # }
12699 # // ...
12700 #
12701 # Example (iOS / Obj-C):
12702 #
12703 # // ...
12704 # static UIColor* fromProto(Color* protocolor) {
12705 # float red = [protocolor red];
12706 # float green = [protocolor green];
12707 # float blue = [protocolor blue];
12708 # FloatValue* alpha_wrapper = [protocolor alpha];
12709 # float alpha = 1.0;
12710 # if (alpha_wrapper != nil) {
12711 # alpha = [alpha_wrapper value];
12712 # }
12713 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12714 # }
12715 #
12716 # static Color* toProto(UIColor* color) {
12717 # CGFloat red, green, blue, alpha;
12718 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12719 # return nil;
12720 # }
12721 # Color* result = [Color alloc] init];
12722 # [result setRed:red];
12723 # [result setGreen:green];
12724 # [result setBlue:blue];
12725 # if (alpha <= 0.9999) {
12726 # [result setAlpha:floatWrapperWithValue(alpha)];
12727 # }
12728 # [result autorelease];
12729 # return result;
12730 # }
12731 # // ...
12732 #
12733 # Example (JavaScript):
12734 #
12735 # // ...
12736 #
12737 # var protoToCssColor = function(rgb_color) {
12738 # var redFrac = rgb_color.red || 0.0;
12739 # var greenFrac = rgb_color.green || 0.0;
12740 # var blueFrac = rgb_color.blue || 0.0;
12741 # var red = Math.floor(redFrac * 255);
12742 # var green = Math.floor(greenFrac * 255);
12743 # var blue = Math.floor(blueFrac * 255);
12744 #
12745 # if (!('alpha' in rgb_color)) {
12746 # return rgbToCssColor_(red, green, blue);
12747 # }
12748 #
12749 # var alphaFrac = rgb_color.alpha.value || 0.0;
12750 # var rgbParams = [red, green, blue].join(',');
12751 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12752 # };
12753 #
12754 # var rgbToCssColor_ = function(red, green, blue) {
12755 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12756 # var hexString = rgbNumber.toString(16);
12757 # var missingZeros = 6 - hexString.length;
12758 # var resultBuilder = ['#'];
12759 # for (var i = 0; i < missingZeros; i++) {
12760 # resultBuilder.push('0');
12761 # }
12762 # resultBuilder.push(hexString);
12763 # return resultBuilder.join('');
12764 # };
12765 #
12766 # // ...
12767 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12768 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12769 # the final pixel color is defined by the equation:
12770 #
12771 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12772 #
12773 # This means that a value of 1.0 corresponds to a solid color, whereas
12774 # a value of 0.0 corresponds to a completely transparent color. This
12775 # uses a wrapper message rather than a simple float scalar so that it is
12776 # possible to distinguish between a default value and the value being unset.
12777 # If omitted, this color object is to be rendered as a solid color
12778 # (as if the alpha value had been explicitly given with a value of 1.0).
12779 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12780 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12781 },
12782 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012783 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012784 "style": "A String", # The style of the border.
12785 },
12786 "left": { # A border along a cell. # The border to put at the left of the range.
12787 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
12788 # for simplicity of conversion to/from color representations in various
12789 # languages over compactness; for example, the fields of this representation
12790 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12791 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12792 # method in iOS; and, with just a little work, it can be easily formatted into
12793 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12794 #
12795 # Example (Java):
12796 #
12797 # import com.google.type.Color;
12798 #
12799 # // ...
12800 # public static java.awt.Color fromProto(Color protocolor) {
12801 # float alpha = protocolor.hasAlpha()
12802 # ? protocolor.getAlpha().getValue()
12803 # : 1.0;
12804 #
12805 # return new java.awt.Color(
12806 # protocolor.getRed(),
12807 # protocolor.getGreen(),
12808 # protocolor.getBlue(),
12809 # alpha);
12810 # }
12811 #
12812 # public static Color toProto(java.awt.Color color) {
12813 # float red = (float) color.getRed();
12814 # float green = (float) color.getGreen();
12815 # float blue = (float) color.getBlue();
12816 # float denominator = 255.0;
12817 # Color.Builder resultBuilder =
12818 # Color
12819 # .newBuilder()
12820 # .setRed(red / denominator)
12821 # .setGreen(green / denominator)
12822 # .setBlue(blue / denominator);
12823 # int alpha = color.getAlpha();
12824 # if (alpha != 255) {
12825 # result.setAlpha(
12826 # FloatValue
12827 # .newBuilder()
12828 # .setValue(((float) alpha) / denominator)
12829 # .build());
12830 # }
12831 # return resultBuilder.build();
12832 # }
12833 # // ...
12834 #
12835 # Example (iOS / Obj-C):
12836 #
12837 # // ...
12838 # static UIColor* fromProto(Color* protocolor) {
12839 # float red = [protocolor red];
12840 # float green = [protocolor green];
12841 # float blue = [protocolor blue];
12842 # FloatValue* alpha_wrapper = [protocolor alpha];
12843 # float alpha = 1.0;
12844 # if (alpha_wrapper != nil) {
12845 # alpha = [alpha_wrapper value];
12846 # }
12847 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12848 # }
12849 #
12850 # static Color* toProto(UIColor* color) {
12851 # CGFloat red, green, blue, alpha;
12852 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12853 # return nil;
12854 # }
12855 # Color* result = [Color alloc] init];
12856 # [result setRed:red];
12857 # [result setGreen:green];
12858 # [result setBlue:blue];
12859 # if (alpha <= 0.9999) {
12860 # [result setAlpha:floatWrapperWithValue(alpha)];
12861 # }
12862 # [result autorelease];
12863 # return result;
12864 # }
12865 # // ...
12866 #
12867 # Example (JavaScript):
12868 #
12869 # // ...
12870 #
12871 # var protoToCssColor = function(rgb_color) {
12872 # var redFrac = rgb_color.red || 0.0;
12873 # var greenFrac = rgb_color.green || 0.0;
12874 # var blueFrac = rgb_color.blue || 0.0;
12875 # var red = Math.floor(redFrac * 255);
12876 # var green = Math.floor(greenFrac * 255);
12877 # var blue = Math.floor(blueFrac * 255);
12878 #
12879 # if (!('alpha' in rgb_color)) {
12880 # return rgbToCssColor_(red, green, blue);
12881 # }
12882 #
12883 # var alphaFrac = rgb_color.alpha.value || 0.0;
12884 # var rgbParams = [red, green, blue].join(',');
12885 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12886 # };
12887 #
12888 # var rgbToCssColor_ = function(red, green, blue) {
12889 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12890 # var hexString = rgbNumber.toString(16);
12891 # var missingZeros = 6 - hexString.length;
12892 # var resultBuilder = ['#'];
12893 # for (var i = 0; i < missingZeros; i++) {
12894 # resultBuilder.push('0');
12895 # }
12896 # resultBuilder.push(hexString);
12897 # return resultBuilder.join('');
12898 # };
12899 #
12900 # // ...
12901 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12902 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12903 # the final pixel color is defined by the equation:
12904 #
12905 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12906 #
12907 # This means that a value of 1.0 corresponds to a solid color, whereas
12908 # a value of 0.0 corresponds to a completely transparent color. This
12909 # uses a wrapper message rather than a simple float scalar so that it is
12910 # possible to distinguish between a default value and the value being unset.
12911 # If omitted, this color object is to be rendered as a solid color
12912 # (as if the alpha value had been explicitly given with a value of 1.0).
12913 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12914 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12915 },
12916 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012917 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012918 "style": "A String", # The style of the border.
12919 },
12920 },
12921 "cutPaste": { # Moves data from the source to the destination. # Cuts data from one area and pastes it to another.
12922 "pasteType": "A String", # What kind of data to paste. All the source data will be cut, regardless
12923 # of what is pasted.
12924 "source": { # A range on a sheet. # The source data to cut.
12925 # All indexes are zero-based.
12926 # Indexes are half open, e.g the start index is inclusive
12927 # and the end index is exclusive -- [start_index, end_index).
12928 # Missing indexes indicate the range is unbounded on that side.
12929 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012930 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012931 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012932 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012933 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012934 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012935 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012936 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012937 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012938 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012939 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012940 # `Sheet1!A:B == sheet_id: 0,
12941 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012942 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012943 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012944 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012945 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012946 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012947 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012948 #
12949 # The start index must always be less than or equal to the end index.
12950 # If the start index equals the end index, then the range is empty.
12951 # Empty ranges are typically not meaningful and are usually rendered in the
12952 # UI as `#REF!`.
12953 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12954 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12955 "sheetId": 42, # The sheet this range is on.
12956 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12957 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12958 },
12959 "destination": { # A coordinate in a sheet. # The top-left coordinate where the data should be pasted.
12960 # All indexes are zero-based.
12961 "rowIndex": 42, # The row index of the coordinate.
12962 "columnIndex": 42, # The column index of the coordinate.
12963 "sheetId": 42, # The sheet this coordinate is on.
12964 },
12965 },
12966 "copyPaste": { # Copies data from the source to the destination. # Copies data from one area and pastes it to another.
12967 "pasteType": "A String", # What kind of data to paste.
12968 "source": { # A range on a sheet. # The source range to copy.
12969 # All indexes are zero-based.
12970 # Indexes are half open, e.g the start index is inclusive
12971 # and the end index is exclusive -- [start_index, end_index).
12972 # Missing indexes indicate the range is unbounded on that side.
12973 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012974 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012975 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012976 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012977 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012978 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012979 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012980 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012981 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012982 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012983 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012984 # `Sheet1!A:B == sheet_id: 0,
12985 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012986 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012987 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012988 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012989 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012990 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012991 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012992 #
12993 # The start index must always be less than or equal to the end index.
12994 # If the start index equals the end index, then the range is empty.
12995 # Empty ranges are typically not meaningful and are usually rendered in the
12996 # UI as `#REF!`.
12997 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12998 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12999 "sheetId": 42, # The sheet this range is on.
13000 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13001 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13002 },
13003 "destination": { # A range on a sheet. # The location to paste to. If the range covers a span that's
13004 # a multiple of the source's height or width, then the
13005 # data will be repeated to fill in the destination range.
13006 # If the range is smaller than the source range, the entire
13007 # source data will still be copied (beyond the end of the destination range).
13008 # All indexes are zero-based.
13009 # Indexes are half open, e.g the start index is inclusive
13010 # and the end index is exclusive -- [start_index, end_index).
13011 # Missing indexes indicate the range is unbounded on that side.
13012 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013013 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013014 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013015 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013016 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013017 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013018 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013019 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013020 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013021 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013022 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013023 # `Sheet1!A:B == sheet_id: 0,
13024 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013025 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013026 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013027 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013028 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013029 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013030 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013031 #
13032 # The start index must always be less than or equal to the end index.
13033 # If the start index equals the end index, then the range is empty.
13034 # Empty ranges are typically not meaningful and are usually rendered in the
13035 # UI as `#REF!`.
13036 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13037 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13038 "sheetId": 42, # The sheet this range is on.
13039 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13040 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13041 },
13042 "pasteOrientation": "A String", # How that data should be oriented when pasting.
13043 },
13044 "addSheet": { # Adds a new sheet. # Adds a sheet.
13045 # When a sheet is added at a given index,
13046 # all subsequent sheets' indexes are incremented.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013047 # To add an object sheet, use AddChartRequest instead and specify
13048 # EmbeddedObjectPosition.sheetId or
13049 # EmbeddedObjectPosition.newSheet.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013050 "properties": { # Properties of a sheet. # The properties the new sheet should have.
13051 # All properties are optional.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013052 # The sheetId field is optional; if one is not
13053 # set, an id will be randomly generated. (It is an error to specify the ID
13054 # of a sheet that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013055 "sheetType": "A String", # The type of sheet. Defaults to GRID.
13056 # This field cannot be changed once set.
13057 "index": 42, # The index of the sheet within the spreadsheet.
13058 # When adding or updating sheet properties, if this field
13059 # is excluded then the sheet will be added or moved to the end
13060 # of the sheet list.
13061 "title": "A String", # The name of the sheet.
13062 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
13063 # (If the sheet is an object sheet, containing a chart or image, then
13064 # this field will be absent.)
13065 # When writing it is an error to set any grid properties on non-grid sheets.
13066 "columnCount": 42, # The number of columns in the grid.
13067 "rowCount": 42, # The number of rows in the grid.
13068 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
13069 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
13070 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
13071 },
13072 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
13073 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
13074 # for simplicity of conversion to/from color representations in various
13075 # languages over compactness; for example, the fields of this representation
13076 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13077 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13078 # method in iOS; and, with just a little work, it can be easily formatted into
13079 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13080 #
13081 # Example (Java):
13082 #
13083 # import com.google.type.Color;
13084 #
13085 # // ...
13086 # public static java.awt.Color fromProto(Color protocolor) {
13087 # float alpha = protocolor.hasAlpha()
13088 # ? protocolor.getAlpha().getValue()
13089 # : 1.0;
13090 #
13091 # return new java.awt.Color(
13092 # protocolor.getRed(),
13093 # protocolor.getGreen(),
13094 # protocolor.getBlue(),
13095 # alpha);
13096 # }
13097 #
13098 # public static Color toProto(java.awt.Color color) {
13099 # float red = (float) color.getRed();
13100 # float green = (float) color.getGreen();
13101 # float blue = (float) color.getBlue();
13102 # float denominator = 255.0;
13103 # Color.Builder resultBuilder =
13104 # Color
13105 # .newBuilder()
13106 # .setRed(red / denominator)
13107 # .setGreen(green / denominator)
13108 # .setBlue(blue / denominator);
13109 # int alpha = color.getAlpha();
13110 # if (alpha != 255) {
13111 # result.setAlpha(
13112 # FloatValue
13113 # .newBuilder()
13114 # .setValue(((float) alpha) / denominator)
13115 # .build());
13116 # }
13117 # return resultBuilder.build();
13118 # }
13119 # // ...
13120 #
13121 # Example (iOS / Obj-C):
13122 #
13123 # // ...
13124 # static UIColor* fromProto(Color* protocolor) {
13125 # float red = [protocolor red];
13126 # float green = [protocolor green];
13127 # float blue = [protocolor blue];
13128 # FloatValue* alpha_wrapper = [protocolor alpha];
13129 # float alpha = 1.0;
13130 # if (alpha_wrapper != nil) {
13131 # alpha = [alpha_wrapper value];
13132 # }
13133 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13134 # }
13135 #
13136 # static Color* toProto(UIColor* color) {
13137 # CGFloat red, green, blue, alpha;
13138 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13139 # return nil;
13140 # }
13141 # Color* result = [Color alloc] init];
13142 # [result setRed:red];
13143 # [result setGreen:green];
13144 # [result setBlue:blue];
13145 # if (alpha <= 0.9999) {
13146 # [result setAlpha:floatWrapperWithValue(alpha)];
13147 # }
13148 # [result autorelease];
13149 # return result;
13150 # }
13151 # // ...
13152 #
13153 # Example (JavaScript):
13154 #
13155 # // ...
13156 #
13157 # var protoToCssColor = function(rgb_color) {
13158 # var redFrac = rgb_color.red || 0.0;
13159 # var greenFrac = rgb_color.green || 0.0;
13160 # var blueFrac = rgb_color.blue || 0.0;
13161 # var red = Math.floor(redFrac * 255);
13162 # var green = Math.floor(greenFrac * 255);
13163 # var blue = Math.floor(blueFrac * 255);
13164 #
13165 # if (!('alpha' in rgb_color)) {
13166 # return rgbToCssColor_(red, green, blue);
13167 # }
13168 #
13169 # var alphaFrac = rgb_color.alpha.value || 0.0;
13170 # var rgbParams = [red, green, blue].join(',');
13171 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13172 # };
13173 #
13174 # var rgbToCssColor_ = function(red, green, blue) {
13175 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13176 # var hexString = rgbNumber.toString(16);
13177 # var missingZeros = 6 - hexString.length;
13178 # var resultBuilder = ['#'];
13179 # for (var i = 0; i < missingZeros; i++) {
13180 # resultBuilder.push('0');
13181 # }
13182 # resultBuilder.push(hexString);
13183 # return resultBuilder.join('');
13184 # };
13185 #
13186 # // ...
13187 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13188 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13189 # the final pixel color is defined by the equation:
13190 #
13191 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13192 #
13193 # This means that a value of 1.0 corresponds to a solid color, whereas
13194 # a value of 0.0 corresponds to a completely transparent color. This
13195 # uses a wrapper message rather than a simple float scalar so that it is
13196 # possible to distinguish between a default value and the value being unset.
13197 # If omitted, this color object is to be rendered as a solid color
13198 # (as if the alpha value had been explicitly given with a value of 1.0).
13199 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13200 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13201 },
13202 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
13203 "sheetId": 42, # The ID of the sheet. Must be non-negative.
13204 # This field cannot be changed once set.
13205 },
13206 },
13207 "deleteNamedRange": { # Removes the named range with the given ID from the spreadsheet. # Deletes a named range.
13208 "namedRangeId": "A String", # The ID of the named range to delete.
13209 },
13210 "updateNamedRange": { # Updates properties of the named range with the specified # Updates a named range.
13211 # namedRangeId.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013212 "fields": "A String", # The fields that should be updated. At least one field must be specified.
13213 # The root `namedRange` is implied and should not be specified.
13214 # A single `"*"` can be used as short-hand for listing every field.
13215 "namedRange": { # A named range. # The named range to update with the new properties.
13216 "namedRangeId": "A String", # The ID of the named range.
13217 "range": { # A range on a sheet. # The range this represents.
13218 # All indexes are zero-based.
13219 # Indexes are half open, e.g the start index is inclusive
13220 # and the end index is exclusive -- [start_index, end_index).
13221 # Missing indexes indicate the range is unbounded on that side.
13222 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013223 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013224 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013225 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013226 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013227 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013228 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013229 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013230 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013231 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013232 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013233 # `Sheet1!A:B == sheet_id: 0,
13234 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013235 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013236 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013237 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013238 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013239 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013240 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013241 #
13242 # The start index must always be less than or equal to the end index.
13243 # If the start index equals the end index, then the range is empty.
13244 # Empty ranges are typically not meaningful and are usually rendered in the
13245 # UI as `#REF!`.
13246 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13247 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13248 "sheetId": 42, # The sheet this range is on.
13249 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13250 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13251 },
13252 "name": "A String", # The name of the named range.
13253 },
13254 },
13255 "insertDimension": { # Inserts rows or columns in a sheet at a particular index. # Inserts new rows or columns in a sheet.
13256 "inheritFromBefore": True or False, # Whether dimension properties should be extended from the dimensions
13257 # before or after the newly inserted dimensions.
13258 # True to inherit from the dimensions before (in which case the start
13259 # index must be greater than 0), and false to inherit from the dimensions
13260 # after.
13261 #
13262 # For example, if row index 0 has red background and row index 1
13263 # has a green background, then inserting 2 rows at index 1 can inherit
13264 # either the green or red background. If `inheritFromBefore` is true,
13265 # the two new rows will be red (because the row before the insertion point
13266 # was red), whereas if `inheritFromBefore` is false, the two new rows will
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013267 # be green (because the row after the insertion point was green).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013268 "range": { # A range along a single dimension on a sheet. # The dimensions to insert. Both the start and end indexes must be bounded.
13269 # All indexes are zero-based.
13270 # Indexes are half open: the start index is inclusive
13271 # and the end index is exclusive.
13272 # Missing indexes indicate the range is unbounded on that side.
13273 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
13274 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
13275 "sheetId": 42, # The sheet this span is on.
13276 "dimension": "A String", # The dimension of the span.
13277 },
13278 },
13279 "updateFilterView": { # Updates properties of the filter view. # Updates the properties of a filter view.
13280 "filter": { # A filter view. # The new properties of the filter view.
13281 "title": "A String", # The name of the filter view.
13282 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
13283 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013284 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013285 # may be set.
13286 "filterViewId": 42, # The ID of the filter view.
13287 "range": { # A range on a sheet. # The range this filter view covers.
13288 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013289 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013290 # may be set.
13291 # All indexes are zero-based.
13292 # Indexes are half open, e.g the start index is inclusive
13293 # and the end index is exclusive -- [start_index, end_index).
13294 # Missing indexes indicate the range is unbounded on that side.
13295 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013296 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013297 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013298 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013299 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013300 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013301 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013302 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013303 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013304 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013305 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013306 # `Sheet1!A:B == sheet_id: 0,
13307 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013308 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013309 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013310 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013311 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013312 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013313 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013314 #
13315 # The start index must always be less than or equal to the end index.
13316 # If the start index equals the end index, then the range is empty.
13317 # Empty ranges are typically not meaningful and are usually rendered in the
13318 # UI as `#REF!`.
13319 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13320 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13321 "sheetId": 42, # The sheet this range is on.
13322 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13323 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13324 },
13325 "sortSpecs": [ # The sort order per column. Later specifications are used when values
13326 # are equal in the earlier specifications.
13327 { # A sort order associated with a specific column or row.
13328 "sortOrder": "A String", # The order data should be sorted.
13329 "dimensionIndex": 42, # The dimension the sort should be applied to.
13330 },
13331 ],
13332 "criteria": { # The criteria for showing/hiding values per column.
13333 # The map's key is the column index, and the value is the criteria for
13334 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013335 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013336 "hiddenValues": [ # Values that should be hidden.
13337 "A String",
13338 ],
13339 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
13340 # (This does not override hiddenValues -- if a value is listed there,
13341 # it will still be hidden.)
13342 # BooleanConditions are used by conditional formatting,
13343 # data validation, and the criteria in filters.
13344 "type": "A String", # The type of condition.
13345 "values": [ # The values of the condition. The number of supported values depends
13346 # on the condition type. Some support zero values,
13347 # others one or two values,
13348 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
13349 { # The value of the condition.
13350 "relativeDate": "A String", # A relative date (based on the current date).
13351 # Valid only if the type is
13352 # DATE_BEFORE,
13353 # DATE_AFTER,
13354 # DATE_ON_OR_BEFORE or
13355 # DATE_ON_OR_AFTER.
13356 #
13357 # Relative dates are not supported in data validation.
13358 # They are supported only in conditional formatting and
13359 # conditional filters.
13360 "userEnteredValue": "A String", # A value the condition is based on.
13361 # The value will be parsed as if the user typed into a cell.
13362 # Formulas are supported (and must begin with an `=`).
13363 },
13364 ],
13365 },
13366 },
13367 },
13368 },
13369 "fields": "A String", # The fields that should be updated. At least one field must be specified.
13370 # The root `filter` is implied and should not be specified.
13371 # A single `"*"` can be used as short-hand for listing every field.
13372 },
13373 "deleteConditionalFormatRule": { # Deletes a conditional format rule at the given index. # Deletes an existing conditional format rule.
13374 # All subsequent rules' indexes are decremented.
13375 "index": 42, # The zero-based index of the rule to be deleted.
13376 "sheetId": 42, # The sheet the rule is being deleted from.
13377 },
13378 },
13379 ],
13380 }
13381
13382 x__xgafv: string, V1 error format.
13383 Allowed values
13384 1 - v1 error format
13385 2 - v2 error format
13386
13387Returns:
13388 An object of the form:
13389
13390 { # The reply for batch updating a spreadsheet.
13391 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
13392 "replies": [ # The reply of the updates. This maps 1:1 with the updates, although
13393 # replies to some requests may be empty.
13394 { # A single response from an update.
13395 "duplicateFilterView": { # The result of a filter view being duplicated. # A reply from duplicating a filter view.
13396 "filter": { # A filter view. # The newly created filter.
13397 "title": "A String", # The name of the filter view.
13398 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
13399 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013400 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013401 # may be set.
13402 "filterViewId": 42, # The ID of the filter view.
13403 "range": { # A range on a sheet. # The range this filter view covers.
13404 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013405 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013406 # may be set.
13407 # All indexes are zero-based.
13408 # Indexes are half open, e.g the start index is inclusive
13409 # and the end index is exclusive -- [start_index, end_index).
13410 # Missing indexes indicate the range is unbounded on that side.
13411 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013412 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013413 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013414 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013415 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013416 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013417 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013418 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013419 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013420 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013421 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013422 # `Sheet1!A:B == sheet_id: 0,
13423 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013424 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013425 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013426 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013427 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013428 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013429 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013430 #
13431 # The start index must always be less than or equal to the end index.
13432 # If the start index equals the end index, then the range is empty.
13433 # Empty ranges are typically not meaningful and are usually rendered in the
13434 # UI as `#REF!`.
13435 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13436 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13437 "sheetId": 42, # The sheet this range is on.
13438 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13439 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13440 },
13441 "sortSpecs": [ # The sort order per column. Later specifications are used when values
13442 # are equal in the earlier specifications.
13443 { # A sort order associated with a specific column or row.
13444 "sortOrder": "A String", # The order data should be sorted.
13445 "dimensionIndex": 42, # The dimension the sort should be applied to.
13446 },
13447 ],
13448 "criteria": { # The criteria for showing/hiding values per column.
13449 # The map's key is the column index, and the value is the criteria for
13450 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013451 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013452 "hiddenValues": [ # Values that should be hidden.
13453 "A String",
13454 ],
13455 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
13456 # (This does not override hiddenValues -- if a value is listed there,
13457 # it will still be hidden.)
13458 # BooleanConditions are used by conditional formatting,
13459 # data validation, and the criteria in filters.
13460 "type": "A String", # The type of condition.
13461 "values": [ # The values of the condition. The number of supported values depends
13462 # on the condition type. Some support zero values,
13463 # others one or two values,
13464 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
13465 { # The value of the condition.
13466 "relativeDate": "A String", # A relative date (based on the current date).
13467 # Valid only if the type is
13468 # DATE_BEFORE,
13469 # DATE_AFTER,
13470 # DATE_ON_OR_BEFORE or
13471 # DATE_ON_OR_AFTER.
13472 #
13473 # Relative dates are not supported in data validation.
13474 # They are supported only in conditional formatting and
13475 # conditional filters.
13476 "userEnteredValue": "A String", # A value the condition is based on.
13477 # The value will be parsed as if the user typed into a cell.
13478 # Formulas are supported (and must begin with an `=`).
13479 },
13480 ],
13481 },
13482 },
13483 },
13484 },
13485 },
13486 "duplicateSheet": { # The result of duplicating a sheet. # A reply from duplicating a sheet.
13487 "properties": { # Properties of a sheet. # The properties of the duplicate sheet.
13488 "sheetType": "A String", # The type of sheet. Defaults to GRID.
13489 # This field cannot be changed once set.
13490 "index": 42, # The index of the sheet within the spreadsheet.
13491 # When adding or updating sheet properties, if this field
13492 # is excluded then the sheet will be added or moved to the end
13493 # of the sheet list.
13494 "title": "A String", # The name of the sheet.
13495 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
13496 # (If the sheet is an object sheet, containing a chart or image, then
13497 # this field will be absent.)
13498 # When writing it is an error to set any grid properties on non-grid sheets.
13499 "columnCount": 42, # The number of columns in the grid.
13500 "rowCount": 42, # The number of rows in the grid.
13501 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
13502 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
13503 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
13504 },
13505 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
13506 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
13507 # for simplicity of conversion to/from color representations in various
13508 # languages over compactness; for example, the fields of this representation
13509 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13510 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13511 # method in iOS; and, with just a little work, it can be easily formatted into
13512 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13513 #
13514 # Example (Java):
13515 #
13516 # import com.google.type.Color;
13517 #
13518 # // ...
13519 # public static java.awt.Color fromProto(Color protocolor) {
13520 # float alpha = protocolor.hasAlpha()
13521 # ? protocolor.getAlpha().getValue()
13522 # : 1.0;
13523 #
13524 # return new java.awt.Color(
13525 # protocolor.getRed(),
13526 # protocolor.getGreen(),
13527 # protocolor.getBlue(),
13528 # alpha);
13529 # }
13530 #
13531 # public static Color toProto(java.awt.Color color) {
13532 # float red = (float) color.getRed();
13533 # float green = (float) color.getGreen();
13534 # float blue = (float) color.getBlue();
13535 # float denominator = 255.0;
13536 # Color.Builder resultBuilder =
13537 # Color
13538 # .newBuilder()
13539 # .setRed(red / denominator)
13540 # .setGreen(green / denominator)
13541 # .setBlue(blue / denominator);
13542 # int alpha = color.getAlpha();
13543 # if (alpha != 255) {
13544 # result.setAlpha(
13545 # FloatValue
13546 # .newBuilder()
13547 # .setValue(((float) alpha) / denominator)
13548 # .build());
13549 # }
13550 # return resultBuilder.build();
13551 # }
13552 # // ...
13553 #
13554 # Example (iOS / Obj-C):
13555 #
13556 # // ...
13557 # static UIColor* fromProto(Color* protocolor) {
13558 # float red = [protocolor red];
13559 # float green = [protocolor green];
13560 # float blue = [protocolor blue];
13561 # FloatValue* alpha_wrapper = [protocolor alpha];
13562 # float alpha = 1.0;
13563 # if (alpha_wrapper != nil) {
13564 # alpha = [alpha_wrapper value];
13565 # }
13566 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13567 # }
13568 #
13569 # static Color* toProto(UIColor* color) {
13570 # CGFloat red, green, blue, alpha;
13571 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13572 # return nil;
13573 # }
13574 # Color* result = [Color alloc] init];
13575 # [result setRed:red];
13576 # [result setGreen:green];
13577 # [result setBlue:blue];
13578 # if (alpha <= 0.9999) {
13579 # [result setAlpha:floatWrapperWithValue(alpha)];
13580 # }
13581 # [result autorelease];
13582 # return result;
13583 # }
13584 # // ...
13585 #
13586 # Example (JavaScript):
13587 #
13588 # // ...
13589 #
13590 # var protoToCssColor = function(rgb_color) {
13591 # var redFrac = rgb_color.red || 0.0;
13592 # var greenFrac = rgb_color.green || 0.0;
13593 # var blueFrac = rgb_color.blue || 0.0;
13594 # var red = Math.floor(redFrac * 255);
13595 # var green = Math.floor(greenFrac * 255);
13596 # var blue = Math.floor(blueFrac * 255);
13597 #
13598 # if (!('alpha' in rgb_color)) {
13599 # return rgbToCssColor_(red, green, blue);
13600 # }
13601 #
13602 # var alphaFrac = rgb_color.alpha.value || 0.0;
13603 # var rgbParams = [red, green, blue].join(',');
13604 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13605 # };
13606 #
13607 # var rgbToCssColor_ = function(red, green, blue) {
13608 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13609 # var hexString = rgbNumber.toString(16);
13610 # var missingZeros = 6 - hexString.length;
13611 # var resultBuilder = ['#'];
13612 # for (var i = 0; i < missingZeros; i++) {
13613 # resultBuilder.push('0');
13614 # }
13615 # resultBuilder.push(hexString);
13616 # return resultBuilder.join('');
13617 # };
13618 #
13619 # // ...
13620 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13621 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13622 # the final pixel color is defined by the equation:
13623 #
13624 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13625 #
13626 # This means that a value of 1.0 corresponds to a solid color, whereas
13627 # a value of 0.0 corresponds to a completely transparent color. This
13628 # uses a wrapper message rather than a simple float scalar so that it is
13629 # possible to distinguish between a default value and the value being unset.
13630 # If omitted, this color object is to be rendered as a solid color
13631 # (as if the alpha value had been explicitly given with a value of 1.0).
13632 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13633 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13634 },
13635 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
13636 "sheetId": 42, # The ID of the sheet. Must be non-negative.
13637 # This field cannot be changed once set.
13638 },
13639 },
13640 "updateEmbeddedObjectPosition": { # The result of updating an embedded object's position. # A reply from updating an embedded object's position.
13641 "position": { # The position of an embedded object such as a chart. # The new position of the embedded object.
13642 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
13643 # is chosen for you. Used only when writing.
13644 "sheetId": 42, # The sheet this is on. Set only if the embedded object
13645 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013646 "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 -070013647 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
13648 # All indexes are zero-based.
13649 "rowIndex": 42, # The row index of the coordinate.
13650 "columnIndex": 42, # The column index of the coordinate.
13651 "sheetId": 42, # The sheet this coordinate is on.
13652 },
13653 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
13654 # from the anchor cell.
13655 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
13656 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
13657 # from the anchor cell.
13658 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
13659 },
13660 },
13661 },
13662 "addChart": { # The result of adding a chart to a spreadsheet. # A reply from adding a chart.
13663 "chart": { # A chart embedded in a sheet. # The newly added chart.
13664 "chartId": 42, # The ID of the chart.
13665 "position": { # The position of an embedded object such as a chart. # The position of the chart.
13666 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
13667 # is chosen for you. Used only when writing.
13668 "sheetId": 42, # The sheet this is on. Set only if the embedded object
13669 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013670 "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 -070013671 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
13672 # All indexes are zero-based.
13673 "rowIndex": 42, # The row index of the coordinate.
13674 "columnIndex": 42, # The column index of the coordinate.
13675 "sheetId": 42, # The sheet this coordinate is on.
13676 },
13677 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
13678 # from the anchor cell.
13679 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
13680 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
13681 # from the anchor cell.
13682 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
13683 },
13684 },
13685 "spec": { # The specifications of a chart. # The specification of the chart.
13686 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013687 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
13688 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
13689 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
13690 "sources": [ # The ranges of data for a series or domain.
13691 # Exactly one dimension must have a length of 1,
13692 # and all sources in the list must have the same dimension
13693 # with length 1.
13694 # The domain (if it exists) & all series must have the same number
13695 # of source ranges. If using more than one source range, then the source
13696 # range at a given offset must be contiguous across the domain and series.
13697 #
13698 # For example, these are valid configurations:
13699 #
13700 # domain sources: A1:A5
13701 # series1 sources: B1:B5
13702 # series2 sources: D6:D10
13703 #
13704 # domain sources: A1:A5, C10:C12
13705 # series1 sources: B1:B5, D10:D12
13706 # series2 sources: C1:C5, E10:E12
13707 { # A range on a sheet.
13708 # All indexes are zero-based.
13709 # Indexes are half open, e.g the start index is inclusive
13710 # and the end index is exclusive -- [start_index, end_index).
13711 # Missing indexes indicate the range is unbounded on that side.
13712 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013713 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013714 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013715 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013716 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013717 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013718 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013719 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013720 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013721 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013722 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013723 # `Sheet1!A:B == sheet_id: 0,
13724 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013725 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013726 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013727 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013728 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013729 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013730 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013731 #
13732 # The start index must always be less than or equal to the end index.
13733 # If the start index equals the end index, then the range is empty.
13734 # Empty ranges are typically not meaningful and are usually rendered in the
13735 # UI as `#REF!`.
13736 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13737 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13738 "sheetId": 42, # The sheet this range is on.
13739 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13740 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13741 },
13742 ],
13743 },
13744 },
13745 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
13746 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
13747 "sources": [ # The ranges of data for a series or domain.
13748 # Exactly one dimension must have a length of 1,
13749 # and all sources in the list must have the same dimension
13750 # with length 1.
13751 # The domain (if it exists) & all series must have the same number
13752 # of source ranges. If using more than one source range, then the source
13753 # range at a given offset must be contiguous across the domain and series.
13754 #
13755 # For example, these are valid configurations:
13756 #
13757 # domain sources: A1:A5
13758 # series1 sources: B1:B5
13759 # series2 sources: D6:D10
13760 #
13761 # domain sources: A1:A5, C10:C12
13762 # series1 sources: B1:B5, D10:D12
13763 # series2 sources: C1:C5, E10:E12
13764 { # A range on a sheet.
13765 # All indexes are zero-based.
13766 # Indexes are half open, e.g the start index is inclusive
13767 # and the end index is exclusive -- [start_index, end_index).
13768 # Missing indexes indicate the range is unbounded on that side.
13769 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013770 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013771 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013772 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013773 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013774 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013775 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013776 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013777 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013778 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013779 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013780 # `Sheet1!A:B == sheet_id: 0,
13781 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013782 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013783 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013784 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013785 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013786 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013787 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013788 #
13789 # The start index must always be less than or equal to the end index.
13790 # If the start index equals the end index, then the range is empty.
13791 # Empty ranges are typically not meaningful and are usually rendered in the
13792 # UI as `#REF!`.
13793 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13794 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13795 "sheetId": 42, # The sheet this range is on.
13796 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13797 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13798 },
13799 ],
13800 },
13801 },
13802 "threeDimensional": True or False, # True if the pie is three dimensional.
13803 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
13804 "pieHole": 3.14, # The size of the hole in the pie chart.
13805 },
13806 "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 -070013807 # See BasicChartType for the list of all
13808 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013809 # of charts this supports.
13810 "headerCount": 42, # The number of rows or columns in the data that are "headers".
13811 # If not set, Google Sheets will guess how many rows are headers based
13812 # on the data.
13813 #
13814 # (Note that BasicChartAxis.title may override the axis title
13815 # inferred from the header values.)
13816 "series": [ # The data this chart is visualizing.
13817 { # A single series of data in a chart.
13818 # For example, if charting stock prices over time, multiple series may exist,
13819 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
13820 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
13821 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
13822 "sources": [ # The ranges of data for a series or domain.
13823 # Exactly one dimension must have a length of 1,
13824 # and all sources in the list must have the same dimension
13825 # with length 1.
13826 # The domain (if it exists) & all series must have the same number
13827 # of source ranges. If using more than one source range, then the source
13828 # range at a given offset must be contiguous across the domain and series.
13829 #
13830 # For example, these are valid configurations:
13831 #
13832 # domain sources: A1:A5
13833 # series1 sources: B1:B5
13834 # series2 sources: D6:D10
13835 #
13836 # domain sources: A1:A5, C10:C12
13837 # series1 sources: B1:B5, D10:D12
13838 # series2 sources: C1:C5, E10:E12
13839 { # A range on a sheet.
13840 # All indexes are zero-based.
13841 # Indexes are half open, e.g the start index is inclusive
13842 # and the end index is exclusive -- [start_index, end_index).
13843 # Missing indexes indicate the range is unbounded on that side.
13844 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013845 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013846 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013847 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013848 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013849 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013850 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013851 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013852 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013853 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013854 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013855 # `Sheet1!A:B == sheet_id: 0,
13856 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013857 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013858 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013859 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013860 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013861 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013862 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013863 #
13864 # The start index must always be less than or equal to the end index.
13865 # If the start index equals the end index, then the range is empty.
13866 # Empty ranges are typically not meaningful and are usually rendered in the
13867 # UI as `#REF!`.
13868 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13869 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13870 "sheetId": 42, # The sheet this range is on.
13871 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13872 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13873 },
13874 ],
13875 },
13876 },
13877 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
13878 # For example, if charting stocks over time, the "Volume" series
13879 # may want to be pinned to the right with the prices pinned to the left,
13880 # because the scale of trading volume is different than the scale of
13881 # prices.
13882 # It is an error to specify an axis that isn't a valid minor axis
13883 # for the chart's type.
13884 "type": "A String", # The type of this series. Valid only if the
13885 # chartType is
13886 # COMBO.
13887 # Different types will change the way the series is visualized.
13888 # Only LINE, AREA,
13889 # and COLUMN are supported.
13890 },
13891 ],
13892 "legendPosition": "A String", # The position of the chart legend.
13893 "domains": [ # The domain of data this is charting.
13894 # Only a single domain is currently supported.
13895 { # The domain of a chart.
13896 # For example, if charting stock prices over time, this would be the date.
13897 "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 -070013898 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013899 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
13900 "sources": [ # The ranges of data for a series or domain.
13901 # Exactly one dimension must have a length of 1,
13902 # and all sources in the list must have the same dimension
13903 # with length 1.
13904 # The domain (if it exists) & all series must have the same number
13905 # of source ranges. If using more than one source range, then the source
13906 # range at a given offset must be contiguous across the domain and series.
13907 #
13908 # For example, these are valid configurations:
13909 #
13910 # domain sources: A1:A5
13911 # series1 sources: B1:B5
13912 # series2 sources: D6:D10
13913 #
13914 # domain sources: A1:A5, C10:C12
13915 # series1 sources: B1:B5, D10:D12
13916 # series2 sources: C1:C5, E10:E12
13917 { # A range on a sheet.
13918 # All indexes are zero-based.
13919 # Indexes are half open, e.g the start index is inclusive
13920 # and the end index is exclusive -- [start_index, end_index).
13921 # Missing indexes indicate the range is unbounded on that side.
13922 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013923 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013924 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013925 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013926 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013927 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013928 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013929 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013930 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013931 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013932 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013933 # `Sheet1!A:B == sheet_id: 0,
13934 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013935 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013936 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013937 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013938 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013939 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013940 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013941 #
13942 # The start index must always be less than or equal to the end index.
13943 # If the start index equals the end index, then the range is empty.
13944 # Empty ranges are typically not meaningful and are usually rendered in the
13945 # UI as `#REF!`.
13946 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13947 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13948 "sheetId": 42, # The sheet this range is on.
13949 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13950 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13951 },
13952 ],
13953 },
13954 },
13955 },
13956 ],
13957 "chartType": "A String", # The type of the chart.
13958 "axis": [ # The axis on the chart.
13959 { # An axis of the chart.
13960 # A chart may not have more than one axis per
13961 # axis position.
13962 "position": "A String", # The position of this axis.
13963 "format": { # The format of a run of text in a cell. # The format of the title.
13964 # Only valid if the axis is not associated with the domain.
13965 # Absent values indicate that the field isn't specified.
13966 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
13967 # for simplicity of conversion to/from color representations in various
13968 # languages over compactness; for example, the fields of this representation
13969 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13970 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13971 # method in iOS; and, with just a little work, it can be easily formatted into
13972 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13973 #
13974 # Example (Java):
13975 #
13976 # import com.google.type.Color;
13977 #
13978 # // ...
13979 # public static java.awt.Color fromProto(Color protocolor) {
13980 # float alpha = protocolor.hasAlpha()
13981 # ? protocolor.getAlpha().getValue()
13982 # : 1.0;
13983 #
13984 # return new java.awt.Color(
13985 # protocolor.getRed(),
13986 # protocolor.getGreen(),
13987 # protocolor.getBlue(),
13988 # alpha);
13989 # }
13990 #
13991 # public static Color toProto(java.awt.Color color) {
13992 # float red = (float) color.getRed();
13993 # float green = (float) color.getGreen();
13994 # float blue = (float) color.getBlue();
13995 # float denominator = 255.0;
13996 # Color.Builder resultBuilder =
13997 # Color
13998 # .newBuilder()
13999 # .setRed(red / denominator)
14000 # .setGreen(green / denominator)
14001 # .setBlue(blue / denominator);
14002 # int alpha = color.getAlpha();
14003 # if (alpha != 255) {
14004 # result.setAlpha(
14005 # FloatValue
14006 # .newBuilder()
14007 # .setValue(((float) alpha) / denominator)
14008 # .build());
14009 # }
14010 # return resultBuilder.build();
14011 # }
14012 # // ...
14013 #
14014 # Example (iOS / Obj-C):
14015 #
14016 # // ...
14017 # static UIColor* fromProto(Color* protocolor) {
14018 # float red = [protocolor red];
14019 # float green = [protocolor green];
14020 # float blue = [protocolor blue];
14021 # FloatValue* alpha_wrapper = [protocolor alpha];
14022 # float alpha = 1.0;
14023 # if (alpha_wrapper != nil) {
14024 # alpha = [alpha_wrapper value];
14025 # }
14026 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14027 # }
14028 #
14029 # static Color* toProto(UIColor* color) {
14030 # CGFloat red, green, blue, alpha;
14031 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14032 # return nil;
14033 # }
14034 # Color* result = [Color alloc] init];
14035 # [result setRed:red];
14036 # [result setGreen:green];
14037 # [result setBlue:blue];
14038 # if (alpha <= 0.9999) {
14039 # [result setAlpha:floatWrapperWithValue(alpha)];
14040 # }
14041 # [result autorelease];
14042 # return result;
14043 # }
14044 # // ...
14045 #
14046 # Example (JavaScript):
14047 #
14048 # // ...
14049 #
14050 # var protoToCssColor = function(rgb_color) {
14051 # var redFrac = rgb_color.red || 0.0;
14052 # var greenFrac = rgb_color.green || 0.0;
14053 # var blueFrac = rgb_color.blue || 0.0;
14054 # var red = Math.floor(redFrac * 255);
14055 # var green = Math.floor(greenFrac * 255);
14056 # var blue = Math.floor(blueFrac * 255);
14057 #
14058 # if (!('alpha' in rgb_color)) {
14059 # return rgbToCssColor_(red, green, blue);
14060 # }
14061 #
14062 # var alphaFrac = rgb_color.alpha.value || 0.0;
14063 # var rgbParams = [red, green, blue].join(',');
14064 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14065 # };
14066 #
14067 # var rgbToCssColor_ = function(red, green, blue) {
14068 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14069 # var hexString = rgbNumber.toString(16);
14070 # var missingZeros = 6 - hexString.length;
14071 # var resultBuilder = ['#'];
14072 # for (var i = 0; i < missingZeros; i++) {
14073 # resultBuilder.push('0');
14074 # }
14075 # resultBuilder.push(hexString);
14076 # return resultBuilder.join('');
14077 # };
14078 #
14079 # // ...
14080 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14081 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14082 # the final pixel color is defined by the equation:
14083 #
14084 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14085 #
14086 # This means that a value of 1.0 corresponds to a solid color, whereas
14087 # a value of 0.0 corresponds to a completely transparent color. This
14088 # uses a wrapper message rather than a simple float scalar so that it is
14089 # possible to distinguish between a default value and the value being unset.
14090 # If omitted, this color object is to be rendered as a solid color
14091 # (as if the alpha value had been explicitly given with a value of 1.0).
14092 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14093 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14094 },
14095 "bold": True or False, # True if the text is bold.
14096 "strikethrough": True or False, # True if the text has a strikethrough.
14097 "fontFamily": "A String", # The font family.
14098 "fontSize": 42, # The size of the font.
14099 "italic": True or False, # True if the text is italicized.
14100 "underline": True or False, # True if the text is underlined.
14101 },
14102 "title": "A String", # The title of this axis. If set, this overrides any title inferred
14103 # from headers of the data.
14104 },
14105 ],
14106 },
14107 "title": "A String", # The title of the chart.
14108 },
14109 },
14110 },
14111 "updateConditionalFormatRule": { # The result of updating a conditional format rule. # A reply from updating a conditional format rule.
14112 "oldIndex": 42, # The old index of the rule. Not set if a rule was replaced
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014113 # (because it is the same as new_index).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014114 "newIndex": 42, # The index of the new rule.
14115 "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 -070014116 # (because it is the same as new_rule).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014117 "ranges": [ # The ranges that will be formatted if the condition is true.
14118 # All the ranges must be on the same grid.
14119 { # A range on a sheet.
14120 # All indexes are zero-based.
14121 # Indexes are half open, e.g the start index is inclusive
14122 # and the end index is exclusive -- [start_index, end_index).
14123 # Missing indexes indicate the range is unbounded on that side.
14124 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014125 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014126 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014127 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014128 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014129 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014130 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014131 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014132 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014133 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014134 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014135 # `Sheet1!A:B == sheet_id: 0,
14136 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014137 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014138 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014139 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014140 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014141 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014142 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014143 #
14144 # The start index must always be less than or equal to the end index.
14145 # If the start index equals the end index, then the range is empty.
14146 # Empty ranges are typically not meaningful and are usually rendered in the
14147 # UI as `#REF!`.
14148 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
14149 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
14150 "sheetId": 42, # The sheet this range is on.
14151 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
14152 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
14153 },
14154 ],
14155 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
14156 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
14157 # the format will be applied.
14158 # BooleanConditions are used by conditional formatting,
14159 # data validation, and the criteria in filters.
14160 "type": "A String", # The type of condition.
14161 "values": [ # The values of the condition. The number of supported values depends
14162 # on the condition type. Some support zero values,
14163 # others one or two values,
14164 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
14165 { # The value of the condition.
14166 "relativeDate": "A String", # A relative date (based on the current date).
14167 # Valid only if the type is
14168 # DATE_BEFORE,
14169 # DATE_AFTER,
14170 # DATE_ON_OR_BEFORE or
14171 # DATE_ON_OR_AFTER.
14172 #
14173 # Relative dates are not supported in data validation.
14174 # They are supported only in conditional formatting and
14175 # conditional filters.
14176 "userEnteredValue": "A String", # A value the condition is based on.
14177 # The value will be parsed as if the user typed into a cell.
14178 # Formulas are supported (and must begin with an `=`).
14179 },
14180 ],
14181 },
14182 "format": { # The format of a cell. # The format to apply.
14183 # Conditional formatting can only apply a subset of formatting:
14184 # bold, italic,
14185 # strikethrough,
14186 # foreground color &
14187 # background color.
14188 "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 -070014189 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
14190 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070014191 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
14192 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014193 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014194 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014195 },
14196 "textDirection": "A String", # The direction of the text in the cell.
14197 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
14198 # When updating padding, every field must be specified.
14199 "top": 42, # The top padding of the cell.
14200 "right": 42, # The right padding of the cell.
14201 "bottom": 42, # The bottom padding of the cell.
14202 "left": 42, # The left padding of the cell.
14203 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014204 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014205 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
14206 # for simplicity of conversion to/from color representations in various
14207 # languages over compactness; for example, the fields of this representation
14208 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14209 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14210 # method in iOS; and, with just a little work, it can be easily formatted into
14211 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14212 #
14213 # Example (Java):
14214 #
14215 # import com.google.type.Color;
14216 #
14217 # // ...
14218 # public static java.awt.Color fromProto(Color protocolor) {
14219 # float alpha = protocolor.hasAlpha()
14220 # ? protocolor.getAlpha().getValue()
14221 # : 1.0;
14222 #
14223 # return new java.awt.Color(
14224 # protocolor.getRed(),
14225 # protocolor.getGreen(),
14226 # protocolor.getBlue(),
14227 # alpha);
14228 # }
14229 #
14230 # public static Color toProto(java.awt.Color color) {
14231 # float red = (float) color.getRed();
14232 # float green = (float) color.getGreen();
14233 # float blue = (float) color.getBlue();
14234 # float denominator = 255.0;
14235 # Color.Builder resultBuilder =
14236 # Color
14237 # .newBuilder()
14238 # .setRed(red / denominator)
14239 # .setGreen(green / denominator)
14240 # .setBlue(blue / denominator);
14241 # int alpha = color.getAlpha();
14242 # if (alpha != 255) {
14243 # result.setAlpha(
14244 # FloatValue
14245 # .newBuilder()
14246 # .setValue(((float) alpha) / denominator)
14247 # .build());
14248 # }
14249 # return resultBuilder.build();
14250 # }
14251 # // ...
14252 #
14253 # Example (iOS / Obj-C):
14254 #
14255 # // ...
14256 # static UIColor* fromProto(Color* protocolor) {
14257 # float red = [protocolor red];
14258 # float green = [protocolor green];
14259 # float blue = [protocolor blue];
14260 # FloatValue* alpha_wrapper = [protocolor alpha];
14261 # float alpha = 1.0;
14262 # if (alpha_wrapper != nil) {
14263 # alpha = [alpha_wrapper value];
14264 # }
14265 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14266 # }
14267 #
14268 # static Color* toProto(UIColor* color) {
14269 # CGFloat red, green, blue, alpha;
14270 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14271 # return nil;
14272 # }
14273 # Color* result = [Color alloc] init];
14274 # [result setRed:red];
14275 # [result setGreen:green];
14276 # [result setBlue:blue];
14277 # if (alpha <= 0.9999) {
14278 # [result setAlpha:floatWrapperWithValue(alpha)];
14279 # }
14280 # [result autorelease];
14281 # return result;
14282 # }
14283 # // ...
14284 #
14285 # Example (JavaScript):
14286 #
14287 # // ...
14288 #
14289 # var protoToCssColor = function(rgb_color) {
14290 # var redFrac = rgb_color.red || 0.0;
14291 # var greenFrac = rgb_color.green || 0.0;
14292 # var blueFrac = rgb_color.blue || 0.0;
14293 # var red = Math.floor(redFrac * 255);
14294 # var green = Math.floor(greenFrac * 255);
14295 # var blue = Math.floor(blueFrac * 255);
14296 #
14297 # if (!('alpha' in rgb_color)) {
14298 # return rgbToCssColor_(red, green, blue);
14299 # }
14300 #
14301 # var alphaFrac = rgb_color.alpha.value || 0.0;
14302 # var rgbParams = [red, green, blue].join(',');
14303 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14304 # };
14305 #
14306 # var rgbToCssColor_ = function(red, green, blue) {
14307 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14308 # var hexString = rgbNumber.toString(16);
14309 # var missingZeros = 6 - hexString.length;
14310 # var resultBuilder = ['#'];
14311 # for (var i = 0; i < missingZeros; i++) {
14312 # resultBuilder.push('0');
14313 # }
14314 # resultBuilder.push(hexString);
14315 # return resultBuilder.join('');
14316 # };
14317 #
14318 # // ...
14319 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14320 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14321 # the final pixel color is defined by the equation:
14322 #
14323 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14324 #
14325 # This means that a value of 1.0 corresponds to a solid color, whereas
14326 # a value of 0.0 corresponds to a completely transparent color. This
14327 # uses a wrapper message rather than a simple float scalar so that it is
14328 # possible to distinguish between a default value and the value being unset.
14329 # If omitted, this color object is to be rendered as a solid color
14330 # (as if the alpha value had been explicitly given with a value of 1.0).
14331 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14332 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14333 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014334 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014335 "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).
14336 # Absent values indicate that the field isn't specified.
14337 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
14338 # for simplicity of conversion to/from color representations in various
14339 # languages over compactness; for example, the fields of this representation
14340 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14341 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14342 # method in iOS; and, with just a little work, it can be easily formatted into
14343 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14344 #
14345 # Example (Java):
14346 #
14347 # import com.google.type.Color;
14348 #
14349 # // ...
14350 # public static java.awt.Color fromProto(Color protocolor) {
14351 # float alpha = protocolor.hasAlpha()
14352 # ? protocolor.getAlpha().getValue()
14353 # : 1.0;
14354 #
14355 # return new java.awt.Color(
14356 # protocolor.getRed(),
14357 # protocolor.getGreen(),
14358 # protocolor.getBlue(),
14359 # alpha);
14360 # }
14361 #
14362 # public static Color toProto(java.awt.Color color) {
14363 # float red = (float) color.getRed();
14364 # float green = (float) color.getGreen();
14365 # float blue = (float) color.getBlue();
14366 # float denominator = 255.0;
14367 # Color.Builder resultBuilder =
14368 # Color
14369 # .newBuilder()
14370 # .setRed(red / denominator)
14371 # .setGreen(green / denominator)
14372 # .setBlue(blue / denominator);
14373 # int alpha = color.getAlpha();
14374 # if (alpha != 255) {
14375 # result.setAlpha(
14376 # FloatValue
14377 # .newBuilder()
14378 # .setValue(((float) alpha) / denominator)
14379 # .build());
14380 # }
14381 # return resultBuilder.build();
14382 # }
14383 # // ...
14384 #
14385 # Example (iOS / Obj-C):
14386 #
14387 # // ...
14388 # static UIColor* fromProto(Color* protocolor) {
14389 # float red = [protocolor red];
14390 # float green = [protocolor green];
14391 # float blue = [protocolor blue];
14392 # FloatValue* alpha_wrapper = [protocolor alpha];
14393 # float alpha = 1.0;
14394 # if (alpha_wrapper != nil) {
14395 # alpha = [alpha_wrapper value];
14396 # }
14397 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14398 # }
14399 #
14400 # static Color* toProto(UIColor* color) {
14401 # CGFloat red, green, blue, alpha;
14402 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14403 # return nil;
14404 # }
14405 # Color* result = [Color alloc] init];
14406 # [result setRed:red];
14407 # [result setGreen:green];
14408 # [result setBlue:blue];
14409 # if (alpha <= 0.9999) {
14410 # [result setAlpha:floatWrapperWithValue(alpha)];
14411 # }
14412 # [result autorelease];
14413 # return result;
14414 # }
14415 # // ...
14416 #
14417 # Example (JavaScript):
14418 #
14419 # // ...
14420 #
14421 # var protoToCssColor = function(rgb_color) {
14422 # var redFrac = rgb_color.red || 0.0;
14423 # var greenFrac = rgb_color.green || 0.0;
14424 # var blueFrac = rgb_color.blue || 0.0;
14425 # var red = Math.floor(redFrac * 255);
14426 # var green = Math.floor(greenFrac * 255);
14427 # var blue = Math.floor(blueFrac * 255);
14428 #
14429 # if (!('alpha' in rgb_color)) {
14430 # return rgbToCssColor_(red, green, blue);
14431 # }
14432 #
14433 # var alphaFrac = rgb_color.alpha.value || 0.0;
14434 # var rgbParams = [red, green, blue].join(',');
14435 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14436 # };
14437 #
14438 # var rgbToCssColor_ = function(red, green, blue) {
14439 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14440 # var hexString = rgbNumber.toString(16);
14441 # var missingZeros = 6 - hexString.length;
14442 # var resultBuilder = ['#'];
14443 # for (var i = 0; i < missingZeros; i++) {
14444 # resultBuilder.push('0');
14445 # }
14446 # resultBuilder.push(hexString);
14447 # return resultBuilder.join('');
14448 # };
14449 #
14450 # // ...
14451 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14452 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14453 # the final pixel color is defined by the equation:
14454 #
14455 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14456 #
14457 # This means that a value of 1.0 corresponds to a solid color, whereas
14458 # a value of 0.0 corresponds to a completely transparent color. This
14459 # uses a wrapper message rather than a simple float scalar so that it is
14460 # possible to distinguish between a default value and the value being unset.
14461 # If omitted, this color object is to be rendered as a solid color
14462 # (as if the alpha value had been explicitly given with a value of 1.0).
14463 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14464 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14465 },
14466 "bold": True or False, # True if the text is bold.
14467 "strikethrough": True or False, # True if the text has a strikethrough.
14468 "fontFamily": "A String", # The font family.
14469 "fontSize": 42, # The size of the font.
14470 "italic": True or False, # True if the text is italicized.
14471 "underline": True or False, # True if the text is underlined.
14472 },
14473 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
14474 "borders": { # The borders of the cell. # The borders of the cell.
14475 "top": { # A border along a cell. # The top border of the cell.
14476 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14477 # for simplicity of conversion to/from color representations in various
14478 # languages over compactness; for example, the fields of this representation
14479 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14480 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14481 # method in iOS; and, with just a little work, it can be easily formatted into
14482 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14483 #
14484 # Example (Java):
14485 #
14486 # import com.google.type.Color;
14487 #
14488 # // ...
14489 # public static java.awt.Color fromProto(Color protocolor) {
14490 # float alpha = protocolor.hasAlpha()
14491 # ? protocolor.getAlpha().getValue()
14492 # : 1.0;
14493 #
14494 # return new java.awt.Color(
14495 # protocolor.getRed(),
14496 # protocolor.getGreen(),
14497 # protocolor.getBlue(),
14498 # alpha);
14499 # }
14500 #
14501 # public static Color toProto(java.awt.Color color) {
14502 # float red = (float) color.getRed();
14503 # float green = (float) color.getGreen();
14504 # float blue = (float) color.getBlue();
14505 # float denominator = 255.0;
14506 # Color.Builder resultBuilder =
14507 # Color
14508 # .newBuilder()
14509 # .setRed(red / denominator)
14510 # .setGreen(green / denominator)
14511 # .setBlue(blue / denominator);
14512 # int alpha = color.getAlpha();
14513 # if (alpha != 255) {
14514 # result.setAlpha(
14515 # FloatValue
14516 # .newBuilder()
14517 # .setValue(((float) alpha) / denominator)
14518 # .build());
14519 # }
14520 # return resultBuilder.build();
14521 # }
14522 # // ...
14523 #
14524 # Example (iOS / Obj-C):
14525 #
14526 # // ...
14527 # static UIColor* fromProto(Color* protocolor) {
14528 # float red = [protocolor red];
14529 # float green = [protocolor green];
14530 # float blue = [protocolor blue];
14531 # FloatValue* alpha_wrapper = [protocolor alpha];
14532 # float alpha = 1.0;
14533 # if (alpha_wrapper != nil) {
14534 # alpha = [alpha_wrapper value];
14535 # }
14536 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14537 # }
14538 #
14539 # static Color* toProto(UIColor* color) {
14540 # CGFloat red, green, blue, alpha;
14541 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14542 # return nil;
14543 # }
14544 # Color* result = [Color alloc] init];
14545 # [result setRed:red];
14546 # [result setGreen:green];
14547 # [result setBlue:blue];
14548 # if (alpha <= 0.9999) {
14549 # [result setAlpha:floatWrapperWithValue(alpha)];
14550 # }
14551 # [result autorelease];
14552 # return result;
14553 # }
14554 # // ...
14555 #
14556 # Example (JavaScript):
14557 #
14558 # // ...
14559 #
14560 # var protoToCssColor = function(rgb_color) {
14561 # var redFrac = rgb_color.red || 0.0;
14562 # var greenFrac = rgb_color.green || 0.0;
14563 # var blueFrac = rgb_color.blue || 0.0;
14564 # var red = Math.floor(redFrac * 255);
14565 # var green = Math.floor(greenFrac * 255);
14566 # var blue = Math.floor(blueFrac * 255);
14567 #
14568 # if (!('alpha' in rgb_color)) {
14569 # return rgbToCssColor_(red, green, blue);
14570 # }
14571 #
14572 # var alphaFrac = rgb_color.alpha.value || 0.0;
14573 # var rgbParams = [red, green, blue].join(',');
14574 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14575 # };
14576 #
14577 # var rgbToCssColor_ = function(red, green, blue) {
14578 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14579 # var hexString = rgbNumber.toString(16);
14580 # var missingZeros = 6 - hexString.length;
14581 # var resultBuilder = ['#'];
14582 # for (var i = 0; i < missingZeros; i++) {
14583 # resultBuilder.push('0');
14584 # }
14585 # resultBuilder.push(hexString);
14586 # return resultBuilder.join('');
14587 # };
14588 #
14589 # // ...
14590 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14591 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14592 # the final pixel color is defined by the equation:
14593 #
14594 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14595 #
14596 # This means that a value of 1.0 corresponds to a solid color, whereas
14597 # a value of 0.0 corresponds to a completely transparent color. This
14598 # uses a wrapper message rather than a simple float scalar so that it is
14599 # possible to distinguish between a default value and the value being unset.
14600 # If omitted, this color object is to be rendered as a solid color
14601 # (as if the alpha value had been explicitly given with a value of 1.0).
14602 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14603 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14604 },
14605 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014606 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014607 "style": "A String", # The style of the border.
14608 },
14609 "right": { # A border along a cell. # The right border of the cell.
14610 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14611 # for simplicity of conversion to/from color representations in various
14612 # languages over compactness; for example, the fields of this representation
14613 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14614 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14615 # method in iOS; and, with just a little work, it can be easily formatted into
14616 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14617 #
14618 # Example (Java):
14619 #
14620 # import com.google.type.Color;
14621 #
14622 # // ...
14623 # public static java.awt.Color fromProto(Color protocolor) {
14624 # float alpha = protocolor.hasAlpha()
14625 # ? protocolor.getAlpha().getValue()
14626 # : 1.0;
14627 #
14628 # return new java.awt.Color(
14629 # protocolor.getRed(),
14630 # protocolor.getGreen(),
14631 # protocolor.getBlue(),
14632 # alpha);
14633 # }
14634 #
14635 # public static Color toProto(java.awt.Color color) {
14636 # float red = (float) color.getRed();
14637 # float green = (float) color.getGreen();
14638 # float blue = (float) color.getBlue();
14639 # float denominator = 255.0;
14640 # Color.Builder resultBuilder =
14641 # Color
14642 # .newBuilder()
14643 # .setRed(red / denominator)
14644 # .setGreen(green / denominator)
14645 # .setBlue(blue / denominator);
14646 # int alpha = color.getAlpha();
14647 # if (alpha != 255) {
14648 # result.setAlpha(
14649 # FloatValue
14650 # .newBuilder()
14651 # .setValue(((float) alpha) / denominator)
14652 # .build());
14653 # }
14654 # return resultBuilder.build();
14655 # }
14656 # // ...
14657 #
14658 # Example (iOS / Obj-C):
14659 #
14660 # // ...
14661 # static UIColor* fromProto(Color* protocolor) {
14662 # float red = [protocolor red];
14663 # float green = [protocolor green];
14664 # float blue = [protocolor blue];
14665 # FloatValue* alpha_wrapper = [protocolor alpha];
14666 # float alpha = 1.0;
14667 # if (alpha_wrapper != nil) {
14668 # alpha = [alpha_wrapper value];
14669 # }
14670 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14671 # }
14672 #
14673 # static Color* toProto(UIColor* color) {
14674 # CGFloat red, green, blue, alpha;
14675 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14676 # return nil;
14677 # }
14678 # Color* result = [Color alloc] init];
14679 # [result setRed:red];
14680 # [result setGreen:green];
14681 # [result setBlue:blue];
14682 # if (alpha <= 0.9999) {
14683 # [result setAlpha:floatWrapperWithValue(alpha)];
14684 # }
14685 # [result autorelease];
14686 # return result;
14687 # }
14688 # // ...
14689 #
14690 # Example (JavaScript):
14691 #
14692 # // ...
14693 #
14694 # var protoToCssColor = function(rgb_color) {
14695 # var redFrac = rgb_color.red || 0.0;
14696 # var greenFrac = rgb_color.green || 0.0;
14697 # var blueFrac = rgb_color.blue || 0.0;
14698 # var red = Math.floor(redFrac * 255);
14699 # var green = Math.floor(greenFrac * 255);
14700 # var blue = Math.floor(blueFrac * 255);
14701 #
14702 # if (!('alpha' in rgb_color)) {
14703 # return rgbToCssColor_(red, green, blue);
14704 # }
14705 #
14706 # var alphaFrac = rgb_color.alpha.value || 0.0;
14707 # var rgbParams = [red, green, blue].join(',');
14708 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14709 # };
14710 #
14711 # var rgbToCssColor_ = function(red, green, blue) {
14712 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14713 # var hexString = rgbNumber.toString(16);
14714 # var missingZeros = 6 - hexString.length;
14715 # var resultBuilder = ['#'];
14716 # for (var i = 0; i < missingZeros; i++) {
14717 # resultBuilder.push('0');
14718 # }
14719 # resultBuilder.push(hexString);
14720 # return resultBuilder.join('');
14721 # };
14722 #
14723 # // ...
14724 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14725 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14726 # the final pixel color is defined by the equation:
14727 #
14728 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14729 #
14730 # This means that a value of 1.0 corresponds to a solid color, whereas
14731 # a value of 0.0 corresponds to a completely transparent color. This
14732 # uses a wrapper message rather than a simple float scalar so that it is
14733 # possible to distinguish between a default value and the value being unset.
14734 # If omitted, this color object is to be rendered as a solid color
14735 # (as if the alpha value had been explicitly given with a value of 1.0).
14736 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14737 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14738 },
14739 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014740 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014741 "style": "A String", # The style of the border.
14742 },
14743 "bottom": { # A border along a cell. # The bottom border of the cell.
14744 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14745 # for simplicity of conversion to/from color representations in various
14746 # languages over compactness; for example, the fields of this representation
14747 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14748 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14749 # method in iOS; and, with just a little work, it can be easily formatted into
14750 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14751 #
14752 # Example (Java):
14753 #
14754 # import com.google.type.Color;
14755 #
14756 # // ...
14757 # public static java.awt.Color fromProto(Color protocolor) {
14758 # float alpha = protocolor.hasAlpha()
14759 # ? protocolor.getAlpha().getValue()
14760 # : 1.0;
14761 #
14762 # return new java.awt.Color(
14763 # protocolor.getRed(),
14764 # protocolor.getGreen(),
14765 # protocolor.getBlue(),
14766 # alpha);
14767 # }
14768 #
14769 # public static Color toProto(java.awt.Color color) {
14770 # float red = (float) color.getRed();
14771 # float green = (float) color.getGreen();
14772 # float blue = (float) color.getBlue();
14773 # float denominator = 255.0;
14774 # Color.Builder resultBuilder =
14775 # Color
14776 # .newBuilder()
14777 # .setRed(red / denominator)
14778 # .setGreen(green / denominator)
14779 # .setBlue(blue / denominator);
14780 # int alpha = color.getAlpha();
14781 # if (alpha != 255) {
14782 # result.setAlpha(
14783 # FloatValue
14784 # .newBuilder()
14785 # .setValue(((float) alpha) / denominator)
14786 # .build());
14787 # }
14788 # return resultBuilder.build();
14789 # }
14790 # // ...
14791 #
14792 # Example (iOS / Obj-C):
14793 #
14794 # // ...
14795 # static UIColor* fromProto(Color* protocolor) {
14796 # float red = [protocolor red];
14797 # float green = [protocolor green];
14798 # float blue = [protocolor blue];
14799 # FloatValue* alpha_wrapper = [protocolor alpha];
14800 # float alpha = 1.0;
14801 # if (alpha_wrapper != nil) {
14802 # alpha = [alpha_wrapper value];
14803 # }
14804 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14805 # }
14806 #
14807 # static Color* toProto(UIColor* color) {
14808 # CGFloat red, green, blue, alpha;
14809 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14810 # return nil;
14811 # }
14812 # Color* result = [Color alloc] init];
14813 # [result setRed:red];
14814 # [result setGreen:green];
14815 # [result setBlue:blue];
14816 # if (alpha <= 0.9999) {
14817 # [result setAlpha:floatWrapperWithValue(alpha)];
14818 # }
14819 # [result autorelease];
14820 # return result;
14821 # }
14822 # // ...
14823 #
14824 # Example (JavaScript):
14825 #
14826 # // ...
14827 #
14828 # var protoToCssColor = function(rgb_color) {
14829 # var redFrac = rgb_color.red || 0.0;
14830 # var greenFrac = rgb_color.green || 0.0;
14831 # var blueFrac = rgb_color.blue || 0.0;
14832 # var red = Math.floor(redFrac * 255);
14833 # var green = Math.floor(greenFrac * 255);
14834 # var blue = Math.floor(blueFrac * 255);
14835 #
14836 # if (!('alpha' in rgb_color)) {
14837 # return rgbToCssColor_(red, green, blue);
14838 # }
14839 #
14840 # var alphaFrac = rgb_color.alpha.value || 0.0;
14841 # var rgbParams = [red, green, blue].join(',');
14842 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14843 # };
14844 #
14845 # var rgbToCssColor_ = function(red, green, blue) {
14846 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14847 # var hexString = rgbNumber.toString(16);
14848 # var missingZeros = 6 - hexString.length;
14849 # var resultBuilder = ['#'];
14850 # for (var i = 0; i < missingZeros; i++) {
14851 # resultBuilder.push('0');
14852 # }
14853 # resultBuilder.push(hexString);
14854 # return resultBuilder.join('');
14855 # };
14856 #
14857 # // ...
14858 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14859 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14860 # the final pixel color is defined by the equation:
14861 #
14862 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14863 #
14864 # This means that a value of 1.0 corresponds to a solid color, whereas
14865 # a value of 0.0 corresponds to a completely transparent color. This
14866 # uses a wrapper message rather than a simple float scalar so that it is
14867 # possible to distinguish between a default value and the value being unset.
14868 # If omitted, this color object is to be rendered as a solid color
14869 # (as if the alpha value had been explicitly given with a value of 1.0).
14870 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14871 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14872 },
14873 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014874 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014875 "style": "A String", # The style of the border.
14876 },
14877 "left": { # A border along a cell. # The left border of the cell.
14878 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14879 # for simplicity of conversion to/from color representations in various
14880 # languages over compactness; for example, the fields of this representation
14881 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14882 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14883 # method in iOS; and, with just a little work, it can be easily formatted into
14884 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14885 #
14886 # Example (Java):
14887 #
14888 # import com.google.type.Color;
14889 #
14890 # // ...
14891 # public static java.awt.Color fromProto(Color protocolor) {
14892 # float alpha = protocolor.hasAlpha()
14893 # ? protocolor.getAlpha().getValue()
14894 # : 1.0;
14895 #
14896 # return new java.awt.Color(
14897 # protocolor.getRed(),
14898 # protocolor.getGreen(),
14899 # protocolor.getBlue(),
14900 # alpha);
14901 # }
14902 #
14903 # public static Color toProto(java.awt.Color color) {
14904 # float red = (float) color.getRed();
14905 # float green = (float) color.getGreen();
14906 # float blue = (float) color.getBlue();
14907 # float denominator = 255.0;
14908 # Color.Builder resultBuilder =
14909 # Color
14910 # .newBuilder()
14911 # .setRed(red / denominator)
14912 # .setGreen(green / denominator)
14913 # .setBlue(blue / denominator);
14914 # int alpha = color.getAlpha();
14915 # if (alpha != 255) {
14916 # result.setAlpha(
14917 # FloatValue
14918 # .newBuilder()
14919 # .setValue(((float) alpha) / denominator)
14920 # .build());
14921 # }
14922 # return resultBuilder.build();
14923 # }
14924 # // ...
14925 #
14926 # Example (iOS / Obj-C):
14927 #
14928 # // ...
14929 # static UIColor* fromProto(Color* protocolor) {
14930 # float red = [protocolor red];
14931 # float green = [protocolor green];
14932 # float blue = [protocolor blue];
14933 # FloatValue* alpha_wrapper = [protocolor alpha];
14934 # float alpha = 1.0;
14935 # if (alpha_wrapper != nil) {
14936 # alpha = [alpha_wrapper value];
14937 # }
14938 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14939 # }
14940 #
14941 # static Color* toProto(UIColor* color) {
14942 # CGFloat red, green, blue, alpha;
14943 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14944 # return nil;
14945 # }
14946 # Color* result = [Color alloc] init];
14947 # [result setRed:red];
14948 # [result setGreen:green];
14949 # [result setBlue:blue];
14950 # if (alpha <= 0.9999) {
14951 # [result setAlpha:floatWrapperWithValue(alpha)];
14952 # }
14953 # [result autorelease];
14954 # return result;
14955 # }
14956 # // ...
14957 #
14958 # Example (JavaScript):
14959 #
14960 # // ...
14961 #
14962 # var protoToCssColor = function(rgb_color) {
14963 # var redFrac = rgb_color.red || 0.0;
14964 # var greenFrac = rgb_color.green || 0.0;
14965 # var blueFrac = rgb_color.blue || 0.0;
14966 # var red = Math.floor(redFrac * 255);
14967 # var green = Math.floor(greenFrac * 255);
14968 # var blue = Math.floor(blueFrac * 255);
14969 #
14970 # if (!('alpha' in rgb_color)) {
14971 # return rgbToCssColor_(red, green, blue);
14972 # }
14973 #
14974 # var alphaFrac = rgb_color.alpha.value || 0.0;
14975 # var rgbParams = [red, green, blue].join(',');
14976 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14977 # };
14978 #
14979 # var rgbToCssColor_ = function(red, green, blue) {
14980 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14981 # var hexString = rgbNumber.toString(16);
14982 # var missingZeros = 6 - hexString.length;
14983 # var resultBuilder = ['#'];
14984 # for (var i = 0; i < missingZeros; i++) {
14985 # resultBuilder.push('0');
14986 # }
14987 # resultBuilder.push(hexString);
14988 # return resultBuilder.join('');
14989 # };
14990 #
14991 # // ...
14992 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14993 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14994 # the final pixel color is defined by the equation:
14995 #
14996 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14997 #
14998 # This means that a value of 1.0 corresponds to a solid color, whereas
14999 # a value of 0.0 corresponds to a completely transparent color. This
15000 # uses a wrapper message rather than a simple float scalar so that it is
15001 # possible to distinguish between a default value and the value being unset.
15002 # If omitted, this color object is to be rendered as a solid color
15003 # (as if the alpha value had been explicitly given with a value of 1.0).
15004 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15005 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15006 },
15007 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015008 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015009 "style": "A String", # The style of the border.
15010 },
15011 },
15012 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
15013 },
15014 },
15015 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
15016 # the interpolation points listed. The format of a cell will vary
15017 # based on its contents as compared to the values of the interpolation
15018 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015019 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015020 # These pin the gradient color scale according to the color,
15021 # type and value chosen.
15022 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
15023 # for simplicity of conversion to/from color representations in various
15024 # languages over compactness; for example, the fields of this representation
15025 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15026 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15027 # method in iOS; and, with just a little work, it can be easily formatted into
15028 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15029 #
15030 # Example (Java):
15031 #
15032 # import com.google.type.Color;
15033 #
15034 # // ...
15035 # public static java.awt.Color fromProto(Color protocolor) {
15036 # float alpha = protocolor.hasAlpha()
15037 # ? protocolor.getAlpha().getValue()
15038 # : 1.0;
15039 #
15040 # return new java.awt.Color(
15041 # protocolor.getRed(),
15042 # protocolor.getGreen(),
15043 # protocolor.getBlue(),
15044 # alpha);
15045 # }
15046 #
15047 # public static Color toProto(java.awt.Color color) {
15048 # float red = (float) color.getRed();
15049 # float green = (float) color.getGreen();
15050 # float blue = (float) color.getBlue();
15051 # float denominator = 255.0;
15052 # Color.Builder resultBuilder =
15053 # Color
15054 # .newBuilder()
15055 # .setRed(red / denominator)
15056 # .setGreen(green / denominator)
15057 # .setBlue(blue / denominator);
15058 # int alpha = color.getAlpha();
15059 # if (alpha != 255) {
15060 # result.setAlpha(
15061 # FloatValue
15062 # .newBuilder()
15063 # .setValue(((float) alpha) / denominator)
15064 # .build());
15065 # }
15066 # return resultBuilder.build();
15067 # }
15068 # // ...
15069 #
15070 # Example (iOS / Obj-C):
15071 #
15072 # // ...
15073 # static UIColor* fromProto(Color* protocolor) {
15074 # float red = [protocolor red];
15075 # float green = [protocolor green];
15076 # float blue = [protocolor blue];
15077 # FloatValue* alpha_wrapper = [protocolor alpha];
15078 # float alpha = 1.0;
15079 # if (alpha_wrapper != nil) {
15080 # alpha = [alpha_wrapper value];
15081 # }
15082 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15083 # }
15084 #
15085 # static Color* toProto(UIColor* color) {
15086 # CGFloat red, green, blue, alpha;
15087 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15088 # return nil;
15089 # }
15090 # Color* result = [Color alloc] init];
15091 # [result setRed:red];
15092 # [result setGreen:green];
15093 # [result setBlue:blue];
15094 # if (alpha <= 0.9999) {
15095 # [result setAlpha:floatWrapperWithValue(alpha)];
15096 # }
15097 # [result autorelease];
15098 # return result;
15099 # }
15100 # // ...
15101 #
15102 # Example (JavaScript):
15103 #
15104 # // ...
15105 #
15106 # var protoToCssColor = function(rgb_color) {
15107 # var redFrac = rgb_color.red || 0.0;
15108 # var greenFrac = rgb_color.green || 0.0;
15109 # var blueFrac = rgb_color.blue || 0.0;
15110 # var red = Math.floor(redFrac * 255);
15111 # var green = Math.floor(greenFrac * 255);
15112 # var blue = Math.floor(blueFrac * 255);
15113 #
15114 # if (!('alpha' in rgb_color)) {
15115 # return rgbToCssColor_(red, green, blue);
15116 # }
15117 #
15118 # var alphaFrac = rgb_color.alpha.value || 0.0;
15119 # var rgbParams = [red, green, blue].join(',');
15120 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15121 # };
15122 #
15123 # var rgbToCssColor_ = function(red, green, blue) {
15124 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15125 # var hexString = rgbNumber.toString(16);
15126 # var missingZeros = 6 - hexString.length;
15127 # var resultBuilder = ['#'];
15128 # for (var i = 0; i < missingZeros; i++) {
15129 # resultBuilder.push('0');
15130 # }
15131 # resultBuilder.push(hexString);
15132 # return resultBuilder.join('');
15133 # };
15134 #
15135 # // ...
15136 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15137 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15138 # the final pixel color is defined by the equation:
15139 #
15140 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15141 #
15142 # This means that a value of 1.0 corresponds to a solid color, whereas
15143 # a value of 0.0 corresponds to a completely transparent color. This
15144 # uses a wrapper message rather than a simple float scalar so that it is
15145 # possible to distinguish between a default value and the value being unset.
15146 # If omitted, this color object is to be rendered as a solid color
15147 # (as if the alpha value had been explicitly given with a value of 1.0).
15148 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15149 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15150 },
15151 "type": "A String", # How the value should be interpreted.
15152 "value": "A String", # The value this interpolation point uses. May be a formula.
15153 # Unused if type is MIN or
15154 # MAX.
15155 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015156 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015157 # These pin the gradient color scale according to the color,
15158 # type and value chosen.
15159 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
15160 # for simplicity of conversion to/from color representations in various
15161 # languages over compactness; for example, the fields of this representation
15162 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15163 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15164 # method in iOS; and, with just a little work, it can be easily formatted into
15165 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15166 #
15167 # Example (Java):
15168 #
15169 # import com.google.type.Color;
15170 #
15171 # // ...
15172 # public static java.awt.Color fromProto(Color protocolor) {
15173 # float alpha = protocolor.hasAlpha()
15174 # ? protocolor.getAlpha().getValue()
15175 # : 1.0;
15176 #
15177 # return new java.awt.Color(
15178 # protocolor.getRed(),
15179 # protocolor.getGreen(),
15180 # protocolor.getBlue(),
15181 # alpha);
15182 # }
15183 #
15184 # public static Color toProto(java.awt.Color color) {
15185 # float red = (float) color.getRed();
15186 # float green = (float) color.getGreen();
15187 # float blue = (float) color.getBlue();
15188 # float denominator = 255.0;
15189 # Color.Builder resultBuilder =
15190 # Color
15191 # .newBuilder()
15192 # .setRed(red / denominator)
15193 # .setGreen(green / denominator)
15194 # .setBlue(blue / denominator);
15195 # int alpha = color.getAlpha();
15196 # if (alpha != 255) {
15197 # result.setAlpha(
15198 # FloatValue
15199 # .newBuilder()
15200 # .setValue(((float) alpha) / denominator)
15201 # .build());
15202 # }
15203 # return resultBuilder.build();
15204 # }
15205 # // ...
15206 #
15207 # Example (iOS / Obj-C):
15208 #
15209 # // ...
15210 # static UIColor* fromProto(Color* protocolor) {
15211 # float red = [protocolor red];
15212 # float green = [protocolor green];
15213 # float blue = [protocolor blue];
15214 # FloatValue* alpha_wrapper = [protocolor alpha];
15215 # float alpha = 1.0;
15216 # if (alpha_wrapper != nil) {
15217 # alpha = [alpha_wrapper value];
15218 # }
15219 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15220 # }
15221 #
15222 # static Color* toProto(UIColor* color) {
15223 # CGFloat red, green, blue, alpha;
15224 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15225 # return nil;
15226 # }
15227 # Color* result = [Color alloc] init];
15228 # [result setRed:red];
15229 # [result setGreen:green];
15230 # [result setBlue:blue];
15231 # if (alpha <= 0.9999) {
15232 # [result setAlpha:floatWrapperWithValue(alpha)];
15233 # }
15234 # [result autorelease];
15235 # return result;
15236 # }
15237 # // ...
15238 #
15239 # Example (JavaScript):
15240 #
15241 # // ...
15242 #
15243 # var protoToCssColor = function(rgb_color) {
15244 # var redFrac = rgb_color.red || 0.0;
15245 # var greenFrac = rgb_color.green || 0.0;
15246 # var blueFrac = rgb_color.blue || 0.0;
15247 # var red = Math.floor(redFrac * 255);
15248 # var green = Math.floor(greenFrac * 255);
15249 # var blue = Math.floor(blueFrac * 255);
15250 #
15251 # if (!('alpha' in rgb_color)) {
15252 # return rgbToCssColor_(red, green, blue);
15253 # }
15254 #
15255 # var alphaFrac = rgb_color.alpha.value || 0.0;
15256 # var rgbParams = [red, green, blue].join(',');
15257 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15258 # };
15259 #
15260 # var rgbToCssColor_ = function(red, green, blue) {
15261 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15262 # var hexString = rgbNumber.toString(16);
15263 # var missingZeros = 6 - hexString.length;
15264 # var resultBuilder = ['#'];
15265 # for (var i = 0; i < missingZeros; i++) {
15266 # resultBuilder.push('0');
15267 # }
15268 # resultBuilder.push(hexString);
15269 # return resultBuilder.join('');
15270 # };
15271 #
15272 # // ...
15273 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15274 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15275 # the final pixel color is defined by the equation:
15276 #
15277 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15278 #
15279 # This means that a value of 1.0 corresponds to a solid color, whereas
15280 # a value of 0.0 corresponds to a completely transparent color. This
15281 # uses a wrapper message rather than a simple float scalar so that it is
15282 # possible to distinguish between a default value and the value being unset.
15283 # If omitted, this color object is to be rendered as a solid color
15284 # (as if the alpha value had been explicitly given with a value of 1.0).
15285 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15286 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15287 },
15288 "type": "A String", # How the value should be interpreted.
15289 "value": "A String", # The value this interpolation point uses. May be a formula.
15290 # Unused if type is MIN or
15291 # MAX.
15292 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015293 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015294 # These pin the gradient color scale according to the color,
15295 # type and value chosen.
15296 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
15297 # for simplicity of conversion to/from color representations in various
15298 # languages over compactness; for example, the fields of this representation
15299 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15300 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15301 # method in iOS; and, with just a little work, it can be easily formatted into
15302 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15303 #
15304 # Example (Java):
15305 #
15306 # import com.google.type.Color;
15307 #
15308 # // ...
15309 # public static java.awt.Color fromProto(Color protocolor) {
15310 # float alpha = protocolor.hasAlpha()
15311 # ? protocolor.getAlpha().getValue()
15312 # : 1.0;
15313 #
15314 # return new java.awt.Color(
15315 # protocolor.getRed(),
15316 # protocolor.getGreen(),
15317 # protocolor.getBlue(),
15318 # alpha);
15319 # }
15320 #
15321 # public static Color toProto(java.awt.Color color) {
15322 # float red = (float) color.getRed();
15323 # float green = (float) color.getGreen();
15324 # float blue = (float) color.getBlue();
15325 # float denominator = 255.0;
15326 # Color.Builder resultBuilder =
15327 # Color
15328 # .newBuilder()
15329 # .setRed(red / denominator)
15330 # .setGreen(green / denominator)
15331 # .setBlue(blue / denominator);
15332 # int alpha = color.getAlpha();
15333 # if (alpha != 255) {
15334 # result.setAlpha(
15335 # FloatValue
15336 # .newBuilder()
15337 # .setValue(((float) alpha) / denominator)
15338 # .build());
15339 # }
15340 # return resultBuilder.build();
15341 # }
15342 # // ...
15343 #
15344 # Example (iOS / Obj-C):
15345 #
15346 # // ...
15347 # static UIColor* fromProto(Color* protocolor) {
15348 # float red = [protocolor red];
15349 # float green = [protocolor green];
15350 # float blue = [protocolor blue];
15351 # FloatValue* alpha_wrapper = [protocolor alpha];
15352 # float alpha = 1.0;
15353 # if (alpha_wrapper != nil) {
15354 # alpha = [alpha_wrapper value];
15355 # }
15356 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15357 # }
15358 #
15359 # static Color* toProto(UIColor* color) {
15360 # CGFloat red, green, blue, alpha;
15361 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15362 # return nil;
15363 # }
15364 # Color* result = [Color alloc] init];
15365 # [result setRed:red];
15366 # [result setGreen:green];
15367 # [result setBlue:blue];
15368 # if (alpha <= 0.9999) {
15369 # [result setAlpha:floatWrapperWithValue(alpha)];
15370 # }
15371 # [result autorelease];
15372 # return result;
15373 # }
15374 # // ...
15375 #
15376 # Example (JavaScript):
15377 #
15378 # // ...
15379 #
15380 # var protoToCssColor = function(rgb_color) {
15381 # var redFrac = rgb_color.red || 0.0;
15382 # var greenFrac = rgb_color.green || 0.0;
15383 # var blueFrac = rgb_color.blue || 0.0;
15384 # var red = Math.floor(redFrac * 255);
15385 # var green = Math.floor(greenFrac * 255);
15386 # var blue = Math.floor(blueFrac * 255);
15387 #
15388 # if (!('alpha' in rgb_color)) {
15389 # return rgbToCssColor_(red, green, blue);
15390 # }
15391 #
15392 # var alphaFrac = rgb_color.alpha.value || 0.0;
15393 # var rgbParams = [red, green, blue].join(',');
15394 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15395 # };
15396 #
15397 # var rgbToCssColor_ = function(red, green, blue) {
15398 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15399 # var hexString = rgbNumber.toString(16);
15400 # var missingZeros = 6 - hexString.length;
15401 # var resultBuilder = ['#'];
15402 # for (var i = 0; i < missingZeros; i++) {
15403 # resultBuilder.push('0');
15404 # }
15405 # resultBuilder.push(hexString);
15406 # return resultBuilder.join('');
15407 # };
15408 #
15409 # // ...
15410 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15411 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15412 # the final pixel color is defined by the equation:
15413 #
15414 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15415 #
15416 # This means that a value of 1.0 corresponds to a solid color, whereas
15417 # a value of 0.0 corresponds to a completely transparent color. This
15418 # uses a wrapper message rather than a simple float scalar so that it is
15419 # possible to distinguish between a default value and the value being unset.
15420 # If omitted, this color object is to be rendered as a solid color
15421 # (as if the alpha value had been explicitly given with a value of 1.0).
15422 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15423 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15424 },
15425 "type": "A String", # How the value should be interpreted.
15426 "value": "A String", # The value this interpolation point uses. May be a formula.
15427 # Unused if type is MIN or
15428 # MAX.
15429 },
15430 },
15431 },
15432 "newRule": { # A rule describing a conditional format. # The new rule that replaced the old rule (if replacing),
15433 # or the rule that was moved (if moved)
15434 "ranges": [ # The ranges that will be formatted if the condition is true.
15435 # All the ranges must be on the same grid.
15436 { # A range on a sheet.
15437 # All indexes are zero-based.
15438 # Indexes are half open, e.g the start index is inclusive
15439 # and the end index is exclusive -- [start_index, end_index).
15440 # Missing indexes indicate the range is unbounded on that side.
15441 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015442 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015443 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015444 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015445 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015446 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015447 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015448 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015449 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015450 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015451 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015452 # `Sheet1!A:B == sheet_id: 0,
15453 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015454 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015455 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015456 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015457 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015458 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015459 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015460 #
15461 # The start index must always be less than or equal to the end index.
15462 # If the start index equals the end index, then the range is empty.
15463 # Empty ranges are typically not meaningful and are usually rendered in the
15464 # UI as `#REF!`.
15465 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
15466 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
15467 "sheetId": 42, # The sheet this range is on.
15468 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
15469 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
15470 },
15471 ],
15472 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
15473 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
15474 # the format will be applied.
15475 # BooleanConditions are used by conditional formatting,
15476 # data validation, and the criteria in filters.
15477 "type": "A String", # The type of condition.
15478 "values": [ # The values of the condition. The number of supported values depends
15479 # on the condition type. Some support zero values,
15480 # others one or two values,
15481 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
15482 { # The value of the condition.
15483 "relativeDate": "A String", # A relative date (based on the current date).
15484 # Valid only if the type is
15485 # DATE_BEFORE,
15486 # DATE_AFTER,
15487 # DATE_ON_OR_BEFORE or
15488 # DATE_ON_OR_AFTER.
15489 #
15490 # Relative dates are not supported in data validation.
15491 # They are supported only in conditional formatting and
15492 # conditional filters.
15493 "userEnteredValue": "A String", # A value the condition is based on.
15494 # The value will be parsed as if the user typed into a cell.
15495 # Formulas are supported (and must begin with an `=`).
15496 },
15497 ],
15498 },
15499 "format": { # The format of a cell. # The format to apply.
15500 # Conditional formatting can only apply a subset of formatting:
15501 # bold, italic,
15502 # strikethrough,
15503 # foreground color &
15504 # background color.
15505 "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 -070015506 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
15507 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070015508 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
15509 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015510 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015511 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015512 },
15513 "textDirection": "A String", # The direction of the text in the cell.
15514 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
15515 # When updating padding, every field must be specified.
15516 "top": 42, # The top padding of the cell.
15517 "right": 42, # The right padding of the cell.
15518 "bottom": 42, # The bottom padding of the cell.
15519 "left": 42, # The left padding of the cell.
15520 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015521 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015522 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
15523 # for simplicity of conversion to/from color representations in various
15524 # languages over compactness; for example, the fields of this representation
15525 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15526 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15527 # method in iOS; and, with just a little work, it can be easily formatted into
15528 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15529 #
15530 # Example (Java):
15531 #
15532 # import com.google.type.Color;
15533 #
15534 # // ...
15535 # public static java.awt.Color fromProto(Color protocolor) {
15536 # float alpha = protocolor.hasAlpha()
15537 # ? protocolor.getAlpha().getValue()
15538 # : 1.0;
15539 #
15540 # return new java.awt.Color(
15541 # protocolor.getRed(),
15542 # protocolor.getGreen(),
15543 # protocolor.getBlue(),
15544 # alpha);
15545 # }
15546 #
15547 # public static Color toProto(java.awt.Color color) {
15548 # float red = (float) color.getRed();
15549 # float green = (float) color.getGreen();
15550 # float blue = (float) color.getBlue();
15551 # float denominator = 255.0;
15552 # Color.Builder resultBuilder =
15553 # Color
15554 # .newBuilder()
15555 # .setRed(red / denominator)
15556 # .setGreen(green / denominator)
15557 # .setBlue(blue / denominator);
15558 # int alpha = color.getAlpha();
15559 # if (alpha != 255) {
15560 # result.setAlpha(
15561 # FloatValue
15562 # .newBuilder()
15563 # .setValue(((float) alpha) / denominator)
15564 # .build());
15565 # }
15566 # return resultBuilder.build();
15567 # }
15568 # // ...
15569 #
15570 # Example (iOS / Obj-C):
15571 #
15572 # // ...
15573 # static UIColor* fromProto(Color* protocolor) {
15574 # float red = [protocolor red];
15575 # float green = [protocolor green];
15576 # float blue = [protocolor blue];
15577 # FloatValue* alpha_wrapper = [protocolor alpha];
15578 # float alpha = 1.0;
15579 # if (alpha_wrapper != nil) {
15580 # alpha = [alpha_wrapper value];
15581 # }
15582 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15583 # }
15584 #
15585 # static Color* toProto(UIColor* color) {
15586 # CGFloat red, green, blue, alpha;
15587 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15588 # return nil;
15589 # }
15590 # Color* result = [Color alloc] init];
15591 # [result setRed:red];
15592 # [result setGreen:green];
15593 # [result setBlue:blue];
15594 # if (alpha <= 0.9999) {
15595 # [result setAlpha:floatWrapperWithValue(alpha)];
15596 # }
15597 # [result autorelease];
15598 # return result;
15599 # }
15600 # // ...
15601 #
15602 # Example (JavaScript):
15603 #
15604 # // ...
15605 #
15606 # var protoToCssColor = function(rgb_color) {
15607 # var redFrac = rgb_color.red || 0.0;
15608 # var greenFrac = rgb_color.green || 0.0;
15609 # var blueFrac = rgb_color.blue || 0.0;
15610 # var red = Math.floor(redFrac * 255);
15611 # var green = Math.floor(greenFrac * 255);
15612 # var blue = Math.floor(blueFrac * 255);
15613 #
15614 # if (!('alpha' in rgb_color)) {
15615 # return rgbToCssColor_(red, green, blue);
15616 # }
15617 #
15618 # var alphaFrac = rgb_color.alpha.value || 0.0;
15619 # var rgbParams = [red, green, blue].join(',');
15620 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15621 # };
15622 #
15623 # var rgbToCssColor_ = function(red, green, blue) {
15624 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15625 # var hexString = rgbNumber.toString(16);
15626 # var missingZeros = 6 - hexString.length;
15627 # var resultBuilder = ['#'];
15628 # for (var i = 0; i < missingZeros; i++) {
15629 # resultBuilder.push('0');
15630 # }
15631 # resultBuilder.push(hexString);
15632 # return resultBuilder.join('');
15633 # };
15634 #
15635 # // ...
15636 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15637 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15638 # the final pixel color is defined by the equation:
15639 #
15640 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15641 #
15642 # This means that a value of 1.0 corresponds to a solid color, whereas
15643 # a value of 0.0 corresponds to a completely transparent color. This
15644 # uses a wrapper message rather than a simple float scalar so that it is
15645 # possible to distinguish between a default value and the value being unset.
15646 # If omitted, this color object is to be rendered as a solid color
15647 # (as if the alpha value had been explicitly given with a value of 1.0).
15648 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15649 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15650 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015651 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015652 "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).
15653 # Absent values indicate that the field isn't specified.
15654 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
15655 # for simplicity of conversion to/from color representations in various
15656 # languages over compactness; for example, the fields of this representation
15657 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15658 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15659 # method in iOS; and, with just a little work, it can be easily formatted into
15660 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15661 #
15662 # Example (Java):
15663 #
15664 # import com.google.type.Color;
15665 #
15666 # // ...
15667 # public static java.awt.Color fromProto(Color protocolor) {
15668 # float alpha = protocolor.hasAlpha()
15669 # ? protocolor.getAlpha().getValue()
15670 # : 1.0;
15671 #
15672 # return new java.awt.Color(
15673 # protocolor.getRed(),
15674 # protocolor.getGreen(),
15675 # protocolor.getBlue(),
15676 # alpha);
15677 # }
15678 #
15679 # public static Color toProto(java.awt.Color color) {
15680 # float red = (float) color.getRed();
15681 # float green = (float) color.getGreen();
15682 # float blue = (float) color.getBlue();
15683 # float denominator = 255.0;
15684 # Color.Builder resultBuilder =
15685 # Color
15686 # .newBuilder()
15687 # .setRed(red / denominator)
15688 # .setGreen(green / denominator)
15689 # .setBlue(blue / denominator);
15690 # int alpha = color.getAlpha();
15691 # if (alpha != 255) {
15692 # result.setAlpha(
15693 # FloatValue
15694 # .newBuilder()
15695 # .setValue(((float) alpha) / denominator)
15696 # .build());
15697 # }
15698 # return resultBuilder.build();
15699 # }
15700 # // ...
15701 #
15702 # Example (iOS / Obj-C):
15703 #
15704 # // ...
15705 # static UIColor* fromProto(Color* protocolor) {
15706 # float red = [protocolor red];
15707 # float green = [protocolor green];
15708 # float blue = [protocolor blue];
15709 # FloatValue* alpha_wrapper = [protocolor alpha];
15710 # float alpha = 1.0;
15711 # if (alpha_wrapper != nil) {
15712 # alpha = [alpha_wrapper value];
15713 # }
15714 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15715 # }
15716 #
15717 # static Color* toProto(UIColor* color) {
15718 # CGFloat red, green, blue, alpha;
15719 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15720 # return nil;
15721 # }
15722 # Color* result = [Color alloc] init];
15723 # [result setRed:red];
15724 # [result setGreen:green];
15725 # [result setBlue:blue];
15726 # if (alpha <= 0.9999) {
15727 # [result setAlpha:floatWrapperWithValue(alpha)];
15728 # }
15729 # [result autorelease];
15730 # return result;
15731 # }
15732 # // ...
15733 #
15734 # Example (JavaScript):
15735 #
15736 # // ...
15737 #
15738 # var protoToCssColor = function(rgb_color) {
15739 # var redFrac = rgb_color.red || 0.0;
15740 # var greenFrac = rgb_color.green || 0.0;
15741 # var blueFrac = rgb_color.blue || 0.0;
15742 # var red = Math.floor(redFrac * 255);
15743 # var green = Math.floor(greenFrac * 255);
15744 # var blue = Math.floor(blueFrac * 255);
15745 #
15746 # if (!('alpha' in rgb_color)) {
15747 # return rgbToCssColor_(red, green, blue);
15748 # }
15749 #
15750 # var alphaFrac = rgb_color.alpha.value || 0.0;
15751 # var rgbParams = [red, green, blue].join(',');
15752 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15753 # };
15754 #
15755 # var rgbToCssColor_ = function(red, green, blue) {
15756 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15757 # var hexString = rgbNumber.toString(16);
15758 # var missingZeros = 6 - hexString.length;
15759 # var resultBuilder = ['#'];
15760 # for (var i = 0; i < missingZeros; i++) {
15761 # resultBuilder.push('0');
15762 # }
15763 # resultBuilder.push(hexString);
15764 # return resultBuilder.join('');
15765 # };
15766 #
15767 # // ...
15768 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15769 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15770 # the final pixel color is defined by the equation:
15771 #
15772 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15773 #
15774 # This means that a value of 1.0 corresponds to a solid color, whereas
15775 # a value of 0.0 corresponds to a completely transparent color. This
15776 # uses a wrapper message rather than a simple float scalar so that it is
15777 # possible to distinguish between a default value and the value being unset.
15778 # If omitted, this color object is to be rendered as a solid color
15779 # (as if the alpha value had been explicitly given with a value of 1.0).
15780 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15781 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15782 },
15783 "bold": True or False, # True if the text is bold.
15784 "strikethrough": True or False, # True if the text has a strikethrough.
15785 "fontFamily": "A String", # The font family.
15786 "fontSize": 42, # The size of the font.
15787 "italic": True or False, # True if the text is italicized.
15788 "underline": True or False, # True if the text is underlined.
15789 },
15790 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
15791 "borders": { # The borders of the cell. # The borders of the cell.
15792 "top": { # A border along a cell. # The top border of the cell.
15793 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
15794 # for simplicity of conversion to/from color representations in various
15795 # languages over compactness; for example, the fields of this representation
15796 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15797 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15798 # method in iOS; and, with just a little work, it can be easily formatted into
15799 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15800 #
15801 # Example (Java):
15802 #
15803 # import com.google.type.Color;
15804 #
15805 # // ...
15806 # public static java.awt.Color fromProto(Color protocolor) {
15807 # float alpha = protocolor.hasAlpha()
15808 # ? protocolor.getAlpha().getValue()
15809 # : 1.0;
15810 #
15811 # return new java.awt.Color(
15812 # protocolor.getRed(),
15813 # protocolor.getGreen(),
15814 # protocolor.getBlue(),
15815 # alpha);
15816 # }
15817 #
15818 # public static Color toProto(java.awt.Color color) {
15819 # float red = (float) color.getRed();
15820 # float green = (float) color.getGreen();
15821 # float blue = (float) color.getBlue();
15822 # float denominator = 255.0;
15823 # Color.Builder resultBuilder =
15824 # Color
15825 # .newBuilder()
15826 # .setRed(red / denominator)
15827 # .setGreen(green / denominator)
15828 # .setBlue(blue / denominator);
15829 # int alpha = color.getAlpha();
15830 # if (alpha != 255) {
15831 # result.setAlpha(
15832 # FloatValue
15833 # .newBuilder()
15834 # .setValue(((float) alpha) / denominator)
15835 # .build());
15836 # }
15837 # return resultBuilder.build();
15838 # }
15839 # // ...
15840 #
15841 # Example (iOS / Obj-C):
15842 #
15843 # // ...
15844 # static UIColor* fromProto(Color* protocolor) {
15845 # float red = [protocolor red];
15846 # float green = [protocolor green];
15847 # float blue = [protocolor blue];
15848 # FloatValue* alpha_wrapper = [protocolor alpha];
15849 # float alpha = 1.0;
15850 # if (alpha_wrapper != nil) {
15851 # alpha = [alpha_wrapper value];
15852 # }
15853 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15854 # }
15855 #
15856 # static Color* toProto(UIColor* color) {
15857 # CGFloat red, green, blue, alpha;
15858 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15859 # return nil;
15860 # }
15861 # Color* result = [Color alloc] init];
15862 # [result setRed:red];
15863 # [result setGreen:green];
15864 # [result setBlue:blue];
15865 # if (alpha <= 0.9999) {
15866 # [result setAlpha:floatWrapperWithValue(alpha)];
15867 # }
15868 # [result autorelease];
15869 # return result;
15870 # }
15871 # // ...
15872 #
15873 # Example (JavaScript):
15874 #
15875 # // ...
15876 #
15877 # var protoToCssColor = function(rgb_color) {
15878 # var redFrac = rgb_color.red || 0.0;
15879 # var greenFrac = rgb_color.green || 0.0;
15880 # var blueFrac = rgb_color.blue || 0.0;
15881 # var red = Math.floor(redFrac * 255);
15882 # var green = Math.floor(greenFrac * 255);
15883 # var blue = Math.floor(blueFrac * 255);
15884 #
15885 # if (!('alpha' in rgb_color)) {
15886 # return rgbToCssColor_(red, green, blue);
15887 # }
15888 #
15889 # var alphaFrac = rgb_color.alpha.value || 0.0;
15890 # var rgbParams = [red, green, blue].join(',');
15891 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15892 # };
15893 #
15894 # var rgbToCssColor_ = function(red, green, blue) {
15895 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15896 # var hexString = rgbNumber.toString(16);
15897 # var missingZeros = 6 - hexString.length;
15898 # var resultBuilder = ['#'];
15899 # for (var i = 0; i < missingZeros; i++) {
15900 # resultBuilder.push('0');
15901 # }
15902 # resultBuilder.push(hexString);
15903 # return resultBuilder.join('');
15904 # };
15905 #
15906 # // ...
15907 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15908 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15909 # the final pixel color is defined by the equation:
15910 #
15911 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15912 #
15913 # This means that a value of 1.0 corresponds to a solid color, whereas
15914 # a value of 0.0 corresponds to a completely transparent color. This
15915 # uses a wrapper message rather than a simple float scalar so that it is
15916 # possible to distinguish between a default value and the value being unset.
15917 # If omitted, this color object is to be rendered as a solid color
15918 # (as if the alpha value had been explicitly given with a value of 1.0).
15919 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15920 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15921 },
15922 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015923 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015924 "style": "A String", # The style of the border.
15925 },
15926 "right": { # A border along a cell. # The right border of the cell.
15927 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
15928 # for simplicity of conversion to/from color representations in various
15929 # languages over compactness; for example, the fields of this representation
15930 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15931 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15932 # method in iOS; and, with just a little work, it can be easily formatted into
15933 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15934 #
15935 # Example (Java):
15936 #
15937 # import com.google.type.Color;
15938 #
15939 # // ...
15940 # public static java.awt.Color fromProto(Color protocolor) {
15941 # float alpha = protocolor.hasAlpha()
15942 # ? protocolor.getAlpha().getValue()
15943 # : 1.0;
15944 #
15945 # return new java.awt.Color(
15946 # protocolor.getRed(),
15947 # protocolor.getGreen(),
15948 # protocolor.getBlue(),
15949 # alpha);
15950 # }
15951 #
15952 # public static Color toProto(java.awt.Color color) {
15953 # float red = (float) color.getRed();
15954 # float green = (float) color.getGreen();
15955 # float blue = (float) color.getBlue();
15956 # float denominator = 255.0;
15957 # Color.Builder resultBuilder =
15958 # Color
15959 # .newBuilder()
15960 # .setRed(red / denominator)
15961 # .setGreen(green / denominator)
15962 # .setBlue(blue / denominator);
15963 # int alpha = color.getAlpha();
15964 # if (alpha != 255) {
15965 # result.setAlpha(
15966 # FloatValue
15967 # .newBuilder()
15968 # .setValue(((float) alpha) / denominator)
15969 # .build());
15970 # }
15971 # return resultBuilder.build();
15972 # }
15973 # // ...
15974 #
15975 # Example (iOS / Obj-C):
15976 #
15977 # // ...
15978 # static UIColor* fromProto(Color* protocolor) {
15979 # float red = [protocolor red];
15980 # float green = [protocolor green];
15981 # float blue = [protocolor blue];
15982 # FloatValue* alpha_wrapper = [protocolor alpha];
15983 # float alpha = 1.0;
15984 # if (alpha_wrapper != nil) {
15985 # alpha = [alpha_wrapper value];
15986 # }
15987 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15988 # }
15989 #
15990 # static Color* toProto(UIColor* color) {
15991 # CGFloat red, green, blue, alpha;
15992 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15993 # return nil;
15994 # }
15995 # Color* result = [Color alloc] init];
15996 # [result setRed:red];
15997 # [result setGreen:green];
15998 # [result setBlue:blue];
15999 # if (alpha <= 0.9999) {
16000 # [result setAlpha:floatWrapperWithValue(alpha)];
16001 # }
16002 # [result autorelease];
16003 # return result;
16004 # }
16005 # // ...
16006 #
16007 # Example (JavaScript):
16008 #
16009 # // ...
16010 #
16011 # var protoToCssColor = function(rgb_color) {
16012 # var redFrac = rgb_color.red || 0.0;
16013 # var greenFrac = rgb_color.green || 0.0;
16014 # var blueFrac = rgb_color.blue || 0.0;
16015 # var red = Math.floor(redFrac * 255);
16016 # var green = Math.floor(greenFrac * 255);
16017 # var blue = Math.floor(blueFrac * 255);
16018 #
16019 # if (!('alpha' in rgb_color)) {
16020 # return rgbToCssColor_(red, green, blue);
16021 # }
16022 #
16023 # var alphaFrac = rgb_color.alpha.value || 0.0;
16024 # var rgbParams = [red, green, blue].join(',');
16025 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16026 # };
16027 #
16028 # var rgbToCssColor_ = function(red, green, blue) {
16029 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16030 # var hexString = rgbNumber.toString(16);
16031 # var missingZeros = 6 - hexString.length;
16032 # var resultBuilder = ['#'];
16033 # for (var i = 0; i < missingZeros; i++) {
16034 # resultBuilder.push('0');
16035 # }
16036 # resultBuilder.push(hexString);
16037 # return resultBuilder.join('');
16038 # };
16039 #
16040 # // ...
16041 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16042 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16043 # the final pixel color is defined by the equation:
16044 #
16045 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16046 #
16047 # This means that a value of 1.0 corresponds to a solid color, whereas
16048 # a value of 0.0 corresponds to a completely transparent color. This
16049 # uses a wrapper message rather than a simple float scalar so that it is
16050 # possible to distinguish between a default value and the value being unset.
16051 # If omitted, this color object is to be rendered as a solid color
16052 # (as if the alpha value had been explicitly given with a value of 1.0).
16053 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16054 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16055 },
16056 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016057 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016058 "style": "A String", # The style of the border.
16059 },
16060 "bottom": { # A border along a cell. # The bottom border of the cell.
16061 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16062 # for simplicity of conversion to/from color representations in various
16063 # languages over compactness; for example, the fields of this representation
16064 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16065 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16066 # method in iOS; and, with just a little work, it can be easily formatted into
16067 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16068 #
16069 # Example (Java):
16070 #
16071 # import com.google.type.Color;
16072 #
16073 # // ...
16074 # public static java.awt.Color fromProto(Color protocolor) {
16075 # float alpha = protocolor.hasAlpha()
16076 # ? protocolor.getAlpha().getValue()
16077 # : 1.0;
16078 #
16079 # return new java.awt.Color(
16080 # protocolor.getRed(),
16081 # protocolor.getGreen(),
16082 # protocolor.getBlue(),
16083 # alpha);
16084 # }
16085 #
16086 # public static Color toProto(java.awt.Color color) {
16087 # float red = (float) color.getRed();
16088 # float green = (float) color.getGreen();
16089 # float blue = (float) color.getBlue();
16090 # float denominator = 255.0;
16091 # Color.Builder resultBuilder =
16092 # Color
16093 # .newBuilder()
16094 # .setRed(red / denominator)
16095 # .setGreen(green / denominator)
16096 # .setBlue(blue / denominator);
16097 # int alpha = color.getAlpha();
16098 # if (alpha != 255) {
16099 # result.setAlpha(
16100 # FloatValue
16101 # .newBuilder()
16102 # .setValue(((float) alpha) / denominator)
16103 # .build());
16104 # }
16105 # return resultBuilder.build();
16106 # }
16107 # // ...
16108 #
16109 # Example (iOS / Obj-C):
16110 #
16111 # // ...
16112 # static UIColor* fromProto(Color* protocolor) {
16113 # float red = [protocolor red];
16114 # float green = [protocolor green];
16115 # float blue = [protocolor blue];
16116 # FloatValue* alpha_wrapper = [protocolor alpha];
16117 # float alpha = 1.0;
16118 # if (alpha_wrapper != nil) {
16119 # alpha = [alpha_wrapper value];
16120 # }
16121 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16122 # }
16123 #
16124 # static Color* toProto(UIColor* color) {
16125 # CGFloat red, green, blue, alpha;
16126 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16127 # return nil;
16128 # }
16129 # Color* result = [Color alloc] init];
16130 # [result setRed:red];
16131 # [result setGreen:green];
16132 # [result setBlue:blue];
16133 # if (alpha <= 0.9999) {
16134 # [result setAlpha:floatWrapperWithValue(alpha)];
16135 # }
16136 # [result autorelease];
16137 # return result;
16138 # }
16139 # // ...
16140 #
16141 # Example (JavaScript):
16142 #
16143 # // ...
16144 #
16145 # var protoToCssColor = function(rgb_color) {
16146 # var redFrac = rgb_color.red || 0.0;
16147 # var greenFrac = rgb_color.green || 0.0;
16148 # var blueFrac = rgb_color.blue || 0.0;
16149 # var red = Math.floor(redFrac * 255);
16150 # var green = Math.floor(greenFrac * 255);
16151 # var blue = Math.floor(blueFrac * 255);
16152 #
16153 # if (!('alpha' in rgb_color)) {
16154 # return rgbToCssColor_(red, green, blue);
16155 # }
16156 #
16157 # var alphaFrac = rgb_color.alpha.value || 0.0;
16158 # var rgbParams = [red, green, blue].join(',');
16159 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16160 # };
16161 #
16162 # var rgbToCssColor_ = function(red, green, blue) {
16163 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16164 # var hexString = rgbNumber.toString(16);
16165 # var missingZeros = 6 - hexString.length;
16166 # var resultBuilder = ['#'];
16167 # for (var i = 0; i < missingZeros; i++) {
16168 # resultBuilder.push('0');
16169 # }
16170 # resultBuilder.push(hexString);
16171 # return resultBuilder.join('');
16172 # };
16173 #
16174 # // ...
16175 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16176 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16177 # the final pixel color is defined by the equation:
16178 #
16179 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16180 #
16181 # This means that a value of 1.0 corresponds to a solid color, whereas
16182 # a value of 0.0 corresponds to a completely transparent color. This
16183 # uses a wrapper message rather than a simple float scalar so that it is
16184 # possible to distinguish between a default value and the value being unset.
16185 # If omitted, this color object is to be rendered as a solid color
16186 # (as if the alpha value had been explicitly given with a value of 1.0).
16187 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16188 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16189 },
16190 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016191 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016192 "style": "A String", # The style of the border.
16193 },
16194 "left": { # A border along a cell. # The left border of the cell.
16195 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16196 # for simplicity of conversion to/from color representations in various
16197 # languages over compactness; for example, the fields of this representation
16198 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16199 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16200 # method in iOS; and, with just a little work, it can be easily formatted into
16201 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16202 #
16203 # Example (Java):
16204 #
16205 # import com.google.type.Color;
16206 #
16207 # // ...
16208 # public static java.awt.Color fromProto(Color protocolor) {
16209 # float alpha = protocolor.hasAlpha()
16210 # ? protocolor.getAlpha().getValue()
16211 # : 1.0;
16212 #
16213 # return new java.awt.Color(
16214 # protocolor.getRed(),
16215 # protocolor.getGreen(),
16216 # protocolor.getBlue(),
16217 # alpha);
16218 # }
16219 #
16220 # public static Color toProto(java.awt.Color color) {
16221 # float red = (float) color.getRed();
16222 # float green = (float) color.getGreen();
16223 # float blue = (float) color.getBlue();
16224 # float denominator = 255.0;
16225 # Color.Builder resultBuilder =
16226 # Color
16227 # .newBuilder()
16228 # .setRed(red / denominator)
16229 # .setGreen(green / denominator)
16230 # .setBlue(blue / denominator);
16231 # int alpha = color.getAlpha();
16232 # if (alpha != 255) {
16233 # result.setAlpha(
16234 # FloatValue
16235 # .newBuilder()
16236 # .setValue(((float) alpha) / denominator)
16237 # .build());
16238 # }
16239 # return resultBuilder.build();
16240 # }
16241 # // ...
16242 #
16243 # Example (iOS / Obj-C):
16244 #
16245 # // ...
16246 # static UIColor* fromProto(Color* protocolor) {
16247 # float red = [protocolor red];
16248 # float green = [protocolor green];
16249 # float blue = [protocolor blue];
16250 # FloatValue* alpha_wrapper = [protocolor alpha];
16251 # float alpha = 1.0;
16252 # if (alpha_wrapper != nil) {
16253 # alpha = [alpha_wrapper value];
16254 # }
16255 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16256 # }
16257 #
16258 # static Color* toProto(UIColor* color) {
16259 # CGFloat red, green, blue, alpha;
16260 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16261 # return nil;
16262 # }
16263 # Color* result = [Color alloc] init];
16264 # [result setRed:red];
16265 # [result setGreen:green];
16266 # [result setBlue:blue];
16267 # if (alpha <= 0.9999) {
16268 # [result setAlpha:floatWrapperWithValue(alpha)];
16269 # }
16270 # [result autorelease];
16271 # return result;
16272 # }
16273 # // ...
16274 #
16275 # Example (JavaScript):
16276 #
16277 # // ...
16278 #
16279 # var protoToCssColor = function(rgb_color) {
16280 # var redFrac = rgb_color.red || 0.0;
16281 # var greenFrac = rgb_color.green || 0.0;
16282 # var blueFrac = rgb_color.blue || 0.0;
16283 # var red = Math.floor(redFrac * 255);
16284 # var green = Math.floor(greenFrac * 255);
16285 # var blue = Math.floor(blueFrac * 255);
16286 #
16287 # if (!('alpha' in rgb_color)) {
16288 # return rgbToCssColor_(red, green, blue);
16289 # }
16290 #
16291 # var alphaFrac = rgb_color.alpha.value || 0.0;
16292 # var rgbParams = [red, green, blue].join(',');
16293 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16294 # };
16295 #
16296 # var rgbToCssColor_ = function(red, green, blue) {
16297 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16298 # var hexString = rgbNumber.toString(16);
16299 # var missingZeros = 6 - hexString.length;
16300 # var resultBuilder = ['#'];
16301 # for (var i = 0; i < missingZeros; i++) {
16302 # resultBuilder.push('0');
16303 # }
16304 # resultBuilder.push(hexString);
16305 # return resultBuilder.join('');
16306 # };
16307 #
16308 # // ...
16309 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16310 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16311 # the final pixel color is defined by the equation:
16312 #
16313 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16314 #
16315 # This means that a value of 1.0 corresponds to a solid color, whereas
16316 # a value of 0.0 corresponds to a completely transparent color. This
16317 # uses a wrapper message rather than a simple float scalar so that it is
16318 # possible to distinguish between a default value and the value being unset.
16319 # If omitted, this color object is to be rendered as a solid color
16320 # (as if the alpha value had been explicitly given with a value of 1.0).
16321 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16322 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16323 },
16324 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016325 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016326 "style": "A String", # The style of the border.
16327 },
16328 },
16329 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
16330 },
16331 },
16332 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
16333 # the interpolation points listed. The format of a cell will vary
16334 # based on its contents as compared to the values of the interpolation
16335 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016336 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016337 # These pin the gradient color scale according to the color,
16338 # type and value chosen.
16339 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
16340 # for simplicity of conversion to/from color representations in various
16341 # languages over compactness; for example, the fields of this representation
16342 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16343 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16344 # method in iOS; and, with just a little work, it can be easily formatted into
16345 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16346 #
16347 # Example (Java):
16348 #
16349 # import com.google.type.Color;
16350 #
16351 # // ...
16352 # public static java.awt.Color fromProto(Color protocolor) {
16353 # float alpha = protocolor.hasAlpha()
16354 # ? protocolor.getAlpha().getValue()
16355 # : 1.0;
16356 #
16357 # return new java.awt.Color(
16358 # protocolor.getRed(),
16359 # protocolor.getGreen(),
16360 # protocolor.getBlue(),
16361 # alpha);
16362 # }
16363 #
16364 # public static Color toProto(java.awt.Color color) {
16365 # float red = (float) color.getRed();
16366 # float green = (float) color.getGreen();
16367 # float blue = (float) color.getBlue();
16368 # float denominator = 255.0;
16369 # Color.Builder resultBuilder =
16370 # Color
16371 # .newBuilder()
16372 # .setRed(red / denominator)
16373 # .setGreen(green / denominator)
16374 # .setBlue(blue / denominator);
16375 # int alpha = color.getAlpha();
16376 # if (alpha != 255) {
16377 # result.setAlpha(
16378 # FloatValue
16379 # .newBuilder()
16380 # .setValue(((float) alpha) / denominator)
16381 # .build());
16382 # }
16383 # return resultBuilder.build();
16384 # }
16385 # // ...
16386 #
16387 # Example (iOS / Obj-C):
16388 #
16389 # // ...
16390 # static UIColor* fromProto(Color* protocolor) {
16391 # float red = [protocolor red];
16392 # float green = [protocolor green];
16393 # float blue = [protocolor blue];
16394 # FloatValue* alpha_wrapper = [protocolor alpha];
16395 # float alpha = 1.0;
16396 # if (alpha_wrapper != nil) {
16397 # alpha = [alpha_wrapper value];
16398 # }
16399 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16400 # }
16401 #
16402 # static Color* toProto(UIColor* color) {
16403 # CGFloat red, green, blue, alpha;
16404 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16405 # return nil;
16406 # }
16407 # Color* result = [Color alloc] init];
16408 # [result setRed:red];
16409 # [result setGreen:green];
16410 # [result setBlue:blue];
16411 # if (alpha <= 0.9999) {
16412 # [result setAlpha:floatWrapperWithValue(alpha)];
16413 # }
16414 # [result autorelease];
16415 # return result;
16416 # }
16417 # // ...
16418 #
16419 # Example (JavaScript):
16420 #
16421 # // ...
16422 #
16423 # var protoToCssColor = function(rgb_color) {
16424 # var redFrac = rgb_color.red || 0.0;
16425 # var greenFrac = rgb_color.green || 0.0;
16426 # var blueFrac = rgb_color.blue || 0.0;
16427 # var red = Math.floor(redFrac * 255);
16428 # var green = Math.floor(greenFrac * 255);
16429 # var blue = Math.floor(blueFrac * 255);
16430 #
16431 # if (!('alpha' in rgb_color)) {
16432 # return rgbToCssColor_(red, green, blue);
16433 # }
16434 #
16435 # var alphaFrac = rgb_color.alpha.value || 0.0;
16436 # var rgbParams = [red, green, blue].join(',');
16437 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16438 # };
16439 #
16440 # var rgbToCssColor_ = function(red, green, blue) {
16441 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16442 # var hexString = rgbNumber.toString(16);
16443 # var missingZeros = 6 - hexString.length;
16444 # var resultBuilder = ['#'];
16445 # for (var i = 0; i < missingZeros; i++) {
16446 # resultBuilder.push('0');
16447 # }
16448 # resultBuilder.push(hexString);
16449 # return resultBuilder.join('');
16450 # };
16451 #
16452 # // ...
16453 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16454 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16455 # the final pixel color is defined by the equation:
16456 #
16457 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16458 #
16459 # This means that a value of 1.0 corresponds to a solid color, whereas
16460 # a value of 0.0 corresponds to a completely transparent color. This
16461 # uses a wrapper message rather than a simple float scalar so that it is
16462 # possible to distinguish between a default value and the value being unset.
16463 # If omitted, this color object is to be rendered as a solid color
16464 # (as if the alpha value had been explicitly given with a value of 1.0).
16465 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16466 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16467 },
16468 "type": "A String", # How the value should be interpreted.
16469 "value": "A String", # The value this interpolation point uses. May be a formula.
16470 # Unused if type is MIN or
16471 # MAX.
16472 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016473 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016474 # These pin the gradient color scale according to the color,
16475 # type and value chosen.
16476 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
16477 # for simplicity of conversion to/from color representations in various
16478 # languages over compactness; for example, the fields of this representation
16479 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16480 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16481 # method in iOS; and, with just a little work, it can be easily formatted into
16482 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16483 #
16484 # Example (Java):
16485 #
16486 # import com.google.type.Color;
16487 #
16488 # // ...
16489 # public static java.awt.Color fromProto(Color protocolor) {
16490 # float alpha = protocolor.hasAlpha()
16491 # ? protocolor.getAlpha().getValue()
16492 # : 1.0;
16493 #
16494 # return new java.awt.Color(
16495 # protocolor.getRed(),
16496 # protocolor.getGreen(),
16497 # protocolor.getBlue(),
16498 # alpha);
16499 # }
16500 #
16501 # public static Color toProto(java.awt.Color color) {
16502 # float red = (float) color.getRed();
16503 # float green = (float) color.getGreen();
16504 # float blue = (float) color.getBlue();
16505 # float denominator = 255.0;
16506 # Color.Builder resultBuilder =
16507 # Color
16508 # .newBuilder()
16509 # .setRed(red / denominator)
16510 # .setGreen(green / denominator)
16511 # .setBlue(blue / denominator);
16512 # int alpha = color.getAlpha();
16513 # if (alpha != 255) {
16514 # result.setAlpha(
16515 # FloatValue
16516 # .newBuilder()
16517 # .setValue(((float) alpha) / denominator)
16518 # .build());
16519 # }
16520 # return resultBuilder.build();
16521 # }
16522 # // ...
16523 #
16524 # Example (iOS / Obj-C):
16525 #
16526 # // ...
16527 # static UIColor* fromProto(Color* protocolor) {
16528 # float red = [protocolor red];
16529 # float green = [protocolor green];
16530 # float blue = [protocolor blue];
16531 # FloatValue* alpha_wrapper = [protocolor alpha];
16532 # float alpha = 1.0;
16533 # if (alpha_wrapper != nil) {
16534 # alpha = [alpha_wrapper value];
16535 # }
16536 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16537 # }
16538 #
16539 # static Color* toProto(UIColor* color) {
16540 # CGFloat red, green, blue, alpha;
16541 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16542 # return nil;
16543 # }
16544 # Color* result = [Color alloc] init];
16545 # [result setRed:red];
16546 # [result setGreen:green];
16547 # [result setBlue:blue];
16548 # if (alpha <= 0.9999) {
16549 # [result setAlpha:floatWrapperWithValue(alpha)];
16550 # }
16551 # [result autorelease];
16552 # return result;
16553 # }
16554 # // ...
16555 #
16556 # Example (JavaScript):
16557 #
16558 # // ...
16559 #
16560 # var protoToCssColor = function(rgb_color) {
16561 # var redFrac = rgb_color.red || 0.0;
16562 # var greenFrac = rgb_color.green || 0.0;
16563 # var blueFrac = rgb_color.blue || 0.0;
16564 # var red = Math.floor(redFrac * 255);
16565 # var green = Math.floor(greenFrac * 255);
16566 # var blue = Math.floor(blueFrac * 255);
16567 #
16568 # if (!('alpha' in rgb_color)) {
16569 # return rgbToCssColor_(red, green, blue);
16570 # }
16571 #
16572 # var alphaFrac = rgb_color.alpha.value || 0.0;
16573 # var rgbParams = [red, green, blue].join(',');
16574 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16575 # };
16576 #
16577 # var rgbToCssColor_ = function(red, green, blue) {
16578 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16579 # var hexString = rgbNumber.toString(16);
16580 # var missingZeros = 6 - hexString.length;
16581 # var resultBuilder = ['#'];
16582 # for (var i = 0; i < missingZeros; i++) {
16583 # resultBuilder.push('0');
16584 # }
16585 # resultBuilder.push(hexString);
16586 # return resultBuilder.join('');
16587 # };
16588 #
16589 # // ...
16590 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16591 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16592 # the final pixel color is defined by the equation:
16593 #
16594 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16595 #
16596 # This means that a value of 1.0 corresponds to a solid color, whereas
16597 # a value of 0.0 corresponds to a completely transparent color. This
16598 # uses a wrapper message rather than a simple float scalar so that it is
16599 # possible to distinguish between a default value and the value being unset.
16600 # If omitted, this color object is to be rendered as a solid color
16601 # (as if the alpha value had been explicitly given with a value of 1.0).
16602 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16603 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16604 },
16605 "type": "A String", # How the value should be interpreted.
16606 "value": "A String", # The value this interpolation point uses. May be a formula.
16607 # Unused if type is MIN or
16608 # MAX.
16609 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016610 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016611 # These pin the gradient color scale according to the color,
16612 # type and value chosen.
16613 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
16614 # for simplicity of conversion to/from color representations in various
16615 # languages over compactness; for example, the fields of this representation
16616 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16617 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16618 # method in iOS; and, with just a little work, it can be easily formatted into
16619 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16620 #
16621 # Example (Java):
16622 #
16623 # import com.google.type.Color;
16624 #
16625 # // ...
16626 # public static java.awt.Color fromProto(Color protocolor) {
16627 # float alpha = protocolor.hasAlpha()
16628 # ? protocolor.getAlpha().getValue()
16629 # : 1.0;
16630 #
16631 # return new java.awt.Color(
16632 # protocolor.getRed(),
16633 # protocolor.getGreen(),
16634 # protocolor.getBlue(),
16635 # alpha);
16636 # }
16637 #
16638 # public static Color toProto(java.awt.Color color) {
16639 # float red = (float) color.getRed();
16640 # float green = (float) color.getGreen();
16641 # float blue = (float) color.getBlue();
16642 # float denominator = 255.0;
16643 # Color.Builder resultBuilder =
16644 # Color
16645 # .newBuilder()
16646 # .setRed(red / denominator)
16647 # .setGreen(green / denominator)
16648 # .setBlue(blue / denominator);
16649 # int alpha = color.getAlpha();
16650 # if (alpha != 255) {
16651 # result.setAlpha(
16652 # FloatValue
16653 # .newBuilder()
16654 # .setValue(((float) alpha) / denominator)
16655 # .build());
16656 # }
16657 # return resultBuilder.build();
16658 # }
16659 # // ...
16660 #
16661 # Example (iOS / Obj-C):
16662 #
16663 # // ...
16664 # static UIColor* fromProto(Color* protocolor) {
16665 # float red = [protocolor red];
16666 # float green = [protocolor green];
16667 # float blue = [protocolor blue];
16668 # FloatValue* alpha_wrapper = [protocolor alpha];
16669 # float alpha = 1.0;
16670 # if (alpha_wrapper != nil) {
16671 # alpha = [alpha_wrapper value];
16672 # }
16673 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16674 # }
16675 #
16676 # static Color* toProto(UIColor* color) {
16677 # CGFloat red, green, blue, alpha;
16678 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16679 # return nil;
16680 # }
16681 # Color* result = [Color alloc] init];
16682 # [result setRed:red];
16683 # [result setGreen:green];
16684 # [result setBlue:blue];
16685 # if (alpha <= 0.9999) {
16686 # [result setAlpha:floatWrapperWithValue(alpha)];
16687 # }
16688 # [result autorelease];
16689 # return result;
16690 # }
16691 # // ...
16692 #
16693 # Example (JavaScript):
16694 #
16695 # // ...
16696 #
16697 # var protoToCssColor = function(rgb_color) {
16698 # var redFrac = rgb_color.red || 0.0;
16699 # var greenFrac = rgb_color.green || 0.0;
16700 # var blueFrac = rgb_color.blue || 0.0;
16701 # var red = Math.floor(redFrac * 255);
16702 # var green = Math.floor(greenFrac * 255);
16703 # var blue = Math.floor(blueFrac * 255);
16704 #
16705 # if (!('alpha' in rgb_color)) {
16706 # return rgbToCssColor_(red, green, blue);
16707 # }
16708 #
16709 # var alphaFrac = rgb_color.alpha.value || 0.0;
16710 # var rgbParams = [red, green, blue].join(',');
16711 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16712 # };
16713 #
16714 # var rgbToCssColor_ = function(red, green, blue) {
16715 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16716 # var hexString = rgbNumber.toString(16);
16717 # var missingZeros = 6 - hexString.length;
16718 # var resultBuilder = ['#'];
16719 # for (var i = 0; i < missingZeros; i++) {
16720 # resultBuilder.push('0');
16721 # }
16722 # resultBuilder.push(hexString);
16723 # return resultBuilder.join('');
16724 # };
16725 #
16726 # // ...
16727 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16728 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16729 # the final pixel color is defined by the equation:
16730 #
16731 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16732 #
16733 # This means that a value of 1.0 corresponds to a solid color, whereas
16734 # a value of 0.0 corresponds to a completely transparent color. This
16735 # uses a wrapper message rather than a simple float scalar so that it is
16736 # possible to distinguish between a default value and the value being unset.
16737 # If omitted, this color object is to be rendered as a solid color
16738 # (as if the alpha value had been explicitly given with a value of 1.0).
16739 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16740 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16741 },
16742 "type": "A String", # How the value should be interpreted.
16743 "value": "A String", # The value this interpolation point uses. May be a formula.
16744 # Unused if type is MIN or
16745 # MAX.
16746 },
16747 },
16748 },
16749 },
16750 "addSheet": { # The result of adding a sheet. # A reply from adding a sheet.
16751 "properties": { # Properties of a sheet. # The properties of the newly added sheet.
16752 "sheetType": "A String", # The type of sheet. Defaults to GRID.
16753 # This field cannot be changed once set.
16754 "index": 42, # The index of the sheet within the spreadsheet.
16755 # When adding or updating sheet properties, if this field
16756 # is excluded then the sheet will be added or moved to the end
16757 # of the sheet list.
16758 "title": "A String", # The name of the sheet.
16759 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
16760 # (If the sheet is an object sheet, containing a chart or image, then
16761 # this field will be absent.)
16762 # When writing it is an error to set any grid properties on non-grid sheets.
16763 "columnCount": 42, # The number of columns in the grid.
16764 "rowCount": 42, # The number of rows in the grid.
16765 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
16766 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
16767 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
16768 },
16769 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
16770 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
16771 # for simplicity of conversion to/from color representations in various
16772 # languages over compactness; for example, the fields of this representation
16773 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16774 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16775 # method in iOS; and, with just a little work, it can be easily formatted into
16776 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16777 #
16778 # Example (Java):
16779 #
16780 # import com.google.type.Color;
16781 #
16782 # // ...
16783 # public static java.awt.Color fromProto(Color protocolor) {
16784 # float alpha = protocolor.hasAlpha()
16785 # ? protocolor.getAlpha().getValue()
16786 # : 1.0;
16787 #
16788 # return new java.awt.Color(
16789 # protocolor.getRed(),
16790 # protocolor.getGreen(),
16791 # protocolor.getBlue(),
16792 # alpha);
16793 # }
16794 #
16795 # public static Color toProto(java.awt.Color color) {
16796 # float red = (float) color.getRed();
16797 # float green = (float) color.getGreen();
16798 # float blue = (float) color.getBlue();
16799 # float denominator = 255.0;
16800 # Color.Builder resultBuilder =
16801 # Color
16802 # .newBuilder()
16803 # .setRed(red / denominator)
16804 # .setGreen(green / denominator)
16805 # .setBlue(blue / denominator);
16806 # int alpha = color.getAlpha();
16807 # if (alpha != 255) {
16808 # result.setAlpha(
16809 # FloatValue
16810 # .newBuilder()
16811 # .setValue(((float) alpha) / denominator)
16812 # .build());
16813 # }
16814 # return resultBuilder.build();
16815 # }
16816 # // ...
16817 #
16818 # Example (iOS / Obj-C):
16819 #
16820 # // ...
16821 # static UIColor* fromProto(Color* protocolor) {
16822 # float red = [protocolor red];
16823 # float green = [protocolor green];
16824 # float blue = [protocolor blue];
16825 # FloatValue* alpha_wrapper = [protocolor alpha];
16826 # float alpha = 1.0;
16827 # if (alpha_wrapper != nil) {
16828 # alpha = [alpha_wrapper value];
16829 # }
16830 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16831 # }
16832 #
16833 # static Color* toProto(UIColor* color) {
16834 # CGFloat red, green, blue, alpha;
16835 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16836 # return nil;
16837 # }
16838 # Color* result = [Color alloc] init];
16839 # [result setRed:red];
16840 # [result setGreen:green];
16841 # [result setBlue:blue];
16842 # if (alpha <= 0.9999) {
16843 # [result setAlpha:floatWrapperWithValue(alpha)];
16844 # }
16845 # [result autorelease];
16846 # return result;
16847 # }
16848 # // ...
16849 #
16850 # Example (JavaScript):
16851 #
16852 # // ...
16853 #
16854 # var protoToCssColor = function(rgb_color) {
16855 # var redFrac = rgb_color.red || 0.0;
16856 # var greenFrac = rgb_color.green || 0.0;
16857 # var blueFrac = rgb_color.blue || 0.0;
16858 # var red = Math.floor(redFrac * 255);
16859 # var green = Math.floor(greenFrac * 255);
16860 # var blue = Math.floor(blueFrac * 255);
16861 #
16862 # if (!('alpha' in rgb_color)) {
16863 # return rgbToCssColor_(red, green, blue);
16864 # }
16865 #
16866 # var alphaFrac = rgb_color.alpha.value || 0.0;
16867 # var rgbParams = [red, green, blue].join(',');
16868 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16869 # };
16870 #
16871 # var rgbToCssColor_ = function(red, green, blue) {
16872 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16873 # var hexString = rgbNumber.toString(16);
16874 # var missingZeros = 6 - hexString.length;
16875 # var resultBuilder = ['#'];
16876 # for (var i = 0; i < missingZeros; i++) {
16877 # resultBuilder.push('0');
16878 # }
16879 # resultBuilder.push(hexString);
16880 # return resultBuilder.join('');
16881 # };
16882 #
16883 # // ...
16884 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16885 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16886 # the final pixel color is defined by the equation:
16887 #
16888 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16889 #
16890 # This means that a value of 1.0 corresponds to a solid color, whereas
16891 # a value of 0.0 corresponds to a completely transparent color. This
16892 # uses a wrapper message rather than a simple float scalar so that it is
16893 # possible to distinguish between a default value and the value being unset.
16894 # If omitted, this color object is to be rendered as a solid color
16895 # (as if the alpha value had been explicitly given with a value of 1.0).
16896 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16897 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16898 },
16899 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
16900 "sheetId": 42, # The ID of the sheet. Must be non-negative.
16901 # This field cannot be changed once set.
16902 },
16903 },
16904 "findReplace": { # The result of the find/replace. # A reply from doing a find/replace.
16905 "occurrencesChanged": 42, # The number of occurrences (possibly multiple within a cell) changed.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016906 # For example, if replacing `"e"` with `"o"` in `"Google Sheets"`, this would
16907 # be `"3"` because `"Google Sheets"` -> `"Googlo Shoots"`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016908 "sheetsChanged": 42, # The number of sheets changed.
16909 "rowsChanged": 42, # The number of rows changed.
16910 "valuesChanged": 42, # The number of non-formula cells changed.
16911 "formulasChanged": 42, # The number of formula cells changed.
16912 },
16913 "addNamedRange": { # The result of adding a named range. # A reply from adding a named range.
16914 "namedRange": { # A named range. # The named range to add.
16915 "namedRangeId": "A String", # The ID of the named range.
16916 "range": { # A range on a sheet. # The range this represents.
16917 # All indexes are zero-based.
16918 # Indexes are half open, e.g the start index is inclusive
16919 # and the end index is exclusive -- [start_index, end_index).
16920 # Missing indexes indicate the range is unbounded on that side.
16921 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016922 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016923 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016924 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016925 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016926 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016927 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016928 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016929 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016930 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016931 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016932 # `Sheet1!A:B == sheet_id: 0,
16933 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016934 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016935 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016936 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016937 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016938 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016939 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016940 #
16941 # The start index must always be less than or equal to the end index.
16942 # If the start index equals the end index, then the range is empty.
16943 # Empty ranges are typically not meaningful and are usually rendered in the
16944 # UI as `#REF!`.
16945 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
16946 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
16947 "sheetId": 42, # The sheet this range is on.
16948 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
16949 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
16950 },
16951 "name": "A String", # The name of the named range.
16952 },
16953 },
16954 "addProtectedRange": { # The result of adding a new protected range. # A reply from adding a protected range.
16955 "protectedRange": { # A protected range. # The newly added protected range.
16956 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
16957 # Unprotected ranges are only supported on protected sheets.
16958 { # A range on a sheet.
16959 # All indexes are zero-based.
16960 # Indexes are half open, e.g the start index is inclusive
16961 # and the end index is exclusive -- [start_index, end_index).
16962 # Missing indexes indicate the range is unbounded on that side.
16963 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016964 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016965 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016966 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016967 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016968 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016969 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016970 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016971 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016972 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016973 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016974 # `Sheet1!A:B == sheet_id: 0,
16975 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016976 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016977 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016978 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016979 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016980 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070016981 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070016982 #
16983 # The start index must always be less than or equal to the end index.
16984 # If the start index equals the end index, then the range is empty.
16985 # Empty ranges are typically not meaningful and are usually rendered in the
16986 # UI as `#REF!`.
16987 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
16988 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
16989 "sheetId": 42, # The sheet this range is on.
16990 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
16991 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
16992 },
16993 ],
16994 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
16995 # protected area.
16996 # This field is read-only.
16997 "description": "A String", # The description of this protected range.
16998 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
16999 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017000 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017001 # may be set.
17002 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
17003 # This field is only visible to users with edit access to the protected
17004 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017005 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017006 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
17007 # range. Domain protection is only supported on documents within a domain.
17008 "users": [ # The email addresses of users with edit access to the protected range.
17009 "A String",
17010 ],
17011 "groups": [ # The email addresses of groups with edit access to the protected range.
17012 "A String",
17013 ],
17014 },
17015 "protectedRangeId": 42, # The ID of the protected range.
17016 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017017 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017018 # Warning-based protection means that every user can edit data in the
17019 # protected range, except editing will prompt a warning asking the user
17020 # to confirm the edit.
17021 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017022 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017023 # Additionally, if this field is changed from true to false and the
17024 # `editors` field is not set (nor included in the field mask), then
17025 # the editors will be set to all the editors in the document.
17026 "range": { # A range on a sheet. # The range that is being protected.
17027 # The range may be fully unbounded, in which case this is considered
17028 # a protected sheet.
17029 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017030 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017031 # may be set.
17032 # All indexes are zero-based.
17033 # Indexes are half open, e.g the start index is inclusive
17034 # and the end index is exclusive -- [start_index, end_index).
17035 # Missing indexes indicate the range is unbounded on that side.
17036 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017037 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017038 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017039 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017040 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017041 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017042 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017043 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017044 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017045 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017046 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017047 # `Sheet1!A:B == sheet_id: 0,
17048 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017049 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017050 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017051 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017052 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017053 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017054 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017055 #
17056 # The start index must always be less than or equal to the end index.
17057 # If the start index equals the end index, then the range is empty.
17058 # Empty ranges are typically not meaningful and are usually rendered in the
17059 # UI as `#REF!`.
17060 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
17061 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
17062 "sheetId": 42, # The sheet this range is on.
17063 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
17064 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
17065 },
17066 },
17067 },
17068 "deleteConditionalFormatRule": { # The result of deleting a conditional format rule. # A reply from deleting a conditional format rule.
17069 "rule": { # A rule describing a conditional format. # The rule that was deleted.
17070 "ranges": [ # The ranges that will be formatted if the condition is true.
17071 # All the ranges must be on the same grid.
17072 { # A range on a sheet.
17073 # All indexes are zero-based.
17074 # Indexes are half open, e.g the start index is inclusive
17075 # and the end index is exclusive -- [start_index, end_index).
17076 # Missing indexes indicate the range is unbounded on that side.
17077 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017078 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017079 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017080 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017081 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017082 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017083 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017084 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017085 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017086 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017087 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017088 # `Sheet1!A:B == sheet_id: 0,
17089 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017090 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017091 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017092 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017093 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017094 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017095 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017096 #
17097 # The start index must always be less than or equal to the end index.
17098 # If the start index equals the end index, then the range is empty.
17099 # Empty ranges are typically not meaningful and are usually rendered in the
17100 # UI as `#REF!`.
17101 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
17102 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
17103 "sheetId": 42, # The sheet this range is on.
17104 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
17105 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
17106 },
17107 ],
17108 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
17109 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
17110 # the format will be applied.
17111 # BooleanConditions are used by conditional formatting,
17112 # data validation, and the criteria in filters.
17113 "type": "A String", # The type of condition.
17114 "values": [ # The values of the condition. The number of supported values depends
17115 # on the condition type. Some support zero values,
17116 # others one or two values,
17117 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
17118 { # The value of the condition.
17119 "relativeDate": "A String", # A relative date (based on the current date).
17120 # Valid only if the type is
17121 # DATE_BEFORE,
17122 # DATE_AFTER,
17123 # DATE_ON_OR_BEFORE or
17124 # DATE_ON_OR_AFTER.
17125 #
17126 # Relative dates are not supported in data validation.
17127 # They are supported only in conditional formatting and
17128 # conditional filters.
17129 "userEnteredValue": "A String", # A value the condition is based on.
17130 # The value will be parsed as if the user typed into a cell.
17131 # Formulas are supported (and must begin with an `=`).
17132 },
17133 ],
17134 },
17135 "format": { # The format of a cell. # The format to apply.
17136 # Conditional formatting can only apply a subset of formatting:
17137 # bold, italic,
17138 # strikethrough,
17139 # foreground color &
17140 # background color.
17141 "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 -070017142 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
17143 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070017144 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
17145 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017146 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017147 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017148 },
17149 "textDirection": "A String", # The direction of the text in the cell.
17150 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
17151 # When updating padding, every field must be specified.
17152 "top": 42, # The top padding of the cell.
17153 "right": 42, # The right padding of the cell.
17154 "bottom": 42, # The bottom padding of the cell.
17155 "left": 42, # The left padding of the cell.
17156 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017157 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017158 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
17159 # for simplicity of conversion to/from color representations in various
17160 # languages over compactness; for example, the fields of this representation
17161 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17162 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17163 # method in iOS; and, with just a little work, it can be easily formatted into
17164 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17165 #
17166 # Example (Java):
17167 #
17168 # import com.google.type.Color;
17169 #
17170 # // ...
17171 # public static java.awt.Color fromProto(Color protocolor) {
17172 # float alpha = protocolor.hasAlpha()
17173 # ? protocolor.getAlpha().getValue()
17174 # : 1.0;
17175 #
17176 # return new java.awt.Color(
17177 # protocolor.getRed(),
17178 # protocolor.getGreen(),
17179 # protocolor.getBlue(),
17180 # alpha);
17181 # }
17182 #
17183 # public static Color toProto(java.awt.Color color) {
17184 # float red = (float) color.getRed();
17185 # float green = (float) color.getGreen();
17186 # float blue = (float) color.getBlue();
17187 # float denominator = 255.0;
17188 # Color.Builder resultBuilder =
17189 # Color
17190 # .newBuilder()
17191 # .setRed(red / denominator)
17192 # .setGreen(green / denominator)
17193 # .setBlue(blue / denominator);
17194 # int alpha = color.getAlpha();
17195 # if (alpha != 255) {
17196 # result.setAlpha(
17197 # FloatValue
17198 # .newBuilder()
17199 # .setValue(((float) alpha) / denominator)
17200 # .build());
17201 # }
17202 # return resultBuilder.build();
17203 # }
17204 # // ...
17205 #
17206 # Example (iOS / Obj-C):
17207 #
17208 # // ...
17209 # static UIColor* fromProto(Color* protocolor) {
17210 # float red = [protocolor red];
17211 # float green = [protocolor green];
17212 # float blue = [protocolor blue];
17213 # FloatValue* alpha_wrapper = [protocolor alpha];
17214 # float alpha = 1.0;
17215 # if (alpha_wrapper != nil) {
17216 # alpha = [alpha_wrapper value];
17217 # }
17218 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17219 # }
17220 #
17221 # static Color* toProto(UIColor* color) {
17222 # CGFloat red, green, blue, alpha;
17223 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17224 # return nil;
17225 # }
17226 # Color* result = [Color alloc] init];
17227 # [result setRed:red];
17228 # [result setGreen:green];
17229 # [result setBlue:blue];
17230 # if (alpha <= 0.9999) {
17231 # [result setAlpha:floatWrapperWithValue(alpha)];
17232 # }
17233 # [result autorelease];
17234 # return result;
17235 # }
17236 # // ...
17237 #
17238 # Example (JavaScript):
17239 #
17240 # // ...
17241 #
17242 # var protoToCssColor = function(rgb_color) {
17243 # var redFrac = rgb_color.red || 0.0;
17244 # var greenFrac = rgb_color.green || 0.0;
17245 # var blueFrac = rgb_color.blue || 0.0;
17246 # var red = Math.floor(redFrac * 255);
17247 # var green = Math.floor(greenFrac * 255);
17248 # var blue = Math.floor(blueFrac * 255);
17249 #
17250 # if (!('alpha' in rgb_color)) {
17251 # return rgbToCssColor_(red, green, blue);
17252 # }
17253 #
17254 # var alphaFrac = rgb_color.alpha.value || 0.0;
17255 # var rgbParams = [red, green, blue].join(',');
17256 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17257 # };
17258 #
17259 # var rgbToCssColor_ = function(red, green, blue) {
17260 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17261 # var hexString = rgbNumber.toString(16);
17262 # var missingZeros = 6 - hexString.length;
17263 # var resultBuilder = ['#'];
17264 # for (var i = 0; i < missingZeros; i++) {
17265 # resultBuilder.push('0');
17266 # }
17267 # resultBuilder.push(hexString);
17268 # return resultBuilder.join('');
17269 # };
17270 #
17271 # // ...
17272 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17273 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17274 # the final pixel color is defined by the equation:
17275 #
17276 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17277 #
17278 # This means that a value of 1.0 corresponds to a solid color, whereas
17279 # a value of 0.0 corresponds to a completely transparent color. This
17280 # uses a wrapper message rather than a simple float scalar so that it is
17281 # possible to distinguish between a default value and the value being unset.
17282 # If omitted, this color object is to be rendered as a solid color
17283 # (as if the alpha value had been explicitly given with a value of 1.0).
17284 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17285 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17286 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017287 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017288 "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).
17289 # Absent values indicate that the field isn't specified.
17290 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
17291 # for simplicity of conversion to/from color representations in various
17292 # languages over compactness; for example, the fields of this representation
17293 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17294 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17295 # method in iOS; and, with just a little work, it can be easily formatted into
17296 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17297 #
17298 # Example (Java):
17299 #
17300 # import com.google.type.Color;
17301 #
17302 # // ...
17303 # public static java.awt.Color fromProto(Color protocolor) {
17304 # float alpha = protocolor.hasAlpha()
17305 # ? protocolor.getAlpha().getValue()
17306 # : 1.0;
17307 #
17308 # return new java.awt.Color(
17309 # protocolor.getRed(),
17310 # protocolor.getGreen(),
17311 # protocolor.getBlue(),
17312 # alpha);
17313 # }
17314 #
17315 # public static Color toProto(java.awt.Color color) {
17316 # float red = (float) color.getRed();
17317 # float green = (float) color.getGreen();
17318 # float blue = (float) color.getBlue();
17319 # float denominator = 255.0;
17320 # Color.Builder resultBuilder =
17321 # Color
17322 # .newBuilder()
17323 # .setRed(red / denominator)
17324 # .setGreen(green / denominator)
17325 # .setBlue(blue / denominator);
17326 # int alpha = color.getAlpha();
17327 # if (alpha != 255) {
17328 # result.setAlpha(
17329 # FloatValue
17330 # .newBuilder()
17331 # .setValue(((float) alpha) / denominator)
17332 # .build());
17333 # }
17334 # return resultBuilder.build();
17335 # }
17336 # // ...
17337 #
17338 # Example (iOS / Obj-C):
17339 #
17340 # // ...
17341 # static UIColor* fromProto(Color* protocolor) {
17342 # float red = [protocolor red];
17343 # float green = [protocolor green];
17344 # float blue = [protocolor blue];
17345 # FloatValue* alpha_wrapper = [protocolor alpha];
17346 # float alpha = 1.0;
17347 # if (alpha_wrapper != nil) {
17348 # alpha = [alpha_wrapper value];
17349 # }
17350 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17351 # }
17352 #
17353 # static Color* toProto(UIColor* color) {
17354 # CGFloat red, green, blue, alpha;
17355 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17356 # return nil;
17357 # }
17358 # Color* result = [Color alloc] init];
17359 # [result setRed:red];
17360 # [result setGreen:green];
17361 # [result setBlue:blue];
17362 # if (alpha <= 0.9999) {
17363 # [result setAlpha:floatWrapperWithValue(alpha)];
17364 # }
17365 # [result autorelease];
17366 # return result;
17367 # }
17368 # // ...
17369 #
17370 # Example (JavaScript):
17371 #
17372 # // ...
17373 #
17374 # var protoToCssColor = function(rgb_color) {
17375 # var redFrac = rgb_color.red || 0.0;
17376 # var greenFrac = rgb_color.green || 0.0;
17377 # var blueFrac = rgb_color.blue || 0.0;
17378 # var red = Math.floor(redFrac * 255);
17379 # var green = Math.floor(greenFrac * 255);
17380 # var blue = Math.floor(blueFrac * 255);
17381 #
17382 # if (!('alpha' in rgb_color)) {
17383 # return rgbToCssColor_(red, green, blue);
17384 # }
17385 #
17386 # var alphaFrac = rgb_color.alpha.value || 0.0;
17387 # var rgbParams = [red, green, blue].join(',');
17388 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17389 # };
17390 #
17391 # var rgbToCssColor_ = function(red, green, blue) {
17392 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17393 # var hexString = rgbNumber.toString(16);
17394 # var missingZeros = 6 - hexString.length;
17395 # var resultBuilder = ['#'];
17396 # for (var i = 0; i < missingZeros; i++) {
17397 # resultBuilder.push('0');
17398 # }
17399 # resultBuilder.push(hexString);
17400 # return resultBuilder.join('');
17401 # };
17402 #
17403 # // ...
17404 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17405 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17406 # the final pixel color is defined by the equation:
17407 #
17408 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17409 #
17410 # This means that a value of 1.0 corresponds to a solid color, whereas
17411 # a value of 0.0 corresponds to a completely transparent color. This
17412 # uses a wrapper message rather than a simple float scalar so that it is
17413 # possible to distinguish between a default value and the value being unset.
17414 # If omitted, this color object is to be rendered as a solid color
17415 # (as if the alpha value had been explicitly given with a value of 1.0).
17416 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17417 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17418 },
17419 "bold": True or False, # True if the text is bold.
17420 "strikethrough": True or False, # True if the text has a strikethrough.
17421 "fontFamily": "A String", # The font family.
17422 "fontSize": 42, # The size of the font.
17423 "italic": True or False, # True if the text is italicized.
17424 "underline": True or False, # True if the text is underlined.
17425 },
17426 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
17427 "borders": { # The borders of the cell. # The borders of the cell.
17428 "top": { # A border along a cell. # The top border of the cell.
17429 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17430 # for simplicity of conversion to/from color representations in various
17431 # languages over compactness; for example, the fields of this representation
17432 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17433 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17434 # method in iOS; and, with just a little work, it can be easily formatted into
17435 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17436 #
17437 # Example (Java):
17438 #
17439 # import com.google.type.Color;
17440 #
17441 # // ...
17442 # public static java.awt.Color fromProto(Color protocolor) {
17443 # float alpha = protocolor.hasAlpha()
17444 # ? protocolor.getAlpha().getValue()
17445 # : 1.0;
17446 #
17447 # return new java.awt.Color(
17448 # protocolor.getRed(),
17449 # protocolor.getGreen(),
17450 # protocolor.getBlue(),
17451 # alpha);
17452 # }
17453 #
17454 # public static Color toProto(java.awt.Color color) {
17455 # float red = (float) color.getRed();
17456 # float green = (float) color.getGreen();
17457 # float blue = (float) color.getBlue();
17458 # float denominator = 255.0;
17459 # Color.Builder resultBuilder =
17460 # Color
17461 # .newBuilder()
17462 # .setRed(red / denominator)
17463 # .setGreen(green / denominator)
17464 # .setBlue(blue / denominator);
17465 # int alpha = color.getAlpha();
17466 # if (alpha != 255) {
17467 # result.setAlpha(
17468 # FloatValue
17469 # .newBuilder()
17470 # .setValue(((float) alpha) / denominator)
17471 # .build());
17472 # }
17473 # return resultBuilder.build();
17474 # }
17475 # // ...
17476 #
17477 # Example (iOS / Obj-C):
17478 #
17479 # // ...
17480 # static UIColor* fromProto(Color* protocolor) {
17481 # float red = [protocolor red];
17482 # float green = [protocolor green];
17483 # float blue = [protocolor blue];
17484 # FloatValue* alpha_wrapper = [protocolor alpha];
17485 # float alpha = 1.0;
17486 # if (alpha_wrapper != nil) {
17487 # alpha = [alpha_wrapper value];
17488 # }
17489 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17490 # }
17491 #
17492 # static Color* toProto(UIColor* color) {
17493 # CGFloat red, green, blue, alpha;
17494 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17495 # return nil;
17496 # }
17497 # Color* result = [Color alloc] init];
17498 # [result setRed:red];
17499 # [result setGreen:green];
17500 # [result setBlue:blue];
17501 # if (alpha <= 0.9999) {
17502 # [result setAlpha:floatWrapperWithValue(alpha)];
17503 # }
17504 # [result autorelease];
17505 # return result;
17506 # }
17507 # // ...
17508 #
17509 # Example (JavaScript):
17510 #
17511 # // ...
17512 #
17513 # var protoToCssColor = function(rgb_color) {
17514 # var redFrac = rgb_color.red || 0.0;
17515 # var greenFrac = rgb_color.green || 0.0;
17516 # var blueFrac = rgb_color.blue || 0.0;
17517 # var red = Math.floor(redFrac * 255);
17518 # var green = Math.floor(greenFrac * 255);
17519 # var blue = Math.floor(blueFrac * 255);
17520 #
17521 # if (!('alpha' in rgb_color)) {
17522 # return rgbToCssColor_(red, green, blue);
17523 # }
17524 #
17525 # var alphaFrac = rgb_color.alpha.value || 0.0;
17526 # var rgbParams = [red, green, blue].join(',');
17527 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17528 # };
17529 #
17530 # var rgbToCssColor_ = function(red, green, blue) {
17531 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17532 # var hexString = rgbNumber.toString(16);
17533 # var missingZeros = 6 - hexString.length;
17534 # var resultBuilder = ['#'];
17535 # for (var i = 0; i < missingZeros; i++) {
17536 # resultBuilder.push('0');
17537 # }
17538 # resultBuilder.push(hexString);
17539 # return resultBuilder.join('');
17540 # };
17541 #
17542 # // ...
17543 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17544 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17545 # the final pixel color is defined by the equation:
17546 #
17547 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17548 #
17549 # This means that a value of 1.0 corresponds to a solid color, whereas
17550 # a value of 0.0 corresponds to a completely transparent color. This
17551 # uses a wrapper message rather than a simple float scalar so that it is
17552 # possible to distinguish between a default value and the value being unset.
17553 # If omitted, this color object is to be rendered as a solid color
17554 # (as if the alpha value had been explicitly given with a value of 1.0).
17555 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17556 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17557 },
17558 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017559 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017560 "style": "A String", # The style of the border.
17561 },
17562 "right": { # A border along a cell. # The right border of the cell.
17563 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17564 # for simplicity of conversion to/from color representations in various
17565 # languages over compactness; for example, the fields of this representation
17566 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17567 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17568 # method in iOS; and, with just a little work, it can be easily formatted into
17569 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17570 #
17571 # Example (Java):
17572 #
17573 # import com.google.type.Color;
17574 #
17575 # // ...
17576 # public static java.awt.Color fromProto(Color protocolor) {
17577 # float alpha = protocolor.hasAlpha()
17578 # ? protocolor.getAlpha().getValue()
17579 # : 1.0;
17580 #
17581 # return new java.awt.Color(
17582 # protocolor.getRed(),
17583 # protocolor.getGreen(),
17584 # protocolor.getBlue(),
17585 # alpha);
17586 # }
17587 #
17588 # public static Color toProto(java.awt.Color color) {
17589 # float red = (float) color.getRed();
17590 # float green = (float) color.getGreen();
17591 # float blue = (float) color.getBlue();
17592 # float denominator = 255.0;
17593 # Color.Builder resultBuilder =
17594 # Color
17595 # .newBuilder()
17596 # .setRed(red / denominator)
17597 # .setGreen(green / denominator)
17598 # .setBlue(blue / denominator);
17599 # int alpha = color.getAlpha();
17600 # if (alpha != 255) {
17601 # result.setAlpha(
17602 # FloatValue
17603 # .newBuilder()
17604 # .setValue(((float) alpha) / denominator)
17605 # .build());
17606 # }
17607 # return resultBuilder.build();
17608 # }
17609 # // ...
17610 #
17611 # Example (iOS / Obj-C):
17612 #
17613 # // ...
17614 # static UIColor* fromProto(Color* protocolor) {
17615 # float red = [protocolor red];
17616 # float green = [protocolor green];
17617 # float blue = [protocolor blue];
17618 # FloatValue* alpha_wrapper = [protocolor alpha];
17619 # float alpha = 1.0;
17620 # if (alpha_wrapper != nil) {
17621 # alpha = [alpha_wrapper value];
17622 # }
17623 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17624 # }
17625 #
17626 # static Color* toProto(UIColor* color) {
17627 # CGFloat red, green, blue, alpha;
17628 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17629 # return nil;
17630 # }
17631 # Color* result = [Color alloc] init];
17632 # [result setRed:red];
17633 # [result setGreen:green];
17634 # [result setBlue:blue];
17635 # if (alpha <= 0.9999) {
17636 # [result setAlpha:floatWrapperWithValue(alpha)];
17637 # }
17638 # [result autorelease];
17639 # return result;
17640 # }
17641 # // ...
17642 #
17643 # Example (JavaScript):
17644 #
17645 # // ...
17646 #
17647 # var protoToCssColor = function(rgb_color) {
17648 # var redFrac = rgb_color.red || 0.0;
17649 # var greenFrac = rgb_color.green || 0.0;
17650 # var blueFrac = rgb_color.blue || 0.0;
17651 # var red = Math.floor(redFrac * 255);
17652 # var green = Math.floor(greenFrac * 255);
17653 # var blue = Math.floor(blueFrac * 255);
17654 #
17655 # if (!('alpha' in rgb_color)) {
17656 # return rgbToCssColor_(red, green, blue);
17657 # }
17658 #
17659 # var alphaFrac = rgb_color.alpha.value || 0.0;
17660 # var rgbParams = [red, green, blue].join(',');
17661 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17662 # };
17663 #
17664 # var rgbToCssColor_ = function(red, green, blue) {
17665 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17666 # var hexString = rgbNumber.toString(16);
17667 # var missingZeros = 6 - hexString.length;
17668 # var resultBuilder = ['#'];
17669 # for (var i = 0; i < missingZeros; i++) {
17670 # resultBuilder.push('0');
17671 # }
17672 # resultBuilder.push(hexString);
17673 # return resultBuilder.join('');
17674 # };
17675 #
17676 # // ...
17677 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17678 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17679 # the final pixel color is defined by the equation:
17680 #
17681 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17682 #
17683 # This means that a value of 1.0 corresponds to a solid color, whereas
17684 # a value of 0.0 corresponds to a completely transparent color. This
17685 # uses a wrapper message rather than a simple float scalar so that it is
17686 # possible to distinguish between a default value and the value being unset.
17687 # If omitted, this color object is to be rendered as a solid color
17688 # (as if the alpha value had been explicitly given with a value of 1.0).
17689 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17690 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17691 },
17692 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017693 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017694 "style": "A String", # The style of the border.
17695 },
17696 "bottom": { # A border along a cell. # The bottom border of the cell.
17697 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17698 # for simplicity of conversion to/from color representations in various
17699 # languages over compactness; for example, the fields of this representation
17700 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17701 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17702 # method in iOS; and, with just a little work, it can be easily formatted into
17703 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17704 #
17705 # Example (Java):
17706 #
17707 # import com.google.type.Color;
17708 #
17709 # // ...
17710 # public static java.awt.Color fromProto(Color protocolor) {
17711 # float alpha = protocolor.hasAlpha()
17712 # ? protocolor.getAlpha().getValue()
17713 # : 1.0;
17714 #
17715 # return new java.awt.Color(
17716 # protocolor.getRed(),
17717 # protocolor.getGreen(),
17718 # protocolor.getBlue(),
17719 # alpha);
17720 # }
17721 #
17722 # public static Color toProto(java.awt.Color color) {
17723 # float red = (float) color.getRed();
17724 # float green = (float) color.getGreen();
17725 # float blue = (float) color.getBlue();
17726 # float denominator = 255.0;
17727 # Color.Builder resultBuilder =
17728 # Color
17729 # .newBuilder()
17730 # .setRed(red / denominator)
17731 # .setGreen(green / denominator)
17732 # .setBlue(blue / denominator);
17733 # int alpha = color.getAlpha();
17734 # if (alpha != 255) {
17735 # result.setAlpha(
17736 # FloatValue
17737 # .newBuilder()
17738 # .setValue(((float) alpha) / denominator)
17739 # .build());
17740 # }
17741 # return resultBuilder.build();
17742 # }
17743 # // ...
17744 #
17745 # Example (iOS / Obj-C):
17746 #
17747 # // ...
17748 # static UIColor* fromProto(Color* protocolor) {
17749 # float red = [protocolor red];
17750 # float green = [protocolor green];
17751 # float blue = [protocolor blue];
17752 # FloatValue* alpha_wrapper = [protocolor alpha];
17753 # float alpha = 1.0;
17754 # if (alpha_wrapper != nil) {
17755 # alpha = [alpha_wrapper value];
17756 # }
17757 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17758 # }
17759 #
17760 # static Color* toProto(UIColor* color) {
17761 # CGFloat red, green, blue, alpha;
17762 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17763 # return nil;
17764 # }
17765 # Color* result = [Color alloc] init];
17766 # [result setRed:red];
17767 # [result setGreen:green];
17768 # [result setBlue:blue];
17769 # if (alpha <= 0.9999) {
17770 # [result setAlpha:floatWrapperWithValue(alpha)];
17771 # }
17772 # [result autorelease];
17773 # return result;
17774 # }
17775 # // ...
17776 #
17777 # Example (JavaScript):
17778 #
17779 # // ...
17780 #
17781 # var protoToCssColor = function(rgb_color) {
17782 # var redFrac = rgb_color.red || 0.0;
17783 # var greenFrac = rgb_color.green || 0.0;
17784 # var blueFrac = rgb_color.blue || 0.0;
17785 # var red = Math.floor(redFrac * 255);
17786 # var green = Math.floor(greenFrac * 255);
17787 # var blue = Math.floor(blueFrac * 255);
17788 #
17789 # if (!('alpha' in rgb_color)) {
17790 # return rgbToCssColor_(red, green, blue);
17791 # }
17792 #
17793 # var alphaFrac = rgb_color.alpha.value || 0.0;
17794 # var rgbParams = [red, green, blue].join(',');
17795 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17796 # };
17797 #
17798 # var rgbToCssColor_ = function(red, green, blue) {
17799 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17800 # var hexString = rgbNumber.toString(16);
17801 # var missingZeros = 6 - hexString.length;
17802 # var resultBuilder = ['#'];
17803 # for (var i = 0; i < missingZeros; i++) {
17804 # resultBuilder.push('0');
17805 # }
17806 # resultBuilder.push(hexString);
17807 # return resultBuilder.join('');
17808 # };
17809 #
17810 # // ...
17811 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17812 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17813 # the final pixel color is defined by the equation:
17814 #
17815 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17816 #
17817 # This means that a value of 1.0 corresponds to a solid color, whereas
17818 # a value of 0.0 corresponds to a completely transparent color. This
17819 # uses a wrapper message rather than a simple float scalar so that it is
17820 # possible to distinguish between a default value and the value being unset.
17821 # If omitted, this color object is to be rendered as a solid color
17822 # (as if the alpha value had been explicitly given with a value of 1.0).
17823 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17824 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17825 },
17826 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017827 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017828 "style": "A String", # The style of the border.
17829 },
17830 "left": { # A border along a cell. # The left border of the cell.
17831 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17832 # for simplicity of conversion to/from color representations in various
17833 # languages over compactness; for example, the fields of this representation
17834 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17835 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17836 # method in iOS; and, with just a little work, it can be easily formatted into
17837 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17838 #
17839 # Example (Java):
17840 #
17841 # import com.google.type.Color;
17842 #
17843 # // ...
17844 # public static java.awt.Color fromProto(Color protocolor) {
17845 # float alpha = protocolor.hasAlpha()
17846 # ? protocolor.getAlpha().getValue()
17847 # : 1.0;
17848 #
17849 # return new java.awt.Color(
17850 # protocolor.getRed(),
17851 # protocolor.getGreen(),
17852 # protocolor.getBlue(),
17853 # alpha);
17854 # }
17855 #
17856 # public static Color toProto(java.awt.Color color) {
17857 # float red = (float) color.getRed();
17858 # float green = (float) color.getGreen();
17859 # float blue = (float) color.getBlue();
17860 # float denominator = 255.0;
17861 # Color.Builder resultBuilder =
17862 # Color
17863 # .newBuilder()
17864 # .setRed(red / denominator)
17865 # .setGreen(green / denominator)
17866 # .setBlue(blue / denominator);
17867 # int alpha = color.getAlpha();
17868 # if (alpha != 255) {
17869 # result.setAlpha(
17870 # FloatValue
17871 # .newBuilder()
17872 # .setValue(((float) alpha) / denominator)
17873 # .build());
17874 # }
17875 # return resultBuilder.build();
17876 # }
17877 # // ...
17878 #
17879 # Example (iOS / Obj-C):
17880 #
17881 # // ...
17882 # static UIColor* fromProto(Color* protocolor) {
17883 # float red = [protocolor red];
17884 # float green = [protocolor green];
17885 # float blue = [protocolor blue];
17886 # FloatValue* alpha_wrapper = [protocolor alpha];
17887 # float alpha = 1.0;
17888 # if (alpha_wrapper != nil) {
17889 # alpha = [alpha_wrapper value];
17890 # }
17891 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17892 # }
17893 #
17894 # static Color* toProto(UIColor* color) {
17895 # CGFloat red, green, blue, alpha;
17896 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17897 # return nil;
17898 # }
17899 # Color* result = [Color alloc] init];
17900 # [result setRed:red];
17901 # [result setGreen:green];
17902 # [result setBlue:blue];
17903 # if (alpha <= 0.9999) {
17904 # [result setAlpha:floatWrapperWithValue(alpha)];
17905 # }
17906 # [result autorelease];
17907 # return result;
17908 # }
17909 # // ...
17910 #
17911 # Example (JavaScript):
17912 #
17913 # // ...
17914 #
17915 # var protoToCssColor = function(rgb_color) {
17916 # var redFrac = rgb_color.red || 0.0;
17917 # var greenFrac = rgb_color.green || 0.0;
17918 # var blueFrac = rgb_color.blue || 0.0;
17919 # var red = Math.floor(redFrac * 255);
17920 # var green = Math.floor(greenFrac * 255);
17921 # var blue = Math.floor(blueFrac * 255);
17922 #
17923 # if (!('alpha' in rgb_color)) {
17924 # return rgbToCssColor_(red, green, blue);
17925 # }
17926 #
17927 # var alphaFrac = rgb_color.alpha.value || 0.0;
17928 # var rgbParams = [red, green, blue].join(',');
17929 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17930 # };
17931 #
17932 # var rgbToCssColor_ = function(red, green, blue) {
17933 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17934 # var hexString = rgbNumber.toString(16);
17935 # var missingZeros = 6 - hexString.length;
17936 # var resultBuilder = ['#'];
17937 # for (var i = 0; i < missingZeros; i++) {
17938 # resultBuilder.push('0');
17939 # }
17940 # resultBuilder.push(hexString);
17941 # return resultBuilder.join('');
17942 # };
17943 #
17944 # // ...
17945 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17946 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17947 # the final pixel color is defined by the equation:
17948 #
17949 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17950 #
17951 # This means that a value of 1.0 corresponds to a solid color, whereas
17952 # a value of 0.0 corresponds to a completely transparent color. This
17953 # uses a wrapper message rather than a simple float scalar so that it is
17954 # possible to distinguish between a default value and the value being unset.
17955 # If omitted, this color object is to be rendered as a solid color
17956 # (as if the alpha value had been explicitly given with a value of 1.0).
17957 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17958 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17959 },
17960 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017961 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017962 "style": "A String", # The style of the border.
17963 },
17964 },
17965 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
17966 },
17967 },
17968 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
17969 # the interpolation points listed. The format of a cell will vary
17970 # based on its contents as compared to the values of the interpolation
17971 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070017972 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070017973 # These pin the gradient color scale according to the color,
17974 # type and value chosen.
17975 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
17976 # for simplicity of conversion to/from color representations in various
17977 # languages over compactness; for example, the fields of this representation
17978 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17979 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17980 # method in iOS; and, with just a little work, it can be easily formatted into
17981 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17982 #
17983 # Example (Java):
17984 #
17985 # import com.google.type.Color;
17986 #
17987 # // ...
17988 # public static java.awt.Color fromProto(Color protocolor) {
17989 # float alpha = protocolor.hasAlpha()
17990 # ? protocolor.getAlpha().getValue()
17991 # : 1.0;
17992 #
17993 # return new java.awt.Color(
17994 # protocolor.getRed(),
17995 # protocolor.getGreen(),
17996 # protocolor.getBlue(),
17997 # alpha);
17998 # }
17999 #
18000 # public static Color toProto(java.awt.Color color) {
18001 # float red = (float) color.getRed();
18002 # float green = (float) color.getGreen();
18003 # float blue = (float) color.getBlue();
18004 # float denominator = 255.0;
18005 # Color.Builder resultBuilder =
18006 # Color
18007 # .newBuilder()
18008 # .setRed(red / denominator)
18009 # .setGreen(green / denominator)
18010 # .setBlue(blue / denominator);
18011 # int alpha = color.getAlpha();
18012 # if (alpha != 255) {
18013 # result.setAlpha(
18014 # FloatValue
18015 # .newBuilder()
18016 # .setValue(((float) alpha) / denominator)
18017 # .build());
18018 # }
18019 # return resultBuilder.build();
18020 # }
18021 # // ...
18022 #
18023 # Example (iOS / Obj-C):
18024 #
18025 # // ...
18026 # static UIColor* fromProto(Color* protocolor) {
18027 # float red = [protocolor red];
18028 # float green = [protocolor green];
18029 # float blue = [protocolor blue];
18030 # FloatValue* alpha_wrapper = [protocolor alpha];
18031 # float alpha = 1.0;
18032 # if (alpha_wrapper != nil) {
18033 # alpha = [alpha_wrapper value];
18034 # }
18035 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18036 # }
18037 #
18038 # static Color* toProto(UIColor* color) {
18039 # CGFloat red, green, blue, alpha;
18040 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18041 # return nil;
18042 # }
18043 # Color* result = [Color alloc] init];
18044 # [result setRed:red];
18045 # [result setGreen:green];
18046 # [result setBlue:blue];
18047 # if (alpha <= 0.9999) {
18048 # [result setAlpha:floatWrapperWithValue(alpha)];
18049 # }
18050 # [result autorelease];
18051 # return result;
18052 # }
18053 # // ...
18054 #
18055 # Example (JavaScript):
18056 #
18057 # // ...
18058 #
18059 # var protoToCssColor = function(rgb_color) {
18060 # var redFrac = rgb_color.red || 0.0;
18061 # var greenFrac = rgb_color.green || 0.0;
18062 # var blueFrac = rgb_color.blue || 0.0;
18063 # var red = Math.floor(redFrac * 255);
18064 # var green = Math.floor(greenFrac * 255);
18065 # var blue = Math.floor(blueFrac * 255);
18066 #
18067 # if (!('alpha' in rgb_color)) {
18068 # return rgbToCssColor_(red, green, blue);
18069 # }
18070 #
18071 # var alphaFrac = rgb_color.alpha.value || 0.0;
18072 # var rgbParams = [red, green, blue].join(',');
18073 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18074 # };
18075 #
18076 # var rgbToCssColor_ = function(red, green, blue) {
18077 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18078 # var hexString = rgbNumber.toString(16);
18079 # var missingZeros = 6 - hexString.length;
18080 # var resultBuilder = ['#'];
18081 # for (var i = 0; i < missingZeros; i++) {
18082 # resultBuilder.push('0');
18083 # }
18084 # resultBuilder.push(hexString);
18085 # return resultBuilder.join('');
18086 # };
18087 #
18088 # // ...
18089 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18090 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18091 # the final pixel color is defined by the equation:
18092 #
18093 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18094 #
18095 # This means that a value of 1.0 corresponds to a solid color, whereas
18096 # a value of 0.0 corresponds to a completely transparent color. This
18097 # uses a wrapper message rather than a simple float scalar so that it is
18098 # possible to distinguish between a default value and the value being unset.
18099 # If omitted, this color object is to be rendered as a solid color
18100 # (as if the alpha value had been explicitly given with a value of 1.0).
18101 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18102 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18103 },
18104 "type": "A String", # How the value should be interpreted.
18105 "value": "A String", # The value this interpolation point uses. May be a formula.
18106 # Unused if type is MIN or
18107 # MAX.
18108 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018109 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018110 # These pin the gradient color scale according to the color,
18111 # type and value chosen.
18112 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
18113 # for simplicity of conversion to/from color representations in various
18114 # languages over compactness; for example, the fields of this representation
18115 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18116 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18117 # method in iOS; and, with just a little work, it can be easily formatted into
18118 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18119 #
18120 # Example (Java):
18121 #
18122 # import com.google.type.Color;
18123 #
18124 # // ...
18125 # public static java.awt.Color fromProto(Color protocolor) {
18126 # float alpha = protocolor.hasAlpha()
18127 # ? protocolor.getAlpha().getValue()
18128 # : 1.0;
18129 #
18130 # return new java.awt.Color(
18131 # protocolor.getRed(),
18132 # protocolor.getGreen(),
18133 # protocolor.getBlue(),
18134 # alpha);
18135 # }
18136 #
18137 # public static Color toProto(java.awt.Color color) {
18138 # float red = (float) color.getRed();
18139 # float green = (float) color.getGreen();
18140 # float blue = (float) color.getBlue();
18141 # float denominator = 255.0;
18142 # Color.Builder resultBuilder =
18143 # Color
18144 # .newBuilder()
18145 # .setRed(red / denominator)
18146 # .setGreen(green / denominator)
18147 # .setBlue(blue / denominator);
18148 # int alpha = color.getAlpha();
18149 # if (alpha != 255) {
18150 # result.setAlpha(
18151 # FloatValue
18152 # .newBuilder()
18153 # .setValue(((float) alpha) / denominator)
18154 # .build());
18155 # }
18156 # return resultBuilder.build();
18157 # }
18158 # // ...
18159 #
18160 # Example (iOS / Obj-C):
18161 #
18162 # // ...
18163 # static UIColor* fromProto(Color* protocolor) {
18164 # float red = [protocolor red];
18165 # float green = [protocolor green];
18166 # float blue = [protocolor blue];
18167 # FloatValue* alpha_wrapper = [protocolor alpha];
18168 # float alpha = 1.0;
18169 # if (alpha_wrapper != nil) {
18170 # alpha = [alpha_wrapper value];
18171 # }
18172 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18173 # }
18174 #
18175 # static Color* toProto(UIColor* color) {
18176 # CGFloat red, green, blue, alpha;
18177 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18178 # return nil;
18179 # }
18180 # Color* result = [Color alloc] init];
18181 # [result setRed:red];
18182 # [result setGreen:green];
18183 # [result setBlue:blue];
18184 # if (alpha <= 0.9999) {
18185 # [result setAlpha:floatWrapperWithValue(alpha)];
18186 # }
18187 # [result autorelease];
18188 # return result;
18189 # }
18190 # // ...
18191 #
18192 # Example (JavaScript):
18193 #
18194 # // ...
18195 #
18196 # var protoToCssColor = function(rgb_color) {
18197 # var redFrac = rgb_color.red || 0.0;
18198 # var greenFrac = rgb_color.green || 0.0;
18199 # var blueFrac = rgb_color.blue || 0.0;
18200 # var red = Math.floor(redFrac * 255);
18201 # var green = Math.floor(greenFrac * 255);
18202 # var blue = Math.floor(blueFrac * 255);
18203 #
18204 # if (!('alpha' in rgb_color)) {
18205 # return rgbToCssColor_(red, green, blue);
18206 # }
18207 #
18208 # var alphaFrac = rgb_color.alpha.value || 0.0;
18209 # var rgbParams = [red, green, blue].join(',');
18210 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18211 # };
18212 #
18213 # var rgbToCssColor_ = function(red, green, blue) {
18214 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18215 # var hexString = rgbNumber.toString(16);
18216 # var missingZeros = 6 - hexString.length;
18217 # var resultBuilder = ['#'];
18218 # for (var i = 0; i < missingZeros; i++) {
18219 # resultBuilder.push('0');
18220 # }
18221 # resultBuilder.push(hexString);
18222 # return resultBuilder.join('');
18223 # };
18224 #
18225 # // ...
18226 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18227 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18228 # the final pixel color is defined by the equation:
18229 #
18230 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18231 #
18232 # This means that a value of 1.0 corresponds to a solid color, whereas
18233 # a value of 0.0 corresponds to a completely transparent color. This
18234 # uses a wrapper message rather than a simple float scalar so that it is
18235 # possible to distinguish between a default value and the value being unset.
18236 # If omitted, this color object is to be rendered as a solid color
18237 # (as if the alpha value had been explicitly given with a value of 1.0).
18238 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18239 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18240 },
18241 "type": "A String", # How the value should be interpreted.
18242 "value": "A String", # The value this interpolation point uses. May be a formula.
18243 # Unused if type is MIN or
18244 # MAX.
18245 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018246 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018247 # These pin the gradient color scale according to the color,
18248 # type and value chosen.
18249 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
18250 # for simplicity of conversion to/from color representations in various
18251 # languages over compactness; for example, the fields of this representation
18252 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18253 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18254 # method in iOS; and, with just a little work, it can be easily formatted into
18255 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18256 #
18257 # Example (Java):
18258 #
18259 # import com.google.type.Color;
18260 #
18261 # // ...
18262 # public static java.awt.Color fromProto(Color protocolor) {
18263 # float alpha = protocolor.hasAlpha()
18264 # ? protocolor.getAlpha().getValue()
18265 # : 1.0;
18266 #
18267 # return new java.awt.Color(
18268 # protocolor.getRed(),
18269 # protocolor.getGreen(),
18270 # protocolor.getBlue(),
18271 # alpha);
18272 # }
18273 #
18274 # public static Color toProto(java.awt.Color color) {
18275 # float red = (float) color.getRed();
18276 # float green = (float) color.getGreen();
18277 # float blue = (float) color.getBlue();
18278 # float denominator = 255.0;
18279 # Color.Builder resultBuilder =
18280 # Color
18281 # .newBuilder()
18282 # .setRed(red / denominator)
18283 # .setGreen(green / denominator)
18284 # .setBlue(blue / denominator);
18285 # int alpha = color.getAlpha();
18286 # if (alpha != 255) {
18287 # result.setAlpha(
18288 # FloatValue
18289 # .newBuilder()
18290 # .setValue(((float) alpha) / denominator)
18291 # .build());
18292 # }
18293 # return resultBuilder.build();
18294 # }
18295 # // ...
18296 #
18297 # Example (iOS / Obj-C):
18298 #
18299 # // ...
18300 # static UIColor* fromProto(Color* protocolor) {
18301 # float red = [protocolor red];
18302 # float green = [protocolor green];
18303 # float blue = [protocolor blue];
18304 # FloatValue* alpha_wrapper = [protocolor alpha];
18305 # float alpha = 1.0;
18306 # if (alpha_wrapper != nil) {
18307 # alpha = [alpha_wrapper value];
18308 # }
18309 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18310 # }
18311 #
18312 # static Color* toProto(UIColor* color) {
18313 # CGFloat red, green, blue, alpha;
18314 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18315 # return nil;
18316 # }
18317 # Color* result = [Color alloc] init];
18318 # [result setRed:red];
18319 # [result setGreen:green];
18320 # [result setBlue:blue];
18321 # if (alpha <= 0.9999) {
18322 # [result setAlpha:floatWrapperWithValue(alpha)];
18323 # }
18324 # [result autorelease];
18325 # return result;
18326 # }
18327 # // ...
18328 #
18329 # Example (JavaScript):
18330 #
18331 # // ...
18332 #
18333 # var protoToCssColor = function(rgb_color) {
18334 # var redFrac = rgb_color.red || 0.0;
18335 # var greenFrac = rgb_color.green || 0.0;
18336 # var blueFrac = rgb_color.blue || 0.0;
18337 # var red = Math.floor(redFrac * 255);
18338 # var green = Math.floor(greenFrac * 255);
18339 # var blue = Math.floor(blueFrac * 255);
18340 #
18341 # if (!('alpha' in rgb_color)) {
18342 # return rgbToCssColor_(red, green, blue);
18343 # }
18344 #
18345 # var alphaFrac = rgb_color.alpha.value || 0.0;
18346 # var rgbParams = [red, green, blue].join(',');
18347 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18348 # };
18349 #
18350 # var rgbToCssColor_ = function(red, green, blue) {
18351 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18352 # var hexString = rgbNumber.toString(16);
18353 # var missingZeros = 6 - hexString.length;
18354 # var resultBuilder = ['#'];
18355 # for (var i = 0; i < missingZeros; i++) {
18356 # resultBuilder.push('0');
18357 # }
18358 # resultBuilder.push(hexString);
18359 # return resultBuilder.join('');
18360 # };
18361 #
18362 # // ...
18363 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18364 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18365 # the final pixel color is defined by the equation:
18366 #
18367 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18368 #
18369 # This means that a value of 1.0 corresponds to a solid color, whereas
18370 # a value of 0.0 corresponds to a completely transparent color. This
18371 # uses a wrapper message rather than a simple float scalar so that it is
18372 # possible to distinguish between a default value and the value being unset.
18373 # If omitted, this color object is to be rendered as a solid color
18374 # (as if the alpha value had been explicitly given with a value of 1.0).
18375 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18376 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18377 },
18378 "type": "A String", # How the value should be interpreted.
18379 "value": "A String", # The value this interpolation point uses. May be a formula.
18380 # Unused if type is MIN or
18381 # MAX.
18382 },
18383 },
18384 },
18385 },
18386 "addFilterView": { # The result of adding a filter view. # A reply from adding a filter view.
18387 "filter": { # A filter view. # The newly added filter view.
18388 "title": "A String", # The name of the filter view.
18389 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
18390 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018391 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018392 # may be set.
18393 "filterViewId": 42, # The ID of the filter view.
18394 "range": { # A range on a sheet. # The range this filter view covers.
18395 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018396 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018397 # may be set.
18398 # All indexes are zero-based.
18399 # Indexes are half open, e.g the start index is inclusive
18400 # and the end index is exclusive -- [start_index, end_index).
18401 # Missing indexes indicate the range is unbounded on that side.
18402 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018403 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018404 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018405 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018406 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018407 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018408 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018409 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018410 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018411 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018412 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018413 # `Sheet1!A:B == sheet_id: 0,
18414 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018415 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018416 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018417 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018418 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018419 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018420 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018421 #
18422 # The start index must always be less than or equal to the end index.
18423 # If the start index equals the end index, then the range is empty.
18424 # Empty ranges are typically not meaningful and are usually rendered in the
18425 # UI as `#REF!`.
18426 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
18427 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
18428 "sheetId": 42, # The sheet this range is on.
18429 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
18430 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
18431 },
18432 "sortSpecs": [ # The sort order per column. Later specifications are used when values
18433 # are equal in the earlier specifications.
18434 { # A sort order associated with a specific column or row.
18435 "sortOrder": "A String", # The order data should be sorted.
18436 "dimensionIndex": 42, # The dimension the sort should be applied to.
18437 },
18438 ],
18439 "criteria": { # The criteria for showing/hiding values per column.
18440 # The map's key is the column index, and the value is the criteria for
18441 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018442 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018443 "hiddenValues": [ # Values that should be hidden.
18444 "A String",
18445 ],
18446 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
18447 # (This does not override hiddenValues -- if a value is listed there,
18448 # it will still be hidden.)
18449 # BooleanConditions are used by conditional formatting,
18450 # data validation, and the criteria in filters.
18451 "type": "A String", # The type of condition.
18452 "values": [ # The values of the condition. The number of supported values depends
18453 # on the condition type. Some support zero values,
18454 # others one or two values,
18455 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
18456 { # The value of the condition.
18457 "relativeDate": "A String", # A relative date (based on the current date).
18458 # Valid only if the type is
18459 # DATE_BEFORE,
18460 # DATE_AFTER,
18461 # DATE_ON_OR_BEFORE or
18462 # DATE_ON_OR_AFTER.
18463 #
18464 # Relative dates are not supported in data validation.
18465 # They are supported only in conditional formatting and
18466 # conditional filters.
18467 "userEnteredValue": "A String", # A value the condition is based on.
18468 # The value will be parsed as if the user typed into a cell.
18469 # Formulas are supported (and must begin with an `=`).
18470 },
18471 ],
18472 },
18473 },
18474 },
18475 },
18476 },
18477 },
18478 ],
18479 }</pre>
18480</div>
18481
18482<div class="method">
18483 <code class="details" id="create">create(body, x__xgafv=None)</code>
18484 <pre>Creates a spreadsheet, returning the newly created spreadsheet.
18485
18486Args:
18487 body: object, The request body. (required)
18488 The object takes the form of:
18489
18490{ # Resource that represents a spreadsheet.
18491 "spreadsheetId": "A String", # The ID of the spreadsheet.
18492 # This field is read-only.
18493 "namedRanges": [ # The named ranges defined in a spreadsheet.
18494 { # A named range.
18495 "namedRangeId": "A String", # The ID of the named range.
18496 "range": { # A range on a sheet. # The range this represents.
18497 # All indexes are zero-based.
18498 # Indexes are half open, e.g the start index is inclusive
18499 # and the end index is exclusive -- [start_index, end_index).
18500 # Missing indexes indicate the range is unbounded on that side.
18501 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018502 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018503 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018504 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018505 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018506 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018507 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018508 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018509 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018510 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018511 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018512 # `Sheet1!A:B == sheet_id: 0,
18513 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018514 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018515 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018516 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018517 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018518 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018519 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018520 #
18521 # The start index must always be less than or equal to the end index.
18522 # If the start index equals the end index, then the range is empty.
18523 # Empty ranges are typically not meaningful and are usually rendered in the
18524 # UI as `#REF!`.
18525 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
18526 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
18527 "sheetId": 42, # The sheet this range is on.
18528 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
18529 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
18530 },
18531 "name": "A String", # The name of the named range.
18532 },
18533 ],
18534 "properties": { # Properties of a spreadsheet. # Overall properties of a spreadsheet.
18535 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018536 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018537 # * an ISO 639-1 language code such as `en`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018538 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018539 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018540 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018541 # * a combination of the ISO language code and country code, such as `en_US`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018542 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018543 # Note: when updating this field, not all locales/languages are supported.
18544 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
18545 # `America/New_York`. If the time zone isn't recognized, this may
18546 # be a custom time zone such as `GMT-07:00`.
18547 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
18548 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018549 # CellData.effectiveFormat will not be set if the
18550 # cell's format is equal to this default format.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018551 # This field is read-only.
18552 "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 -070018553 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
18554 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070018555 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
18556 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018557 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018558 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018559 },
18560 "textDirection": "A String", # The direction of the text in the cell.
18561 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
18562 # When updating padding, every field must be specified.
18563 "top": 42, # The top padding of the cell.
18564 "right": 42, # The right padding of the cell.
18565 "bottom": 42, # The bottom padding of the cell.
18566 "left": 42, # The left padding of the cell.
18567 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018568 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018569 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
18570 # for simplicity of conversion to/from color representations in various
18571 # languages over compactness; for example, the fields of this representation
18572 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18573 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18574 # method in iOS; and, with just a little work, it can be easily formatted into
18575 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18576 #
18577 # Example (Java):
18578 #
18579 # import com.google.type.Color;
18580 #
18581 # // ...
18582 # public static java.awt.Color fromProto(Color protocolor) {
18583 # float alpha = protocolor.hasAlpha()
18584 # ? protocolor.getAlpha().getValue()
18585 # : 1.0;
18586 #
18587 # return new java.awt.Color(
18588 # protocolor.getRed(),
18589 # protocolor.getGreen(),
18590 # protocolor.getBlue(),
18591 # alpha);
18592 # }
18593 #
18594 # public static Color toProto(java.awt.Color color) {
18595 # float red = (float) color.getRed();
18596 # float green = (float) color.getGreen();
18597 # float blue = (float) color.getBlue();
18598 # float denominator = 255.0;
18599 # Color.Builder resultBuilder =
18600 # Color
18601 # .newBuilder()
18602 # .setRed(red / denominator)
18603 # .setGreen(green / denominator)
18604 # .setBlue(blue / denominator);
18605 # int alpha = color.getAlpha();
18606 # if (alpha != 255) {
18607 # result.setAlpha(
18608 # FloatValue
18609 # .newBuilder()
18610 # .setValue(((float) alpha) / denominator)
18611 # .build());
18612 # }
18613 # return resultBuilder.build();
18614 # }
18615 # // ...
18616 #
18617 # Example (iOS / Obj-C):
18618 #
18619 # // ...
18620 # static UIColor* fromProto(Color* protocolor) {
18621 # float red = [protocolor red];
18622 # float green = [protocolor green];
18623 # float blue = [protocolor blue];
18624 # FloatValue* alpha_wrapper = [protocolor alpha];
18625 # float alpha = 1.0;
18626 # if (alpha_wrapper != nil) {
18627 # alpha = [alpha_wrapper value];
18628 # }
18629 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18630 # }
18631 #
18632 # static Color* toProto(UIColor* color) {
18633 # CGFloat red, green, blue, alpha;
18634 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18635 # return nil;
18636 # }
18637 # Color* result = [Color alloc] init];
18638 # [result setRed:red];
18639 # [result setGreen:green];
18640 # [result setBlue:blue];
18641 # if (alpha <= 0.9999) {
18642 # [result setAlpha:floatWrapperWithValue(alpha)];
18643 # }
18644 # [result autorelease];
18645 # return result;
18646 # }
18647 # // ...
18648 #
18649 # Example (JavaScript):
18650 #
18651 # // ...
18652 #
18653 # var protoToCssColor = function(rgb_color) {
18654 # var redFrac = rgb_color.red || 0.0;
18655 # var greenFrac = rgb_color.green || 0.0;
18656 # var blueFrac = rgb_color.blue || 0.0;
18657 # var red = Math.floor(redFrac * 255);
18658 # var green = Math.floor(greenFrac * 255);
18659 # var blue = Math.floor(blueFrac * 255);
18660 #
18661 # if (!('alpha' in rgb_color)) {
18662 # return rgbToCssColor_(red, green, blue);
18663 # }
18664 #
18665 # var alphaFrac = rgb_color.alpha.value || 0.0;
18666 # var rgbParams = [red, green, blue].join(',');
18667 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18668 # };
18669 #
18670 # var rgbToCssColor_ = function(red, green, blue) {
18671 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18672 # var hexString = rgbNumber.toString(16);
18673 # var missingZeros = 6 - hexString.length;
18674 # var resultBuilder = ['#'];
18675 # for (var i = 0; i < missingZeros; i++) {
18676 # resultBuilder.push('0');
18677 # }
18678 # resultBuilder.push(hexString);
18679 # return resultBuilder.join('');
18680 # };
18681 #
18682 # // ...
18683 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18684 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18685 # the final pixel color is defined by the equation:
18686 #
18687 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18688 #
18689 # This means that a value of 1.0 corresponds to a solid color, whereas
18690 # a value of 0.0 corresponds to a completely transparent color. This
18691 # uses a wrapper message rather than a simple float scalar so that it is
18692 # possible to distinguish between a default value and the value being unset.
18693 # If omitted, this color object is to be rendered as a solid color
18694 # (as if the alpha value had been explicitly given with a value of 1.0).
18695 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18696 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18697 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018698 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018699 "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).
18700 # Absent values indicate that the field isn't specified.
18701 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
18702 # for simplicity of conversion to/from color representations in various
18703 # languages over compactness; for example, the fields of this representation
18704 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18705 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18706 # method in iOS; and, with just a little work, it can be easily formatted into
18707 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18708 #
18709 # Example (Java):
18710 #
18711 # import com.google.type.Color;
18712 #
18713 # // ...
18714 # public static java.awt.Color fromProto(Color protocolor) {
18715 # float alpha = protocolor.hasAlpha()
18716 # ? protocolor.getAlpha().getValue()
18717 # : 1.0;
18718 #
18719 # return new java.awt.Color(
18720 # protocolor.getRed(),
18721 # protocolor.getGreen(),
18722 # protocolor.getBlue(),
18723 # alpha);
18724 # }
18725 #
18726 # public static Color toProto(java.awt.Color color) {
18727 # float red = (float) color.getRed();
18728 # float green = (float) color.getGreen();
18729 # float blue = (float) color.getBlue();
18730 # float denominator = 255.0;
18731 # Color.Builder resultBuilder =
18732 # Color
18733 # .newBuilder()
18734 # .setRed(red / denominator)
18735 # .setGreen(green / denominator)
18736 # .setBlue(blue / denominator);
18737 # int alpha = color.getAlpha();
18738 # if (alpha != 255) {
18739 # result.setAlpha(
18740 # FloatValue
18741 # .newBuilder()
18742 # .setValue(((float) alpha) / denominator)
18743 # .build());
18744 # }
18745 # return resultBuilder.build();
18746 # }
18747 # // ...
18748 #
18749 # Example (iOS / Obj-C):
18750 #
18751 # // ...
18752 # static UIColor* fromProto(Color* protocolor) {
18753 # float red = [protocolor red];
18754 # float green = [protocolor green];
18755 # float blue = [protocolor blue];
18756 # FloatValue* alpha_wrapper = [protocolor alpha];
18757 # float alpha = 1.0;
18758 # if (alpha_wrapper != nil) {
18759 # alpha = [alpha_wrapper value];
18760 # }
18761 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18762 # }
18763 #
18764 # static Color* toProto(UIColor* color) {
18765 # CGFloat red, green, blue, alpha;
18766 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18767 # return nil;
18768 # }
18769 # Color* result = [Color alloc] init];
18770 # [result setRed:red];
18771 # [result setGreen:green];
18772 # [result setBlue:blue];
18773 # if (alpha <= 0.9999) {
18774 # [result setAlpha:floatWrapperWithValue(alpha)];
18775 # }
18776 # [result autorelease];
18777 # return result;
18778 # }
18779 # // ...
18780 #
18781 # Example (JavaScript):
18782 #
18783 # // ...
18784 #
18785 # var protoToCssColor = function(rgb_color) {
18786 # var redFrac = rgb_color.red || 0.0;
18787 # var greenFrac = rgb_color.green || 0.0;
18788 # var blueFrac = rgb_color.blue || 0.0;
18789 # var red = Math.floor(redFrac * 255);
18790 # var green = Math.floor(greenFrac * 255);
18791 # var blue = Math.floor(blueFrac * 255);
18792 #
18793 # if (!('alpha' in rgb_color)) {
18794 # return rgbToCssColor_(red, green, blue);
18795 # }
18796 #
18797 # var alphaFrac = rgb_color.alpha.value || 0.0;
18798 # var rgbParams = [red, green, blue].join(',');
18799 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18800 # };
18801 #
18802 # var rgbToCssColor_ = function(red, green, blue) {
18803 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18804 # var hexString = rgbNumber.toString(16);
18805 # var missingZeros = 6 - hexString.length;
18806 # var resultBuilder = ['#'];
18807 # for (var i = 0; i < missingZeros; i++) {
18808 # resultBuilder.push('0');
18809 # }
18810 # resultBuilder.push(hexString);
18811 # return resultBuilder.join('');
18812 # };
18813 #
18814 # // ...
18815 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18816 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18817 # the final pixel color is defined by the equation:
18818 #
18819 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18820 #
18821 # This means that a value of 1.0 corresponds to a solid color, whereas
18822 # a value of 0.0 corresponds to a completely transparent color. This
18823 # uses a wrapper message rather than a simple float scalar so that it is
18824 # possible to distinguish between a default value and the value being unset.
18825 # If omitted, this color object is to be rendered as a solid color
18826 # (as if the alpha value had been explicitly given with a value of 1.0).
18827 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18828 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18829 },
18830 "bold": True or False, # True if the text is bold.
18831 "strikethrough": True or False, # True if the text has a strikethrough.
18832 "fontFamily": "A String", # The font family.
18833 "fontSize": 42, # The size of the font.
18834 "italic": True or False, # True if the text is italicized.
18835 "underline": True or False, # True if the text is underlined.
18836 },
18837 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
18838 "borders": { # The borders of the cell. # The borders of the cell.
18839 "top": { # A border along a cell. # The top border of the cell.
18840 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
18841 # for simplicity of conversion to/from color representations in various
18842 # languages over compactness; for example, the fields of this representation
18843 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18844 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18845 # method in iOS; and, with just a little work, it can be easily formatted into
18846 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18847 #
18848 # Example (Java):
18849 #
18850 # import com.google.type.Color;
18851 #
18852 # // ...
18853 # public static java.awt.Color fromProto(Color protocolor) {
18854 # float alpha = protocolor.hasAlpha()
18855 # ? protocolor.getAlpha().getValue()
18856 # : 1.0;
18857 #
18858 # return new java.awt.Color(
18859 # protocolor.getRed(),
18860 # protocolor.getGreen(),
18861 # protocolor.getBlue(),
18862 # alpha);
18863 # }
18864 #
18865 # public static Color toProto(java.awt.Color color) {
18866 # float red = (float) color.getRed();
18867 # float green = (float) color.getGreen();
18868 # float blue = (float) color.getBlue();
18869 # float denominator = 255.0;
18870 # Color.Builder resultBuilder =
18871 # Color
18872 # .newBuilder()
18873 # .setRed(red / denominator)
18874 # .setGreen(green / denominator)
18875 # .setBlue(blue / denominator);
18876 # int alpha = color.getAlpha();
18877 # if (alpha != 255) {
18878 # result.setAlpha(
18879 # FloatValue
18880 # .newBuilder()
18881 # .setValue(((float) alpha) / denominator)
18882 # .build());
18883 # }
18884 # return resultBuilder.build();
18885 # }
18886 # // ...
18887 #
18888 # Example (iOS / Obj-C):
18889 #
18890 # // ...
18891 # static UIColor* fromProto(Color* protocolor) {
18892 # float red = [protocolor red];
18893 # float green = [protocolor green];
18894 # float blue = [protocolor blue];
18895 # FloatValue* alpha_wrapper = [protocolor alpha];
18896 # float alpha = 1.0;
18897 # if (alpha_wrapper != nil) {
18898 # alpha = [alpha_wrapper value];
18899 # }
18900 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18901 # }
18902 #
18903 # static Color* toProto(UIColor* color) {
18904 # CGFloat red, green, blue, alpha;
18905 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18906 # return nil;
18907 # }
18908 # Color* result = [Color alloc] init];
18909 # [result setRed:red];
18910 # [result setGreen:green];
18911 # [result setBlue:blue];
18912 # if (alpha <= 0.9999) {
18913 # [result setAlpha:floatWrapperWithValue(alpha)];
18914 # }
18915 # [result autorelease];
18916 # return result;
18917 # }
18918 # // ...
18919 #
18920 # Example (JavaScript):
18921 #
18922 # // ...
18923 #
18924 # var protoToCssColor = function(rgb_color) {
18925 # var redFrac = rgb_color.red || 0.0;
18926 # var greenFrac = rgb_color.green || 0.0;
18927 # var blueFrac = rgb_color.blue || 0.0;
18928 # var red = Math.floor(redFrac * 255);
18929 # var green = Math.floor(greenFrac * 255);
18930 # var blue = Math.floor(blueFrac * 255);
18931 #
18932 # if (!('alpha' in rgb_color)) {
18933 # return rgbToCssColor_(red, green, blue);
18934 # }
18935 #
18936 # var alphaFrac = rgb_color.alpha.value || 0.0;
18937 # var rgbParams = [red, green, blue].join(',');
18938 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18939 # };
18940 #
18941 # var rgbToCssColor_ = function(red, green, blue) {
18942 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18943 # var hexString = rgbNumber.toString(16);
18944 # var missingZeros = 6 - hexString.length;
18945 # var resultBuilder = ['#'];
18946 # for (var i = 0; i < missingZeros; i++) {
18947 # resultBuilder.push('0');
18948 # }
18949 # resultBuilder.push(hexString);
18950 # return resultBuilder.join('');
18951 # };
18952 #
18953 # // ...
18954 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18955 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18956 # the final pixel color is defined by the equation:
18957 #
18958 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18959 #
18960 # This means that a value of 1.0 corresponds to a solid color, whereas
18961 # a value of 0.0 corresponds to a completely transparent color. This
18962 # uses a wrapper message rather than a simple float scalar so that it is
18963 # possible to distinguish between a default value and the value being unset.
18964 # If omitted, this color object is to be rendered as a solid color
18965 # (as if the alpha value had been explicitly given with a value of 1.0).
18966 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18967 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18968 },
18969 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070018970 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070018971 "style": "A String", # The style of the border.
18972 },
18973 "right": { # A border along a cell. # The right border of the cell.
18974 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
18975 # for simplicity of conversion to/from color representations in various
18976 # languages over compactness; for example, the fields of this representation
18977 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18978 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18979 # method in iOS; and, with just a little work, it can be easily formatted into
18980 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18981 #
18982 # Example (Java):
18983 #
18984 # import com.google.type.Color;
18985 #
18986 # // ...
18987 # public static java.awt.Color fromProto(Color protocolor) {
18988 # float alpha = protocolor.hasAlpha()
18989 # ? protocolor.getAlpha().getValue()
18990 # : 1.0;
18991 #
18992 # return new java.awt.Color(
18993 # protocolor.getRed(),
18994 # protocolor.getGreen(),
18995 # protocolor.getBlue(),
18996 # alpha);
18997 # }
18998 #
18999 # public static Color toProto(java.awt.Color color) {
19000 # float red = (float) color.getRed();
19001 # float green = (float) color.getGreen();
19002 # float blue = (float) color.getBlue();
19003 # float denominator = 255.0;
19004 # Color.Builder resultBuilder =
19005 # Color
19006 # .newBuilder()
19007 # .setRed(red / denominator)
19008 # .setGreen(green / denominator)
19009 # .setBlue(blue / denominator);
19010 # int alpha = color.getAlpha();
19011 # if (alpha != 255) {
19012 # result.setAlpha(
19013 # FloatValue
19014 # .newBuilder()
19015 # .setValue(((float) alpha) / denominator)
19016 # .build());
19017 # }
19018 # return resultBuilder.build();
19019 # }
19020 # // ...
19021 #
19022 # Example (iOS / Obj-C):
19023 #
19024 # // ...
19025 # static UIColor* fromProto(Color* protocolor) {
19026 # float red = [protocolor red];
19027 # float green = [protocolor green];
19028 # float blue = [protocolor blue];
19029 # FloatValue* alpha_wrapper = [protocolor alpha];
19030 # float alpha = 1.0;
19031 # if (alpha_wrapper != nil) {
19032 # alpha = [alpha_wrapper value];
19033 # }
19034 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19035 # }
19036 #
19037 # static Color* toProto(UIColor* color) {
19038 # CGFloat red, green, blue, alpha;
19039 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19040 # return nil;
19041 # }
19042 # Color* result = [Color alloc] init];
19043 # [result setRed:red];
19044 # [result setGreen:green];
19045 # [result setBlue:blue];
19046 # if (alpha <= 0.9999) {
19047 # [result setAlpha:floatWrapperWithValue(alpha)];
19048 # }
19049 # [result autorelease];
19050 # return result;
19051 # }
19052 # // ...
19053 #
19054 # Example (JavaScript):
19055 #
19056 # // ...
19057 #
19058 # var protoToCssColor = function(rgb_color) {
19059 # var redFrac = rgb_color.red || 0.0;
19060 # var greenFrac = rgb_color.green || 0.0;
19061 # var blueFrac = rgb_color.blue || 0.0;
19062 # var red = Math.floor(redFrac * 255);
19063 # var green = Math.floor(greenFrac * 255);
19064 # var blue = Math.floor(blueFrac * 255);
19065 #
19066 # if (!('alpha' in rgb_color)) {
19067 # return rgbToCssColor_(red, green, blue);
19068 # }
19069 #
19070 # var alphaFrac = rgb_color.alpha.value || 0.0;
19071 # var rgbParams = [red, green, blue].join(',');
19072 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19073 # };
19074 #
19075 # var rgbToCssColor_ = function(red, green, blue) {
19076 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19077 # var hexString = rgbNumber.toString(16);
19078 # var missingZeros = 6 - hexString.length;
19079 # var resultBuilder = ['#'];
19080 # for (var i = 0; i < missingZeros; i++) {
19081 # resultBuilder.push('0');
19082 # }
19083 # resultBuilder.push(hexString);
19084 # return resultBuilder.join('');
19085 # };
19086 #
19087 # // ...
19088 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19089 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19090 # the final pixel color is defined by the equation:
19091 #
19092 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19093 #
19094 # This means that a value of 1.0 corresponds to a solid color, whereas
19095 # a value of 0.0 corresponds to a completely transparent color. This
19096 # uses a wrapper message rather than a simple float scalar so that it is
19097 # possible to distinguish between a default value and the value being unset.
19098 # If omitted, this color object is to be rendered as a solid color
19099 # (as if the alpha value had been explicitly given with a value of 1.0).
19100 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19101 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19102 },
19103 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019104 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019105 "style": "A String", # The style of the border.
19106 },
19107 "bottom": { # A border along a cell. # The bottom border of the cell.
19108 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
19109 # for simplicity of conversion to/from color representations in various
19110 # languages over compactness; for example, the fields of this representation
19111 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19112 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19113 # method in iOS; and, with just a little work, it can be easily formatted into
19114 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19115 #
19116 # Example (Java):
19117 #
19118 # import com.google.type.Color;
19119 #
19120 # // ...
19121 # public static java.awt.Color fromProto(Color protocolor) {
19122 # float alpha = protocolor.hasAlpha()
19123 # ? protocolor.getAlpha().getValue()
19124 # : 1.0;
19125 #
19126 # return new java.awt.Color(
19127 # protocolor.getRed(),
19128 # protocolor.getGreen(),
19129 # protocolor.getBlue(),
19130 # alpha);
19131 # }
19132 #
19133 # public static Color toProto(java.awt.Color color) {
19134 # float red = (float) color.getRed();
19135 # float green = (float) color.getGreen();
19136 # float blue = (float) color.getBlue();
19137 # float denominator = 255.0;
19138 # Color.Builder resultBuilder =
19139 # Color
19140 # .newBuilder()
19141 # .setRed(red / denominator)
19142 # .setGreen(green / denominator)
19143 # .setBlue(blue / denominator);
19144 # int alpha = color.getAlpha();
19145 # if (alpha != 255) {
19146 # result.setAlpha(
19147 # FloatValue
19148 # .newBuilder()
19149 # .setValue(((float) alpha) / denominator)
19150 # .build());
19151 # }
19152 # return resultBuilder.build();
19153 # }
19154 # // ...
19155 #
19156 # Example (iOS / Obj-C):
19157 #
19158 # // ...
19159 # static UIColor* fromProto(Color* protocolor) {
19160 # float red = [protocolor red];
19161 # float green = [protocolor green];
19162 # float blue = [protocolor blue];
19163 # FloatValue* alpha_wrapper = [protocolor alpha];
19164 # float alpha = 1.0;
19165 # if (alpha_wrapper != nil) {
19166 # alpha = [alpha_wrapper value];
19167 # }
19168 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19169 # }
19170 #
19171 # static Color* toProto(UIColor* color) {
19172 # CGFloat red, green, blue, alpha;
19173 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19174 # return nil;
19175 # }
19176 # Color* result = [Color alloc] init];
19177 # [result setRed:red];
19178 # [result setGreen:green];
19179 # [result setBlue:blue];
19180 # if (alpha <= 0.9999) {
19181 # [result setAlpha:floatWrapperWithValue(alpha)];
19182 # }
19183 # [result autorelease];
19184 # return result;
19185 # }
19186 # // ...
19187 #
19188 # Example (JavaScript):
19189 #
19190 # // ...
19191 #
19192 # var protoToCssColor = function(rgb_color) {
19193 # var redFrac = rgb_color.red || 0.0;
19194 # var greenFrac = rgb_color.green || 0.0;
19195 # var blueFrac = rgb_color.blue || 0.0;
19196 # var red = Math.floor(redFrac * 255);
19197 # var green = Math.floor(greenFrac * 255);
19198 # var blue = Math.floor(blueFrac * 255);
19199 #
19200 # if (!('alpha' in rgb_color)) {
19201 # return rgbToCssColor_(red, green, blue);
19202 # }
19203 #
19204 # var alphaFrac = rgb_color.alpha.value || 0.0;
19205 # var rgbParams = [red, green, blue].join(',');
19206 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19207 # };
19208 #
19209 # var rgbToCssColor_ = function(red, green, blue) {
19210 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19211 # var hexString = rgbNumber.toString(16);
19212 # var missingZeros = 6 - hexString.length;
19213 # var resultBuilder = ['#'];
19214 # for (var i = 0; i < missingZeros; i++) {
19215 # resultBuilder.push('0');
19216 # }
19217 # resultBuilder.push(hexString);
19218 # return resultBuilder.join('');
19219 # };
19220 #
19221 # // ...
19222 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19223 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19224 # the final pixel color is defined by the equation:
19225 #
19226 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19227 #
19228 # This means that a value of 1.0 corresponds to a solid color, whereas
19229 # a value of 0.0 corresponds to a completely transparent color. This
19230 # uses a wrapper message rather than a simple float scalar so that it is
19231 # possible to distinguish between a default value and the value being unset.
19232 # If omitted, this color object is to be rendered as a solid color
19233 # (as if the alpha value had been explicitly given with a value of 1.0).
19234 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19235 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19236 },
19237 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019238 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019239 "style": "A String", # The style of the border.
19240 },
19241 "left": { # A border along a cell. # The left border of the cell.
19242 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
19243 # for simplicity of conversion to/from color representations in various
19244 # languages over compactness; for example, the fields of this representation
19245 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19246 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19247 # method in iOS; and, with just a little work, it can be easily formatted into
19248 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19249 #
19250 # Example (Java):
19251 #
19252 # import com.google.type.Color;
19253 #
19254 # // ...
19255 # public static java.awt.Color fromProto(Color protocolor) {
19256 # float alpha = protocolor.hasAlpha()
19257 # ? protocolor.getAlpha().getValue()
19258 # : 1.0;
19259 #
19260 # return new java.awt.Color(
19261 # protocolor.getRed(),
19262 # protocolor.getGreen(),
19263 # protocolor.getBlue(),
19264 # alpha);
19265 # }
19266 #
19267 # public static Color toProto(java.awt.Color color) {
19268 # float red = (float) color.getRed();
19269 # float green = (float) color.getGreen();
19270 # float blue = (float) color.getBlue();
19271 # float denominator = 255.0;
19272 # Color.Builder resultBuilder =
19273 # Color
19274 # .newBuilder()
19275 # .setRed(red / denominator)
19276 # .setGreen(green / denominator)
19277 # .setBlue(blue / denominator);
19278 # int alpha = color.getAlpha();
19279 # if (alpha != 255) {
19280 # result.setAlpha(
19281 # FloatValue
19282 # .newBuilder()
19283 # .setValue(((float) alpha) / denominator)
19284 # .build());
19285 # }
19286 # return resultBuilder.build();
19287 # }
19288 # // ...
19289 #
19290 # Example (iOS / Obj-C):
19291 #
19292 # // ...
19293 # static UIColor* fromProto(Color* protocolor) {
19294 # float red = [protocolor red];
19295 # float green = [protocolor green];
19296 # float blue = [protocolor blue];
19297 # FloatValue* alpha_wrapper = [protocolor alpha];
19298 # float alpha = 1.0;
19299 # if (alpha_wrapper != nil) {
19300 # alpha = [alpha_wrapper value];
19301 # }
19302 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19303 # }
19304 #
19305 # static Color* toProto(UIColor* color) {
19306 # CGFloat red, green, blue, alpha;
19307 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19308 # return nil;
19309 # }
19310 # Color* result = [Color alloc] init];
19311 # [result setRed:red];
19312 # [result setGreen:green];
19313 # [result setBlue:blue];
19314 # if (alpha <= 0.9999) {
19315 # [result setAlpha:floatWrapperWithValue(alpha)];
19316 # }
19317 # [result autorelease];
19318 # return result;
19319 # }
19320 # // ...
19321 #
19322 # Example (JavaScript):
19323 #
19324 # // ...
19325 #
19326 # var protoToCssColor = function(rgb_color) {
19327 # var redFrac = rgb_color.red || 0.0;
19328 # var greenFrac = rgb_color.green || 0.0;
19329 # var blueFrac = rgb_color.blue || 0.0;
19330 # var red = Math.floor(redFrac * 255);
19331 # var green = Math.floor(greenFrac * 255);
19332 # var blue = Math.floor(blueFrac * 255);
19333 #
19334 # if (!('alpha' in rgb_color)) {
19335 # return rgbToCssColor_(red, green, blue);
19336 # }
19337 #
19338 # var alphaFrac = rgb_color.alpha.value || 0.0;
19339 # var rgbParams = [red, green, blue].join(',');
19340 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19341 # };
19342 #
19343 # var rgbToCssColor_ = function(red, green, blue) {
19344 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19345 # var hexString = rgbNumber.toString(16);
19346 # var missingZeros = 6 - hexString.length;
19347 # var resultBuilder = ['#'];
19348 # for (var i = 0; i < missingZeros; i++) {
19349 # resultBuilder.push('0');
19350 # }
19351 # resultBuilder.push(hexString);
19352 # return resultBuilder.join('');
19353 # };
19354 #
19355 # // ...
19356 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19357 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19358 # the final pixel color is defined by the equation:
19359 #
19360 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19361 #
19362 # This means that a value of 1.0 corresponds to a solid color, whereas
19363 # a value of 0.0 corresponds to a completely transparent color. This
19364 # uses a wrapper message rather than a simple float scalar so that it is
19365 # possible to distinguish between a default value and the value being unset.
19366 # If omitted, this color object is to be rendered as a solid color
19367 # (as if the alpha value had been explicitly given with a value of 1.0).
19368 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19369 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19370 },
19371 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019372 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019373 "style": "A String", # The style of the border.
19374 },
19375 },
19376 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
19377 },
19378 "title": "A String", # The title of the spreadsheet.
19379 },
19380 "sheets": [ # The sheets that are part of a spreadsheet.
19381 { # A sheet in a spreadsheet.
19382 "conditionalFormats": [ # The conditional format rules in this sheet.
19383 { # A rule describing a conditional format.
19384 "ranges": [ # The ranges that will be formatted if the condition is true.
19385 # All the ranges must be on the same grid.
19386 { # A range on a sheet.
19387 # All indexes are zero-based.
19388 # Indexes are half open, e.g the start index is inclusive
19389 # and the end index is exclusive -- [start_index, end_index).
19390 # Missing indexes indicate the range is unbounded on that side.
19391 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019392 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019393 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019394 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019395 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019396 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019397 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019398 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019399 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019400 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019401 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019402 # `Sheet1!A:B == sheet_id: 0,
19403 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019404 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019405 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019406 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019407 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019408 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019409 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019410 #
19411 # The start index must always be less than or equal to the end index.
19412 # If the start index equals the end index, then the range is empty.
19413 # Empty ranges are typically not meaningful and are usually rendered in the
19414 # UI as `#REF!`.
19415 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
19416 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
19417 "sheetId": 42, # The sheet this range is on.
19418 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
19419 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
19420 },
19421 ],
19422 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
19423 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
19424 # the format will be applied.
19425 # BooleanConditions are used by conditional formatting,
19426 # data validation, and the criteria in filters.
19427 "type": "A String", # The type of condition.
19428 "values": [ # The values of the condition. The number of supported values depends
19429 # on the condition type. Some support zero values,
19430 # others one or two values,
19431 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
19432 { # The value of the condition.
19433 "relativeDate": "A String", # A relative date (based on the current date).
19434 # Valid only if the type is
19435 # DATE_BEFORE,
19436 # DATE_AFTER,
19437 # DATE_ON_OR_BEFORE or
19438 # DATE_ON_OR_AFTER.
19439 #
19440 # Relative dates are not supported in data validation.
19441 # They are supported only in conditional formatting and
19442 # conditional filters.
19443 "userEnteredValue": "A String", # A value the condition is based on.
19444 # The value will be parsed as if the user typed into a cell.
19445 # Formulas are supported (and must begin with an `=`).
19446 },
19447 ],
19448 },
19449 "format": { # The format of a cell. # The format to apply.
19450 # Conditional formatting can only apply a subset of formatting:
19451 # bold, italic,
19452 # strikethrough,
19453 # foreground color &
19454 # background color.
19455 "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 -070019456 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
19457 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070019458 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
19459 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019460 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019461 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019462 },
19463 "textDirection": "A String", # The direction of the text in the cell.
19464 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
19465 # When updating padding, every field must be specified.
19466 "top": 42, # The top padding of the cell.
19467 "right": 42, # The right padding of the cell.
19468 "bottom": 42, # The bottom padding of the cell.
19469 "left": 42, # The left padding of the cell.
19470 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019471 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019472 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
19473 # for simplicity of conversion to/from color representations in various
19474 # languages over compactness; for example, the fields of this representation
19475 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19476 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19477 # method in iOS; and, with just a little work, it can be easily formatted into
19478 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19479 #
19480 # Example (Java):
19481 #
19482 # import com.google.type.Color;
19483 #
19484 # // ...
19485 # public static java.awt.Color fromProto(Color protocolor) {
19486 # float alpha = protocolor.hasAlpha()
19487 # ? protocolor.getAlpha().getValue()
19488 # : 1.0;
19489 #
19490 # return new java.awt.Color(
19491 # protocolor.getRed(),
19492 # protocolor.getGreen(),
19493 # protocolor.getBlue(),
19494 # alpha);
19495 # }
19496 #
19497 # public static Color toProto(java.awt.Color color) {
19498 # float red = (float) color.getRed();
19499 # float green = (float) color.getGreen();
19500 # float blue = (float) color.getBlue();
19501 # float denominator = 255.0;
19502 # Color.Builder resultBuilder =
19503 # Color
19504 # .newBuilder()
19505 # .setRed(red / denominator)
19506 # .setGreen(green / denominator)
19507 # .setBlue(blue / denominator);
19508 # int alpha = color.getAlpha();
19509 # if (alpha != 255) {
19510 # result.setAlpha(
19511 # FloatValue
19512 # .newBuilder()
19513 # .setValue(((float) alpha) / denominator)
19514 # .build());
19515 # }
19516 # return resultBuilder.build();
19517 # }
19518 # // ...
19519 #
19520 # Example (iOS / Obj-C):
19521 #
19522 # // ...
19523 # static UIColor* fromProto(Color* protocolor) {
19524 # float red = [protocolor red];
19525 # float green = [protocolor green];
19526 # float blue = [protocolor blue];
19527 # FloatValue* alpha_wrapper = [protocolor alpha];
19528 # float alpha = 1.0;
19529 # if (alpha_wrapper != nil) {
19530 # alpha = [alpha_wrapper value];
19531 # }
19532 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19533 # }
19534 #
19535 # static Color* toProto(UIColor* color) {
19536 # CGFloat red, green, blue, alpha;
19537 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19538 # return nil;
19539 # }
19540 # Color* result = [Color alloc] init];
19541 # [result setRed:red];
19542 # [result setGreen:green];
19543 # [result setBlue:blue];
19544 # if (alpha <= 0.9999) {
19545 # [result setAlpha:floatWrapperWithValue(alpha)];
19546 # }
19547 # [result autorelease];
19548 # return result;
19549 # }
19550 # // ...
19551 #
19552 # Example (JavaScript):
19553 #
19554 # // ...
19555 #
19556 # var protoToCssColor = function(rgb_color) {
19557 # var redFrac = rgb_color.red || 0.0;
19558 # var greenFrac = rgb_color.green || 0.0;
19559 # var blueFrac = rgb_color.blue || 0.0;
19560 # var red = Math.floor(redFrac * 255);
19561 # var green = Math.floor(greenFrac * 255);
19562 # var blue = Math.floor(blueFrac * 255);
19563 #
19564 # if (!('alpha' in rgb_color)) {
19565 # return rgbToCssColor_(red, green, blue);
19566 # }
19567 #
19568 # var alphaFrac = rgb_color.alpha.value || 0.0;
19569 # var rgbParams = [red, green, blue].join(',');
19570 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19571 # };
19572 #
19573 # var rgbToCssColor_ = function(red, green, blue) {
19574 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19575 # var hexString = rgbNumber.toString(16);
19576 # var missingZeros = 6 - hexString.length;
19577 # var resultBuilder = ['#'];
19578 # for (var i = 0; i < missingZeros; i++) {
19579 # resultBuilder.push('0');
19580 # }
19581 # resultBuilder.push(hexString);
19582 # return resultBuilder.join('');
19583 # };
19584 #
19585 # // ...
19586 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19587 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19588 # the final pixel color is defined by the equation:
19589 #
19590 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19591 #
19592 # This means that a value of 1.0 corresponds to a solid color, whereas
19593 # a value of 0.0 corresponds to a completely transparent color. This
19594 # uses a wrapper message rather than a simple float scalar so that it is
19595 # possible to distinguish between a default value and the value being unset.
19596 # If omitted, this color object is to be rendered as a solid color
19597 # (as if the alpha value had been explicitly given with a value of 1.0).
19598 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19599 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19600 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019601 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019602 "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).
19603 # Absent values indicate that the field isn't specified.
19604 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
19605 # for simplicity of conversion to/from color representations in various
19606 # languages over compactness; for example, the fields of this representation
19607 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19608 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19609 # method in iOS; and, with just a little work, it can be easily formatted into
19610 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19611 #
19612 # Example (Java):
19613 #
19614 # import com.google.type.Color;
19615 #
19616 # // ...
19617 # public static java.awt.Color fromProto(Color protocolor) {
19618 # float alpha = protocolor.hasAlpha()
19619 # ? protocolor.getAlpha().getValue()
19620 # : 1.0;
19621 #
19622 # return new java.awt.Color(
19623 # protocolor.getRed(),
19624 # protocolor.getGreen(),
19625 # protocolor.getBlue(),
19626 # alpha);
19627 # }
19628 #
19629 # public static Color toProto(java.awt.Color color) {
19630 # float red = (float) color.getRed();
19631 # float green = (float) color.getGreen();
19632 # float blue = (float) color.getBlue();
19633 # float denominator = 255.0;
19634 # Color.Builder resultBuilder =
19635 # Color
19636 # .newBuilder()
19637 # .setRed(red / denominator)
19638 # .setGreen(green / denominator)
19639 # .setBlue(blue / denominator);
19640 # int alpha = color.getAlpha();
19641 # if (alpha != 255) {
19642 # result.setAlpha(
19643 # FloatValue
19644 # .newBuilder()
19645 # .setValue(((float) alpha) / denominator)
19646 # .build());
19647 # }
19648 # return resultBuilder.build();
19649 # }
19650 # // ...
19651 #
19652 # Example (iOS / Obj-C):
19653 #
19654 # // ...
19655 # static UIColor* fromProto(Color* protocolor) {
19656 # float red = [protocolor red];
19657 # float green = [protocolor green];
19658 # float blue = [protocolor blue];
19659 # FloatValue* alpha_wrapper = [protocolor alpha];
19660 # float alpha = 1.0;
19661 # if (alpha_wrapper != nil) {
19662 # alpha = [alpha_wrapper value];
19663 # }
19664 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19665 # }
19666 #
19667 # static Color* toProto(UIColor* color) {
19668 # CGFloat red, green, blue, alpha;
19669 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19670 # return nil;
19671 # }
19672 # Color* result = [Color alloc] init];
19673 # [result setRed:red];
19674 # [result setGreen:green];
19675 # [result setBlue:blue];
19676 # if (alpha <= 0.9999) {
19677 # [result setAlpha:floatWrapperWithValue(alpha)];
19678 # }
19679 # [result autorelease];
19680 # return result;
19681 # }
19682 # // ...
19683 #
19684 # Example (JavaScript):
19685 #
19686 # // ...
19687 #
19688 # var protoToCssColor = function(rgb_color) {
19689 # var redFrac = rgb_color.red || 0.0;
19690 # var greenFrac = rgb_color.green || 0.0;
19691 # var blueFrac = rgb_color.blue || 0.0;
19692 # var red = Math.floor(redFrac * 255);
19693 # var green = Math.floor(greenFrac * 255);
19694 # var blue = Math.floor(blueFrac * 255);
19695 #
19696 # if (!('alpha' in rgb_color)) {
19697 # return rgbToCssColor_(red, green, blue);
19698 # }
19699 #
19700 # var alphaFrac = rgb_color.alpha.value || 0.0;
19701 # var rgbParams = [red, green, blue].join(',');
19702 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19703 # };
19704 #
19705 # var rgbToCssColor_ = function(red, green, blue) {
19706 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19707 # var hexString = rgbNumber.toString(16);
19708 # var missingZeros = 6 - hexString.length;
19709 # var resultBuilder = ['#'];
19710 # for (var i = 0; i < missingZeros; i++) {
19711 # resultBuilder.push('0');
19712 # }
19713 # resultBuilder.push(hexString);
19714 # return resultBuilder.join('');
19715 # };
19716 #
19717 # // ...
19718 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19719 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19720 # the final pixel color is defined by the equation:
19721 #
19722 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19723 #
19724 # This means that a value of 1.0 corresponds to a solid color, whereas
19725 # a value of 0.0 corresponds to a completely transparent color. This
19726 # uses a wrapper message rather than a simple float scalar so that it is
19727 # possible to distinguish between a default value and the value being unset.
19728 # If omitted, this color object is to be rendered as a solid color
19729 # (as if the alpha value had been explicitly given with a value of 1.0).
19730 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19731 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19732 },
19733 "bold": True or False, # True if the text is bold.
19734 "strikethrough": True or False, # True if the text has a strikethrough.
19735 "fontFamily": "A String", # The font family.
19736 "fontSize": 42, # The size of the font.
19737 "italic": True or False, # True if the text is italicized.
19738 "underline": True or False, # True if the text is underlined.
19739 },
19740 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
19741 "borders": { # The borders of the cell. # The borders of the cell.
19742 "top": { # A border along a cell. # The top border of the cell.
19743 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
19744 # for simplicity of conversion to/from color representations in various
19745 # languages over compactness; for example, the fields of this representation
19746 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19747 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19748 # method in iOS; and, with just a little work, it can be easily formatted into
19749 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19750 #
19751 # Example (Java):
19752 #
19753 # import com.google.type.Color;
19754 #
19755 # // ...
19756 # public static java.awt.Color fromProto(Color protocolor) {
19757 # float alpha = protocolor.hasAlpha()
19758 # ? protocolor.getAlpha().getValue()
19759 # : 1.0;
19760 #
19761 # return new java.awt.Color(
19762 # protocolor.getRed(),
19763 # protocolor.getGreen(),
19764 # protocolor.getBlue(),
19765 # alpha);
19766 # }
19767 #
19768 # public static Color toProto(java.awt.Color color) {
19769 # float red = (float) color.getRed();
19770 # float green = (float) color.getGreen();
19771 # float blue = (float) color.getBlue();
19772 # float denominator = 255.0;
19773 # Color.Builder resultBuilder =
19774 # Color
19775 # .newBuilder()
19776 # .setRed(red / denominator)
19777 # .setGreen(green / denominator)
19778 # .setBlue(blue / denominator);
19779 # int alpha = color.getAlpha();
19780 # if (alpha != 255) {
19781 # result.setAlpha(
19782 # FloatValue
19783 # .newBuilder()
19784 # .setValue(((float) alpha) / denominator)
19785 # .build());
19786 # }
19787 # return resultBuilder.build();
19788 # }
19789 # // ...
19790 #
19791 # Example (iOS / Obj-C):
19792 #
19793 # // ...
19794 # static UIColor* fromProto(Color* protocolor) {
19795 # float red = [protocolor red];
19796 # float green = [protocolor green];
19797 # float blue = [protocolor blue];
19798 # FloatValue* alpha_wrapper = [protocolor alpha];
19799 # float alpha = 1.0;
19800 # if (alpha_wrapper != nil) {
19801 # alpha = [alpha_wrapper value];
19802 # }
19803 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19804 # }
19805 #
19806 # static Color* toProto(UIColor* color) {
19807 # CGFloat red, green, blue, alpha;
19808 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19809 # return nil;
19810 # }
19811 # Color* result = [Color alloc] init];
19812 # [result setRed:red];
19813 # [result setGreen:green];
19814 # [result setBlue:blue];
19815 # if (alpha <= 0.9999) {
19816 # [result setAlpha:floatWrapperWithValue(alpha)];
19817 # }
19818 # [result autorelease];
19819 # return result;
19820 # }
19821 # // ...
19822 #
19823 # Example (JavaScript):
19824 #
19825 # // ...
19826 #
19827 # var protoToCssColor = function(rgb_color) {
19828 # var redFrac = rgb_color.red || 0.0;
19829 # var greenFrac = rgb_color.green || 0.0;
19830 # var blueFrac = rgb_color.blue || 0.0;
19831 # var red = Math.floor(redFrac * 255);
19832 # var green = Math.floor(greenFrac * 255);
19833 # var blue = Math.floor(blueFrac * 255);
19834 #
19835 # if (!('alpha' in rgb_color)) {
19836 # return rgbToCssColor_(red, green, blue);
19837 # }
19838 #
19839 # var alphaFrac = rgb_color.alpha.value || 0.0;
19840 # var rgbParams = [red, green, blue].join(',');
19841 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19842 # };
19843 #
19844 # var rgbToCssColor_ = function(red, green, blue) {
19845 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19846 # var hexString = rgbNumber.toString(16);
19847 # var missingZeros = 6 - hexString.length;
19848 # var resultBuilder = ['#'];
19849 # for (var i = 0; i < missingZeros; i++) {
19850 # resultBuilder.push('0');
19851 # }
19852 # resultBuilder.push(hexString);
19853 # return resultBuilder.join('');
19854 # };
19855 #
19856 # // ...
19857 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19858 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19859 # the final pixel color is defined by the equation:
19860 #
19861 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19862 #
19863 # This means that a value of 1.0 corresponds to a solid color, whereas
19864 # a value of 0.0 corresponds to a completely transparent color. This
19865 # uses a wrapper message rather than a simple float scalar so that it is
19866 # possible to distinguish between a default value and the value being unset.
19867 # If omitted, this color object is to be rendered as a solid color
19868 # (as if the alpha value had been explicitly given with a value of 1.0).
19869 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19870 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19871 },
19872 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070019873 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070019874 "style": "A String", # The style of the border.
19875 },
19876 "right": { # A border along a cell. # The right border of the cell.
19877 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
19878 # for simplicity of conversion to/from color representations in various
19879 # languages over compactness; for example, the fields of this representation
19880 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19881 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19882 # method in iOS; and, with just a little work, it can be easily formatted into
19883 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19884 #
19885 # Example (Java):
19886 #
19887 # import com.google.type.Color;
19888 #
19889 # // ...
19890 # public static java.awt.Color fromProto(Color protocolor) {
19891 # float alpha = protocolor.hasAlpha()
19892 # ? protocolor.getAlpha().getValue()
19893 # : 1.0;
19894 #
19895 # return new java.awt.Color(
19896 # protocolor.getRed(),
19897 # protocolor.getGreen(),
19898 # protocolor.getBlue(),
19899 # alpha);
19900 # }
19901 #
19902 # public static Color toProto(java.awt.Color color) {
19903 # float red = (float) color.getRed();
19904 # float green = (float) color.getGreen();
19905 # float blue = (float) color.getBlue();
19906 # float denominator = 255.0;
19907 # Color.Builder resultBuilder =
19908 # Color
19909 # .newBuilder()
19910 # .setRed(red / denominator)
19911 # .setGreen(green / denominator)
19912 # .setBlue(blue / denominator);
19913 # int alpha = color.getAlpha();
19914 # if (alpha != 255) {
19915 # result.setAlpha(
19916 # FloatValue
19917 # .newBuilder()
19918 # .setValue(((float) alpha) / denominator)
19919 # .build());
19920 # }
19921 # return resultBuilder.build();
19922 # }
19923 # // ...
19924 #
19925 # Example (iOS / Obj-C):
19926 #
19927 # // ...
19928 # static UIColor* fromProto(Color* protocolor) {
19929 # float red = [protocolor red];
19930 # float green = [protocolor green];
19931 # float blue = [protocolor blue];
19932 # FloatValue* alpha_wrapper = [protocolor alpha];
19933 # float alpha = 1.0;
19934 # if (alpha_wrapper != nil) {
19935 # alpha = [alpha_wrapper value];
19936 # }
19937 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19938 # }
19939 #
19940 # static Color* toProto(UIColor* color) {
19941 # CGFloat red, green, blue, alpha;
19942 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19943 # return nil;
19944 # }
19945 # Color* result = [Color alloc] init];
19946 # [result setRed:red];
19947 # [result setGreen:green];
19948 # [result setBlue:blue];
19949 # if (alpha <= 0.9999) {
19950 # [result setAlpha:floatWrapperWithValue(alpha)];
19951 # }
19952 # [result autorelease];
19953 # return result;
19954 # }
19955 # // ...
19956 #
19957 # Example (JavaScript):
19958 #
19959 # // ...
19960 #
19961 # var protoToCssColor = function(rgb_color) {
19962 # var redFrac = rgb_color.red || 0.0;
19963 # var greenFrac = rgb_color.green || 0.0;
19964 # var blueFrac = rgb_color.blue || 0.0;
19965 # var red = Math.floor(redFrac * 255);
19966 # var green = Math.floor(greenFrac * 255);
19967 # var blue = Math.floor(blueFrac * 255);
19968 #
19969 # if (!('alpha' in rgb_color)) {
19970 # return rgbToCssColor_(red, green, blue);
19971 # }
19972 #
19973 # var alphaFrac = rgb_color.alpha.value || 0.0;
19974 # var rgbParams = [red, green, blue].join(',');
19975 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19976 # };
19977 #
19978 # var rgbToCssColor_ = function(red, green, blue) {
19979 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19980 # var hexString = rgbNumber.toString(16);
19981 # var missingZeros = 6 - hexString.length;
19982 # var resultBuilder = ['#'];
19983 # for (var i = 0; i < missingZeros; i++) {
19984 # resultBuilder.push('0');
19985 # }
19986 # resultBuilder.push(hexString);
19987 # return resultBuilder.join('');
19988 # };
19989 #
19990 # // ...
19991 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19992 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19993 # the final pixel color is defined by the equation:
19994 #
19995 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19996 #
19997 # This means that a value of 1.0 corresponds to a solid color, whereas
19998 # a value of 0.0 corresponds to a completely transparent color. This
19999 # uses a wrapper message rather than a simple float scalar so that it is
20000 # possible to distinguish between a default value and the value being unset.
20001 # If omitted, this color object is to be rendered as a solid color
20002 # (as if the alpha value had been explicitly given with a value of 1.0).
20003 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20004 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20005 },
20006 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020007 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020008 "style": "A String", # The style of the border.
20009 },
20010 "bottom": { # A border along a cell. # The bottom border of the cell.
20011 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
20012 # for simplicity of conversion to/from color representations in various
20013 # languages over compactness; for example, the fields of this representation
20014 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20015 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20016 # method in iOS; and, with just a little work, it can be easily formatted into
20017 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20018 #
20019 # Example (Java):
20020 #
20021 # import com.google.type.Color;
20022 #
20023 # // ...
20024 # public static java.awt.Color fromProto(Color protocolor) {
20025 # float alpha = protocolor.hasAlpha()
20026 # ? protocolor.getAlpha().getValue()
20027 # : 1.0;
20028 #
20029 # return new java.awt.Color(
20030 # protocolor.getRed(),
20031 # protocolor.getGreen(),
20032 # protocolor.getBlue(),
20033 # alpha);
20034 # }
20035 #
20036 # public static Color toProto(java.awt.Color color) {
20037 # float red = (float) color.getRed();
20038 # float green = (float) color.getGreen();
20039 # float blue = (float) color.getBlue();
20040 # float denominator = 255.0;
20041 # Color.Builder resultBuilder =
20042 # Color
20043 # .newBuilder()
20044 # .setRed(red / denominator)
20045 # .setGreen(green / denominator)
20046 # .setBlue(blue / denominator);
20047 # int alpha = color.getAlpha();
20048 # if (alpha != 255) {
20049 # result.setAlpha(
20050 # FloatValue
20051 # .newBuilder()
20052 # .setValue(((float) alpha) / denominator)
20053 # .build());
20054 # }
20055 # return resultBuilder.build();
20056 # }
20057 # // ...
20058 #
20059 # Example (iOS / Obj-C):
20060 #
20061 # // ...
20062 # static UIColor* fromProto(Color* protocolor) {
20063 # float red = [protocolor red];
20064 # float green = [protocolor green];
20065 # float blue = [protocolor blue];
20066 # FloatValue* alpha_wrapper = [protocolor alpha];
20067 # float alpha = 1.0;
20068 # if (alpha_wrapper != nil) {
20069 # alpha = [alpha_wrapper value];
20070 # }
20071 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20072 # }
20073 #
20074 # static Color* toProto(UIColor* color) {
20075 # CGFloat red, green, blue, alpha;
20076 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20077 # return nil;
20078 # }
20079 # Color* result = [Color alloc] init];
20080 # [result setRed:red];
20081 # [result setGreen:green];
20082 # [result setBlue:blue];
20083 # if (alpha <= 0.9999) {
20084 # [result setAlpha:floatWrapperWithValue(alpha)];
20085 # }
20086 # [result autorelease];
20087 # return result;
20088 # }
20089 # // ...
20090 #
20091 # Example (JavaScript):
20092 #
20093 # // ...
20094 #
20095 # var protoToCssColor = function(rgb_color) {
20096 # var redFrac = rgb_color.red || 0.0;
20097 # var greenFrac = rgb_color.green || 0.0;
20098 # var blueFrac = rgb_color.blue || 0.0;
20099 # var red = Math.floor(redFrac * 255);
20100 # var green = Math.floor(greenFrac * 255);
20101 # var blue = Math.floor(blueFrac * 255);
20102 #
20103 # if (!('alpha' in rgb_color)) {
20104 # return rgbToCssColor_(red, green, blue);
20105 # }
20106 #
20107 # var alphaFrac = rgb_color.alpha.value || 0.0;
20108 # var rgbParams = [red, green, blue].join(',');
20109 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20110 # };
20111 #
20112 # var rgbToCssColor_ = function(red, green, blue) {
20113 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20114 # var hexString = rgbNumber.toString(16);
20115 # var missingZeros = 6 - hexString.length;
20116 # var resultBuilder = ['#'];
20117 # for (var i = 0; i < missingZeros; i++) {
20118 # resultBuilder.push('0');
20119 # }
20120 # resultBuilder.push(hexString);
20121 # return resultBuilder.join('');
20122 # };
20123 #
20124 # // ...
20125 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20126 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20127 # the final pixel color is defined by the equation:
20128 #
20129 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20130 #
20131 # This means that a value of 1.0 corresponds to a solid color, whereas
20132 # a value of 0.0 corresponds to a completely transparent color. This
20133 # uses a wrapper message rather than a simple float scalar so that it is
20134 # possible to distinguish between a default value and the value being unset.
20135 # If omitted, this color object is to be rendered as a solid color
20136 # (as if the alpha value had been explicitly given with a value of 1.0).
20137 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20138 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20139 },
20140 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020141 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020142 "style": "A String", # The style of the border.
20143 },
20144 "left": { # A border along a cell. # The left border of the cell.
20145 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
20146 # for simplicity of conversion to/from color representations in various
20147 # languages over compactness; for example, the fields of this representation
20148 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20149 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20150 # method in iOS; and, with just a little work, it can be easily formatted into
20151 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20152 #
20153 # Example (Java):
20154 #
20155 # import com.google.type.Color;
20156 #
20157 # // ...
20158 # public static java.awt.Color fromProto(Color protocolor) {
20159 # float alpha = protocolor.hasAlpha()
20160 # ? protocolor.getAlpha().getValue()
20161 # : 1.0;
20162 #
20163 # return new java.awt.Color(
20164 # protocolor.getRed(),
20165 # protocolor.getGreen(),
20166 # protocolor.getBlue(),
20167 # alpha);
20168 # }
20169 #
20170 # public static Color toProto(java.awt.Color color) {
20171 # float red = (float) color.getRed();
20172 # float green = (float) color.getGreen();
20173 # float blue = (float) color.getBlue();
20174 # float denominator = 255.0;
20175 # Color.Builder resultBuilder =
20176 # Color
20177 # .newBuilder()
20178 # .setRed(red / denominator)
20179 # .setGreen(green / denominator)
20180 # .setBlue(blue / denominator);
20181 # int alpha = color.getAlpha();
20182 # if (alpha != 255) {
20183 # result.setAlpha(
20184 # FloatValue
20185 # .newBuilder()
20186 # .setValue(((float) alpha) / denominator)
20187 # .build());
20188 # }
20189 # return resultBuilder.build();
20190 # }
20191 # // ...
20192 #
20193 # Example (iOS / Obj-C):
20194 #
20195 # // ...
20196 # static UIColor* fromProto(Color* protocolor) {
20197 # float red = [protocolor red];
20198 # float green = [protocolor green];
20199 # float blue = [protocolor blue];
20200 # FloatValue* alpha_wrapper = [protocolor alpha];
20201 # float alpha = 1.0;
20202 # if (alpha_wrapper != nil) {
20203 # alpha = [alpha_wrapper value];
20204 # }
20205 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20206 # }
20207 #
20208 # static Color* toProto(UIColor* color) {
20209 # CGFloat red, green, blue, alpha;
20210 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20211 # return nil;
20212 # }
20213 # Color* result = [Color alloc] init];
20214 # [result setRed:red];
20215 # [result setGreen:green];
20216 # [result setBlue:blue];
20217 # if (alpha <= 0.9999) {
20218 # [result setAlpha:floatWrapperWithValue(alpha)];
20219 # }
20220 # [result autorelease];
20221 # return result;
20222 # }
20223 # // ...
20224 #
20225 # Example (JavaScript):
20226 #
20227 # // ...
20228 #
20229 # var protoToCssColor = function(rgb_color) {
20230 # var redFrac = rgb_color.red || 0.0;
20231 # var greenFrac = rgb_color.green || 0.0;
20232 # var blueFrac = rgb_color.blue || 0.0;
20233 # var red = Math.floor(redFrac * 255);
20234 # var green = Math.floor(greenFrac * 255);
20235 # var blue = Math.floor(blueFrac * 255);
20236 #
20237 # if (!('alpha' in rgb_color)) {
20238 # return rgbToCssColor_(red, green, blue);
20239 # }
20240 #
20241 # var alphaFrac = rgb_color.alpha.value || 0.0;
20242 # var rgbParams = [red, green, blue].join(',');
20243 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20244 # };
20245 #
20246 # var rgbToCssColor_ = function(red, green, blue) {
20247 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20248 # var hexString = rgbNumber.toString(16);
20249 # var missingZeros = 6 - hexString.length;
20250 # var resultBuilder = ['#'];
20251 # for (var i = 0; i < missingZeros; i++) {
20252 # resultBuilder.push('0');
20253 # }
20254 # resultBuilder.push(hexString);
20255 # return resultBuilder.join('');
20256 # };
20257 #
20258 # // ...
20259 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20260 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20261 # the final pixel color is defined by the equation:
20262 #
20263 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20264 #
20265 # This means that a value of 1.0 corresponds to a solid color, whereas
20266 # a value of 0.0 corresponds to a completely transparent color. This
20267 # uses a wrapper message rather than a simple float scalar so that it is
20268 # possible to distinguish between a default value and the value being unset.
20269 # If omitted, this color object is to be rendered as a solid color
20270 # (as if the alpha value had been explicitly given with a value of 1.0).
20271 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20272 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20273 },
20274 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020275 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020276 "style": "A String", # The style of the border.
20277 },
20278 },
20279 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
20280 },
20281 },
20282 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
20283 # the interpolation points listed. The format of a cell will vary
20284 # based on its contents as compared to the values of the interpolation
20285 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020286 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020287 # These pin the gradient color scale according to the color,
20288 # type and value chosen.
20289 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
20290 # for simplicity of conversion to/from color representations in various
20291 # languages over compactness; for example, the fields of this representation
20292 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20293 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20294 # method in iOS; and, with just a little work, it can be easily formatted into
20295 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20296 #
20297 # Example (Java):
20298 #
20299 # import com.google.type.Color;
20300 #
20301 # // ...
20302 # public static java.awt.Color fromProto(Color protocolor) {
20303 # float alpha = protocolor.hasAlpha()
20304 # ? protocolor.getAlpha().getValue()
20305 # : 1.0;
20306 #
20307 # return new java.awt.Color(
20308 # protocolor.getRed(),
20309 # protocolor.getGreen(),
20310 # protocolor.getBlue(),
20311 # alpha);
20312 # }
20313 #
20314 # public static Color toProto(java.awt.Color color) {
20315 # float red = (float) color.getRed();
20316 # float green = (float) color.getGreen();
20317 # float blue = (float) color.getBlue();
20318 # float denominator = 255.0;
20319 # Color.Builder resultBuilder =
20320 # Color
20321 # .newBuilder()
20322 # .setRed(red / denominator)
20323 # .setGreen(green / denominator)
20324 # .setBlue(blue / denominator);
20325 # int alpha = color.getAlpha();
20326 # if (alpha != 255) {
20327 # result.setAlpha(
20328 # FloatValue
20329 # .newBuilder()
20330 # .setValue(((float) alpha) / denominator)
20331 # .build());
20332 # }
20333 # return resultBuilder.build();
20334 # }
20335 # // ...
20336 #
20337 # Example (iOS / Obj-C):
20338 #
20339 # // ...
20340 # static UIColor* fromProto(Color* protocolor) {
20341 # float red = [protocolor red];
20342 # float green = [protocolor green];
20343 # float blue = [protocolor blue];
20344 # FloatValue* alpha_wrapper = [protocolor alpha];
20345 # float alpha = 1.0;
20346 # if (alpha_wrapper != nil) {
20347 # alpha = [alpha_wrapper value];
20348 # }
20349 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20350 # }
20351 #
20352 # static Color* toProto(UIColor* color) {
20353 # CGFloat red, green, blue, alpha;
20354 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20355 # return nil;
20356 # }
20357 # Color* result = [Color alloc] init];
20358 # [result setRed:red];
20359 # [result setGreen:green];
20360 # [result setBlue:blue];
20361 # if (alpha <= 0.9999) {
20362 # [result setAlpha:floatWrapperWithValue(alpha)];
20363 # }
20364 # [result autorelease];
20365 # return result;
20366 # }
20367 # // ...
20368 #
20369 # Example (JavaScript):
20370 #
20371 # // ...
20372 #
20373 # var protoToCssColor = function(rgb_color) {
20374 # var redFrac = rgb_color.red || 0.0;
20375 # var greenFrac = rgb_color.green || 0.0;
20376 # var blueFrac = rgb_color.blue || 0.0;
20377 # var red = Math.floor(redFrac * 255);
20378 # var green = Math.floor(greenFrac * 255);
20379 # var blue = Math.floor(blueFrac * 255);
20380 #
20381 # if (!('alpha' in rgb_color)) {
20382 # return rgbToCssColor_(red, green, blue);
20383 # }
20384 #
20385 # var alphaFrac = rgb_color.alpha.value || 0.0;
20386 # var rgbParams = [red, green, blue].join(',');
20387 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20388 # };
20389 #
20390 # var rgbToCssColor_ = function(red, green, blue) {
20391 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20392 # var hexString = rgbNumber.toString(16);
20393 # var missingZeros = 6 - hexString.length;
20394 # var resultBuilder = ['#'];
20395 # for (var i = 0; i < missingZeros; i++) {
20396 # resultBuilder.push('0');
20397 # }
20398 # resultBuilder.push(hexString);
20399 # return resultBuilder.join('');
20400 # };
20401 #
20402 # // ...
20403 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20404 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20405 # the final pixel color is defined by the equation:
20406 #
20407 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20408 #
20409 # This means that a value of 1.0 corresponds to a solid color, whereas
20410 # a value of 0.0 corresponds to a completely transparent color. This
20411 # uses a wrapper message rather than a simple float scalar so that it is
20412 # possible to distinguish between a default value and the value being unset.
20413 # If omitted, this color object is to be rendered as a solid color
20414 # (as if the alpha value had been explicitly given with a value of 1.0).
20415 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20416 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20417 },
20418 "type": "A String", # How the value should be interpreted.
20419 "value": "A String", # The value this interpolation point uses. May be a formula.
20420 # Unused if type is MIN or
20421 # MAX.
20422 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020423 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020424 # These pin the gradient color scale according to the color,
20425 # type and value chosen.
20426 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
20427 # for simplicity of conversion to/from color representations in various
20428 # languages over compactness; for example, the fields of this representation
20429 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20430 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20431 # method in iOS; and, with just a little work, it can be easily formatted into
20432 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20433 #
20434 # Example (Java):
20435 #
20436 # import com.google.type.Color;
20437 #
20438 # // ...
20439 # public static java.awt.Color fromProto(Color protocolor) {
20440 # float alpha = protocolor.hasAlpha()
20441 # ? protocolor.getAlpha().getValue()
20442 # : 1.0;
20443 #
20444 # return new java.awt.Color(
20445 # protocolor.getRed(),
20446 # protocolor.getGreen(),
20447 # protocolor.getBlue(),
20448 # alpha);
20449 # }
20450 #
20451 # public static Color toProto(java.awt.Color color) {
20452 # float red = (float) color.getRed();
20453 # float green = (float) color.getGreen();
20454 # float blue = (float) color.getBlue();
20455 # float denominator = 255.0;
20456 # Color.Builder resultBuilder =
20457 # Color
20458 # .newBuilder()
20459 # .setRed(red / denominator)
20460 # .setGreen(green / denominator)
20461 # .setBlue(blue / denominator);
20462 # int alpha = color.getAlpha();
20463 # if (alpha != 255) {
20464 # result.setAlpha(
20465 # FloatValue
20466 # .newBuilder()
20467 # .setValue(((float) alpha) / denominator)
20468 # .build());
20469 # }
20470 # return resultBuilder.build();
20471 # }
20472 # // ...
20473 #
20474 # Example (iOS / Obj-C):
20475 #
20476 # // ...
20477 # static UIColor* fromProto(Color* protocolor) {
20478 # float red = [protocolor red];
20479 # float green = [protocolor green];
20480 # float blue = [protocolor blue];
20481 # FloatValue* alpha_wrapper = [protocolor alpha];
20482 # float alpha = 1.0;
20483 # if (alpha_wrapper != nil) {
20484 # alpha = [alpha_wrapper value];
20485 # }
20486 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20487 # }
20488 #
20489 # static Color* toProto(UIColor* color) {
20490 # CGFloat red, green, blue, alpha;
20491 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20492 # return nil;
20493 # }
20494 # Color* result = [Color alloc] init];
20495 # [result setRed:red];
20496 # [result setGreen:green];
20497 # [result setBlue:blue];
20498 # if (alpha <= 0.9999) {
20499 # [result setAlpha:floatWrapperWithValue(alpha)];
20500 # }
20501 # [result autorelease];
20502 # return result;
20503 # }
20504 # // ...
20505 #
20506 # Example (JavaScript):
20507 #
20508 # // ...
20509 #
20510 # var protoToCssColor = function(rgb_color) {
20511 # var redFrac = rgb_color.red || 0.0;
20512 # var greenFrac = rgb_color.green || 0.0;
20513 # var blueFrac = rgb_color.blue || 0.0;
20514 # var red = Math.floor(redFrac * 255);
20515 # var green = Math.floor(greenFrac * 255);
20516 # var blue = Math.floor(blueFrac * 255);
20517 #
20518 # if (!('alpha' in rgb_color)) {
20519 # return rgbToCssColor_(red, green, blue);
20520 # }
20521 #
20522 # var alphaFrac = rgb_color.alpha.value || 0.0;
20523 # var rgbParams = [red, green, blue].join(',');
20524 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20525 # };
20526 #
20527 # var rgbToCssColor_ = function(red, green, blue) {
20528 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20529 # var hexString = rgbNumber.toString(16);
20530 # var missingZeros = 6 - hexString.length;
20531 # var resultBuilder = ['#'];
20532 # for (var i = 0; i < missingZeros; i++) {
20533 # resultBuilder.push('0');
20534 # }
20535 # resultBuilder.push(hexString);
20536 # return resultBuilder.join('');
20537 # };
20538 #
20539 # // ...
20540 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20541 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20542 # the final pixel color is defined by the equation:
20543 #
20544 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20545 #
20546 # This means that a value of 1.0 corresponds to a solid color, whereas
20547 # a value of 0.0 corresponds to a completely transparent color. This
20548 # uses a wrapper message rather than a simple float scalar so that it is
20549 # possible to distinguish between a default value and the value being unset.
20550 # If omitted, this color object is to be rendered as a solid color
20551 # (as if the alpha value had been explicitly given with a value of 1.0).
20552 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20553 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20554 },
20555 "type": "A String", # How the value should be interpreted.
20556 "value": "A String", # The value this interpolation point uses. May be a formula.
20557 # Unused if type is MIN or
20558 # MAX.
20559 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020560 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020561 # These pin the gradient color scale according to the color,
20562 # type and value chosen.
20563 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
20564 # for simplicity of conversion to/from color representations in various
20565 # languages over compactness; for example, the fields of this representation
20566 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20567 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20568 # method in iOS; and, with just a little work, it can be easily formatted into
20569 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20570 #
20571 # Example (Java):
20572 #
20573 # import com.google.type.Color;
20574 #
20575 # // ...
20576 # public static java.awt.Color fromProto(Color protocolor) {
20577 # float alpha = protocolor.hasAlpha()
20578 # ? protocolor.getAlpha().getValue()
20579 # : 1.0;
20580 #
20581 # return new java.awt.Color(
20582 # protocolor.getRed(),
20583 # protocolor.getGreen(),
20584 # protocolor.getBlue(),
20585 # alpha);
20586 # }
20587 #
20588 # public static Color toProto(java.awt.Color color) {
20589 # float red = (float) color.getRed();
20590 # float green = (float) color.getGreen();
20591 # float blue = (float) color.getBlue();
20592 # float denominator = 255.0;
20593 # Color.Builder resultBuilder =
20594 # Color
20595 # .newBuilder()
20596 # .setRed(red / denominator)
20597 # .setGreen(green / denominator)
20598 # .setBlue(blue / denominator);
20599 # int alpha = color.getAlpha();
20600 # if (alpha != 255) {
20601 # result.setAlpha(
20602 # FloatValue
20603 # .newBuilder()
20604 # .setValue(((float) alpha) / denominator)
20605 # .build());
20606 # }
20607 # return resultBuilder.build();
20608 # }
20609 # // ...
20610 #
20611 # Example (iOS / Obj-C):
20612 #
20613 # // ...
20614 # static UIColor* fromProto(Color* protocolor) {
20615 # float red = [protocolor red];
20616 # float green = [protocolor green];
20617 # float blue = [protocolor blue];
20618 # FloatValue* alpha_wrapper = [protocolor alpha];
20619 # float alpha = 1.0;
20620 # if (alpha_wrapper != nil) {
20621 # alpha = [alpha_wrapper value];
20622 # }
20623 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20624 # }
20625 #
20626 # static Color* toProto(UIColor* color) {
20627 # CGFloat red, green, blue, alpha;
20628 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20629 # return nil;
20630 # }
20631 # Color* result = [Color alloc] init];
20632 # [result setRed:red];
20633 # [result setGreen:green];
20634 # [result setBlue:blue];
20635 # if (alpha <= 0.9999) {
20636 # [result setAlpha:floatWrapperWithValue(alpha)];
20637 # }
20638 # [result autorelease];
20639 # return result;
20640 # }
20641 # // ...
20642 #
20643 # Example (JavaScript):
20644 #
20645 # // ...
20646 #
20647 # var protoToCssColor = function(rgb_color) {
20648 # var redFrac = rgb_color.red || 0.0;
20649 # var greenFrac = rgb_color.green || 0.0;
20650 # var blueFrac = rgb_color.blue || 0.0;
20651 # var red = Math.floor(redFrac * 255);
20652 # var green = Math.floor(greenFrac * 255);
20653 # var blue = Math.floor(blueFrac * 255);
20654 #
20655 # if (!('alpha' in rgb_color)) {
20656 # return rgbToCssColor_(red, green, blue);
20657 # }
20658 #
20659 # var alphaFrac = rgb_color.alpha.value || 0.0;
20660 # var rgbParams = [red, green, blue].join(',');
20661 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20662 # };
20663 #
20664 # var rgbToCssColor_ = function(red, green, blue) {
20665 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20666 # var hexString = rgbNumber.toString(16);
20667 # var missingZeros = 6 - hexString.length;
20668 # var resultBuilder = ['#'];
20669 # for (var i = 0; i < missingZeros; i++) {
20670 # resultBuilder.push('0');
20671 # }
20672 # resultBuilder.push(hexString);
20673 # return resultBuilder.join('');
20674 # };
20675 #
20676 # // ...
20677 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20678 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20679 # the final pixel color is defined by the equation:
20680 #
20681 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20682 #
20683 # This means that a value of 1.0 corresponds to a solid color, whereas
20684 # a value of 0.0 corresponds to a completely transparent color. This
20685 # uses a wrapper message rather than a simple float scalar so that it is
20686 # possible to distinguish between a default value and the value being unset.
20687 # If omitted, this color object is to be rendered as a solid color
20688 # (as if the alpha value had been explicitly given with a value of 1.0).
20689 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20690 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20691 },
20692 "type": "A String", # How the value should be interpreted.
20693 "value": "A String", # The value this interpolation point uses. May be a formula.
20694 # Unused if type is MIN or
20695 # MAX.
20696 },
20697 },
20698 },
20699 ],
20700 "merges": [ # The ranges that are merged together.
20701 { # A range on a sheet.
20702 # All indexes are zero-based.
20703 # Indexes are half open, e.g the start index is inclusive
20704 # and the end index is exclusive -- [start_index, end_index).
20705 # Missing indexes indicate the range is unbounded on that side.
20706 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020707 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020708 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020709 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020710 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020711 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020712 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020713 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020714 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020715 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020716 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020717 # `Sheet1!A:B == sheet_id: 0,
20718 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020719 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020720 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020721 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020722 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020723 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020724 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020725 #
20726 # The start index must always be less than or equal to the end index.
20727 # If the start index equals the end index, then the range is empty.
20728 # Empty ranges are typically not meaningful and are usually rendered in the
20729 # UI as `#REF!`.
20730 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
20731 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
20732 "sheetId": 42, # The sheet this range is on.
20733 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
20734 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
20735 },
20736 ],
20737 "basicFilter": { # The default filter associated with a sheet. # The filter on this sheet, if any.
20738 "range": { # A range on a sheet. # The range the filter covers.
20739 # All indexes are zero-based.
20740 # Indexes are half open, e.g the start index is inclusive
20741 # and the end index is exclusive -- [start_index, end_index).
20742 # Missing indexes indicate the range is unbounded on that side.
20743 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020744 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020745 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020746 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020747 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020748 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020749 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020750 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020751 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020752 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020753 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020754 # `Sheet1!A:B == sheet_id: 0,
20755 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020756 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020757 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020758 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020759 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020760 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020761 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020762 #
20763 # The start index must always be less than or equal to the end index.
20764 # If the start index equals the end index, then the range is empty.
20765 # Empty ranges are typically not meaningful and are usually rendered in the
20766 # UI as `#REF!`.
20767 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
20768 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
20769 "sheetId": 42, # The sheet this range is on.
20770 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
20771 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
20772 },
20773 "sortSpecs": [ # The sort order per column. Later specifications are used when values
20774 # are equal in the earlier specifications.
20775 { # A sort order associated with a specific column or row.
20776 "sortOrder": "A String", # The order data should be sorted.
20777 "dimensionIndex": 42, # The dimension the sort should be applied to.
20778 },
20779 ],
20780 "criteria": { # The criteria for showing/hiding values per column.
20781 # The map's key is the column index, and the value is the criteria for
20782 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020783 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020784 "hiddenValues": [ # Values that should be hidden.
20785 "A String",
20786 ],
20787 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
20788 # (This does not override hiddenValues -- if a value is listed there,
20789 # it will still be hidden.)
20790 # BooleanConditions are used by conditional formatting,
20791 # data validation, and the criteria in filters.
20792 "type": "A String", # The type of condition.
20793 "values": [ # The values of the condition. The number of supported values depends
20794 # on the condition type. Some support zero values,
20795 # others one or two values,
20796 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
20797 { # The value of the condition.
20798 "relativeDate": "A String", # A relative date (based on the current date).
20799 # Valid only if the type is
20800 # DATE_BEFORE,
20801 # DATE_AFTER,
20802 # DATE_ON_OR_BEFORE or
20803 # DATE_ON_OR_AFTER.
20804 #
20805 # Relative dates are not supported in data validation.
20806 # They are supported only in conditional formatting and
20807 # conditional filters.
20808 "userEnteredValue": "A String", # A value the condition is based on.
20809 # The value will be parsed as if the user typed into a cell.
20810 # Formulas are supported (and must begin with an `=`).
20811 },
20812 ],
20813 },
20814 },
20815 },
20816 },
20817 "charts": [ # The specifications of every chart on this sheet.
20818 { # A chart embedded in a sheet.
20819 "chartId": 42, # The ID of the chart.
20820 "position": { # The position of an embedded object such as a chart. # The position of the chart.
20821 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
20822 # is chosen for you. Used only when writing.
20823 "sheetId": 42, # The sheet this is on. Set only if the embedded object
20824 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020825 "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 -070020826 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
20827 # All indexes are zero-based.
20828 "rowIndex": 42, # The row index of the coordinate.
20829 "columnIndex": 42, # The column index of the coordinate.
20830 "sheetId": 42, # The sheet this coordinate is on.
20831 },
20832 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
20833 # from the anchor cell.
20834 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
20835 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
20836 # from the anchor cell.
20837 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
20838 },
20839 },
20840 "spec": { # The specifications of a chart. # The specification of the chart.
20841 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020842 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
20843 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
20844 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
20845 "sources": [ # The ranges of data for a series or domain.
20846 # Exactly one dimension must have a length of 1,
20847 # and all sources in the list must have the same dimension
20848 # with length 1.
20849 # The domain (if it exists) & all series must have the same number
20850 # of source ranges. If using more than one source range, then the source
20851 # range at a given offset must be contiguous across the domain and series.
20852 #
20853 # For example, these are valid configurations:
20854 #
20855 # domain sources: A1:A5
20856 # series1 sources: B1:B5
20857 # series2 sources: D6:D10
20858 #
20859 # domain sources: A1:A5, C10:C12
20860 # series1 sources: B1:B5, D10:D12
20861 # series2 sources: C1:C5, E10:E12
20862 { # A range on a sheet.
20863 # All indexes are zero-based.
20864 # Indexes are half open, e.g the start index is inclusive
20865 # and the end index is exclusive -- [start_index, end_index).
20866 # Missing indexes indicate the range is unbounded on that side.
20867 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020868 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020869 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020870 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020871 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020872 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020873 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020874 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020875 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020876 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020877 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020878 # `Sheet1!A:B == sheet_id: 0,
20879 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020880 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020881 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020882 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020883 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020884 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020885 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020886 #
20887 # The start index must always be less than or equal to the end index.
20888 # If the start index equals the end index, then the range is empty.
20889 # Empty ranges are typically not meaningful and are usually rendered in the
20890 # UI as `#REF!`.
20891 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
20892 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
20893 "sheetId": 42, # The sheet this range is on.
20894 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
20895 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
20896 },
20897 ],
20898 },
20899 },
20900 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
20901 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
20902 "sources": [ # The ranges of data for a series or domain.
20903 # Exactly one dimension must have a length of 1,
20904 # and all sources in the list must have the same dimension
20905 # with length 1.
20906 # The domain (if it exists) & all series must have the same number
20907 # of source ranges. If using more than one source range, then the source
20908 # range at a given offset must be contiguous across the domain and series.
20909 #
20910 # For example, these are valid configurations:
20911 #
20912 # domain sources: A1:A5
20913 # series1 sources: B1:B5
20914 # series2 sources: D6:D10
20915 #
20916 # domain sources: A1:A5, C10:C12
20917 # series1 sources: B1:B5, D10:D12
20918 # series2 sources: C1:C5, E10:E12
20919 { # A range on a sheet.
20920 # All indexes are zero-based.
20921 # Indexes are half open, e.g the start index is inclusive
20922 # and the end index is exclusive -- [start_index, end_index).
20923 # Missing indexes indicate the range is unbounded on that side.
20924 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020925 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020926 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020927 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020928 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020929 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020930 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020931 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020932 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020933 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020934 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020935 # `Sheet1!A:B == sheet_id: 0,
20936 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020937 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020938 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020939 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020940 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020941 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070020942 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020943 #
20944 # The start index must always be less than or equal to the end index.
20945 # If the start index equals the end index, then the range is empty.
20946 # Empty ranges are typically not meaningful and are usually rendered in the
20947 # UI as `#REF!`.
20948 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
20949 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
20950 "sheetId": 42, # The sheet this range is on.
20951 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
20952 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
20953 },
20954 ],
20955 },
20956 },
20957 "threeDimensional": True or False, # True if the pie is three dimensional.
20958 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
20959 "pieHole": 3.14, # The size of the hole in the pie chart.
20960 },
20961 "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 -070020962 # See BasicChartType for the list of all
20963 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070020964 # of charts this supports.
20965 "headerCount": 42, # The number of rows or columns in the data that are "headers".
20966 # If not set, Google Sheets will guess how many rows are headers based
20967 # on the data.
20968 #
20969 # (Note that BasicChartAxis.title may override the axis title
20970 # inferred from the header values.)
20971 "series": [ # The data this chart is visualizing.
20972 { # A single series of data in a chart.
20973 # For example, if charting stock prices over time, multiple series may exist,
20974 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
20975 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
20976 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
20977 "sources": [ # The ranges of data for a series or domain.
20978 # Exactly one dimension must have a length of 1,
20979 # and all sources in the list must have the same dimension
20980 # with length 1.
20981 # The domain (if it exists) & all series must have the same number
20982 # of source ranges. If using more than one source range, then the source
20983 # range at a given offset must be contiguous across the domain and series.
20984 #
20985 # For example, these are valid configurations:
20986 #
20987 # domain sources: A1:A5
20988 # series1 sources: B1:B5
20989 # series2 sources: D6:D10
20990 #
20991 # domain sources: A1:A5, C10:C12
20992 # series1 sources: B1:B5, D10:D12
20993 # series2 sources: C1:C5, E10:E12
20994 { # A range on a sheet.
20995 # All indexes are zero-based.
20996 # Indexes are half open, e.g the start index is inclusive
20997 # and the end index is exclusive -- [start_index, end_index).
20998 # Missing indexes indicate the range is unbounded on that side.
20999 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021000 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021001 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021002 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021003 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021004 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021005 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021006 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021007 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021008 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021009 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021010 # `Sheet1!A:B == sheet_id: 0,
21011 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021012 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021013 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021014 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021015 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021016 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021017 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021018 #
21019 # The start index must always be less than or equal to the end index.
21020 # If the start index equals the end index, then the range is empty.
21021 # Empty ranges are typically not meaningful and are usually rendered in the
21022 # UI as `#REF!`.
21023 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
21024 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
21025 "sheetId": 42, # The sheet this range is on.
21026 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
21027 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
21028 },
21029 ],
21030 },
21031 },
21032 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
21033 # For example, if charting stocks over time, the "Volume" series
21034 # may want to be pinned to the right with the prices pinned to the left,
21035 # because the scale of trading volume is different than the scale of
21036 # prices.
21037 # It is an error to specify an axis that isn't a valid minor axis
21038 # for the chart's type.
21039 "type": "A String", # The type of this series. Valid only if the
21040 # chartType is
21041 # COMBO.
21042 # Different types will change the way the series is visualized.
21043 # Only LINE, AREA,
21044 # and COLUMN are supported.
21045 },
21046 ],
21047 "legendPosition": "A String", # The position of the chart legend.
21048 "domains": [ # The domain of data this is charting.
21049 # Only a single domain is currently supported.
21050 { # The domain of a chart.
21051 # For example, if charting stock prices over time, this would be the date.
21052 "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 -070021053 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021054 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
21055 "sources": [ # The ranges of data for a series or domain.
21056 # Exactly one dimension must have a length of 1,
21057 # and all sources in the list must have the same dimension
21058 # with length 1.
21059 # The domain (if it exists) & all series must have the same number
21060 # of source ranges. If using more than one source range, then the source
21061 # range at a given offset must be contiguous across the domain and series.
21062 #
21063 # For example, these are valid configurations:
21064 #
21065 # domain sources: A1:A5
21066 # series1 sources: B1:B5
21067 # series2 sources: D6:D10
21068 #
21069 # domain sources: A1:A5, C10:C12
21070 # series1 sources: B1:B5, D10:D12
21071 # series2 sources: C1:C5, E10:E12
21072 { # A range on a sheet.
21073 # All indexes are zero-based.
21074 # Indexes are half open, e.g the start index is inclusive
21075 # and the end index is exclusive -- [start_index, end_index).
21076 # Missing indexes indicate the range is unbounded on that side.
21077 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021078 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021079 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021080 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021081 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021082 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021083 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021084 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021085 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021086 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021087 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021088 # `Sheet1!A:B == sheet_id: 0,
21089 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021090 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021091 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021092 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021093 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021094 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021095 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021096 #
21097 # The start index must always be less than or equal to the end index.
21098 # If the start index equals the end index, then the range is empty.
21099 # Empty ranges are typically not meaningful and are usually rendered in the
21100 # UI as `#REF!`.
21101 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
21102 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
21103 "sheetId": 42, # The sheet this range is on.
21104 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
21105 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
21106 },
21107 ],
21108 },
21109 },
21110 },
21111 ],
21112 "chartType": "A String", # The type of the chart.
21113 "axis": [ # The axis on the chart.
21114 { # An axis of the chart.
21115 # A chart may not have more than one axis per
21116 # axis position.
21117 "position": "A String", # The position of this axis.
21118 "format": { # The format of a run of text in a cell. # The format of the title.
21119 # Only valid if the axis is not associated with the domain.
21120 # Absent values indicate that the field isn't specified.
21121 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
21122 # for simplicity of conversion to/from color representations in various
21123 # languages over compactness; for example, the fields of this representation
21124 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21125 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21126 # method in iOS; and, with just a little work, it can be easily formatted into
21127 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21128 #
21129 # Example (Java):
21130 #
21131 # import com.google.type.Color;
21132 #
21133 # // ...
21134 # public static java.awt.Color fromProto(Color protocolor) {
21135 # float alpha = protocolor.hasAlpha()
21136 # ? protocolor.getAlpha().getValue()
21137 # : 1.0;
21138 #
21139 # return new java.awt.Color(
21140 # protocolor.getRed(),
21141 # protocolor.getGreen(),
21142 # protocolor.getBlue(),
21143 # alpha);
21144 # }
21145 #
21146 # public static Color toProto(java.awt.Color color) {
21147 # float red = (float) color.getRed();
21148 # float green = (float) color.getGreen();
21149 # float blue = (float) color.getBlue();
21150 # float denominator = 255.0;
21151 # Color.Builder resultBuilder =
21152 # Color
21153 # .newBuilder()
21154 # .setRed(red / denominator)
21155 # .setGreen(green / denominator)
21156 # .setBlue(blue / denominator);
21157 # int alpha = color.getAlpha();
21158 # if (alpha != 255) {
21159 # result.setAlpha(
21160 # FloatValue
21161 # .newBuilder()
21162 # .setValue(((float) alpha) / denominator)
21163 # .build());
21164 # }
21165 # return resultBuilder.build();
21166 # }
21167 # // ...
21168 #
21169 # Example (iOS / Obj-C):
21170 #
21171 # // ...
21172 # static UIColor* fromProto(Color* protocolor) {
21173 # float red = [protocolor red];
21174 # float green = [protocolor green];
21175 # float blue = [protocolor blue];
21176 # FloatValue* alpha_wrapper = [protocolor alpha];
21177 # float alpha = 1.0;
21178 # if (alpha_wrapper != nil) {
21179 # alpha = [alpha_wrapper value];
21180 # }
21181 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21182 # }
21183 #
21184 # static Color* toProto(UIColor* color) {
21185 # CGFloat red, green, blue, alpha;
21186 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21187 # return nil;
21188 # }
21189 # Color* result = [Color alloc] init];
21190 # [result setRed:red];
21191 # [result setGreen:green];
21192 # [result setBlue:blue];
21193 # if (alpha <= 0.9999) {
21194 # [result setAlpha:floatWrapperWithValue(alpha)];
21195 # }
21196 # [result autorelease];
21197 # return result;
21198 # }
21199 # // ...
21200 #
21201 # Example (JavaScript):
21202 #
21203 # // ...
21204 #
21205 # var protoToCssColor = function(rgb_color) {
21206 # var redFrac = rgb_color.red || 0.0;
21207 # var greenFrac = rgb_color.green || 0.0;
21208 # var blueFrac = rgb_color.blue || 0.0;
21209 # var red = Math.floor(redFrac * 255);
21210 # var green = Math.floor(greenFrac * 255);
21211 # var blue = Math.floor(blueFrac * 255);
21212 #
21213 # if (!('alpha' in rgb_color)) {
21214 # return rgbToCssColor_(red, green, blue);
21215 # }
21216 #
21217 # var alphaFrac = rgb_color.alpha.value || 0.0;
21218 # var rgbParams = [red, green, blue].join(',');
21219 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21220 # };
21221 #
21222 # var rgbToCssColor_ = function(red, green, blue) {
21223 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21224 # var hexString = rgbNumber.toString(16);
21225 # var missingZeros = 6 - hexString.length;
21226 # var resultBuilder = ['#'];
21227 # for (var i = 0; i < missingZeros; i++) {
21228 # resultBuilder.push('0');
21229 # }
21230 # resultBuilder.push(hexString);
21231 # return resultBuilder.join('');
21232 # };
21233 #
21234 # // ...
21235 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21236 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21237 # the final pixel color is defined by the equation:
21238 #
21239 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21240 #
21241 # This means that a value of 1.0 corresponds to a solid color, whereas
21242 # a value of 0.0 corresponds to a completely transparent color. This
21243 # uses a wrapper message rather than a simple float scalar so that it is
21244 # possible to distinguish between a default value and the value being unset.
21245 # If omitted, this color object is to be rendered as a solid color
21246 # (as if the alpha value had been explicitly given with a value of 1.0).
21247 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21248 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21249 },
21250 "bold": True or False, # True if the text is bold.
21251 "strikethrough": True or False, # True if the text has a strikethrough.
21252 "fontFamily": "A String", # The font family.
21253 "fontSize": 42, # The size of the font.
21254 "italic": True or False, # True if the text is italicized.
21255 "underline": True or False, # True if the text is underlined.
21256 },
21257 "title": "A String", # The title of this axis. If set, this overrides any title inferred
21258 # from headers of the data.
21259 },
21260 ],
21261 },
21262 "title": "A String", # The title of the chart.
21263 },
21264 },
21265 ],
21266 "filterViews": [ # The filter views in this sheet.
21267 { # A filter view.
21268 "title": "A String", # The name of the filter view.
21269 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
21270 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021271 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021272 # may be set.
21273 "filterViewId": 42, # The ID of the filter view.
21274 "range": { # A range on a sheet. # The range this filter view covers.
21275 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021276 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021277 # may be set.
21278 # All indexes are zero-based.
21279 # Indexes are half open, e.g the start index is inclusive
21280 # and the end index is exclusive -- [start_index, end_index).
21281 # Missing indexes indicate the range is unbounded on that side.
21282 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021283 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021284 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021285 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021286 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021287 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021288 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021289 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021290 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021291 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021292 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021293 # `Sheet1!A:B == sheet_id: 0,
21294 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021295 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021296 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021297 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021298 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021299 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021300 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021301 #
21302 # The start index must always be less than or equal to the end index.
21303 # If the start index equals the end index, then the range is empty.
21304 # Empty ranges are typically not meaningful and are usually rendered in the
21305 # UI as `#REF!`.
21306 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
21307 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
21308 "sheetId": 42, # The sheet this range is on.
21309 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
21310 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
21311 },
21312 "sortSpecs": [ # The sort order per column. Later specifications are used when values
21313 # are equal in the earlier specifications.
21314 { # A sort order associated with a specific column or row.
21315 "sortOrder": "A String", # The order data should be sorted.
21316 "dimensionIndex": 42, # The dimension the sort should be applied to.
21317 },
21318 ],
21319 "criteria": { # The criteria for showing/hiding values per column.
21320 # The map's key is the column index, and the value is the criteria for
21321 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021322 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021323 "hiddenValues": [ # Values that should be hidden.
21324 "A String",
21325 ],
21326 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
21327 # (This does not override hiddenValues -- if a value is listed there,
21328 # it will still be hidden.)
21329 # BooleanConditions are used by conditional formatting,
21330 # data validation, and the criteria in filters.
21331 "type": "A String", # The type of condition.
21332 "values": [ # The values of the condition. The number of supported values depends
21333 # on the condition type. Some support zero values,
21334 # others one or two values,
21335 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
21336 { # The value of the condition.
21337 "relativeDate": "A String", # A relative date (based on the current date).
21338 # Valid only if the type is
21339 # DATE_BEFORE,
21340 # DATE_AFTER,
21341 # DATE_ON_OR_BEFORE or
21342 # DATE_ON_OR_AFTER.
21343 #
21344 # Relative dates are not supported in data validation.
21345 # They are supported only in conditional formatting and
21346 # conditional filters.
21347 "userEnteredValue": "A String", # A value the condition is based on.
21348 # The value will be parsed as if the user typed into a cell.
21349 # Formulas are supported (and must begin with an `=`).
21350 },
21351 ],
21352 },
21353 },
21354 },
21355 },
21356 ],
21357 "protectedRanges": [ # The protected ranges in this sheet.
21358 { # A protected range.
21359 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
21360 # Unprotected ranges are only supported on protected sheets.
21361 { # A range on a sheet.
21362 # All indexes are zero-based.
21363 # Indexes are half open, e.g the start index is inclusive
21364 # and the end index is exclusive -- [start_index, end_index).
21365 # Missing indexes indicate the range is unbounded on that side.
21366 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021367 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021368 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021369 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021370 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021371 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021372 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021373 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021374 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021375 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021376 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021377 # `Sheet1!A:B == sheet_id: 0,
21378 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021379 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021380 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021381 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021382 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021383 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021384 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021385 #
21386 # The start index must always be less than or equal to the end index.
21387 # If the start index equals the end index, then the range is empty.
21388 # Empty ranges are typically not meaningful and are usually rendered in the
21389 # UI as `#REF!`.
21390 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
21391 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
21392 "sheetId": 42, # The sheet this range is on.
21393 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
21394 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
21395 },
21396 ],
21397 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
21398 # protected area.
21399 # This field is read-only.
21400 "description": "A String", # The description of this protected range.
21401 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
21402 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021403 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021404 # may be set.
21405 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
21406 # This field is only visible to users with edit access to the protected
21407 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021408 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021409 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
21410 # range. Domain protection is only supported on documents within a domain.
21411 "users": [ # The email addresses of users with edit access to the protected range.
21412 "A String",
21413 ],
21414 "groups": [ # The email addresses of groups with edit access to the protected range.
21415 "A String",
21416 ],
21417 },
21418 "protectedRangeId": 42, # The ID of the protected range.
21419 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021420 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021421 # Warning-based protection means that every user can edit data in the
21422 # protected range, except editing will prompt a warning asking the user
21423 # to confirm the edit.
21424 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021425 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021426 # Additionally, if this field is changed from true to false and the
21427 # `editors` field is not set (nor included in the field mask), then
21428 # the editors will be set to all the editors in the document.
21429 "range": { # A range on a sheet. # The range that is being protected.
21430 # The range may be fully unbounded, in which case this is considered
21431 # a protected sheet.
21432 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021433 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021434 # may be set.
21435 # All indexes are zero-based.
21436 # Indexes are half open, e.g the start index is inclusive
21437 # and the end index is exclusive -- [start_index, end_index).
21438 # Missing indexes indicate the range is unbounded on that side.
21439 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021440 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021441 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021442 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021443 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021444 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021445 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021446 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021447 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021448 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021449 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021450 # `Sheet1!A:B == sheet_id: 0,
21451 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021452 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021453 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021454 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021455 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021456 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021457 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021458 #
21459 # The start index must always be less than or equal to the end index.
21460 # If the start index equals the end index, then the range is empty.
21461 # Empty ranges are typically not meaningful and are usually rendered in the
21462 # UI as `#REF!`.
21463 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
21464 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
21465 "sheetId": 42, # The sheet this range is on.
21466 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
21467 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
21468 },
21469 },
21470 ],
21471 "data": [ # Data in the grid, if this is a grid sheet.
21472 # The number of GridData objects returned is dependent on the number of
21473 # ranges requested on this sheet. For example, if this is representing
21474 # `Sheet1`, and the spreadsheet was requested with ranges
21475 # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a
21476 # startRow/startColumn of `0`,
21477 # while the second one will have `startRow 14` (zero-based row 15),
21478 # and `startColumn 3` (zero-based column D).
21479 { # Data in the grid, as well as metadata about the dimensions.
21480 "startRow": 42, # The first row this GridData refers to, zero-based.
21481 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021482 # in start_row.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021483 { # Properties about a dimension.
21484 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
21485 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
21486 "hiddenByFilter": True or False, # True if this dimension is being filtered.
21487 # This field is read-only.
21488 },
21489 ],
21490 "startColumn": 42, # The first column this GridData refers to, zero-based.
21491 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021492 # in start_column.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021493 { # Properties about a dimension.
21494 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
21495 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
21496 "hiddenByFilter": True or False, # True if this dimension is being filtered.
21497 # This field is read-only.
21498 },
21499 ],
21500 "rowData": [ # The data in the grid, one entry per row,
21501 # starting with the row in startRow.
21502 # The values in RowData will correspond to columns starting
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021503 # at start_column.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021504 { # Data about each cell in a row.
21505 "values": [ # The values in the row, one per column.
21506 { # Data about a specific cell.
21507 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
21508 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021509 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021510 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021511 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021512 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
21513 # or vertically (as rows).
21514 "rows": [ # Each row grouping in the pivot table.
21515 { # A single grouping (either row or column) in a pivot table.
21516 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
21517 "valueMetadata": [ # Metadata about values in the grouping.
21518 { # Metadata about a value in a pivot grouping.
21519 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
21520 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
21521 # (Note that formulaValue is not valid,
21522 # because the values will be calculated.)
21523 "numberValue": 3.14, # Represents a double value.
21524 # Note: Dates, Times and DateTimes are represented as doubles in
21525 # "serial number" format.
21526 "boolValue": True or False, # Represents a boolean value.
21527 "formulaValue": "A String", # Represents a formula.
21528 "stringValue": "A String", # Represents a string value.
21529 # Leading single quotes are not included. For example, if the user typed
21530 # `'123` into the UI, this would be represented as a `stringValue` of
21531 # `"123"`.
21532 "errorValue": { # An error in a cell. # Represents an error.
21533 # This field is read-only.
21534 "message": "A String", # A message with more information about the error
21535 # (in the spreadsheet's locale).
21536 "type": "A String", # The type of error.
21537 },
21538 },
21539 },
21540 ],
21541 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
21542 # If not specified, sorting is alphabetical by this group's values.
21543 "buckets": [ # Determines the bucket from which values are chosen to sort.
21544 #
21545 # For example, in a pivot table with one row group & two column groups,
21546 # the row group can list up to two values. The first value corresponds
21547 # to a value within the first column group, and the second value
21548 # corresponds to a value in the second column group. If no values
21549 # are listed, this would indicate that the row should be sorted according
21550 # to the "Grand Total" over the column groups. If a single value is listed,
21551 # this would correspond to using the "Total" of that bucket.
21552 { # The kinds of value that a cell in a spreadsheet can have.
21553 "numberValue": 3.14, # Represents a double value.
21554 # Note: Dates, Times and DateTimes are represented as doubles in
21555 # "serial number" format.
21556 "boolValue": True or False, # Represents a boolean value.
21557 "formulaValue": "A String", # Represents a formula.
21558 "stringValue": "A String", # Represents a string value.
21559 # Leading single quotes are not included. For example, if the user typed
21560 # `'123` into the UI, this would be represented as a `stringValue` of
21561 # `"123"`.
21562 "errorValue": { # An error in a cell. # Represents an error.
21563 # This field is read-only.
21564 "message": "A String", # A message with more information about the error
21565 # (in the spreadsheet's locale).
21566 "type": "A String", # The type of error.
21567 },
21568 },
21569 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021570 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021571 # grouping should be sorted by.
21572 },
21573 "sortOrder": "A String", # The order the values in this group should be sorted.
21574 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
21575 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021576 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021577 # means this group refers to column `C`, whereas the offset `1` would refer
21578 # to column `D`.
21579 },
21580 ],
21581 "source": { # A range on a sheet. # The range the pivot table is reading data from.
21582 # All indexes are zero-based.
21583 # Indexes are half open, e.g the start index is inclusive
21584 # and the end index is exclusive -- [start_index, end_index).
21585 # Missing indexes indicate the range is unbounded on that side.
21586 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021587 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021588 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021589 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021590 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021591 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021592 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021593 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021594 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021595 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021596 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021597 # `Sheet1!A:B == sheet_id: 0,
21598 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021599 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021600 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021601 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021602 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021603 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021604 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021605 #
21606 # The start index must always be less than or equal to the end index.
21607 # If the start index equals the end index, then the range is empty.
21608 # Empty ranges are typically not meaningful and are usually rendered in the
21609 # UI as `#REF!`.
21610 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
21611 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
21612 "sheetId": 42, # The sheet this range is on.
21613 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
21614 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
21615 },
21616 "values": [ # A list of values to include in the pivot table.
21617 { # The definition of how a value in a pivot table should be calculated.
21618 "formula": "A String", # A custom formula to calculate the value. The formula must start
21619 # with an `=` character.
21620 "summarizeFunction": "A String", # A function to summarize the value.
21621 # If formula is set, the only supported values are
21622 # SUM and
21623 # CUSTOM.
21624 # If sourceColumnOffset is set, then `CUSTOM`
21625 # is not supported.
21626 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
21627 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021628 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021629 # means this value refers to column `C`, whereas the offset `1` would
21630 # refer to column `D`.
21631 "name": "A String", # A name to use for the value. This is only used if formula was set.
21632 # Otherwise, the column name is used.
21633 },
21634 ],
21635 "criteria": { # An optional mapping of filters per source column offset.
21636 #
21637 # The filters will be applied before aggregating data into the pivot table.
21638 # The map's key is the column offset of the source range that you want to
21639 # filter, and the value is the criteria for that column.
21640 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021641 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021642 # for column `C`, whereas the key `1` is for column `D`.
21643 "a_key": { # Criteria for showing/hiding rows in a pivot table.
21644 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
21645 "A String",
21646 ],
21647 },
21648 },
21649 "columns": [ # Each column grouping in the pivot table.
21650 { # A single grouping (either row or column) in a pivot table.
21651 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
21652 "valueMetadata": [ # Metadata about values in the grouping.
21653 { # Metadata about a value in a pivot grouping.
21654 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
21655 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
21656 # (Note that formulaValue is not valid,
21657 # because the values will be calculated.)
21658 "numberValue": 3.14, # Represents a double value.
21659 # Note: Dates, Times and DateTimes are represented as doubles in
21660 # "serial number" format.
21661 "boolValue": True or False, # Represents a boolean value.
21662 "formulaValue": "A String", # Represents a formula.
21663 "stringValue": "A String", # Represents a string value.
21664 # Leading single quotes are not included. For example, if the user typed
21665 # `'123` into the UI, this would be represented as a `stringValue` of
21666 # `"123"`.
21667 "errorValue": { # An error in a cell. # Represents an error.
21668 # This field is read-only.
21669 "message": "A String", # A message with more information about the error
21670 # (in the spreadsheet's locale).
21671 "type": "A String", # The type of error.
21672 },
21673 },
21674 },
21675 ],
21676 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
21677 # If not specified, sorting is alphabetical by this group's values.
21678 "buckets": [ # Determines the bucket from which values are chosen to sort.
21679 #
21680 # For example, in a pivot table with one row group & two column groups,
21681 # the row group can list up to two values. The first value corresponds
21682 # to a value within the first column group, and the second value
21683 # corresponds to a value in the second column group. If no values
21684 # are listed, this would indicate that the row should be sorted according
21685 # to the "Grand Total" over the column groups. If a single value is listed,
21686 # this would correspond to using the "Total" of that bucket.
21687 { # The kinds of value that a cell in a spreadsheet can have.
21688 "numberValue": 3.14, # Represents a double value.
21689 # Note: Dates, Times and DateTimes are represented as doubles in
21690 # "serial number" format.
21691 "boolValue": True or False, # Represents a boolean value.
21692 "formulaValue": "A String", # Represents a formula.
21693 "stringValue": "A String", # Represents a string value.
21694 # Leading single quotes are not included. For example, if the user typed
21695 # `'123` into the UI, this would be represented as a `stringValue` of
21696 # `"123"`.
21697 "errorValue": { # An error in a cell. # Represents an error.
21698 # This field is read-only.
21699 "message": "A String", # A message with more information about the error
21700 # (in the spreadsheet's locale).
21701 "type": "A String", # The type of error.
21702 },
21703 },
21704 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021705 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021706 # grouping should be sorted by.
21707 },
21708 "sortOrder": "A String", # The order the values in this group should be sorted.
21709 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
21710 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021711 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021712 # means this group refers to column `C`, whereas the offset `1` would refer
21713 # to column `D`.
21714 },
21715 ],
21716 },
21717 "hyperlink": "A String", # A hyperlink this cell points to, if any.
21718 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
21719 "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
21720 # the calculated value. For cells with literals, this will be
21721 # the same as the user_entered_value.
21722 # This field is read-only.
21723 "numberValue": 3.14, # Represents a double value.
21724 # Note: Dates, Times and DateTimes are represented as doubles in
21725 # "serial number" format.
21726 "boolValue": True or False, # Represents a boolean value.
21727 "formulaValue": "A String", # Represents a formula.
21728 "stringValue": "A String", # Represents a string value.
21729 # Leading single quotes are not included. For example, if the user typed
21730 # `'123` into the UI, this would be represented as a `stringValue` of
21731 # `"123"`.
21732 "errorValue": { # An error in a cell. # Represents an error.
21733 # This field is read-only.
21734 "message": "A String", # A message with more information about the error
21735 # (in the spreadsheet's locale).
21736 "type": "A String", # The type of error.
21737 },
21738 },
21739 "formattedValue": "A String", # The formatted value of the cell.
21740 # This is the value as it's shown to the user.
21741 # This field is read-only.
21742 "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()`
21743 # Note: Dates, Times and DateTimes are represented as doubles in
21744 # serial number format.
21745 "numberValue": 3.14, # Represents a double value.
21746 # Note: Dates, Times and DateTimes are represented as doubles in
21747 # "serial number" format.
21748 "boolValue": True or False, # Represents a boolean value.
21749 "formulaValue": "A String", # Represents a formula.
21750 "stringValue": "A String", # Represents a string value.
21751 # Leading single quotes are not included. For example, if the user typed
21752 # `'123` into the UI, this would be represented as a `stringValue` of
21753 # `"123"`.
21754 "errorValue": { # An error in a cell. # Represents an error.
21755 # This field is read-only.
21756 "message": "A String", # A message with more information about the error
21757 # (in the spreadsheet's locale).
21758 "type": "A String", # The type of error.
21759 },
21760 },
21761 "note": "A String", # Any note on the cell.
21762 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
21763 # This includes the results of applying any conditional formatting and,
21764 # if the cell contains a formula, the computed number format.
21765 # If the effective format is the default format, effective format will
21766 # not be written.
21767 # This field is read-only.
21768 "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 -070021769 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
21770 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070021771 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
21772 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021773 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021774 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021775 },
21776 "textDirection": "A String", # The direction of the text in the cell.
21777 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
21778 # When updating padding, every field must be specified.
21779 "top": 42, # The top padding of the cell.
21780 "right": 42, # The right padding of the cell.
21781 "bottom": 42, # The bottom padding of the cell.
21782 "left": 42, # The left padding of the cell.
21783 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021784 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021785 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
21786 # for simplicity of conversion to/from color representations in various
21787 # languages over compactness; for example, the fields of this representation
21788 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21789 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21790 # method in iOS; and, with just a little work, it can be easily formatted into
21791 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21792 #
21793 # Example (Java):
21794 #
21795 # import com.google.type.Color;
21796 #
21797 # // ...
21798 # public static java.awt.Color fromProto(Color protocolor) {
21799 # float alpha = protocolor.hasAlpha()
21800 # ? protocolor.getAlpha().getValue()
21801 # : 1.0;
21802 #
21803 # return new java.awt.Color(
21804 # protocolor.getRed(),
21805 # protocolor.getGreen(),
21806 # protocolor.getBlue(),
21807 # alpha);
21808 # }
21809 #
21810 # public static Color toProto(java.awt.Color color) {
21811 # float red = (float) color.getRed();
21812 # float green = (float) color.getGreen();
21813 # float blue = (float) color.getBlue();
21814 # float denominator = 255.0;
21815 # Color.Builder resultBuilder =
21816 # Color
21817 # .newBuilder()
21818 # .setRed(red / denominator)
21819 # .setGreen(green / denominator)
21820 # .setBlue(blue / denominator);
21821 # int alpha = color.getAlpha();
21822 # if (alpha != 255) {
21823 # result.setAlpha(
21824 # FloatValue
21825 # .newBuilder()
21826 # .setValue(((float) alpha) / denominator)
21827 # .build());
21828 # }
21829 # return resultBuilder.build();
21830 # }
21831 # // ...
21832 #
21833 # Example (iOS / Obj-C):
21834 #
21835 # // ...
21836 # static UIColor* fromProto(Color* protocolor) {
21837 # float red = [protocolor red];
21838 # float green = [protocolor green];
21839 # float blue = [protocolor blue];
21840 # FloatValue* alpha_wrapper = [protocolor alpha];
21841 # float alpha = 1.0;
21842 # if (alpha_wrapper != nil) {
21843 # alpha = [alpha_wrapper value];
21844 # }
21845 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21846 # }
21847 #
21848 # static Color* toProto(UIColor* color) {
21849 # CGFloat red, green, blue, alpha;
21850 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21851 # return nil;
21852 # }
21853 # Color* result = [Color alloc] init];
21854 # [result setRed:red];
21855 # [result setGreen:green];
21856 # [result setBlue:blue];
21857 # if (alpha <= 0.9999) {
21858 # [result setAlpha:floatWrapperWithValue(alpha)];
21859 # }
21860 # [result autorelease];
21861 # return result;
21862 # }
21863 # // ...
21864 #
21865 # Example (JavaScript):
21866 #
21867 # // ...
21868 #
21869 # var protoToCssColor = function(rgb_color) {
21870 # var redFrac = rgb_color.red || 0.0;
21871 # var greenFrac = rgb_color.green || 0.0;
21872 # var blueFrac = rgb_color.blue || 0.0;
21873 # var red = Math.floor(redFrac * 255);
21874 # var green = Math.floor(greenFrac * 255);
21875 # var blue = Math.floor(blueFrac * 255);
21876 #
21877 # if (!('alpha' in rgb_color)) {
21878 # return rgbToCssColor_(red, green, blue);
21879 # }
21880 #
21881 # var alphaFrac = rgb_color.alpha.value || 0.0;
21882 # var rgbParams = [red, green, blue].join(',');
21883 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21884 # };
21885 #
21886 # var rgbToCssColor_ = function(red, green, blue) {
21887 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21888 # var hexString = rgbNumber.toString(16);
21889 # var missingZeros = 6 - hexString.length;
21890 # var resultBuilder = ['#'];
21891 # for (var i = 0; i < missingZeros; i++) {
21892 # resultBuilder.push('0');
21893 # }
21894 # resultBuilder.push(hexString);
21895 # return resultBuilder.join('');
21896 # };
21897 #
21898 # // ...
21899 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21900 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21901 # the final pixel color is defined by the equation:
21902 #
21903 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21904 #
21905 # This means that a value of 1.0 corresponds to a solid color, whereas
21906 # a value of 0.0 corresponds to a completely transparent color. This
21907 # uses a wrapper message rather than a simple float scalar so that it is
21908 # possible to distinguish between a default value and the value being unset.
21909 # If omitted, this color object is to be rendered as a solid color
21910 # (as if the alpha value had been explicitly given with a value of 1.0).
21911 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21912 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21913 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070021914 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070021915 "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).
21916 # Absent values indicate that the field isn't specified.
21917 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
21918 # for simplicity of conversion to/from color representations in various
21919 # languages over compactness; for example, the fields of this representation
21920 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21921 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21922 # method in iOS; and, with just a little work, it can be easily formatted into
21923 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21924 #
21925 # Example (Java):
21926 #
21927 # import com.google.type.Color;
21928 #
21929 # // ...
21930 # public static java.awt.Color fromProto(Color protocolor) {
21931 # float alpha = protocolor.hasAlpha()
21932 # ? protocolor.getAlpha().getValue()
21933 # : 1.0;
21934 #
21935 # return new java.awt.Color(
21936 # protocolor.getRed(),
21937 # protocolor.getGreen(),
21938 # protocolor.getBlue(),
21939 # alpha);
21940 # }
21941 #
21942 # public static Color toProto(java.awt.Color color) {
21943 # float red = (float) color.getRed();
21944 # float green = (float) color.getGreen();
21945 # float blue = (float) color.getBlue();
21946 # float denominator = 255.0;
21947 # Color.Builder resultBuilder =
21948 # Color
21949 # .newBuilder()
21950 # .setRed(red / denominator)
21951 # .setGreen(green / denominator)
21952 # .setBlue(blue / denominator);
21953 # int alpha = color.getAlpha();
21954 # if (alpha != 255) {
21955 # result.setAlpha(
21956 # FloatValue
21957 # .newBuilder()
21958 # .setValue(((float) alpha) / denominator)
21959 # .build());
21960 # }
21961 # return resultBuilder.build();
21962 # }
21963 # // ...
21964 #
21965 # Example (iOS / Obj-C):
21966 #
21967 # // ...
21968 # static UIColor* fromProto(Color* protocolor) {
21969 # float red = [protocolor red];
21970 # float green = [protocolor green];
21971 # float blue = [protocolor blue];
21972 # FloatValue* alpha_wrapper = [protocolor alpha];
21973 # float alpha = 1.0;
21974 # if (alpha_wrapper != nil) {
21975 # alpha = [alpha_wrapper value];
21976 # }
21977 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21978 # }
21979 #
21980 # static Color* toProto(UIColor* color) {
21981 # CGFloat red, green, blue, alpha;
21982 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21983 # return nil;
21984 # }
21985 # Color* result = [Color alloc] init];
21986 # [result setRed:red];
21987 # [result setGreen:green];
21988 # [result setBlue:blue];
21989 # if (alpha <= 0.9999) {
21990 # [result setAlpha:floatWrapperWithValue(alpha)];
21991 # }
21992 # [result autorelease];
21993 # return result;
21994 # }
21995 # // ...
21996 #
21997 # Example (JavaScript):
21998 #
21999 # // ...
22000 #
22001 # var protoToCssColor = function(rgb_color) {
22002 # var redFrac = rgb_color.red || 0.0;
22003 # var greenFrac = rgb_color.green || 0.0;
22004 # var blueFrac = rgb_color.blue || 0.0;
22005 # var red = Math.floor(redFrac * 255);
22006 # var green = Math.floor(greenFrac * 255);
22007 # var blue = Math.floor(blueFrac * 255);
22008 #
22009 # if (!('alpha' in rgb_color)) {
22010 # return rgbToCssColor_(red, green, blue);
22011 # }
22012 #
22013 # var alphaFrac = rgb_color.alpha.value || 0.0;
22014 # var rgbParams = [red, green, blue].join(',');
22015 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22016 # };
22017 #
22018 # var rgbToCssColor_ = function(red, green, blue) {
22019 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22020 # var hexString = rgbNumber.toString(16);
22021 # var missingZeros = 6 - hexString.length;
22022 # var resultBuilder = ['#'];
22023 # for (var i = 0; i < missingZeros; i++) {
22024 # resultBuilder.push('0');
22025 # }
22026 # resultBuilder.push(hexString);
22027 # return resultBuilder.join('');
22028 # };
22029 #
22030 # // ...
22031 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22032 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22033 # the final pixel color is defined by the equation:
22034 #
22035 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22036 #
22037 # This means that a value of 1.0 corresponds to a solid color, whereas
22038 # a value of 0.0 corresponds to a completely transparent color. This
22039 # uses a wrapper message rather than a simple float scalar so that it is
22040 # possible to distinguish between a default value and the value being unset.
22041 # If omitted, this color object is to be rendered as a solid color
22042 # (as if the alpha value had been explicitly given with a value of 1.0).
22043 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22044 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22045 },
22046 "bold": True or False, # True if the text is bold.
22047 "strikethrough": True or False, # True if the text has a strikethrough.
22048 "fontFamily": "A String", # The font family.
22049 "fontSize": 42, # The size of the font.
22050 "italic": True or False, # True if the text is italicized.
22051 "underline": True or False, # True if the text is underlined.
22052 },
22053 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
22054 "borders": { # The borders of the cell. # The borders of the cell.
22055 "top": { # A border along a cell. # The top border of the cell.
22056 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
22057 # for simplicity of conversion to/from color representations in various
22058 # languages over compactness; for example, the fields of this representation
22059 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22060 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22061 # method in iOS; and, with just a little work, it can be easily formatted into
22062 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22063 #
22064 # Example (Java):
22065 #
22066 # import com.google.type.Color;
22067 #
22068 # // ...
22069 # public static java.awt.Color fromProto(Color protocolor) {
22070 # float alpha = protocolor.hasAlpha()
22071 # ? protocolor.getAlpha().getValue()
22072 # : 1.0;
22073 #
22074 # return new java.awt.Color(
22075 # protocolor.getRed(),
22076 # protocolor.getGreen(),
22077 # protocolor.getBlue(),
22078 # alpha);
22079 # }
22080 #
22081 # public static Color toProto(java.awt.Color color) {
22082 # float red = (float) color.getRed();
22083 # float green = (float) color.getGreen();
22084 # float blue = (float) color.getBlue();
22085 # float denominator = 255.0;
22086 # Color.Builder resultBuilder =
22087 # Color
22088 # .newBuilder()
22089 # .setRed(red / denominator)
22090 # .setGreen(green / denominator)
22091 # .setBlue(blue / denominator);
22092 # int alpha = color.getAlpha();
22093 # if (alpha != 255) {
22094 # result.setAlpha(
22095 # FloatValue
22096 # .newBuilder()
22097 # .setValue(((float) alpha) / denominator)
22098 # .build());
22099 # }
22100 # return resultBuilder.build();
22101 # }
22102 # // ...
22103 #
22104 # Example (iOS / Obj-C):
22105 #
22106 # // ...
22107 # static UIColor* fromProto(Color* protocolor) {
22108 # float red = [protocolor red];
22109 # float green = [protocolor green];
22110 # float blue = [protocolor blue];
22111 # FloatValue* alpha_wrapper = [protocolor alpha];
22112 # float alpha = 1.0;
22113 # if (alpha_wrapper != nil) {
22114 # alpha = [alpha_wrapper value];
22115 # }
22116 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22117 # }
22118 #
22119 # static Color* toProto(UIColor* color) {
22120 # CGFloat red, green, blue, alpha;
22121 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22122 # return nil;
22123 # }
22124 # Color* result = [Color alloc] init];
22125 # [result setRed:red];
22126 # [result setGreen:green];
22127 # [result setBlue:blue];
22128 # if (alpha <= 0.9999) {
22129 # [result setAlpha:floatWrapperWithValue(alpha)];
22130 # }
22131 # [result autorelease];
22132 # return result;
22133 # }
22134 # // ...
22135 #
22136 # Example (JavaScript):
22137 #
22138 # // ...
22139 #
22140 # var protoToCssColor = function(rgb_color) {
22141 # var redFrac = rgb_color.red || 0.0;
22142 # var greenFrac = rgb_color.green || 0.0;
22143 # var blueFrac = rgb_color.blue || 0.0;
22144 # var red = Math.floor(redFrac * 255);
22145 # var green = Math.floor(greenFrac * 255);
22146 # var blue = Math.floor(blueFrac * 255);
22147 #
22148 # if (!('alpha' in rgb_color)) {
22149 # return rgbToCssColor_(red, green, blue);
22150 # }
22151 #
22152 # var alphaFrac = rgb_color.alpha.value || 0.0;
22153 # var rgbParams = [red, green, blue].join(',');
22154 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22155 # };
22156 #
22157 # var rgbToCssColor_ = function(red, green, blue) {
22158 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22159 # var hexString = rgbNumber.toString(16);
22160 # var missingZeros = 6 - hexString.length;
22161 # var resultBuilder = ['#'];
22162 # for (var i = 0; i < missingZeros; i++) {
22163 # resultBuilder.push('0');
22164 # }
22165 # resultBuilder.push(hexString);
22166 # return resultBuilder.join('');
22167 # };
22168 #
22169 # // ...
22170 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22171 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22172 # the final pixel color is defined by the equation:
22173 #
22174 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22175 #
22176 # This means that a value of 1.0 corresponds to a solid color, whereas
22177 # a value of 0.0 corresponds to a completely transparent color. This
22178 # uses a wrapper message rather than a simple float scalar so that it is
22179 # possible to distinguish between a default value and the value being unset.
22180 # If omitted, this color object is to be rendered as a solid color
22181 # (as if the alpha value had been explicitly given with a value of 1.0).
22182 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22183 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22184 },
22185 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022186 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022187 "style": "A String", # The style of the border.
22188 },
22189 "right": { # A border along a cell. # The right border of the cell.
22190 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
22191 # for simplicity of conversion to/from color representations in various
22192 # languages over compactness; for example, the fields of this representation
22193 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22194 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22195 # method in iOS; and, with just a little work, it can be easily formatted into
22196 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22197 #
22198 # Example (Java):
22199 #
22200 # import com.google.type.Color;
22201 #
22202 # // ...
22203 # public static java.awt.Color fromProto(Color protocolor) {
22204 # float alpha = protocolor.hasAlpha()
22205 # ? protocolor.getAlpha().getValue()
22206 # : 1.0;
22207 #
22208 # return new java.awt.Color(
22209 # protocolor.getRed(),
22210 # protocolor.getGreen(),
22211 # protocolor.getBlue(),
22212 # alpha);
22213 # }
22214 #
22215 # public static Color toProto(java.awt.Color color) {
22216 # float red = (float) color.getRed();
22217 # float green = (float) color.getGreen();
22218 # float blue = (float) color.getBlue();
22219 # float denominator = 255.0;
22220 # Color.Builder resultBuilder =
22221 # Color
22222 # .newBuilder()
22223 # .setRed(red / denominator)
22224 # .setGreen(green / denominator)
22225 # .setBlue(blue / denominator);
22226 # int alpha = color.getAlpha();
22227 # if (alpha != 255) {
22228 # result.setAlpha(
22229 # FloatValue
22230 # .newBuilder()
22231 # .setValue(((float) alpha) / denominator)
22232 # .build());
22233 # }
22234 # return resultBuilder.build();
22235 # }
22236 # // ...
22237 #
22238 # Example (iOS / Obj-C):
22239 #
22240 # // ...
22241 # static UIColor* fromProto(Color* protocolor) {
22242 # float red = [protocolor red];
22243 # float green = [protocolor green];
22244 # float blue = [protocolor blue];
22245 # FloatValue* alpha_wrapper = [protocolor alpha];
22246 # float alpha = 1.0;
22247 # if (alpha_wrapper != nil) {
22248 # alpha = [alpha_wrapper value];
22249 # }
22250 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22251 # }
22252 #
22253 # static Color* toProto(UIColor* color) {
22254 # CGFloat red, green, blue, alpha;
22255 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22256 # return nil;
22257 # }
22258 # Color* result = [Color alloc] init];
22259 # [result setRed:red];
22260 # [result setGreen:green];
22261 # [result setBlue:blue];
22262 # if (alpha <= 0.9999) {
22263 # [result setAlpha:floatWrapperWithValue(alpha)];
22264 # }
22265 # [result autorelease];
22266 # return result;
22267 # }
22268 # // ...
22269 #
22270 # Example (JavaScript):
22271 #
22272 # // ...
22273 #
22274 # var protoToCssColor = function(rgb_color) {
22275 # var redFrac = rgb_color.red || 0.0;
22276 # var greenFrac = rgb_color.green || 0.0;
22277 # var blueFrac = rgb_color.blue || 0.0;
22278 # var red = Math.floor(redFrac * 255);
22279 # var green = Math.floor(greenFrac * 255);
22280 # var blue = Math.floor(blueFrac * 255);
22281 #
22282 # if (!('alpha' in rgb_color)) {
22283 # return rgbToCssColor_(red, green, blue);
22284 # }
22285 #
22286 # var alphaFrac = rgb_color.alpha.value || 0.0;
22287 # var rgbParams = [red, green, blue].join(',');
22288 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22289 # };
22290 #
22291 # var rgbToCssColor_ = function(red, green, blue) {
22292 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22293 # var hexString = rgbNumber.toString(16);
22294 # var missingZeros = 6 - hexString.length;
22295 # var resultBuilder = ['#'];
22296 # for (var i = 0; i < missingZeros; i++) {
22297 # resultBuilder.push('0');
22298 # }
22299 # resultBuilder.push(hexString);
22300 # return resultBuilder.join('');
22301 # };
22302 #
22303 # // ...
22304 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22305 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22306 # the final pixel color is defined by the equation:
22307 #
22308 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22309 #
22310 # This means that a value of 1.0 corresponds to a solid color, whereas
22311 # a value of 0.0 corresponds to a completely transparent color. This
22312 # uses a wrapper message rather than a simple float scalar so that it is
22313 # possible to distinguish between a default value and the value being unset.
22314 # If omitted, this color object is to be rendered as a solid color
22315 # (as if the alpha value had been explicitly given with a value of 1.0).
22316 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22317 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22318 },
22319 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022320 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022321 "style": "A String", # The style of the border.
22322 },
22323 "bottom": { # A border along a cell. # The bottom border of the cell.
22324 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
22325 # for simplicity of conversion to/from color representations in various
22326 # languages over compactness; for example, the fields of this representation
22327 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22328 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22329 # method in iOS; and, with just a little work, it can be easily formatted into
22330 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22331 #
22332 # Example (Java):
22333 #
22334 # import com.google.type.Color;
22335 #
22336 # // ...
22337 # public static java.awt.Color fromProto(Color protocolor) {
22338 # float alpha = protocolor.hasAlpha()
22339 # ? protocolor.getAlpha().getValue()
22340 # : 1.0;
22341 #
22342 # return new java.awt.Color(
22343 # protocolor.getRed(),
22344 # protocolor.getGreen(),
22345 # protocolor.getBlue(),
22346 # alpha);
22347 # }
22348 #
22349 # public static Color toProto(java.awt.Color color) {
22350 # float red = (float) color.getRed();
22351 # float green = (float) color.getGreen();
22352 # float blue = (float) color.getBlue();
22353 # float denominator = 255.0;
22354 # Color.Builder resultBuilder =
22355 # Color
22356 # .newBuilder()
22357 # .setRed(red / denominator)
22358 # .setGreen(green / denominator)
22359 # .setBlue(blue / denominator);
22360 # int alpha = color.getAlpha();
22361 # if (alpha != 255) {
22362 # result.setAlpha(
22363 # FloatValue
22364 # .newBuilder()
22365 # .setValue(((float) alpha) / denominator)
22366 # .build());
22367 # }
22368 # return resultBuilder.build();
22369 # }
22370 # // ...
22371 #
22372 # Example (iOS / Obj-C):
22373 #
22374 # // ...
22375 # static UIColor* fromProto(Color* protocolor) {
22376 # float red = [protocolor red];
22377 # float green = [protocolor green];
22378 # float blue = [protocolor blue];
22379 # FloatValue* alpha_wrapper = [protocolor alpha];
22380 # float alpha = 1.0;
22381 # if (alpha_wrapper != nil) {
22382 # alpha = [alpha_wrapper value];
22383 # }
22384 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22385 # }
22386 #
22387 # static Color* toProto(UIColor* color) {
22388 # CGFloat red, green, blue, alpha;
22389 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22390 # return nil;
22391 # }
22392 # Color* result = [Color alloc] init];
22393 # [result setRed:red];
22394 # [result setGreen:green];
22395 # [result setBlue:blue];
22396 # if (alpha <= 0.9999) {
22397 # [result setAlpha:floatWrapperWithValue(alpha)];
22398 # }
22399 # [result autorelease];
22400 # return result;
22401 # }
22402 # // ...
22403 #
22404 # Example (JavaScript):
22405 #
22406 # // ...
22407 #
22408 # var protoToCssColor = function(rgb_color) {
22409 # var redFrac = rgb_color.red || 0.0;
22410 # var greenFrac = rgb_color.green || 0.0;
22411 # var blueFrac = rgb_color.blue || 0.0;
22412 # var red = Math.floor(redFrac * 255);
22413 # var green = Math.floor(greenFrac * 255);
22414 # var blue = Math.floor(blueFrac * 255);
22415 #
22416 # if (!('alpha' in rgb_color)) {
22417 # return rgbToCssColor_(red, green, blue);
22418 # }
22419 #
22420 # var alphaFrac = rgb_color.alpha.value || 0.0;
22421 # var rgbParams = [red, green, blue].join(',');
22422 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22423 # };
22424 #
22425 # var rgbToCssColor_ = function(red, green, blue) {
22426 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22427 # var hexString = rgbNumber.toString(16);
22428 # var missingZeros = 6 - hexString.length;
22429 # var resultBuilder = ['#'];
22430 # for (var i = 0; i < missingZeros; i++) {
22431 # resultBuilder.push('0');
22432 # }
22433 # resultBuilder.push(hexString);
22434 # return resultBuilder.join('');
22435 # };
22436 #
22437 # // ...
22438 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22439 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22440 # the final pixel color is defined by the equation:
22441 #
22442 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22443 #
22444 # This means that a value of 1.0 corresponds to a solid color, whereas
22445 # a value of 0.0 corresponds to a completely transparent color. This
22446 # uses a wrapper message rather than a simple float scalar so that it is
22447 # possible to distinguish between a default value and the value being unset.
22448 # If omitted, this color object is to be rendered as a solid color
22449 # (as if the alpha value had been explicitly given with a value of 1.0).
22450 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22451 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22452 },
22453 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022454 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022455 "style": "A String", # The style of the border.
22456 },
22457 "left": { # A border along a cell. # The left border of the cell.
22458 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
22459 # for simplicity of conversion to/from color representations in various
22460 # languages over compactness; for example, the fields of this representation
22461 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22462 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22463 # method in iOS; and, with just a little work, it can be easily formatted into
22464 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22465 #
22466 # Example (Java):
22467 #
22468 # import com.google.type.Color;
22469 #
22470 # // ...
22471 # public static java.awt.Color fromProto(Color protocolor) {
22472 # float alpha = protocolor.hasAlpha()
22473 # ? protocolor.getAlpha().getValue()
22474 # : 1.0;
22475 #
22476 # return new java.awt.Color(
22477 # protocolor.getRed(),
22478 # protocolor.getGreen(),
22479 # protocolor.getBlue(),
22480 # alpha);
22481 # }
22482 #
22483 # public static Color toProto(java.awt.Color color) {
22484 # float red = (float) color.getRed();
22485 # float green = (float) color.getGreen();
22486 # float blue = (float) color.getBlue();
22487 # float denominator = 255.0;
22488 # Color.Builder resultBuilder =
22489 # Color
22490 # .newBuilder()
22491 # .setRed(red / denominator)
22492 # .setGreen(green / denominator)
22493 # .setBlue(blue / denominator);
22494 # int alpha = color.getAlpha();
22495 # if (alpha != 255) {
22496 # result.setAlpha(
22497 # FloatValue
22498 # .newBuilder()
22499 # .setValue(((float) alpha) / denominator)
22500 # .build());
22501 # }
22502 # return resultBuilder.build();
22503 # }
22504 # // ...
22505 #
22506 # Example (iOS / Obj-C):
22507 #
22508 # // ...
22509 # static UIColor* fromProto(Color* protocolor) {
22510 # float red = [protocolor red];
22511 # float green = [protocolor green];
22512 # float blue = [protocolor blue];
22513 # FloatValue* alpha_wrapper = [protocolor alpha];
22514 # float alpha = 1.0;
22515 # if (alpha_wrapper != nil) {
22516 # alpha = [alpha_wrapper value];
22517 # }
22518 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22519 # }
22520 #
22521 # static Color* toProto(UIColor* color) {
22522 # CGFloat red, green, blue, alpha;
22523 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22524 # return nil;
22525 # }
22526 # Color* result = [Color alloc] init];
22527 # [result setRed:red];
22528 # [result setGreen:green];
22529 # [result setBlue:blue];
22530 # if (alpha <= 0.9999) {
22531 # [result setAlpha:floatWrapperWithValue(alpha)];
22532 # }
22533 # [result autorelease];
22534 # return result;
22535 # }
22536 # // ...
22537 #
22538 # Example (JavaScript):
22539 #
22540 # // ...
22541 #
22542 # var protoToCssColor = function(rgb_color) {
22543 # var redFrac = rgb_color.red || 0.0;
22544 # var greenFrac = rgb_color.green || 0.0;
22545 # var blueFrac = rgb_color.blue || 0.0;
22546 # var red = Math.floor(redFrac * 255);
22547 # var green = Math.floor(greenFrac * 255);
22548 # var blue = Math.floor(blueFrac * 255);
22549 #
22550 # if (!('alpha' in rgb_color)) {
22551 # return rgbToCssColor_(red, green, blue);
22552 # }
22553 #
22554 # var alphaFrac = rgb_color.alpha.value || 0.0;
22555 # var rgbParams = [red, green, blue].join(',');
22556 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22557 # };
22558 #
22559 # var rgbToCssColor_ = function(red, green, blue) {
22560 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22561 # var hexString = rgbNumber.toString(16);
22562 # var missingZeros = 6 - hexString.length;
22563 # var resultBuilder = ['#'];
22564 # for (var i = 0; i < missingZeros; i++) {
22565 # resultBuilder.push('0');
22566 # }
22567 # resultBuilder.push(hexString);
22568 # return resultBuilder.join('');
22569 # };
22570 #
22571 # // ...
22572 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22573 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22574 # the final pixel color is defined by the equation:
22575 #
22576 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22577 #
22578 # This means that a value of 1.0 corresponds to a solid color, whereas
22579 # a value of 0.0 corresponds to a completely transparent color. This
22580 # uses a wrapper message rather than a simple float scalar so that it is
22581 # possible to distinguish between a default value and the value being unset.
22582 # If omitted, this color object is to be rendered as a solid color
22583 # (as if the alpha value had been explicitly given with a value of 1.0).
22584 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22585 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22586 },
22587 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022588 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022589 "style": "A String", # The style of the border.
22590 },
22591 },
22592 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
22593 },
22594 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
22595 #
22596 # When writing, the new format will be merged with the existing format.
22597 "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 -070022598 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
22599 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070022600 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
22601 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022602 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022603 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022604 },
22605 "textDirection": "A String", # The direction of the text in the cell.
22606 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
22607 # When updating padding, every field must be specified.
22608 "top": 42, # The top padding of the cell.
22609 "right": 42, # The right padding of the cell.
22610 "bottom": 42, # The bottom padding of the cell.
22611 "left": 42, # The left padding of the cell.
22612 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022613 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022614 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
22615 # for simplicity of conversion to/from color representations in various
22616 # languages over compactness; for example, the fields of this representation
22617 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22618 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22619 # method in iOS; and, with just a little work, it can be easily formatted into
22620 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22621 #
22622 # Example (Java):
22623 #
22624 # import com.google.type.Color;
22625 #
22626 # // ...
22627 # public static java.awt.Color fromProto(Color protocolor) {
22628 # float alpha = protocolor.hasAlpha()
22629 # ? protocolor.getAlpha().getValue()
22630 # : 1.0;
22631 #
22632 # return new java.awt.Color(
22633 # protocolor.getRed(),
22634 # protocolor.getGreen(),
22635 # protocolor.getBlue(),
22636 # alpha);
22637 # }
22638 #
22639 # public static Color toProto(java.awt.Color color) {
22640 # float red = (float) color.getRed();
22641 # float green = (float) color.getGreen();
22642 # float blue = (float) color.getBlue();
22643 # float denominator = 255.0;
22644 # Color.Builder resultBuilder =
22645 # Color
22646 # .newBuilder()
22647 # .setRed(red / denominator)
22648 # .setGreen(green / denominator)
22649 # .setBlue(blue / denominator);
22650 # int alpha = color.getAlpha();
22651 # if (alpha != 255) {
22652 # result.setAlpha(
22653 # FloatValue
22654 # .newBuilder()
22655 # .setValue(((float) alpha) / denominator)
22656 # .build());
22657 # }
22658 # return resultBuilder.build();
22659 # }
22660 # // ...
22661 #
22662 # Example (iOS / Obj-C):
22663 #
22664 # // ...
22665 # static UIColor* fromProto(Color* protocolor) {
22666 # float red = [protocolor red];
22667 # float green = [protocolor green];
22668 # float blue = [protocolor blue];
22669 # FloatValue* alpha_wrapper = [protocolor alpha];
22670 # float alpha = 1.0;
22671 # if (alpha_wrapper != nil) {
22672 # alpha = [alpha_wrapper value];
22673 # }
22674 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22675 # }
22676 #
22677 # static Color* toProto(UIColor* color) {
22678 # CGFloat red, green, blue, alpha;
22679 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22680 # return nil;
22681 # }
22682 # Color* result = [Color alloc] init];
22683 # [result setRed:red];
22684 # [result setGreen:green];
22685 # [result setBlue:blue];
22686 # if (alpha <= 0.9999) {
22687 # [result setAlpha:floatWrapperWithValue(alpha)];
22688 # }
22689 # [result autorelease];
22690 # return result;
22691 # }
22692 # // ...
22693 #
22694 # Example (JavaScript):
22695 #
22696 # // ...
22697 #
22698 # var protoToCssColor = function(rgb_color) {
22699 # var redFrac = rgb_color.red || 0.0;
22700 # var greenFrac = rgb_color.green || 0.0;
22701 # var blueFrac = rgb_color.blue || 0.0;
22702 # var red = Math.floor(redFrac * 255);
22703 # var green = Math.floor(greenFrac * 255);
22704 # var blue = Math.floor(blueFrac * 255);
22705 #
22706 # if (!('alpha' in rgb_color)) {
22707 # return rgbToCssColor_(red, green, blue);
22708 # }
22709 #
22710 # var alphaFrac = rgb_color.alpha.value || 0.0;
22711 # var rgbParams = [red, green, blue].join(',');
22712 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22713 # };
22714 #
22715 # var rgbToCssColor_ = function(red, green, blue) {
22716 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22717 # var hexString = rgbNumber.toString(16);
22718 # var missingZeros = 6 - hexString.length;
22719 # var resultBuilder = ['#'];
22720 # for (var i = 0; i < missingZeros; i++) {
22721 # resultBuilder.push('0');
22722 # }
22723 # resultBuilder.push(hexString);
22724 # return resultBuilder.join('');
22725 # };
22726 #
22727 # // ...
22728 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22729 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22730 # the final pixel color is defined by the equation:
22731 #
22732 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22733 #
22734 # This means that a value of 1.0 corresponds to a solid color, whereas
22735 # a value of 0.0 corresponds to a completely transparent color. This
22736 # uses a wrapper message rather than a simple float scalar so that it is
22737 # possible to distinguish between a default value and the value being unset.
22738 # If omitted, this color object is to be rendered as a solid color
22739 # (as if the alpha value had been explicitly given with a value of 1.0).
22740 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22741 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22742 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022743 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022744 "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).
22745 # Absent values indicate that the field isn't specified.
22746 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
22747 # for simplicity of conversion to/from color representations in various
22748 # languages over compactness; for example, the fields of this representation
22749 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22750 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22751 # method in iOS; and, with just a little work, it can be easily formatted into
22752 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22753 #
22754 # Example (Java):
22755 #
22756 # import com.google.type.Color;
22757 #
22758 # // ...
22759 # public static java.awt.Color fromProto(Color protocolor) {
22760 # float alpha = protocolor.hasAlpha()
22761 # ? protocolor.getAlpha().getValue()
22762 # : 1.0;
22763 #
22764 # return new java.awt.Color(
22765 # protocolor.getRed(),
22766 # protocolor.getGreen(),
22767 # protocolor.getBlue(),
22768 # alpha);
22769 # }
22770 #
22771 # public static Color toProto(java.awt.Color color) {
22772 # float red = (float) color.getRed();
22773 # float green = (float) color.getGreen();
22774 # float blue = (float) color.getBlue();
22775 # float denominator = 255.0;
22776 # Color.Builder resultBuilder =
22777 # Color
22778 # .newBuilder()
22779 # .setRed(red / denominator)
22780 # .setGreen(green / denominator)
22781 # .setBlue(blue / denominator);
22782 # int alpha = color.getAlpha();
22783 # if (alpha != 255) {
22784 # result.setAlpha(
22785 # FloatValue
22786 # .newBuilder()
22787 # .setValue(((float) alpha) / denominator)
22788 # .build());
22789 # }
22790 # return resultBuilder.build();
22791 # }
22792 # // ...
22793 #
22794 # Example (iOS / Obj-C):
22795 #
22796 # // ...
22797 # static UIColor* fromProto(Color* protocolor) {
22798 # float red = [protocolor red];
22799 # float green = [protocolor green];
22800 # float blue = [protocolor blue];
22801 # FloatValue* alpha_wrapper = [protocolor alpha];
22802 # float alpha = 1.0;
22803 # if (alpha_wrapper != nil) {
22804 # alpha = [alpha_wrapper value];
22805 # }
22806 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22807 # }
22808 #
22809 # static Color* toProto(UIColor* color) {
22810 # CGFloat red, green, blue, alpha;
22811 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22812 # return nil;
22813 # }
22814 # Color* result = [Color alloc] init];
22815 # [result setRed:red];
22816 # [result setGreen:green];
22817 # [result setBlue:blue];
22818 # if (alpha <= 0.9999) {
22819 # [result setAlpha:floatWrapperWithValue(alpha)];
22820 # }
22821 # [result autorelease];
22822 # return result;
22823 # }
22824 # // ...
22825 #
22826 # Example (JavaScript):
22827 #
22828 # // ...
22829 #
22830 # var protoToCssColor = function(rgb_color) {
22831 # var redFrac = rgb_color.red || 0.0;
22832 # var greenFrac = rgb_color.green || 0.0;
22833 # var blueFrac = rgb_color.blue || 0.0;
22834 # var red = Math.floor(redFrac * 255);
22835 # var green = Math.floor(greenFrac * 255);
22836 # var blue = Math.floor(blueFrac * 255);
22837 #
22838 # if (!('alpha' in rgb_color)) {
22839 # return rgbToCssColor_(red, green, blue);
22840 # }
22841 #
22842 # var alphaFrac = rgb_color.alpha.value || 0.0;
22843 # var rgbParams = [red, green, blue].join(',');
22844 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22845 # };
22846 #
22847 # var rgbToCssColor_ = function(red, green, blue) {
22848 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22849 # var hexString = rgbNumber.toString(16);
22850 # var missingZeros = 6 - hexString.length;
22851 # var resultBuilder = ['#'];
22852 # for (var i = 0; i < missingZeros; i++) {
22853 # resultBuilder.push('0');
22854 # }
22855 # resultBuilder.push(hexString);
22856 # return resultBuilder.join('');
22857 # };
22858 #
22859 # // ...
22860 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22861 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22862 # the final pixel color is defined by the equation:
22863 #
22864 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22865 #
22866 # This means that a value of 1.0 corresponds to a solid color, whereas
22867 # a value of 0.0 corresponds to a completely transparent color. This
22868 # uses a wrapper message rather than a simple float scalar so that it is
22869 # possible to distinguish between a default value and the value being unset.
22870 # If omitted, this color object is to be rendered as a solid color
22871 # (as if the alpha value had been explicitly given with a value of 1.0).
22872 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22873 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22874 },
22875 "bold": True or False, # True if the text is bold.
22876 "strikethrough": True or False, # True if the text has a strikethrough.
22877 "fontFamily": "A String", # The font family.
22878 "fontSize": 42, # The size of the font.
22879 "italic": True or False, # True if the text is italicized.
22880 "underline": True or False, # True if the text is underlined.
22881 },
22882 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
22883 "borders": { # The borders of the cell. # The borders of the cell.
22884 "top": { # A border along a cell. # The top border of the cell.
22885 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
22886 # for simplicity of conversion to/from color representations in various
22887 # languages over compactness; for example, the fields of this representation
22888 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22889 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22890 # method in iOS; and, with just a little work, it can be easily formatted into
22891 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22892 #
22893 # Example (Java):
22894 #
22895 # import com.google.type.Color;
22896 #
22897 # // ...
22898 # public static java.awt.Color fromProto(Color protocolor) {
22899 # float alpha = protocolor.hasAlpha()
22900 # ? protocolor.getAlpha().getValue()
22901 # : 1.0;
22902 #
22903 # return new java.awt.Color(
22904 # protocolor.getRed(),
22905 # protocolor.getGreen(),
22906 # protocolor.getBlue(),
22907 # alpha);
22908 # }
22909 #
22910 # public static Color toProto(java.awt.Color color) {
22911 # float red = (float) color.getRed();
22912 # float green = (float) color.getGreen();
22913 # float blue = (float) color.getBlue();
22914 # float denominator = 255.0;
22915 # Color.Builder resultBuilder =
22916 # Color
22917 # .newBuilder()
22918 # .setRed(red / denominator)
22919 # .setGreen(green / denominator)
22920 # .setBlue(blue / denominator);
22921 # int alpha = color.getAlpha();
22922 # if (alpha != 255) {
22923 # result.setAlpha(
22924 # FloatValue
22925 # .newBuilder()
22926 # .setValue(((float) alpha) / denominator)
22927 # .build());
22928 # }
22929 # return resultBuilder.build();
22930 # }
22931 # // ...
22932 #
22933 # Example (iOS / Obj-C):
22934 #
22935 # // ...
22936 # static UIColor* fromProto(Color* protocolor) {
22937 # float red = [protocolor red];
22938 # float green = [protocolor green];
22939 # float blue = [protocolor blue];
22940 # FloatValue* alpha_wrapper = [protocolor alpha];
22941 # float alpha = 1.0;
22942 # if (alpha_wrapper != nil) {
22943 # alpha = [alpha_wrapper value];
22944 # }
22945 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22946 # }
22947 #
22948 # static Color* toProto(UIColor* color) {
22949 # CGFloat red, green, blue, alpha;
22950 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22951 # return nil;
22952 # }
22953 # Color* result = [Color alloc] init];
22954 # [result setRed:red];
22955 # [result setGreen:green];
22956 # [result setBlue:blue];
22957 # if (alpha <= 0.9999) {
22958 # [result setAlpha:floatWrapperWithValue(alpha)];
22959 # }
22960 # [result autorelease];
22961 # return result;
22962 # }
22963 # // ...
22964 #
22965 # Example (JavaScript):
22966 #
22967 # // ...
22968 #
22969 # var protoToCssColor = function(rgb_color) {
22970 # var redFrac = rgb_color.red || 0.0;
22971 # var greenFrac = rgb_color.green || 0.0;
22972 # var blueFrac = rgb_color.blue || 0.0;
22973 # var red = Math.floor(redFrac * 255);
22974 # var green = Math.floor(greenFrac * 255);
22975 # var blue = Math.floor(blueFrac * 255);
22976 #
22977 # if (!('alpha' in rgb_color)) {
22978 # return rgbToCssColor_(red, green, blue);
22979 # }
22980 #
22981 # var alphaFrac = rgb_color.alpha.value || 0.0;
22982 # var rgbParams = [red, green, blue].join(',');
22983 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22984 # };
22985 #
22986 # var rgbToCssColor_ = function(red, green, blue) {
22987 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22988 # var hexString = rgbNumber.toString(16);
22989 # var missingZeros = 6 - hexString.length;
22990 # var resultBuilder = ['#'];
22991 # for (var i = 0; i < missingZeros; i++) {
22992 # resultBuilder.push('0');
22993 # }
22994 # resultBuilder.push(hexString);
22995 # return resultBuilder.join('');
22996 # };
22997 #
22998 # // ...
22999 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23000 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23001 # the final pixel color is defined by the equation:
23002 #
23003 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23004 #
23005 # This means that a value of 1.0 corresponds to a solid color, whereas
23006 # a value of 0.0 corresponds to a completely transparent color. This
23007 # uses a wrapper message rather than a simple float scalar so that it is
23008 # possible to distinguish between a default value and the value being unset.
23009 # If omitted, this color object is to be rendered as a solid color
23010 # (as if the alpha value had been explicitly given with a value of 1.0).
23011 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23012 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23013 },
23014 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023015 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023016 "style": "A String", # The style of the border.
23017 },
23018 "right": { # A border along a cell. # The right border of the cell.
23019 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23020 # for simplicity of conversion to/from color representations in various
23021 # languages over compactness; for example, the fields of this representation
23022 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23023 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23024 # method in iOS; and, with just a little work, it can be easily formatted into
23025 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23026 #
23027 # Example (Java):
23028 #
23029 # import com.google.type.Color;
23030 #
23031 # // ...
23032 # public static java.awt.Color fromProto(Color protocolor) {
23033 # float alpha = protocolor.hasAlpha()
23034 # ? protocolor.getAlpha().getValue()
23035 # : 1.0;
23036 #
23037 # return new java.awt.Color(
23038 # protocolor.getRed(),
23039 # protocolor.getGreen(),
23040 # protocolor.getBlue(),
23041 # alpha);
23042 # }
23043 #
23044 # public static Color toProto(java.awt.Color color) {
23045 # float red = (float) color.getRed();
23046 # float green = (float) color.getGreen();
23047 # float blue = (float) color.getBlue();
23048 # float denominator = 255.0;
23049 # Color.Builder resultBuilder =
23050 # Color
23051 # .newBuilder()
23052 # .setRed(red / denominator)
23053 # .setGreen(green / denominator)
23054 # .setBlue(blue / denominator);
23055 # int alpha = color.getAlpha();
23056 # if (alpha != 255) {
23057 # result.setAlpha(
23058 # FloatValue
23059 # .newBuilder()
23060 # .setValue(((float) alpha) / denominator)
23061 # .build());
23062 # }
23063 # return resultBuilder.build();
23064 # }
23065 # // ...
23066 #
23067 # Example (iOS / Obj-C):
23068 #
23069 # // ...
23070 # static UIColor* fromProto(Color* protocolor) {
23071 # float red = [protocolor red];
23072 # float green = [protocolor green];
23073 # float blue = [protocolor blue];
23074 # FloatValue* alpha_wrapper = [protocolor alpha];
23075 # float alpha = 1.0;
23076 # if (alpha_wrapper != nil) {
23077 # alpha = [alpha_wrapper value];
23078 # }
23079 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23080 # }
23081 #
23082 # static Color* toProto(UIColor* color) {
23083 # CGFloat red, green, blue, alpha;
23084 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23085 # return nil;
23086 # }
23087 # Color* result = [Color alloc] init];
23088 # [result setRed:red];
23089 # [result setGreen:green];
23090 # [result setBlue:blue];
23091 # if (alpha <= 0.9999) {
23092 # [result setAlpha:floatWrapperWithValue(alpha)];
23093 # }
23094 # [result autorelease];
23095 # return result;
23096 # }
23097 # // ...
23098 #
23099 # Example (JavaScript):
23100 #
23101 # // ...
23102 #
23103 # var protoToCssColor = function(rgb_color) {
23104 # var redFrac = rgb_color.red || 0.0;
23105 # var greenFrac = rgb_color.green || 0.0;
23106 # var blueFrac = rgb_color.blue || 0.0;
23107 # var red = Math.floor(redFrac * 255);
23108 # var green = Math.floor(greenFrac * 255);
23109 # var blue = Math.floor(blueFrac * 255);
23110 #
23111 # if (!('alpha' in rgb_color)) {
23112 # return rgbToCssColor_(red, green, blue);
23113 # }
23114 #
23115 # var alphaFrac = rgb_color.alpha.value || 0.0;
23116 # var rgbParams = [red, green, blue].join(',');
23117 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23118 # };
23119 #
23120 # var rgbToCssColor_ = function(red, green, blue) {
23121 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23122 # var hexString = rgbNumber.toString(16);
23123 # var missingZeros = 6 - hexString.length;
23124 # var resultBuilder = ['#'];
23125 # for (var i = 0; i < missingZeros; i++) {
23126 # resultBuilder.push('0');
23127 # }
23128 # resultBuilder.push(hexString);
23129 # return resultBuilder.join('');
23130 # };
23131 #
23132 # // ...
23133 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23134 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23135 # the final pixel color is defined by the equation:
23136 #
23137 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23138 #
23139 # This means that a value of 1.0 corresponds to a solid color, whereas
23140 # a value of 0.0 corresponds to a completely transparent color. This
23141 # uses a wrapper message rather than a simple float scalar so that it is
23142 # possible to distinguish between a default value and the value being unset.
23143 # If omitted, this color object is to be rendered as a solid color
23144 # (as if the alpha value had been explicitly given with a value of 1.0).
23145 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23146 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23147 },
23148 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023149 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023150 "style": "A String", # The style of the border.
23151 },
23152 "bottom": { # A border along a cell. # The bottom border of the cell.
23153 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23154 # for simplicity of conversion to/from color representations in various
23155 # languages over compactness; for example, the fields of this representation
23156 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23157 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23158 # method in iOS; and, with just a little work, it can be easily formatted into
23159 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23160 #
23161 # Example (Java):
23162 #
23163 # import com.google.type.Color;
23164 #
23165 # // ...
23166 # public static java.awt.Color fromProto(Color protocolor) {
23167 # float alpha = protocolor.hasAlpha()
23168 # ? protocolor.getAlpha().getValue()
23169 # : 1.0;
23170 #
23171 # return new java.awt.Color(
23172 # protocolor.getRed(),
23173 # protocolor.getGreen(),
23174 # protocolor.getBlue(),
23175 # alpha);
23176 # }
23177 #
23178 # public static Color toProto(java.awt.Color color) {
23179 # float red = (float) color.getRed();
23180 # float green = (float) color.getGreen();
23181 # float blue = (float) color.getBlue();
23182 # float denominator = 255.0;
23183 # Color.Builder resultBuilder =
23184 # Color
23185 # .newBuilder()
23186 # .setRed(red / denominator)
23187 # .setGreen(green / denominator)
23188 # .setBlue(blue / denominator);
23189 # int alpha = color.getAlpha();
23190 # if (alpha != 255) {
23191 # result.setAlpha(
23192 # FloatValue
23193 # .newBuilder()
23194 # .setValue(((float) alpha) / denominator)
23195 # .build());
23196 # }
23197 # return resultBuilder.build();
23198 # }
23199 # // ...
23200 #
23201 # Example (iOS / Obj-C):
23202 #
23203 # // ...
23204 # static UIColor* fromProto(Color* protocolor) {
23205 # float red = [protocolor red];
23206 # float green = [protocolor green];
23207 # float blue = [protocolor blue];
23208 # FloatValue* alpha_wrapper = [protocolor alpha];
23209 # float alpha = 1.0;
23210 # if (alpha_wrapper != nil) {
23211 # alpha = [alpha_wrapper value];
23212 # }
23213 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23214 # }
23215 #
23216 # static Color* toProto(UIColor* color) {
23217 # CGFloat red, green, blue, alpha;
23218 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23219 # return nil;
23220 # }
23221 # Color* result = [Color alloc] init];
23222 # [result setRed:red];
23223 # [result setGreen:green];
23224 # [result setBlue:blue];
23225 # if (alpha <= 0.9999) {
23226 # [result setAlpha:floatWrapperWithValue(alpha)];
23227 # }
23228 # [result autorelease];
23229 # return result;
23230 # }
23231 # // ...
23232 #
23233 # Example (JavaScript):
23234 #
23235 # // ...
23236 #
23237 # var protoToCssColor = function(rgb_color) {
23238 # var redFrac = rgb_color.red || 0.0;
23239 # var greenFrac = rgb_color.green || 0.0;
23240 # var blueFrac = rgb_color.blue || 0.0;
23241 # var red = Math.floor(redFrac * 255);
23242 # var green = Math.floor(greenFrac * 255);
23243 # var blue = Math.floor(blueFrac * 255);
23244 #
23245 # if (!('alpha' in rgb_color)) {
23246 # return rgbToCssColor_(red, green, blue);
23247 # }
23248 #
23249 # var alphaFrac = rgb_color.alpha.value || 0.0;
23250 # var rgbParams = [red, green, blue].join(',');
23251 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23252 # };
23253 #
23254 # var rgbToCssColor_ = function(red, green, blue) {
23255 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23256 # var hexString = rgbNumber.toString(16);
23257 # var missingZeros = 6 - hexString.length;
23258 # var resultBuilder = ['#'];
23259 # for (var i = 0; i < missingZeros; i++) {
23260 # resultBuilder.push('0');
23261 # }
23262 # resultBuilder.push(hexString);
23263 # return resultBuilder.join('');
23264 # };
23265 #
23266 # // ...
23267 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23268 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23269 # the final pixel color is defined by the equation:
23270 #
23271 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23272 #
23273 # This means that a value of 1.0 corresponds to a solid color, whereas
23274 # a value of 0.0 corresponds to a completely transparent color. This
23275 # uses a wrapper message rather than a simple float scalar so that it is
23276 # possible to distinguish between a default value and the value being unset.
23277 # If omitted, this color object is to be rendered as a solid color
23278 # (as if the alpha value had been explicitly given with a value of 1.0).
23279 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23280 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23281 },
23282 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023283 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023284 "style": "A String", # The style of the border.
23285 },
23286 "left": { # A border along a cell. # The left border of the cell.
23287 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23288 # for simplicity of conversion to/from color representations in various
23289 # languages over compactness; for example, the fields of this representation
23290 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23291 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23292 # method in iOS; and, with just a little work, it can be easily formatted into
23293 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23294 #
23295 # Example (Java):
23296 #
23297 # import com.google.type.Color;
23298 #
23299 # // ...
23300 # public static java.awt.Color fromProto(Color protocolor) {
23301 # float alpha = protocolor.hasAlpha()
23302 # ? protocolor.getAlpha().getValue()
23303 # : 1.0;
23304 #
23305 # return new java.awt.Color(
23306 # protocolor.getRed(),
23307 # protocolor.getGreen(),
23308 # protocolor.getBlue(),
23309 # alpha);
23310 # }
23311 #
23312 # public static Color toProto(java.awt.Color color) {
23313 # float red = (float) color.getRed();
23314 # float green = (float) color.getGreen();
23315 # float blue = (float) color.getBlue();
23316 # float denominator = 255.0;
23317 # Color.Builder resultBuilder =
23318 # Color
23319 # .newBuilder()
23320 # .setRed(red / denominator)
23321 # .setGreen(green / denominator)
23322 # .setBlue(blue / denominator);
23323 # int alpha = color.getAlpha();
23324 # if (alpha != 255) {
23325 # result.setAlpha(
23326 # FloatValue
23327 # .newBuilder()
23328 # .setValue(((float) alpha) / denominator)
23329 # .build());
23330 # }
23331 # return resultBuilder.build();
23332 # }
23333 # // ...
23334 #
23335 # Example (iOS / Obj-C):
23336 #
23337 # // ...
23338 # static UIColor* fromProto(Color* protocolor) {
23339 # float red = [protocolor red];
23340 # float green = [protocolor green];
23341 # float blue = [protocolor blue];
23342 # FloatValue* alpha_wrapper = [protocolor alpha];
23343 # float alpha = 1.0;
23344 # if (alpha_wrapper != nil) {
23345 # alpha = [alpha_wrapper value];
23346 # }
23347 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23348 # }
23349 #
23350 # static Color* toProto(UIColor* color) {
23351 # CGFloat red, green, blue, alpha;
23352 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23353 # return nil;
23354 # }
23355 # Color* result = [Color alloc] init];
23356 # [result setRed:red];
23357 # [result setGreen:green];
23358 # [result setBlue:blue];
23359 # if (alpha <= 0.9999) {
23360 # [result setAlpha:floatWrapperWithValue(alpha)];
23361 # }
23362 # [result autorelease];
23363 # return result;
23364 # }
23365 # // ...
23366 #
23367 # Example (JavaScript):
23368 #
23369 # // ...
23370 #
23371 # var protoToCssColor = function(rgb_color) {
23372 # var redFrac = rgb_color.red || 0.0;
23373 # var greenFrac = rgb_color.green || 0.0;
23374 # var blueFrac = rgb_color.blue || 0.0;
23375 # var red = Math.floor(redFrac * 255);
23376 # var green = Math.floor(greenFrac * 255);
23377 # var blue = Math.floor(blueFrac * 255);
23378 #
23379 # if (!('alpha' in rgb_color)) {
23380 # return rgbToCssColor_(red, green, blue);
23381 # }
23382 #
23383 # var alphaFrac = rgb_color.alpha.value || 0.0;
23384 # var rgbParams = [red, green, blue].join(',');
23385 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23386 # };
23387 #
23388 # var rgbToCssColor_ = function(red, green, blue) {
23389 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23390 # var hexString = rgbNumber.toString(16);
23391 # var missingZeros = 6 - hexString.length;
23392 # var resultBuilder = ['#'];
23393 # for (var i = 0; i < missingZeros; i++) {
23394 # resultBuilder.push('0');
23395 # }
23396 # resultBuilder.push(hexString);
23397 # return resultBuilder.join('');
23398 # };
23399 #
23400 # // ...
23401 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23402 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23403 # the final pixel color is defined by the equation:
23404 #
23405 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23406 #
23407 # This means that a value of 1.0 corresponds to a solid color, whereas
23408 # a value of 0.0 corresponds to a completely transparent color. This
23409 # uses a wrapper message rather than a simple float scalar so that it is
23410 # possible to distinguish between a default value and the value being unset.
23411 # If omitted, this color object is to be rendered as a solid color
23412 # (as if the alpha value had been explicitly given with a value of 1.0).
23413 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23414 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23415 },
23416 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023417 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023418 "style": "A String", # The style of the border.
23419 },
23420 },
23421 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
23422 },
23423 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
23424 #
23425 # When writing, the new data validation rule will overwrite any prior rule.
23426 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
23427 # If true, "List" conditions will show a dropdown.
23428 "strict": True or False, # True if invalid data should be rejected.
23429 "inputMessage": "A String", # A message to show the user when adding data to the cell.
23430 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
23431 # BooleanConditions are used by conditional formatting,
23432 # data validation, and the criteria in filters.
23433 "type": "A String", # The type of condition.
23434 "values": [ # The values of the condition. The number of supported values depends
23435 # on the condition type. Some support zero values,
23436 # others one or two values,
23437 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
23438 { # The value of the condition.
23439 "relativeDate": "A String", # A relative date (based on the current date).
23440 # Valid only if the type is
23441 # DATE_BEFORE,
23442 # DATE_AFTER,
23443 # DATE_ON_OR_BEFORE or
23444 # DATE_ON_OR_AFTER.
23445 #
23446 # Relative dates are not supported in data validation.
23447 # They are supported only in conditional formatting and
23448 # conditional filters.
23449 "userEnteredValue": "A String", # A value the condition is based on.
23450 # The value will be parsed as if the user typed into a cell.
23451 # Formulas are supported (and must begin with an `=`).
23452 },
23453 ],
23454 },
23455 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023456 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
23457 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023458 # Runs start at specific indexes in the text and continue until the next
23459 # run. Properties of a run will continue unless explicitly changed
23460 # in a subsequent run (and properties of the first run will continue
23461 # the properties of the cell unless explicitly changed).
23462 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023463 # When writing, the new runs will overwrite any prior runs. When writing a
23464 # new user_entered_value, previous runs will be erased.
23465 { # A run of a text format. The format of this run continues until the start
23466 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023467 # When updating, all fields must be set.
23468 "startIndex": 42, # The character index where this run starts.
23469 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
23470 # Absent values indicate that the field isn't specified.
23471 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
23472 # for simplicity of conversion to/from color representations in various
23473 # languages over compactness; for example, the fields of this representation
23474 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23475 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23476 # method in iOS; and, with just a little work, it can be easily formatted into
23477 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23478 #
23479 # Example (Java):
23480 #
23481 # import com.google.type.Color;
23482 #
23483 # // ...
23484 # public static java.awt.Color fromProto(Color protocolor) {
23485 # float alpha = protocolor.hasAlpha()
23486 # ? protocolor.getAlpha().getValue()
23487 # : 1.0;
23488 #
23489 # return new java.awt.Color(
23490 # protocolor.getRed(),
23491 # protocolor.getGreen(),
23492 # protocolor.getBlue(),
23493 # alpha);
23494 # }
23495 #
23496 # public static Color toProto(java.awt.Color color) {
23497 # float red = (float) color.getRed();
23498 # float green = (float) color.getGreen();
23499 # float blue = (float) color.getBlue();
23500 # float denominator = 255.0;
23501 # Color.Builder resultBuilder =
23502 # Color
23503 # .newBuilder()
23504 # .setRed(red / denominator)
23505 # .setGreen(green / denominator)
23506 # .setBlue(blue / denominator);
23507 # int alpha = color.getAlpha();
23508 # if (alpha != 255) {
23509 # result.setAlpha(
23510 # FloatValue
23511 # .newBuilder()
23512 # .setValue(((float) alpha) / denominator)
23513 # .build());
23514 # }
23515 # return resultBuilder.build();
23516 # }
23517 # // ...
23518 #
23519 # Example (iOS / Obj-C):
23520 #
23521 # // ...
23522 # static UIColor* fromProto(Color* protocolor) {
23523 # float red = [protocolor red];
23524 # float green = [protocolor green];
23525 # float blue = [protocolor blue];
23526 # FloatValue* alpha_wrapper = [protocolor alpha];
23527 # float alpha = 1.0;
23528 # if (alpha_wrapper != nil) {
23529 # alpha = [alpha_wrapper value];
23530 # }
23531 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23532 # }
23533 #
23534 # static Color* toProto(UIColor* color) {
23535 # CGFloat red, green, blue, alpha;
23536 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23537 # return nil;
23538 # }
23539 # Color* result = [Color alloc] init];
23540 # [result setRed:red];
23541 # [result setGreen:green];
23542 # [result setBlue:blue];
23543 # if (alpha <= 0.9999) {
23544 # [result setAlpha:floatWrapperWithValue(alpha)];
23545 # }
23546 # [result autorelease];
23547 # return result;
23548 # }
23549 # // ...
23550 #
23551 # Example (JavaScript):
23552 #
23553 # // ...
23554 #
23555 # var protoToCssColor = function(rgb_color) {
23556 # var redFrac = rgb_color.red || 0.0;
23557 # var greenFrac = rgb_color.green || 0.0;
23558 # var blueFrac = rgb_color.blue || 0.0;
23559 # var red = Math.floor(redFrac * 255);
23560 # var green = Math.floor(greenFrac * 255);
23561 # var blue = Math.floor(blueFrac * 255);
23562 #
23563 # if (!('alpha' in rgb_color)) {
23564 # return rgbToCssColor_(red, green, blue);
23565 # }
23566 #
23567 # var alphaFrac = rgb_color.alpha.value || 0.0;
23568 # var rgbParams = [red, green, blue].join(',');
23569 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23570 # };
23571 #
23572 # var rgbToCssColor_ = function(red, green, blue) {
23573 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23574 # var hexString = rgbNumber.toString(16);
23575 # var missingZeros = 6 - hexString.length;
23576 # var resultBuilder = ['#'];
23577 # for (var i = 0; i < missingZeros; i++) {
23578 # resultBuilder.push('0');
23579 # }
23580 # resultBuilder.push(hexString);
23581 # return resultBuilder.join('');
23582 # };
23583 #
23584 # // ...
23585 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23586 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23587 # the final pixel color is defined by the equation:
23588 #
23589 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23590 #
23591 # This means that a value of 1.0 corresponds to a solid color, whereas
23592 # a value of 0.0 corresponds to a completely transparent color. This
23593 # uses a wrapper message rather than a simple float scalar so that it is
23594 # possible to distinguish between a default value and the value being unset.
23595 # If omitted, this color object is to be rendered as a solid color
23596 # (as if the alpha value had been explicitly given with a value of 1.0).
23597 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23598 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23599 },
23600 "bold": True or False, # True if the text is bold.
23601 "strikethrough": True or False, # True if the text has a strikethrough.
23602 "fontFamily": "A String", # The font family.
23603 "fontSize": 42, # The size of the font.
23604 "italic": True or False, # True if the text is italicized.
23605 "underline": True or False, # True if the text is underlined.
23606 },
23607 },
23608 ],
23609 },
23610 ],
23611 },
23612 ],
23613 },
23614 ],
23615 "properties": { # Properties of a sheet. # The properties of the sheet.
23616 "sheetType": "A String", # The type of sheet. Defaults to GRID.
23617 # This field cannot be changed once set.
23618 "index": 42, # The index of the sheet within the spreadsheet.
23619 # When adding or updating sheet properties, if this field
23620 # is excluded then the sheet will be added or moved to the end
23621 # of the sheet list.
23622 "title": "A String", # The name of the sheet.
23623 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
23624 # (If the sheet is an object sheet, containing a chart or image, then
23625 # this field will be absent.)
23626 # When writing it is an error to set any grid properties on non-grid sheets.
23627 "columnCount": 42, # The number of columns in the grid.
23628 "rowCount": 42, # The number of rows in the grid.
23629 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
23630 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
23631 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
23632 },
23633 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
23634 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
23635 # for simplicity of conversion to/from color representations in various
23636 # languages over compactness; for example, the fields of this representation
23637 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23638 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23639 # method in iOS; and, with just a little work, it can be easily formatted into
23640 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23641 #
23642 # Example (Java):
23643 #
23644 # import com.google.type.Color;
23645 #
23646 # // ...
23647 # public static java.awt.Color fromProto(Color protocolor) {
23648 # float alpha = protocolor.hasAlpha()
23649 # ? protocolor.getAlpha().getValue()
23650 # : 1.0;
23651 #
23652 # return new java.awt.Color(
23653 # protocolor.getRed(),
23654 # protocolor.getGreen(),
23655 # protocolor.getBlue(),
23656 # alpha);
23657 # }
23658 #
23659 # public static Color toProto(java.awt.Color color) {
23660 # float red = (float) color.getRed();
23661 # float green = (float) color.getGreen();
23662 # float blue = (float) color.getBlue();
23663 # float denominator = 255.0;
23664 # Color.Builder resultBuilder =
23665 # Color
23666 # .newBuilder()
23667 # .setRed(red / denominator)
23668 # .setGreen(green / denominator)
23669 # .setBlue(blue / denominator);
23670 # int alpha = color.getAlpha();
23671 # if (alpha != 255) {
23672 # result.setAlpha(
23673 # FloatValue
23674 # .newBuilder()
23675 # .setValue(((float) alpha) / denominator)
23676 # .build());
23677 # }
23678 # return resultBuilder.build();
23679 # }
23680 # // ...
23681 #
23682 # Example (iOS / Obj-C):
23683 #
23684 # // ...
23685 # static UIColor* fromProto(Color* protocolor) {
23686 # float red = [protocolor red];
23687 # float green = [protocolor green];
23688 # float blue = [protocolor blue];
23689 # FloatValue* alpha_wrapper = [protocolor alpha];
23690 # float alpha = 1.0;
23691 # if (alpha_wrapper != nil) {
23692 # alpha = [alpha_wrapper value];
23693 # }
23694 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23695 # }
23696 #
23697 # static Color* toProto(UIColor* color) {
23698 # CGFloat red, green, blue, alpha;
23699 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23700 # return nil;
23701 # }
23702 # Color* result = [Color alloc] init];
23703 # [result setRed:red];
23704 # [result setGreen:green];
23705 # [result setBlue:blue];
23706 # if (alpha <= 0.9999) {
23707 # [result setAlpha:floatWrapperWithValue(alpha)];
23708 # }
23709 # [result autorelease];
23710 # return result;
23711 # }
23712 # // ...
23713 #
23714 # Example (JavaScript):
23715 #
23716 # // ...
23717 #
23718 # var protoToCssColor = function(rgb_color) {
23719 # var redFrac = rgb_color.red || 0.0;
23720 # var greenFrac = rgb_color.green || 0.0;
23721 # var blueFrac = rgb_color.blue || 0.0;
23722 # var red = Math.floor(redFrac * 255);
23723 # var green = Math.floor(greenFrac * 255);
23724 # var blue = Math.floor(blueFrac * 255);
23725 #
23726 # if (!('alpha' in rgb_color)) {
23727 # return rgbToCssColor_(red, green, blue);
23728 # }
23729 #
23730 # var alphaFrac = rgb_color.alpha.value || 0.0;
23731 # var rgbParams = [red, green, blue].join(',');
23732 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23733 # };
23734 #
23735 # var rgbToCssColor_ = function(red, green, blue) {
23736 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23737 # var hexString = rgbNumber.toString(16);
23738 # var missingZeros = 6 - hexString.length;
23739 # var resultBuilder = ['#'];
23740 # for (var i = 0; i < missingZeros; i++) {
23741 # resultBuilder.push('0');
23742 # }
23743 # resultBuilder.push(hexString);
23744 # return resultBuilder.join('');
23745 # };
23746 #
23747 # // ...
23748 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23749 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23750 # the final pixel color is defined by the equation:
23751 #
23752 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23753 #
23754 # This means that a value of 1.0 corresponds to a solid color, whereas
23755 # a value of 0.0 corresponds to a completely transparent color. This
23756 # uses a wrapper message rather than a simple float scalar so that it is
23757 # possible to distinguish between a default value and the value being unset.
23758 # If omitted, this color object is to be rendered as a solid color
23759 # (as if the alpha value had been explicitly given with a value of 1.0).
23760 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23761 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23762 },
23763 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
23764 "sheetId": 42, # The ID of the sheet. Must be non-negative.
23765 # This field cannot be changed once set.
23766 },
23767 },
23768 ],
23769 }
23770
23771 x__xgafv: string, V1 error format.
23772 Allowed values
23773 1 - v1 error format
23774 2 - v2 error format
23775
23776Returns:
23777 An object of the form:
23778
23779 { # Resource that represents a spreadsheet.
23780 "spreadsheetId": "A String", # The ID of the spreadsheet.
23781 # This field is read-only.
23782 "namedRanges": [ # The named ranges defined in a spreadsheet.
23783 { # A named range.
23784 "namedRangeId": "A String", # The ID of the named range.
23785 "range": { # A range on a sheet. # The range this represents.
23786 # All indexes are zero-based.
23787 # Indexes are half open, e.g the start index is inclusive
23788 # and the end index is exclusive -- [start_index, end_index).
23789 # Missing indexes indicate the range is unbounded on that side.
23790 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023791 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023792 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023793 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023794 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023795 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023796 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023797 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023798 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023799 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023800 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023801 # `Sheet1!A:B == sheet_id: 0,
23802 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023803 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023804 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023805 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023806 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023807 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023808 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023809 #
23810 # The start index must always be less than or equal to the end index.
23811 # If the start index equals the end index, then the range is empty.
23812 # Empty ranges are typically not meaningful and are usually rendered in the
23813 # UI as `#REF!`.
23814 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
23815 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
23816 "sheetId": 42, # The sheet this range is on.
23817 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
23818 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
23819 },
23820 "name": "A String", # The name of the named range.
23821 },
23822 ],
23823 "properties": { # Properties of a spreadsheet. # Overall properties of a spreadsheet.
23824 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023825 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023826 # * an ISO 639-1 language code such as `en`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023827 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023828 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023829 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023830 # * a combination of the ISO language code and country code, such as `en_US`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023831 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023832 # Note: when updating this field, not all locales/languages are supported.
23833 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
23834 # `America/New_York`. If the time zone isn't recognized, this may
23835 # be a custom time zone such as `GMT-07:00`.
23836 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
23837 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023838 # CellData.effectiveFormat will not be set if the
23839 # cell's format is equal to this default format.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023840 # This field is read-only.
23841 "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 -070023842 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
23843 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070023844 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
23845 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023846 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023847 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023848 },
23849 "textDirection": "A String", # The direction of the text in the cell.
23850 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
23851 # When updating padding, every field must be specified.
23852 "top": 42, # The top padding of the cell.
23853 "right": 42, # The right padding of the cell.
23854 "bottom": 42, # The bottom padding of the cell.
23855 "left": 42, # The left padding of the cell.
23856 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023857 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023858 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
23859 # for simplicity of conversion to/from color representations in various
23860 # languages over compactness; for example, the fields of this representation
23861 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23862 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23863 # method in iOS; and, with just a little work, it can be easily formatted into
23864 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23865 #
23866 # Example (Java):
23867 #
23868 # import com.google.type.Color;
23869 #
23870 # // ...
23871 # public static java.awt.Color fromProto(Color protocolor) {
23872 # float alpha = protocolor.hasAlpha()
23873 # ? protocolor.getAlpha().getValue()
23874 # : 1.0;
23875 #
23876 # return new java.awt.Color(
23877 # protocolor.getRed(),
23878 # protocolor.getGreen(),
23879 # protocolor.getBlue(),
23880 # alpha);
23881 # }
23882 #
23883 # public static Color toProto(java.awt.Color color) {
23884 # float red = (float) color.getRed();
23885 # float green = (float) color.getGreen();
23886 # float blue = (float) color.getBlue();
23887 # float denominator = 255.0;
23888 # Color.Builder resultBuilder =
23889 # Color
23890 # .newBuilder()
23891 # .setRed(red / denominator)
23892 # .setGreen(green / denominator)
23893 # .setBlue(blue / denominator);
23894 # int alpha = color.getAlpha();
23895 # if (alpha != 255) {
23896 # result.setAlpha(
23897 # FloatValue
23898 # .newBuilder()
23899 # .setValue(((float) alpha) / denominator)
23900 # .build());
23901 # }
23902 # return resultBuilder.build();
23903 # }
23904 # // ...
23905 #
23906 # Example (iOS / Obj-C):
23907 #
23908 # // ...
23909 # static UIColor* fromProto(Color* protocolor) {
23910 # float red = [protocolor red];
23911 # float green = [protocolor green];
23912 # float blue = [protocolor blue];
23913 # FloatValue* alpha_wrapper = [protocolor alpha];
23914 # float alpha = 1.0;
23915 # if (alpha_wrapper != nil) {
23916 # alpha = [alpha_wrapper value];
23917 # }
23918 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23919 # }
23920 #
23921 # static Color* toProto(UIColor* color) {
23922 # CGFloat red, green, blue, alpha;
23923 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23924 # return nil;
23925 # }
23926 # Color* result = [Color alloc] init];
23927 # [result setRed:red];
23928 # [result setGreen:green];
23929 # [result setBlue:blue];
23930 # if (alpha <= 0.9999) {
23931 # [result setAlpha:floatWrapperWithValue(alpha)];
23932 # }
23933 # [result autorelease];
23934 # return result;
23935 # }
23936 # // ...
23937 #
23938 # Example (JavaScript):
23939 #
23940 # // ...
23941 #
23942 # var protoToCssColor = function(rgb_color) {
23943 # var redFrac = rgb_color.red || 0.0;
23944 # var greenFrac = rgb_color.green || 0.0;
23945 # var blueFrac = rgb_color.blue || 0.0;
23946 # var red = Math.floor(redFrac * 255);
23947 # var green = Math.floor(greenFrac * 255);
23948 # var blue = Math.floor(blueFrac * 255);
23949 #
23950 # if (!('alpha' in rgb_color)) {
23951 # return rgbToCssColor_(red, green, blue);
23952 # }
23953 #
23954 # var alphaFrac = rgb_color.alpha.value || 0.0;
23955 # var rgbParams = [red, green, blue].join(',');
23956 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23957 # };
23958 #
23959 # var rgbToCssColor_ = function(red, green, blue) {
23960 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23961 # var hexString = rgbNumber.toString(16);
23962 # var missingZeros = 6 - hexString.length;
23963 # var resultBuilder = ['#'];
23964 # for (var i = 0; i < missingZeros; i++) {
23965 # resultBuilder.push('0');
23966 # }
23967 # resultBuilder.push(hexString);
23968 # return resultBuilder.join('');
23969 # };
23970 #
23971 # // ...
23972 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23973 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23974 # the final pixel color is defined by the equation:
23975 #
23976 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23977 #
23978 # This means that a value of 1.0 corresponds to a solid color, whereas
23979 # a value of 0.0 corresponds to a completely transparent color. This
23980 # uses a wrapper message rather than a simple float scalar so that it is
23981 # possible to distinguish between a default value and the value being unset.
23982 # If omitted, this color object is to be rendered as a solid color
23983 # (as if the alpha value had been explicitly given with a value of 1.0).
23984 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23985 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23986 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023987 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023988 "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).
23989 # Absent values indicate that the field isn't specified.
23990 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
23991 # for simplicity of conversion to/from color representations in various
23992 # languages over compactness; for example, the fields of this representation
23993 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23994 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23995 # method in iOS; and, with just a little work, it can be easily formatted into
23996 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23997 #
23998 # Example (Java):
23999 #
24000 # import com.google.type.Color;
24001 #
24002 # // ...
24003 # public static java.awt.Color fromProto(Color protocolor) {
24004 # float alpha = protocolor.hasAlpha()
24005 # ? protocolor.getAlpha().getValue()
24006 # : 1.0;
24007 #
24008 # return new java.awt.Color(
24009 # protocolor.getRed(),
24010 # protocolor.getGreen(),
24011 # protocolor.getBlue(),
24012 # alpha);
24013 # }
24014 #
24015 # public static Color toProto(java.awt.Color color) {
24016 # float red = (float) color.getRed();
24017 # float green = (float) color.getGreen();
24018 # float blue = (float) color.getBlue();
24019 # float denominator = 255.0;
24020 # Color.Builder resultBuilder =
24021 # Color
24022 # .newBuilder()
24023 # .setRed(red / denominator)
24024 # .setGreen(green / denominator)
24025 # .setBlue(blue / denominator);
24026 # int alpha = color.getAlpha();
24027 # if (alpha != 255) {
24028 # result.setAlpha(
24029 # FloatValue
24030 # .newBuilder()
24031 # .setValue(((float) alpha) / denominator)
24032 # .build());
24033 # }
24034 # return resultBuilder.build();
24035 # }
24036 # // ...
24037 #
24038 # Example (iOS / Obj-C):
24039 #
24040 # // ...
24041 # static UIColor* fromProto(Color* protocolor) {
24042 # float red = [protocolor red];
24043 # float green = [protocolor green];
24044 # float blue = [protocolor blue];
24045 # FloatValue* alpha_wrapper = [protocolor alpha];
24046 # float alpha = 1.0;
24047 # if (alpha_wrapper != nil) {
24048 # alpha = [alpha_wrapper value];
24049 # }
24050 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24051 # }
24052 #
24053 # static Color* toProto(UIColor* color) {
24054 # CGFloat red, green, blue, alpha;
24055 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24056 # return nil;
24057 # }
24058 # Color* result = [Color alloc] init];
24059 # [result setRed:red];
24060 # [result setGreen:green];
24061 # [result setBlue:blue];
24062 # if (alpha <= 0.9999) {
24063 # [result setAlpha:floatWrapperWithValue(alpha)];
24064 # }
24065 # [result autorelease];
24066 # return result;
24067 # }
24068 # // ...
24069 #
24070 # Example (JavaScript):
24071 #
24072 # // ...
24073 #
24074 # var protoToCssColor = function(rgb_color) {
24075 # var redFrac = rgb_color.red || 0.0;
24076 # var greenFrac = rgb_color.green || 0.0;
24077 # var blueFrac = rgb_color.blue || 0.0;
24078 # var red = Math.floor(redFrac * 255);
24079 # var green = Math.floor(greenFrac * 255);
24080 # var blue = Math.floor(blueFrac * 255);
24081 #
24082 # if (!('alpha' in rgb_color)) {
24083 # return rgbToCssColor_(red, green, blue);
24084 # }
24085 #
24086 # var alphaFrac = rgb_color.alpha.value || 0.0;
24087 # var rgbParams = [red, green, blue].join(',');
24088 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24089 # };
24090 #
24091 # var rgbToCssColor_ = function(red, green, blue) {
24092 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24093 # var hexString = rgbNumber.toString(16);
24094 # var missingZeros = 6 - hexString.length;
24095 # var resultBuilder = ['#'];
24096 # for (var i = 0; i < missingZeros; i++) {
24097 # resultBuilder.push('0');
24098 # }
24099 # resultBuilder.push(hexString);
24100 # return resultBuilder.join('');
24101 # };
24102 #
24103 # // ...
24104 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24105 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24106 # the final pixel color is defined by the equation:
24107 #
24108 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24109 #
24110 # This means that a value of 1.0 corresponds to a solid color, whereas
24111 # a value of 0.0 corresponds to a completely transparent color. This
24112 # uses a wrapper message rather than a simple float scalar so that it is
24113 # possible to distinguish between a default value and the value being unset.
24114 # If omitted, this color object is to be rendered as a solid color
24115 # (as if the alpha value had been explicitly given with a value of 1.0).
24116 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24117 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24118 },
24119 "bold": True or False, # True if the text is bold.
24120 "strikethrough": True or False, # True if the text has a strikethrough.
24121 "fontFamily": "A String", # The font family.
24122 "fontSize": 42, # The size of the font.
24123 "italic": True or False, # True if the text is italicized.
24124 "underline": True or False, # True if the text is underlined.
24125 },
24126 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
24127 "borders": { # The borders of the cell. # The borders of the cell.
24128 "top": { # A border along a cell. # The top border of the cell.
24129 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
24130 # for simplicity of conversion to/from color representations in various
24131 # languages over compactness; for example, the fields of this representation
24132 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24133 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24134 # method in iOS; and, with just a little work, it can be easily formatted into
24135 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24136 #
24137 # Example (Java):
24138 #
24139 # import com.google.type.Color;
24140 #
24141 # // ...
24142 # public static java.awt.Color fromProto(Color protocolor) {
24143 # float alpha = protocolor.hasAlpha()
24144 # ? protocolor.getAlpha().getValue()
24145 # : 1.0;
24146 #
24147 # return new java.awt.Color(
24148 # protocolor.getRed(),
24149 # protocolor.getGreen(),
24150 # protocolor.getBlue(),
24151 # alpha);
24152 # }
24153 #
24154 # public static Color toProto(java.awt.Color color) {
24155 # float red = (float) color.getRed();
24156 # float green = (float) color.getGreen();
24157 # float blue = (float) color.getBlue();
24158 # float denominator = 255.0;
24159 # Color.Builder resultBuilder =
24160 # Color
24161 # .newBuilder()
24162 # .setRed(red / denominator)
24163 # .setGreen(green / denominator)
24164 # .setBlue(blue / denominator);
24165 # int alpha = color.getAlpha();
24166 # if (alpha != 255) {
24167 # result.setAlpha(
24168 # FloatValue
24169 # .newBuilder()
24170 # .setValue(((float) alpha) / denominator)
24171 # .build());
24172 # }
24173 # return resultBuilder.build();
24174 # }
24175 # // ...
24176 #
24177 # Example (iOS / Obj-C):
24178 #
24179 # // ...
24180 # static UIColor* fromProto(Color* protocolor) {
24181 # float red = [protocolor red];
24182 # float green = [protocolor green];
24183 # float blue = [protocolor blue];
24184 # FloatValue* alpha_wrapper = [protocolor alpha];
24185 # float alpha = 1.0;
24186 # if (alpha_wrapper != nil) {
24187 # alpha = [alpha_wrapper value];
24188 # }
24189 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24190 # }
24191 #
24192 # static Color* toProto(UIColor* color) {
24193 # CGFloat red, green, blue, alpha;
24194 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24195 # return nil;
24196 # }
24197 # Color* result = [Color alloc] init];
24198 # [result setRed:red];
24199 # [result setGreen:green];
24200 # [result setBlue:blue];
24201 # if (alpha <= 0.9999) {
24202 # [result setAlpha:floatWrapperWithValue(alpha)];
24203 # }
24204 # [result autorelease];
24205 # return result;
24206 # }
24207 # // ...
24208 #
24209 # Example (JavaScript):
24210 #
24211 # // ...
24212 #
24213 # var protoToCssColor = function(rgb_color) {
24214 # var redFrac = rgb_color.red || 0.0;
24215 # var greenFrac = rgb_color.green || 0.0;
24216 # var blueFrac = rgb_color.blue || 0.0;
24217 # var red = Math.floor(redFrac * 255);
24218 # var green = Math.floor(greenFrac * 255);
24219 # var blue = Math.floor(blueFrac * 255);
24220 #
24221 # if (!('alpha' in rgb_color)) {
24222 # return rgbToCssColor_(red, green, blue);
24223 # }
24224 #
24225 # var alphaFrac = rgb_color.alpha.value || 0.0;
24226 # var rgbParams = [red, green, blue].join(',');
24227 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24228 # };
24229 #
24230 # var rgbToCssColor_ = function(red, green, blue) {
24231 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24232 # var hexString = rgbNumber.toString(16);
24233 # var missingZeros = 6 - hexString.length;
24234 # var resultBuilder = ['#'];
24235 # for (var i = 0; i < missingZeros; i++) {
24236 # resultBuilder.push('0');
24237 # }
24238 # resultBuilder.push(hexString);
24239 # return resultBuilder.join('');
24240 # };
24241 #
24242 # // ...
24243 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24244 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24245 # the final pixel color is defined by the equation:
24246 #
24247 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24248 #
24249 # This means that a value of 1.0 corresponds to a solid color, whereas
24250 # a value of 0.0 corresponds to a completely transparent color. This
24251 # uses a wrapper message rather than a simple float scalar so that it is
24252 # possible to distinguish between a default value and the value being unset.
24253 # If omitted, this color object is to be rendered as a solid color
24254 # (as if the alpha value had been explicitly given with a value of 1.0).
24255 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24256 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24257 },
24258 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024259 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024260 "style": "A String", # The style of the border.
24261 },
24262 "right": { # A border along a cell. # The right border of the cell.
24263 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
24264 # for simplicity of conversion to/from color representations in various
24265 # languages over compactness; for example, the fields of this representation
24266 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24267 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24268 # method in iOS; and, with just a little work, it can be easily formatted into
24269 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24270 #
24271 # Example (Java):
24272 #
24273 # import com.google.type.Color;
24274 #
24275 # // ...
24276 # public static java.awt.Color fromProto(Color protocolor) {
24277 # float alpha = protocolor.hasAlpha()
24278 # ? protocolor.getAlpha().getValue()
24279 # : 1.0;
24280 #
24281 # return new java.awt.Color(
24282 # protocolor.getRed(),
24283 # protocolor.getGreen(),
24284 # protocolor.getBlue(),
24285 # alpha);
24286 # }
24287 #
24288 # public static Color toProto(java.awt.Color color) {
24289 # float red = (float) color.getRed();
24290 # float green = (float) color.getGreen();
24291 # float blue = (float) color.getBlue();
24292 # float denominator = 255.0;
24293 # Color.Builder resultBuilder =
24294 # Color
24295 # .newBuilder()
24296 # .setRed(red / denominator)
24297 # .setGreen(green / denominator)
24298 # .setBlue(blue / denominator);
24299 # int alpha = color.getAlpha();
24300 # if (alpha != 255) {
24301 # result.setAlpha(
24302 # FloatValue
24303 # .newBuilder()
24304 # .setValue(((float) alpha) / denominator)
24305 # .build());
24306 # }
24307 # return resultBuilder.build();
24308 # }
24309 # // ...
24310 #
24311 # Example (iOS / Obj-C):
24312 #
24313 # // ...
24314 # static UIColor* fromProto(Color* protocolor) {
24315 # float red = [protocolor red];
24316 # float green = [protocolor green];
24317 # float blue = [protocolor blue];
24318 # FloatValue* alpha_wrapper = [protocolor alpha];
24319 # float alpha = 1.0;
24320 # if (alpha_wrapper != nil) {
24321 # alpha = [alpha_wrapper value];
24322 # }
24323 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24324 # }
24325 #
24326 # static Color* toProto(UIColor* color) {
24327 # CGFloat red, green, blue, alpha;
24328 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24329 # return nil;
24330 # }
24331 # Color* result = [Color alloc] init];
24332 # [result setRed:red];
24333 # [result setGreen:green];
24334 # [result setBlue:blue];
24335 # if (alpha <= 0.9999) {
24336 # [result setAlpha:floatWrapperWithValue(alpha)];
24337 # }
24338 # [result autorelease];
24339 # return result;
24340 # }
24341 # // ...
24342 #
24343 # Example (JavaScript):
24344 #
24345 # // ...
24346 #
24347 # var protoToCssColor = function(rgb_color) {
24348 # var redFrac = rgb_color.red || 0.0;
24349 # var greenFrac = rgb_color.green || 0.0;
24350 # var blueFrac = rgb_color.blue || 0.0;
24351 # var red = Math.floor(redFrac * 255);
24352 # var green = Math.floor(greenFrac * 255);
24353 # var blue = Math.floor(blueFrac * 255);
24354 #
24355 # if (!('alpha' in rgb_color)) {
24356 # return rgbToCssColor_(red, green, blue);
24357 # }
24358 #
24359 # var alphaFrac = rgb_color.alpha.value || 0.0;
24360 # var rgbParams = [red, green, blue].join(',');
24361 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24362 # };
24363 #
24364 # var rgbToCssColor_ = function(red, green, blue) {
24365 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24366 # var hexString = rgbNumber.toString(16);
24367 # var missingZeros = 6 - hexString.length;
24368 # var resultBuilder = ['#'];
24369 # for (var i = 0; i < missingZeros; i++) {
24370 # resultBuilder.push('0');
24371 # }
24372 # resultBuilder.push(hexString);
24373 # return resultBuilder.join('');
24374 # };
24375 #
24376 # // ...
24377 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24378 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24379 # the final pixel color is defined by the equation:
24380 #
24381 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24382 #
24383 # This means that a value of 1.0 corresponds to a solid color, whereas
24384 # a value of 0.0 corresponds to a completely transparent color. This
24385 # uses a wrapper message rather than a simple float scalar so that it is
24386 # possible to distinguish between a default value and the value being unset.
24387 # If omitted, this color object is to be rendered as a solid color
24388 # (as if the alpha value had been explicitly given with a value of 1.0).
24389 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24390 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24391 },
24392 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024393 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024394 "style": "A String", # The style of the border.
24395 },
24396 "bottom": { # A border along a cell. # The bottom border of the cell.
24397 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
24398 # for simplicity of conversion to/from color representations in various
24399 # languages over compactness; for example, the fields of this representation
24400 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24401 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24402 # method in iOS; and, with just a little work, it can be easily formatted into
24403 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24404 #
24405 # Example (Java):
24406 #
24407 # import com.google.type.Color;
24408 #
24409 # // ...
24410 # public static java.awt.Color fromProto(Color protocolor) {
24411 # float alpha = protocolor.hasAlpha()
24412 # ? protocolor.getAlpha().getValue()
24413 # : 1.0;
24414 #
24415 # return new java.awt.Color(
24416 # protocolor.getRed(),
24417 # protocolor.getGreen(),
24418 # protocolor.getBlue(),
24419 # alpha);
24420 # }
24421 #
24422 # public static Color toProto(java.awt.Color color) {
24423 # float red = (float) color.getRed();
24424 # float green = (float) color.getGreen();
24425 # float blue = (float) color.getBlue();
24426 # float denominator = 255.0;
24427 # Color.Builder resultBuilder =
24428 # Color
24429 # .newBuilder()
24430 # .setRed(red / denominator)
24431 # .setGreen(green / denominator)
24432 # .setBlue(blue / denominator);
24433 # int alpha = color.getAlpha();
24434 # if (alpha != 255) {
24435 # result.setAlpha(
24436 # FloatValue
24437 # .newBuilder()
24438 # .setValue(((float) alpha) / denominator)
24439 # .build());
24440 # }
24441 # return resultBuilder.build();
24442 # }
24443 # // ...
24444 #
24445 # Example (iOS / Obj-C):
24446 #
24447 # // ...
24448 # static UIColor* fromProto(Color* protocolor) {
24449 # float red = [protocolor red];
24450 # float green = [protocolor green];
24451 # float blue = [protocolor blue];
24452 # FloatValue* alpha_wrapper = [protocolor alpha];
24453 # float alpha = 1.0;
24454 # if (alpha_wrapper != nil) {
24455 # alpha = [alpha_wrapper value];
24456 # }
24457 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24458 # }
24459 #
24460 # static Color* toProto(UIColor* color) {
24461 # CGFloat red, green, blue, alpha;
24462 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24463 # return nil;
24464 # }
24465 # Color* result = [Color alloc] init];
24466 # [result setRed:red];
24467 # [result setGreen:green];
24468 # [result setBlue:blue];
24469 # if (alpha <= 0.9999) {
24470 # [result setAlpha:floatWrapperWithValue(alpha)];
24471 # }
24472 # [result autorelease];
24473 # return result;
24474 # }
24475 # // ...
24476 #
24477 # Example (JavaScript):
24478 #
24479 # // ...
24480 #
24481 # var protoToCssColor = function(rgb_color) {
24482 # var redFrac = rgb_color.red || 0.0;
24483 # var greenFrac = rgb_color.green || 0.0;
24484 # var blueFrac = rgb_color.blue || 0.0;
24485 # var red = Math.floor(redFrac * 255);
24486 # var green = Math.floor(greenFrac * 255);
24487 # var blue = Math.floor(blueFrac * 255);
24488 #
24489 # if (!('alpha' in rgb_color)) {
24490 # return rgbToCssColor_(red, green, blue);
24491 # }
24492 #
24493 # var alphaFrac = rgb_color.alpha.value || 0.0;
24494 # var rgbParams = [red, green, blue].join(',');
24495 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24496 # };
24497 #
24498 # var rgbToCssColor_ = function(red, green, blue) {
24499 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24500 # var hexString = rgbNumber.toString(16);
24501 # var missingZeros = 6 - hexString.length;
24502 # var resultBuilder = ['#'];
24503 # for (var i = 0; i < missingZeros; i++) {
24504 # resultBuilder.push('0');
24505 # }
24506 # resultBuilder.push(hexString);
24507 # return resultBuilder.join('');
24508 # };
24509 #
24510 # // ...
24511 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24512 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24513 # the final pixel color is defined by the equation:
24514 #
24515 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24516 #
24517 # This means that a value of 1.0 corresponds to a solid color, whereas
24518 # a value of 0.0 corresponds to a completely transparent color. This
24519 # uses a wrapper message rather than a simple float scalar so that it is
24520 # possible to distinguish between a default value and the value being unset.
24521 # If omitted, this color object is to be rendered as a solid color
24522 # (as if the alpha value had been explicitly given with a value of 1.0).
24523 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24524 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24525 },
24526 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024527 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024528 "style": "A String", # The style of the border.
24529 },
24530 "left": { # A border along a cell. # The left border of the cell.
24531 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
24532 # for simplicity of conversion to/from color representations in various
24533 # languages over compactness; for example, the fields of this representation
24534 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24535 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24536 # method in iOS; and, with just a little work, it can be easily formatted into
24537 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24538 #
24539 # Example (Java):
24540 #
24541 # import com.google.type.Color;
24542 #
24543 # // ...
24544 # public static java.awt.Color fromProto(Color protocolor) {
24545 # float alpha = protocolor.hasAlpha()
24546 # ? protocolor.getAlpha().getValue()
24547 # : 1.0;
24548 #
24549 # return new java.awt.Color(
24550 # protocolor.getRed(),
24551 # protocolor.getGreen(),
24552 # protocolor.getBlue(),
24553 # alpha);
24554 # }
24555 #
24556 # public static Color toProto(java.awt.Color color) {
24557 # float red = (float) color.getRed();
24558 # float green = (float) color.getGreen();
24559 # float blue = (float) color.getBlue();
24560 # float denominator = 255.0;
24561 # Color.Builder resultBuilder =
24562 # Color
24563 # .newBuilder()
24564 # .setRed(red / denominator)
24565 # .setGreen(green / denominator)
24566 # .setBlue(blue / denominator);
24567 # int alpha = color.getAlpha();
24568 # if (alpha != 255) {
24569 # result.setAlpha(
24570 # FloatValue
24571 # .newBuilder()
24572 # .setValue(((float) alpha) / denominator)
24573 # .build());
24574 # }
24575 # return resultBuilder.build();
24576 # }
24577 # // ...
24578 #
24579 # Example (iOS / Obj-C):
24580 #
24581 # // ...
24582 # static UIColor* fromProto(Color* protocolor) {
24583 # float red = [protocolor red];
24584 # float green = [protocolor green];
24585 # float blue = [protocolor blue];
24586 # FloatValue* alpha_wrapper = [protocolor alpha];
24587 # float alpha = 1.0;
24588 # if (alpha_wrapper != nil) {
24589 # alpha = [alpha_wrapper value];
24590 # }
24591 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24592 # }
24593 #
24594 # static Color* toProto(UIColor* color) {
24595 # CGFloat red, green, blue, alpha;
24596 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24597 # return nil;
24598 # }
24599 # Color* result = [Color alloc] init];
24600 # [result setRed:red];
24601 # [result setGreen:green];
24602 # [result setBlue:blue];
24603 # if (alpha <= 0.9999) {
24604 # [result setAlpha:floatWrapperWithValue(alpha)];
24605 # }
24606 # [result autorelease];
24607 # return result;
24608 # }
24609 # // ...
24610 #
24611 # Example (JavaScript):
24612 #
24613 # // ...
24614 #
24615 # var protoToCssColor = function(rgb_color) {
24616 # var redFrac = rgb_color.red || 0.0;
24617 # var greenFrac = rgb_color.green || 0.0;
24618 # var blueFrac = rgb_color.blue || 0.0;
24619 # var red = Math.floor(redFrac * 255);
24620 # var green = Math.floor(greenFrac * 255);
24621 # var blue = Math.floor(blueFrac * 255);
24622 #
24623 # if (!('alpha' in rgb_color)) {
24624 # return rgbToCssColor_(red, green, blue);
24625 # }
24626 #
24627 # var alphaFrac = rgb_color.alpha.value || 0.0;
24628 # var rgbParams = [red, green, blue].join(',');
24629 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24630 # };
24631 #
24632 # var rgbToCssColor_ = function(red, green, blue) {
24633 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24634 # var hexString = rgbNumber.toString(16);
24635 # var missingZeros = 6 - hexString.length;
24636 # var resultBuilder = ['#'];
24637 # for (var i = 0; i < missingZeros; i++) {
24638 # resultBuilder.push('0');
24639 # }
24640 # resultBuilder.push(hexString);
24641 # return resultBuilder.join('');
24642 # };
24643 #
24644 # // ...
24645 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24646 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24647 # the final pixel color is defined by the equation:
24648 #
24649 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24650 #
24651 # This means that a value of 1.0 corresponds to a solid color, whereas
24652 # a value of 0.0 corresponds to a completely transparent color. This
24653 # uses a wrapper message rather than a simple float scalar so that it is
24654 # possible to distinguish between a default value and the value being unset.
24655 # If omitted, this color object is to be rendered as a solid color
24656 # (as if the alpha value had been explicitly given with a value of 1.0).
24657 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24658 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24659 },
24660 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024661 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024662 "style": "A String", # The style of the border.
24663 },
24664 },
24665 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
24666 },
24667 "title": "A String", # The title of the spreadsheet.
24668 },
24669 "sheets": [ # The sheets that are part of a spreadsheet.
24670 { # A sheet in a spreadsheet.
24671 "conditionalFormats": [ # The conditional format rules in this sheet.
24672 { # A rule describing a conditional format.
24673 "ranges": [ # The ranges that will be formatted if the condition is true.
24674 # All the ranges must be on the same grid.
24675 { # A range on a sheet.
24676 # All indexes are zero-based.
24677 # Indexes are half open, e.g the start index is inclusive
24678 # and the end index is exclusive -- [start_index, end_index).
24679 # Missing indexes indicate the range is unbounded on that side.
24680 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024681 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024682 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024683 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024684 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024685 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024686 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024687 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024688 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024689 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024690 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024691 # `Sheet1!A:B == sheet_id: 0,
24692 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024693 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024694 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024695 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024696 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024697 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024698 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024699 #
24700 # The start index must always be less than or equal to the end index.
24701 # If the start index equals the end index, then the range is empty.
24702 # Empty ranges are typically not meaningful and are usually rendered in the
24703 # UI as `#REF!`.
24704 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
24705 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
24706 "sheetId": 42, # The sheet this range is on.
24707 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
24708 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
24709 },
24710 ],
24711 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
24712 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
24713 # the format will be applied.
24714 # BooleanConditions are used by conditional formatting,
24715 # data validation, and the criteria in filters.
24716 "type": "A String", # The type of condition.
24717 "values": [ # The values of the condition. The number of supported values depends
24718 # on the condition type. Some support zero values,
24719 # others one or two values,
24720 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
24721 { # The value of the condition.
24722 "relativeDate": "A String", # A relative date (based on the current date).
24723 # Valid only if the type is
24724 # DATE_BEFORE,
24725 # DATE_AFTER,
24726 # DATE_ON_OR_BEFORE or
24727 # DATE_ON_OR_AFTER.
24728 #
24729 # Relative dates are not supported in data validation.
24730 # They are supported only in conditional formatting and
24731 # conditional filters.
24732 "userEnteredValue": "A String", # A value the condition is based on.
24733 # The value will be parsed as if the user typed into a cell.
24734 # Formulas are supported (and must begin with an `=`).
24735 },
24736 ],
24737 },
24738 "format": { # The format of a cell. # The format to apply.
24739 # Conditional formatting can only apply a subset of formatting:
24740 # bold, italic,
24741 # strikethrough,
24742 # foreground color &
24743 # background color.
24744 "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 -070024745 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
24746 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070024747 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
24748 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024749 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024750 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024751 },
24752 "textDirection": "A String", # The direction of the text in the cell.
24753 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
24754 # When updating padding, every field must be specified.
24755 "top": 42, # The top padding of the cell.
24756 "right": 42, # The right padding of the cell.
24757 "bottom": 42, # The bottom padding of the cell.
24758 "left": 42, # The left padding of the cell.
24759 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024760 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024761 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
24762 # for simplicity of conversion to/from color representations in various
24763 # languages over compactness; for example, the fields of this representation
24764 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24765 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24766 # method in iOS; and, with just a little work, it can be easily formatted into
24767 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24768 #
24769 # Example (Java):
24770 #
24771 # import com.google.type.Color;
24772 #
24773 # // ...
24774 # public static java.awt.Color fromProto(Color protocolor) {
24775 # float alpha = protocolor.hasAlpha()
24776 # ? protocolor.getAlpha().getValue()
24777 # : 1.0;
24778 #
24779 # return new java.awt.Color(
24780 # protocolor.getRed(),
24781 # protocolor.getGreen(),
24782 # protocolor.getBlue(),
24783 # alpha);
24784 # }
24785 #
24786 # public static Color toProto(java.awt.Color color) {
24787 # float red = (float) color.getRed();
24788 # float green = (float) color.getGreen();
24789 # float blue = (float) color.getBlue();
24790 # float denominator = 255.0;
24791 # Color.Builder resultBuilder =
24792 # Color
24793 # .newBuilder()
24794 # .setRed(red / denominator)
24795 # .setGreen(green / denominator)
24796 # .setBlue(blue / denominator);
24797 # int alpha = color.getAlpha();
24798 # if (alpha != 255) {
24799 # result.setAlpha(
24800 # FloatValue
24801 # .newBuilder()
24802 # .setValue(((float) alpha) / denominator)
24803 # .build());
24804 # }
24805 # return resultBuilder.build();
24806 # }
24807 # // ...
24808 #
24809 # Example (iOS / Obj-C):
24810 #
24811 # // ...
24812 # static UIColor* fromProto(Color* protocolor) {
24813 # float red = [protocolor red];
24814 # float green = [protocolor green];
24815 # float blue = [protocolor blue];
24816 # FloatValue* alpha_wrapper = [protocolor alpha];
24817 # float alpha = 1.0;
24818 # if (alpha_wrapper != nil) {
24819 # alpha = [alpha_wrapper value];
24820 # }
24821 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24822 # }
24823 #
24824 # static Color* toProto(UIColor* color) {
24825 # CGFloat red, green, blue, alpha;
24826 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24827 # return nil;
24828 # }
24829 # Color* result = [Color alloc] init];
24830 # [result setRed:red];
24831 # [result setGreen:green];
24832 # [result setBlue:blue];
24833 # if (alpha <= 0.9999) {
24834 # [result setAlpha:floatWrapperWithValue(alpha)];
24835 # }
24836 # [result autorelease];
24837 # return result;
24838 # }
24839 # // ...
24840 #
24841 # Example (JavaScript):
24842 #
24843 # // ...
24844 #
24845 # var protoToCssColor = function(rgb_color) {
24846 # var redFrac = rgb_color.red || 0.0;
24847 # var greenFrac = rgb_color.green || 0.0;
24848 # var blueFrac = rgb_color.blue || 0.0;
24849 # var red = Math.floor(redFrac * 255);
24850 # var green = Math.floor(greenFrac * 255);
24851 # var blue = Math.floor(blueFrac * 255);
24852 #
24853 # if (!('alpha' in rgb_color)) {
24854 # return rgbToCssColor_(red, green, blue);
24855 # }
24856 #
24857 # var alphaFrac = rgb_color.alpha.value || 0.0;
24858 # var rgbParams = [red, green, blue].join(',');
24859 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24860 # };
24861 #
24862 # var rgbToCssColor_ = function(red, green, blue) {
24863 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24864 # var hexString = rgbNumber.toString(16);
24865 # var missingZeros = 6 - hexString.length;
24866 # var resultBuilder = ['#'];
24867 # for (var i = 0; i < missingZeros; i++) {
24868 # resultBuilder.push('0');
24869 # }
24870 # resultBuilder.push(hexString);
24871 # return resultBuilder.join('');
24872 # };
24873 #
24874 # // ...
24875 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24876 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24877 # the final pixel color is defined by the equation:
24878 #
24879 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24880 #
24881 # This means that a value of 1.0 corresponds to a solid color, whereas
24882 # a value of 0.0 corresponds to a completely transparent color. This
24883 # uses a wrapper message rather than a simple float scalar so that it is
24884 # possible to distinguish between a default value and the value being unset.
24885 # If omitted, this color object is to be rendered as a solid color
24886 # (as if the alpha value had been explicitly given with a value of 1.0).
24887 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24888 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24889 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024890 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024891 "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).
24892 # Absent values indicate that the field isn't specified.
24893 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
24894 # for simplicity of conversion to/from color representations in various
24895 # languages over compactness; for example, the fields of this representation
24896 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24897 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24898 # method in iOS; and, with just a little work, it can be easily formatted into
24899 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24900 #
24901 # Example (Java):
24902 #
24903 # import com.google.type.Color;
24904 #
24905 # // ...
24906 # public static java.awt.Color fromProto(Color protocolor) {
24907 # float alpha = protocolor.hasAlpha()
24908 # ? protocolor.getAlpha().getValue()
24909 # : 1.0;
24910 #
24911 # return new java.awt.Color(
24912 # protocolor.getRed(),
24913 # protocolor.getGreen(),
24914 # protocolor.getBlue(),
24915 # alpha);
24916 # }
24917 #
24918 # public static Color toProto(java.awt.Color color) {
24919 # float red = (float) color.getRed();
24920 # float green = (float) color.getGreen();
24921 # float blue = (float) color.getBlue();
24922 # float denominator = 255.0;
24923 # Color.Builder resultBuilder =
24924 # Color
24925 # .newBuilder()
24926 # .setRed(red / denominator)
24927 # .setGreen(green / denominator)
24928 # .setBlue(blue / denominator);
24929 # int alpha = color.getAlpha();
24930 # if (alpha != 255) {
24931 # result.setAlpha(
24932 # FloatValue
24933 # .newBuilder()
24934 # .setValue(((float) alpha) / denominator)
24935 # .build());
24936 # }
24937 # return resultBuilder.build();
24938 # }
24939 # // ...
24940 #
24941 # Example (iOS / Obj-C):
24942 #
24943 # // ...
24944 # static UIColor* fromProto(Color* protocolor) {
24945 # float red = [protocolor red];
24946 # float green = [protocolor green];
24947 # float blue = [protocolor blue];
24948 # FloatValue* alpha_wrapper = [protocolor alpha];
24949 # float alpha = 1.0;
24950 # if (alpha_wrapper != nil) {
24951 # alpha = [alpha_wrapper value];
24952 # }
24953 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24954 # }
24955 #
24956 # static Color* toProto(UIColor* color) {
24957 # CGFloat red, green, blue, alpha;
24958 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24959 # return nil;
24960 # }
24961 # Color* result = [Color alloc] init];
24962 # [result setRed:red];
24963 # [result setGreen:green];
24964 # [result setBlue:blue];
24965 # if (alpha <= 0.9999) {
24966 # [result setAlpha:floatWrapperWithValue(alpha)];
24967 # }
24968 # [result autorelease];
24969 # return result;
24970 # }
24971 # // ...
24972 #
24973 # Example (JavaScript):
24974 #
24975 # // ...
24976 #
24977 # var protoToCssColor = function(rgb_color) {
24978 # var redFrac = rgb_color.red || 0.0;
24979 # var greenFrac = rgb_color.green || 0.0;
24980 # var blueFrac = rgb_color.blue || 0.0;
24981 # var red = Math.floor(redFrac * 255);
24982 # var green = Math.floor(greenFrac * 255);
24983 # var blue = Math.floor(blueFrac * 255);
24984 #
24985 # if (!('alpha' in rgb_color)) {
24986 # return rgbToCssColor_(red, green, blue);
24987 # }
24988 #
24989 # var alphaFrac = rgb_color.alpha.value || 0.0;
24990 # var rgbParams = [red, green, blue].join(',');
24991 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24992 # };
24993 #
24994 # var rgbToCssColor_ = function(red, green, blue) {
24995 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24996 # var hexString = rgbNumber.toString(16);
24997 # var missingZeros = 6 - hexString.length;
24998 # var resultBuilder = ['#'];
24999 # for (var i = 0; i < missingZeros; i++) {
25000 # resultBuilder.push('0');
25001 # }
25002 # resultBuilder.push(hexString);
25003 # return resultBuilder.join('');
25004 # };
25005 #
25006 # // ...
25007 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25008 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25009 # the final pixel color is defined by the equation:
25010 #
25011 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25012 #
25013 # This means that a value of 1.0 corresponds to a solid color, whereas
25014 # a value of 0.0 corresponds to a completely transparent color. This
25015 # uses a wrapper message rather than a simple float scalar so that it is
25016 # possible to distinguish between a default value and the value being unset.
25017 # If omitted, this color object is to be rendered as a solid color
25018 # (as if the alpha value had been explicitly given with a value of 1.0).
25019 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25020 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25021 },
25022 "bold": True or False, # True if the text is bold.
25023 "strikethrough": True or False, # True if the text has a strikethrough.
25024 "fontFamily": "A String", # The font family.
25025 "fontSize": 42, # The size of the font.
25026 "italic": True or False, # True if the text is italicized.
25027 "underline": True or False, # True if the text is underlined.
25028 },
25029 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
25030 "borders": { # The borders of the cell. # The borders of the cell.
25031 "top": { # A border along a cell. # The top border of the cell.
25032 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
25033 # for simplicity of conversion to/from color representations in various
25034 # languages over compactness; for example, the fields of this representation
25035 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25036 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25037 # method in iOS; and, with just a little work, it can be easily formatted into
25038 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25039 #
25040 # Example (Java):
25041 #
25042 # import com.google.type.Color;
25043 #
25044 # // ...
25045 # public static java.awt.Color fromProto(Color protocolor) {
25046 # float alpha = protocolor.hasAlpha()
25047 # ? protocolor.getAlpha().getValue()
25048 # : 1.0;
25049 #
25050 # return new java.awt.Color(
25051 # protocolor.getRed(),
25052 # protocolor.getGreen(),
25053 # protocolor.getBlue(),
25054 # alpha);
25055 # }
25056 #
25057 # public static Color toProto(java.awt.Color color) {
25058 # float red = (float) color.getRed();
25059 # float green = (float) color.getGreen();
25060 # float blue = (float) color.getBlue();
25061 # float denominator = 255.0;
25062 # Color.Builder resultBuilder =
25063 # Color
25064 # .newBuilder()
25065 # .setRed(red / denominator)
25066 # .setGreen(green / denominator)
25067 # .setBlue(blue / denominator);
25068 # int alpha = color.getAlpha();
25069 # if (alpha != 255) {
25070 # result.setAlpha(
25071 # FloatValue
25072 # .newBuilder()
25073 # .setValue(((float) alpha) / denominator)
25074 # .build());
25075 # }
25076 # return resultBuilder.build();
25077 # }
25078 # // ...
25079 #
25080 # Example (iOS / Obj-C):
25081 #
25082 # // ...
25083 # static UIColor* fromProto(Color* protocolor) {
25084 # float red = [protocolor red];
25085 # float green = [protocolor green];
25086 # float blue = [protocolor blue];
25087 # FloatValue* alpha_wrapper = [protocolor alpha];
25088 # float alpha = 1.0;
25089 # if (alpha_wrapper != nil) {
25090 # alpha = [alpha_wrapper value];
25091 # }
25092 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25093 # }
25094 #
25095 # static Color* toProto(UIColor* color) {
25096 # CGFloat red, green, blue, alpha;
25097 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25098 # return nil;
25099 # }
25100 # Color* result = [Color alloc] init];
25101 # [result setRed:red];
25102 # [result setGreen:green];
25103 # [result setBlue:blue];
25104 # if (alpha <= 0.9999) {
25105 # [result setAlpha:floatWrapperWithValue(alpha)];
25106 # }
25107 # [result autorelease];
25108 # return result;
25109 # }
25110 # // ...
25111 #
25112 # Example (JavaScript):
25113 #
25114 # // ...
25115 #
25116 # var protoToCssColor = function(rgb_color) {
25117 # var redFrac = rgb_color.red || 0.0;
25118 # var greenFrac = rgb_color.green || 0.0;
25119 # var blueFrac = rgb_color.blue || 0.0;
25120 # var red = Math.floor(redFrac * 255);
25121 # var green = Math.floor(greenFrac * 255);
25122 # var blue = Math.floor(blueFrac * 255);
25123 #
25124 # if (!('alpha' in rgb_color)) {
25125 # return rgbToCssColor_(red, green, blue);
25126 # }
25127 #
25128 # var alphaFrac = rgb_color.alpha.value || 0.0;
25129 # var rgbParams = [red, green, blue].join(',');
25130 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25131 # };
25132 #
25133 # var rgbToCssColor_ = function(red, green, blue) {
25134 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25135 # var hexString = rgbNumber.toString(16);
25136 # var missingZeros = 6 - hexString.length;
25137 # var resultBuilder = ['#'];
25138 # for (var i = 0; i < missingZeros; i++) {
25139 # resultBuilder.push('0');
25140 # }
25141 # resultBuilder.push(hexString);
25142 # return resultBuilder.join('');
25143 # };
25144 #
25145 # // ...
25146 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25147 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25148 # the final pixel color is defined by the equation:
25149 #
25150 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25151 #
25152 # This means that a value of 1.0 corresponds to a solid color, whereas
25153 # a value of 0.0 corresponds to a completely transparent color. This
25154 # uses a wrapper message rather than a simple float scalar so that it is
25155 # possible to distinguish between a default value and the value being unset.
25156 # If omitted, this color object is to be rendered as a solid color
25157 # (as if the alpha value had been explicitly given with a value of 1.0).
25158 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25159 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25160 },
25161 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025162 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025163 "style": "A String", # The style of the border.
25164 },
25165 "right": { # A border along a cell. # The right border of the cell.
25166 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
25167 # for simplicity of conversion to/from color representations in various
25168 # languages over compactness; for example, the fields of this representation
25169 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25170 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25171 # method in iOS; and, with just a little work, it can be easily formatted into
25172 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25173 #
25174 # Example (Java):
25175 #
25176 # import com.google.type.Color;
25177 #
25178 # // ...
25179 # public static java.awt.Color fromProto(Color protocolor) {
25180 # float alpha = protocolor.hasAlpha()
25181 # ? protocolor.getAlpha().getValue()
25182 # : 1.0;
25183 #
25184 # return new java.awt.Color(
25185 # protocolor.getRed(),
25186 # protocolor.getGreen(),
25187 # protocolor.getBlue(),
25188 # alpha);
25189 # }
25190 #
25191 # public static Color toProto(java.awt.Color color) {
25192 # float red = (float) color.getRed();
25193 # float green = (float) color.getGreen();
25194 # float blue = (float) color.getBlue();
25195 # float denominator = 255.0;
25196 # Color.Builder resultBuilder =
25197 # Color
25198 # .newBuilder()
25199 # .setRed(red / denominator)
25200 # .setGreen(green / denominator)
25201 # .setBlue(blue / denominator);
25202 # int alpha = color.getAlpha();
25203 # if (alpha != 255) {
25204 # result.setAlpha(
25205 # FloatValue
25206 # .newBuilder()
25207 # .setValue(((float) alpha) / denominator)
25208 # .build());
25209 # }
25210 # return resultBuilder.build();
25211 # }
25212 # // ...
25213 #
25214 # Example (iOS / Obj-C):
25215 #
25216 # // ...
25217 # static UIColor* fromProto(Color* protocolor) {
25218 # float red = [protocolor red];
25219 # float green = [protocolor green];
25220 # float blue = [protocolor blue];
25221 # FloatValue* alpha_wrapper = [protocolor alpha];
25222 # float alpha = 1.0;
25223 # if (alpha_wrapper != nil) {
25224 # alpha = [alpha_wrapper value];
25225 # }
25226 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25227 # }
25228 #
25229 # static Color* toProto(UIColor* color) {
25230 # CGFloat red, green, blue, alpha;
25231 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25232 # return nil;
25233 # }
25234 # Color* result = [Color alloc] init];
25235 # [result setRed:red];
25236 # [result setGreen:green];
25237 # [result setBlue:blue];
25238 # if (alpha <= 0.9999) {
25239 # [result setAlpha:floatWrapperWithValue(alpha)];
25240 # }
25241 # [result autorelease];
25242 # return result;
25243 # }
25244 # // ...
25245 #
25246 # Example (JavaScript):
25247 #
25248 # // ...
25249 #
25250 # var protoToCssColor = function(rgb_color) {
25251 # var redFrac = rgb_color.red || 0.0;
25252 # var greenFrac = rgb_color.green || 0.0;
25253 # var blueFrac = rgb_color.blue || 0.0;
25254 # var red = Math.floor(redFrac * 255);
25255 # var green = Math.floor(greenFrac * 255);
25256 # var blue = Math.floor(blueFrac * 255);
25257 #
25258 # if (!('alpha' in rgb_color)) {
25259 # return rgbToCssColor_(red, green, blue);
25260 # }
25261 #
25262 # var alphaFrac = rgb_color.alpha.value || 0.0;
25263 # var rgbParams = [red, green, blue].join(',');
25264 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25265 # };
25266 #
25267 # var rgbToCssColor_ = function(red, green, blue) {
25268 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25269 # var hexString = rgbNumber.toString(16);
25270 # var missingZeros = 6 - hexString.length;
25271 # var resultBuilder = ['#'];
25272 # for (var i = 0; i < missingZeros; i++) {
25273 # resultBuilder.push('0');
25274 # }
25275 # resultBuilder.push(hexString);
25276 # return resultBuilder.join('');
25277 # };
25278 #
25279 # // ...
25280 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25281 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25282 # the final pixel color is defined by the equation:
25283 #
25284 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25285 #
25286 # This means that a value of 1.0 corresponds to a solid color, whereas
25287 # a value of 0.0 corresponds to a completely transparent color. This
25288 # uses a wrapper message rather than a simple float scalar so that it is
25289 # possible to distinguish between a default value and the value being unset.
25290 # If omitted, this color object is to be rendered as a solid color
25291 # (as if the alpha value had been explicitly given with a value of 1.0).
25292 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25293 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25294 },
25295 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025296 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025297 "style": "A String", # The style of the border.
25298 },
25299 "bottom": { # A border along a cell. # The bottom border of the cell.
25300 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
25301 # for simplicity of conversion to/from color representations in various
25302 # languages over compactness; for example, the fields of this representation
25303 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25304 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25305 # method in iOS; and, with just a little work, it can be easily formatted into
25306 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25307 #
25308 # Example (Java):
25309 #
25310 # import com.google.type.Color;
25311 #
25312 # // ...
25313 # public static java.awt.Color fromProto(Color protocolor) {
25314 # float alpha = protocolor.hasAlpha()
25315 # ? protocolor.getAlpha().getValue()
25316 # : 1.0;
25317 #
25318 # return new java.awt.Color(
25319 # protocolor.getRed(),
25320 # protocolor.getGreen(),
25321 # protocolor.getBlue(),
25322 # alpha);
25323 # }
25324 #
25325 # public static Color toProto(java.awt.Color color) {
25326 # float red = (float) color.getRed();
25327 # float green = (float) color.getGreen();
25328 # float blue = (float) color.getBlue();
25329 # float denominator = 255.0;
25330 # Color.Builder resultBuilder =
25331 # Color
25332 # .newBuilder()
25333 # .setRed(red / denominator)
25334 # .setGreen(green / denominator)
25335 # .setBlue(blue / denominator);
25336 # int alpha = color.getAlpha();
25337 # if (alpha != 255) {
25338 # result.setAlpha(
25339 # FloatValue
25340 # .newBuilder()
25341 # .setValue(((float) alpha) / denominator)
25342 # .build());
25343 # }
25344 # return resultBuilder.build();
25345 # }
25346 # // ...
25347 #
25348 # Example (iOS / Obj-C):
25349 #
25350 # // ...
25351 # static UIColor* fromProto(Color* protocolor) {
25352 # float red = [protocolor red];
25353 # float green = [protocolor green];
25354 # float blue = [protocolor blue];
25355 # FloatValue* alpha_wrapper = [protocolor alpha];
25356 # float alpha = 1.0;
25357 # if (alpha_wrapper != nil) {
25358 # alpha = [alpha_wrapper value];
25359 # }
25360 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25361 # }
25362 #
25363 # static Color* toProto(UIColor* color) {
25364 # CGFloat red, green, blue, alpha;
25365 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25366 # return nil;
25367 # }
25368 # Color* result = [Color alloc] init];
25369 # [result setRed:red];
25370 # [result setGreen:green];
25371 # [result setBlue:blue];
25372 # if (alpha <= 0.9999) {
25373 # [result setAlpha:floatWrapperWithValue(alpha)];
25374 # }
25375 # [result autorelease];
25376 # return result;
25377 # }
25378 # // ...
25379 #
25380 # Example (JavaScript):
25381 #
25382 # // ...
25383 #
25384 # var protoToCssColor = function(rgb_color) {
25385 # var redFrac = rgb_color.red || 0.0;
25386 # var greenFrac = rgb_color.green || 0.0;
25387 # var blueFrac = rgb_color.blue || 0.0;
25388 # var red = Math.floor(redFrac * 255);
25389 # var green = Math.floor(greenFrac * 255);
25390 # var blue = Math.floor(blueFrac * 255);
25391 #
25392 # if (!('alpha' in rgb_color)) {
25393 # return rgbToCssColor_(red, green, blue);
25394 # }
25395 #
25396 # var alphaFrac = rgb_color.alpha.value || 0.0;
25397 # var rgbParams = [red, green, blue].join(',');
25398 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25399 # };
25400 #
25401 # var rgbToCssColor_ = function(red, green, blue) {
25402 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25403 # var hexString = rgbNumber.toString(16);
25404 # var missingZeros = 6 - hexString.length;
25405 # var resultBuilder = ['#'];
25406 # for (var i = 0; i < missingZeros; i++) {
25407 # resultBuilder.push('0');
25408 # }
25409 # resultBuilder.push(hexString);
25410 # return resultBuilder.join('');
25411 # };
25412 #
25413 # // ...
25414 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25415 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25416 # the final pixel color is defined by the equation:
25417 #
25418 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25419 #
25420 # This means that a value of 1.0 corresponds to a solid color, whereas
25421 # a value of 0.0 corresponds to a completely transparent color. This
25422 # uses a wrapper message rather than a simple float scalar so that it is
25423 # possible to distinguish between a default value and the value being unset.
25424 # If omitted, this color object is to be rendered as a solid color
25425 # (as if the alpha value had been explicitly given with a value of 1.0).
25426 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25427 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25428 },
25429 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025430 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025431 "style": "A String", # The style of the border.
25432 },
25433 "left": { # A border along a cell. # The left border of the cell.
25434 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
25435 # for simplicity of conversion to/from color representations in various
25436 # languages over compactness; for example, the fields of this representation
25437 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25438 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25439 # method in iOS; and, with just a little work, it can be easily formatted into
25440 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25441 #
25442 # Example (Java):
25443 #
25444 # import com.google.type.Color;
25445 #
25446 # // ...
25447 # public static java.awt.Color fromProto(Color protocolor) {
25448 # float alpha = protocolor.hasAlpha()
25449 # ? protocolor.getAlpha().getValue()
25450 # : 1.0;
25451 #
25452 # return new java.awt.Color(
25453 # protocolor.getRed(),
25454 # protocolor.getGreen(),
25455 # protocolor.getBlue(),
25456 # alpha);
25457 # }
25458 #
25459 # public static Color toProto(java.awt.Color color) {
25460 # float red = (float) color.getRed();
25461 # float green = (float) color.getGreen();
25462 # float blue = (float) color.getBlue();
25463 # float denominator = 255.0;
25464 # Color.Builder resultBuilder =
25465 # Color
25466 # .newBuilder()
25467 # .setRed(red / denominator)
25468 # .setGreen(green / denominator)
25469 # .setBlue(blue / denominator);
25470 # int alpha = color.getAlpha();
25471 # if (alpha != 255) {
25472 # result.setAlpha(
25473 # FloatValue
25474 # .newBuilder()
25475 # .setValue(((float) alpha) / denominator)
25476 # .build());
25477 # }
25478 # return resultBuilder.build();
25479 # }
25480 # // ...
25481 #
25482 # Example (iOS / Obj-C):
25483 #
25484 # // ...
25485 # static UIColor* fromProto(Color* protocolor) {
25486 # float red = [protocolor red];
25487 # float green = [protocolor green];
25488 # float blue = [protocolor blue];
25489 # FloatValue* alpha_wrapper = [protocolor alpha];
25490 # float alpha = 1.0;
25491 # if (alpha_wrapper != nil) {
25492 # alpha = [alpha_wrapper value];
25493 # }
25494 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25495 # }
25496 #
25497 # static Color* toProto(UIColor* color) {
25498 # CGFloat red, green, blue, alpha;
25499 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25500 # return nil;
25501 # }
25502 # Color* result = [Color alloc] init];
25503 # [result setRed:red];
25504 # [result setGreen:green];
25505 # [result setBlue:blue];
25506 # if (alpha <= 0.9999) {
25507 # [result setAlpha:floatWrapperWithValue(alpha)];
25508 # }
25509 # [result autorelease];
25510 # return result;
25511 # }
25512 # // ...
25513 #
25514 # Example (JavaScript):
25515 #
25516 # // ...
25517 #
25518 # var protoToCssColor = function(rgb_color) {
25519 # var redFrac = rgb_color.red || 0.0;
25520 # var greenFrac = rgb_color.green || 0.0;
25521 # var blueFrac = rgb_color.blue || 0.0;
25522 # var red = Math.floor(redFrac * 255);
25523 # var green = Math.floor(greenFrac * 255);
25524 # var blue = Math.floor(blueFrac * 255);
25525 #
25526 # if (!('alpha' in rgb_color)) {
25527 # return rgbToCssColor_(red, green, blue);
25528 # }
25529 #
25530 # var alphaFrac = rgb_color.alpha.value || 0.0;
25531 # var rgbParams = [red, green, blue].join(',');
25532 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25533 # };
25534 #
25535 # var rgbToCssColor_ = function(red, green, blue) {
25536 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25537 # var hexString = rgbNumber.toString(16);
25538 # var missingZeros = 6 - hexString.length;
25539 # var resultBuilder = ['#'];
25540 # for (var i = 0; i < missingZeros; i++) {
25541 # resultBuilder.push('0');
25542 # }
25543 # resultBuilder.push(hexString);
25544 # return resultBuilder.join('');
25545 # };
25546 #
25547 # // ...
25548 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25549 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25550 # the final pixel color is defined by the equation:
25551 #
25552 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25553 #
25554 # This means that a value of 1.0 corresponds to a solid color, whereas
25555 # a value of 0.0 corresponds to a completely transparent color. This
25556 # uses a wrapper message rather than a simple float scalar so that it is
25557 # possible to distinguish between a default value and the value being unset.
25558 # If omitted, this color object is to be rendered as a solid color
25559 # (as if the alpha value had been explicitly given with a value of 1.0).
25560 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25561 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25562 },
25563 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025564 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025565 "style": "A String", # The style of the border.
25566 },
25567 },
25568 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
25569 },
25570 },
25571 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
25572 # the interpolation points listed. The format of a cell will vary
25573 # based on its contents as compared to the values of the interpolation
25574 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025575 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025576 # These pin the gradient color scale according to the color,
25577 # type and value chosen.
25578 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
25579 # for simplicity of conversion to/from color representations in various
25580 # languages over compactness; for example, the fields of this representation
25581 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25582 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25583 # method in iOS; and, with just a little work, it can be easily formatted into
25584 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25585 #
25586 # Example (Java):
25587 #
25588 # import com.google.type.Color;
25589 #
25590 # // ...
25591 # public static java.awt.Color fromProto(Color protocolor) {
25592 # float alpha = protocolor.hasAlpha()
25593 # ? protocolor.getAlpha().getValue()
25594 # : 1.0;
25595 #
25596 # return new java.awt.Color(
25597 # protocolor.getRed(),
25598 # protocolor.getGreen(),
25599 # protocolor.getBlue(),
25600 # alpha);
25601 # }
25602 #
25603 # public static Color toProto(java.awt.Color color) {
25604 # float red = (float) color.getRed();
25605 # float green = (float) color.getGreen();
25606 # float blue = (float) color.getBlue();
25607 # float denominator = 255.0;
25608 # Color.Builder resultBuilder =
25609 # Color
25610 # .newBuilder()
25611 # .setRed(red / denominator)
25612 # .setGreen(green / denominator)
25613 # .setBlue(blue / denominator);
25614 # int alpha = color.getAlpha();
25615 # if (alpha != 255) {
25616 # result.setAlpha(
25617 # FloatValue
25618 # .newBuilder()
25619 # .setValue(((float) alpha) / denominator)
25620 # .build());
25621 # }
25622 # return resultBuilder.build();
25623 # }
25624 # // ...
25625 #
25626 # Example (iOS / Obj-C):
25627 #
25628 # // ...
25629 # static UIColor* fromProto(Color* protocolor) {
25630 # float red = [protocolor red];
25631 # float green = [protocolor green];
25632 # float blue = [protocolor blue];
25633 # FloatValue* alpha_wrapper = [protocolor alpha];
25634 # float alpha = 1.0;
25635 # if (alpha_wrapper != nil) {
25636 # alpha = [alpha_wrapper value];
25637 # }
25638 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25639 # }
25640 #
25641 # static Color* toProto(UIColor* color) {
25642 # CGFloat red, green, blue, alpha;
25643 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25644 # return nil;
25645 # }
25646 # Color* result = [Color alloc] init];
25647 # [result setRed:red];
25648 # [result setGreen:green];
25649 # [result setBlue:blue];
25650 # if (alpha <= 0.9999) {
25651 # [result setAlpha:floatWrapperWithValue(alpha)];
25652 # }
25653 # [result autorelease];
25654 # return result;
25655 # }
25656 # // ...
25657 #
25658 # Example (JavaScript):
25659 #
25660 # // ...
25661 #
25662 # var protoToCssColor = function(rgb_color) {
25663 # var redFrac = rgb_color.red || 0.0;
25664 # var greenFrac = rgb_color.green || 0.0;
25665 # var blueFrac = rgb_color.blue || 0.0;
25666 # var red = Math.floor(redFrac * 255);
25667 # var green = Math.floor(greenFrac * 255);
25668 # var blue = Math.floor(blueFrac * 255);
25669 #
25670 # if (!('alpha' in rgb_color)) {
25671 # return rgbToCssColor_(red, green, blue);
25672 # }
25673 #
25674 # var alphaFrac = rgb_color.alpha.value || 0.0;
25675 # var rgbParams = [red, green, blue].join(',');
25676 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25677 # };
25678 #
25679 # var rgbToCssColor_ = function(red, green, blue) {
25680 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25681 # var hexString = rgbNumber.toString(16);
25682 # var missingZeros = 6 - hexString.length;
25683 # var resultBuilder = ['#'];
25684 # for (var i = 0; i < missingZeros; i++) {
25685 # resultBuilder.push('0');
25686 # }
25687 # resultBuilder.push(hexString);
25688 # return resultBuilder.join('');
25689 # };
25690 #
25691 # // ...
25692 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25693 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25694 # the final pixel color is defined by the equation:
25695 #
25696 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25697 #
25698 # This means that a value of 1.0 corresponds to a solid color, whereas
25699 # a value of 0.0 corresponds to a completely transparent color. This
25700 # uses a wrapper message rather than a simple float scalar so that it is
25701 # possible to distinguish between a default value and the value being unset.
25702 # If omitted, this color object is to be rendered as a solid color
25703 # (as if the alpha value had been explicitly given with a value of 1.0).
25704 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25705 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25706 },
25707 "type": "A String", # How the value should be interpreted.
25708 "value": "A String", # The value this interpolation point uses. May be a formula.
25709 # Unused if type is MIN or
25710 # MAX.
25711 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025712 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025713 # These pin the gradient color scale according to the color,
25714 # type and value chosen.
25715 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
25716 # for simplicity of conversion to/from color representations in various
25717 # languages over compactness; for example, the fields of this representation
25718 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25719 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25720 # method in iOS; and, with just a little work, it can be easily formatted into
25721 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25722 #
25723 # Example (Java):
25724 #
25725 # import com.google.type.Color;
25726 #
25727 # // ...
25728 # public static java.awt.Color fromProto(Color protocolor) {
25729 # float alpha = protocolor.hasAlpha()
25730 # ? protocolor.getAlpha().getValue()
25731 # : 1.0;
25732 #
25733 # return new java.awt.Color(
25734 # protocolor.getRed(),
25735 # protocolor.getGreen(),
25736 # protocolor.getBlue(),
25737 # alpha);
25738 # }
25739 #
25740 # public static Color toProto(java.awt.Color color) {
25741 # float red = (float) color.getRed();
25742 # float green = (float) color.getGreen();
25743 # float blue = (float) color.getBlue();
25744 # float denominator = 255.0;
25745 # Color.Builder resultBuilder =
25746 # Color
25747 # .newBuilder()
25748 # .setRed(red / denominator)
25749 # .setGreen(green / denominator)
25750 # .setBlue(blue / denominator);
25751 # int alpha = color.getAlpha();
25752 # if (alpha != 255) {
25753 # result.setAlpha(
25754 # FloatValue
25755 # .newBuilder()
25756 # .setValue(((float) alpha) / denominator)
25757 # .build());
25758 # }
25759 # return resultBuilder.build();
25760 # }
25761 # // ...
25762 #
25763 # Example (iOS / Obj-C):
25764 #
25765 # // ...
25766 # static UIColor* fromProto(Color* protocolor) {
25767 # float red = [protocolor red];
25768 # float green = [protocolor green];
25769 # float blue = [protocolor blue];
25770 # FloatValue* alpha_wrapper = [protocolor alpha];
25771 # float alpha = 1.0;
25772 # if (alpha_wrapper != nil) {
25773 # alpha = [alpha_wrapper value];
25774 # }
25775 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25776 # }
25777 #
25778 # static Color* toProto(UIColor* color) {
25779 # CGFloat red, green, blue, alpha;
25780 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25781 # return nil;
25782 # }
25783 # Color* result = [Color alloc] init];
25784 # [result setRed:red];
25785 # [result setGreen:green];
25786 # [result setBlue:blue];
25787 # if (alpha <= 0.9999) {
25788 # [result setAlpha:floatWrapperWithValue(alpha)];
25789 # }
25790 # [result autorelease];
25791 # return result;
25792 # }
25793 # // ...
25794 #
25795 # Example (JavaScript):
25796 #
25797 # // ...
25798 #
25799 # var protoToCssColor = function(rgb_color) {
25800 # var redFrac = rgb_color.red || 0.0;
25801 # var greenFrac = rgb_color.green || 0.0;
25802 # var blueFrac = rgb_color.blue || 0.0;
25803 # var red = Math.floor(redFrac * 255);
25804 # var green = Math.floor(greenFrac * 255);
25805 # var blue = Math.floor(blueFrac * 255);
25806 #
25807 # if (!('alpha' in rgb_color)) {
25808 # return rgbToCssColor_(red, green, blue);
25809 # }
25810 #
25811 # var alphaFrac = rgb_color.alpha.value || 0.0;
25812 # var rgbParams = [red, green, blue].join(',');
25813 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25814 # };
25815 #
25816 # var rgbToCssColor_ = function(red, green, blue) {
25817 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25818 # var hexString = rgbNumber.toString(16);
25819 # var missingZeros = 6 - hexString.length;
25820 # var resultBuilder = ['#'];
25821 # for (var i = 0; i < missingZeros; i++) {
25822 # resultBuilder.push('0');
25823 # }
25824 # resultBuilder.push(hexString);
25825 # return resultBuilder.join('');
25826 # };
25827 #
25828 # // ...
25829 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25830 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25831 # the final pixel color is defined by the equation:
25832 #
25833 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25834 #
25835 # This means that a value of 1.0 corresponds to a solid color, whereas
25836 # a value of 0.0 corresponds to a completely transparent color. This
25837 # uses a wrapper message rather than a simple float scalar so that it is
25838 # possible to distinguish between a default value and the value being unset.
25839 # If omitted, this color object is to be rendered as a solid color
25840 # (as if the alpha value had been explicitly given with a value of 1.0).
25841 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25842 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25843 },
25844 "type": "A String", # How the value should be interpreted.
25845 "value": "A String", # The value this interpolation point uses. May be a formula.
25846 # Unused if type is MIN or
25847 # MAX.
25848 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025849 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025850 # These pin the gradient color scale according to the color,
25851 # type and value chosen.
25852 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
25853 # for simplicity of conversion to/from color representations in various
25854 # languages over compactness; for example, the fields of this representation
25855 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25856 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25857 # method in iOS; and, with just a little work, it can be easily formatted into
25858 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25859 #
25860 # Example (Java):
25861 #
25862 # import com.google.type.Color;
25863 #
25864 # // ...
25865 # public static java.awt.Color fromProto(Color protocolor) {
25866 # float alpha = protocolor.hasAlpha()
25867 # ? protocolor.getAlpha().getValue()
25868 # : 1.0;
25869 #
25870 # return new java.awt.Color(
25871 # protocolor.getRed(),
25872 # protocolor.getGreen(),
25873 # protocolor.getBlue(),
25874 # alpha);
25875 # }
25876 #
25877 # public static Color toProto(java.awt.Color color) {
25878 # float red = (float) color.getRed();
25879 # float green = (float) color.getGreen();
25880 # float blue = (float) color.getBlue();
25881 # float denominator = 255.0;
25882 # Color.Builder resultBuilder =
25883 # Color
25884 # .newBuilder()
25885 # .setRed(red / denominator)
25886 # .setGreen(green / denominator)
25887 # .setBlue(blue / denominator);
25888 # int alpha = color.getAlpha();
25889 # if (alpha != 255) {
25890 # result.setAlpha(
25891 # FloatValue
25892 # .newBuilder()
25893 # .setValue(((float) alpha) / denominator)
25894 # .build());
25895 # }
25896 # return resultBuilder.build();
25897 # }
25898 # // ...
25899 #
25900 # Example (iOS / Obj-C):
25901 #
25902 # // ...
25903 # static UIColor* fromProto(Color* protocolor) {
25904 # float red = [protocolor red];
25905 # float green = [protocolor green];
25906 # float blue = [protocolor blue];
25907 # FloatValue* alpha_wrapper = [protocolor alpha];
25908 # float alpha = 1.0;
25909 # if (alpha_wrapper != nil) {
25910 # alpha = [alpha_wrapper value];
25911 # }
25912 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25913 # }
25914 #
25915 # static Color* toProto(UIColor* color) {
25916 # CGFloat red, green, blue, alpha;
25917 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25918 # return nil;
25919 # }
25920 # Color* result = [Color alloc] init];
25921 # [result setRed:red];
25922 # [result setGreen:green];
25923 # [result setBlue:blue];
25924 # if (alpha <= 0.9999) {
25925 # [result setAlpha:floatWrapperWithValue(alpha)];
25926 # }
25927 # [result autorelease];
25928 # return result;
25929 # }
25930 # // ...
25931 #
25932 # Example (JavaScript):
25933 #
25934 # // ...
25935 #
25936 # var protoToCssColor = function(rgb_color) {
25937 # var redFrac = rgb_color.red || 0.0;
25938 # var greenFrac = rgb_color.green || 0.0;
25939 # var blueFrac = rgb_color.blue || 0.0;
25940 # var red = Math.floor(redFrac * 255);
25941 # var green = Math.floor(greenFrac * 255);
25942 # var blue = Math.floor(blueFrac * 255);
25943 #
25944 # if (!('alpha' in rgb_color)) {
25945 # return rgbToCssColor_(red, green, blue);
25946 # }
25947 #
25948 # var alphaFrac = rgb_color.alpha.value || 0.0;
25949 # var rgbParams = [red, green, blue].join(',');
25950 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25951 # };
25952 #
25953 # var rgbToCssColor_ = function(red, green, blue) {
25954 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25955 # var hexString = rgbNumber.toString(16);
25956 # var missingZeros = 6 - hexString.length;
25957 # var resultBuilder = ['#'];
25958 # for (var i = 0; i < missingZeros; i++) {
25959 # resultBuilder.push('0');
25960 # }
25961 # resultBuilder.push(hexString);
25962 # return resultBuilder.join('');
25963 # };
25964 #
25965 # // ...
25966 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25967 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25968 # the final pixel color is defined by the equation:
25969 #
25970 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25971 #
25972 # This means that a value of 1.0 corresponds to a solid color, whereas
25973 # a value of 0.0 corresponds to a completely transparent color. This
25974 # uses a wrapper message rather than a simple float scalar so that it is
25975 # possible to distinguish between a default value and the value being unset.
25976 # If omitted, this color object is to be rendered as a solid color
25977 # (as if the alpha value had been explicitly given with a value of 1.0).
25978 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25979 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25980 },
25981 "type": "A String", # How the value should be interpreted.
25982 "value": "A String", # The value this interpolation point uses. May be a formula.
25983 # Unused if type is MIN or
25984 # MAX.
25985 },
25986 },
25987 },
25988 ],
25989 "merges": [ # The ranges that are merged together.
25990 { # A range on a sheet.
25991 # All indexes are zero-based.
25992 # Indexes are half open, e.g the start index is inclusive
25993 # and the end index is exclusive -- [start_index, end_index).
25994 # Missing indexes indicate the range is unbounded on that side.
25995 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025996 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025997 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025998 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025999 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026000 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026001 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026002 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026003 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026004 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026005 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026006 # `Sheet1!A:B == sheet_id: 0,
26007 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026008 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026009 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026010 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026011 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026012 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026013 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026014 #
26015 # The start index must always be less than or equal to the end index.
26016 # If the start index equals the end index, then the range is empty.
26017 # Empty ranges are typically not meaningful and are usually rendered in the
26018 # UI as `#REF!`.
26019 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26020 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26021 "sheetId": 42, # The sheet this range is on.
26022 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26023 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26024 },
26025 ],
26026 "basicFilter": { # The default filter associated with a sheet. # The filter on this sheet, if any.
26027 "range": { # A range on a sheet. # The range the filter covers.
26028 # All indexes are zero-based.
26029 # Indexes are half open, e.g the start index is inclusive
26030 # and the end index is exclusive -- [start_index, end_index).
26031 # Missing indexes indicate the range is unbounded on that side.
26032 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026033 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026034 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026035 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026036 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026037 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026038 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026039 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026040 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026041 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026042 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026043 # `Sheet1!A:B == sheet_id: 0,
26044 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026045 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026046 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026047 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026048 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026049 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026050 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026051 #
26052 # The start index must always be less than or equal to the end index.
26053 # If the start index equals the end index, then the range is empty.
26054 # Empty ranges are typically not meaningful and are usually rendered in the
26055 # UI as `#REF!`.
26056 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26057 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26058 "sheetId": 42, # The sheet this range is on.
26059 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26060 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26061 },
26062 "sortSpecs": [ # The sort order per column. Later specifications are used when values
26063 # are equal in the earlier specifications.
26064 { # A sort order associated with a specific column or row.
26065 "sortOrder": "A String", # The order data should be sorted.
26066 "dimensionIndex": 42, # The dimension the sort should be applied to.
26067 },
26068 ],
26069 "criteria": { # The criteria for showing/hiding values per column.
26070 # The map's key is the column index, and the value is the criteria for
26071 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026072 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026073 "hiddenValues": [ # Values that should be hidden.
26074 "A String",
26075 ],
26076 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
26077 # (This does not override hiddenValues -- if a value is listed there,
26078 # it will still be hidden.)
26079 # BooleanConditions are used by conditional formatting,
26080 # data validation, and the criteria in filters.
26081 "type": "A String", # The type of condition.
26082 "values": [ # The values of the condition. The number of supported values depends
26083 # on the condition type. Some support zero values,
26084 # others one or two values,
26085 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
26086 { # The value of the condition.
26087 "relativeDate": "A String", # A relative date (based on the current date).
26088 # Valid only if the type is
26089 # DATE_BEFORE,
26090 # DATE_AFTER,
26091 # DATE_ON_OR_BEFORE or
26092 # DATE_ON_OR_AFTER.
26093 #
26094 # Relative dates are not supported in data validation.
26095 # They are supported only in conditional formatting and
26096 # conditional filters.
26097 "userEnteredValue": "A String", # A value the condition is based on.
26098 # The value will be parsed as if the user typed into a cell.
26099 # Formulas are supported (and must begin with an `=`).
26100 },
26101 ],
26102 },
26103 },
26104 },
26105 },
26106 "charts": [ # The specifications of every chart on this sheet.
26107 { # A chart embedded in a sheet.
26108 "chartId": 42, # The ID of the chart.
26109 "position": { # The position of an embedded object such as a chart. # The position of the chart.
26110 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
26111 # is chosen for you. Used only when writing.
26112 "sheetId": 42, # The sheet this is on. Set only if the embedded object
26113 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026114 "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 -070026115 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
26116 # All indexes are zero-based.
26117 "rowIndex": 42, # The row index of the coordinate.
26118 "columnIndex": 42, # The column index of the coordinate.
26119 "sheetId": 42, # The sheet this coordinate is on.
26120 },
26121 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
26122 # from the anchor cell.
26123 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
26124 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
26125 # from the anchor cell.
26126 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
26127 },
26128 },
26129 "spec": { # The specifications of a chart. # The specification of the chart.
26130 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026131 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
26132 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
26133 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
26134 "sources": [ # The ranges of data for a series or domain.
26135 # Exactly one dimension must have a length of 1,
26136 # and all sources in the list must have the same dimension
26137 # with length 1.
26138 # The domain (if it exists) & all series must have the same number
26139 # of source ranges. If using more than one source range, then the source
26140 # range at a given offset must be contiguous across the domain and series.
26141 #
26142 # For example, these are valid configurations:
26143 #
26144 # domain sources: A1:A5
26145 # series1 sources: B1:B5
26146 # series2 sources: D6:D10
26147 #
26148 # domain sources: A1:A5, C10:C12
26149 # series1 sources: B1:B5, D10:D12
26150 # series2 sources: C1:C5, E10:E12
26151 { # A range on a sheet.
26152 # All indexes are zero-based.
26153 # Indexes are half open, e.g the start index is inclusive
26154 # and the end index is exclusive -- [start_index, end_index).
26155 # Missing indexes indicate the range is unbounded on that side.
26156 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026157 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026158 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026159 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026160 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026161 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026162 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026163 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026164 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026165 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026166 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026167 # `Sheet1!A:B == sheet_id: 0,
26168 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026169 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026170 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026171 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026172 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026173 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026174 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026175 #
26176 # The start index must always be less than or equal to the end index.
26177 # If the start index equals the end index, then the range is empty.
26178 # Empty ranges are typically not meaningful and are usually rendered in the
26179 # UI as `#REF!`.
26180 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26181 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26182 "sheetId": 42, # The sheet this range is on.
26183 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26184 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26185 },
26186 ],
26187 },
26188 },
26189 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
26190 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
26191 "sources": [ # The ranges of data for a series or domain.
26192 # Exactly one dimension must have a length of 1,
26193 # and all sources in the list must have the same dimension
26194 # with length 1.
26195 # The domain (if it exists) & all series must have the same number
26196 # of source ranges. If using more than one source range, then the source
26197 # range at a given offset must be contiguous across the domain and series.
26198 #
26199 # For example, these are valid configurations:
26200 #
26201 # domain sources: A1:A5
26202 # series1 sources: B1:B5
26203 # series2 sources: D6:D10
26204 #
26205 # domain sources: A1:A5, C10:C12
26206 # series1 sources: B1:B5, D10:D12
26207 # series2 sources: C1:C5, E10:E12
26208 { # A range on a sheet.
26209 # All indexes are zero-based.
26210 # Indexes are half open, e.g the start index is inclusive
26211 # and the end index is exclusive -- [start_index, end_index).
26212 # Missing indexes indicate the range is unbounded on that side.
26213 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026214 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026215 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026216 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026217 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026218 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026219 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026220 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026221 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026222 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026223 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026224 # `Sheet1!A:B == sheet_id: 0,
26225 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026226 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026227 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026228 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026229 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026230 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026231 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026232 #
26233 # The start index must always be less than or equal to the end index.
26234 # If the start index equals the end index, then the range is empty.
26235 # Empty ranges are typically not meaningful and are usually rendered in the
26236 # UI as `#REF!`.
26237 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26238 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26239 "sheetId": 42, # The sheet this range is on.
26240 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26241 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26242 },
26243 ],
26244 },
26245 },
26246 "threeDimensional": True or False, # True if the pie is three dimensional.
26247 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
26248 "pieHole": 3.14, # The size of the hole in the pie chart.
26249 },
26250 "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 -070026251 # See BasicChartType for the list of all
26252 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026253 # of charts this supports.
26254 "headerCount": 42, # The number of rows or columns in the data that are "headers".
26255 # If not set, Google Sheets will guess how many rows are headers based
26256 # on the data.
26257 #
26258 # (Note that BasicChartAxis.title may override the axis title
26259 # inferred from the header values.)
26260 "series": [ # The data this chart is visualizing.
26261 { # A single series of data in a chart.
26262 # For example, if charting stock prices over time, multiple series may exist,
26263 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
26264 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
26265 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
26266 "sources": [ # The ranges of data for a series or domain.
26267 # Exactly one dimension must have a length of 1,
26268 # and all sources in the list must have the same dimension
26269 # with length 1.
26270 # The domain (if it exists) & all series must have the same number
26271 # of source ranges. If using more than one source range, then the source
26272 # range at a given offset must be contiguous across the domain and series.
26273 #
26274 # For example, these are valid configurations:
26275 #
26276 # domain sources: A1:A5
26277 # series1 sources: B1:B5
26278 # series2 sources: D6:D10
26279 #
26280 # domain sources: A1:A5, C10:C12
26281 # series1 sources: B1:B5, D10:D12
26282 # series2 sources: C1:C5, E10:E12
26283 { # A range on a sheet.
26284 # All indexes are zero-based.
26285 # Indexes are half open, e.g the start index is inclusive
26286 # and the end index is exclusive -- [start_index, end_index).
26287 # Missing indexes indicate the range is unbounded on that side.
26288 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026289 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026290 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026291 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026292 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026293 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026294 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026295 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026296 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026297 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026298 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026299 # `Sheet1!A:B == sheet_id: 0,
26300 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026301 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026302 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026303 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026304 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026305 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026306 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026307 #
26308 # The start index must always be less than or equal to the end index.
26309 # If the start index equals the end index, then the range is empty.
26310 # Empty ranges are typically not meaningful and are usually rendered in the
26311 # UI as `#REF!`.
26312 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26313 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26314 "sheetId": 42, # The sheet this range is on.
26315 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26316 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26317 },
26318 ],
26319 },
26320 },
26321 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
26322 # For example, if charting stocks over time, the "Volume" series
26323 # may want to be pinned to the right with the prices pinned to the left,
26324 # because the scale of trading volume is different than the scale of
26325 # prices.
26326 # It is an error to specify an axis that isn't a valid minor axis
26327 # for the chart's type.
26328 "type": "A String", # The type of this series. Valid only if the
26329 # chartType is
26330 # COMBO.
26331 # Different types will change the way the series is visualized.
26332 # Only LINE, AREA,
26333 # and COLUMN are supported.
26334 },
26335 ],
26336 "legendPosition": "A String", # The position of the chart legend.
26337 "domains": [ # The domain of data this is charting.
26338 # Only a single domain is currently supported.
26339 { # The domain of a chart.
26340 # For example, if charting stock prices over time, this would be the date.
26341 "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 -070026342 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026343 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
26344 "sources": [ # The ranges of data for a series or domain.
26345 # Exactly one dimension must have a length of 1,
26346 # and all sources in the list must have the same dimension
26347 # with length 1.
26348 # The domain (if it exists) & all series must have the same number
26349 # of source ranges. If using more than one source range, then the source
26350 # range at a given offset must be contiguous across the domain and series.
26351 #
26352 # For example, these are valid configurations:
26353 #
26354 # domain sources: A1:A5
26355 # series1 sources: B1:B5
26356 # series2 sources: D6:D10
26357 #
26358 # domain sources: A1:A5, C10:C12
26359 # series1 sources: B1:B5, D10:D12
26360 # series2 sources: C1:C5, E10:E12
26361 { # A range on a sheet.
26362 # All indexes are zero-based.
26363 # Indexes are half open, e.g the start index is inclusive
26364 # and the end index is exclusive -- [start_index, end_index).
26365 # Missing indexes indicate the range is unbounded on that side.
26366 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026367 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026368 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026369 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026370 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026371 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026372 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026373 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026374 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026375 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026376 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026377 # `Sheet1!A:B == sheet_id: 0,
26378 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026379 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026380 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026381 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026382 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026383 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026384 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026385 #
26386 # The start index must always be less than or equal to the end index.
26387 # If the start index equals the end index, then the range is empty.
26388 # Empty ranges are typically not meaningful and are usually rendered in the
26389 # UI as `#REF!`.
26390 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26391 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26392 "sheetId": 42, # The sheet this range is on.
26393 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26394 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26395 },
26396 ],
26397 },
26398 },
26399 },
26400 ],
26401 "chartType": "A String", # The type of the chart.
26402 "axis": [ # The axis on the chart.
26403 { # An axis of the chart.
26404 # A chart may not have more than one axis per
26405 # axis position.
26406 "position": "A String", # The position of this axis.
26407 "format": { # The format of a run of text in a cell. # The format of the title.
26408 # Only valid if the axis is not associated with the domain.
26409 # Absent values indicate that the field isn't specified.
26410 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
26411 # for simplicity of conversion to/from color representations in various
26412 # languages over compactness; for example, the fields of this representation
26413 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26414 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26415 # method in iOS; and, with just a little work, it can be easily formatted into
26416 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26417 #
26418 # Example (Java):
26419 #
26420 # import com.google.type.Color;
26421 #
26422 # // ...
26423 # public static java.awt.Color fromProto(Color protocolor) {
26424 # float alpha = protocolor.hasAlpha()
26425 # ? protocolor.getAlpha().getValue()
26426 # : 1.0;
26427 #
26428 # return new java.awt.Color(
26429 # protocolor.getRed(),
26430 # protocolor.getGreen(),
26431 # protocolor.getBlue(),
26432 # alpha);
26433 # }
26434 #
26435 # public static Color toProto(java.awt.Color color) {
26436 # float red = (float) color.getRed();
26437 # float green = (float) color.getGreen();
26438 # float blue = (float) color.getBlue();
26439 # float denominator = 255.0;
26440 # Color.Builder resultBuilder =
26441 # Color
26442 # .newBuilder()
26443 # .setRed(red / denominator)
26444 # .setGreen(green / denominator)
26445 # .setBlue(blue / denominator);
26446 # int alpha = color.getAlpha();
26447 # if (alpha != 255) {
26448 # result.setAlpha(
26449 # FloatValue
26450 # .newBuilder()
26451 # .setValue(((float) alpha) / denominator)
26452 # .build());
26453 # }
26454 # return resultBuilder.build();
26455 # }
26456 # // ...
26457 #
26458 # Example (iOS / Obj-C):
26459 #
26460 # // ...
26461 # static UIColor* fromProto(Color* protocolor) {
26462 # float red = [protocolor red];
26463 # float green = [protocolor green];
26464 # float blue = [protocolor blue];
26465 # FloatValue* alpha_wrapper = [protocolor alpha];
26466 # float alpha = 1.0;
26467 # if (alpha_wrapper != nil) {
26468 # alpha = [alpha_wrapper value];
26469 # }
26470 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26471 # }
26472 #
26473 # static Color* toProto(UIColor* color) {
26474 # CGFloat red, green, blue, alpha;
26475 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26476 # return nil;
26477 # }
26478 # Color* result = [Color alloc] init];
26479 # [result setRed:red];
26480 # [result setGreen:green];
26481 # [result setBlue:blue];
26482 # if (alpha <= 0.9999) {
26483 # [result setAlpha:floatWrapperWithValue(alpha)];
26484 # }
26485 # [result autorelease];
26486 # return result;
26487 # }
26488 # // ...
26489 #
26490 # Example (JavaScript):
26491 #
26492 # // ...
26493 #
26494 # var protoToCssColor = function(rgb_color) {
26495 # var redFrac = rgb_color.red || 0.0;
26496 # var greenFrac = rgb_color.green || 0.0;
26497 # var blueFrac = rgb_color.blue || 0.0;
26498 # var red = Math.floor(redFrac * 255);
26499 # var green = Math.floor(greenFrac * 255);
26500 # var blue = Math.floor(blueFrac * 255);
26501 #
26502 # if (!('alpha' in rgb_color)) {
26503 # return rgbToCssColor_(red, green, blue);
26504 # }
26505 #
26506 # var alphaFrac = rgb_color.alpha.value || 0.0;
26507 # var rgbParams = [red, green, blue].join(',');
26508 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
26509 # };
26510 #
26511 # var rgbToCssColor_ = function(red, green, blue) {
26512 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
26513 # var hexString = rgbNumber.toString(16);
26514 # var missingZeros = 6 - hexString.length;
26515 # var resultBuilder = ['#'];
26516 # for (var i = 0; i < missingZeros; i++) {
26517 # resultBuilder.push('0');
26518 # }
26519 # resultBuilder.push(hexString);
26520 # return resultBuilder.join('');
26521 # };
26522 #
26523 # // ...
26524 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
26525 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
26526 # the final pixel color is defined by the equation:
26527 #
26528 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
26529 #
26530 # This means that a value of 1.0 corresponds to a solid color, whereas
26531 # a value of 0.0 corresponds to a completely transparent color. This
26532 # uses a wrapper message rather than a simple float scalar so that it is
26533 # possible to distinguish between a default value and the value being unset.
26534 # If omitted, this color object is to be rendered as a solid color
26535 # (as if the alpha value had been explicitly given with a value of 1.0).
26536 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
26537 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
26538 },
26539 "bold": True or False, # True if the text is bold.
26540 "strikethrough": True or False, # True if the text has a strikethrough.
26541 "fontFamily": "A String", # The font family.
26542 "fontSize": 42, # The size of the font.
26543 "italic": True or False, # True if the text is italicized.
26544 "underline": True or False, # True if the text is underlined.
26545 },
26546 "title": "A String", # The title of this axis. If set, this overrides any title inferred
26547 # from headers of the data.
26548 },
26549 ],
26550 },
26551 "title": "A String", # The title of the chart.
26552 },
26553 },
26554 ],
26555 "filterViews": [ # The filter views in this sheet.
26556 { # A filter view.
26557 "title": "A String", # The name of the filter view.
26558 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
26559 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026560 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026561 # may be set.
26562 "filterViewId": 42, # The ID of the filter view.
26563 "range": { # A range on a sheet. # The range this filter view covers.
26564 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026565 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026566 # may be set.
26567 # All indexes are zero-based.
26568 # Indexes are half open, e.g the start index is inclusive
26569 # and the end index is exclusive -- [start_index, end_index).
26570 # Missing indexes indicate the range is unbounded on that side.
26571 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026572 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026573 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026574 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026575 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026576 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026577 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026578 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026579 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026580 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026581 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026582 # `Sheet1!A:B == sheet_id: 0,
26583 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026584 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026585 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026586 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026587 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026588 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026589 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026590 #
26591 # The start index must always be less than or equal to the end index.
26592 # If the start index equals the end index, then the range is empty.
26593 # Empty ranges are typically not meaningful and are usually rendered in the
26594 # UI as `#REF!`.
26595 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26596 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26597 "sheetId": 42, # The sheet this range is on.
26598 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26599 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26600 },
26601 "sortSpecs": [ # The sort order per column. Later specifications are used when values
26602 # are equal in the earlier specifications.
26603 { # A sort order associated with a specific column or row.
26604 "sortOrder": "A String", # The order data should be sorted.
26605 "dimensionIndex": 42, # The dimension the sort should be applied to.
26606 },
26607 ],
26608 "criteria": { # The criteria for showing/hiding values per column.
26609 # The map's key is the column index, and the value is the criteria for
26610 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026611 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026612 "hiddenValues": [ # Values that should be hidden.
26613 "A String",
26614 ],
26615 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
26616 # (This does not override hiddenValues -- if a value is listed there,
26617 # it will still be hidden.)
26618 # BooleanConditions are used by conditional formatting,
26619 # data validation, and the criteria in filters.
26620 "type": "A String", # The type of condition.
26621 "values": [ # The values of the condition. The number of supported values depends
26622 # on the condition type. Some support zero values,
26623 # others one or two values,
26624 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
26625 { # The value of the condition.
26626 "relativeDate": "A String", # A relative date (based on the current date).
26627 # Valid only if the type is
26628 # DATE_BEFORE,
26629 # DATE_AFTER,
26630 # DATE_ON_OR_BEFORE or
26631 # DATE_ON_OR_AFTER.
26632 #
26633 # Relative dates are not supported in data validation.
26634 # They are supported only in conditional formatting and
26635 # conditional filters.
26636 "userEnteredValue": "A String", # A value the condition is based on.
26637 # The value will be parsed as if the user typed into a cell.
26638 # Formulas are supported (and must begin with an `=`).
26639 },
26640 ],
26641 },
26642 },
26643 },
26644 },
26645 ],
26646 "protectedRanges": [ # The protected ranges in this sheet.
26647 { # A protected range.
26648 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
26649 # Unprotected ranges are only supported on protected sheets.
26650 { # A range on a sheet.
26651 # All indexes are zero-based.
26652 # Indexes are half open, e.g the start index is inclusive
26653 # and the end index is exclusive -- [start_index, end_index).
26654 # Missing indexes indicate the range is unbounded on that side.
26655 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026656 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026657 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026658 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026659 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026660 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026661 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026662 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026663 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026664 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026665 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026666 # `Sheet1!A:B == sheet_id: 0,
26667 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026668 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026669 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026670 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026671 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026672 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026673 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026674 #
26675 # The start index must always be less than or equal to the end index.
26676 # If the start index equals the end index, then the range is empty.
26677 # Empty ranges are typically not meaningful and are usually rendered in the
26678 # UI as `#REF!`.
26679 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26680 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26681 "sheetId": 42, # The sheet this range is on.
26682 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26683 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26684 },
26685 ],
26686 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
26687 # protected area.
26688 # This field is read-only.
26689 "description": "A String", # The description of this protected range.
26690 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
26691 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026692 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026693 # may be set.
26694 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
26695 # This field is only visible to users with edit access to the protected
26696 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026697 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026698 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
26699 # range. Domain protection is only supported on documents within a domain.
26700 "users": [ # The email addresses of users with edit access to the protected range.
26701 "A String",
26702 ],
26703 "groups": [ # The email addresses of groups with edit access to the protected range.
26704 "A String",
26705 ],
26706 },
26707 "protectedRangeId": 42, # The ID of the protected range.
26708 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026709 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026710 # Warning-based protection means that every user can edit data in the
26711 # protected range, except editing will prompt a warning asking the user
26712 # to confirm the edit.
26713 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026714 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026715 # Additionally, if this field is changed from true to false and the
26716 # `editors` field is not set (nor included in the field mask), then
26717 # the editors will be set to all the editors in the document.
26718 "range": { # A range on a sheet. # The range that is being protected.
26719 # The range may be fully unbounded, in which case this is considered
26720 # a protected sheet.
26721 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026722 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026723 # may be set.
26724 # All indexes are zero-based.
26725 # Indexes are half open, e.g the start index is inclusive
26726 # and the end index is exclusive -- [start_index, end_index).
26727 # Missing indexes indicate the range is unbounded on that side.
26728 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026729 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026730 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026731 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026732 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026733 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026734 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026735 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026736 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026737 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026738 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026739 # `Sheet1!A:B == sheet_id: 0,
26740 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026741 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026742 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026743 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026744 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026745 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026746 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026747 #
26748 # The start index must always be less than or equal to the end index.
26749 # If the start index equals the end index, then the range is empty.
26750 # Empty ranges are typically not meaningful and are usually rendered in the
26751 # UI as `#REF!`.
26752 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26753 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26754 "sheetId": 42, # The sheet this range is on.
26755 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26756 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26757 },
26758 },
26759 ],
26760 "data": [ # Data in the grid, if this is a grid sheet.
26761 # The number of GridData objects returned is dependent on the number of
26762 # ranges requested on this sheet. For example, if this is representing
26763 # `Sheet1`, and the spreadsheet was requested with ranges
26764 # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a
26765 # startRow/startColumn of `0`,
26766 # while the second one will have `startRow 14` (zero-based row 15),
26767 # and `startColumn 3` (zero-based column D).
26768 { # Data in the grid, as well as metadata about the dimensions.
26769 "startRow": 42, # The first row this GridData refers to, zero-based.
26770 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026771 # in start_row.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026772 { # Properties about a dimension.
26773 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
26774 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
26775 "hiddenByFilter": True or False, # True if this dimension is being filtered.
26776 # This field is read-only.
26777 },
26778 ],
26779 "startColumn": 42, # The first column this GridData refers to, zero-based.
26780 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026781 # in start_column.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026782 { # Properties about a dimension.
26783 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
26784 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
26785 "hiddenByFilter": True or False, # True if this dimension is being filtered.
26786 # This field is read-only.
26787 },
26788 ],
26789 "rowData": [ # The data in the grid, one entry per row,
26790 # starting with the row in startRow.
26791 # The values in RowData will correspond to columns starting
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026792 # at start_column.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026793 { # Data about each cell in a row.
26794 "values": [ # The values in the row, one per column.
26795 { # Data about a specific cell.
26796 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
26797 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026798 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026799 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026800 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026801 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
26802 # or vertically (as rows).
26803 "rows": [ # Each row grouping in the pivot table.
26804 { # A single grouping (either row or column) in a pivot table.
26805 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
26806 "valueMetadata": [ # Metadata about values in the grouping.
26807 { # Metadata about a value in a pivot grouping.
26808 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
26809 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
26810 # (Note that formulaValue is not valid,
26811 # because the values will be calculated.)
26812 "numberValue": 3.14, # Represents a double value.
26813 # Note: Dates, Times and DateTimes are represented as doubles in
26814 # "serial number" format.
26815 "boolValue": True or False, # Represents a boolean value.
26816 "formulaValue": "A String", # Represents a formula.
26817 "stringValue": "A String", # Represents a string value.
26818 # Leading single quotes are not included. For example, if the user typed
26819 # `'123` into the UI, this would be represented as a `stringValue` of
26820 # `"123"`.
26821 "errorValue": { # An error in a cell. # Represents an error.
26822 # This field is read-only.
26823 "message": "A String", # A message with more information about the error
26824 # (in the spreadsheet's locale).
26825 "type": "A String", # The type of error.
26826 },
26827 },
26828 },
26829 ],
26830 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
26831 # If not specified, sorting is alphabetical by this group's values.
26832 "buckets": [ # Determines the bucket from which values are chosen to sort.
26833 #
26834 # For example, in a pivot table with one row group & two column groups,
26835 # the row group can list up to two values. The first value corresponds
26836 # to a value within the first column group, and the second value
26837 # corresponds to a value in the second column group. If no values
26838 # are listed, this would indicate that the row should be sorted according
26839 # to the "Grand Total" over the column groups. If a single value is listed,
26840 # this would correspond to using the "Total" of that bucket.
26841 { # The kinds of value that a cell in a spreadsheet can have.
26842 "numberValue": 3.14, # Represents a double value.
26843 # Note: Dates, Times and DateTimes are represented as doubles in
26844 # "serial number" format.
26845 "boolValue": True or False, # Represents a boolean value.
26846 "formulaValue": "A String", # Represents a formula.
26847 "stringValue": "A String", # Represents a string value.
26848 # Leading single quotes are not included. For example, if the user typed
26849 # `'123` into the UI, this would be represented as a `stringValue` of
26850 # `"123"`.
26851 "errorValue": { # An error in a cell. # Represents an error.
26852 # This field is read-only.
26853 "message": "A String", # A message with more information about the error
26854 # (in the spreadsheet's locale).
26855 "type": "A String", # The type of error.
26856 },
26857 },
26858 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026859 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026860 # grouping should be sorted by.
26861 },
26862 "sortOrder": "A String", # The order the values in this group should be sorted.
26863 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
26864 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026865 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026866 # means this group refers to column `C`, whereas the offset `1` would refer
26867 # to column `D`.
26868 },
26869 ],
26870 "source": { # A range on a sheet. # The range the pivot table is reading data from.
26871 # All indexes are zero-based.
26872 # Indexes are half open, e.g the start index is inclusive
26873 # and the end index is exclusive -- [start_index, end_index).
26874 # Missing indexes indicate the range is unbounded on that side.
26875 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026876 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026877 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026878 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026879 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026880 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026881 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026882 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026883 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026884 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026885 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026886 # `Sheet1!A:B == sheet_id: 0,
26887 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026888 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026889 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026890 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026891 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026892 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026893 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026894 #
26895 # The start index must always be less than or equal to the end index.
26896 # If the start index equals the end index, then the range is empty.
26897 # Empty ranges are typically not meaningful and are usually rendered in the
26898 # UI as `#REF!`.
26899 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
26900 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
26901 "sheetId": 42, # The sheet this range is on.
26902 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
26903 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
26904 },
26905 "values": [ # A list of values to include in the pivot table.
26906 { # The definition of how a value in a pivot table should be calculated.
26907 "formula": "A String", # A custom formula to calculate the value. The formula must start
26908 # with an `=` character.
26909 "summarizeFunction": "A String", # A function to summarize the value.
26910 # If formula is set, the only supported values are
26911 # SUM and
26912 # CUSTOM.
26913 # If sourceColumnOffset is set, then `CUSTOM`
26914 # is not supported.
26915 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
26916 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026917 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026918 # means this value refers to column `C`, whereas the offset `1` would
26919 # refer to column `D`.
26920 "name": "A String", # A name to use for the value. This is only used if formula was set.
26921 # Otherwise, the column name is used.
26922 },
26923 ],
26924 "criteria": { # An optional mapping of filters per source column offset.
26925 #
26926 # The filters will be applied before aggregating data into the pivot table.
26927 # The map's key is the column offset of the source range that you want to
26928 # filter, and the value is the criteria for that column.
26929 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026930 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026931 # for column `C`, whereas the key `1` is for column `D`.
26932 "a_key": { # Criteria for showing/hiding rows in a pivot table.
26933 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
26934 "A String",
26935 ],
26936 },
26937 },
26938 "columns": [ # Each column grouping in the pivot table.
26939 { # A single grouping (either row or column) in a pivot table.
26940 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
26941 "valueMetadata": [ # Metadata about values in the grouping.
26942 { # Metadata about a value in a pivot grouping.
26943 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
26944 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
26945 # (Note that formulaValue is not valid,
26946 # because the values will be calculated.)
26947 "numberValue": 3.14, # Represents a double value.
26948 # Note: Dates, Times and DateTimes are represented as doubles in
26949 # "serial number" format.
26950 "boolValue": True or False, # Represents a boolean value.
26951 "formulaValue": "A String", # Represents a formula.
26952 "stringValue": "A String", # Represents a string value.
26953 # Leading single quotes are not included. For example, if the user typed
26954 # `'123` into the UI, this would be represented as a `stringValue` of
26955 # `"123"`.
26956 "errorValue": { # An error in a cell. # Represents an error.
26957 # This field is read-only.
26958 "message": "A String", # A message with more information about the error
26959 # (in the spreadsheet's locale).
26960 "type": "A String", # The type of error.
26961 },
26962 },
26963 },
26964 ],
26965 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
26966 # If not specified, sorting is alphabetical by this group's values.
26967 "buckets": [ # Determines the bucket from which values are chosen to sort.
26968 #
26969 # For example, in a pivot table with one row group & two column groups,
26970 # the row group can list up to two values. The first value corresponds
26971 # to a value within the first column group, and the second value
26972 # corresponds to a value in the second column group. If no values
26973 # are listed, this would indicate that the row should be sorted according
26974 # to the "Grand Total" over the column groups. If a single value is listed,
26975 # this would correspond to using the "Total" of that bucket.
26976 { # The kinds of value that a cell in a spreadsheet can have.
26977 "numberValue": 3.14, # Represents a double value.
26978 # Note: Dates, Times and DateTimes are represented as doubles in
26979 # "serial number" format.
26980 "boolValue": True or False, # Represents a boolean value.
26981 "formulaValue": "A String", # Represents a formula.
26982 "stringValue": "A String", # Represents a string value.
26983 # Leading single quotes are not included. For example, if the user typed
26984 # `'123` into the UI, this would be represented as a `stringValue` of
26985 # `"123"`.
26986 "errorValue": { # An error in a cell. # Represents an error.
26987 # This field is read-only.
26988 "message": "A String", # A message with more information about the error
26989 # (in the spreadsheet's locale).
26990 "type": "A String", # The type of error.
26991 },
26992 },
26993 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026994 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026995 # grouping should be sorted by.
26996 },
26997 "sortOrder": "A String", # The order the values in this group should be sorted.
26998 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
26999 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027000 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027001 # means this group refers to column `C`, whereas the offset `1` would refer
27002 # to column `D`.
27003 },
27004 ],
27005 },
27006 "hyperlink": "A String", # A hyperlink this cell points to, if any.
27007 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
27008 "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
27009 # the calculated value. For cells with literals, this will be
27010 # the same as the user_entered_value.
27011 # This field is read-only.
27012 "numberValue": 3.14, # Represents a double value.
27013 # Note: Dates, Times and DateTimes are represented as doubles in
27014 # "serial number" format.
27015 "boolValue": True or False, # Represents a boolean value.
27016 "formulaValue": "A String", # Represents a formula.
27017 "stringValue": "A String", # Represents a string value.
27018 # Leading single quotes are not included. For example, if the user typed
27019 # `'123` into the UI, this would be represented as a `stringValue` of
27020 # `"123"`.
27021 "errorValue": { # An error in a cell. # Represents an error.
27022 # This field is read-only.
27023 "message": "A String", # A message with more information about the error
27024 # (in the spreadsheet's locale).
27025 "type": "A String", # The type of error.
27026 },
27027 },
27028 "formattedValue": "A String", # The formatted value of the cell.
27029 # This is the value as it's shown to the user.
27030 # This field is read-only.
27031 "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()`
27032 # Note: Dates, Times and DateTimes are represented as doubles in
27033 # serial number format.
27034 "numberValue": 3.14, # Represents a double value.
27035 # Note: Dates, Times and DateTimes are represented as doubles in
27036 # "serial number" format.
27037 "boolValue": True or False, # Represents a boolean value.
27038 "formulaValue": "A String", # Represents a formula.
27039 "stringValue": "A String", # Represents a string value.
27040 # Leading single quotes are not included. For example, if the user typed
27041 # `'123` into the UI, this would be represented as a `stringValue` of
27042 # `"123"`.
27043 "errorValue": { # An error in a cell. # Represents an error.
27044 # This field is read-only.
27045 "message": "A String", # A message with more information about the error
27046 # (in the spreadsheet's locale).
27047 "type": "A String", # The type of error.
27048 },
27049 },
27050 "note": "A String", # Any note on the cell.
27051 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
27052 # This includes the results of applying any conditional formatting and,
27053 # if the cell contains a formula, the computed number format.
27054 # If the effective format is the default format, effective format will
27055 # not be written.
27056 # This field is read-only.
27057 "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 -070027058 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
27059 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070027060 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
27061 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027062 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027063 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027064 },
27065 "textDirection": "A String", # The direction of the text in the cell.
27066 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
27067 # When updating padding, every field must be specified.
27068 "top": 42, # The top padding of the cell.
27069 "right": 42, # The right padding of the cell.
27070 "bottom": 42, # The bottom padding of the cell.
27071 "left": 42, # The left padding of the cell.
27072 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027073 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027074 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
27075 # for simplicity of conversion to/from color representations in various
27076 # languages over compactness; for example, the fields of this representation
27077 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27078 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27079 # method in iOS; and, with just a little work, it can be easily formatted into
27080 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27081 #
27082 # Example (Java):
27083 #
27084 # import com.google.type.Color;
27085 #
27086 # // ...
27087 # public static java.awt.Color fromProto(Color protocolor) {
27088 # float alpha = protocolor.hasAlpha()
27089 # ? protocolor.getAlpha().getValue()
27090 # : 1.0;
27091 #
27092 # return new java.awt.Color(
27093 # protocolor.getRed(),
27094 # protocolor.getGreen(),
27095 # protocolor.getBlue(),
27096 # alpha);
27097 # }
27098 #
27099 # public static Color toProto(java.awt.Color color) {
27100 # float red = (float) color.getRed();
27101 # float green = (float) color.getGreen();
27102 # float blue = (float) color.getBlue();
27103 # float denominator = 255.0;
27104 # Color.Builder resultBuilder =
27105 # Color
27106 # .newBuilder()
27107 # .setRed(red / denominator)
27108 # .setGreen(green / denominator)
27109 # .setBlue(blue / denominator);
27110 # int alpha = color.getAlpha();
27111 # if (alpha != 255) {
27112 # result.setAlpha(
27113 # FloatValue
27114 # .newBuilder()
27115 # .setValue(((float) alpha) / denominator)
27116 # .build());
27117 # }
27118 # return resultBuilder.build();
27119 # }
27120 # // ...
27121 #
27122 # Example (iOS / Obj-C):
27123 #
27124 # // ...
27125 # static UIColor* fromProto(Color* protocolor) {
27126 # float red = [protocolor red];
27127 # float green = [protocolor green];
27128 # float blue = [protocolor blue];
27129 # FloatValue* alpha_wrapper = [protocolor alpha];
27130 # float alpha = 1.0;
27131 # if (alpha_wrapper != nil) {
27132 # alpha = [alpha_wrapper value];
27133 # }
27134 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27135 # }
27136 #
27137 # static Color* toProto(UIColor* color) {
27138 # CGFloat red, green, blue, alpha;
27139 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27140 # return nil;
27141 # }
27142 # Color* result = [Color alloc] init];
27143 # [result setRed:red];
27144 # [result setGreen:green];
27145 # [result setBlue:blue];
27146 # if (alpha <= 0.9999) {
27147 # [result setAlpha:floatWrapperWithValue(alpha)];
27148 # }
27149 # [result autorelease];
27150 # return result;
27151 # }
27152 # // ...
27153 #
27154 # Example (JavaScript):
27155 #
27156 # // ...
27157 #
27158 # var protoToCssColor = function(rgb_color) {
27159 # var redFrac = rgb_color.red || 0.0;
27160 # var greenFrac = rgb_color.green || 0.0;
27161 # var blueFrac = rgb_color.blue || 0.0;
27162 # var red = Math.floor(redFrac * 255);
27163 # var green = Math.floor(greenFrac * 255);
27164 # var blue = Math.floor(blueFrac * 255);
27165 #
27166 # if (!('alpha' in rgb_color)) {
27167 # return rgbToCssColor_(red, green, blue);
27168 # }
27169 #
27170 # var alphaFrac = rgb_color.alpha.value || 0.0;
27171 # var rgbParams = [red, green, blue].join(',');
27172 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27173 # };
27174 #
27175 # var rgbToCssColor_ = function(red, green, blue) {
27176 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27177 # var hexString = rgbNumber.toString(16);
27178 # var missingZeros = 6 - hexString.length;
27179 # var resultBuilder = ['#'];
27180 # for (var i = 0; i < missingZeros; i++) {
27181 # resultBuilder.push('0');
27182 # }
27183 # resultBuilder.push(hexString);
27184 # return resultBuilder.join('');
27185 # };
27186 #
27187 # // ...
27188 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27189 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27190 # the final pixel color is defined by the equation:
27191 #
27192 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27193 #
27194 # This means that a value of 1.0 corresponds to a solid color, whereas
27195 # a value of 0.0 corresponds to a completely transparent color. This
27196 # uses a wrapper message rather than a simple float scalar so that it is
27197 # possible to distinguish between a default value and the value being unset.
27198 # If omitted, this color object is to be rendered as a solid color
27199 # (as if the alpha value had been explicitly given with a value of 1.0).
27200 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27201 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27202 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027203 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027204 "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).
27205 # Absent values indicate that the field isn't specified.
27206 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
27207 # for simplicity of conversion to/from color representations in various
27208 # languages over compactness; for example, the fields of this representation
27209 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27210 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27211 # method in iOS; and, with just a little work, it can be easily formatted into
27212 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27213 #
27214 # Example (Java):
27215 #
27216 # import com.google.type.Color;
27217 #
27218 # // ...
27219 # public static java.awt.Color fromProto(Color protocolor) {
27220 # float alpha = protocolor.hasAlpha()
27221 # ? protocolor.getAlpha().getValue()
27222 # : 1.0;
27223 #
27224 # return new java.awt.Color(
27225 # protocolor.getRed(),
27226 # protocolor.getGreen(),
27227 # protocolor.getBlue(),
27228 # alpha);
27229 # }
27230 #
27231 # public static Color toProto(java.awt.Color color) {
27232 # float red = (float) color.getRed();
27233 # float green = (float) color.getGreen();
27234 # float blue = (float) color.getBlue();
27235 # float denominator = 255.0;
27236 # Color.Builder resultBuilder =
27237 # Color
27238 # .newBuilder()
27239 # .setRed(red / denominator)
27240 # .setGreen(green / denominator)
27241 # .setBlue(blue / denominator);
27242 # int alpha = color.getAlpha();
27243 # if (alpha != 255) {
27244 # result.setAlpha(
27245 # FloatValue
27246 # .newBuilder()
27247 # .setValue(((float) alpha) / denominator)
27248 # .build());
27249 # }
27250 # return resultBuilder.build();
27251 # }
27252 # // ...
27253 #
27254 # Example (iOS / Obj-C):
27255 #
27256 # // ...
27257 # static UIColor* fromProto(Color* protocolor) {
27258 # float red = [protocolor red];
27259 # float green = [protocolor green];
27260 # float blue = [protocolor blue];
27261 # FloatValue* alpha_wrapper = [protocolor alpha];
27262 # float alpha = 1.0;
27263 # if (alpha_wrapper != nil) {
27264 # alpha = [alpha_wrapper value];
27265 # }
27266 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27267 # }
27268 #
27269 # static Color* toProto(UIColor* color) {
27270 # CGFloat red, green, blue, alpha;
27271 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27272 # return nil;
27273 # }
27274 # Color* result = [Color alloc] init];
27275 # [result setRed:red];
27276 # [result setGreen:green];
27277 # [result setBlue:blue];
27278 # if (alpha <= 0.9999) {
27279 # [result setAlpha:floatWrapperWithValue(alpha)];
27280 # }
27281 # [result autorelease];
27282 # return result;
27283 # }
27284 # // ...
27285 #
27286 # Example (JavaScript):
27287 #
27288 # // ...
27289 #
27290 # var protoToCssColor = function(rgb_color) {
27291 # var redFrac = rgb_color.red || 0.0;
27292 # var greenFrac = rgb_color.green || 0.0;
27293 # var blueFrac = rgb_color.blue || 0.0;
27294 # var red = Math.floor(redFrac * 255);
27295 # var green = Math.floor(greenFrac * 255);
27296 # var blue = Math.floor(blueFrac * 255);
27297 #
27298 # if (!('alpha' in rgb_color)) {
27299 # return rgbToCssColor_(red, green, blue);
27300 # }
27301 #
27302 # var alphaFrac = rgb_color.alpha.value || 0.0;
27303 # var rgbParams = [red, green, blue].join(',');
27304 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27305 # };
27306 #
27307 # var rgbToCssColor_ = function(red, green, blue) {
27308 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27309 # var hexString = rgbNumber.toString(16);
27310 # var missingZeros = 6 - hexString.length;
27311 # var resultBuilder = ['#'];
27312 # for (var i = 0; i < missingZeros; i++) {
27313 # resultBuilder.push('0');
27314 # }
27315 # resultBuilder.push(hexString);
27316 # return resultBuilder.join('');
27317 # };
27318 #
27319 # // ...
27320 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27321 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27322 # the final pixel color is defined by the equation:
27323 #
27324 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27325 #
27326 # This means that a value of 1.0 corresponds to a solid color, whereas
27327 # a value of 0.0 corresponds to a completely transparent color. This
27328 # uses a wrapper message rather than a simple float scalar so that it is
27329 # possible to distinguish between a default value and the value being unset.
27330 # If omitted, this color object is to be rendered as a solid color
27331 # (as if the alpha value had been explicitly given with a value of 1.0).
27332 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27333 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27334 },
27335 "bold": True or False, # True if the text is bold.
27336 "strikethrough": True or False, # True if the text has a strikethrough.
27337 "fontFamily": "A String", # The font family.
27338 "fontSize": 42, # The size of the font.
27339 "italic": True or False, # True if the text is italicized.
27340 "underline": True or False, # True if the text is underlined.
27341 },
27342 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
27343 "borders": { # The borders of the cell. # The borders of the cell.
27344 "top": { # A border along a cell. # The top border of the cell.
27345 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
27346 # for simplicity of conversion to/from color representations in various
27347 # languages over compactness; for example, the fields of this representation
27348 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27349 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27350 # method in iOS; and, with just a little work, it can be easily formatted into
27351 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27352 #
27353 # Example (Java):
27354 #
27355 # import com.google.type.Color;
27356 #
27357 # // ...
27358 # public static java.awt.Color fromProto(Color protocolor) {
27359 # float alpha = protocolor.hasAlpha()
27360 # ? protocolor.getAlpha().getValue()
27361 # : 1.0;
27362 #
27363 # return new java.awt.Color(
27364 # protocolor.getRed(),
27365 # protocolor.getGreen(),
27366 # protocolor.getBlue(),
27367 # alpha);
27368 # }
27369 #
27370 # public static Color toProto(java.awt.Color color) {
27371 # float red = (float) color.getRed();
27372 # float green = (float) color.getGreen();
27373 # float blue = (float) color.getBlue();
27374 # float denominator = 255.0;
27375 # Color.Builder resultBuilder =
27376 # Color
27377 # .newBuilder()
27378 # .setRed(red / denominator)
27379 # .setGreen(green / denominator)
27380 # .setBlue(blue / denominator);
27381 # int alpha = color.getAlpha();
27382 # if (alpha != 255) {
27383 # result.setAlpha(
27384 # FloatValue
27385 # .newBuilder()
27386 # .setValue(((float) alpha) / denominator)
27387 # .build());
27388 # }
27389 # return resultBuilder.build();
27390 # }
27391 # // ...
27392 #
27393 # Example (iOS / Obj-C):
27394 #
27395 # // ...
27396 # static UIColor* fromProto(Color* protocolor) {
27397 # float red = [protocolor red];
27398 # float green = [protocolor green];
27399 # float blue = [protocolor blue];
27400 # FloatValue* alpha_wrapper = [protocolor alpha];
27401 # float alpha = 1.0;
27402 # if (alpha_wrapper != nil) {
27403 # alpha = [alpha_wrapper value];
27404 # }
27405 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27406 # }
27407 #
27408 # static Color* toProto(UIColor* color) {
27409 # CGFloat red, green, blue, alpha;
27410 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27411 # return nil;
27412 # }
27413 # Color* result = [Color alloc] init];
27414 # [result setRed:red];
27415 # [result setGreen:green];
27416 # [result setBlue:blue];
27417 # if (alpha <= 0.9999) {
27418 # [result setAlpha:floatWrapperWithValue(alpha)];
27419 # }
27420 # [result autorelease];
27421 # return result;
27422 # }
27423 # // ...
27424 #
27425 # Example (JavaScript):
27426 #
27427 # // ...
27428 #
27429 # var protoToCssColor = function(rgb_color) {
27430 # var redFrac = rgb_color.red || 0.0;
27431 # var greenFrac = rgb_color.green || 0.0;
27432 # var blueFrac = rgb_color.blue || 0.0;
27433 # var red = Math.floor(redFrac * 255);
27434 # var green = Math.floor(greenFrac * 255);
27435 # var blue = Math.floor(blueFrac * 255);
27436 #
27437 # if (!('alpha' in rgb_color)) {
27438 # return rgbToCssColor_(red, green, blue);
27439 # }
27440 #
27441 # var alphaFrac = rgb_color.alpha.value || 0.0;
27442 # var rgbParams = [red, green, blue].join(',');
27443 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27444 # };
27445 #
27446 # var rgbToCssColor_ = function(red, green, blue) {
27447 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27448 # var hexString = rgbNumber.toString(16);
27449 # var missingZeros = 6 - hexString.length;
27450 # var resultBuilder = ['#'];
27451 # for (var i = 0; i < missingZeros; i++) {
27452 # resultBuilder.push('0');
27453 # }
27454 # resultBuilder.push(hexString);
27455 # return resultBuilder.join('');
27456 # };
27457 #
27458 # // ...
27459 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27460 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27461 # the final pixel color is defined by the equation:
27462 #
27463 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27464 #
27465 # This means that a value of 1.0 corresponds to a solid color, whereas
27466 # a value of 0.0 corresponds to a completely transparent color. This
27467 # uses a wrapper message rather than a simple float scalar so that it is
27468 # possible to distinguish between a default value and the value being unset.
27469 # If omitted, this color object is to be rendered as a solid color
27470 # (as if the alpha value had been explicitly given with a value of 1.0).
27471 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27472 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27473 },
27474 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027475 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027476 "style": "A String", # The style of the border.
27477 },
27478 "right": { # A border along a cell. # The right border of the cell.
27479 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
27480 # for simplicity of conversion to/from color representations in various
27481 # languages over compactness; for example, the fields of this representation
27482 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27483 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27484 # method in iOS; and, with just a little work, it can be easily formatted into
27485 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27486 #
27487 # Example (Java):
27488 #
27489 # import com.google.type.Color;
27490 #
27491 # // ...
27492 # public static java.awt.Color fromProto(Color protocolor) {
27493 # float alpha = protocolor.hasAlpha()
27494 # ? protocolor.getAlpha().getValue()
27495 # : 1.0;
27496 #
27497 # return new java.awt.Color(
27498 # protocolor.getRed(),
27499 # protocolor.getGreen(),
27500 # protocolor.getBlue(),
27501 # alpha);
27502 # }
27503 #
27504 # public static Color toProto(java.awt.Color color) {
27505 # float red = (float) color.getRed();
27506 # float green = (float) color.getGreen();
27507 # float blue = (float) color.getBlue();
27508 # float denominator = 255.0;
27509 # Color.Builder resultBuilder =
27510 # Color
27511 # .newBuilder()
27512 # .setRed(red / denominator)
27513 # .setGreen(green / denominator)
27514 # .setBlue(blue / denominator);
27515 # int alpha = color.getAlpha();
27516 # if (alpha != 255) {
27517 # result.setAlpha(
27518 # FloatValue
27519 # .newBuilder()
27520 # .setValue(((float) alpha) / denominator)
27521 # .build());
27522 # }
27523 # return resultBuilder.build();
27524 # }
27525 # // ...
27526 #
27527 # Example (iOS / Obj-C):
27528 #
27529 # // ...
27530 # static UIColor* fromProto(Color* protocolor) {
27531 # float red = [protocolor red];
27532 # float green = [protocolor green];
27533 # float blue = [protocolor blue];
27534 # FloatValue* alpha_wrapper = [protocolor alpha];
27535 # float alpha = 1.0;
27536 # if (alpha_wrapper != nil) {
27537 # alpha = [alpha_wrapper value];
27538 # }
27539 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27540 # }
27541 #
27542 # static Color* toProto(UIColor* color) {
27543 # CGFloat red, green, blue, alpha;
27544 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27545 # return nil;
27546 # }
27547 # Color* result = [Color alloc] init];
27548 # [result setRed:red];
27549 # [result setGreen:green];
27550 # [result setBlue:blue];
27551 # if (alpha <= 0.9999) {
27552 # [result setAlpha:floatWrapperWithValue(alpha)];
27553 # }
27554 # [result autorelease];
27555 # return result;
27556 # }
27557 # // ...
27558 #
27559 # Example (JavaScript):
27560 #
27561 # // ...
27562 #
27563 # var protoToCssColor = function(rgb_color) {
27564 # var redFrac = rgb_color.red || 0.0;
27565 # var greenFrac = rgb_color.green || 0.0;
27566 # var blueFrac = rgb_color.blue || 0.0;
27567 # var red = Math.floor(redFrac * 255);
27568 # var green = Math.floor(greenFrac * 255);
27569 # var blue = Math.floor(blueFrac * 255);
27570 #
27571 # if (!('alpha' in rgb_color)) {
27572 # return rgbToCssColor_(red, green, blue);
27573 # }
27574 #
27575 # var alphaFrac = rgb_color.alpha.value || 0.0;
27576 # var rgbParams = [red, green, blue].join(',');
27577 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27578 # };
27579 #
27580 # var rgbToCssColor_ = function(red, green, blue) {
27581 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27582 # var hexString = rgbNumber.toString(16);
27583 # var missingZeros = 6 - hexString.length;
27584 # var resultBuilder = ['#'];
27585 # for (var i = 0; i < missingZeros; i++) {
27586 # resultBuilder.push('0');
27587 # }
27588 # resultBuilder.push(hexString);
27589 # return resultBuilder.join('');
27590 # };
27591 #
27592 # // ...
27593 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27594 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27595 # the final pixel color is defined by the equation:
27596 #
27597 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27598 #
27599 # This means that a value of 1.0 corresponds to a solid color, whereas
27600 # a value of 0.0 corresponds to a completely transparent color. This
27601 # uses a wrapper message rather than a simple float scalar so that it is
27602 # possible to distinguish between a default value and the value being unset.
27603 # If omitted, this color object is to be rendered as a solid color
27604 # (as if the alpha value had been explicitly given with a value of 1.0).
27605 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27606 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27607 },
27608 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027609 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027610 "style": "A String", # The style of the border.
27611 },
27612 "bottom": { # A border along a cell. # The bottom border of the cell.
27613 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
27614 # for simplicity of conversion to/from color representations in various
27615 # languages over compactness; for example, the fields of this representation
27616 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27617 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27618 # method in iOS; and, with just a little work, it can be easily formatted into
27619 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27620 #
27621 # Example (Java):
27622 #
27623 # import com.google.type.Color;
27624 #
27625 # // ...
27626 # public static java.awt.Color fromProto(Color protocolor) {
27627 # float alpha = protocolor.hasAlpha()
27628 # ? protocolor.getAlpha().getValue()
27629 # : 1.0;
27630 #
27631 # return new java.awt.Color(
27632 # protocolor.getRed(),
27633 # protocolor.getGreen(),
27634 # protocolor.getBlue(),
27635 # alpha);
27636 # }
27637 #
27638 # public static Color toProto(java.awt.Color color) {
27639 # float red = (float) color.getRed();
27640 # float green = (float) color.getGreen();
27641 # float blue = (float) color.getBlue();
27642 # float denominator = 255.0;
27643 # Color.Builder resultBuilder =
27644 # Color
27645 # .newBuilder()
27646 # .setRed(red / denominator)
27647 # .setGreen(green / denominator)
27648 # .setBlue(blue / denominator);
27649 # int alpha = color.getAlpha();
27650 # if (alpha != 255) {
27651 # result.setAlpha(
27652 # FloatValue
27653 # .newBuilder()
27654 # .setValue(((float) alpha) / denominator)
27655 # .build());
27656 # }
27657 # return resultBuilder.build();
27658 # }
27659 # // ...
27660 #
27661 # Example (iOS / Obj-C):
27662 #
27663 # // ...
27664 # static UIColor* fromProto(Color* protocolor) {
27665 # float red = [protocolor red];
27666 # float green = [protocolor green];
27667 # float blue = [protocolor blue];
27668 # FloatValue* alpha_wrapper = [protocolor alpha];
27669 # float alpha = 1.0;
27670 # if (alpha_wrapper != nil) {
27671 # alpha = [alpha_wrapper value];
27672 # }
27673 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27674 # }
27675 #
27676 # static Color* toProto(UIColor* color) {
27677 # CGFloat red, green, blue, alpha;
27678 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27679 # return nil;
27680 # }
27681 # Color* result = [Color alloc] init];
27682 # [result setRed:red];
27683 # [result setGreen:green];
27684 # [result setBlue:blue];
27685 # if (alpha <= 0.9999) {
27686 # [result setAlpha:floatWrapperWithValue(alpha)];
27687 # }
27688 # [result autorelease];
27689 # return result;
27690 # }
27691 # // ...
27692 #
27693 # Example (JavaScript):
27694 #
27695 # // ...
27696 #
27697 # var protoToCssColor = function(rgb_color) {
27698 # var redFrac = rgb_color.red || 0.0;
27699 # var greenFrac = rgb_color.green || 0.0;
27700 # var blueFrac = rgb_color.blue || 0.0;
27701 # var red = Math.floor(redFrac * 255);
27702 # var green = Math.floor(greenFrac * 255);
27703 # var blue = Math.floor(blueFrac * 255);
27704 #
27705 # if (!('alpha' in rgb_color)) {
27706 # return rgbToCssColor_(red, green, blue);
27707 # }
27708 #
27709 # var alphaFrac = rgb_color.alpha.value || 0.0;
27710 # var rgbParams = [red, green, blue].join(',');
27711 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27712 # };
27713 #
27714 # var rgbToCssColor_ = function(red, green, blue) {
27715 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27716 # var hexString = rgbNumber.toString(16);
27717 # var missingZeros = 6 - hexString.length;
27718 # var resultBuilder = ['#'];
27719 # for (var i = 0; i < missingZeros; i++) {
27720 # resultBuilder.push('0');
27721 # }
27722 # resultBuilder.push(hexString);
27723 # return resultBuilder.join('');
27724 # };
27725 #
27726 # // ...
27727 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27728 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27729 # the final pixel color is defined by the equation:
27730 #
27731 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27732 #
27733 # This means that a value of 1.0 corresponds to a solid color, whereas
27734 # a value of 0.0 corresponds to a completely transparent color. This
27735 # uses a wrapper message rather than a simple float scalar so that it is
27736 # possible to distinguish between a default value and the value being unset.
27737 # If omitted, this color object is to be rendered as a solid color
27738 # (as if the alpha value had been explicitly given with a value of 1.0).
27739 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27740 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27741 },
27742 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027743 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027744 "style": "A String", # The style of the border.
27745 },
27746 "left": { # A border along a cell. # The left border of the cell.
27747 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
27748 # for simplicity of conversion to/from color representations in various
27749 # languages over compactness; for example, the fields of this representation
27750 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27751 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27752 # method in iOS; and, with just a little work, it can be easily formatted into
27753 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27754 #
27755 # Example (Java):
27756 #
27757 # import com.google.type.Color;
27758 #
27759 # // ...
27760 # public static java.awt.Color fromProto(Color protocolor) {
27761 # float alpha = protocolor.hasAlpha()
27762 # ? protocolor.getAlpha().getValue()
27763 # : 1.0;
27764 #
27765 # return new java.awt.Color(
27766 # protocolor.getRed(),
27767 # protocolor.getGreen(),
27768 # protocolor.getBlue(),
27769 # alpha);
27770 # }
27771 #
27772 # public static Color toProto(java.awt.Color color) {
27773 # float red = (float) color.getRed();
27774 # float green = (float) color.getGreen();
27775 # float blue = (float) color.getBlue();
27776 # float denominator = 255.0;
27777 # Color.Builder resultBuilder =
27778 # Color
27779 # .newBuilder()
27780 # .setRed(red / denominator)
27781 # .setGreen(green / denominator)
27782 # .setBlue(blue / denominator);
27783 # int alpha = color.getAlpha();
27784 # if (alpha != 255) {
27785 # result.setAlpha(
27786 # FloatValue
27787 # .newBuilder()
27788 # .setValue(((float) alpha) / denominator)
27789 # .build());
27790 # }
27791 # return resultBuilder.build();
27792 # }
27793 # // ...
27794 #
27795 # Example (iOS / Obj-C):
27796 #
27797 # // ...
27798 # static UIColor* fromProto(Color* protocolor) {
27799 # float red = [protocolor red];
27800 # float green = [protocolor green];
27801 # float blue = [protocolor blue];
27802 # FloatValue* alpha_wrapper = [protocolor alpha];
27803 # float alpha = 1.0;
27804 # if (alpha_wrapper != nil) {
27805 # alpha = [alpha_wrapper value];
27806 # }
27807 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27808 # }
27809 #
27810 # static Color* toProto(UIColor* color) {
27811 # CGFloat red, green, blue, alpha;
27812 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27813 # return nil;
27814 # }
27815 # Color* result = [Color alloc] init];
27816 # [result setRed:red];
27817 # [result setGreen:green];
27818 # [result setBlue:blue];
27819 # if (alpha <= 0.9999) {
27820 # [result setAlpha:floatWrapperWithValue(alpha)];
27821 # }
27822 # [result autorelease];
27823 # return result;
27824 # }
27825 # // ...
27826 #
27827 # Example (JavaScript):
27828 #
27829 # // ...
27830 #
27831 # var protoToCssColor = function(rgb_color) {
27832 # var redFrac = rgb_color.red || 0.0;
27833 # var greenFrac = rgb_color.green || 0.0;
27834 # var blueFrac = rgb_color.blue || 0.0;
27835 # var red = Math.floor(redFrac * 255);
27836 # var green = Math.floor(greenFrac * 255);
27837 # var blue = Math.floor(blueFrac * 255);
27838 #
27839 # if (!('alpha' in rgb_color)) {
27840 # return rgbToCssColor_(red, green, blue);
27841 # }
27842 #
27843 # var alphaFrac = rgb_color.alpha.value || 0.0;
27844 # var rgbParams = [red, green, blue].join(',');
27845 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27846 # };
27847 #
27848 # var rgbToCssColor_ = function(red, green, blue) {
27849 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27850 # var hexString = rgbNumber.toString(16);
27851 # var missingZeros = 6 - hexString.length;
27852 # var resultBuilder = ['#'];
27853 # for (var i = 0; i < missingZeros; i++) {
27854 # resultBuilder.push('0');
27855 # }
27856 # resultBuilder.push(hexString);
27857 # return resultBuilder.join('');
27858 # };
27859 #
27860 # // ...
27861 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27862 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27863 # the final pixel color is defined by the equation:
27864 #
27865 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27866 #
27867 # This means that a value of 1.0 corresponds to a solid color, whereas
27868 # a value of 0.0 corresponds to a completely transparent color. This
27869 # uses a wrapper message rather than a simple float scalar so that it is
27870 # possible to distinguish between a default value and the value being unset.
27871 # If omitted, this color object is to be rendered as a solid color
27872 # (as if the alpha value had been explicitly given with a value of 1.0).
27873 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27874 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27875 },
27876 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027877 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027878 "style": "A String", # The style of the border.
27879 },
27880 },
27881 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
27882 },
27883 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
27884 #
27885 # When writing, the new format will be merged with the existing format.
27886 "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 -070027887 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
27888 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070027889 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
27890 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027891 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027892 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027893 },
27894 "textDirection": "A String", # The direction of the text in the cell.
27895 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
27896 # When updating padding, every field must be specified.
27897 "top": 42, # The top padding of the cell.
27898 "right": 42, # The right padding of the cell.
27899 "bottom": 42, # The bottom padding of the cell.
27900 "left": 42, # The left padding of the cell.
27901 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027902 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027903 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
27904 # for simplicity of conversion to/from color representations in various
27905 # languages over compactness; for example, the fields of this representation
27906 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27907 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27908 # method in iOS; and, with just a little work, it can be easily formatted into
27909 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27910 #
27911 # Example (Java):
27912 #
27913 # import com.google.type.Color;
27914 #
27915 # // ...
27916 # public static java.awt.Color fromProto(Color protocolor) {
27917 # float alpha = protocolor.hasAlpha()
27918 # ? protocolor.getAlpha().getValue()
27919 # : 1.0;
27920 #
27921 # return new java.awt.Color(
27922 # protocolor.getRed(),
27923 # protocolor.getGreen(),
27924 # protocolor.getBlue(),
27925 # alpha);
27926 # }
27927 #
27928 # public static Color toProto(java.awt.Color color) {
27929 # float red = (float) color.getRed();
27930 # float green = (float) color.getGreen();
27931 # float blue = (float) color.getBlue();
27932 # float denominator = 255.0;
27933 # Color.Builder resultBuilder =
27934 # Color
27935 # .newBuilder()
27936 # .setRed(red / denominator)
27937 # .setGreen(green / denominator)
27938 # .setBlue(blue / denominator);
27939 # int alpha = color.getAlpha();
27940 # if (alpha != 255) {
27941 # result.setAlpha(
27942 # FloatValue
27943 # .newBuilder()
27944 # .setValue(((float) alpha) / denominator)
27945 # .build());
27946 # }
27947 # return resultBuilder.build();
27948 # }
27949 # // ...
27950 #
27951 # Example (iOS / Obj-C):
27952 #
27953 # // ...
27954 # static UIColor* fromProto(Color* protocolor) {
27955 # float red = [protocolor red];
27956 # float green = [protocolor green];
27957 # float blue = [protocolor blue];
27958 # FloatValue* alpha_wrapper = [protocolor alpha];
27959 # float alpha = 1.0;
27960 # if (alpha_wrapper != nil) {
27961 # alpha = [alpha_wrapper value];
27962 # }
27963 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27964 # }
27965 #
27966 # static Color* toProto(UIColor* color) {
27967 # CGFloat red, green, blue, alpha;
27968 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27969 # return nil;
27970 # }
27971 # Color* result = [Color alloc] init];
27972 # [result setRed:red];
27973 # [result setGreen:green];
27974 # [result setBlue:blue];
27975 # if (alpha <= 0.9999) {
27976 # [result setAlpha:floatWrapperWithValue(alpha)];
27977 # }
27978 # [result autorelease];
27979 # return result;
27980 # }
27981 # // ...
27982 #
27983 # Example (JavaScript):
27984 #
27985 # // ...
27986 #
27987 # var protoToCssColor = function(rgb_color) {
27988 # var redFrac = rgb_color.red || 0.0;
27989 # var greenFrac = rgb_color.green || 0.0;
27990 # var blueFrac = rgb_color.blue || 0.0;
27991 # var red = Math.floor(redFrac * 255);
27992 # var green = Math.floor(greenFrac * 255);
27993 # var blue = Math.floor(blueFrac * 255);
27994 #
27995 # if (!('alpha' in rgb_color)) {
27996 # return rgbToCssColor_(red, green, blue);
27997 # }
27998 #
27999 # var alphaFrac = rgb_color.alpha.value || 0.0;
28000 # var rgbParams = [red, green, blue].join(',');
28001 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28002 # };
28003 #
28004 # var rgbToCssColor_ = function(red, green, blue) {
28005 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28006 # var hexString = rgbNumber.toString(16);
28007 # var missingZeros = 6 - hexString.length;
28008 # var resultBuilder = ['#'];
28009 # for (var i = 0; i < missingZeros; i++) {
28010 # resultBuilder.push('0');
28011 # }
28012 # resultBuilder.push(hexString);
28013 # return resultBuilder.join('');
28014 # };
28015 #
28016 # // ...
28017 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28018 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28019 # the final pixel color is defined by the equation:
28020 #
28021 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28022 #
28023 # This means that a value of 1.0 corresponds to a solid color, whereas
28024 # a value of 0.0 corresponds to a completely transparent color. This
28025 # uses a wrapper message rather than a simple float scalar so that it is
28026 # possible to distinguish between a default value and the value being unset.
28027 # If omitted, this color object is to be rendered as a solid color
28028 # (as if the alpha value had been explicitly given with a value of 1.0).
28029 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28030 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28031 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028032 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028033 "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).
28034 # Absent values indicate that the field isn't specified.
28035 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
28036 # for simplicity of conversion to/from color representations in various
28037 # languages over compactness; for example, the fields of this representation
28038 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28039 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28040 # method in iOS; and, with just a little work, it can be easily formatted into
28041 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28042 #
28043 # Example (Java):
28044 #
28045 # import com.google.type.Color;
28046 #
28047 # // ...
28048 # public static java.awt.Color fromProto(Color protocolor) {
28049 # float alpha = protocolor.hasAlpha()
28050 # ? protocolor.getAlpha().getValue()
28051 # : 1.0;
28052 #
28053 # return new java.awt.Color(
28054 # protocolor.getRed(),
28055 # protocolor.getGreen(),
28056 # protocolor.getBlue(),
28057 # alpha);
28058 # }
28059 #
28060 # public static Color toProto(java.awt.Color color) {
28061 # float red = (float) color.getRed();
28062 # float green = (float) color.getGreen();
28063 # float blue = (float) color.getBlue();
28064 # float denominator = 255.0;
28065 # Color.Builder resultBuilder =
28066 # Color
28067 # .newBuilder()
28068 # .setRed(red / denominator)
28069 # .setGreen(green / denominator)
28070 # .setBlue(blue / denominator);
28071 # int alpha = color.getAlpha();
28072 # if (alpha != 255) {
28073 # result.setAlpha(
28074 # FloatValue
28075 # .newBuilder()
28076 # .setValue(((float) alpha) / denominator)
28077 # .build());
28078 # }
28079 # return resultBuilder.build();
28080 # }
28081 # // ...
28082 #
28083 # Example (iOS / Obj-C):
28084 #
28085 # // ...
28086 # static UIColor* fromProto(Color* protocolor) {
28087 # float red = [protocolor red];
28088 # float green = [protocolor green];
28089 # float blue = [protocolor blue];
28090 # FloatValue* alpha_wrapper = [protocolor alpha];
28091 # float alpha = 1.0;
28092 # if (alpha_wrapper != nil) {
28093 # alpha = [alpha_wrapper value];
28094 # }
28095 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28096 # }
28097 #
28098 # static Color* toProto(UIColor* color) {
28099 # CGFloat red, green, blue, alpha;
28100 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28101 # return nil;
28102 # }
28103 # Color* result = [Color alloc] init];
28104 # [result setRed:red];
28105 # [result setGreen:green];
28106 # [result setBlue:blue];
28107 # if (alpha <= 0.9999) {
28108 # [result setAlpha:floatWrapperWithValue(alpha)];
28109 # }
28110 # [result autorelease];
28111 # return result;
28112 # }
28113 # // ...
28114 #
28115 # Example (JavaScript):
28116 #
28117 # // ...
28118 #
28119 # var protoToCssColor = function(rgb_color) {
28120 # var redFrac = rgb_color.red || 0.0;
28121 # var greenFrac = rgb_color.green || 0.0;
28122 # var blueFrac = rgb_color.blue || 0.0;
28123 # var red = Math.floor(redFrac * 255);
28124 # var green = Math.floor(greenFrac * 255);
28125 # var blue = Math.floor(blueFrac * 255);
28126 #
28127 # if (!('alpha' in rgb_color)) {
28128 # return rgbToCssColor_(red, green, blue);
28129 # }
28130 #
28131 # var alphaFrac = rgb_color.alpha.value || 0.0;
28132 # var rgbParams = [red, green, blue].join(',');
28133 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28134 # };
28135 #
28136 # var rgbToCssColor_ = function(red, green, blue) {
28137 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28138 # var hexString = rgbNumber.toString(16);
28139 # var missingZeros = 6 - hexString.length;
28140 # var resultBuilder = ['#'];
28141 # for (var i = 0; i < missingZeros; i++) {
28142 # resultBuilder.push('0');
28143 # }
28144 # resultBuilder.push(hexString);
28145 # return resultBuilder.join('');
28146 # };
28147 #
28148 # // ...
28149 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28150 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28151 # the final pixel color is defined by the equation:
28152 #
28153 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28154 #
28155 # This means that a value of 1.0 corresponds to a solid color, whereas
28156 # a value of 0.0 corresponds to a completely transparent color. This
28157 # uses a wrapper message rather than a simple float scalar so that it is
28158 # possible to distinguish between a default value and the value being unset.
28159 # If omitted, this color object is to be rendered as a solid color
28160 # (as if the alpha value had been explicitly given with a value of 1.0).
28161 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28162 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28163 },
28164 "bold": True or False, # True if the text is bold.
28165 "strikethrough": True or False, # True if the text has a strikethrough.
28166 "fontFamily": "A String", # The font family.
28167 "fontSize": 42, # The size of the font.
28168 "italic": True or False, # True if the text is italicized.
28169 "underline": True or False, # True if the text is underlined.
28170 },
28171 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
28172 "borders": { # The borders of the cell. # The borders of the cell.
28173 "top": { # A border along a cell. # The top border of the cell.
28174 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
28175 # for simplicity of conversion to/from color representations in various
28176 # languages over compactness; for example, the fields of this representation
28177 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28178 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28179 # method in iOS; and, with just a little work, it can be easily formatted into
28180 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28181 #
28182 # Example (Java):
28183 #
28184 # import com.google.type.Color;
28185 #
28186 # // ...
28187 # public static java.awt.Color fromProto(Color protocolor) {
28188 # float alpha = protocolor.hasAlpha()
28189 # ? protocolor.getAlpha().getValue()
28190 # : 1.0;
28191 #
28192 # return new java.awt.Color(
28193 # protocolor.getRed(),
28194 # protocolor.getGreen(),
28195 # protocolor.getBlue(),
28196 # alpha);
28197 # }
28198 #
28199 # public static Color toProto(java.awt.Color color) {
28200 # float red = (float) color.getRed();
28201 # float green = (float) color.getGreen();
28202 # float blue = (float) color.getBlue();
28203 # float denominator = 255.0;
28204 # Color.Builder resultBuilder =
28205 # Color
28206 # .newBuilder()
28207 # .setRed(red / denominator)
28208 # .setGreen(green / denominator)
28209 # .setBlue(blue / denominator);
28210 # int alpha = color.getAlpha();
28211 # if (alpha != 255) {
28212 # result.setAlpha(
28213 # FloatValue
28214 # .newBuilder()
28215 # .setValue(((float) alpha) / denominator)
28216 # .build());
28217 # }
28218 # return resultBuilder.build();
28219 # }
28220 # // ...
28221 #
28222 # Example (iOS / Obj-C):
28223 #
28224 # // ...
28225 # static UIColor* fromProto(Color* protocolor) {
28226 # float red = [protocolor red];
28227 # float green = [protocolor green];
28228 # float blue = [protocolor blue];
28229 # FloatValue* alpha_wrapper = [protocolor alpha];
28230 # float alpha = 1.0;
28231 # if (alpha_wrapper != nil) {
28232 # alpha = [alpha_wrapper value];
28233 # }
28234 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28235 # }
28236 #
28237 # static Color* toProto(UIColor* color) {
28238 # CGFloat red, green, blue, alpha;
28239 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28240 # return nil;
28241 # }
28242 # Color* result = [Color alloc] init];
28243 # [result setRed:red];
28244 # [result setGreen:green];
28245 # [result setBlue:blue];
28246 # if (alpha <= 0.9999) {
28247 # [result setAlpha:floatWrapperWithValue(alpha)];
28248 # }
28249 # [result autorelease];
28250 # return result;
28251 # }
28252 # // ...
28253 #
28254 # Example (JavaScript):
28255 #
28256 # // ...
28257 #
28258 # var protoToCssColor = function(rgb_color) {
28259 # var redFrac = rgb_color.red || 0.0;
28260 # var greenFrac = rgb_color.green || 0.0;
28261 # var blueFrac = rgb_color.blue || 0.0;
28262 # var red = Math.floor(redFrac * 255);
28263 # var green = Math.floor(greenFrac * 255);
28264 # var blue = Math.floor(blueFrac * 255);
28265 #
28266 # if (!('alpha' in rgb_color)) {
28267 # return rgbToCssColor_(red, green, blue);
28268 # }
28269 #
28270 # var alphaFrac = rgb_color.alpha.value || 0.0;
28271 # var rgbParams = [red, green, blue].join(',');
28272 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28273 # };
28274 #
28275 # var rgbToCssColor_ = function(red, green, blue) {
28276 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28277 # var hexString = rgbNumber.toString(16);
28278 # var missingZeros = 6 - hexString.length;
28279 # var resultBuilder = ['#'];
28280 # for (var i = 0; i < missingZeros; i++) {
28281 # resultBuilder.push('0');
28282 # }
28283 # resultBuilder.push(hexString);
28284 # return resultBuilder.join('');
28285 # };
28286 #
28287 # // ...
28288 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28289 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28290 # the final pixel color is defined by the equation:
28291 #
28292 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28293 #
28294 # This means that a value of 1.0 corresponds to a solid color, whereas
28295 # a value of 0.0 corresponds to a completely transparent color. This
28296 # uses a wrapper message rather than a simple float scalar so that it is
28297 # possible to distinguish between a default value and the value being unset.
28298 # If omitted, this color object is to be rendered as a solid color
28299 # (as if the alpha value had been explicitly given with a value of 1.0).
28300 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28301 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28302 },
28303 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028304 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028305 "style": "A String", # The style of the border.
28306 },
28307 "right": { # A border along a cell. # The right border of the cell.
28308 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
28309 # for simplicity of conversion to/from color representations in various
28310 # languages over compactness; for example, the fields of this representation
28311 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28312 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28313 # method in iOS; and, with just a little work, it can be easily formatted into
28314 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28315 #
28316 # Example (Java):
28317 #
28318 # import com.google.type.Color;
28319 #
28320 # // ...
28321 # public static java.awt.Color fromProto(Color protocolor) {
28322 # float alpha = protocolor.hasAlpha()
28323 # ? protocolor.getAlpha().getValue()
28324 # : 1.0;
28325 #
28326 # return new java.awt.Color(
28327 # protocolor.getRed(),
28328 # protocolor.getGreen(),
28329 # protocolor.getBlue(),
28330 # alpha);
28331 # }
28332 #
28333 # public static Color toProto(java.awt.Color color) {
28334 # float red = (float) color.getRed();
28335 # float green = (float) color.getGreen();
28336 # float blue = (float) color.getBlue();
28337 # float denominator = 255.0;
28338 # Color.Builder resultBuilder =
28339 # Color
28340 # .newBuilder()
28341 # .setRed(red / denominator)
28342 # .setGreen(green / denominator)
28343 # .setBlue(blue / denominator);
28344 # int alpha = color.getAlpha();
28345 # if (alpha != 255) {
28346 # result.setAlpha(
28347 # FloatValue
28348 # .newBuilder()
28349 # .setValue(((float) alpha) / denominator)
28350 # .build());
28351 # }
28352 # return resultBuilder.build();
28353 # }
28354 # // ...
28355 #
28356 # Example (iOS / Obj-C):
28357 #
28358 # // ...
28359 # static UIColor* fromProto(Color* protocolor) {
28360 # float red = [protocolor red];
28361 # float green = [protocolor green];
28362 # float blue = [protocolor blue];
28363 # FloatValue* alpha_wrapper = [protocolor alpha];
28364 # float alpha = 1.0;
28365 # if (alpha_wrapper != nil) {
28366 # alpha = [alpha_wrapper value];
28367 # }
28368 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28369 # }
28370 #
28371 # static Color* toProto(UIColor* color) {
28372 # CGFloat red, green, blue, alpha;
28373 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28374 # return nil;
28375 # }
28376 # Color* result = [Color alloc] init];
28377 # [result setRed:red];
28378 # [result setGreen:green];
28379 # [result setBlue:blue];
28380 # if (alpha <= 0.9999) {
28381 # [result setAlpha:floatWrapperWithValue(alpha)];
28382 # }
28383 # [result autorelease];
28384 # return result;
28385 # }
28386 # // ...
28387 #
28388 # Example (JavaScript):
28389 #
28390 # // ...
28391 #
28392 # var protoToCssColor = function(rgb_color) {
28393 # var redFrac = rgb_color.red || 0.0;
28394 # var greenFrac = rgb_color.green || 0.0;
28395 # var blueFrac = rgb_color.blue || 0.0;
28396 # var red = Math.floor(redFrac * 255);
28397 # var green = Math.floor(greenFrac * 255);
28398 # var blue = Math.floor(blueFrac * 255);
28399 #
28400 # if (!('alpha' in rgb_color)) {
28401 # return rgbToCssColor_(red, green, blue);
28402 # }
28403 #
28404 # var alphaFrac = rgb_color.alpha.value || 0.0;
28405 # var rgbParams = [red, green, blue].join(',');
28406 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28407 # };
28408 #
28409 # var rgbToCssColor_ = function(red, green, blue) {
28410 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28411 # var hexString = rgbNumber.toString(16);
28412 # var missingZeros = 6 - hexString.length;
28413 # var resultBuilder = ['#'];
28414 # for (var i = 0; i < missingZeros; i++) {
28415 # resultBuilder.push('0');
28416 # }
28417 # resultBuilder.push(hexString);
28418 # return resultBuilder.join('');
28419 # };
28420 #
28421 # // ...
28422 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28423 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28424 # the final pixel color is defined by the equation:
28425 #
28426 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28427 #
28428 # This means that a value of 1.0 corresponds to a solid color, whereas
28429 # a value of 0.0 corresponds to a completely transparent color. This
28430 # uses a wrapper message rather than a simple float scalar so that it is
28431 # possible to distinguish between a default value and the value being unset.
28432 # If omitted, this color object is to be rendered as a solid color
28433 # (as if the alpha value had been explicitly given with a value of 1.0).
28434 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28435 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28436 },
28437 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028438 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028439 "style": "A String", # The style of the border.
28440 },
28441 "bottom": { # A border along a cell. # The bottom border of the cell.
28442 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
28443 # for simplicity of conversion to/from color representations in various
28444 # languages over compactness; for example, the fields of this representation
28445 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28446 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28447 # method in iOS; and, with just a little work, it can be easily formatted into
28448 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28449 #
28450 # Example (Java):
28451 #
28452 # import com.google.type.Color;
28453 #
28454 # // ...
28455 # public static java.awt.Color fromProto(Color protocolor) {
28456 # float alpha = protocolor.hasAlpha()
28457 # ? protocolor.getAlpha().getValue()
28458 # : 1.0;
28459 #
28460 # return new java.awt.Color(
28461 # protocolor.getRed(),
28462 # protocolor.getGreen(),
28463 # protocolor.getBlue(),
28464 # alpha);
28465 # }
28466 #
28467 # public static Color toProto(java.awt.Color color) {
28468 # float red = (float) color.getRed();
28469 # float green = (float) color.getGreen();
28470 # float blue = (float) color.getBlue();
28471 # float denominator = 255.0;
28472 # Color.Builder resultBuilder =
28473 # Color
28474 # .newBuilder()
28475 # .setRed(red / denominator)
28476 # .setGreen(green / denominator)
28477 # .setBlue(blue / denominator);
28478 # int alpha = color.getAlpha();
28479 # if (alpha != 255) {
28480 # result.setAlpha(
28481 # FloatValue
28482 # .newBuilder()
28483 # .setValue(((float) alpha) / denominator)
28484 # .build());
28485 # }
28486 # return resultBuilder.build();
28487 # }
28488 # // ...
28489 #
28490 # Example (iOS / Obj-C):
28491 #
28492 # // ...
28493 # static UIColor* fromProto(Color* protocolor) {
28494 # float red = [protocolor red];
28495 # float green = [protocolor green];
28496 # float blue = [protocolor blue];
28497 # FloatValue* alpha_wrapper = [protocolor alpha];
28498 # float alpha = 1.0;
28499 # if (alpha_wrapper != nil) {
28500 # alpha = [alpha_wrapper value];
28501 # }
28502 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28503 # }
28504 #
28505 # static Color* toProto(UIColor* color) {
28506 # CGFloat red, green, blue, alpha;
28507 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28508 # return nil;
28509 # }
28510 # Color* result = [Color alloc] init];
28511 # [result setRed:red];
28512 # [result setGreen:green];
28513 # [result setBlue:blue];
28514 # if (alpha <= 0.9999) {
28515 # [result setAlpha:floatWrapperWithValue(alpha)];
28516 # }
28517 # [result autorelease];
28518 # return result;
28519 # }
28520 # // ...
28521 #
28522 # Example (JavaScript):
28523 #
28524 # // ...
28525 #
28526 # var protoToCssColor = function(rgb_color) {
28527 # var redFrac = rgb_color.red || 0.0;
28528 # var greenFrac = rgb_color.green || 0.0;
28529 # var blueFrac = rgb_color.blue || 0.0;
28530 # var red = Math.floor(redFrac * 255);
28531 # var green = Math.floor(greenFrac * 255);
28532 # var blue = Math.floor(blueFrac * 255);
28533 #
28534 # if (!('alpha' in rgb_color)) {
28535 # return rgbToCssColor_(red, green, blue);
28536 # }
28537 #
28538 # var alphaFrac = rgb_color.alpha.value || 0.0;
28539 # var rgbParams = [red, green, blue].join(',');
28540 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28541 # };
28542 #
28543 # var rgbToCssColor_ = function(red, green, blue) {
28544 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28545 # var hexString = rgbNumber.toString(16);
28546 # var missingZeros = 6 - hexString.length;
28547 # var resultBuilder = ['#'];
28548 # for (var i = 0; i < missingZeros; i++) {
28549 # resultBuilder.push('0');
28550 # }
28551 # resultBuilder.push(hexString);
28552 # return resultBuilder.join('');
28553 # };
28554 #
28555 # // ...
28556 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28557 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28558 # the final pixel color is defined by the equation:
28559 #
28560 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28561 #
28562 # This means that a value of 1.0 corresponds to a solid color, whereas
28563 # a value of 0.0 corresponds to a completely transparent color. This
28564 # uses a wrapper message rather than a simple float scalar so that it is
28565 # possible to distinguish between a default value and the value being unset.
28566 # If omitted, this color object is to be rendered as a solid color
28567 # (as if the alpha value had been explicitly given with a value of 1.0).
28568 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28569 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28570 },
28571 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028572 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028573 "style": "A String", # The style of the border.
28574 },
28575 "left": { # A border along a cell. # The left border of the cell.
28576 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
28577 # for simplicity of conversion to/from color representations in various
28578 # languages over compactness; for example, the fields of this representation
28579 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28580 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28581 # method in iOS; and, with just a little work, it can be easily formatted into
28582 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28583 #
28584 # Example (Java):
28585 #
28586 # import com.google.type.Color;
28587 #
28588 # // ...
28589 # public static java.awt.Color fromProto(Color protocolor) {
28590 # float alpha = protocolor.hasAlpha()
28591 # ? protocolor.getAlpha().getValue()
28592 # : 1.0;
28593 #
28594 # return new java.awt.Color(
28595 # protocolor.getRed(),
28596 # protocolor.getGreen(),
28597 # protocolor.getBlue(),
28598 # alpha);
28599 # }
28600 #
28601 # public static Color toProto(java.awt.Color color) {
28602 # float red = (float) color.getRed();
28603 # float green = (float) color.getGreen();
28604 # float blue = (float) color.getBlue();
28605 # float denominator = 255.0;
28606 # Color.Builder resultBuilder =
28607 # Color
28608 # .newBuilder()
28609 # .setRed(red / denominator)
28610 # .setGreen(green / denominator)
28611 # .setBlue(blue / denominator);
28612 # int alpha = color.getAlpha();
28613 # if (alpha != 255) {
28614 # result.setAlpha(
28615 # FloatValue
28616 # .newBuilder()
28617 # .setValue(((float) alpha) / denominator)
28618 # .build());
28619 # }
28620 # return resultBuilder.build();
28621 # }
28622 # // ...
28623 #
28624 # Example (iOS / Obj-C):
28625 #
28626 # // ...
28627 # static UIColor* fromProto(Color* protocolor) {
28628 # float red = [protocolor red];
28629 # float green = [protocolor green];
28630 # float blue = [protocolor blue];
28631 # FloatValue* alpha_wrapper = [protocolor alpha];
28632 # float alpha = 1.0;
28633 # if (alpha_wrapper != nil) {
28634 # alpha = [alpha_wrapper value];
28635 # }
28636 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28637 # }
28638 #
28639 # static Color* toProto(UIColor* color) {
28640 # CGFloat red, green, blue, alpha;
28641 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28642 # return nil;
28643 # }
28644 # Color* result = [Color alloc] init];
28645 # [result setRed:red];
28646 # [result setGreen:green];
28647 # [result setBlue:blue];
28648 # if (alpha <= 0.9999) {
28649 # [result setAlpha:floatWrapperWithValue(alpha)];
28650 # }
28651 # [result autorelease];
28652 # return result;
28653 # }
28654 # // ...
28655 #
28656 # Example (JavaScript):
28657 #
28658 # // ...
28659 #
28660 # var protoToCssColor = function(rgb_color) {
28661 # var redFrac = rgb_color.red || 0.0;
28662 # var greenFrac = rgb_color.green || 0.0;
28663 # var blueFrac = rgb_color.blue || 0.0;
28664 # var red = Math.floor(redFrac * 255);
28665 # var green = Math.floor(greenFrac * 255);
28666 # var blue = Math.floor(blueFrac * 255);
28667 #
28668 # if (!('alpha' in rgb_color)) {
28669 # return rgbToCssColor_(red, green, blue);
28670 # }
28671 #
28672 # var alphaFrac = rgb_color.alpha.value || 0.0;
28673 # var rgbParams = [red, green, blue].join(',');
28674 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28675 # };
28676 #
28677 # var rgbToCssColor_ = function(red, green, blue) {
28678 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28679 # var hexString = rgbNumber.toString(16);
28680 # var missingZeros = 6 - hexString.length;
28681 # var resultBuilder = ['#'];
28682 # for (var i = 0; i < missingZeros; i++) {
28683 # resultBuilder.push('0');
28684 # }
28685 # resultBuilder.push(hexString);
28686 # return resultBuilder.join('');
28687 # };
28688 #
28689 # // ...
28690 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28691 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28692 # the final pixel color is defined by the equation:
28693 #
28694 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28695 #
28696 # This means that a value of 1.0 corresponds to a solid color, whereas
28697 # a value of 0.0 corresponds to a completely transparent color. This
28698 # uses a wrapper message rather than a simple float scalar so that it is
28699 # possible to distinguish between a default value and the value being unset.
28700 # If omitted, this color object is to be rendered as a solid color
28701 # (as if the alpha value had been explicitly given with a value of 1.0).
28702 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28703 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28704 },
28705 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028706 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028707 "style": "A String", # The style of the border.
28708 },
28709 },
28710 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
28711 },
28712 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
28713 #
28714 # When writing, the new data validation rule will overwrite any prior rule.
28715 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
28716 # If true, "List" conditions will show a dropdown.
28717 "strict": True or False, # True if invalid data should be rejected.
28718 "inputMessage": "A String", # A message to show the user when adding data to the cell.
28719 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
28720 # BooleanConditions are used by conditional formatting,
28721 # data validation, and the criteria in filters.
28722 "type": "A String", # The type of condition.
28723 "values": [ # The values of the condition. The number of supported values depends
28724 # on the condition type. Some support zero values,
28725 # others one or two values,
28726 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
28727 { # The value of the condition.
28728 "relativeDate": "A String", # A relative date (based on the current date).
28729 # Valid only if the type is
28730 # DATE_BEFORE,
28731 # DATE_AFTER,
28732 # DATE_ON_OR_BEFORE or
28733 # DATE_ON_OR_AFTER.
28734 #
28735 # Relative dates are not supported in data validation.
28736 # They are supported only in conditional formatting and
28737 # conditional filters.
28738 "userEnteredValue": "A String", # A value the condition is based on.
28739 # The value will be parsed as if the user typed into a cell.
28740 # Formulas are supported (and must begin with an `=`).
28741 },
28742 ],
28743 },
28744 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028745 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
28746 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028747 # Runs start at specific indexes in the text and continue until the next
28748 # run. Properties of a run will continue unless explicitly changed
28749 # in a subsequent run (and properties of the first run will continue
28750 # the properties of the cell unless explicitly changed).
28751 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028752 # When writing, the new runs will overwrite any prior runs. When writing a
28753 # new user_entered_value, previous runs will be erased.
28754 { # A run of a text format. The format of this run continues until the start
28755 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028756 # When updating, all fields must be set.
28757 "startIndex": 42, # The character index where this run starts.
28758 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
28759 # Absent values indicate that the field isn't specified.
28760 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
28761 # for simplicity of conversion to/from color representations in various
28762 # languages over compactness; for example, the fields of this representation
28763 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28764 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28765 # method in iOS; and, with just a little work, it can be easily formatted into
28766 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28767 #
28768 # Example (Java):
28769 #
28770 # import com.google.type.Color;
28771 #
28772 # // ...
28773 # public static java.awt.Color fromProto(Color protocolor) {
28774 # float alpha = protocolor.hasAlpha()
28775 # ? protocolor.getAlpha().getValue()
28776 # : 1.0;
28777 #
28778 # return new java.awt.Color(
28779 # protocolor.getRed(),
28780 # protocolor.getGreen(),
28781 # protocolor.getBlue(),
28782 # alpha);
28783 # }
28784 #
28785 # public static Color toProto(java.awt.Color color) {
28786 # float red = (float) color.getRed();
28787 # float green = (float) color.getGreen();
28788 # float blue = (float) color.getBlue();
28789 # float denominator = 255.0;
28790 # Color.Builder resultBuilder =
28791 # Color
28792 # .newBuilder()
28793 # .setRed(red / denominator)
28794 # .setGreen(green / denominator)
28795 # .setBlue(blue / denominator);
28796 # int alpha = color.getAlpha();
28797 # if (alpha != 255) {
28798 # result.setAlpha(
28799 # FloatValue
28800 # .newBuilder()
28801 # .setValue(((float) alpha) / denominator)
28802 # .build());
28803 # }
28804 # return resultBuilder.build();
28805 # }
28806 # // ...
28807 #
28808 # Example (iOS / Obj-C):
28809 #
28810 # // ...
28811 # static UIColor* fromProto(Color* protocolor) {
28812 # float red = [protocolor red];
28813 # float green = [protocolor green];
28814 # float blue = [protocolor blue];
28815 # FloatValue* alpha_wrapper = [protocolor alpha];
28816 # float alpha = 1.0;
28817 # if (alpha_wrapper != nil) {
28818 # alpha = [alpha_wrapper value];
28819 # }
28820 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28821 # }
28822 #
28823 # static Color* toProto(UIColor* color) {
28824 # CGFloat red, green, blue, alpha;
28825 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28826 # return nil;
28827 # }
28828 # Color* result = [Color alloc] init];
28829 # [result setRed:red];
28830 # [result setGreen:green];
28831 # [result setBlue:blue];
28832 # if (alpha <= 0.9999) {
28833 # [result setAlpha:floatWrapperWithValue(alpha)];
28834 # }
28835 # [result autorelease];
28836 # return result;
28837 # }
28838 # // ...
28839 #
28840 # Example (JavaScript):
28841 #
28842 # // ...
28843 #
28844 # var protoToCssColor = function(rgb_color) {
28845 # var redFrac = rgb_color.red || 0.0;
28846 # var greenFrac = rgb_color.green || 0.0;
28847 # var blueFrac = rgb_color.blue || 0.0;
28848 # var red = Math.floor(redFrac * 255);
28849 # var green = Math.floor(greenFrac * 255);
28850 # var blue = Math.floor(blueFrac * 255);
28851 #
28852 # if (!('alpha' in rgb_color)) {
28853 # return rgbToCssColor_(red, green, blue);
28854 # }
28855 #
28856 # var alphaFrac = rgb_color.alpha.value || 0.0;
28857 # var rgbParams = [red, green, blue].join(',');
28858 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28859 # };
28860 #
28861 # var rgbToCssColor_ = function(red, green, blue) {
28862 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28863 # var hexString = rgbNumber.toString(16);
28864 # var missingZeros = 6 - hexString.length;
28865 # var resultBuilder = ['#'];
28866 # for (var i = 0; i < missingZeros; i++) {
28867 # resultBuilder.push('0');
28868 # }
28869 # resultBuilder.push(hexString);
28870 # return resultBuilder.join('');
28871 # };
28872 #
28873 # // ...
28874 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28875 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28876 # the final pixel color is defined by the equation:
28877 #
28878 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28879 #
28880 # This means that a value of 1.0 corresponds to a solid color, whereas
28881 # a value of 0.0 corresponds to a completely transparent color. This
28882 # uses a wrapper message rather than a simple float scalar so that it is
28883 # possible to distinguish between a default value and the value being unset.
28884 # If omitted, this color object is to be rendered as a solid color
28885 # (as if the alpha value had been explicitly given with a value of 1.0).
28886 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28887 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28888 },
28889 "bold": True or False, # True if the text is bold.
28890 "strikethrough": True or False, # True if the text has a strikethrough.
28891 "fontFamily": "A String", # The font family.
28892 "fontSize": 42, # The size of the font.
28893 "italic": True or False, # True if the text is italicized.
28894 "underline": True or False, # True if the text is underlined.
28895 },
28896 },
28897 ],
28898 },
28899 ],
28900 },
28901 ],
28902 },
28903 ],
28904 "properties": { # Properties of a sheet. # The properties of the sheet.
28905 "sheetType": "A String", # The type of sheet. Defaults to GRID.
28906 # This field cannot be changed once set.
28907 "index": 42, # The index of the sheet within the spreadsheet.
28908 # When adding or updating sheet properties, if this field
28909 # is excluded then the sheet will be added or moved to the end
28910 # of the sheet list.
28911 "title": "A String", # The name of the sheet.
28912 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
28913 # (If the sheet is an object sheet, containing a chart or image, then
28914 # this field will be absent.)
28915 # When writing it is an error to set any grid properties on non-grid sheets.
28916 "columnCount": 42, # The number of columns in the grid.
28917 "rowCount": 42, # The number of rows in the grid.
28918 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
28919 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
28920 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
28921 },
28922 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
28923 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
28924 # for simplicity of conversion to/from color representations in various
28925 # languages over compactness; for example, the fields of this representation
28926 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28927 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28928 # method in iOS; and, with just a little work, it can be easily formatted into
28929 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28930 #
28931 # Example (Java):
28932 #
28933 # import com.google.type.Color;
28934 #
28935 # // ...
28936 # public static java.awt.Color fromProto(Color protocolor) {
28937 # float alpha = protocolor.hasAlpha()
28938 # ? protocolor.getAlpha().getValue()
28939 # : 1.0;
28940 #
28941 # return new java.awt.Color(
28942 # protocolor.getRed(),
28943 # protocolor.getGreen(),
28944 # protocolor.getBlue(),
28945 # alpha);
28946 # }
28947 #
28948 # public static Color toProto(java.awt.Color color) {
28949 # float red = (float) color.getRed();
28950 # float green = (float) color.getGreen();
28951 # float blue = (float) color.getBlue();
28952 # float denominator = 255.0;
28953 # Color.Builder resultBuilder =
28954 # Color
28955 # .newBuilder()
28956 # .setRed(red / denominator)
28957 # .setGreen(green / denominator)
28958 # .setBlue(blue / denominator);
28959 # int alpha = color.getAlpha();
28960 # if (alpha != 255) {
28961 # result.setAlpha(
28962 # FloatValue
28963 # .newBuilder()
28964 # .setValue(((float) alpha) / denominator)
28965 # .build());
28966 # }
28967 # return resultBuilder.build();
28968 # }
28969 # // ...
28970 #
28971 # Example (iOS / Obj-C):
28972 #
28973 # // ...
28974 # static UIColor* fromProto(Color* protocolor) {
28975 # float red = [protocolor red];
28976 # float green = [protocolor green];
28977 # float blue = [protocolor blue];
28978 # FloatValue* alpha_wrapper = [protocolor alpha];
28979 # float alpha = 1.0;
28980 # if (alpha_wrapper != nil) {
28981 # alpha = [alpha_wrapper value];
28982 # }
28983 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28984 # }
28985 #
28986 # static Color* toProto(UIColor* color) {
28987 # CGFloat red, green, blue, alpha;
28988 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28989 # return nil;
28990 # }
28991 # Color* result = [Color alloc] init];
28992 # [result setRed:red];
28993 # [result setGreen:green];
28994 # [result setBlue:blue];
28995 # if (alpha <= 0.9999) {
28996 # [result setAlpha:floatWrapperWithValue(alpha)];
28997 # }
28998 # [result autorelease];
28999 # return result;
29000 # }
29001 # // ...
29002 #
29003 # Example (JavaScript):
29004 #
29005 # // ...
29006 #
29007 # var protoToCssColor = function(rgb_color) {
29008 # var redFrac = rgb_color.red || 0.0;
29009 # var greenFrac = rgb_color.green || 0.0;
29010 # var blueFrac = rgb_color.blue || 0.0;
29011 # var red = Math.floor(redFrac * 255);
29012 # var green = Math.floor(greenFrac * 255);
29013 # var blue = Math.floor(blueFrac * 255);
29014 #
29015 # if (!('alpha' in rgb_color)) {
29016 # return rgbToCssColor_(red, green, blue);
29017 # }
29018 #
29019 # var alphaFrac = rgb_color.alpha.value || 0.0;
29020 # var rgbParams = [red, green, blue].join(',');
29021 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29022 # };
29023 #
29024 # var rgbToCssColor_ = function(red, green, blue) {
29025 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29026 # var hexString = rgbNumber.toString(16);
29027 # var missingZeros = 6 - hexString.length;
29028 # var resultBuilder = ['#'];
29029 # for (var i = 0; i < missingZeros; i++) {
29030 # resultBuilder.push('0');
29031 # }
29032 # resultBuilder.push(hexString);
29033 # return resultBuilder.join('');
29034 # };
29035 #
29036 # // ...
29037 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29038 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29039 # the final pixel color is defined by the equation:
29040 #
29041 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29042 #
29043 # This means that a value of 1.0 corresponds to a solid color, whereas
29044 # a value of 0.0 corresponds to a completely transparent color. This
29045 # uses a wrapper message rather than a simple float scalar so that it is
29046 # possible to distinguish between a default value and the value being unset.
29047 # If omitted, this color object is to be rendered as a solid color
29048 # (as if the alpha value had been explicitly given with a value of 1.0).
29049 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29050 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29051 },
29052 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
29053 "sheetId": 42, # The ID of the sheet. Must be non-negative.
29054 # This field cannot be changed once set.
29055 },
29056 },
29057 ],
29058 }</pre>
29059</div>
29060
29061<div class="method">
29062 <code class="details" id="get">get(spreadsheetId, ranges=None, x__xgafv=None, includeGridData=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029063 <pre>Returns the spreadsheet at the given ID.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029064The caller must specify the spreadsheet ID.
29065
29066By default, data within grids will not be returned.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029067You can include grid data one of two ways:
29068
29069* Specify a field mask listing your desired fields using the `fields` URL
29070parameter in HTTP
29071
29072* Set the includeGridData
29073URL parameter to true. If a field mask is set, the `includeGridData`
29074parameter is ignored
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029075
29076For large spreadsheets, it is recommended to retrieve only the specific
29077fields of the spreadsheet that you want.
29078
29079To retrieve only subsets of the spreadsheet, use the
29080ranges URL parameter.
29081Multiple ranges can be specified. Limiting the range will
29082return only the portions of the spreadsheet that intersect the requested
29083ranges. Ranges are specified using A1 notation.
29084
29085Args:
29086 spreadsheetId: string, The spreadsheet to request. (required)
29087 ranges: string, The ranges to retrieve from the spreadsheet. (repeated)
29088 x__xgafv: string, V1 error format.
29089 Allowed values
29090 1 - v1 error format
29091 2 - v2 error format
29092 includeGridData: boolean, True if grid data should be returned.
29093This parameter is ignored if a field mask was set in the request.
29094
29095Returns:
29096 An object of the form:
29097
29098 { # Resource that represents a spreadsheet.
29099 "spreadsheetId": "A String", # The ID of the spreadsheet.
29100 # This field is read-only.
29101 "namedRanges": [ # The named ranges defined in a spreadsheet.
29102 { # A named range.
29103 "namedRangeId": "A String", # The ID of the named range.
29104 "range": { # A range on a sheet. # The range this represents.
29105 # All indexes are zero-based.
29106 # Indexes are half open, e.g the start index is inclusive
29107 # and the end index is exclusive -- [start_index, end_index).
29108 # Missing indexes indicate the range is unbounded on that side.
29109 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029110 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029111 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029112 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029113 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029114 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029115 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029116 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029117 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029118 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029119 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029120 # `Sheet1!A:B == sheet_id: 0,
29121 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029122 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029123 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029124 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029125 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029126 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029127 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029128 #
29129 # The start index must always be less than or equal to the end index.
29130 # If the start index equals the end index, then the range is empty.
29131 # Empty ranges are typically not meaningful and are usually rendered in the
29132 # UI as `#REF!`.
29133 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
29134 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
29135 "sheetId": 42, # The sheet this range is on.
29136 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
29137 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
29138 },
29139 "name": "A String", # The name of the named range.
29140 },
29141 ],
29142 "properties": { # Properties of a spreadsheet. # Overall properties of a spreadsheet.
29143 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029144 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029145 # * an ISO 639-1 language code such as `en`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029146 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029147 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029148 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029149 # * a combination of the ISO language code and country code, such as `en_US`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029150 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029151 # Note: when updating this field, not all locales/languages are supported.
29152 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
29153 # `America/New_York`. If the time zone isn't recognized, this may
29154 # be a custom time zone such as `GMT-07:00`.
29155 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
29156 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029157 # CellData.effectiveFormat will not be set if the
29158 # cell's format is equal to this default format.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029159 # This field is read-only.
29160 "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 -070029161 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
29162 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070029163 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
29164 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029165 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029166 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029167 },
29168 "textDirection": "A String", # The direction of the text in the cell.
29169 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
29170 # When updating padding, every field must be specified.
29171 "top": 42, # The top padding of the cell.
29172 "right": 42, # The right padding of the cell.
29173 "bottom": 42, # The bottom padding of the cell.
29174 "left": 42, # The left padding of the cell.
29175 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029176 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029177 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
29178 # for simplicity of conversion to/from color representations in various
29179 # languages over compactness; for example, the fields of this representation
29180 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29181 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29182 # method in iOS; and, with just a little work, it can be easily formatted into
29183 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29184 #
29185 # Example (Java):
29186 #
29187 # import com.google.type.Color;
29188 #
29189 # // ...
29190 # public static java.awt.Color fromProto(Color protocolor) {
29191 # float alpha = protocolor.hasAlpha()
29192 # ? protocolor.getAlpha().getValue()
29193 # : 1.0;
29194 #
29195 # return new java.awt.Color(
29196 # protocolor.getRed(),
29197 # protocolor.getGreen(),
29198 # protocolor.getBlue(),
29199 # alpha);
29200 # }
29201 #
29202 # public static Color toProto(java.awt.Color color) {
29203 # float red = (float) color.getRed();
29204 # float green = (float) color.getGreen();
29205 # float blue = (float) color.getBlue();
29206 # float denominator = 255.0;
29207 # Color.Builder resultBuilder =
29208 # Color
29209 # .newBuilder()
29210 # .setRed(red / denominator)
29211 # .setGreen(green / denominator)
29212 # .setBlue(blue / denominator);
29213 # int alpha = color.getAlpha();
29214 # if (alpha != 255) {
29215 # result.setAlpha(
29216 # FloatValue
29217 # .newBuilder()
29218 # .setValue(((float) alpha) / denominator)
29219 # .build());
29220 # }
29221 # return resultBuilder.build();
29222 # }
29223 # // ...
29224 #
29225 # Example (iOS / Obj-C):
29226 #
29227 # // ...
29228 # static UIColor* fromProto(Color* protocolor) {
29229 # float red = [protocolor red];
29230 # float green = [protocolor green];
29231 # float blue = [protocolor blue];
29232 # FloatValue* alpha_wrapper = [protocolor alpha];
29233 # float alpha = 1.0;
29234 # if (alpha_wrapper != nil) {
29235 # alpha = [alpha_wrapper value];
29236 # }
29237 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29238 # }
29239 #
29240 # static Color* toProto(UIColor* color) {
29241 # CGFloat red, green, blue, alpha;
29242 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29243 # return nil;
29244 # }
29245 # Color* result = [Color alloc] init];
29246 # [result setRed:red];
29247 # [result setGreen:green];
29248 # [result setBlue:blue];
29249 # if (alpha <= 0.9999) {
29250 # [result setAlpha:floatWrapperWithValue(alpha)];
29251 # }
29252 # [result autorelease];
29253 # return result;
29254 # }
29255 # // ...
29256 #
29257 # Example (JavaScript):
29258 #
29259 # // ...
29260 #
29261 # var protoToCssColor = function(rgb_color) {
29262 # var redFrac = rgb_color.red || 0.0;
29263 # var greenFrac = rgb_color.green || 0.0;
29264 # var blueFrac = rgb_color.blue || 0.0;
29265 # var red = Math.floor(redFrac * 255);
29266 # var green = Math.floor(greenFrac * 255);
29267 # var blue = Math.floor(blueFrac * 255);
29268 #
29269 # if (!('alpha' in rgb_color)) {
29270 # return rgbToCssColor_(red, green, blue);
29271 # }
29272 #
29273 # var alphaFrac = rgb_color.alpha.value || 0.0;
29274 # var rgbParams = [red, green, blue].join(',');
29275 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29276 # };
29277 #
29278 # var rgbToCssColor_ = function(red, green, blue) {
29279 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29280 # var hexString = rgbNumber.toString(16);
29281 # var missingZeros = 6 - hexString.length;
29282 # var resultBuilder = ['#'];
29283 # for (var i = 0; i < missingZeros; i++) {
29284 # resultBuilder.push('0');
29285 # }
29286 # resultBuilder.push(hexString);
29287 # return resultBuilder.join('');
29288 # };
29289 #
29290 # // ...
29291 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29292 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29293 # the final pixel color is defined by the equation:
29294 #
29295 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29296 #
29297 # This means that a value of 1.0 corresponds to a solid color, whereas
29298 # a value of 0.0 corresponds to a completely transparent color. This
29299 # uses a wrapper message rather than a simple float scalar so that it is
29300 # possible to distinguish between a default value and the value being unset.
29301 # If omitted, this color object is to be rendered as a solid color
29302 # (as if the alpha value had been explicitly given with a value of 1.0).
29303 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29304 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29305 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029306 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029307 "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).
29308 # Absent values indicate that the field isn't specified.
29309 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
29310 # for simplicity of conversion to/from color representations in various
29311 # languages over compactness; for example, the fields of this representation
29312 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29313 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29314 # method in iOS; and, with just a little work, it can be easily formatted into
29315 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29316 #
29317 # Example (Java):
29318 #
29319 # import com.google.type.Color;
29320 #
29321 # // ...
29322 # public static java.awt.Color fromProto(Color protocolor) {
29323 # float alpha = protocolor.hasAlpha()
29324 # ? protocolor.getAlpha().getValue()
29325 # : 1.0;
29326 #
29327 # return new java.awt.Color(
29328 # protocolor.getRed(),
29329 # protocolor.getGreen(),
29330 # protocolor.getBlue(),
29331 # alpha);
29332 # }
29333 #
29334 # public static Color toProto(java.awt.Color color) {
29335 # float red = (float) color.getRed();
29336 # float green = (float) color.getGreen();
29337 # float blue = (float) color.getBlue();
29338 # float denominator = 255.0;
29339 # Color.Builder resultBuilder =
29340 # Color
29341 # .newBuilder()
29342 # .setRed(red / denominator)
29343 # .setGreen(green / denominator)
29344 # .setBlue(blue / denominator);
29345 # int alpha = color.getAlpha();
29346 # if (alpha != 255) {
29347 # result.setAlpha(
29348 # FloatValue
29349 # .newBuilder()
29350 # .setValue(((float) alpha) / denominator)
29351 # .build());
29352 # }
29353 # return resultBuilder.build();
29354 # }
29355 # // ...
29356 #
29357 # Example (iOS / Obj-C):
29358 #
29359 # // ...
29360 # static UIColor* fromProto(Color* protocolor) {
29361 # float red = [protocolor red];
29362 # float green = [protocolor green];
29363 # float blue = [protocolor blue];
29364 # FloatValue* alpha_wrapper = [protocolor alpha];
29365 # float alpha = 1.0;
29366 # if (alpha_wrapper != nil) {
29367 # alpha = [alpha_wrapper value];
29368 # }
29369 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29370 # }
29371 #
29372 # static Color* toProto(UIColor* color) {
29373 # CGFloat red, green, blue, alpha;
29374 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29375 # return nil;
29376 # }
29377 # Color* result = [Color alloc] init];
29378 # [result setRed:red];
29379 # [result setGreen:green];
29380 # [result setBlue:blue];
29381 # if (alpha <= 0.9999) {
29382 # [result setAlpha:floatWrapperWithValue(alpha)];
29383 # }
29384 # [result autorelease];
29385 # return result;
29386 # }
29387 # // ...
29388 #
29389 # Example (JavaScript):
29390 #
29391 # // ...
29392 #
29393 # var protoToCssColor = function(rgb_color) {
29394 # var redFrac = rgb_color.red || 0.0;
29395 # var greenFrac = rgb_color.green || 0.0;
29396 # var blueFrac = rgb_color.blue || 0.0;
29397 # var red = Math.floor(redFrac * 255);
29398 # var green = Math.floor(greenFrac * 255);
29399 # var blue = Math.floor(blueFrac * 255);
29400 #
29401 # if (!('alpha' in rgb_color)) {
29402 # return rgbToCssColor_(red, green, blue);
29403 # }
29404 #
29405 # var alphaFrac = rgb_color.alpha.value || 0.0;
29406 # var rgbParams = [red, green, blue].join(',');
29407 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29408 # };
29409 #
29410 # var rgbToCssColor_ = function(red, green, blue) {
29411 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29412 # var hexString = rgbNumber.toString(16);
29413 # var missingZeros = 6 - hexString.length;
29414 # var resultBuilder = ['#'];
29415 # for (var i = 0; i < missingZeros; i++) {
29416 # resultBuilder.push('0');
29417 # }
29418 # resultBuilder.push(hexString);
29419 # return resultBuilder.join('');
29420 # };
29421 #
29422 # // ...
29423 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29424 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29425 # the final pixel color is defined by the equation:
29426 #
29427 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29428 #
29429 # This means that a value of 1.0 corresponds to a solid color, whereas
29430 # a value of 0.0 corresponds to a completely transparent color. This
29431 # uses a wrapper message rather than a simple float scalar so that it is
29432 # possible to distinguish between a default value and the value being unset.
29433 # If omitted, this color object is to be rendered as a solid color
29434 # (as if the alpha value had been explicitly given with a value of 1.0).
29435 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29436 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29437 },
29438 "bold": True or False, # True if the text is bold.
29439 "strikethrough": True or False, # True if the text has a strikethrough.
29440 "fontFamily": "A String", # The font family.
29441 "fontSize": 42, # The size of the font.
29442 "italic": True or False, # True if the text is italicized.
29443 "underline": True or False, # True if the text is underlined.
29444 },
29445 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
29446 "borders": { # The borders of the cell. # The borders of the cell.
29447 "top": { # A border along a cell. # The top border of the cell.
29448 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29449 # for simplicity of conversion to/from color representations in various
29450 # languages over compactness; for example, the fields of this representation
29451 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29452 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29453 # method in iOS; and, with just a little work, it can be easily formatted into
29454 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29455 #
29456 # Example (Java):
29457 #
29458 # import com.google.type.Color;
29459 #
29460 # // ...
29461 # public static java.awt.Color fromProto(Color protocolor) {
29462 # float alpha = protocolor.hasAlpha()
29463 # ? protocolor.getAlpha().getValue()
29464 # : 1.0;
29465 #
29466 # return new java.awt.Color(
29467 # protocolor.getRed(),
29468 # protocolor.getGreen(),
29469 # protocolor.getBlue(),
29470 # alpha);
29471 # }
29472 #
29473 # public static Color toProto(java.awt.Color color) {
29474 # float red = (float) color.getRed();
29475 # float green = (float) color.getGreen();
29476 # float blue = (float) color.getBlue();
29477 # float denominator = 255.0;
29478 # Color.Builder resultBuilder =
29479 # Color
29480 # .newBuilder()
29481 # .setRed(red / denominator)
29482 # .setGreen(green / denominator)
29483 # .setBlue(blue / denominator);
29484 # int alpha = color.getAlpha();
29485 # if (alpha != 255) {
29486 # result.setAlpha(
29487 # FloatValue
29488 # .newBuilder()
29489 # .setValue(((float) alpha) / denominator)
29490 # .build());
29491 # }
29492 # return resultBuilder.build();
29493 # }
29494 # // ...
29495 #
29496 # Example (iOS / Obj-C):
29497 #
29498 # // ...
29499 # static UIColor* fromProto(Color* protocolor) {
29500 # float red = [protocolor red];
29501 # float green = [protocolor green];
29502 # float blue = [protocolor blue];
29503 # FloatValue* alpha_wrapper = [protocolor alpha];
29504 # float alpha = 1.0;
29505 # if (alpha_wrapper != nil) {
29506 # alpha = [alpha_wrapper value];
29507 # }
29508 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29509 # }
29510 #
29511 # static Color* toProto(UIColor* color) {
29512 # CGFloat red, green, blue, alpha;
29513 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29514 # return nil;
29515 # }
29516 # Color* result = [Color alloc] init];
29517 # [result setRed:red];
29518 # [result setGreen:green];
29519 # [result setBlue:blue];
29520 # if (alpha <= 0.9999) {
29521 # [result setAlpha:floatWrapperWithValue(alpha)];
29522 # }
29523 # [result autorelease];
29524 # return result;
29525 # }
29526 # // ...
29527 #
29528 # Example (JavaScript):
29529 #
29530 # // ...
29531 #
29532 # var protoToCssColor = function(rgb_color) {
29533 # var redFrac = rgb_color.red || 0.0;
29534 # var greenFrac = rgb_color.green || 0.0;
29535 # var blueFrac = rgb_color.blue || 0.0;
29536 # var red = Math.floor(redFrac * 255);
29537 # var green = Math.floor(greenFrac * 255);
29538 # var blue = Math.floor(blueFrac * 255);
29539 #
29540 # if (!('alpha' in rgb_color)) {
29541 # return rgbToCssColor_(red, green, blue);
29542 # }
29543 #
29544 # var alphaFrac = rgb_color.alpha.value || 0.0;
29545 # var rgbParams = [red, green, blue].join(',');
29546 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29547 # };
29548 #
29549 # var rgbToCssColor_ = function(red, green, blue) {
29550 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29551 # var hexString = rgbNumber.toString(16);
29552 # var missingZeros = 6 - hexString.length;
29553 # var resultBuilder = ['#'];
29554 # for (var i = 0; i < missingZeros; i++) {
29555 # resultBuilder.push('0');
29556 # }
29557 # resultBuilder.push(hexString);
29558 # return resultBuilder.join('');
29559 # };
29560 #
29561 # // ...
29562 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29563 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29564 # the final pixel color is defined by the equation:
29565 #
29566 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29567 #
29568 # This means that a value of 1.0 corresponds to a solid color, whereas
29569 # a value of 0.0 corresponds to a completely transparent color. This
29570 # uses a wrapper message rather than a simple float scalar so that it is
29571 # possible to distinguish between a default value and the value being unset.
29572 # If omitted, this color object is to be rendered as a solid color
29573 # (as if the alpha value had been explicitly given with a value of 1.0).
29574 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29575 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29576 },
29577 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029578 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029579 "style": "A String", # The style of the border.
29580 },
29581 "right": { # A border along a cell. # The right border of the cell.
29582 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29583 # for simplicity of conversion to/from color representations in various
29584 # languages over compactness; for example, the fields of this representation
29585 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29586 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29587 # method in iOS; and, with just a little work, it can be easily formatted into
29588 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29589 #
29590 # Example (Java):
29591 #
29592 # import com.google.type.Color;
29593 #
29594 # // ...
29595 # public static java.awt.Color fromProto(Color protocolor) {
29596 # float alpha = protocolor.hasAlpha()
29597 # ? protocolor.getAlpha().getValue()
29598 # : 1.0;
29599 #
29600 # return new java.awt.Color(
29601 # protocolor.getRed(),
29602 # protocolor.getGreen(),
29603 # protocolor.getBlue(),
29604 # alpha);
29605 # }
29606 #
29607 # public static Color toProto(java.awt.Color color) {
29608 # float red = (float) color.getRed();
29609 # float green = (float) color.getGreen();
29610 # float blue = (float) color.getBlue();
29611 # float denominator = 255.0;
29612 # Color.Builder resultBuilder =
29613 # Color
29614 # .newBuilder()
29615 # .setRed(red / denominator)
29616 # .setGreen(green / denominator)
29617 # .setBlue(blue / denominator);
29618 # int alpha = color.getAlpha();
29619 # if (alpha != 255) {
29620 # result.setAlpha(
29621 # FloatValue
29622 # .newBuilder()
29623 # .setValue(((float) alpha) / denominator)
29624 # .build());
29625 # }
29626 # return resultBuilder.build();
29627 # }
29628 # // ...
29629 #
29630 # Example (iOS / Obj-C):
29631 #
29632 # // ...
29633 # static UIColor* fromProto(Color* protocolor) {
29634 # float red = [protocolor red];
29635 # float green = [protocolor green];
29636 # float blue = [protocolor blue];
29637 # FloatValue* alpha_wrapper = [protocolor alpha];
29638 # float alpha = 1.0;
29639 # if (alpha_wrapper != nil) {
29640 # alpha = [alpha_wrapper value];
29641 # }
29642 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29643 # }
29644 #
29645 # static Color* toProto(UIColor* color) {
29646 # CGFloat red, green, blue, alpha;
29647 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29648 # return nil;
29649 # }
29650 # Color* result = [Color alloc] init];
29651 # [result setRed:red];
29652 # [result setGreen:green];
29653 # [result setBlue:blue];
29654 # if (alpha <= 0.9999) {
29655 # [result setAlpha:floatWrapperWithValue(alpha)];
29656 # }
29657 # [result autorelease];
29658 # return result;
29659 # }
29660 # // ...
29661 #
29662 # Example (JavaScript):
29663 #
29664 # // ...
29665 #
29666 # var protoToCssColor = function(rgb_color) {
29667 # var redFrac = rgb_color.red || 0.0;
29668 # var greenFrac = rgb_color.green || 0.0;
29669 # var blueFrac = rgb_color.blue || 0.0;
29670 # var red = Math.floor(redFrac * 255);
29671 # var green = Math.floor(greenFrac * 255);
29672 # var blue = Math.floor(blueFrac * 255);
29673 #
29674 # if (!('alpha' in rgb_color)) {
29675 # return rgbToCssColor_(red, green, blue);
29676 # }
29677 #
29678 # var alphaFrac = rgb_color.alpha.value || 0.0;
29679 # var rgbParams = [red, green, blue].join(',');
29680 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29681 # };
29682 #
29683 # var rgbToCssColor_ = function(red, green, blue) {
29684 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29685 # var hexString = rgbNumber.toString(16);
29686 # var missingZeros = 6 - hexString.length;
29687 # var resultBuilder = ['#'];
29688 # for (var i = 0; i < missingZeros; i++) {
29689 # resultBuilder.push('0');
29690 # }
29691 # resultBuilder.push(hexString);
29692 # return resultBuilder.join('');
29693 # };
29694 #
29695 # // ...
29696 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29697 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29698 # the final pixel color is defined by the equation:
29699 #
29700 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29701 #
29702 # This means that a value of 1.0 corresponds to a solid color, whereas
29703 # a value of 0.0 corresponds to a completely transparent color. This
29704 # uses a wrapper message rather than a simple float scalar so that it is
29705 # possible to distinguish between a default value and the value being unset.
29706 # If omitted, this color object is to be rendered as a solid color
29707 # (as if the alpha value had been explicitly given with a value of 1.0).
29708 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29709 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29710 },
29711 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029712 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029713 "style": "A String", # The style of the border.
29714 },
29715 "bottom": { # A border along a cell. # The bottom border of the cell.
29716 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29717 # for simplicity of conversion to/from color representations in various
29718 # languages over compactness; for example, the fields of this representation
29719 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29720 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29721 # method in iOS; and, with just a little work, it can be easily formatted into
29722 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29723 #
29724 # Example (Java):
29725 #
29726 # import com.google.type.Color;
29727 #
29728 # // ...
29729 # public static java.awt.Color fromProto(Color protocolor) {
29730 # float alpha = protocolor.hasAlpha()
29731 # ? protocolor.getAlpha().getValue()
29732 # : 1.0;
29733 #
29734 # return new java.awt.Color(
29735 # protocolor.getRed(),
29736 # protocolor.getGreen(),
29737 # protocolor.getBlue(),
29738 # alpha);
29739 # }
29740 #
29741 # public static Color toProto(java.awt.Color color) {
29742 # float red = (float) color.getRed();
29743 # float green = (float) color.getGreen();
29744 # float blue = (float) color.getBlue();
29745 # float denominator = 255.0;
29746 # Color.Builder resultBuilder =
29747 # Color
29748 # .newBuilder()
29749 # .setRed(red / denominator)
29750 # .setGreen(green / denominator)
29751 # .setBlue(blue / denominator);
29752 # int alpha = color.getAlpha();
29753 # if (alpha != 255) {
29754 # result.setAlpha(
29755 # FloatValue
29756 # .newBuilder()
29757 # .setValue(((float) alpha) / denominator)
29758 # .build());
29759 # }
29760 # return resultBuilder.build();
29761 # }
29762 # // ...
29763 #
29764 # Example (iOS / Obj-C):
29765 #
29766 # // ...
29767 # static UIColor* fromProto(Color* protocolor) {
29768 # float red = [protocolor red];
29769 # float green = [protocolor green];
29770 # float blue = [protocolor blue];
29771 # FloatValue* alpha_wrapper = [protocolor alpha];
29772 # float alpha = 1.0;
29773 # if (alpha_wrapper != nil) {
29774 # alpha = [alpha_wrapper value];
29775 # }
29776 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29777 # }
29778 #
29779 # static Color* toProto(UIColor* color) {
29780 # CGFloat red, green, blue, alpha;
29781 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29782 # return nil;
29783 # }
29784 # Color* result = [Color alloc] init];
29785 # [result setRed:red];
29786 # [result setGreen:green];
29787 # [result setBlue:blue];
29788 # if (alpha <= 0.9999) {
29789 # [result setAlpha:floatWrapperWithValue(alpha)];
29790 # }
29791 # [result autorelease];
29792 # return result;
29793 # }
29794 # // ...
29795 #
29796 # Example (JavaScript):
29797 #
29798 # // ...
29799 #
29800 # var protoToCssColor = function(rgb_color) {
29801 # var redFrac = rgb_color.red || 0.0;
29802 # var greenFrac = rgb_color.green || 0.0;
29803 # var blueFrac = rgb_color.blue || 0.0;
29804 # var red = Math.floor(redFrac * 255);
29805 # var green = Math.floor(greenFrac * 255);
29806 # var blue = Math.floor(blueFrac * 255);
29807 #
29808 # if (!('alpha' in rgb_color)) {
29809 # return rgbToCssColor_(red, green, blue);
29810 # }
29811 #
29812 # var alphaFrac = rgb_color.alpha.value || 0.0;
29813 # var rgbParams = [red, green, blue].join(',');
29814 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29815 # };
29816 #
29817 # var rgbToCssColor_ = function(red, green, blue) {
29818 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29819 # var hexString = rgbNumber.toString(16);
29820 # var missingZeros = 6 - hexString.length;
29821 # var resultBuilder = ['#'];
29822 # for (var i = 0; i < missingZeros; i++) {
29823 # resultBuilder.push('0');
29824 # }
29825 # resultBuilder.push(hexString);
29826 # return resultBuilder.join('');
29827 # };
29828 #
29829 # // ...
29830 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29831 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29832 # the final pixel color is defined by the equation:
29833 #
29834 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29835 #
29836 # This means that a value of 1.0 corresponds to a solid color, whereas
29837 # a value of 0.0 corresponds to a completely transparent color. This
29838 # uses a wrapper message rather than a simple float scalar so that it is
29839 # possible to distinguish between a default value and the value being unset.
29840 # If omitted, this color object is to be rendered as a solid color
29841 # (as if the alpha value had been explicitly given with a value of 1.0).
29842 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29843 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29844 },
29845 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029846 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029847 "style": "A String", # The style of the border.
29848 },
29849 "left": { # A border along a cell. # The left border of the cell.
29850 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29851 # for simplicity of conversion to/from color representations in various
29852 # languages over compactness; for example, the fields of this representation
29853 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29854 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29855 # method in iOS; and, with just a little work, it can be easily formatted into
29856 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29857 #
29858 # Example (Java):
29859 #
29860 # import com.google.type.Color;
29861 #
29862 # // ...
29863 # public static java.awt.Color fromProto(Color protocolor) {
29864 # float alpha = protocolor.hasAlpha()
29865 # ? protocolor.getAlpha().getValue()
29866 # : 1.0;
29867 #
29868 # return new java.awt.Color(
29869 # protocolor.getRed(),
29870 # protocolor.getGreen(),
29871 # protocolor.getBlue(),
29872 # alpha);
29873 # }
29874 #
29875 # public static Color toProto(java.awt.Color color) {
29876 # float red = (float) color.getRed();
29877 # float green = (float) color.getGreen();
29878 # float blue = (float) color.getBlue();
29879 # float denominator = 255.0;
29880 # Color.Builder resultBuilder =
29881 # Color
29882 # .newBuilder()
29883 # .setRed(red / denominator)
29884 # .setGreen(green / denominator)
29885 # .setBlue(blue / denominator);
29886 # int alpha = color.getAlpha();
29887 # if (alpha != 255) {
29888 # result.setAlpha(
29889 # FloatValue
29890 # .newBuilder()
29891 # .setValue(((float) alpha) / denominator)
29892 # .build());
29893 # }
29894 # return resultBuilder.build();
29895 # }
29896 # // ...
29897 #
29898 # Example (iOS / Obj-C):
29899 #
29900 # // ...
29901 # static UIColor* fromProto(Color* protocolor) {
29902 # float red = [protocolor red];
29903 # float green = [protocolor green];
29904 # float blue = [protocolor blue];
29905 # FloatValue* alpha_wrapper = [protocolor alpha];
29906 # float alpha = 1.0;
29907 # if (alpha_wrapper != nil) {
29908 # alpha = [alpha_wrapper value];
29909 # }
29910 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29911 # }
29912 #
29913 # static Color* toProto(UIColor* color) {
29914 # CGFloat red, green, blue, alpha;
29915 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29916 # return nil;
29917 # }
29918 # Color* result = [Color alloc] init];
29919 # [result setRed:red];
29920 # [result setGreen:green];
29921 # [result setBlue:blue];
29922 # if (alpha <= 0.9999) {
29923 # [result setAlpha:floatWrapperWithValue(alpha)];
29924 # }
29925 # [result autorelease];
29926 # return result;
29927 # }
29928 # // ...
29929 #
29930 # Example (JavaScript):
29931 #
29932 # // ...
29933 #
29934 # var protoToCssColor = function(rgb_color) {
29935 # var redFrac = rgb_color.red || 0.0;
29936 # var greenFrac = rgb_color.green || 0.0;
29937 # var blueFrac = rgb_color.blue || 0.0;
29938 # var red = Math.floor(redFrac * 255);
29939 # var green = Math.floor(greenFrac * 255);
29940 # var blue = Math.floor(blueFrac * 255);
29941 #
29942 # if (!('alpha' in rgb_color)) {
29943 # return rgbToCssColor_(red, green, blue);
29944 # }
29945 #
29946 # var alphaFrac = rgb_color.alpha.value || 0.0;
29947 # var rgbParams = [red, green, blue].join(',');
29948 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29949 # };
29950 #
29951 # var rgbToCssColor_ = function(red, green, blue) {
29952 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29953 # var hexString = rgbNumber.toString(16);
29954 # var missingZeros = 6 - hexString.length;
29955 # var resultBuilder = ['#'];
29956 # for (var i = 0; i < missingZeros; i++) {
29957 # resultBuilder.push('0');
29958 # }
29959 # resultBuilder.push(hexString);
29960 # return resultBuilder.join('');
29961 # };
29962 #
29963 # // ...
29964 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29965 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29966 # the final pixel color is defined by the equation:
29967 #
29968 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29969 #
29970 # This means that a value of 1.0 corresponds to a solid color, whereas
29971 # a value of 0.0 corresponds to a completely transparent color. This
29972 # uses a wrapper message rather than a simple float scalar so that it is
29973 # possible to distinguish between a default value and the value being unset.
29974 # If omitted, this color object is to be rendered as a solid color
29975 # (as if the alpha value had been explicitly given with a value of 1.0).
29976 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29977 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29978 },
29979 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070029980 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070029981 "style": "A String", # The style of the border.
29982 },
29983 },
29984 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
29985 },
29986 "title": "A String", # The title of the spreadsheet.
29987 },
29988 "sheets": [ # The sheets that are part of a spreadsheet.
29989 { # A sheet in a spreadsheet.
29990 "conditionalFormats": [ # The conditional format rules in this sheet.
29991 { # A rule describing a conditional format.
29992 "ranges": [ # The ranges that will be formatted if the condition is true.
29993 # All the ranges must be on the same grid.
29994 { # A range on a sheet.
29995 # All indexes are zero-based.
29996 # Indexes are half open, e.g the start index is inclusive
29997 # and the end index is exclusive -- [start_index, end_index).
29998 # Missing indexes indicate the range is unbounded on that side.
29999 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030000 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030001 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030002 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030003 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030004 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030005 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030006 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030007 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030008 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030009 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030010 # `Sheet1!A:B == sheet_id: 0,
30011 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030012 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030013 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030014 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030015 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030016 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030017 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030018 #
30019 # The start index must always be less than or equal to the end index.
30020 # If the start index equals the end index, then the range is empty.
30021 # Empty ranges are typically not meaningful and are usually rendered in the
30022 # UI as `#REF!`.
30023 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
30024 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
30025 "sheetId": 42, # The sheet this range is on.
30026 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
30027 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
30028 },
30029 ],
30030 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
30031 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
30032 # the format will be applied.
30033 # BooleanConditions are used by conditional formatting,
30034 # data validation, and the criteria in filters.
30035 "type": "A String", # The type of condition.
30036 "values": [ # The values of the condition. The number of supported values depends
30037 # on the condition type. Some support zero values,
30038 # others one or two values,
30039 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
30040 { # The value of the condition.
30041 "relativeDate": "A String", # A relative date (based on the current date).
30042 # Valid only if the type is
30043 # DATE_BEFORE,
30044 # DATE_AFTER,
30045 # DATE_ON_OR_BEFORE or
30046 # DATE_ON_OR_AFTER.
30047 #
30048 # Relative dates are not supported in data validation.
30049 # They are supported only in conditional formatting and
30050 # conditional filters.
30051 "userEnteredValue": "A String", # A value the condition is based on.
30052 # The value will be parsed as if the user typed into a cell.
30053 # Formulas are supported (and must begin with an `=`).
30054 },
30055 ],
30056 },
30057 "format": { # The format of a cell. # The format to apply.
30058 # Conditional formatting can only apply a subset of formatting:
30059 # bold, italic,
30060 # strikethrough,
30061 # foreground color &
30062 # background color.
30063 "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 -070030064 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
30065 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070030066 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
30067 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030068 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030069 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030070 },
30071 "textDirection": "A String", # The direction of the text in the cell.
30072 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
30073 # When updating padding, every field must be specified.
30074 "top": 42, # The top padding of the cell.
30075 "right": 42, # The right padding of the cell.
30076 "bottom": 42, # The bottom padding of the cell.
30077 "left": 42, # The left padding of the cell.
30078 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030079 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030080 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
30081 # for simplicity of conversion to/from color representations in various
30082 # languages over compactness; for example, the fields of this representation
30083 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30084 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30085 # method in iOS; and, with just a little work, it can be easily formatted into
30086 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30087 #
30088 # Example (Java):
30089 #
30090 # import com.google.type.Color;
30091 #
30092 # // ...
30093 # public static java.awt.Color fromProto(Color protocolor) {
30094 # float alpha = protocolor.hasAlpha()
30095 # ? protocolor.getAlpha().getValue()
30096 # : 1.0;
30097 #
30098 # return new java.awt.Color(
30099 # protocolor.getRed(),
30100 # protocolor.getGreen(),
30101 # protocolor.getBlue(),
30102 # alpha);
30103 # }
30104 #
30105 # public static Color toProto(java.awt.Color color) {
30106 # float red = (float) color.getRed();
30107 # float green = (float) color.getGreen();
30108 # float blue = (float) color.getBlue();
30109 # float denominator = 255.0;
30110 # Color.Builder resultBuilder =
30111 # Color
30112 # .newBuilder()
30113 # .setRed(red / denominator)
30114 # .setGreen(green / denominator)
30115 # .setBlue(blue / denominator);
30116 # int alpha = color.getAlpha();
30117 # if (alpha != 255) {
30118 # result.setAlpha(
30119 # FloatValue
30120 # .newBuilder()
30121 # .setValue(((float) alpha) / denominator)
30122 # .build());
30123 # }
30124 # return resultBuilder.build();
30125 # }
30126 # // ...
30127 #
30128 # Example (iOS / Obj-C):
30129 #
30130 # // ...
30131 # static UIColor* fromProto(Color* protocolor) {
30132 # float red = [protocolor red];
30133 # float green = [protocolor green];
30134 # float blue = [protocolor blue];
30135 # FloatValue* alpha_wrapper = [protocolor alpha];
30136 # float alpha = 1.0;
30137 # if (alpha_wrapper != nil) {
30138 # alpha = [alpha_wrapper value];
30139 # }
30140 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30141 # }
30142 #
30143 # static Color* toProto(UIColor* color) {
30144 # CGFloat red, green, blue, alpha;
30145 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30146 # return nil;
30147 # }
30148 # Color* result = [Color alloc] init];
30149 # [result setRed:red];
30150 # [result setGreen:green];
30151 # [result setBlue:blue];
30152 # if (alpha <= 0.9999) {
30153 # [result setAlpha:floatWrapperWithValue(alpha)];
30154 # }
30155 # [result autorelease];
30156 # return result;
30157 # }
30158 # // ...
30159 #
30160 # Example (JavaScript):
30161 #
30162 # // ...
30163 #
30164 # var protoToCssColor = function(rgb_color) {
30165 # var redFrac = rgb_color.red || 0.0;
30166 # var greenFrac = rgb_color.green || 0.0;
30167 # var blueFrac = rgb_color.blue || 0.0;
30168 # var red = Math.floor(redFrac * 255);
30169 # var green = Math.floor(greenFrac * 255);
30170 # var blue = Math.floor(blueFrac * 255);
30171 #
30172 # if (!('alpha' in rgb_color)) {
30173 # return rgbToCssColor_(red, green, blue);
30174 # }
30175 #
30176 # var alphaFrac = rgb_color.alpha.value || 0.0;
30177 # var rgbParams = [red, green, blue].join(',');
30178 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30179 # };
30180 #
30181 # var rgbToCssColor_ = function(red, green, blue) {
30182 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30183 # var hexString = rgbNumber.toString(16);
30184 # var missingZeros = 6 - hexString.length;
30185 # var resultBuilder = ['#'];
30186 # for (var i = 0; i < missingZeros; i++) {
30187 # resultBuilder.push('0');
30188 # }
30189 # resultBuilder.push(hexString);
30190 # return resultBuilder.join('');
30191 # };
30192 #
30193 # // ...
30194 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30195 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30196 # the final pixel color is defined by the equation:
30197 #
30198 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30199 #
30200 # This means that a value of 1.0 corresponds to a solid color, whereas
30201 # a value of 0.0 corresponds to a completely transparent color. This
30202 # uses a wrapper message rather than a simple float scalar so that it is
30203 # possible to distinguish between a default value and the value being unset.
30204 # If omitted, this color object is to be rendered as a solid color
30205 # (as if the alpha value had been explicitly given with a value of 1.0).
30206 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30207 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30208 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030209 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030210 "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).
30211 # Absent values indicate that the field isn't specified.
30212 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
30213 # for simplicity of conversion to/from color representations in various
30214 # languages over compactness; for example, the fields of this representation
30215 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30216 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30217 # method in iOS; and, with just a little work, it can be easily formatted into
30218 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30219 #
30220 # Example (Java):
30221 #
30222 # import com.google.type.Color;
30223 #
30224 # // ...
30225 # public static java.awt.Color fromProto(Color protocolor) {
30226 # float alpha = protocolor.hasAlpha()
30227 # ? protocolor.getAlpha().getValue()
30228 # : 1.0;
30229 #
30230 # return new java.awt.Color(
30231 # protocolor.getRed(),
30232 # protocolor.getGreen(),
30233 # protocolor.getBlue(),
30234 # alpha);
30235 # }
30236 #
30237 # public static Color toProto(java.awt.Color color) {
30238 # float red = (float) color.getRed();
30239 # float green = (float) color.getGreen();
30240 # float blue = (float) color.getBlue();
30241 # float denominator = 255.0;
30242 # Color.Builder resultBuilder =
30243 # Color
30244 # .newBuilder()
30245 # .setRed(red / denominator)
30246 # .setGreen(green / denominator)
30247 # .setBlue(blue / denominator);
30248 # int alpha = color.getAlpha();
30249 # if (alpha != 255) {
30250 # result.setAlpha(
30251 # FloatValue
30252 # .newBuilder()
30253 # .setValue(((float) alpha) / denominator)
30254 # .build());
30255 # }
30256 # return resultBuilder.build();
30257 # }
30258 # // ...
30259 #
30260 # Example (iOS / Obj-C):
30261 #
30262 # // ...
30263 # static UIColor* fromProto(Color* protocolor) {
30264 # float red = [protocolor red];
30265 # float green = [protocolor green];
30266 # float blue = [protocolor blue];
30267 # FloatValue* alpha_wrapper = [protocolor alpha];
30268 # float alpha = 1.0;
30269 # if (alpha_wrapper != nil) {
30270 # alpha = [alpha_wrapper value];
30271 # }
30272 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30273 # }
30274 #
30275 # static Color* toProto(UIColor* color) {
30276 # CGFloat red, green, blue, alpha;
30277 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30278 # return nil;
30279 # }
30280 # Color* result = [Color alloc] init];
30281 # [result setRed:red];
30282 # [result setGreen:green];
30283 # [result setBlue:blue];
30284 # if (alpha <= 0.9999) {
30285 # [result setAlpha:floatWrapperWithValue(alpha)];
30286 # }
30287 # [result autorelease];
30288 # return result;
30289 # }
30290 # // ...
30291 #
30292 # Example (JavaScript):
30293 #
30294 # // ...
30295 #
30296 # var protoToCssColor = function(rgb_color) {
30297 # var redFrac = rgb_color.red || 0.0;
30298 # var greenFrac = rgb_color.green || 0.0;
30299 # var blueFrac = rgb_color.blue || 0.0;
30300 # var red = Math.floor(redFrac * 255);
30301 # var green = Math.floor(greenFrac * 255);
30302 # var blue = Math.floor(blueFrac * 255);
30303 #
30304 # if (!('alpha' in rgb_color)) {
30305 # return rgbToCssColor_(red, green, blue);
30306 # }
30307 #
30308 # var alphaFrac = rgb_color.alpha.value || 0.0;
30309 # var rgbParams = [red, green, blue].join(',');
30310 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30311 # };
30312 #
30313 # var rgbToCssColor_ = function(red, green, blue) {
30314 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30315 # var hexString = rgbNumber.toString(16);
30316 # var missingZeros = 6 - hexString.length;
30317 # var resultBuilder = ['#'];
30318 # for (var i = 0; i < missingZeros; i++) {
30319 # resultBuilder.push('0');
30320 # }
30321 # resultBuilder.push(hexString);
30322 # return resultBuilder.join('');
30323 # };
30324 #
30325 # // ...
30326 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30327 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30328 # the final pixel color is defined by the equation:
30329 #
30330 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30331 #
30332 # This means that a value of 1.0 corresponds to a solid color, whereas
30333 # a value of 0.0 corresponds to a completely transparent color. This
30334 # uses a wrapper message rather than a simple float scalar so that it is
30335 # possible to distinguish between a default value and the value being unset.
30336 # If omitted, this color object is to be rendered as a solid color
30337 # (as if the alpha value had been explicitly given with a value of 1.0).
30338 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30339 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30340 },
30341 "bold": True or False, # True if the text is bold.
30342 "strikethrough": True or False, # True if the text has a strikethrough.
30343 "fontFamily": "A String", # The font family.
30344 "fontSize": 42, # The size of the font.
30345 "italic": True or False, # True if the text is italicized.
30346 "underline": True or False, # True if the text is underlined.
30347 },
30348 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
30349 "borders": { # The borders of the cell. # The borders of the cell.
30350 "top": { # A border along a cell. # The top border of the cell.
30351 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
30352 # for simplicity of conversion to/from color representations in various
30353 # languages over compactness; for example, the fields of this representation
30354 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30355 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30356 # method in iOS; and, with just a little work, it can be easily formatted into
30357 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30358 #
30359 # Example (Java):
30360 #
30361 # import com.google.type.Color;
30362 #
30363 # // ...
30364 # public static java.awt.Color fromProto(Color protocolor) {
30365 # float alpha = protocolor.hasAlpha()
30366 # ? protocolor.getAlpha().getValue()
30367 # : 1.0;
30368 #
30369 # return new java.awt.Color(
30370 # protocolor.getRed(),
30371 # protocolor.getGreen(),
30372 # protocolor.getBlue(),
30373 # alpha);
30374 # }
30375 #
30376 # public static Color toProto(java.awt.Color color) {
30377 # float red = (float) color.getRed();
30378 # float green = (float) color.getGreen();
30379 # float blue = (float) color.getBlue();
30380 # float denominator = 255.0;
30381 # Color.Builder resultBuilder =
30382 # Color
30383 # .newBuilder()
30384 # .setRed(red / denominator)
30385 # .setGreen(green / denominator)
30386 # .setBlue(blue / denominator);
30387 # int alpha = color.getAlpha();
30388 # if (alpha != 255) {
30389 # result.setAlpha(
30390 # FloatValue
30391 # .newBuilder()
30392 # .setValue(((float) alpha) / denominator)
30393 # .build());
30394 # }
30395 # return resultBuilder.build();
30396 # }
30397 # // ...
30398 #
30399 # Example (iOS / Obj-C):
30400 #
30401 # // ...
30402 # static UIColor* fromProto(Color* protocolor) {
30403 # float red = [protocolor red];
30404 # float green = [protocolor green];
30405 # float blue = [protocolor blue];
30406 # FloatValue* alpha_wrapper = [protocolor alpha];
30407 # float alpha = 1.0;
30408 # if (alpha_wrapper != nil) {
30409 # alpha = [alpha_wrapper value];
30410 # }
30411 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30412 # }
30413 #
30414 # static Color* toProto(UIColor* color) {
30415 # CGFloat red, green, blue, alpha;
30416 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30417 # return nil;
30418 # }
30419 # Color* result = [Color alloc] init];
30420 # [result setRed:red];
30421 # [result setGreen:green];
30422 # [result setBlue:blue];
30423 # if (alpha <= 0.9999) {
30424 # [result setAlpha:floatWrapperWithValue(alpha)];
30425 # }
30426 # [result autorelease];
30427 # return result;
30428 # }
30429 # // ...
30430 #
30431 # Example (JavaScript):
30432 #
30433 # // ...
30434 #
30435 # var protoToCssColor = function(rgb_color) {
30436 # var redFrac = rgb_color.red || 0.0;
30437 # var greenFrac = rgb_color.green || 0.0;
30438 # var blueFrac = rgb_color.blue || 0.0;
30439 # var red = Math.floor(redFrac * 255);
30440 # var green = Math.floor(greenFrac * 255);
30441 # var blue = Math.floor(blueFrac * 255);
30442 #
30443 # if (!('alpha' in rgb_color)) {
30444 # return rgbToCssColor_(red, green, blue);
30445 # }
30446 #
30447 # var alphaFrac = rgb_color.alpha.value || 0.0;
30448 # var rgbParams = [red, green, blue].join(',');
30449 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30450 # };
30451 #
30452 # var rgbToCssColor_ = function(red, green, blue) {
30453 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30454 # var hexString = rgbNumber.toString(16);
30455 # var missingZeros = 6 - hexString.length;
30456 # var resultBuilder = ['#'];
30457 # for (var i = 0; i < missingZeros; i++) {
30458 # resultBuilder.push('0');
30459 # }
30460 # resultBuilder.push(hexString);
30461 # return resultBuilder.join('');
30462 # };
30463 #
30464 # // ...
30465 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30466 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30467 # the final pixel color is defined by the equation:
30468 #
30469 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30470 #
30471 # This means that a value of 1.0 corresponds to a solid color, whereas
30472 # a value of 0.0 corresponds to a completely transparent color. This
30473 # uses a wrapper message rather than a simple float scalar so that it is
30474 # possible to distinguish between a default value and the value being unset.
30475 # If omitted, this color object is to be rendered as a solid color
30476 # (as if the alpha value had been explicitly given with a value of 1.0).
30477 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30478 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30479 },
30480 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030481 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030482 "style": "A String", # The style of the border.
30483 },
30484 "right": { # A border along a cell. # The right border of the cell.
30485 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
30486 # for simplicity of conversion to/from color representations in various
30487 # languages over compactness; for example, the fields of this representation
30488 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30489 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30490 # method in iOS; and, with just a little work, it can be easily formatted into
30491 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30492 #
30493 # Example (Java):
30494 #
30495 # import com.google.type.Color;
30496 #
30497 # // ...
30498 # public static java.awt.Color fromProto(Color protocolor) {
30499 # float alpha = protocolor.hasAlpha()
30500 # ? protocolor.getAlpha().getValue()
30501 # : 1.0;
30502 #
30503 # return new java.awt.Color(
30504 # protocolor.getRed(),
30505 # protocolor.getGreen(),
30506 # protocolor.getBlue(),
30507 # alpha);
30508 # }
30509 #
30510 # public static Color toProto(java.awt.Color color) {
30511 # float red = (float) color.getRed();
30512 # float green = (float) color.getGreen();
30513 # float blue = (float) color.getBlue();
30514 # float denominator = 255.0;
30515 # Color.Builder resultBuilder =
30516 # Color
30517 # .newBuilder()
30518 # .setRed(red / denominator)
30519 # .setGreen(green / denominator)
30520 # .setBlue(blue / denominator);
30521 # int alpha = color.getAlpha();
30522 # if (alpha != 255) {
30523 # result.setAlpha(
30524 # FloatValue
30525 # .newBuilder()
30526 # .setValue(((float) alpha) / denominator)
30527 # .build());
30528 # }
30529 # return resultBuilder.build();
30530 # }
30531 # // ...
30532 #
30533 # Example (iOS / Obj-C):
30534 #
30535 # // ...
30536 # static UIColor* fromProto(Color* protocolor) {
30537 # float red = [protocolor red];
30538 # float green = [protocolor green];
30539 # float blue = [protocolor blue];
30540 # FloatValue* alpha_wrapper = [protocolor alpha];
30541 # float alpha = 1.0;
30542 # if (alpha_wrapper != nil) {
30543 # alpha = [alpha_wrapper value];
30544 # }
30545 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30546 # }
30547 #
30548 # static Color* toProto(UIColor* color) {
30549 # CGFloat red, green, blue, alpha;
30550 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30551 # return nil;
30552 # }
30553 # Color* result = [Color alloc] init];
30554 # [result setRed:red];
30555 # [result setGreen:green];
30556 # [result setBlue:blue];
30557 # if (alpha <= 0.9999) {
30558 # [result setAlpha:floatWrapperWithValue(alpha)];
30559 # }
30560 # [result autorelease];
30561 # return result;
30562 # }
30563 # // ...
30564 #
30565 # Example (JavaScript):
30566 #
30567 # // ...
30568 #
30569 # var protoToCssColor = function(rgb_color) {
30570 # var redFrac = rgb_color.red || 0.0;
30571 # var greenFrac = rgb_color.green || 0.0;
30572 # var blueFrac = rgb_color.blue || 0.0;
30573 # var red = Math.floor(redFrac * 255);
30574 # var green = Math.floor(greenFrac * 255);
30575 # var blue = Math.floor(blueFrac * 255);
30576 #
30577 # if (!('alpha' in rgb_color)) {
30578 # return rgbToCssColor_(red, green, blue);
30579 # }
30580 #
30581 # var alphaFrac = rgb_color.alpha.value || 0.0;
30582 # var rgbParams = [red, green, blue].join(',');
30583 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30584 # };
30585 #
30586 # var rgbToCssColor_ = function(red, green, blue) {
30587 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30588 # var hexString = rgbNumber.toString(16);
30589 # var missingZeros = 6 - hexString.length;
30590 # var resultBuilder = ['#'];
30591 # for (var i = 0; i < missingZeros; i++) {
30592 # resultBuilder.push('0');
30593 # }
30594 # resultBuilder.push(hexString);
30595 # return resultBuilder.join('');
30596 # };
30597 #
30598 # // ...
30599 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30600 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30601 # the final pixel color is defined by the equation:
30602 #
30603 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30604 #
30605 # This means that a value of 1.0 corresponds to a solid color, whereas
30606 # a value of 0.0 corresponds to a completely transparent color. This
30607 # uses a wrapper message rather than a simple float scalar so that it is
30608 # possible to distinguish between a default value and the value being unset.
30609 # If omitted, this color object is to be rendered as a solid color
30610 # (as if the alpha value had been explicitly given with a value of 1.0).
30611 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30612 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30613 },
30614 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030615 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030616 "style": "A String", # The style of the border.
30617 },
30618 "bottom": { # A border along a cell. # The bottom border of the cell.
30619 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
30620 # for simplicity of conversion to/from color representations in various
30621 # languages over compactness; for example, the fields of this representation
30622 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30623 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30624 # method in iOS; and, with just a little work, it can be easily formatted into
30625 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30626 #
30627 # Example (Java):
30628 #
30629 # import com.google.type.Color;
30630 #
30631 # // ...
30632 # public static java.awt.Color fromProto(Color protocolor) {
30633 # float alpha = protocolor.hasAlpha()
30634 # ? protocolor.getAlpha().getValue()
30635 # : 1.0;
30636 #
30637 # return new java.awt.Color(
30638 # protocolor.getRed(),
30639 # protocolor.getGreen(),
30640 # protocolor.getBlue(),
30641 # alpha);
30642 # }
30643 #
30644 # public static Color toProto(java.awt.Color color) {
30645 # float red = (float) color.getRed();
30646 # float green = (float) color.getGreen();
30647 # float blue = (float) color.getBlue();
30648 # float denominator = 255.0;
30649 # Color.Builder resultBuilder =
30650 # Color
30651 # .newBuilder()
30652 # .setRed(red / denominator)
30653 # .setGreen(green / denominator)
30654 # .setBlue(blue / denominator);
30655 # int alpha = color.getAlpha();
30656 # if (alpha != 255) {
30657 # result.setAlpha(
30658 # FloatValue
30659 # .newBuilder()
30660 # .setValue(((float) alpha) / denominator)
30661 # .build());
30662 # }
30663 # return resultBuilder.build();
30664 # }
30665 # // ...
30666 #
30667 # Example (iOS / Obj-C):
30668 #
30669 # // ...
30670 # static UIColor* fromProto(Color* protocolor) {
30671 # float red = [protocolor red];
30672 # float green = [protocolor green];
30673 # float blue = [protocolor blue];
30674 # FloatValue* alpha_wrapper = [protocolor alpha];
30675 # float alpha = 1.0;
30676 # if (alpha_wrapper != nil) {
30677 # alpha = [alpha_wrapper value];
30678 # }
30679 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30680 # }
30681 #
30682 # static Color* toProto(UIColor* color) {
30683 # CGFloat red, green, blue, alpha;
30684 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30685 # return nil;
30686 # }
30687 # Color* result = [Color alloc] init];
30688 # [result setRed:red];
30689 # [result setGreen:green];
30690 # [result setBlue:blue];
30691 # if (alpha <= 0.9999) {
30692 # [result setAlpha:floatWrapperWithValue(alpha)];
30693 # }
30694 # [result autorelease];
30695 # return result;
30696 # }
30697 # // ...
30698 #
30699 # Example (JavaScript):
30700 #
30701 # // ...
30702 #
30703 # var protoToCssColor = function(rgb_color) {
30704 # var redFrac = rgb_color.red || 0.0;
30705 # var greenFrac = rgb_color.green || 0.0;
30706 # var blueFrac = rgb_color.blue || 0.0;
30707 # var red = Math.floor(redFrac * 255);
30708 # var green = Math.floor(greenFrac * 255);
30709 # var blue = Math.floor(blueFrac * 255);
30710 #
30711 # if (!('alpha' in rgb_color)) {
30712 # return rgbToCssColor_(red, green, blue);
30713 # }
30714 #
30715 # var alphaFrac = rgb_color.alpha.value || 0.0;
30716 # var rgbParams = [red, green, blue].join(',');
30717 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30718 # };
30719 #
30720 # var rgbToCssColor_ = function(red, green, blue) {
30721 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30722 # var hexString = rgbNumber.toString(16);
30723 # var missingZeros = 6 - hexString.length;
30724 # var resultBuilder = ['#'];
30725 # for (var i = 0; i < missingZeros; i++) {
30726 # resultBuilder.push('0');
30727 # }
30728 # resultBuilder.push(hexString);
30729 # return resultBuilder.join('');
30730 # };
30731 #
30732 # // ...
30733 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30734 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30735 # the final pixel color is defined by the equation:
30736 #
30737 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30738 #
30739 # This means that a value of 1.0 corresponds to a solid color, whereas
30740 # a value of 0.0 corresponds to a completely transparent color. This
30741 # uses a wrapper message rather than a simple float scalar so that it is
30742 # possible to distinguish between a default value and the value being unset.
30743 # If omitted, this color object is to be rendered as a solid color
30744 # (as if the alpha value had been explicitly given with a value of 1.0).
30745 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30746 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30747 },
30748 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030749 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030750 "style": "A String", # The style of the border.
30751 },
30752 "left": { # A border along a cell. # The left border of the cell.
30753 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
30754 # for simplicity of conversion to/from color representations in various
30755 # languages over compactness; for example, the fields of this representation
30756 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30757 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30758 # method in iOS; and, with just a little work, it can be easily formatted into
30759 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30760 #
30761 # Example (Java):
30762 #
30763 # import com.google.type.Color;
30764 #
30765 # // ...
30766 # public static java.awt.Color fromProto(Color protocolor) {
30767 # float alpha = protocolor.hasAlpha()
30768 # ? protocolor.getAlpha().getValue()
30769 # : 1.0;
30770 #
30771 # return new java.awt.Color(
30772 # protocolor.getRed(),
30773 # protocolor.getGreen(),
30774 # protocolor.getBlue(),
30775 # alpha);
30776 # }
30777 #
30778 # public static Color toProto(java.awt.Color color) {
30779 # float red = (float) color.getRed();
30780 # float green = (float) color.getGreen();
30781 # float blue = (float) color.getBlue();
30782 # float denominator = 255.0;
30783 # Color.Builder resultBuilder =
30784 # Color
30785 # .newBuilder()
30786 # .setRed(red / denominator)
30787 # .setGreen(green / denominator)
30788 # .setBlue(blue / denominator);
30789 # int alpha = color.getAlpha();
30790 # if (alpha != 255) {
30791 # result.setAlpha(
30792 # FloatValue
30793 # .newBuilder()
30794 # .setValue(((float) alpha) / denominator)
30795 # .build());
30796 # }
30797 # return resultBuilder.build();
30798 # }
30799 # // ...
30800 #
30801 # Example (iOS / Obj-C):
30802 #
30803 # // ...
30804 # static UIColor* fromProto(Color* protocolor) {
30805 # float red = [protocolor red];
30806 # float green = [protocolor green];
30807 # float blue = [protocolor blue];
30808 # FloatValue* alpha_wrapper = [protocolor alpha];
30809 # float alpha = 1.0;
30810 # if (alpha_wrapper != nil) {
30811 # alpha = [alpha_wrapper value];
30812 # }
30813 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30814 # }
30815 #
30816 # static Color* toProto(UIColor* color) {
30817 # CGFloat red, green, blue, alpha;
30818 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30819 # return nil;
30820 # }
30821 # Color* result = [Color alloc] init];
30822 # [result setRed:red];
30823 # [result setGreen:green];
30824 # [result setBlue:blue];
30825 # if (alpha <= 0.9999) {
30826 # [result setAlpha:floatWrapperWithValue(alpha)];
30827 # }
30828 # [result autorelease];
30829 # return result;
30830 # }
30831 # // ...
30832 #
30833 # Example (JavaScript):
30834 #
30835 # // ...
30836 #
30837 # var protoToCssColor = function(rgb_color) {
30838 # var redFrac = rgb_color.red || 0.0;
30839 # var greenFrac = rgb_color.green || 0.0;
30840 # var blueFrac = rgb_color.blue || 0.0;
30841 # var red = Math.floor(redFrac * 255);
30842 # var green = Math.floor(greenFrac * 255);
30843 # var blue = Math.floor(blueFrac * 255);
30844 #
30845 # if (!('alpha' in rgb_color)) {
30846 # return rgbToCssColor_(red, green, blue);
30847 # }
30848 #
30849 # var alphaFrac = rgb_color.alpha.value || 0.0;
30850 # var rgbParams = [red, green, blue].join(',');
30851 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30852 # };
30853 #
30854 # var rgbToCssColor_ = function(red, green, blue) {
30855 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30856 # var hexString = rgbNumber.toString(16);
30857 # var missingZeros = 6 - hexString.length;
30858 # var resultBuilder = ['#'];
30859 # for (var i = 0; i < missingZeros; i++) {
30860 # resultBuilder.push('0');
30861 # }
30862 # resultBuilder.push(hexString);
30863 # return resultBuilder.join('');
30864 # };
30865 #
30866 # // ...
30867 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30868 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30869 # the final pixel color is defined by the equation:
30870 #
30871 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30872 #
30873 # This means that a value of 1.0 corresponds to a solid color, whereas
30874 # a value of 0.0 corresponds to a completely transparent color. This
30875 # uses a wrapper message rather than a simple float scalar so that it is
30876 # possible to distinguish between a default value and the value being unset.
30877 # If omitted, this color object is to be rendered as a solid color
30878 # (as if the alpha value had been explicitly given with a value of 1.0).
30879 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30880 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30881 },
30882 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030883 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030884 "style": "A String", # The style of the border.
30885 },
30886 },
30887 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
30888 },
30889 },
30890 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
30891 # the interpolation points listed. The format of a cell will vary
30892 # based on its contents as compared to the values of the interpolation
30893 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070030894 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070030895 # These pin the gradient color scale according to the color,
30896 # type and value chosen.
30897 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
30898 # for simplicity of conversion to/from color representations in various
30899 # languages over compactness; for example, the fields of this representation
30900 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30901 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30902 # method in iOS; and, with just a little work, it can be easily formatted into
30903 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30904 #
30905 # Example (Java):
30906 #
30907 # import com.google.type.Color;
30908 #
30909 # // ...
30910 # public static java.awt.Color fromProto(Color protocolor) {
30911 # float alpha = protocolor.hasAlpha()
30912 # ? protocolor.getAlpha().getValue()
30913 # : 1.0;
30914 #
30915 # return new java.awt.Color(
30916 # protocolor.getRed(),
30917 # protocolor.getGreen(),
30918 # protocolor.getBlue(),
30919 # alpha);
30920 # }
30921 #
30922 # public static Color toProto(java.awt.Color color) {
30923 # float red = (float) color.getRed();
30924 # float green = (float) color.getGreen();
30925 # float blue = (float) color.getBlue();
30926 # float denominator = 255.0;
30927 # Color.Builder resultBuilder =
30928 # Color
30929 # .newBuilder()
30930 # .setRed(red / denominator)
30931 # .setGreen(green / denominator)
30932 # .setBlue(blue / denominator);
30933 # int alpha = color.getAlpha();
30934 # if (alpha != 255) {
30935 # result.setAlpha(
30936 # FloatValue
30937 # .newBuilder()
30938 # .setValue(((float) alpha) / denominator)
30939 # .build());
30940 # }
30941 # return resultBuilder.build();
30942 # }
30943 # // ...
30944 #
30945 # Example (iOS / Obj-C):
30946 #
30947 # // ...
30948 # static UIColor* fromProto(Color* protocolor) {
30949 # float red = [protocolor red];
30950 # float green = [protocolor green];
30951 # float blue = [protocolor blue];
30952 # FloatValue* alpha_wrapper = [protocolor alpha];
30953 # float alpha = 1.0;
30954 # if (alpha_wrapper != nil) {
30955 # alpha = [alpha_wrapper value];
30956 # }
30957 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30958 # }
30959 #
30960 # static Color* toProto(UIColor* color) {
30961 # CGFloat red, green, blue, alpha;
30962 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30963 # return nil;
30964 # }
30965 # Color* result = [Color alloc] init];
30966 # [result setRed:red];
30967 # [result setGreen:green];
30968 # [result setBlue:blue];
30969 # if (alpha <= 0.9999) {
30970 # [result setAlpha:floatWrapperWithValue(alpha)];
30971 # }
30972 # [result autorelease];
30973 # return result;
30974 # }
30975 # // ...
30976 #
30977 # Example (JavaScript):
30978 #
30979 # // ...
30980 #
30981 # var protoToCssColor = function(rgb_color) {
30982 # var redFrac = rgb_color.red || 0.0;
30983 # var greenFrac = rgb_color.green || 0.0;
30984 # var blueFrac = rgb_color.blue || 0.0;
30985 # var red = Math.floor(redFrac * 255);
30986 # var green = Math.floor(greenFrac * 255);
30987 # var blue = Math.floor(blueFrac * 255);
30988 #
30989 # if (!('alpha' in rgb_color)) {
30990 # return rgbToCssColor_(red, green, blue);
30991 # }
30992 #
30993 # var alphaFrac = rgb_color.alpha.value || 0.0;
30994 # var rgbParams = [red, green, blue].join(',');
30995 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30996 # };
30997 #
30998 # var rgbToCssColor_ = function(red, green, blue) {
30999 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31000 # var hexString = rgbNumber.toString(16);
31001 # var missingZeros = 6 - hexString.length;
31002 # var resultBuilder = ['#'];
31003 # for (var i = 0; i < missingZeros; i++) {
31004 # resultBuilder.push('0');
31005 # }
31006 # resultBuilder.push(hexString);
31007 # return resultBuilder.join('');
31008 # };
31009 #
31010 # // ...
31011 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31012 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31013 # the final pixel color is defined by the equation:
31014 #
31015 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31016 #
31017 # This means that a value of 1.0 corresponds to a solid color, whereas
31018 # a value of 0.0 corresponds to a completely transparent color. This
31019 # uses a wrapper message rather than a simple float scalar so that it is
31020 # possible to distinguish between a default value and the value being unset.
31021 # If omitted, this color object is to be rendered as a solid color
31022 # (as if the alpha value had been explicitly given with a value of 1.0).
31023 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31024 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31025 },
31026 "type": "A String", # How the value should be interpreted.
31027 "value": "A String", # The value this interpolation point uses. May be a formula.
31028 # Unused if type is MIN or
31029 # MAX.
31030 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031031 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031032 # These pin the gradient color scale according to the color,
31033 # type and value chosen.
31034 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
31035 # for simplicity of conversion to/from color representations in various
31036 # languages over compactness; for example, the fields of this representation
31037 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
31038 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
31039 # method in iOS; and, with just a little work, it can be easily formatted into
31040 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
31041 #
31042 # Example (Java):
31043 #
31044 # import com.google.type.Color;
31045 #
31046 # // ...
31047 # public static java.awt.Color fromProto(Color protocolor) {
31048 # float alpha = protocolor.hasAlpha()
31049 # ? protocolor.getAlpha().getValue()
31050 # : 1.0;
31051 #
31052 # return new java.awt.Color(
31053 # protocolor.getRed(),
31054 # protocolor.getGreen(),
31055 # protocolor.getBlue(),
31056 # alpha);
31057 # }
31058 #
31059 # public static Color toProto(java.awt.Color color) {
31060 # float red = (float) color.getRed();
31061 # float green = (float) color.getGreen();
31062 # float blue = (float) color.getBlue();
31063 # float denominator = 255.0;
31064 # Color.Builder resultBuilder =
31065 # Color
31066 # .newBuilder()
31067 # .setRed(red / denominator)
31068 # .setGreen(green / denominator)
31069 # .setBlue(blue / denominator);
31070 # int alpha = color.getAlpha();
31071 # if (alpha != 255) {
31072 # result.setAlpha(
31073 # FloatValue
31074 # .newBuilder()
31075 # .setValue(((float) alpha) / denominator)
31076 # .build());
31077 # }
31078 # return resultBuilder.build();
31079 # }
31080 # // ...
31081 #
31082 # Example (iOS / Obj-C):
31083 #
31084 # // ...
31085 # static UIColor* fromProto(Color* protocolor) {
31086 # float red = [protocolor red];
31087 # float green = [protocolor green];
31088 # float blue = [protocolor blue];
31089 # FloatValue* alpha_wrapper = [protocolor alpha];
31090 # float alpha = 1.0;
31091 # if (alpha_wrapper != nil) {
31092 # alpha = [alpha_wrapper value];
31093 # }
31094 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31095 # }
31096 #
31097 # static Color* toProto(UIColor* color) {
31098 # CGFloat red, green, blue, alpha;
31099 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31100 # return nil;
31101 # }
31102 # Color* result = [Color alloc] init];
31103 # [result setRed:red];
31104 # [result setGreen:green];
31105 # [result setBlue:blue];
31106 # if (alpha <= 0.9999) {
31107 # [result setAlpha:floatWrapperWithValue(alpha)];
31108 # }
31109 # [result autorelease];
31110 # return result;
31111 # }
31112 # // ...
31113 #
31114 # Example (JavaScript):
31115 #
31116 # // ...
31117 #
31118 # var protoToCssColor = function(rgb_color) {
31119 # var redFrac = rgb_color.red || 0.0;
31120 # var greenFrac = rgb_color.green || 0.0;
31121 # var blueFrac = rgb_color.blue || 0.0;
31122 # var red = Math.floor(redFrac * 255);
31123 # var green = Math.floor(greenFrac * 255);
31124 # var blue = Math.floor(blueFrac * 255);
31125 #
31126 # if (!('alpha' in rgb_color)) {
31127 # return rgbToCssColor_(red, green, blue);
31128 # }
31129 #
31130 # var alphaFrac = rgb_color.alpha.value || 0.0;
31131 # var rgbParams = [red, green, blue].join(',');
31132 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31133 # };
31134 #
31135 # var rgbToCssColor_ = function(red, green, blue) {
31136 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31137 # var hexString = rgbNumber.toString(16);
31138 # var missingZeros = 6 - hexString.length;
31139 # var resultBuilder = ['#'];
31140 # for (var i = 0; i < missingZeros; i++) {
31141 # resultBuilder.push('0');
31142 # }
31143 # resultBuilder.push(hexString);
31144 # return resultBuilder.join('');
31145 # };
31146 #
31147 # // ...
31148 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31149 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31150 # the final pixel color is defined by the equation:
31151 #
31152 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31153 #
31154 # This means that a value of 1.0 corresponds to a solid color, whereas
31155 # a value of 0.0 corresponds to a completely transparent color. This
31156 # uses a wrapper message rather than a simple float scalar so that it is
31157 # possible to distinguish between a default value and the value being unset.
31158 # If omitted, this color object is to be rendered as a solid color
31159 # (as if the alpha value had been explicitly given with a value of 1.0).
31160 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31161 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31162 },
31163 "type": "A String", # How the value should be interpreted.
31164 "value": "A String", # The value this interpolation point uses. May be a formula.
31165 # Unused if type is MIN or
31166 # MAX.
31167 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031168 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031169 # These pin the gradient color scale according to the color,
31170 # type and value chosen.
31171 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
31172 # for simplicity of conversion to/from color representations in various
31173 # languages over compactness; for example, the fields of this representation
31174 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
31175 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
31176 # method in iOS; and, with just a little work, it can be easily formatted into
31177 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
31178 #
31179 # Example (Java):
31180 #
31181 # import com.google.type.Color;
31182 #
31183 # // ...
31184 # public static java.awt.Color fromProto(Color protocolor) {
31185 # float alpha = protocolor.hasAlpha()
31186 # ? protocolor.getAlpha().getValue()
31187 # : 1.0;
31188 #
31189 # return new java.awt.Color(
31190 # protocolor.getRed(),
31191 # protocolor.getGreen(),
31192 # protocolor.getBlue(),
31193 # alpha);
31194 # }
31195 #
31196 # public static Color toProto(java.awt.Color color) {
31197 # float red = (float) color.getRed();
31198 # float green = (float) color.getGreen();
31199 # float blue = (float) color.getBlue();
31200 # float denominator = 255.0;
31201 # Color.Builder resultBuilder =
31202 # Color
31203 # .newBuilder()
31204 # .setRed(red / denominator)
31205 # .setGreen(green / denominator)
31206 # .setBlue(blue / denominator);
31207 # int alpha = color.getAlpha();
31208 # if (alpha != 255) {
31209 # result.setAlpha(
31210 # FloatValue
31211 # .newBuilder()
31212 # .setValue(((float) alpha) / denominator)
31213 # .build());
31214 # }
31215 # return resultBuilder.build();
31216 # }
31217 # // ...
31218 #
31219 # Example (iOS / Obj-C):
31220 #
31221 # // ...
31222 # static UIColor* fromProto(Color* protocolor) {
31223 # float red = [protocolor red];
31224 # float green = [protocolor green];
31225 # float blue = [protocolor blue];
31226 # FloatValue* alpha_wrapper = [protocolor alpha];
31227 # float alpha = 1.0;
31228 # if (alpha_wrapper != nil) {
31229 # alpha = [alpha_wrapper value];
31230 # }
31231 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31232 # }
31233 #
31234 # static Color* toProto(UIColor* color) {
31235 # CGFloat red, green, blue, alpha;
31236 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31237 # return nil;
31238 # }
31239 # Color* result = [Color alloc] init];
31240 # [result setRed:red];
31241 # [result setGreen:green];
31242 # [result setBlue:blue];
31243 # if (alpha <= 0.9999) {
31244 # [result setAlpha:floatWrapperWithValue(alpha)];
31245 # }
31246 # [result autorelease];
31247 # return result;
31248 # }
31249 # // ...
31250 #
31251 # Example (JavaScript):
31252 #
31253 # // ...
31254 #
31255 # var protoToCssColor = function(rgb_color) {
31256 # var redFrac = rgb_color.red || 0.0;
31257 # var greenFrac = rgb_color.green || 0.0;
31258 # var blueFrac = rgb_color.blue || 0.0;
31259 # var red = Math.floor(redFrac * 255);
31260 # var green = Math.floor(greenFrac * 255);
31261 # var blue = Math.floor(blueFrac * 255);
31262 #
31263 # if (!('alpha' in rgb_color)) {
31264 # return rgbToCssColor_(red, green, blue);
31265 # }
31266 #
31267 # var alphaFrac = rgb_color.alpha.value || 0.0;
31268 # var rgbParams = [red, green, blue].join(',');
31269 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31270 # };
31271 #
31272 # var rgbToCssColor_ = function(red, green, blue) {
31273 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31274 # var hexString = rgbNumber.toString(16);
31275 # var missingZeros = 6 - hexString.length;
31276 # var resultBuilder = ['#'];
31277 # for (var i = 0; i < missingZeros; i++) {
31278 # resultBuilder.push('0');
31279 # }
31280 # resultBuilder.push(hexString);
31281 # return resultBuilder.join('');
31282 # };
31283 #
31284 # // ...
31285 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31286 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31287 # the final pixel color is defined by the equation:
31288 #
31289 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31290 #
31291 # This means that a value of 1.0 corresponds to a solid color, whereas
31292 # a value of 0.0 corresponds to a completely transparent color. This
31293 # uses a wrapper message rather than a simple float scalar so that it is
31294 # possible to distinguish between a default value and the value being unset.
31295 # If omitted, this color object is to be rendered as a solid color
31296 # (as if the alpha value had been explicitly given with a value of 1.0).
31297 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31298 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31299 },
31300 "type": "A String", # How the value should be interpreted.
31301 "value": "A String", # The value this interpolation point uses. May be a formula.
31302 # Unused if type is MIN or
31303 # MAX.
31304 },
31305 },
31306 },
31307 ],
31308 "merges": [ # The ranges that are merged together.
31309 { # A range on a sheet.
31310 # All indexes are zero-based.
31311 # Indexes are half open, e.g the start index is inclusive
31312 # and the end index is exclusive -- [start_index, end_index).
31313 # Missing indexes indicate the range is unbounded on that side.
31314 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031315 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031316 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031317 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031318 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031319 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031320 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031321 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031322 # start_row_index: 2, end_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!A:B == sheet_id: 0,
31326 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031327 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031328 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031329 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031330 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031331 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031332 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031333 #
31334 # The start index must always be less than or equal to the end index.
31335 # If the start index equals the end index, then the range is empty.
31336 # Empty ranges are typically not meaningful and are usually rendered in the
31337 # UI as `#REF!`.
31338 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31339 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31340 "sheetId": 42, # The sheet this range is on.
31341 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31342 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31343 },
31344 ],
31345 "basicFilter": { # The default filter associated with a sheet. # The filter on this sheet, if any.
31346 "range": { # A range on a sheet. # The range the filter covers.
31347 # All indexes are zero-based.
31348 # Indexes are half open, e.g the start index is inclusive
31349 # and the end index is exclusive -- [start_index, end_index).
31350 # Missing indexes indicate the range is unbounded on that side.
31351 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031352 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031353 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031354 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031355 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031356 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031357 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031358 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031359 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031360 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031361 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031362 # `Sheet1!A:B == sheet_id: 0,
31363 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031364 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031365 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031366 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031367 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031368 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031369 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031370 #
31371 # The start index must always be less than or equal to the end index.
31372 # If the start index equals the end index, then the range is empty.
31373 # Empty ranges are typically not meaningful and are usually rendered in the
31374 # UI as `#REF!`.
31375 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31376 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31377 "sheetId": 42, # The sheet this range is on.
31378 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31379 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31380 },
31381 "sortSpecs": [ # The sort order per column. Later specifications are used when values
31382 # are equal in the earlier specifications.
31383 { # A sort order associated with a specific column or row.
31384 "sortOrder": "A String", # The order data should be sorted.
31385 "dimensionIndex": 42, # The dimension the sort should be applied to.
31386 },
31387 ],
31388 "criteria": { # The criteria for showing/hiding values per column.
31389 # The map's key is the column index, and the value is the criteria for
31390 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031391 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031392 "hiddenValues": [ # Values that should be hidden.
31393 "A String",
31394 ],
31395 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
31396 # (This does not override hiddenValues -- if a value is listed there,
31397 # it will still be hidden.)
31398 # BooleanConditions are used by conditional formatting,
31399 # data validation, and the criteria in filters.
31400 "type": "A String", # The type of condition.
31401 "values": [ # The values of the condition. The number of supported values depends
31402 # on the condition type. Some support zero values,
31403 # others one or two values,
31404 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
31405 { # The value of the condition.
31406 "relativeDate": "A String", # A relative date (based on the current date).
31407 # Valid only if the type is
31408 # DATE_BEFORE,
31409 # DATE_AFTER,
31410 # DATE_ON_OR_BEFORE or
31411 # DATE_ON_OR_AFTER.
31412 #
31413 # Relative dates are not supported in data validation.
31414 # They are supported only in conditional formatting and
31415 # conditional filters.
31416 "userEnteredValue": "A String", # A value the condition is based on.
31417 # The value will be parsed as if the user typed into a cell.
31418 # Formulas are supported (and must begin with an `=`).
31419 },
31420 ],
31421 },
31422 },
31423 },
31424 },
31425 "charts": [ # The specifications of every chart on this sheet.
31426 { # A chart embedded in a sheet.
31427 "chartId": 42, # The ID of the chart.
31428 "position": { # The position of an embedded object such as a chart. # The position of the chart.
31429 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
31430 # is chosen for you. Used only when writing.
31431 "sheetId": 42, # The sheet this is on. Set only if the embedded object
31432 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031433 "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 -070031434 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
31435 # All indexes are zero-based.
31436 "rowIndex": 42, # The row index of the coordinate.
31437 "columnIndex": 42, # The column index of the coordinate.
31438 "sheetId": 42, # The sheet this coordinate is on.
31439 },
31440 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
31441 # from the anchor cell.
31442 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
31443 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
31444 # from the anchor cell.
31445 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
31446 },
31447 },
31448 "spec": { # The specifications of a chart. # The specification of the chart.
31449 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031450 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
31451 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
31452 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
31453 "sources": [ # The ranges of data for a series or domain.
31454 # Exactly one dimension must have a length of 1,
31455 # and all sources in the list must have the same dimension
31456 # with length 1.
31457 # The domain (if it exists) & all series must have the same number
31458 # of source ranges. If using more than one source range, then the source
31459 # range at a given offset must be contiguous across the domain and series.
31460 #
31461 # For example, these are valid configurations:
31462 #
31463 # domain sources: A1:A5
31464 # series1 sources: B1:B5
31465 # series2 sources: D6:D10
31466 #
31467 # domain sources: A1:A5, C10:C12
31468 # series1 sources: B1:B5, D10:D12
31469 # series2 sources: C1:C5, E10:E12
31470 { # A range on a sheet.
31471 # All indexes are zero-based.
31472 # Indexes are half open, e.g the start index is inclusive
31473 # and the end index is exclusive -- [start_index, end_index).
31474 # Missing indexes indicate the range is unbounded on that side.
31475 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031476 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031477 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031478 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031479 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031480 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031481 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031482 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031483 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031484 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031485 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031486 # `Sheet1!A:B == sheet_id: 0,
31487 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031488 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031489 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031490 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031491 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031492 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031493 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031494 #
31495 # The start index must always be less than or equal to the end index.
31496 # If the start index equals the end index, then the range is empty.
31497 # Empty ranges are typically not meaningful and are usually rendered in the
31498 # UI as `#REF!`.
31499 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31500 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31501 "sheetId": 42, # The sheet this range is on.
31502 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31503 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31504 },
31505 ],
31506 },
31507 },
31508 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
31509 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
31510 "sources": [ # The ranges of data for a series or domain.
31511 # Exactly one dimension must have a length of 1,
31512 # and all sources in the list must have the same dimension
31513 # with length 1.
31514 # The domain (if it exists) & all series must have the same number
31515 # of source ranges. If using more than one source range, then the source
31516 # range at a given offset must be contiguous across the domain and series.
31517 #
31518 # For example, these are valid configurations:
31519 #
31520 # domain sources: A1:A5
31521 # series1 sources: B1:B5
31522 # series2 sources: D6:D10
31523 #
31524 # domain sources: A1:A5, C10:C12
31525 # series1 sources: B1:B5, D10:D12
31526 # series2 sources: C1:C5, E10:E12
31527 { # A range on a sheet.
31528 # All indexes are zero-based.
31529 # Indexes are half open, e.g the start index is inclusive
31530 # and the end index is exclusive -- [start_index, end_index).
31531 # Missing indexes indicate the range is unbounded on that side.
31532 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031533 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031534 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031535 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031536 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031537 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031538 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031539 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031540 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031541 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031542 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031543 # `Sheet1!A:B == sheet_id: 0,
31544 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031545 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031546 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031547 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031548 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031549 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031550 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031551 #
31552 # The start index must always be less than or equal to the end index.
31553 # If the start index equals the end index, then the range is empty.
31554 # Empty ranges are typically not meaningful and are usually rendered in the
31555 # UI as `#REF!`.
31556 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31557 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31558 "sheetId": 42, # The sheet this range is on.
31559 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31560 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31561 },
31562 ],
31563 },
31564 },
31565 "threeDimensional": True or False, # True if the pie is three dimensional.
31566 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
31567 "pieHole": 3.14, # The size of the hole in the pie chart.
31568 },
31569 "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 -070031570 # See BasicChartType for the list of all
31571 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031572 # of charts this supports.
31573 "headerCount": 42, # The number of rows or columns in the data that are "headers".
31574 # If not set, Google Sheets will guess how many rows are headers based
31575 # on the data.
31576 #
31577 # (Note that BasicChartAxis.title may override the axis title
31578 # inferred from the header values.)
31579 "series": [ # The data this chart is visualizing.
31580 { # A single series of data in a chart.
31581 # For example, if charting stock prices over time, multiple series may exist,
31582 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
31583 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
31584 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
31585 "sources": [ # The ranges of data for a series or domain.
31586 # Exactly one dimension must have a length of 1,
31587 # and all sources in the list must have the same dimension
31588 # with length 1.
31589 # The domain (if it exists) & all series must have the same number
31590 # of source ranges. If using more than one source range, then the source
31591 # range at a given offset must be contiguous across the domain and series.
31592 #
31593 # For example, these are valid configurations:
31594 #
31595 # domain sources: A1:A5
31596 # series1 sources: B1:B5
31597 # series2 sources: D6:D10
31598 #
31599 # domain sources: A1:A5, C10:C12
31600 # series1 sources: B1:B5, D10:D12
31601 # series2 sources: C1:C5, E10:E12
31602 { # A range on a sheet.
31603 # All indexes are zero-based.
31604 # Indexes are half open, e.g the start index is inclusive
31605 # and the end index is exclusive -- [start_index, end_index).
31606 # Missing indexes indicate the range is unbounded on that side.
31607 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031608 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031609 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031610 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031611 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031612 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031613 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031614 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031615 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031616 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031617 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031618 # `Sheet1!A:B == sheet_id: 0,
31619 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031620 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031621 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031622 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031623 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031624 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031625 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031626 #
31627 # The start index must always be less than or equal to the end index.
31628 # If the start index equals the end index, then the range is empty.
31629 # Empty ranges are typically not meaningful and are usually rendered in the
31630 # UI as `#REF!`.
31631 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31632 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31633 "sheetId": 42, # The sheet this range is on.
31634 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31635 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31636 },
31637 ],
31638 },
31639 },
31640 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
31641 # For example, if charting stocks over time, the "Volume" series
31642 # may want to be pinned to the right with the prices pinned to the left,
31643 # because the scale of trading volume is different than the scale of
31644 # prices.
31645 # It is an error to specify an axis that isn't a valid minor axis
31646 # for the chart's type.
31647 "type": "A String", # The type of this series. Valid only if the
31648 # chartType is
31649 # COMBO.
31650 # Different types will change the way the series is visualized.
31651 # Only LINE, AREA,
31652 # and COLUMN are supported.
31653 },
31654 ],
31655 "legendPosition": "A String", # The position of the chart legend.
31656 "domains": [ # The domain of data this is charting.
31657 # Only a single domain is currently supported.
31658 { # The domain of a chart.
31659 # For example, if charting stock prices over time, this would be the date.
31660 "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 -070031661 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031662 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
31663 "sources": [ # The ranges of data for a series or domain.
31664 # Exactly one dimension must have a length of 1,
31665 # and all sources in the list must have the same dimension
31666 # with length 1.
31667 # The domain (if it exists) & all series must have the same number
31668 # of source ranges. If using more than one source range, then the source
31669 # range at a given offset must be contiguous across the domain and series.
31670 #
31671 # For example, these are valid configurations:
31672 #
31673 # domain sources: A1:A5
31674 # series1 sources: B1:B5
31675 # series2 sources: D6:D10
31676 #
31677 # domain sources: A1:A5, C10:C12
31678 # series1 sources: B1:B5, D10:D12
31679 # series2 sources: C1:C5, E10:E12
31680 { # A range on a sheet.
31681 # All indexes are zero-based.
31682 # Indexes are half open, e.g the start index is inclusive
31683 # and the end index is exclusive -- [start_index, end_index).
31684 # Missing indexes indicate the range is unbounded on that side.
31685 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031686 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031687 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031688 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031689 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031690 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031691 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031692 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031693 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031694 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031695 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031696 # `Sheet1!A:B == sheet_id: 0,
31697 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031698 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031699 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031700 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031701 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031702 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031703 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031704 #
31705 # The start index must always be less than or equal to the end index.
31706 # If the start index equals the end index, then the range is empty.
31707 # Empty ranges are typically not meaningful and are usually rendered in the
31708 # UI as `#REF!`.
31709 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31710 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31711 "sheetId": 42, # The sheet this range is on.
31712 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31713 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31714 },
31715 ],
31716 },
31717 },
31718 },
31719 ],
31720 "chartType": "A String", # The type of the chart.
31721 "axis": [ # The axis on the chart.
31722 { # An axis of the chart.
31723 # A chart may not have more than one axis per
31724 # axis position.
31725 "position": "A String", # The position of this axis.
31726 "format": { # The format of a run of text in a cell. # The format of the title.
31727 # Only valid if the axis is not associated with the domain.
31728 # Absent values indicate that the field isn't specified.
31729 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
31730 # for simplicity of conversion to/from color representations in various
31731 # languages over compactness; for example, the fields of this representation
31732 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
31733 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
31734 # method in iOS; and, with just a little work, it can be easily formatted into
31735 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
31736 #
31737 # Example (Java):
31738 #
31739 # import com.google.type.Color;
31740 #
31741 # // ...
31742 # public static java.awt.Color fromProto(Color protocolor) {
31743 # float alpha = protocolor.hasAlpha()
31744 # ? protocolor.getAlpha().getValue()
31745 # : 1.0;
31746 #
31747 # return new java.awt.Color(
31748 # protocolor.getRed(),
31749 # protocolor.getGreen(),
31750 # protocolor.getBlue(),
31751 # alpha);
31752 # }
31753 #
31754 # public static Color toProto(java.awt.Color color) {
31755 # float red = (float) color.getRed();
31756 # float green = (float) color.getGreen();
31757 # float blue = (float) color.getBlue();
31758 # float denominator = 255.0;
31759 # Color.Builder resultBuilder =
31760 # Color
31761 # .newBuilder()
31762 # .setRed(red / denominator)
31763 # .setGreen(green / denominator)
31764 # .setBlue(blue / denominator);
31765 # int alpha = color.getAlpha();
31766 # if (alpha != 255) {
31767 # result.setAlpha(
31768 # FloatValue
31769 # .newBuilder()
31770 # .setValue(((float) alpha) / denominator)
31771 # .build());
31772 # }
31773 # return resultBuilder.build();
31774 # }
31775 # // ...
31776 #
31777 # Example (iOS / Obj-C):
31778 #
31779 # // ...
31780 # static UIColor* fromProto(Color* protocolor) {
31781 # float red = [protocolor red];
31782 # float green = [protocolor green];
31783 # float blue = [protocolor blue];
31784 # FloatValue* alpha_wrapper = [protocolor alpha];
31785 # float alpha = 1.0;
31786 # if (alpha_wrapper != nil) {
31787 # alpha = [alpha_wrapper value];
31788 # }
31789 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31790 # }
31791 #
31792 # static Color* toProto(UIColor* color) {
31793 # CGFloat red, green, blue, alpha;
31794 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31795 # return nil;
31796 # }
31797 # Color* result = [Color alloc] init];
31798 # [result setRed:red];
31799 # [result setGreen:green];
31800 # [result setBlue:blue];
31801 # if (alpha <= 0.9999) {
31802 # [result setAlpha:floatWrapperWithValue(alpha)];
31803 # }
31804 # [result autorelease];
31805 # return result;
31806 # }
31807 # // ...
31808 #
31809 # Example (JavaScript):
31810 #
31811 # // ...
31812 #
31813 # var protoToCssColor = function(rgb_color) {
31814 # var redFrac = rgb_color.red || 0.0;
31815 # var greenFrac = rgb_color.green || 0.0;
31816 # var blueFrac = rgb_color.blue || 0.0;
31817 # var red = Math.floor(redFrac * 255);
31818 # var green = Math.floor(greenFrac * 255);
31819 # var blue = Math.floor(blueFrac * 255);
31820 #
31821 # if (!('alpha' in rgb_color)) {
31822 # return rgbToCssColor_(red, green, blue);
31823 # }
31824 #
31825 # var alphaFrac = rgb_color.alpha.value || 0.0;
31826 # var rgbParams = [red, green, blue].join(',');
31827 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31828 # };
31829 #
31830 # var rgbToCssColor_ = function(red, green, blue) {
31831 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31832 # var hexString = rgbNumber.toString(16);
31833 # var missingZeros = 6 - hexString.length;
31834 # var resultBuilder = ['#'];
31835 # for (var i = 0; i < missingZeros; i++) {
31836 # resultBuilder.push('0');
31837 # }
31838 # resultBuilder.push(hexString);
31839 # return resultBuilder.join('');
31840 # };
31841 #
31842 # // ...
31843 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31844 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31845 # the final pixel color is defined by the equation:
31846 #
31847 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31848 #
31849 # This means that a value of 1.0 corresponds to a solid color, whereas
31850 # a value of 0.0 corresponds to a completely transparent color. This
31851 # uses a wrapper message rather than a simple float scalar so that it is
31852 # possible to distinguish between a default value and the value being unset.
31853 # If omitted, this color object is to be rendered as a solid color
31854 # (as if the alpha value had been explicitly given with a value of 1.0).
31855 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31856 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31857 },
31858 "bold": True or False, # True if the text is bold.
31859 "strikethrough": True or False, # True if the text has a strikethrough.
31860 "fontFamily": "A String", # The font family.
31861 "fontSize": 42, # The size of the font.
31862 "italic": True or False, # True if the text is italicized.
31863 "underline": True or False, # True if the text is underlined.
31864 },
31865 "title": "A String", # The title of this axis. If set, this overrides any title inferred
31866 # from headers of the data.
31867 },
31868 ],
31869 },
31870 "title": "A String", # The title of the chart.
31871 },
31872 },
31873 ],
31874 "filterViews": [ # The filter views in this sheet.
31875 { # A filter view.
31876 "title": "A String", # The name of the filter view.
31877 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
31878 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031879 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031880 # may be set.
31881 "filterViewId": 42, # The ID of the filter view.
31882 "range": { # A range on a sheet. # The range this filter view covers.
31883 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031884 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031885 # may be set.
31886 # All indexes are zero-based.
31887 # Indexes are half open, e.g the start index is inclusive
31888 # and the end index is exclusive -- [start_index, end_index).
31889 # Missing indexes indicate the range is unbounded on that side.
31890 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031891 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031892 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031893 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031894 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031895 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031896 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031897 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031898 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031899 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031900 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031901 # `Sheet1!A:B == sheet_id: 0,
31902 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031903 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031904 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031905 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031906 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031907 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031908 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031909 #
31910 # The start index must always be less than or equal to the end index.
31911 # If the start index equals the end index, then the range is empty.
31912 # Empty ranges are typically not meaningful and are usually rendered in the
31913 # UI as `#REF!`.
31914 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31915 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31916 "sheetId": 42, # The sheet this range is on.
31917 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31918 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31919 },
31920 "sortSpecs": [ # The sort order per column. Later specifications are used when values
31921 # are equal in the earlier specifications.
31922 { # A sort order associated with a specific column or row.
31923 "sortOrder": "A String", # The order data should be sorted.
31924 "dimensionIndex": 42, # The dimension the sort should be applied to.
31925 },
31926 ],
31927 "criteria": { # The criteria for showing/hiding values per column.
31928 # The map's key is the column index, and the value is the criteria for
31929 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031930 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031931 "hiddenValues": [ # Values that should be hidden.
31932 "A String",
31933 ],
31934 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
31935 # (This does not override hiddenValues -- if a value is listed there,
31936 # it will still be hidden.)
31937 # BooleanConditions are used by conditional formatting,
31938 # data validation, and the criteria in filters.
31939 "type": "A String", # The type of condition.
31940 "values": [ # The values of the condition. The number of supported values depends
31941 # on the condition type. Some support zero values,
31942 # others one or two values,
31943 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
31944 { # The value of the condition.
31945 "relativeDate": "A String", # A relative date (based on the current date).
31946 # Valid only if the type is
31947 # DATE_BEFORE,
31948 # DATE_AFTER,
31949 # DATE_ON_OR_BEFORE or
31950 # DATE_ON_OR_AFTER.
31951 #
31952 # Relative dates are not supported in data validation.
31953 # They are supported only in conditional formatting and
31954 # conditional filters.
31955 "userEnteredValue": "A String", # A value the condition is based on.
31956 # The value will be parsed as if the user typed into a cell.
31957 # Formulas are supported (and must begin with an `=`).
31958 },
31959 ],
31960 },
31961 },
31962 },
31963 },
31964 ],
31965 "protectedRanges": [ # The protected ranges in this sheet.
31966 { # A protected range.
31967 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
31968 # Unprotected ranges are only supported on protected sheets.
31969 { # A range on a sheet.
31970 # All indexes are zero-based.
31971 # Indexes are half open, e.g the start index is inclusive
31972 # and the end index is exclusive -- [start_index, end_index).
31973 # Missing indexes indicate the range is unbounded on that side.
31974 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031975 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031976 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031977 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031978 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031979 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031980 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031981 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031982 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031983 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031984 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031985 # `Sheet1!A:B == sheet_id: 0,
31986 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031987 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031988 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031989 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031990 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031991 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070031992 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070031993 #
31994 # The start index must always be less than or equal to the end index.
31995 # If the start index equals the end index, then the range is empty.
31996 # Empty ranges are typically not meaningful and are usually rendered in the
31997 # UI as `#REF!`.
31998 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31999 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
32000 "sheetId": 42, # The sheet this range is on.
32001 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
32002 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
32003 },
32004 ],
32005 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
32006 # protected area.
32007 # This field is read-only.
32008 "description": "A String", # The description of this protected range.
32009 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
32010 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032011 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032012 # may be set.
32013 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
32014 # This field is only visible to users with edit access to the protected
32015 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032016 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032017 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
32018 # range. Domain protection is only supported on documents within a domain.
32019 "users": [ # The email addresses of users with edit access to the protected range.
32020 "A String",
32021 ],
32022 "groups": [ # The email addresses of groups with edit access to the protected range.
32023 "A String",
32024 ],
32025 },
32026 "protectedRangeId": 42, # The ID of the protected range.
32027 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032028 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032029 # Warning-based protection means that every user can edit data in the
32030 # protected range, except editing will prompt a warning asking the user
32031 # to confirm the edit.
32032 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032033 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032034 # Additionally, if this field is changed from true to false and the
32035 # `editors` field is not set (nor included in the field mask), then
32036 # the editors will be set to all the editors in the document.
32037 "range": { # A range on a sheet. # The range that is being protected.
32038 # The range may be fully unbounded, in which case this is considered
32039 # a protected sheet.
32040 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032041 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032042 # may be set.
32043 # All indexes are zero-based.
32044 # Indexes are half open, e.g the start index is inclusive
32045 # and the end index is exclusive -- [start_index, end_index).
32046 # Missing indexes indicate the range is unbounded on that side.
32047 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032048 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032049 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032050 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032051 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032052 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032053 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032054 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032055 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032056 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032057 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032058 # `Sheet1!A:B == sheet_id: 0,
32059 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032060 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032061 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032062 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032063 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032064 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032065 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032066 #
32067 # The start index must always be less than or equal to the end index.
32068 # If the start index equals the end index, then the range is empty.
32069 # Empty ranges are typically not meaningful and are usually rendered in the
32070 # UI as `#REF!`.
32071 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
32072 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
32073 "sheetId": 42, # The sheet this range is on.
32074 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
32075 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
32076 },
32077 },
32078 ],
32079 "data": [ # Data in the grid, if this is a grid sheet.
32080 # The number of GridData objects returned is dependent on the number of
32081 # ranges requested on this sheet. For example, if this is representing
32082 # `Sheet1`, and the spreadsheet was requested with ranges
32083 # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a
32084 # startRow/startColumn of `0`,
32085 # while the second one will have `startRow 14` (zero-based row 15),
32086 # and `startColumn 3` (zero-based column D).
32087 { # Data in the grid, as well as metadata about the dimensions.
32088 "startRow": 42, # The first row this GridData refers to, zero-based.
32089 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032090 # in start_row.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032091 { # Properties about a dimension.
32092 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
32093 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
32094 "hiddenByFilter": True or False, # True if this dimension is being filtered.
32095 # This field is read-only.
32096 },
32097 ],
32098 "startColumn": 42, # The first column this GridData refers to, zero-based.
32099 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032100 # in start_column.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032101 { # Properties about a dimension.
32102 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
32103 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
32104 "hiddenByFilter": True or False, # True if this dimension is being filtered.
32105 # This field is read-only.
32106 },
32107 ],
32108 "rowData": [ # The data in the grid, one entry per row,
32109 # starting with the row in startRow.
32110 # The values in RowData will correspond to columns starting
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032111 # at start_column.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032112 { # Data about each cell in a row.
32113 "values": [ # The values in the row, one per column.
32114 { # Data about a specific cell.
32115 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
32116 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032117 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032118 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032119 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032120 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
32121 # or vertically (as rows).
32122 "rows": [ # Each row grouping in the pivot table.
32123 { # A single grouping (either row or column) in a pivot table.
32124 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
32125 "valueMetadata": [ # Metadata about values in the grouping.
32126 { # Metadata about a value in a pivot grouping.
32127 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
32128 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
32129 # (Note that formulaValue is not valid,
32130 # because the values will be calculated.)
32131 "numberValue": 3.14, # Represents a double value.
32132 # Note: Dates, Times and DateTimes are represented as doubles in
32133 # "serial number" format.
32134 "boolValue": True or False, # Represents a boolean value.
32135 "formulaValue": "A String", # Represents a formula.
32136 "stringValue": "A String", # Represents a string value.
32137 # Leading single quotes are not included. For example, if the user typed
32138 # `'123` into the UI, this would be represented as a `stringValue` of
32139 # `"123"`.
32140 "errorValue": { # An error in a cell. # Represents an error.
32141 # This field is read-only.
32142 "message": "A String", # A message with more information about the error
32143 # (in the spreadsheet's locale).
32144 "type": "A String", # The type of error.
32145 },
32146 },
32147 },
32148 ],
32149 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
32150 # If not specified, sorting is alphabetical by this group's values.
32151 "buckets": [ # Determines the bucket from which values are chosen to sort.
32152 #
32153 # For example, in a pivot table with one row group & two column groups,
32154 # the row group can list up to two values. The first value corresponds
32155 # to a value within the first column group, and the second value
32156 # corresponds to a value in the second column group. If no values
32157 # are listed, this would indicate that the row should be sorted according
32158 # to the "Grand Total" over the column groups. If a single value is listed,
32159 # this would correspond to using the "Total" of that bucket.
32160 { # The kinds of value that a cell in a spreadsheet can have.
32161 "numberValue": 3.14, # Represents a double value.
32162 # Note: Dates, Times and DateTimes are represented as doubles in
32163 # "serial number" format.
32164 "boolValue": True or False, # Represents a boolean value.
32165 "formulaValue": "A String", # Represents a formula.
32166 "stringValue": "A String", # Represents a string value.
32167 # Leading single quotes are not included. For example, if the user typed
32168 # `'123` into the UI, this would be represented as a `stringValue` of
32169 # `"123"`.
32170 "errorValue": { # An error in a cell. # Represents an error.
32171 # This field is read-only.
32172 "message": "A String", # A message with more information about the error
32173 # (in the spreadsheet's locale).
32174 "type": "A String", # The type of error.
32175 },
32176 },
32177 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032178 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032179 # grouping should be sorted by.
32180 },
32181 "sortOrder": "A String", # The order the values in this group should be sorted.
32182 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
32183 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032184 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032185 # means this group refers to column `C`, whereas the offset `1` would refer
32186 # to column `D`.
32187 },
32188 ],
32189 "source": { # A range on a sheet. # The range the pivot table is reading data from.
32190 # All indexes are zero-based.
32191 # Indexes are half open, e.g the start index is inclusive
32192 # and the end index is exclusive -- [start_index, end_index).
32193 # Missing indexes indicate the range is unbounded on that side.
32194 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032195 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032196 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032197 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032198 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032199 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032200 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032201 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032202 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032203 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032204 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032205 # `Sheet1!A:B == sheet_id: 0,
32206 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032207 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032208 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032209 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032210 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032211 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032212 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032213 #
32214 # The start index must always be less than or equal to the end index.
32215 # If the start index equals the end index, then the range is empty.
32216 # Empty ranges are typically not meaningful and are usually rendered in the
32217 # UI as `#REF!`.
32218 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
32219 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
32220 "sheetId": 42, # The sheet this range is on.
32221 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
32222 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
32223 },
32224 "values": [ # A list of values to include in the pivot table.
32225 { # The definition of how a value in a pivot table should be calculated.
32226 "formula": "A String", # A custom formula to calculate the value. The formula must start
32227 # with an `=` character.
32228 "summarizeFunction": "A String", # A function to summarize the value.
32229 # If formula is set, the only supported values are
32230 # SUM and
32231 # CUSTOM.
32232 # If sourceColumnOffset is set, then `CUSTOM`
32233 # is not supported.
32234 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
32235 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032236 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032237 # means this value refers to column `C`, whereas the offset `1` would
32238 # refer to column `D`.
32239 "name": "A String", # A name to use for the value. This is only used if formula was set.
32240 # Otherwise, the column name is used.
32241 },
32242 ],
32243 "criteria": { # An optional mapping of filters per source column offset.
32244 #
32245 # The filters will be applied before aggregating data into the pivot table.
32246 # The map's key is the column offset of the source range that you want to
32247 # filter, and the value is the criteria for that column.
32248 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032249 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032250 # for column `C`, whereas the key `1` is for column `D`.
32251 "a_key": { # Criteria for showing/hiding rows in a pivot table.
32252 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
32253 "A String",
32254 ],
32255 },
32256 },
32257 "columns": [ # Each column grouping in the pivot table.
32258 { # A single grouping (either row or column) in a pivot table.
32259 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
32260 "valueMetadata": [ # Metadata about values in the grouping.
32261 { # Metadata about a value in a pivot grouping.
32262 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
32263 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
32264 # (Note that formulaValue is not valid,
32265 # because the values will be calculated.)
32266 "numberValue": 3.14, # Represents a double value.
32267 # Note: Dates, Times and DateTimes are represented as doubles in
32268 # "serial number" format.
32269 "boolValue": True or False, # Represents a boolean value.
32270 "formulaValue": "A String", # Represents a formula.
32271 "stringValue": "A String", # Represents a string value.
32272 # Leading single quotes are not included. For example, if the user typed
32273 # `'123` into the UI, this would be represented as a `stringValue` of
32274 # `"123"`.
32275 "errorValue": { # An error in a cell. # Represents an error.
32276 # This field is read-only.
32277 "message": "A String", # A message with more information about the error
32278 # (in the spreadsheet's locale).
32279 "type": "A String", # The type of error.
32280 },
32281 },
32282 },
32283 ],
32284 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
32285 # If not specified, sorting is alphabetical by this group's values.
32286 "buckets": [ # Determines the bucket from which values are chosen to sort.
32287 #
32288 # For example, in a pivot table with one row group & two column groups,
32289 # the row group can list up to two values. The first value corresponds
32290 # to a value within the first column group, and the second value
32291 # corresponds to a value in the second column group. If no values
32292 # are listed, this would indicate that the row should be sorted according
32293 # to the "Grand Total" over the column groups. If a single value is listed,
32294 # this would correspond to using the "Total" of that bucket.
32295 { # The kinds of value that a cell in a spreadsheet can have.
32296 "numberValue": 3.14, # Represents a double value.
32297 # Note: Dates, Times and DateTimes are represented as doubles in
32298 # "serial number" format.
32299 "boolValue": True or False, # Represents a boolean value.
32300 "formulaValue": "A String", # Represents a formula.
32301 "stringValue": "A String", # Represents a string value.
32302 # Leading single quotes are not included. For example, if the user typed
32303 # `'123` into the UI, this would be represented as a `stringValue` of
32304 # `"123"`.
32305 "errorValue": { # An error in a cell. # Represents an error.
32306 # This field is read-only.
32307 "message": "A String", # A message with more information about the error
32308 # (in the spreadsheet's locale).
32309 "type": "A String", # The type of error.
32310 },
32311 },
32312 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032313 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032314 # grouping should be sorted by.
32315 },
32316 "sortOrder": "A String", # The order the values in this group should be sorted.
32317 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
32318 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032319 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032320 # means this group refers to column `C`, whereas the offset `1` would refer
32321 # to column `D`.
32322 },
32323 ],
32324 },
32325 "hyperlink": "A String", # A hyperlink this cell points to, if any.
32326 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
32327 "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
32328 # the calculated value. For cells with literals, this will be
32329 # the same as the user_entered_value.
32330 # This field is read-only.
32331 "numberValue": 3.14, # Represents a double value.
32332 # Note: Dates, Times and DateTimes are represented as doubles in
32333 # "serial number" format.
32334 "boolValue": True or False, # Represents a boolean value.
32335 "formulaValue": "A String", # Represents a formula.
32336 "stringValue": "A String", # Represents a string value.
32337 # Leading single quotes are not included. For example, if the user typed
32338 # `'123` into the UI, this would be represented as a `stringValue` of
32339 # `"123"`.
32340 "errorValue": { # An error in a cell. # Represents an error.
32341 # This field is read-only.
32342 "message": "A String", # A message with more information about the error
32343 # (in the spreadsheet's locale).
32344 "type": "A String", # The type of error.
32345 },
32346 },
32347 "formattedValue": "A String", # The formatted value of the cell.
32348 # This is the value as it's shown to the user.
32349 # This field is read-only.
32350 "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()`
32351 # Note: Dates, Times and DateTimes are represented as doubles in
32352 # serial number format.
32353 "numberValue": 3.14, # Represents a double value.
32354 # Note: Dates, Times and DateTimes are represented as doubles in
32355 # "serial number" format.
32356 "boolValue": True or False, # Represents a boolean value.
32357 "formulaValue": "A String", # Represents a formula.
32358 "stringValue": "A String", # Represents a string value.
32359 # Leading single quotes are not included. For example, if the user typed
32360 # `'123` into the UI, this would be represented as a `stringValue` of
32361 # `"123"`.
32362 "errorValue": { # An error in a cell. # Represents an error.
32363 # This field is read-only.
32364 "message": "A String", # A message with more information about the error
32365 # (in the spreadsheet's locale).
32366 "type": "A String", # The type of error.
32367 },
32368 },
32369 "note": "A String", # Any note on the cell.
32370 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
32371 # This includes the results of applying any conditional formatting and,
32372 # if the cell contains a formula, the computed number format.
32373 # If the effective format is the default format, effective format will
32374 # not be written.
32375 # This field is read-only.
32376 "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 -070032377 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
32378 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070032379 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
32380 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032381 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032382 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032383 },
32384 "textDirection": "A String", # The direction of the text in the cell.
32385 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
32386 # When updating padding, every field must be specified.
32387 "top": 42, # The top padding of the cell.
32388 "right": 42, # The right padding of the cell.
32389 "bottom": 42, # The bottom padding of the cell.
32390 "left": 42, # The left padding of the cell.
32391 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032392 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032393 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
32394 # for simplicity of conversion to/from color representations in various
32395 # languages over compactness; for example, the fields of this representation
32396 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
32397 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
32398 # method in iOS; and, with just a little work, it can be easily formatted into
32399 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32400 #
32401 # Example (Java):
32402 #
32403 # import com.google.type.Color;
32404 #
32405 # // ...
32406 # public static java.awt.Color fromProto(Color protocolor) {
32407 # float alpha = protocolor.hasAlpha()
32408 # ? protocolor.getAlpha().getValue()
32409 # : 1.0;
32410 #
32411 # return new java.awt.Color(
32412 # protocolor.getRed(),
32413 # protocolor.getGreen(),
32414 # protocolor.getBlue(),
32415 # alpha);
32416 # }
32417 #
32418 # public static Color toProto(java.awt.Color color) {
32419 # float red = (float) color.getRed();
32420 # float green = (float) color.getGreen();
32421 # float blue = (float) color.getBlue();
32422 # float denominator = 255.0;
32423 # Color.Builder resultBuilder =
32424 # Color
32425 # .newBuilder()
32426 # .setRed(red / denominator)
32427 # .setGreen(green / denominator)
32428 # .setBlue(blue / denominator);
32429 # int alpha = color.getAlpha();
32430 # if (alpha != 255) {
32431 # result.setAlpha(
32432 # FloatValue
32433 # .newBuilder()
32434 # .setValue(((float) alpha) / denominator)
32435 # .build());
32436 # }
32437 # return resultBuilder.build();
32438 # }
32439 # // ...
32440 #
32441 # Example (iOS / Obj-C):
32442 #
32443 # // ...
32444 # static UIColor* fromProto(Color* protocolor) {
32445 # float red = [protocolor red];
32446 # float green = [protocolor green];
32447 # float blue = [protocolor blue];
32448 # FloatValue* alpha_wrapper = [protocolor alpha];
32449 # float alpha = 1.0;
32450 # if (alpha_wrapper != nil) {
32451 # alpha = [alpha_wrapper value];
32452 # }
32453 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
32454 # }
32455 #
32456 # static Color* toProto(UIColor* color) {
32457 # CGFloat red, green, blue, alpha;
32458 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
32459 # return nil;
32460 # }
32461 # Color* result = [Color alloc] init];
32462 # [result setRed:red];
32463 # [result setGreen:green];
32464 # [result setBlue:blue];
32465 # if (alpha <= 0.9999) {
32466 # [result setAlpha:floatWrapperWithValue(alpha)];
32467 # }
32468 # [result autorelease];
32469 # return result;
32470 # }
32471 # // ...
32472 #
32473 # Example (JavaScript):
32474 #
32475 # // ...
32476 #
32477 # var protoToCssColor = function(rgb_color) {
32478 # var redFrac = rgb_color.red || 0.0;
32479 # var greenFrac = rgb_color.green || 0.0;
32480 # var blueFrac = rgb_color.blue || 0.0;
32481 # var red = Math.floor(redFrac * 255);
32482 # var green = Math.floor(greenFrac * 255);
32483 # var blue = Math.floor(blueFrac * 255);
32484 #
32485 # if (!('alpha' in rgb_color)) {
32486 # return rgbToCssColor_(red, green, blue);
32487 # }
32488 #
32489 # var alphaFrac = rgb_color.alpha.value || 0.0;
32490 # var rgbParams = [red, green, blue].join(',');
32491 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
32492 # };
32493 #
32494 # var rgbToCssColor_ = function(red, green, blue) {
32495 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
32496 # var hexString = rgbNumber.toString(16);
32497 # var missingZeros = 6 - hexString.length;
32498 # var resultBuilder = ['#'];
32499 # for (var i = 0; i < missingZeros; i++) {
32500 # resultBuilder.push('0');
32501 # }
32502 # resultBuilder.push(hexString);
32503 # return resultBuilder.join('');
32504 # };
32505 #
32506 # // ...
32507 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
32508 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
32509 # the final pixel color is defined by the equation:
32510 #
32511 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
32512 #
32513 # This means that a value of 1.0 corresponds to a solid color, whereas
32514 # a value of 0.0 corresponds to a completely transparent color. This
32515 # uses a wrapper message rather than a simple float scalar so that it is
32516 # possible to distinguish between a default value and the value being unset.
32517 # If omitted, this color object is to be rendered as a solid color
32518 # (as if the alpha value had been explicitly given with a value of 1.0).
32519 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
32520 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
32521 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032522 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032523 "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).
32524 # Absent values indicate that the field isn't specified.
32525 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
32526 # for simplicity of conversion to/from color representations in various
32527 # languages over compactness; for example, the fields of this representation
32528 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
32529 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
32530 # method in iOS; and, with just a little work, it can be easily formatted into
32531 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32532 #
32533 # Example (Java):
32534 #
32535 # import com.google.type.Color;
32536 #
32537 # // ...
32538 # public static java.awt.Color fromProto(Color protocolor) {
32539 # float alpha = protocolor.hasAlpha()
32540 # ? protocolor.getAlpha().getValue()
32541 # : 1.0;
32542 #
32543 # return new java.awt.Color(
32544 # protocolor.getRed(),
32545 # protocolor.getGreen(),
32546 # protocolor.getBlue(),
32547 # alpha);
32548 # }
32549 #
32550 # public static Color toProto(java.awt.Color color) {
32551 # float red = (float) color.getRed();
32552 # float green = (float) color.getGreen();
32553 # float blue = (float) color.getBlue();
32554 # float denominator = 255.0;
32555 # Color.Builder resultBuilder =
32556 # Color
32557 # .newBuilder()
32558 # .setRed(red / denominator)
32559 # .setGreen(green / denominator)
32560 # .setBlue(blue / denominator);
32561 # int alpha = color.getAlpha();
32562 # if (alpha != 255) {
32563 # result.setAlpha(
32564 # FloatValue
32565 # .newBuilder()
32566 # .setValue(((float) alpha) / denominator)
32567 # .build());
32568 # }
32569 # return resultBuilder.build();
32570 # }
32571 # // ...
32572 #
32573 # Example (iOS / Obj-C):
32574 #
32575 # // ...
32576 # static UIColor* fromProto(Color* protocolor) {
32577 # float red = [protocolor red];
32578 # float green = [protocolor green];
32579 # float blue = [protocolor blue];
32580 # FloatValue* alpha_wrapper = [protocolor alpha];
32581 # float alpha = 1.0;
32582 # if (alpha_wrapper != nil) {
32583 # alpha = [alpha_wrapper value];
32584 # }
32585 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
32586 # }
32587 #
32588 # static Color* toProto(UIColor* color) {
32589 # CGFloat red, green, blue, alpha;
32590 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
32591 # return nil;
32592 # }
32593 # Color* result = [Color alloc] init];
32594 # [result setRed:red];
32595 # [result setGreen:green];
32596 # [result setBlue:blue];
32597 # if (alpha <= 0.9999) {
32598 # [result setAlpha:floatWrapperWithValue(alpha)];
32599 # }
32600 # [result autorelease];
32601 # return result;
32602 # }
32603 # // ...
32604 #
32605 # Example (JavaScript):
32606 #
32607 # // ...
32608 #
32609 # var protoToCssColor = function(rgb_color) {
32610 # var redFrac = rgb_color.red || 0.0;
32611 # var greenFrac = rgb_color.green || 0.0;
32612 # var blueFrac = rgb_color.blue || 0.0;
32613 # var red = Math.floor(redFrac * 255);
32614 # var green = Math.floor(greenFrac * 255);
32615 # var blue = Math.floor(blueFrac * 255);
32616 #
32617 # if (!('alpha' in rgb_color)) {
32618 # return rgbToCssColor_(red, green, blue);
32619 # }
32620 #
32621 # var alphaFrac = rgb_color.alpha.value || 0.0;
32622 # var rgbParams = [red, green, blue].join(',');
32623 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
32624 # };
32625 #
32626 # var rgbToCssColor_ = function(red, green, blue) {
32627 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
32628 # var hexString = rgbNumber.toString(16);
32629 # var missingZeros = 6 - hexString.length;
32630 # var resultBuilder = ['#'];
32631 # for (var i = 0; i < missingZeros; i++) {
32632 # resultBuilder.push('0');
32633 # }
32634 # resultBuilder.push(hexString);
32635 # return resultBuilder.join('');
32636 # };
32637 #
32638 # // ...
32639 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
32640 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
32641 # the final pixel color is defined by the equation:
32642 #
32643 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
32644 #
32645 # This means that a value of 1.0 corresponds to a solid color, whereas
32646 # a value of 0.0 corresponds to a completely transparent color. This
32647 # uses a wrapper message rather than a simple float scalar so that it is
32648 # possible to distinguish between a default value and the value being unset.
32649 # If omitted, this color object is to be rendered as a solid color
32650 # (as if the alpha value had been explicitly given with a value of 1.0).
32651 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
32652 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
32653 },
32654 "bold": True or False, # True if the text is bold.
32655 "strikethrough": True or False, # True if the text has a strikethrough.
32656 "fontFamily": "A String", # The font family.
32657 "fontSize": 42, # The size of the font.
32658 "italic": True or False, # True if the text is italicized.
32659 "underline": True or False, # True if the text is underlined.
32660 },
32661 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
32662 "borders": { # The borders of the cell. # The borders of the cell.
32663 "top": { # A border along a cell. # The top border of the cell.
32664 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
32665 # for simplicity of conversion to/from color representations in various
32666 # languages over compactness; for example, the fields of this representation
32667 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
32668 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
32669 # method in iOS; and, with just a little work, it can be easily formatted into
32670 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32671 #
32672 # Example (Java):
32673 #
32674 # import com.google.type.Color;
32675 #
32676 # // ...
32677 # public static java.awt.Color fromProto(Color protocolor) {
32678 # float alpha = protocolor.hasAlpha()
32679 # ? protocolor.getAlpha().getValue()
32680 # : 1.0;
32681 #
32682 # return new java.awt.Color(
32683 # protocolor.getRed(),
32684 # protocolor.getGreen(),
32685 # protocolor.getBlue(),
32686 # alpha);
32687 # }
32688 #
32689 # public static Color toProto(java.awt.Color color) {
32690 # float red = (float) color.getRed();
32691 # float green = (float) color.getGreen();
32692 # float blue = (float) color.getBlue();
32693 # float denominator = 255.0;
32694 # Color.Builder resultBuilder =
32695 # Color
32696 # .newBuilder()
32697 # .setRed(red / denominator)
32698 # .setGreen(green / denominator)
32699 # .setBlue(blue / denominator);
32700 # int alpha = color.getAlpha();
32701 # if (alpha != 255) {
32702 # result.setAlpha(
32703 # FloatValue
32704 # .newBuilder()
32705 # .setValue(((float) alpha) / denominator)
32706 # .build());
32707 # }
32708 # return resultBuilder.build();
32709 # }
32710 # // ...
32711 #
32712 # Example (iOS / Obj-C):
32713 #
32714 # // ...
32715 # static UIColor* fromProto(Color* protocolor) {
32716 # float red = [protocolor red];
32717 # float green = [protocolor green];
32718 # float blue = [protocolor blue];
32719 # FloatValue* alpha_wrapper = [protocolor alpha];
32720 # float alpha = 1.0;
32721 # if (alpha_wrapper != nil) {
32722 # alpha = [alpha_wrapper value];
32723 # }
32724 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
32725 # }
32726 #
32727 # static Color* toProto(UIColor* color) {
32728 # CGFloat red, green, blue, alpha;
32729 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
32730 # return nil;
32731 # }
32732 # Color* result = [Color alloc] init];
32733 # [result setRed:red];
32734 # [result setGreen:green];
32735 # [result setBlue:blue];
32736 # if (alpha <= 0.9999) {
32737 # [result setAlpha:floatWrapperWithValue(alpha)];
32738 # }
32739 # [result autorelease];
32740 # return result;
32741 # }
32742 # // ...
32743 #
32744 # Example (JavaScript):
32745 #
32746 # // ...
32747 #
32748 # var protoToCssColor = function(rgb_color) {
32749 # var redFrac = rgb_color.red || 0.0;
32750 # var greenFrac = rgb_color.green || 0.0;
32751 # var blueFrac = rgb_color.blue || 0.0;
32752 # var red = Math.floor(redFrac * 255);
32753 # var green = Math.floor(greenFrac * 255);
32754 # var blue = Math.floor(blueFrac * 255);
32755 #
32756 # if (!('alpha' in rgb_color)) {
32757 # return rgbToCssColor_(red, green, blue);
32758 # }
32759 #
32760 # var alphaFrac = rgb_color.alpha.value || 0.0;
32761 # var rgbParams = [red, green, blue].join(',');
32762 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
32763 # };
32764 #
32765 # var rgbToCssColor_ = function(red, green, blue) {
32766 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
32767 # var hexString = rgbNumber.toString(16);
32768 # var missingZeros = 6 - hexString.length;
32769 # var resultBuilder = ['#'];
32770 # for (var i = 0; i < missingZeros; i++) {
32771 # resultBuilder.push('0');
32772 # }
32773 # resultBuilder.push(hexString);
32774 # return resultBuilder.join('');
32775 # };
32776 #
32777 # // ...
32778 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
32779 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
32780 # the final pixel color is defined by the equation:
32781 #
32782 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
32783 #
32784 # This means that a value of 1.0 corresponds to a solid color, whereas
32785 # a value of 0.0 corresponds to a completely transparent color. This
32786 # uses a wrapper message rather than a simple float scalar so that it is
32787 # possible to distinguish between a default value and the value being unset.
32788 # If omitted, this color object is to be rendered as a solid color
32789 # (as if the alpha value had been explicitly given with a value of 1.0).
32790 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
32791 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
32792 },
32793 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032794 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032795 "style": "A String", # The style of the border.
32796 },
32797 "right": { # A border along a cell. # The right border of the cell.
32798 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
32799 # for simplicity of conversion to/from color representations in various
32800 # languages over compactness; for example, the fields of this representation
32801 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
32802 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
32803 # method in iOS; and, with just a little work, it can be easily formatted into
32804 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32805 #
32806 # Example (Java):
32807 #
32808 # import com.google.type.Color;
32809 #
32810 # // ...
32811 # public static java.awt.Color fromProto(Color protocolor) {
32812 # float alpha = protocolor.hasAlpha()
32813 # ? protocolor.getAlpha().getValue()
32814 # : 1.0;
32815 #
32816 # return new java.awt.Color(
32817 # protocolor.getRed(),
32818 # protocolor.getGreen(),
32819 # protocolor.getBlue(),
32820 # alpha);
32821 # }
32822 #
32823 # public static Color toProto(java.awt.Color color) {
32824 # float red = (float) color.getRed();
32825 # float green = (float) color.getGreen();
32826 # float blue = (float) color.getBlue();
32827 # float denominator = 255.0;
32828 # Color.Builder resultBuilder =
32829 # Color
32830 # .newBuilder()
32831 # .setRed(red / denominator)
32832 # .setGreen(green / denominator)
32833 # .setBlue(blue / denominator);
32834 # int alpha = color.getAlpha();
32835 # if (alpha != 255) {
32836 # result.setAlpha(
32837 # FloatValue
32838 # .newBuilder()
32839 # .setValue(((float) alpha) / denominator)
32840 # .build());
32841 # }
32842 # return resultBuilder.build();
32843 # }
32844 # // ...
32845 #
32846 # Example (iOS / Obj-C):
32847 #
32848 # // ...
32849 # static UIColor* fromProto(Color* protocolor) {
32850 # float red = [protocolor red];
32851 # float green = [protocolor green];
32852 # float blue = [protocolor blue];
32853 # FloatValue* alpha_wrapper = [protocolor alpha];
32854 # float alpha = 1.0;
32855 # if (alpha_wrapper != nil) {
32856 # alpha = [alpha_wrapper value];
32857 # }
32858 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
32859 # }
32860 #
32861 # static Color* toProto(UIColor* color) {
32862 # CGFloat red, green, blue, alpha;
32863 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
32864 # return nil;
32865 # }
32866 # Color* result = [Color alloc] init];
32867 # [result setRed:red];
32868 # [result setGreen:green];
32869 # [result setBlue:blue];
32870 # if (alpha <= 0.9999) {
32871 # [result setAlpha:floatWrapperWithValue(alpha)];
32872 # }
32873 # [result autorelease];
32874 # return result;
32875 # }
32876 # // ...
32877 #
32878 # Example (JavaScript):
32879 #
32880 # // ...
32881 #
32882 # var protoToCssColor = function(rgb_color) {
32883 # var redFrac = rgb_color.red || 0.0;
32884 # var greenFrac = rgb_color.green || 0.0;
32885 # var blueFrac = rgb_color.blue || 0.0;
32886 # var red = Math.floor(redFrac * 255);
32887 # var green = Math.floor(greenFrac * 255);
32888 # var blue = Math.floor(blueFrac * 255);
32889 #
32890 # if (!('alpha' in rgb_color)) {
32891 # return rgbToCssColor_(red, green, blue);
32892 # }
32893 #
32894 # var alphaFrac = rgb_color.alpha.value || 0.0;
32895 # var rgbParams = [red, green, blue].join(',');
32896 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
32897 # };
32898 #
32899 # var rgbToCssColor_ = function(red, green, blue) {
32900 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
32901 # var hexString = rgbNumber.toString(16);
32902 # var missingZeros = 6 - hexString.length;
32903 # var resultBuilder = ['#'];
32904 # for (var i = 0; i < missingZeros; i++) {
32905 # resultBuilder.push('0');
32906 # }
32907 # resultBuilder.push(hexString);
32908 # return resultBuilder.join('');
32909 # };
32910 #
32911 # // ...
32912 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
32913 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
32914 # the final pixel color is defined by the equation:
32915 #
32916 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
32917 #
32918 # This means that a value of 1.0 corresponds to a solid color, whereas
32919 # a value of 0.0 corresponds to a completely transparent color. This
32920 # uses a wrapper message rather than a simple float scalar so that it is
32921 # possible to distinguish between a default value and the value being unset.
32922 # If omitted, this color object is to be rendered as a solid color
32923 # (as if the alpha value had been explicitly given with a value of 1.0).
32924 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
32925 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
32926 },
32927 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070032928 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070032929 "style": "A String", # The style of the border.
32930 },
32931 "bottom": { # A border along a cell. # The bottom border of the cell.
32932 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
32933 # for simplicity of conversion to/from color representations in various
32934 # languages over compactness; for example, the fields of this representation
32935 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
32936 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
32937 # method in iOS; and, with just a little work, it can be easily formatted into
32938 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32939 #
32940 # Example (Java):
32941 #
32942 # import com.google.type.Color;
32943 #
32944 # // ...
32945 # public static java.awt.Color fromProto(Color protocolor) {
32946 # float alpha = protocolor.hasAlpha()
32947 # ? protocolor.getAlpha().getValue()
32948 # : 1.0;
32949 #
32950 # return new java.awt.Color(
32951 # protocolor.getRed(),
32952 # protocolor.getGreen(),
32953 # protocolor.getBlue(),
32954 # alpha);
32955 # }
32956 #
32957 # public static Color toProto(java.awt.Color color) {
32958 # float red = (float) color.getRed();
32959 # float green = (float) color.getGreen();
32960 # float blue = (float) color.getBlue();
32961 # float denominator = 255.0;
32962 # Color.Builder resultBuilder =
32963 # Color
32964 # .newBuilder()
32965 # .setRed(red / denominator)
32966 # .setGreen(green / denominator)
32967 # .setBlue(blue / denominator);
32968 # int alpha = color.getAlpha();
32969 # if (alpha != 255) {
32970 # result.setAlpha(
32971 # FloatValue
32972 # .newBuilder()
32973 # .setValue(((float) alpha) / denominator)
32974 # .build());
32975 # }
32976 # return resultBuilder.build();
32977 # }
32978 # // ...
32979 #
32980 # Example (iOS / Obj-C):
32981 #
32982 # // ...
32983 # static UIColor* fromProto(Color* protocolor) {
32984 # float red = [protocolor red];
32985 # float green = [protocolor green];
32986 # float blue = [protocolor blue];
32987 # FloatValue* alpha_wrapper = [protocolor alpha];
32988 # float alpha = 1.0;
32989 # if (alpha_wrapper != nil) {
32990 # alpha = [alpha_wrapper value];
32991 # }
32992 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
32993 # }
32994 #
32995 # static Color* toProto(UIColor* color) {
32996 # CGFloat red, green, blue, alpha;
32997 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
32998 # return nil;
32999 # }
33000 # Color* result = [Color alloc] init];
33001 # [result setRed:red];
33002 # [result setGreen:green];
33003 # [result setBlue:blue];
33004 # if (alpha <= 0.9999) {
33005 # [result setAlpha:floatWrapperWithValue(alpha)];
33006 # }
33007 # [result autorelease];
33008 # return result;
33009 # }
33010 # // ...
33011 #
33012 # Example (JavaScript):
33013 #
33014 # // ...
33015 #
33016 # var protoToCssColor = function(rgb_color) {
33017 # var redFrac = rgb_color.red || 0.0;
33018 # var greenFrac = rgb_color.green || 0.0;
33019 # var blueFrac = rgb_color.blue || 0.0;
33020 # var red = Math.floor(redFrac * 255);
33021 # var green = Math.floor(greenFrac * 255);
33022 # var blue = Math.floor(blueFrac * 255);
33023 #
33024 # if (!('alpha' in rgb_color)) {
33025 # return rgbToCssColor_(red, green, blue);
33026 # }
33027 #
33028 # var alphaFrac = rgb_color.alpha.value || 0.0;
33029 # var rgbParams = [red, green, blue].join(',');
33030 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33031 # };
33032 #
33033 # var rgbToCssColor_ = function(red, green, blue) {
33034 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33035 # var hexString = rgbNumber.toString(16);
33036 # var missingZeros = 6 - hexString.length;
33037 # var resultBuilder = ['#'];
33038 # for (var i = 0; i < missingZeros; i++) {
33039 # resultBuilder.push('0');
33040 # }
33041 # resultBuilder.push(hexString);
33042 # return resultBuilder.join('');
33043 # };
33044 #
33045 # // ...
33046 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33047 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33048 # the final pixel color is defined by the equation:
33049 #
33050 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33051 #
33052 # This means that a value of 1.0 corresponds to a solid color, whereas
33053 # a value of 0.0 corresponds to a completely transparent color. This
33054 # uses a wrapper message rather than a simple float scalar so that it is
33055 # possible to distinguish between a default value and the value being unset.
33056 # If omitted, this color object is to be rendered as a solid color
33057 # (as if the alpha value had been explicitly given with a value of 1.0).
33058 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33059 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33060 },
33061 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033062 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033063 "style": "A String", # The style of the border.
33064 },
33065 "left": { # A border along a cell. # The left border of the cell.
33066 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33067 # for simplicity of conversion to/from color representations in various
33068 # languages over compactness; for example, the fields of this representation
33069 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33070 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33071 # method in iOS; and, with just a little work, it can be easily formatted into
33072 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33073 #
33074 # Example (Java):
33075 #
33076 # import com.google.type.Color;
33077 #
33078 # // ...
33079 # public static java.awt.Color fromProto(Color protocolor) {
33080 # float alpha = protocolor.hasAlpha()
33081 # ? protocolor.getAlpha().getValue()
33082 # : 1.0;
33083 #
33084 # return new java.awt.Color(
33085 # protocolor.getRed(),
33086 # protocolor.getGreen(),
33087 # protocolor.getBlue(),
33088 # alpha);
33089 # }
33090 #
33091 # public static Color toProto(java.awt.Color color) {
33092 # float red = (float) color.getRed();
33093 # float green = (float) color.getGreen();
33094 # float blue = (float) color.getBlue();
33095 # float denominator = 255.0;
33096 # Color.Builder resultBuilder =
33097 # Color
33098 # .newBuilder()
33099 # .setRed(red / denominator)
33100 # .setGreen(green / denominator)
33101 # .setBlue(blue / denominator);
33102 # int alpha = color.getAlpha();
33103 # if (alpha != 255) {
33104 # result.setAlpha(
33105 # FloatValue
33106 # .newBuilder()
33107 # .setValue(((float) alpha) / denominator)
33108 # .build());
33109 # }
33110 # return resultBuilder.build();
33111 # }
33112 # // ...
33113 #
33114 # Example (iOS / Obj-C):
33115 #
33116 # // ...
33117 # static UIColor* fromProto(Color* protocolor) {
33118 # float red = [protocolor red];
33119 # float green = [protocolor green];
33120 # float blue = [protocolor blue];
33121 # FloatValue* alpha_wrapper = [protocolor alpha];
33122 # float alpha = 1.0;
33123 # if (alpha_wrapper != nil) {
33124 # alpha = [alpha_wrapper value];
33125 # }
33126 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33127 # }
33128 #
33129 # static Color* toProto(UIColor* color) {
33130 # CGFloat red, green, blue, alpha;
33131 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33132 # return nil;
33133 # }
33134 # Color* result = [Color alloc] init];
33135 # [result setRed:red];
33136 # [result setGreen:green];
33137 # [result setBlue:blue];
33138 # if (alpha <= 0.9999) {
33139 # [result setAlpha:floatWrapperWithValue(alpha)];
33140 # }
33141 # [result autorelease];
33142 # return result;
33143 # }
33144 # // ...
33145 #
33146 # Example (JavaScript):
33147 #
33148 # // ...
33149 #
33150 # var protoToCssColor = function(rgb_color) {
33151 # var redFrac = rgb_color.red || 0.0;
33152 # var greenFrac = rgb_color.green || 0.0;
33153 # var blueFrac = rgb_color.blue || 0.0;
33154 # var red = Math.floor(redFrac * 255);
33155 # var green = Math.floor(greenFrac * 255);
33156 # var blue = Math.floor(blueFrac * 255);
33157 #
33158 # if (!('alpha' in rgb_color)) {
33159 # return rgbToCssColor_(red, green, blue);
33160 # }
33161 #
33162 # var alphaFrac = rgb_color.alpha.value || 0.0;
33163 # var rgbParams = [red, green, blue].join(',');
33164 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33165 # };
33166 #
33167 # var rgbToCssColor_ = function(red, green, blue) {
33168 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33169 # var hexString = rgbNumber.toString(16);
33170 # var missingZeros = 6 - hexString.length;
33171 # var resultBuilder = ['#'];
33172 # for (var i = 0; i < missingZeros; i++) {
33173 # resultBuilder.push('0');
33174 # }
33175 # resultBuilder.push(hexString);
33176 # return resultBuilder.join('');
33177 # };
33178 #
33179 # // ...
33180 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33181 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33182 # the final pixel color is defined by the equation:
33183 #
33184 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33185 #
33186 # This means that a value of 1.0 corresponds to a solid color, whereas
33187 # a value of 0.0 corresponds to a completely transparent color. This
33188 # uses a wrapper message rather than a simple float scalar so that it is
33189 # possible to distinguish between a default value and the value being unset.
33190 # If omitted, this color object is to be rendered as a solid color
33191 # (as if the alpha value had been explicitly given with a value of 1.0).
33192 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33193 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33194 },
33195 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033196 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033197 "style": "A String", # The style of the border.
33198 },
33199 },
33200 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
33201 },
33202 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
33203 #
33204 # When writing, the new format will be merged with the existing format.
33205 "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 -070033206 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
33207 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070033208 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
33209 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033210 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033211 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033212 },
33213 "textDirection": "A String", # The direction of the text in the cell.
33214 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
33215 # When updating padding, every field must be specified.
33216 "top": 42, # The top padding of the cell.
33217 "right": 42, # The right padding of the cell.
33218 "bottom": 42, # The bottom padding of the cell.
33219 "left": 42, # The left padding of the cell.
33220 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033221 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033222 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
33223 # for simplicity of conversion to/from color representations in various
33224 # languages over compactness; for example, the fields of this representation
33225 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33226 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33227 # method in iOS; and, with just a little work, it can be easily formatted into
33228 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33229 #
33230 # Example (Java):
33231 #
33232 # import com.google.type.Color;
33233 #
33234 # // ...
33235 # public static java.awt.Color fromProto(Color protocolor) {
33236 # float alpha = protocolor.hasAlpha()
33237 # ? protocolor.getAlpha().getValue()
33238 # : 1.0;
33239 #
33240 # return new java.awt.Color(
33241 # protocolor.getRed(),
33242 # protocolor.getGreen(),
33243 # protocolor.getBlue(),
33244 # alpha);
33245 # }
33246 #
33247 # public static Color toProto(java.awt.Color color) {
33248 # float red = (float) color.getRed();
33249 # float green = (float) color.getGreen();
33250 # float blue = (float) color.getBlue();
33251 # float denominator = 255.0;
33252 # Color.Builder resultBuilder =
33253 # Color
33254 # .newBuilder()
33255 # .setRed(red / denominator)
33256 # .setGreen(green / denominator)
33257 # .setBlue(blue / denominator);
33258 # int alpha = color.getAlpha();
33259 # if (alpha != 255) {
33260 # result.setAlpha(
33261 # FloatValue
33262 # .newBuilder()
33263 # .setValue(((float) alpha) / denominator)
33264 # .build());
33265 # }
33266 # return resultBuilder.build();
33267 # }
33268 # // ...
33269 #
33270 # Example (iOS / Obj-C):
33271 #
33272 # // ...
33273 # static UIColor* fromProto(Color* protocolor) {
33274 # float red = [protocolor red];
33275 # float green = [protocolor green];
33276 # float blue = [protocolor blue];
33277 # FloatValue* alpha_wrapper = [protocolor alpha];
33278 # float alpha = 1.0;
33279 # if (alpha_wrapper != nil) {
33280 # alpha = [alpha_wrapper value];
33281 # }
33282 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33283 # }
33284 #
33285 # static Color* toProto(UIColor* color) {
33286 # CGFloat red, green, blue, alpha;
33287 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33288 # return nil;
33289 # }
33290 # Color* result = [Color alloc] init];
33291 # [result setRed:red];
33292 # [result setGreen:green];
33293 # [result setBlue:blue];
33294 # if (alpha <= 0.9999) {
33295 # [result setAlpha:floatWrapperWithValue(alpha)];
33296 # }
33297 # [result autorelease];
33298 # return result;
33299 # }
33300 # // ...
33301 #
33302 # Example (JavaScript):
33303 #
33304 # // ...
33305 #
33306 # var protoToCssColor = function(rgb_color) {
33307 # var redFrac = rgb_color.red || 0.0;
33308 # var greenFrac = rgb_color.green || 0.0;
33309 # var blueFrac = rgb_color.blue || 0.0;
33310 # var red = Math.floor(redFrac * 255);
33311 # var green = Math.floor(greenFrac * 255);
33312 # var blue = Math.floor(blueFrac * 255);
33313 #
33314 # if (!('alpha' in rgb_color)) {
33315 # return rgbToCssColor_(red, green, blue);
33316 # }
33317 #
33318 # var alphaFrac = rgb_color.alpha.value || 0.0;
33319 # var rgbParams = [red, green, blue].join(',');
33320 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33321 # };
33322 #
33323 # var rgbToCssColor_ = function(red, green, blue) {
33324 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33325 # var hexString = rgbNumber.toString(16);
33326 # var missingZeros = 6 - hexString.length;
33327 # var resultBuilder = ['#'];
33328 # for (var i = 0; i < missingZeros; i++) {
33329 # resultBuilder.push('0');
33330 # }
33331 # resultBuilder.push(hexString);
33332 # return resultBuilder.join('');
33333 # };
33334 #
33335 # // ...
33336 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33337 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33338 # the final pixel color is defined by the equation:
33339 #
33340 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33341 #
33342 # This means that a value of 1.0 corresponds to a solid color, whereas
33343 # a value of 0.0 corresponds to a completely transparent color. This
33344 # uses a wrapper message rather than a simple float scalar so that it is
33345 # possible to distinguish between a default value and the value being unset.
33346 # If omitted, this color object is to be rendered as a solid color
33347 # (as if the alpha value had been explicitly given with a value of 1.0).
33348 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33349 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33350 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033351 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033352 "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).
33353 # Absent values indicate that the field isn't specified.
33354 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
33355 # for simplicity of conversion to/from color representations in various
33356 # languages over compactness; for example, the fields of this representation
33357 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33358 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33359 # method in iOS; and, with just a little work, it can be easily formatted into
33360 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33361 #
33362 # Example (Java):
33363 #
33364 # import com.google.type.Color;
33365 #
33366 # // ...
33367 # public static java.awt.Color fromProto(Color protocolor) {
33368 # float alpha = protocolor.hasAlpha()
33369 # ? protocolor.getAlpha().getValue()
33370 # : 1.0;
33371 #
33372 # return new java.awt.Color(
33373 # protocolor.getRed(),
33374 # protocolor.getGreen(),
33375 # protocolor.getBlue(),
33376 # alpha);
33377 # }
33378 #
33379 # public static Color toProto(java.awt.Color color) {
33380 # float red = (float) color.getRed();
33381 # float green = (float) color.getGreen();
33382 # float blue = (float) color.getBlue();
33383 # float denominator = 255.0;
33384 # Color.Builder resultBuilder =
33385 # Color
33386 # .newBuilder()
33387 # .setRed(red / denominator)
33388 # .setGreen(green / denominator)
33389 # .setBlue(blue / denominator);
33390 # int alpha = color.getAlpha();
33391 # if (alpha != 255) {
33392 # result.setAlpha(
33393 # FloatValue
33394 # .newBuilder()
33395 # .setValue(((float) alpha) / denominator)
33396 # .build());
33397 # }
33398 # return resultBuilder.build();
33399 # }
33400 # // ...
33401 #
33402 # Example (iOS / Obj-C):
33403 #
33404 # // ...
33405 # static UIColor* fromProto(Color* protocolor) {
33406 # float red = [protocolor red];
33407 # float green = [protocolor green];
33408 # float blue = [protocolor blue];
33409 # FloatValue* alpha_wrapper = [protocolor alpha];
33410 # float alpha = 1.0;
33411 # if (alpha_wrapper != nil) {
33412 # alpha = [alpha_wrapper value];
33413 # }
33414 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33415 # }
33416 #
33417 # static Color* toProto(UIColor* color) {
33418 # CGFloat red, green, blue, alpha;
33419 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33420 # return nil;
33421 # }
33422 # Color* result = [Color alloc] init];
33423 # [result setRed:red];
33424 # [result setGreen:green];
33425 # [result setBlue:blue];
33426 # if (alpha <= 0.9999) {
33427 # [result setAlpha:floatWrapperWithValue(alpha)];
33428 # }
33429 # [result autorelease];
33430 # return result;
33431 # }
33432 # // ...
33433 #
33434 # Example (JavaScript):
33435 #
33436 # // ...
33437 #
33438 # var protoToCssColor = function(rgb_color) {
33439 # var redFrac = rgb_color.red || 0.0;
33440 # var greenFrac = rgb_color.green || 0.0;
33441 # var blueFrac = rgb_color.blue || 0.0;
33442 # var red = Math.floor(redFrac * 255);
33443 # var green = Math.floor(greenFrac * 255);
33444 # var blue = Math.floor(blueFrac * 255);
33445 #
33446 # if (!('alpha' in rgb_color)) {
33447 # return rgbToCssColor_(red, green, blue);
33448 # }
33449 #
33450 # var alphaFrac = rgb_color.alpha.value || 0.0;
33451 # var rgbParams = [red, green, blue].join(',');
33452 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33453 # };
33454 #
33455 # var rgbToCssColor_ = function(red, green, blue) {
33456 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33457 # var hexString = rgbNumber.toString(16);
33458 # var missingZeros = 6 - hexString.length;
33459 # var resultBuilder = ['#'];
33460 # for (var i = 0; i < missingZeros; i++) {
33461 # resultBuilder.push('0');
33462 # }
33463 # resultBuilder.push(hexString);
33464 # return resultBuilder.join('');
33465 # };
33466 #
33467 # // ...
33468 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33469 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33470 # the final pixel color is defined by the equation:
33471 #
33472 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33473 #
33474 # This means that a value of 1.0 corresponds to a solid color, whereas
33475 # a value of 0.0 corresponds to a completely transparent color. This
33476 # uses a wrapper message rather than a simple float scalar so that it is
33477 # possible to distinguish between a default value and the value being unset.
33478 # If omitted, this color object is to be rendered as a solid color
33479 # (as if the alpha value had been explicitly given with a value of 1.0).
33480 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33481 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33482 },
33483 "bold": True or False, # True if the text is bold.
33484 "strikethrough": True or False, # True if the text has a strikethrough.
33485 "fontFamily": "A String", # The font family.
33486 "fontSize": 42, # The size of the font.
33487 "italic": True or False, # True if the text is italicized.
33488 "underline": True or False, # True if the text is underlined.
33489 },
33490 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
33491 "borders": { # The borders of the cell. # The borders of the cell.
33492 "top": { # A border along a cell. # The top border of the cell.
33493 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33494 # for simplicity of conversion to/from color representations in various
33495 # languages over compactness; for example, the fields of this representation
33496 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33497 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33498 # method in iOS; and, with just a little work, it can be easily formatted into
33499 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33500 #
33501 # Example (Java):
33502 #
33503 # import com.google.type.Color;
33504 #
33505 # // ...
33506 # public static java.awt.Color fromProto(Color protocolor) {
33507 # float alpha = protocolor.hasAlpha()
33508 # ? protocolor.getAlpha().getValue()
33509 # : 1.0;
33510 #
33511 # return new java.awt.Color(
33512 # protocolor.getRed(),
33513 # protocolor.getGreen(),
33514 # protocolor.getBlue(),
33515 # alpha);
33516 # }
33517 #
33518 # public static Color toProto(java.awt.Color color) {
33519 # float red = (float) color.getRed();
33520 # float green = (float) color.getGreen();
33521 # float blue = (float) color.getBlue();
33522 # float denominator = 255.0;
33523 # Color.Builder resultBuilder =
33524 # Color
33525 # .newBuilder()
33526 # .setRed(red / denominator)
33527 # .setGreen(green / denominator)
33528 # .setBlue(blue / denominator);
33529 # int alpha = color.getAlpha();
33530 # if (alpha != 255) {
33531 # result.setAlpha(
33532 # FloatValue
33533 # .newBuilder()
33534 # .setValue(((float) alpha) / denominator)
33535 # .build());
33536 # }
33537 # return resultBuilder.build();
33538 # }
33539 # // ...
33540 #
33541 # Example (iOS / Obj-C):
33542 #
33543 # // ...
33544 # static UIColor* fromProto(Color* protocolor) {
33545 # float red = [protocolor red];
33546 # float green = [protocolor green];
33547 # float blue = [protocolor blue];
33548 # FloatValue* alpha_wrapper = [protocolor alpha];
33549 # float alpha = 1.0;
33550 # if (alpha_wrapper != nil) {
33551 # alpha = [alpha_wrapper value];
33552 # }
33553 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33554 # }
33555 #
33556 # static Color* toProto(UIColor* color) {
33557 # CGFloat red, green, blue, alpha;
33558 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33559 # return nil;
33560 # }
33561 # Color* result = [Color alloc] init];
33562 # [result setRed:red];
33563 # [result setGreen:green];
33564 # [result setBlue:blue];
33565 # if (alpha <= 0.9999) {
33566 # [result setAlpha:floatWrapperWithValue(alpha)];
33567 # }
33568 # [result autorelease];
33569 # return result;
33570 # }
33571 # // ...
33572 #
33573 # Example (JavaScript):
33574 #
33575 # // ...
33576 #
33577 # var protoToCssColor = function(rgb_color) {
33578 # var redFrac = rgb_color.red || 0.0;
33579 # var greenFrac = rgb_color.green || 0.0;
33580 # var blueFrac = rgb_color.blue || 0.0;
33581 # var red = Math.floor(redFrac * 255);
33582 # var green = Math.floor(greenFrac * 255);
33583 # var blue = Math.floor(blueFrac * 255);
33584 #
33585 # if (!('alpha' in rgb_color)) {
33586 # return rgbToCssColor_(red, green, blue);
33587 # }
33588 #
33589 # var alphaFrac = rgb_color.alpha.value || 0.0;
33590 # var rgbParams = [red, green, blue].join(',');
33591 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33592 # };
33593 #
33594 # var rgbToCssColor_ = function(red, green, blue) {
33595 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33596 # var hexString = rgbNumber.toString(16);
33597 # var missingZeros = 6 - hexString.length;
33598 # var resultBuilder = ['#'];
33599 # for (var i = 0; i < missingZeros; i++) {
33600 # resultBuilder.push('0');
33601 # }
33602 # resultBuilder.push(hexString);
33603 # return resultBuilder.join('');
33604 # };
33605 #
33606 # // ...
33607 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33608 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33609 # the final pixel color is defined by the equation:
33610 #
33611 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33612 #
33613 # This means that a value of 1.0 corresponds to a solid color, whereas
33614 # a value of 0.0 corresponds to a completely transparent color. This
33615 # uses a wrapper message rather than a simple float scalar so that it is
33616 # possible to distinguish between a default value and the value being unset.
33617 # If omitted, this color object is to be rendered as a solid color
33618 # (as if the alpha value had been explicitly given with a value of 1.0).
33619 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33620 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33621 },
33622 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033623 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033624 "style": "A String", # The style of the border.
33625 },
33626 "right": { # A border along a cell. # The right border of the cell.
33627 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33628 # for simplicity of conversion to/from color representations in various
33629 # languages over compactness; for example, the fields of this representation
33630 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33631 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33632 # method in iOS; and, with just a little work, it can be easily formatted into
33633 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33634 #
33635 # Example (Java):
33636 #
33637 # import com.google.type.Color;
33638 #
33639 # // ...
33640 # public static java.awt.Color fromProto(Color protocolor) {
33641 # float alpha = protocolor.hasAlpha()
33642 # ? protocolor.getAlpha().getValue()
33643 # : 1.0;
33644 #
33645 # return new java.awt.Color(
33646 # protocolor.getRed(),
33647 # protocolor.getGreen(),
33648 # protocolor.getBlue(),
33649 # alpha);
33650 # }
33651 #
33652 # public static Color toProto(java.awt.Color color) {
33653 # float red = (float) color.getRed();
33654 # float green = (float) color.getGreen();
33655 # float blue = (float) color.getBlue();
33656 # float denominator = 255.0;
33657 # Color.Builder resultBuilder =
33658 # Color
33659 # .newBuilder()
33660 # .setRed(red / denominator)
33661 # .setGreen(green / denominator)
33662 # .setBlue(blue / denominator);
33663 # int alpha = color.getAlpha();
33664 # if (alpha != 255) {
33665 # result.setAlpha(
33666 # FloatValue
33667 # .newBuilder()
33668 # .setValue(((float) alpha) / denominator)
33669 # .build());
33670 # }
33671 # return resultBuilder.build();
33672 # }
33673 # // ...
33674 #
33675 # Example (iOS / Obj-C):
33676 #
33677 # // ...
33678 # static UIColor* fromProto(Color* protocolor) {
33679 # float red = [protocolor red];
33680 # float green = [protocolor green];
33681 # float blue = [protocolor blue];
33682 # FloatValue* alpha_wrapper = [protocolor alpha];
33683 # float alpha = 1.0;
33684 # if (alpha_wrapper != nil) {
33685 # alpha = [alpha_wrapper value];
33686 # }
33687 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33688 # }
33689 #
33690 # static Color* toProto(UIColor* color) {
33691 # CGFloat red, green, blue, alpha;
33692 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33693 # return nil;
33694 # }
33695 # Color* result = [Color alloc] init];
33696 # [result setRed:red];
33697 # [result setGreen:green];
33698 # [result setBlue:blue];
33699 # if (alpha <= 0.9999) {
33700 # [result setAlpha:floatWrapperWithValue(alpha)];
33701 # }
33702 # [result autorelease];
33703 # return result;
33704 # }
33705 # // ...
33706 #
33707 # Example (JavaScript):
33708 #
33709 # // ...
33710 #
33711 # var protoToCssColor = function(rgb_color) {
33712 # var redFrac = rgb_color.red || 0.0;
33713 # var greenFrac = rgb_color.green || 0.0;
33714 # var blueFrac = rgb_color.blue || 0.0;
33715 # var red = Math.floor(redFrac * 255);
33716 # var green = Math.floor(greenFrac * 255);
33717 # var blue = Math.floor(blueFrac * 255);
33718 #
33719 # if (!('alpha' in rgb_color)) {
33720 # return rgbToCssColor_(red, green, blue);
33721 # }
33722 #
33723 # var alphaFrac = rgb_color.alpha.value || 0.0;
33724 # var rgbParams = [red, green, blue].join(',');
33725 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33726 # };
33727 #
33728 # var rgbToCssColor_ = function(red, green, blue) {
33729 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33730 # var hexString = rgbNumber.toString(16);
33731 # var missingZeros = 6 - hexString.length;
33732 # var resultBuilder = ['#'];
33733 # for (var i = 0; i < missingZeros; i++) {
33734 # resultBuilder.push('0');
33735 # }
33736 # resultBuilder.push(hexString);
33737 # return resultBuilder.join('');
33738 # };
33739 #
33740 # // ...
33741 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33742 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33743 # the final pixel color is defined by the equation:
33744 #
33745 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33746 #
33747 # This means that a value of 1.0 corresponds to a solid color, whereas
33748 # a value of 0.0 corresponds to a completely transparent color. This
33749 # uses a wrapper message rather than a simple float scalar so that it is
33750 # possible to distinguish between a default value and the value being unset.
33751 # If omitted, this color object is to be rendered as a solid color
33752 # (as if the alpha value had been explicitly given with a value of 1.0).
33753 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33754 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33755 },
33756 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033757 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033758 "style": "A String", # The style of the border.
33759 },
33760 "bottom": { # A border along a cell. # The bottom border of the cell.
33761 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33762 # for simplicity of conversion to/from color representations in various
33763 # languages over compactness; for example, the fields of this representation
33764 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33765 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33766 # method in iOS; and, with just a little work, it can be easily formatted into
33767 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33768 #
33769 # Example (Java):
33770 #
33771 # import com.google.type.Color;
33772 #
33773 # // ...
33774 # public static java.awt.Color fromProto(Color protocolor) {
33775 # float alpha = protocolor.hasAlpha()
33776 # ? protocolor.getAlpha().getValue()
33777 # : 1.0;
33778 #
33779 # return new java.awt.Color(
33780 # protocolor.getRed(),
33781 # protocolor.getGreen(),
33782 # protocolor.getBlue(),
33783 # alpha);
33784 # }
33785 #
33786 # public static Color toProto(java.awt.Color color) {
33787 # float red = (float) color.getRed();
33788 # float green = (float) color.getGreen();
33789 # float blue = (float) color.getBlue();
33790 # float denominator = 255.0;
33791 # Color.Builder resultBuilder =
33792 # Color
33793 # .newBuilder()
33794 # .setRed(red / denominator)
33795 # .setGreen(green / denominator)
33796 # .setBlue(blue / denominator);
33797 # int alpha = color.getAlpha();
33798 # if (alpha != 255) {
33799 # result.setAlpha(
33800 # FloatValue
33801 # .newBuilder()
33802 # .setValue(((float) alpha) / denominator)
33803 # .build());
33804 # }
33805 # return resultBuilder.build();
33806 # }
33807 # // ...
33808 #
33809 # Example (iOS / Obj-C):
33810 #
33811 # // ...
33812 # static UIColor* fromProto(Color* protocolor) {
33813 # float red = [protocolor red];
33814 # float green = [protocolor green];
33815 # float blue = [protocolor blue];
33816 # FloatValue* alpha_wrapper = [protocolor alpha];
33817 # float alpha = 1.0;
33818 # if (alpha_wrapper != nil) {
33819 # alpha = [alpha_wrapper value];
33820 # }
33821 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33822 # }
33823 #
33824 # static Color* toProto(UIColor* color) {
33825 # CGFloat red, green, blue, alpha;
33826 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33827 # return nil;
33828 # }
33829 # Color* result = [Color alloc] init];
33830 # [result setRed:red];
33831 # [result setGreen:green];
33832 # [result setBlue:blue];
33833 # if (alpha <= 0.9999) {
33834 # [result setAlpha:floatWrapperWithValue(alpha)];
33835 # }
33836 # [result autorelease];
33837 # return result;
33838 # }
33839 # // ...
33840 #
33841 # Example (JavaScript):
33842 #
33843 # // ...
33844 #
33845 # var protoToCssColor = function(rgb_color) {
33846 # var redFrac = rgb_color.red || 0.0;
33847 # var greenFrac = rgb_color.green || 0.0;
33848 # var blueFrac = rgb_color.blue || 0.0;
33849 # var red = Math.floor(redFrac * 255);
33850 # var green = Math.floor(greenFrac * 255);
33851 # var blue = Math.floor(blueFrac * 255);
33852 #
33853 # if (!('alpha' in rgb_color)) {
33854 # return rgbToCssColor_(red, green, blue);
33855 # }
33856 #
33857 # var alphaFrac = rgb_color.alpha.value || 0.0;
33858 # var rgbParams = [red, green, blue].join(',');
33859 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33860 # };
33861 #
33862 # var rgbToCssColor_ = function(red, green, blue) {
33863 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33864 # var hexString = rgbNumber.toString(16);
33865 # var missingZeros = 6 - hexString.length;
33866 # var resultBuilder = ['#'];
33867 # for (var i = 0; i < missingZeros; i++) {
33868 # resultBuilder.push('0');
33869 # }
33870 # resultBuilder.push(hexString);
33871 # return resultBuilder.join('');
33872 # };
33873 #
33874 # // ...
33875 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33876 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33877 # the final pixel color is defined by the equation:
33878 #
33879 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33880 #
33881 # This means that a value of 1.0 corresponds to a solid color, whereas
33882 # a value of 0.0 corresponds to a completely transparent color. This
33883 # uses a wrapper message rather than a simple float scalar so that it is
33884 # possible to distinguish between a default value and the value being unset.
33885 # If omitted, this color object is to be rendered as a solid color
33886 # (as if the alpha value had been explicitly given with a value of 1.0).
33887 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33888 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33889 },
33890 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070033891 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070033892 "style": "A String", # The style of the border.
33893 },
33894 "left": { # A border along a cell. # The left border of the cell.
33895 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33896 # for simplicity of conversion to/from color representations in various
33897 # languages over compactness; for example, the fields of this representation
33898 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33899 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33900 # method in iOS; and, with just a little work, it can be easily formatted into
33901 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33902 #
33903 # Example (Java):
33904 #
33905 # import com.google.type.Color;
33906 #
33907 # // ...
33908 # public static java.awt.Color fromProto(Color protocolor) {
33909 # float alpha = protocolor.hasAlpha()
33910 # ? protocolor.getAlpha().getValue()
33911 # : 1.0;
33912 #
33913 # return new java.awt.Color(
33914 # protocolor.getRed(),
33915 # protocolor.getGreen(),
33916 # protocolor.getBlue(),
33917 # alpha);
33918 # }
33919 #
33920 # public static Color toProto(java.awt.Color color) {
33921 # float red = (float) color.getRed();
33922 # float green = (float) color.getGreen();
33923 # float blue = (float) color.getBlue();
33924 # float denominator = 255.0;
33925 # Color.Builder resultBuilder =
33926 # Color
33927 # .newBuilder()
33928 # .setRed(red / denominator)
33929 # .setGreen(green / denominator)
33930 # .setBlue(blue / denominator);
33931 # int alpha = color.getAlpha();
33932 # if (alpha != 255) {
33933 # result.setAlpha(
33934 # FloatValue
33935 # .newBuilder()
33936 # .setValue(((float) alpha) / denominator)
33937 # .build());
33938 # }
33939 # return resultBuilder.build();
33940 # }
33941 # // ...
33942 #
33943 # Example (iOS / Obj-C):
33944 #
33945 # // ...
33946 # static UIColor* fromProto(Color* protocolor) {
33947 # float red = [protocolor red];
33948 # float green = [protocolor green];
33949 # float blue = [protocolor blue];
33950 # FloatValue* alpha_wrapper = [protocolor alpha];
33951 # float alpha = 1.0;
33952 # if (alpha_wrapper != nil) {
33953 # alpha = [alpha_wrapper value];
33954 # }
33955 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33956 # }
33957 #
33958 # static Color* toProto(UIColor* color) {
33959 # CGFloat red, green, blue, alpha;
33960 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33961 # return nil;
33962 # }
33963 # Color* result = [Color alloc] init];
33964 # [result setRed:red];
33965 # [result setGreen:green];
33966 # [result setBlue:blue];
33967 # if (alpha <= 0.9999) {
33968 # [result setAlpha:floatWrapperWithValue(alpha)];
33969 # }
33970 # [result autorelease];
33971 # return result;
33972 # }
33973 # // ...
33974 #
33975 # Example (JavaScript):
33976 #
33977 # // ...
33978 #
33979 # var protoToCssColor = function(rgb_color) {
33980 # var redFrac = rgb_color.red || 0.0;
33981 # var greenFrac = rgb_color.green || 0.0;
33982 # var blueFrac = rgb_color.blue || 0.0;
33983 # var red = Math.floor(redFrac * 255);
33984 # var green = Math.floor(greenFrac * 255);
33985 # var blue = Math.floor(blueFrac * 255);
33986 #
33987 # if (!('alpha' in rgb_color)) {
33988 # return rgbToCssColor_(red, green, blue);
33989 # }
33990 #
33991 # var alphaFrac = rgb_color.alpha.value || 0.0;
33992 # var rgbParams = [red, green, blue].join(',');
33993 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33994 # };
33995 #
33996 # var rgbToCssColor_ = function(red, green, blue) {
33997 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33998 # var hexString = rgbNumber.toString(16);
33999 # var missingZeros = 6 - hexString.length;
34000 # var resultBuilder = ['#'];
34001 # for (var i = 0; i < missingZeros; i++) {
34002 # resultBuilder.push('0');
34003 # }
34004 # resultBuilder.push(hexString);
34005 # return resultBuilder.join('');
34006 # };
34007 #
34008 # // ...
34009 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34010 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34011 # the final pixel color is defined by the equation:
34012 #
34013 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34014 #
34015 # This means that a value of 1.0 corresponds to a solid color, whereas
34016 # a value of 0.0 corresponds to a completely transparent color. This
34017 # uses a wrapper message rather than a simple float scalar so that it is
34018 # possible to distinguish between a default value and the value being unset.
34019 # If omitted, this color object is to be rendered as a solid color
34020 # (as if the alpha value had been explicitly given with a value of 1.0).
34021 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34022 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34023 },
34024 "width": 42, # The width of the border, in pixels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034025 # Border widths must be between 0 and 3 pixels, inclusive.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034026 "style": "A String", # The style of the border.
34027 },
34028 },
34029 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
34030 },
34031 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
34032 #
34033 # When writing, the new data validation rule will overwrite any prior rule.
34034 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
34035 # If true, "List" conditions will show a dropdown.
34036 "strict": True or False, # True if invalid data should be rejected.
34037 "inputMessage": "A String", # A message to show the user when adding data to the cell.
34038 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
34039 # BooleanConditions are used by conditional formatting,
34040 # data validation, and the criteria in filters.
34041 "type": "A String", # The type of condition.
34042 "values": [ # The values of the condition. The number of supported values depends
34043 # on the condition type. Some support zero values,
34044 # others one or two values,
34045 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
34046 { # The value of the condition.
34047 "relativeDate": "A String", # A relative date (based on the current date).
34048 # Valid only if the type is
34049 # DATE_BEFORE,
34050 # DATE_AFTER,
34051 # DATE_ON_OR_BEFORE or
34052 # DATE_ON_OR_AFTER.
34053 #
34054 # Relative dates are not supported in data validation.
34055 # They are supported only in conditional formatting and
34056 # conditional filters.
34057 "userEnteredValue": "A String", # A value the condition is based on.
34058 # The value will be parsed as if the user typed into a cell.
34059 # Formulas are supported (and must begin with an `=`).
34060 },
34061 ],
34062 },
34063 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034064 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
34065 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034066 # Runs start at specific indexes in the text and continue until the next
34067 # run. Properties of a run will continue unless explicitly changed
34068 # in a subsequent run (and properties of the first run will continue
34069 # the properties of the cell unless explicitly changed).
34070 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034071 # When writing, the new runs will overwrite any prior runs. When writing a
34072 # new user_entered_value, previous runs will be erased.
34073 { # A run of a text format. The format of this run continues until the start
34074 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034075 # When updating, all fields must be set.
34076 "startIndex": 42, # The character index where this run starts.
34077 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
34078 # Absent values indicate that the field isn't specified.
34079 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
34080 # for simplicity of conversion to/from color representations in various
34081 # languages over compactness; for example, the fields of this representation
34082 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34083 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34084 # method in iOS; and, with just a little work, it can be easily formatted into
34085 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34086 #
34087 # Example (Java):
34088 #
34089 # import com.google.type.Color;
34090 #
34091 # // ...
34092 # public static java.awt.Color fromProto(Color protocolor) {
34093 # float alpha = protocolor.hasAlpha()
34094 # ? protocolor.getAlpha().getValue()
34095 # : 1.0;
34096 #
34097 # return new java.awt.Color(
34098 # protocolor.getRed(),
34099 # protocolor.getGreen(),
34100 # protocolor.getBlue(),
34101 # alpha);
34102 # }
34103 #
34104 # public static Color toProto(java.awt.Color color) {
34105 # float red = (float) color.getRed();
34106 # float green = (float) color.getGreen();
34107 # float blue = (float) color.getBlue();
34108 # float denominator = 255.0;
34109 # Color.Builder resultBuilder =
34110 # Color
34111 # .newBuilder()
34112 # .setRed(red / denominator)
34113 # .setGreen(green / denominator)
34114 # .setBlue(blue / denominator);
34115 # int alpha = color.getAlpha();
34116 # if (alpha != 255) {
34117 # result.setAlpha(
34118 # FloatValue
34119 # .newBuilder()
34120 # .setValue(((float) alpha) / denominator)
34121 # .build());
34122 # }
34123 # return resultBuilder.build();
34124 # }
34125 # // ...
34126 #
34127 # Example (iOS / Obj-C):
34128 #
34129 # // ...
34130 # static UIColor* fromProto(Color* protocolor) {
34131 # float red = [protocolor red];
34132 # float green = [protocolor green];
34133 # float blue = [protocolor blue];
34134 # FloatValue* alpha_wrapper = [protocolor alpha];
34135 # float alpha = 1.0;
34136 # if (alpha_wrapper != nil) {
34137 # alpha = [alpha_wrapper value];
34138 # }
34139 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34140 # }
34141 #
34142 # static Color* toProto(UIColor* color) {
34143 # CGFloat red, green, blue, alpha;
34144 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34145 # return nil;
34146 # }
34147 # Color* result = [Color alloc] init];
34148 # [result setRed:red];
34149 # [result setGreen:green];
34150 # [result setBlue:blue];
34151 # if (alpha <= 0.9999) {
34152 # [result setAlpha:floatWrapperWithValue(alpha)];
34153 # }
34154 # [result autorelease];
34155 # return result;
34156 # }
34157 # // ...
34158 #
34159 # Example (JavaScript):
34160 #
34161 # // ...
34162 #
34163 # var protoToCssColor = function(rgb_color) {
34164 # var redFrac = rgb_color.red || 0.0;
34165 # var greenFrac = rgb_color.green || 0.0;
34166 # var blueFrac = rgb_color.blue || 0.0;
34167 # var red = Math.floor(redFrac * 255);
34168 # var green = Math.floor(greenFrac * 255);
34169 # var blue = Math.floor(blueFrac * 255);
34170 #
34171 # if (!('alpha' in rgb_color)) {
34172 # return rgbToCssColor_(red, green, blue);
34173 # }
34174 #
34175 # var alphaFrac = rgb_color.alpha.value || 0.0;
34176 # var rgbParams = [red, green, blue].join(',');
34177 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34178 # };
34179 #
34180 # var rgbToCssColor_ = function(red, green, blue) {
34181 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34182 # var hexString = rgbNumber.toString(16);
34183 # var missingZeros = 6 - hexString.length;
34184 # var resultBuilder = ['#'];
34185 # for (var i = 0; i < missingZeros; i++) {
34186 # resultBuilder.push('0');
34187 # }
34188 # resultBuilder.push(hexString);
34189 # return resultBuilder.join('');
34190 # };
34191 #
34192 # // ...
34193 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34194 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34195 # the final pixel color is defined by the equation:
34196 #
34197 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34198 #
34199 # This means that a value of 1.0 corresponds to a solid color, whereas
34200 # a value of 0.0 corresponds to a completely transparent color. This
34201 # uses a wrapper message rather than a simple float scalar so that it is
34202 # possible to distinguish between a default value and the value being unset.
34203 # If omitted, this color object is to be rendered as a solid color
34204 # (as if the alpha value had been explicitly given with a value of 1.0).
34205 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34206 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34207 },
34208 "bold": True or False, # True if the text is bold.
34209 "strikethrough": True or False, # True if the text has a strikethrough.
34210 "fontFamily": "A String", # The font family.
34211 "fontSize": 42, # The size of the font.
34212 "italic": True or False, # True if the text is italicized.
34213 "underline": True or False, # True if the text is underlined.
34214 },
34215 },
34216 ],
34217 },
34218 ],
34219 },
34220 ],
34221 },
34222 ],
34223 "properties": { # Properties of a sheet. # The properties of the sheet.
34224 "sheetType": "A String", # The type of sheet. Defaults to GRID.
34225 # This field cannot be changed once set.
34226 "index": 42, # The index of the sheet within the spreadsheet.
34227 # When adding or updating sheet properties, if this field
34228 # is excluded then the sheet will be added or moved to the end
34229 # of the sheet list.
34230 "title": "A String", # The name of the sheet.
34231 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
34232 # (If the sheet is an object sheet, containing a chart or image, then
34233 # this field will be absent.)
34234 # When writing it is an error to set any grid properties on non-grid sheets.
34235 "columnCount": 42, # The number of columns in the grid.
34236 "rowCount": 42, # The number of rows in the grid.
34237 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
34238 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
34239 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
34240 },
34241 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
34242 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
34243 # for simplicity of conversion to/from color representations in various
34244 # languages over compactness; for example, the fields of this representation
34245 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34246 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34247 # method in iOS; and, with just a little work, it can be easily formatted into
34248 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34249 #
34250 # Example (Java):
34251 #
34252 # import com.google.type.Color;
34253 #
34254 # // ...
34255 # public static java.awt.Color fromProto(Color protocolor) {
34256 # float alpha = protocolor.hasAlpha()
34257 # ? protocolor.getAlpha().getValue()
34258 # : 1.0;
34259 #
34260 # return new java.awt.Color(
34261 # protocolor.getRed(),
34262 # protocolor.getGreen(),
34263 # protocolor.getBlue(),
34264 # alpha);
34265 # }
34266 #
34267 # public static Color toProto(java.awt.Color color) {
34268 # float red = (float) color.getRed();
34269 # float green = (float) color.getGreen();
34270 # float blue = (float) color.getBlue();
34271 # float denominator = 255.0;
34272 # Color.Builder resultBuilder =
34273 # Color
34274 # .newBuilder()
34275 # .setRed(red / denominator)
34276 # .setGreen(green / denominator)
34277 # .setBlue(blue / denominator);
34278 # int alpha = color.getAlpha();
34279 # if (alpha != 255) {
34280 # result.setAlpha(
34281 # FloatValue
34282 # .newBuilder()
34283 # .setValue(((float) alpha) / denominator)
34284 # .build());
34285 # }
34286 # return resultBuilder.build();
34287 # }
34288 # // ...
34289 #
34290 # Example (iOS / Obj-C):
34291 #
34292 # // ...
34293 # static UIColor* fromProto(Color* protocolor) {
34294 # float red = [protocolor red];
34295 # float green = [protocolor green];
34296 # float blue = [protocolor blue];
34297 # FloatValue* alpha_wrapper = [protocolor alpha];
34298 # float alpha = 1.0;
34299 # if (alpha_wrapper != nil) {
34300 # alpha = [alpha_wrapper value];
34301 # }
34302 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34303 # }
34304 #
34305 # static Color* toProto(UIColor* color) {
34306 # CGFloat red, green, blue, alpha;
34307 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34308 # return nil;
34309 # }
34310 # Color* result = [Color alloc] init];
34311 # [result setRed:red];
34312 # [result setGreen:green];
34313 # [result setBlue:blue];
34314 # if (alpha <= 0.9999) {
34315 # [result setAlpha:floatWrapperWithValue(alpha)];
34316 # }
34317 # [result autorelease];
34318 # return result;
34319 # }
34320 # // ...
34321 #
34322 # Example (JavaScript):
34323 #
34324 # // ...
34325 #
34326 # var protoToCssColor = function(rgb_color) {
34327 # var redFrac = rgb_color.red || 0.0;
34328 # var greenFrac = rgb_color.green || 0.0;
34329 # var blueFrac = rgb_color.blue || 0.0;
34330 # var red = Math.floor(redFrac * 255);
34331 # var green = Math.floor(greenFrac * 255);
34332 # var blue = Math.floor(blueFrac * 255);
34333 #
34334 # if (!('alpha' in rgb_color)) {
34335 # return rgbToCssColor_(red, green, blue);
34336 # }
34337 #
34338 # var alphaFrac = rgb_color.alpha.value || 0.0;
34339 # var rgbParams = [red, green, blue].join(',');
34340 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34341 # };
34342 #
34343 # var rgbToCssColor_ = function(red, green, blue) {
34344 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34345 # var hexString = rgbNumber.toString(16);
34346 # var missingZeros = 6 - hexString.length;
34347 # var resultBuilder = ['#'];
34348 # for (var i = 0; i < missingZeros; i++) {
34349 # resultBuilder.push('0');
34350 # }
34351 # resultBuilder.push(hexString);
34352 # return resultBuilder.join('');
34353 # };
34354 #
34355 # // ...
34356 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34357 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34358 # the final pixel color is defined by the equation:
34359 #
34360 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34361 #
34362 # This means that a value of 1.0 corresponds to a solid color, whereas
34363 # a value of 0.0 corresponds to a completely transparent color. This
34364 # uses a wrapper message rather than a simple float scalar so that it is
34365 # possible to distinguish between a default value and the value being unset.
34366 # If omitted, this color object is to be rendered as a solid color
34367 # (as if the alpha value had been explicitly given with a value of 1.0).
34368 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34369 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34370 },
34371 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
34372 "sheetId": 42, # The ID of the sheet. Must be non-negative.
34373 # This field cannot be changed once set.
34374 },
34375 },
34376 ],
34377 }</pre>
34378</div>
34379
34380</body></html>