blob: 0562d2648c7b05c0398cc0cae626ae0f2d7995aa [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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800125 "responseRanges": [ # Limits the ranges included in the response spreadsheet.
126 # Meaningful only if include_spreadsheet_response is 'true'.
127 "A String",
128 ],
129 "includeSpreadsheetInResponse": True or False, # Determines if the update response should include the spreadsheet
130 # resource.
131 "responseIncludeGridData": True or False, # True if grid data should be returned. Meaningful only if
132 # if include_spreadsheet_response is 'true'.
133 # This parameter is ignored if a field mask was set in the request.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700134 "requests": [ # A list of updates to apply to the spreadsheet.
135 { # A single kind of update to apply to a spreadsheet.
136 "duplicateFilterView": { # Duplicates a particular filter view. # Duplicates a filter view.
137 "filterId": 42, # The ID of the filter being duplicated.
138 },
139 "sortRange": { # Sorts data in rows based on a sort order per column. # Sorts data in a range.
140 "range": { # A range on a sheet. # The range to sort.
141 # All indexes are zero-based.
142 # Indexes are half open, e.g the start index is inclusive
143 # and the end index is exclusive -- [start_index, end_index).
144 # Missing indexes indicate the range is unbounded on that side.
145 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700146 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700147 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700148 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700149 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700150 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700151 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700152 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700153 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700154 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700155 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700156 # `Sheet1!A:B == sheet_id: 0,
157 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700158 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700159 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700160 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700161 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700162 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700163 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700164 #
165 # The start index must always be less than or equal to the end index.
166 # If the start index equals the end index, then the range is empty.
167 # Empty ranges are typically not meaningful and are usually rendered in the
168 # UI as `#REF!`.
169 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
170 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
171 "sheetId": 42, # The sheet this range is on.
172 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
173 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
174 },
175 "sortSpecs": [ # The sort order per column. Later specifications are used when values
176 # are equal in the earlier specifications.
177 { # A sort order associated with a specific column or row.
178 "sortOrder": "A String", # The order data should be sorted.
179 "dimensionIndex": 42, # The dimension the sort should be applied to.
180 },
181 ],
182 },
183 "updateEmbeddedObjectPosition": { # Update an embedded object's position (such as a moving or resizing a # Updates an embedded object's (e.g. chart, image) position.
184 # chart or image).
185 "newPosition": { # The position of an embedded object such as a chart. # An explicit position to move the embedded object to.
186 # If newPosition.sheetId is set,
187 # a new sheet with that ID will be created.
188 # If newPosition.newSheet is set to true,
189 # a new sheet will be created with an ID that will be chosen for you.
190 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
191 # is chosen for you. Used only when writing.
192 "sheetId": 42, # The sheet this is on. Set only if the embedded object
193 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700194 "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 -0700195 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
196 # All indexes are zero-based.
197 "rowIndex": 42, # The row index of the coordinate.
198 "columnIndex": 42, # The column index of the coordinate.
199 "sheetId": 42, # The sheet this coordinate is on.
200 },
201 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
202 # from the anchor cell.
203 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
204 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
205 # from the anchor cell.
206 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
207 },
208 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700209 "fields": "A String", # The fields of OverlayPosition
210 # that should be updated when setting a new position. Used only if
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700211 # newPosition.overlayPosition
212 # is set, in which case at least one field must
213 # be specified. The root `newPosition.overlayPosition` is implied and
214 # should not be specified.
215 # A single `"*"` can be used as short-hand for listing every field.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700216 "objectId": 42, # The ID of the object to moved.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700217 },
218 "updateConditionalFormatRule": { # Updates a conditional format rule at the given index, # Updates an existing conditional format rule.
219 # or moves a conditional format rule to another index.
220 "index": 42, # The zero-based index of the rule that should be replaced or moved.
221 "newIndex": 42, # The zero-based new index the rule should end up at.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700222 "sheetId": 42, # The sheet of the rule to move. Required if new_index is set,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700223 # unused otherwise.
224 "rule": { # A rule describing a conditional format. # The rule that should replace the rule at the given index.
225 "ranges": [ # The ranges that will be formatted if the condition is true.
226 # All the ranges must be on the same grid.
227 { # A range on a sheet.
228 # All indexes are zero-based.
229 # Indexes are half open, e.g the start index is inclusive
230 # and the end index is exclusive -- [start_index, end_index).
231 # Missing indexes indicate the range is unbounded on that side.
232 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700233 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700234 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700235 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700236 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700237 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700238 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700239 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700240 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700241 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700242 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700243 # `Sheet1!A:B == sheet_id: 0,
244 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700245 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700246 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700247 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700248 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700249 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700250 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700251 #
252 # The start index must always be less than or equal to the end index.
253 # If the start index equals the end index, then the range is empty.
254 # Empty ranges are typically not meaningful and are usually rendered in the
255 # UI as `#REF!`.
256 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
257 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
258 "sheetId": 42, # The sheet this range is on.
259 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
260 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
261 },
262 ],
263 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
264 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
265 # the format will be applied.
266 # BooleanConditions are used by conditional formatting,
267 # data validation, and the criteria in filters.
268 "type": "A String", # The type of condition.
269 "values": [ # The values of the condition. The number of supported values depends
270 # on the condition type. Some support zero values,
271 # others one or two values,
272 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
273 { # The value of the condition.
274 "relativeDate": "A String", # A relative date (based on the current date).
275 # Valid only if the type is
276 # DATE_BEFORE,
277 # DATE_AFTER,
278 # DATE_ON_OR_BEFORE or
279 # DATE_ON_OR_AFTER.
280 #
281 # Relative dates are not supported in data validation.
282 # They are supported only in conditional formatting and
283 # conditional filters.
284 "userEnteredValue": "A String", # A value the condition is based on.
285 # The value will be parsed as if the user typed into a cell.
286 # Formulas are supported (and must begin with an `=`).
287 },
288 ],
289 },
290 "format": { # The format of a cell. # The format to apply.
291 # Conditional formatting can only apply a subset of formatting:
292 # bold, italic,
293 # strikethrough,
294 # foreground color &
295 # background color.
296 "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 -0700297 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
298 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700299 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
300 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700301 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700302 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700303 },
304 "textDirection": "A String", # The direction of the text in the cell.
305 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
306 # When updating padding, every field must be specified.
307 "top": 42, # The top padding of the cell.
308 "right": 42, # The right padding of the cell.
309 "bottom": 42, # The bottom padding of the cell.
310 "left": 42, # The left padding of the cell.
311 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700312 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700313 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
314 # for simplicity of conversion to/from color representations in various
315 # languages over compactness; for example, the fields of this representation
316 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
317 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
318 # method in iOS; and, with just a little work, it can be easily formatted into
319 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
320 #
321 # Example (Java):
322 #
323 # import com.google.type.Color;
324 #
325 # // ...
326 # public static java.awt.Color fromProto(Color protocolor) {
327 # float alpha = protocolor.hasAlpha()
328 # ? protocolor.getAlpha().getValue()
329 # : 1.0;
330 #
331 # return new java.awt.Color(
332 # protocolor.getRed(),
333 # protocolor.getGreen(),
334 # protocolor.getBlue(),
335 # alpha);
336 # }
337 #
338 # public static Color toProto(java.awt.Color color) {
339 # float red = (float) color.getRed();
340 # float green = (float) color.getGreen();
341 # float blue = (float) color.getBlue();
342 # float denominator = 255.0;
343 # Color.Builder resultBuilder =
344 # Color
345 # .newBuilder()
346 # .setRed(red / denominator)
347 # .setGreen(green / denominator)
348 # .setBlue(blue / denominator);
349 # int alpha = color.getAlpha();
350 # if (alpha != 255) {
351 # result.setAlpha(
352 # FloatValue
353 # .newBuilder()
354 # .setValue(((float) alpha) / denominator)
355 # .build());
356 # }
357 # return resultBuilder.build();
358 # }
359 # // ...
360 #
361 # Example (iOS / Obj-C):
362 #
363 # // ...
364 # static UIColor* fromProto(Color* protocolor) {
365 # float red = [protocolor red];
366 # float green = [protocolor green];
367 # float blue = [protocolor blue];
368 # FloatValue* alpha_wrapper = [protocolor alpha];
369 # float alpha = 1.0;
370 # if (alpha_wrapper != nil) {
371 # alpha = [alpha_wrapper value];
372 # }
373 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
374 # }
375 #
376 # static Color* toProto(UIColor* color) {
377 # CGFloat red, green, blue, alpha;
378 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
379 # return nil;
380 # }
381 # Color* result = [Color alloc] init];
382 # [result setRed:red];
383 # [result setGreen:green];
384 # [result setBlue:blue];
385 # if (alpha <= 0.9999) {
386 # [result setAlpha:floatWrapperWithValue(alpha)];
387 # }
388 # [result autorelease];
389 # return result;
390 # }
391 # // ...
392 #
393 # Example (JavaScript):
394 #
395 # // ...
396 #
397 # var protoToCssColor = function(rgb_color) {
398 # var redFrac = rgb_color.red || 0.0;
399 # var greenFrac = rgb_color.green || 0.0;
400 # var blueFrac = rgb_color.blue || 0.0;
401 # var red = Math.floor(redFrac * 255);
402 # var green = Math.floor(greenFrac * 255);
403 # var blue = Math.floor(blueFrac * 255);
404 #
405 # if (!('alpha' in rgb_color)) {
406 # return rgbToCssColor_(red, green, blue);
407 # }
408 #
409 # var alphaFrac = rgb_color.alpha.value || 0.0;
410 # var rgbParams = [red, green, blue].join(',');
411 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
412 # };
413 #
414 # var rgbToCssColor_ = function(red, green, blue) {
415 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
416 # var hexString = rgbNumber.toString(16);
417 # var missingZeros = 6 - hexString.length;
418 # var resultBuilder = ['#'];
419 # for (var i = 0; i < missingZeros; i++) {
420 # resultBuilder.push('0');
421 # }
422 # resultBuilder.push(hexString);
423 # return resultBuilder.join('');
424 # };
425 #
426 # // ...
427 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
428 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
429 # the final pixel color is defined by the equation:
430 #
431 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
432 #
433 # This means that a value of 1.0 corresponds to a solid color, whereas
434 # a value of 0.0 corresponds to a completely transparent color. This
435 # uses a wrapper message rather than a simple float scalar so that it is
436 # possible to distinguish between a default value and the value being unset.
437 # If omitted, this color object is to be rendered as a solid color
438 # (as if the alpha value had been explicitly given with a value of 1.0).
439 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
440 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
441 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700442 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700443 "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).
444 # Absent values indicate that the field isn't specified.
445 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
446 # for simplicity of conversion to/from color representations in various
447 # languages over compactness; for example, the fields of this representation
448 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
449 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
450 # method in iOS; and, with just a little work, it can be easily formatted into
451 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
452 #
453 # Example (Java):
454 #
455 # import com.google.type.Color;
456 #
457 # // ...
458 # public static java.awt.Color fromProto(Color protocolor) {
459 # float alpha = protocolor.hasAlpha()
460 # ? protocolor.getAlpha().getValue()
461 # : 1.0;
462 #
463 # return new java.awt.Color(
464 # protocolor.getRed(),
465 # protocolor.getGreen(),
466 # protocolor.getBlue(),
467 # alpha);
468 # }
469 #
470 # public static Color toProto(java.awt.Color color) {
471 # float red = (float) color.getRed();
472 # float green = (float) color.getGreen();
473 # float blue = (float) color.getBlue();
474 # float denominator = 255.0;
475 # Color.Builder resultBuilder =
476 # Color
477 # .newBuilder()
478 # .setRed(red / denominator)
479 # .setGreen(green / denominator)
480 # .setBlue(blue / denominator);
481 # int alpha = color.getAlpha();
482 # if (alpha != 255) {
483 # result.setAlpha(
484 # FloatValue
485 # .newBuilder()
486 # .setValue(((float) alpha) / denominator)
487 # .build());
488 # }
489 # return resultBuilder.build();
490 # }
491 # // ...
492 #
493 # Example (iOS / Obj-C):
494 #
495 # // ...
496 # static UIColor* fromProto(Color* protocolor) {
497 # float red = [protocolor red];
498 # float green = [protocolor green];
499 # float blue = [protocolor blue];
500 # FloatValue* alpha_wrapper = [protocolor alpha];
501 # float alpha = 1.0;
502 # if (alpha_wrapper != nil) {
503 # alpha = [alpha_wrapper value];
504 # }
505 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
506 # }
507 #
508 # static Color* toProto(UIColor* color) {
509 # CGFloat red, green, blue, alpha;
510 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
511 # return nil;
512 # }
513 # Color* result = [Color alloc] init];
514 # [result setRed:red];
515 # [result setGreen:green];
516 # [result setBlue:blue];
517 # if (alpha <= 0.9999) {
518 # [result setAlpha:floatWrapperWithValue(alpha)];
519 # }
520 # [result autorelease];
521 # return result;
522 # }
523 # // ...
524 #
525 # Example (JavaScript):
526 #
527 # // ...
528 #
529 # var protoToCssColor = function(rgb_color) {
530 # var redFrac = rgb_color.red || 0.0;
531 # var greenFrac = rgb_color.green || 0.0;
532 # var blueFrac = rgb_color.blue || 0.0;
533 # var red = Math.floor(redFrac * 255);
534 # var green = Math.floor(greenFrac * 255);
535 # var blue = Math.floor(blueFrac * 255);
536 #
537 # if (!('alpha' in rgb_color)) {
538 # return rgbToCssColor_(red, green, blue);
539 # }
540 #
541 # var alphaFrac = rgb_color.alpha.value || 0.0;
542 # var rgbParams = [red, green, blue].join(',');
543 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
544 # };
545 #
546 # var rgbToCssColor_ = function(red, green, blue) {
547 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
548 # var hexString = rgbNumber.toString(16);
549 # var missingZeros = 6 - hexString.length;
550 # var resultBuilder = ['#'];
551 # for (var i = 0; i < missingZeros; i++) {
552 # resultBuilder.push('0');
553 # }
554 # resultBuilder.push(hexString);
555 # return resultBuilder.join('');
556 # };
557 #
558 # // ...
559 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
560 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
561 # the final pixel color is defined by the equation:
562 #
563 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
564 #
565 # This means that a value of 1.0 corresponds to a solid color, whereas
566 # a value of 0.0 corresponds to a completely transparent color. This
567 # uses a wrapper message rather than a simple float scalar so that it is
568 # possible to distinguish between a default value and the value being unset.
569 # If omitted, this color object is to be rendered as a solid color
570 # (as if the alpha value had been explicitly given with a value of 1.0).
571 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
572 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
573 },
574 "bold": True or False, # True if the text is bold.
575 "strikethrough": True or False, # True if the text has a strikethrough.
576 "fontFamily": "A String", # The font family.
577 "fontSize": 42, # The size of the font.
578 "italic": True or False, # True if the text is italicized.
579 "underline": True or False, # True if the text is underlined.
580 },
581 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
582 "borders": { # The borders of the cell. # The borders of the cell.
583 "top": { # A border along a cell. # The top border of the cell.
584 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
585 # for simplicity of conversion to/from color representations in various
586 # languages over compactness; for example, the fields of this representation
587 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
588 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
589 # method in iOS; and, with just a little work, it can be easily formatted into
590 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
591 #
592 # Example (Java):
593 #
594 # import com.google.type.Color;
595 #
596 # // ...
597 # public static java.awt.Color fromProto(Color protocolor) {
598 # float alpha = protocolor.hasAlpha()
599 # ? protocolor.getAlpha().getValue()
600 # : 1.0;
601 #
602 # return new java.awt.Color(
603 # protocolor.getRed(),
604 # protocolor.getGreen(),
605 # protocolor.getBlue(),
606 # alpha);
607 # }
608 #
609 # public static Color toProto(java.awt.Color color) {
610 # float red = (float) color.getRed();
611 # float green = (float) color.getGreen();
612 # float blue = (float) color.getBlue();
613 # float denominator = 255.0;
614 # Color.Builder resultBuilder =
615 # Color
616 # .newBuilder()
617 # .setRed(red / denominator)
618 # .setGreen(green / denominator)
619 # .setBlue(blue / denominator);
620 # int alpha = color.getAlpha();
621 # if (alpha != 255) {
622 # result.setAlpha(
623 # FloatValue
624 # .newBuilder()
625 # .setValue(((float) alpha) / denominator)
626 # .build());
627 # }
628 # return resultBuilder.build();
629 # }
630 # // ...
631 #
632 # Example (iOS / Obj-C):
633 #
634 # // ...
635 # static UIColor* fromProto(Color* protocolor) {
636 # float red = [protocolor red];
637 # float green = [protocolor green];
638 # float blue = [protocolor blue];
639 # FloatValue* alpha_wrapper = [protocolor alpha];
640 # float alpha = 1.0;
641 # if (alpha_wrapper != nil) {
642 # alpha = [alpha_wrapper value];
643 # }
644 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
645 # }
646 #
647 # static Color* toProto(UIColor* color) {
648 # CGFloat red, green, blue, alpha;
649 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
650 # return nil;
651 # }
652 # Color* result = [Color alloc] init];
653 # [result setRed:red];
654 # [result setGreen:green];
655 # [result setBlue:blue];
656 # if (alpha <= 0.9999) {
657 # [result setAlpha:floatWrapperWithValue(alpha)];
658 # }
659 # [result autorelease];
660 # return result;
661 # }
662 # // ...
663 #
664 # Example (JavaScript):
665 #
666 # // ...
667 #
668 # var protoToCssColor = function(rgb_color) {
669 # var redFrac = rgb_color.red || 0.0;
670 # var greenFrac = rgb_color.green || 0.0;
671 # var blueFrac = rgb_color.blue || 0.0;
672 # var red = Math.floor(redFrac * 255);
673 # var green = Math.floor(greenFrac * 255);
674 # var blue = Math.floor(blueFrac * 255);
675 #
676 # if (!('alpha' in rgb_color)) {
677 # return rgbToCssColor_(red, green, blue);
678 # }
679 #
680 # var alphaFrac = rgb_color.alpha.value || 0.0;
681 # var rgbParams = [red, green, blue].join(',');
682 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
683 # };
684 #
685 # var rgbToCssColor_ = function(red, green, blue) {
686 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
687 # var hexString = rgbNumber.toString(16);
688 # var missingZeros = 6 - hexString.length;
689 # var resultBuilder = ['#'];
690 # for (var i = 0; i < missingZeros; i++) {
691 # resultBuilder.push('0');
692 # }
693 # resultBuilder.push(hexString);
694 # return resultBuilder.join('');
695 # };
696 #
697 # // ...
698 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
699 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
700 # the final pixel color is defined by the equation:
701 #
702 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
703 #
704 # This means that a value of 1.0 corresponds to a solid color, whereas
705 # a value of 0.0 corresponds to a completely transparent color. This
706 # uses a wrapper message rather than a simple float scalar so that it is
707 # possible to distinguish between a default value and the value being unset.
708 # If omitted, this color object is to be rendered as a solid color
709 # (as if the alpha value had been explicitly given with a value of 1.0).
710 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
711 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
712 },
713 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700714 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700715 "style": "A String", # The style of the border.
716 },
717 "right": { # A border along a cell. # The right border of the cell.
718 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
719 # for simplicity of conversion to/from color representations in various
720 # languages over compactness; for example, the fields of this representation
721 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
722 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
723 # method in iOS; and, with just a little work, it can be easily formatted into
724 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
725 #
726 # Example (Java):
727 #
728 # import com.google.type.Color;
729 #
730 # // ...
731 # public static java.awt.Color fromProto(Color protocolor) {
732 # float alpha = protocolor.hasAlpha()
733 # ? protocolor.getAlpha().getValue()
734 # : 1.0;
735 #
736 # return new java.awt.Color(
737 # protocolor.getRed(),
738 # protocolor.getGreen(),
739 # protocolor.getBlue(),
740 # alpha);
741 # }
742 #
743 # public static Color toProto(java.awt.Color color) {
744 # float red = (float) color.getRed();
745 # float green = (float) color.getGreen();
746 # float blue = (float) color.getBlue();
747 # float denominator = 255.0;
748 # Color.Builder resultBuilder =
749 # Color
750 # .newBuilder()
751 # .setRed(red / denominator)
752 # .setGreen(green / denominator)
753 # .setBlue(blue / denominator);
754 # int alpha = color.getAlpha();
755 # if (alpha != 255) {
756 # result.setAlpha(
757 # FloatValue
758 # .newBuilder()
759 # .setValue(((float) alpha) / denominator)
760 # .build());
761 # }
762 # return resultBuilder.build();
763 # }
764 # // ...
765 #
766 # Example (iOS / Obj-C):
767 #
768 # // ...
769 # static UIColor* fromProto(Color* protocolor) {
770 # float red = [protocolor red];
771 # float green = [protocolor green];
772 # float blue = [protocolor blue];
773 # FloatValue* alpha_wrapper = [protocolor alpha];
774 # float alpha = 1.0;
775 # if (alpha_wrapper != nil) {
776 # alpha = [alpha_wrapper value];
777 # }
778 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
779 # }
780 #
781 # static Color* toProto(UIColor* color) {
782 # CGFloat red, green, blue, alpha;
783 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
784 # return nil;
785 # }
786 # Color* result = [Color alloc] init];
787 # [result setRed:red];
788 # [result setGreen:green];
789 # [result setBlue:blue];
790 # if (alpha <= 0.9999) {
791 # [result setAlpha:floatWrapperWithValue(alpha)];
792 # }
793 # [result autorelease];
794 # return result;
795 # }
796 # // ...
797 #
798 # Example (JavaScript):
799 #
800 # // ...
801 #
802 # var protoToCssColor = function(rgb_color) {
803 # var redFrac = rgb_color.red || 0.0;
804 # var greenFrac = rgb_color.green || 0.0;
805 # var blueFrac = rgb_color.blue || 0.0;
806 # var red = Math.floor(redFrac * 255);
807 # var green = Math.floor(greenFrac * 255);
808 # var blue = Math.floor(blueFrac * 255);
809 #
810 # if (!('alpha' in rgb_color)) {
811 # return rgbToCssColor_(red, green, blue);
812 # }
813 #
814 # var alphaFrac = rgb_color.alpha.value || 0.0;
815 # var rgbParams = [red, green, blue].join(',');
816 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
817 # };
818 #
819 # var rgbToCssColor_ = function(red, green, blue) {
820 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
821 # var hexString = rgbNumber.toString(16);
822 # var missingZeros = 6 - hexString.length;
823 # var resultBuilder = ['#'];
824 # for (var i = 0; i < missingZeros; i++) {
825 # resultBuilder.push('0');
826 # }
827 # resultBuilder.push(hexString);
828 # return resultBuilder.join('');
829 # };
830 #
831 # // ...
832 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
833 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
834 # the final pixel color is defined by the equation:
835 #
836 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
837 #
838 # This means that a value of 1.0 corresponds to a solid color, whereas
839 # a value of 0.0 corresponds to a completely transparent color. This
840 # uses a wrapper message rather than a simple float scalar so that it is
841 # possible to distinguish between a default value and the value being unset.
842 # If omitted, this color object is to be rendered as a solid color
843 # (as if the alpha value had been explicitly given with a value of 1.0).
844 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
845 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
846 },
847 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700848 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700849 "style": "A String", # The style of the border.
850 },
851 "bottom": { # A border along a cell. # The bottom border of the cell.
852 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
853 # for simplicity of conversion to/from color representations in various
854 # languages over compactness; for example, the fields of this representation
855 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
856 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
857 # method in iOS; and, with just a little work, it can be easily formatted into
858 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
859 #
860 # Example (Java):
861 #
862 # import com.google.type.Color;
863 #
864 # // ...
865 # public static java.awt.Color fromProto(Color protocolor) {
866 # float alpha = protocolor.hasAlpha()
867 # ? protocolor.getAlpha().getValue()
868 # : 1.0;
869 #
870 # return new java.awt.Color(
871 # protocolor.getRed(),
872 # protocolor.getGreen(),
873 # protocolor.getBlue(),
874 # alpha);
875 # }
876 #
877 # public static Color toProto(java.awt.Color color) {
878 # float red = (float) color.getRed();
879 # float green = (float) color.getGreen();
880 # float blue = (float) color.getBlue();
881 # float denominator = 255.0;
882 # Color.Builder resultBuilder =
883 # Color
884 # .newBuilder()
885 # .setRed(red / denominator)
886 # .setGreen(green / denominator)
887 # .setBlue(blue / denominator);
888 # int alpha = color.getAlpha();
889 # if (alpha != 255) {
890 # result.setAlpha(
891 # FloatValue
892 # .newBuilder()
893 # .setValue(((float) alpha) / denominator)
894 # .build());
895 # }
896 # return resultBuilder.build();
897 # }
898 # // ...
899 #
900 # Example (iOS / Obj-C):
901 #
902 # // ...
903 # static UIColor* fromProto(Color* protocolor) {
904 # float red = [protocolor red];
905 # float green = [protocolor green];
906 # float blue = [protocolor blue];
907 # FloatValue* alpha_wrapper = [protocolor alpha];
908 # float alpha = 1.0;
909 # if (alpha_wrapper != nil) {
910 # alpha = [alpha_wrapper value];
911 # }
912 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
913 # }
914 #
915 # static Color* toProto(UIColor* color) {
916 # CGFloat red, green, blue, alpha;
917 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
918 # return nil;
919 # }
920 # Color* result = [Color alloc] init];
921 # [result setRed:red];
922 # [result setGreen:green];
923 # [result setBlue:blue];
924 # if (alpha <= 0.9999) {
925 # [result setAlpha:floatWrapperWithValue(alpha)];
926 # }
927 # [result autorelease];
928 # return result;
929 # }
930 # // ...
931 #
932 # Example (JavaScript):
933 #
934 # // ...
935 #
936 # var protoToCssColor = function(rgb_color) {
937 # var redFrac = rgb_color.red || 0.0;
938 # var greenFrac = rgb_color.green || 0.0;
939 # var blueFrac = rgb_color.blue || 0.0;
940 # var red = Math.floor(redFrac * 255);
941 # var green = Math.floor(greenFrac * 255);
942 # var blue = Math.floor(blueFrac * 255);
943 #
944 # if (!('alpha' in rgb_color)) {
945 # return rgbToCssColor_(red, green, blue);
946 # }
947 #
948 # var alphaFrac = rgb_color.alpha.value || 0.0;
949 # var rgbParams = [red, green, blue].join(',');
950 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
951 # };
952 #
953 # var rgbToCssColor_ = function(red, green, blue) {
954 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
955 # var hexString = rgbNumber.toString(16);
956 # var missingZeros = 6 - hexString.length;
957 # var resultBuilder = ['#'];
958 # for (var i = 0; i < missingZeros; i++) {
959 # resultBuilder.push('0');
960 # }
961 # resultBuilder.push(hexString);
962 # return resultBuilder.join('');
963 # };
964 #
965 # // ...
966 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
967 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
968 # the final pixel color is defined by the equation:
969 #
970 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
971 #
972 # This means that a value of 1.0 corresponds to a solid color, whereas
973 # a value of 0.0 corresponds to a completely transparent color. This
974 # uses a wrapper message rather than a simple float scalar so that it is
975 # possible to distinguish between a default value and the value being unset.
976 # If omitted, this color object is to be rendered as a solid color
977 # (as if the alpha value had been explicitly given with a value of 1.0).
978 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
979 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
980 },
981 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700982 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700983 "style": "A String", # The style of the border.
984 },
985 "left": { # A border along a cell. # The left border of the cell.
986 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
987 # for simplicity of conversion to/from color representations in various
988 # languages over compactness; for example, the fields of this representation
989 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
990 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
991 # method in iOS; and, with just a little work, it can be easily formatted into
992 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
993 #
994 # Example (Java):
995 #
996 # import com.google.type.Color;
997 #
998 # // ...
999 # public static java.awt.Color fromProto(Color protocolor) {
1000 # float alpha = protocolor.hasAlpha()
1001 # ? protocolor.getAlpha().getValue()
1002 # : 1.0;
1003 #
1004 # return new java.awt.Color(
1005 # protocolor.getRed(),
1006 # protocolor.getGreen(),
1007 # protocolor.getBlue(),
1008 # alpha);
1009 # }
1010 #
1011 # public static Color toProto(java.awt.Color color) {
1012 # float red = (float) color.getRed();
1013 # float green = (float) color.getGreen();
1014 # float blue = (float) color.getBlue();
1015 # float denominator = 255.0;
1016 # Color.Builder resultBuilder =
1017 # Color
1018 # .newBuilder()
1019 # .setRed(red / denominator)
1020 # .setGreen(green / denominator)
1021 # .setBlue(blue / denominator);
1022 # int alpha = color.getAlpha();
1023 # if (alpha != 255) {
1024 # result.setAlpha(
1025 # FloatValue
1026 # .newBuilder()
1027 # .setValue(((float) alpha) / denominator)
1028 # .build());
1029 # }
1030 # return resultBuilder.build();
1031 # }
1032 # // ...
1033 #
1034 # Example (iOS / Obj-C):
1035 #
1036 # // ...
1037 # static UIColor* fromProto(Color* protocolor) {
1038 # float red = [protocolor red];
1039 # float green = [protocolor green];
1040 # float blue = [protocolor blue];
1041 # FloatValue* alpha_wrapper = [protocolor alpha];
1042 # float alpha = 1.0;
1043 # if (alpha_wrapper != nil) {
1044 # alpha = [alpha_wrapper value];
1045 # }
1046 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1047 # }
1048 #
1049 # static Color* toProto(UIColor* color) {
1050 # CGFloat red, green, blue, alpha;
1051 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1052 # return nil;
1053 # }
1054 # Color* result = [Color alloc] init];
1055 # [result setRed:red];
1056 # [result setGreen:green];
1057 # [result setBlue:blue];
1058 # if (alpha <= 0.9999) {
1059 # [result setAlpha:floatWrapperWithValue(alpha)];
1060 # }
1061 # [result autorelease];
1062 # return result;
1063 # }
1064 # // ...
1065 #
1066 # Example (JavaScript):
1067 #
1068 # // ...
1069 #
1070 # var protoToCssColor = function(rgb_color) {
1071 # var redFrac = rgb_color.red || 0.0;
1072 # var greenFrac = rgb_color.green || 0.0;
1073 # var blueFrac = rgb_color.blue || 0.0;
1074 # var red = Math.floor(redFrac * 255);
1075 # var green = Math.floor(greenFrac * 255);
1076 # var blue = Math.floor(blueFrac * 255);
1077 #
1078 # if (!('alpha' in rgb_color)) {
1079 # return rgbToCssColor_(red, green, blue);
1080 # }
1081 #
1082 # var alphaFrac = rgb_color.alpha.value || 0.0;
1083 # var rgbParams = [red, green, blue].join(',');
1084 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1085 # };
1086 #
1087 # var rgbToCssColor_ = function(red, green, blue) {
1088 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1089 # var hexString = rgbNumber.toString(16);
1090 # var missingZeros = 6 - hexString.length;
1091 # var resultBuilder = ['#'];
1092 # for (var i = 0; i < missingZeros; i++) {
1093 # resultBuilder.push('0');
1094 # }
1095 # resultBuilder.push(hexString);
1096 # return resultBuilder.join('');
1097 # };
1098 #
1099 # // ...
1100 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1101 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1102 # the final pixel color is defined by the equation:
1103 #
1104 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1105 #
1106 # This means that a value of 1.0 corresponds to a solid color, whereas
1107 # a value of 0.0 corresponds to a completely transparent color. This
1108 # uses a wrapper message rather than a simple float scalar so that it is
1109 # possible to distinguish between a default value and the value being unset.
1110 # If omitted, this color object is to be rendered as a solid color
1111 # (as if the alpha value had been explicitly given with a value of 1.0).
1112 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1113 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1114 },
1115 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001116 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001117 "style": "A String", # The style of the border.
1118 },
1119 },
1120 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
1121 },
1122 },
1123 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
1124 # the interpolation points listed. The format of a cell will vary
1125 # based on its contents as compared to the values of the interpolation
1126 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001127 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001128 # These pin the gradient color scale according to the color,
1129 # type and value chosen.
1130 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1131 # for simplicity of conversion to/from color representations in various
1132 # languages over compactness; for example, the fields of this representation
1133 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1134 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1135 # method in iOS; and, with just a little work, it can be easily formatted into
1136 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1137 #
1138 # Example (Java):
1139 #
1140 # import com.google.type.Color;
1141 #
1142 # // ...
1143 # public static java.awt.Color fromProto(Color protocolor) {
1144 # float alpha = protocolor.hasAlpha()
1145 # ? protocolor.getAlpha().getValue()
1146 # : 1.0;
1147 #
1148 # return new java.awt.Color(
1149 # protocolor.getRed(),
1150 # protocolor.getGreen(),
1151 # protocolor.getBlue(),
1152 # alpha);
1153 # }
1154 #
1155 # public static Color toProto(java.awt.Color color) {
1156 # float red = (float) color.getRed();
1157 # float green = (float) color.getGreen();
1158 # float blue = (float) color.getBlue();
1159 # float denominator = 255.0;
1160 # Color.Builder resultBuilder =
1161 # Color
1162 # .newBuilder()
1163 # .setRed(red / denominator)
1164 # .setGreen(green / denominator)
1165 # .setBlue(blue / denominator);
1166 # int alpha = color.getAlpha();
1167 # if (alpha != 255) {
1168 # result.setAlpha(
1169 # FloatValue
1170 # .newBuilder()
1171 # .setValue(((float) alpha) / denominator)
1172 # .build());
1173 # }
1174 # return resultBuilder.build();
1175 # }
1176 # // ...
1177 #
1178 # Example (iOS / Obj-C):
1179 #
1180 # // ...
1181 # static UIColor* fromProto(Color* protocolor) {
1182 # float red = [protocolor red];
1183 # float green = [protocolor green];
1184 # float blue = [protocolor blue];
1185 # FloatValue* alpha_wrapper = [protocolor alpha];
1186 # float alpha = 1.0;
1187 # if (alpha_wrapper != nil) {
1188 # alpha = [alpha_wrapper value];
1189 # }
1190 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1191 # }
1192 #
1193 # static Color* toProto(UIColor* color) {
1194 # CGFloat red, green, blue, alpha;
1195 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1196 # return nil;
1197 # }
1198 # Color* result = [Color alloc] init];
1199 # [result setRed:red];
1200 # [result setGreen:green];
1201 # [result setBlue:blue];
1202 # if (alpha <= 0.9999) {
1203 # [result setAlpha:floatWrapperWithValue(alpha)];
1204 # }
1205 # [result autorelease];
1206 # return result;
1207 # }
1208 # // ...
1209 #
1210 # Example (JavaScript):
1211 #
1212 # // ...
1213 #
1214 # var protoToCssColor = function(rgb_color) {
1215 # var redFrac = rgb_color.red || 0.0;
1216 # var greenFrac = rgb_color.green || 0.0;
1217 # var blueFrac = rgb_color.blue || 0.0;
1218 # var red = Math.floor(redFrac * 255);
1219 # var green = Math.floor(greenFrac * 255);
1220 # var blue = Math.floor(blueFrac * 255);
1221 #
1222 # if (!('alpha' in rgb_color)) {
1223 # return rgbToCssColor_(red, green, blue);
1224 # }
1225 #
1226 # var alphaFrac = rgb_color.alpha.value || 0.0;
1227 # var rgbParams = [red, green, blue].join(',');
1228 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1229 # };
1230 #
1231 # var rgbToCssColor_ = function(red, green, blue) {
1232 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1233 # var hexString = rgbNumber.toString(16);
1234 # var missingZeros = 6 - hexString.length;
1235 # var resultBuilder = ['#'];
1236 # for (var i = 0; i < missingZeros; i++) {
1237 # resultBuilder.push('0');
1238 # }
1239 # resultBuilder.push(hexString);
1240 # return resultBuilder.join('');
1241 # };
1242 #
1243 # // ...
1244 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1245 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1246 # the final pixel color is defined by the equation:
1247 #
1248 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1249 #
1250 # This means that a value of 1.0 corresponds to a solid color, whereas
1251 # a value of 0.0 corresponds to a completely transparent color. This
1252 # uses a wrapper message rather than a simple float scalar so that it is
1253 # possible to distinguish between a default value and the value being unset.
1254 # If omitted, this color object is to be rendered as a solid color
1255 # (as if the alpha value had been explicitly given with a value of 1.0).
1256 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1257 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1258 },
1259 "type": "A String", # How the value should be interpreted.
1260 "value": "A String", # The value this interpolation point uses. May be a formula.
1261 # Unused if type is MIN or
1262 # MAX.
1263 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001264 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001265 # These pin the gradient color scale according to the color,
1266 # type and value chosen.
1267 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1268 # for simplicity of conversion to/from color representations in various
1269 # languages over compactness; for example, the fields of this representation
1270 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1271 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1272 # method in iOS; and, with just a little work, it can be easily formatted into
1273 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1274 #
1275 # Example (Java):
1276 #
1277 # import com.google.type.Color;
1278 #
1279 # // ...
1280 # public static java.awt.Color fromProto(Color protocolor) {
1281 # float alpha = protocolor.hasAlpha()
1282 # ? protocolor.getAlpha().getValue()
1283 # : 1.0;
1284 #
1285 # return new java.awt.Color(
1286 # protocolor.getRed(),
1287 # protocolor.getGreen(),
1288 # protocolor.getBlue(),
1289 # alpha);
1290 # }
1291 #
1292 # public static Color toProto(java.awt.Color color) {
1293 # float red = (float) color.getRed();
1294 # float green = (float) color.getGreen();
1295 # float blue = (float) color.getBlue();
1296 # float denominator = 255.0;
1297 # Color.Builder resultBuilder =
1298 # Color
1299 # .newBuilder()
1300 # .setRed(red / denominator)
1301 # .setGreen(green / denominator)
1302 # .setBlue(blue / denominator);
1303 # int alpha = color.getAlpha();
1304 # if (alpha != 255) {
1305 # result.setAlpha(
1306 # FloatValue
1307 # .newBuilder()
1308 # .setValue(((float) alpha) / denominator)
1309 # .build());
1310 # }
1311 # return resultBuilder.build();
1312 # }
1313 # // ...
1314 #
1315 # Example (iOS / Obj-C):
1316 #
1317 # // ...
1318 # static UIColor* fromProto(Color* protocolor) {
1319 # float red = [protocolor red];
1320 # float green = [protocolor green];
1321 # float blue = [protocolor blue];
1322 # FloatValue* alpha_wrapper = [protocolor alpha];
1323 # float alpha = 1.0;
1324 # if (alpha_wrapper != nil) {
1325 # alpha = [alpha_wrapper value];
1326 # }
1327 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1328 # }
1329 #
1330 # static Color* toProto(UIColor* color) {
1331 # CGFloat red, green, blue, alpha;
1332 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1333 # return nil;
1334 # }
1335 # Color* result = [Color alloc] init];
1336 # [result setRed:red];
1337 # [result setGreen:green];
1338 # [result setBlue:blue];
1339 # if (alpha <= 0.9999) {
1340 # [result setAlpha:floatWrapperWithValue(alpha)];
1341 # }
1342 # [result autorelease];
1343 # return result;
1344 # }
1345 # // ...
1346 #
1347 # Example (JavaScript):
1348 #
1349 # // ...
1350 #
1351 # var protoToCssColor = function(rgb_color) {
1352 # var redFrac = rgb_color.red || 0.0;
1353 # var greenFrac = rgb_color.green || 0.0;
1354 # var blueFrac = rgb_color.blue || 0.0;
1355 # var red = Math.floor(redFrac * 255);
1356 # var green = Math.floor(greenFrac * 255);
1357 # var blue = Math.floor(blueFrac * 255);
1358 #
1359 # if (!('alpha' in rgb_color)) {
1360 # return rgbToCssColor_(red, green, blue);
1361 # }
1362 #
1363 # var alphaFrac = rgb_color.alpha.value || 0.0;
1364 # var rgbParams = [red, green, blue].join(',');
1365 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1366 # };
1367 #
1368 # var rgbToCssColor_ = function(red, green, blue) {
1369 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1370 # var hexString = rgbNumber.toString(16);
1371 # var missingZeros = 6 - hexString.length;
1372 # var resultBuilder = ['#'];
1373 # for (var i = 0; i < missingZeros; i++) {
1374 # resultBuilder.push('0');
1375 # }
1376 # resultBuilder.push(hexString);
1377 # return resultBuilder.join('');
1378 # };
1379 #
1380 # // ...
1381 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1382 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1383 # the final pixel color is defined by the equation:
1384 #
1385 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1386 #
1387 # This means that a value of 1.0 corresponds to a solid color, whereas
1388 # a value of 0.0 corresponds to a completely transparent color. This
1389 # uses a wrapper message rather than a simple float scalar so that it is
1390 # possible to distinguish between a default value and the value being unset.
1391 # If omitted, this color object is to be rendered as a solid color
1392 # (as if the alpha value had been explicitly given with a value of 1.0).
1393 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1394 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1395 },
1396 "type": "A String", # How the value should be interpreted.
1397 "value": "A String", # The value this interpolation point uses. May be a formula.
1398 # Unused if type is MIN or
1399 # MAX.
1400 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001401 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001402 # These pin the gradient color scale according to the color,
1403 # type and value chosen.
1404 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1405 # for simplicity of conversion to/from color representations in various
1406 # languages over compactness; for example, the fields of this representation
1407 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1408 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1409 # method in iOS; and, with just a little work, it can be easily formatted into
1410 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1411 #
1412 # Example (Java):
1413 #
1414 # import com.google.type.Color;
1415 #
1416 # // ...
1417 # public static java.awt.Color fromProto(Color protocolor) {
1418 # float alpha = protocolor.hasAlpha()
1419 # ? protocolor.getAlpha().getValue()
1420 # : 1.0;
1421 #
1422 # return new java.awt.Color(
1423 # protocolor.getRed(),
1424 # protocolor.getGreen(),
1425 # protocolor.getBlue(),
1426 # alpha);
1427 # }
1428 #
1429 # public static Color toProto(java.awt.Color color) {
1430 # float red = (float) color.getRed();
1431 # float green = (float) color.getGreen();
1432 # float blue = (float) color.getBlue();
1433 # float denominator = 255.0;
1434 # Color.Builder resultBuilder =
1435 # Color
1436 # .newBuilder()
1437 # .setRed(red / denominator)
1438 # .setGreen(green / denominator)
1439 # .setBlue(blue / denominator);
1440 # int alpha = color.getAlpha();
1441 # if (alpha != 255) {
1442 # result.setAlpha(
1443 # FloatValue
1444 # .newBuilder()
1445 # .setValue(((float) alpha) / denominator)
1446 # .build());
1447 # }
1448 # return resultBuilder.build();
1449 # }
1450 # // ...
1451 #
1452 # Example (iOS / Obj-C):
1453 #
1454 # // ...
1455 # static UIColor* fromProto(Color* protocolor) {
1456 # float red = [protocolor red];
1457 # float green = [protocolor green];
1458 # float blue = [protocolor blue];
1459 # FloatValue* alpha_wrapper = [protocolor alpha];
1460 # float alpha = 1.0;
1461 # if (alpha_wrapper != nil) {
1462 # alpha = [alpha_wrapper value];
1463 # }
1464 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1465 # }
1466 #
1467 # static Color* toProto(UIColor* color) {
1468 # CGFloat red, green, blue, alpha;
1469 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1470 # return nil;
1471 # }
1472 # Color* result = [Color alloc] init];
1473 # [result setRed:red];
1474 # [result setGreen:green];
1475 # [result setBlue:blue];
1476 # if (alpha <= 0.9999) {
1477 # [result setAlpha:floatWrapperWithValue(alpha)];
1478 # }
1479 # [result autorelease];
1480 # return result;
1481 # }
1482 # // ...
1483 #
1484 # Example (JavaScript):
1485 #
1486 # // ...
1487 #
1488 # var protoToCssColor = function(rgb_color) {
1489 # var redFrac = rgb_color.red || 0.0;
1490 # var greenFrac = rgb_color.green || 0.0;
1491 # var blueFrac = rgb_color.blue || 0.0;
1492 # var red = Math.floor(redFrac * 255);
1493 # var green = Math.floor(greenFrac * 255);
1494 # var blue = Math.floor(blueFrac * 255);
1495 #
1496 # if (!('alpha' in rgb_color)) {
1497 # return rgbToCssColor_(red, green, blue);
1498 # }
1499 #
1500 # var alphaFrac = rgb_color.alpha.value || 0.0;
1501 # var rgbParams = [red, green, blue].join(',');
1502 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1503 # };
1504 #
1505 # var rgbToCssColor_ = function(red, green, blue) {
1506 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1507 # var hexString = rgbNumber.toString(16);
1508 # var missingZeros = 6 - hexString.length;
1509 # var resultBuilder = ['#'];
1510 # for (var i = 0; i < missingZeros; i++) {
1511 # resultBuilder.push('0');
1512 # }
1513 # resultBuilder.push(hexString);
1514 # return resultBuilder.join('');
1515 # };
1516 #
1517 # // ...
1518 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1519 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1520 # the final pixel color is defined by the equation:
1521 #
1522 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1523 #
1524 # This means that a value of 1.0 corresponds to a solid color, whereas
1525 # a value of 0.0 corresponds to a completely transparent color. This
1526 # uses a wrapper message rather than a simple float scalar so that it is
1527 # possible to distinguish between a default value and the value being unset.
1528 # If omitted, this color object is to be rendered as a solid color
1529 # (as if the alpha value had been explicitly given with a value of 1.0).
1530 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1531 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1532 },
1533 "type": "A String", # How the value should be interpreted.
1534 "value": "A String", # The value this interpolation point uses. May be a formula.
1535 # Unused if type is MIN or
1536 # MAX.
1537 },
1538 },
1539 },
1540 },
1541 "updateProtectedRange": { # Updates an existing protected range with the specified # Updates a protected range.
1542 # protectedRangeId.
1543 "fields": "A String", # The fields that should be updated. At least one field must be specified.
1544 # The root `protectedRange` is implied and should not be specified.
1545 # A single `"*"` can be used as short-hand for listing every field.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001546 "protectedRange": { # A protected range. # The protected range to update with the new properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001547 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
1548 # Unprotected ranges are only supported on protected sheets.
1549 { # A range on a sheet.
1550 # All indexes are zero-based.
1551 # Indexes are half open, e.g the start index is inclusive
1552 # and the end index is exclusive -- [start_index, end_index).
1553 # Missing indexes indicate the range is unbounded on that side.
1554 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001555 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001556 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001557 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001558 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001559 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001560 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001561 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001562 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001563 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001564 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001565 # `Sheet1!A:B == sheet_id: 0,
1566 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001567 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001568 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001569 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001570 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001571 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001572 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001573 #
1574 # The start index must always be less than or equal to the end index.
1575 # If the start index equals the end index, then the range is empty.
1576 # Empty ranges are typically not meaningful and are usually rendered in the
1577 # UI as `#REF!`.
1578 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
1579 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
1580 "sheetId": 42, # The sheet this range is on.
1581 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
1582 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
1583 },
1584 ],
1585 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
1586 # protected area.
1587 # This field is read-only.
1588 "description": "A String", # The description of this protected range.
1589 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
1590 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001591 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001592 # may be set.
1593 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
1594 # This field is only visible to users with edit access to the protected
1595 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001596 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001597 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
1598 # range. Domain protection is only supported on documents within a domain.
1599 "users": [ # The email addresses of users with edit access to the protected range.
1600 "A String",
1601 ],
1602 "groups": [ # The email addresses of groups with edit access to the protected range.
1603 "A String",
1604 ],
1605 },
1606 "protectedRangeId": 42, # The ID of the protected range.
1607 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001608 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001609 # Warning-based protection means that every user can edit data in the
1610 # protected range, except editing will prompt a warning asking the user
1611 # to confirm the edit.
1612 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001613 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001614 # Additionally, if this field is changed from true to false and the
1615 # `editors` field is not set (nor included in the field mask), then
1616 # the editors will be set to all the editors in the document.
1617 "range": { # A range on a sheet. # The range that is being protected.
1618 # The range may be fully unbounded, in which case this is considered
1619 # a protected sheet.
1620 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001621 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001622 # may be set.
1623 # All indexes are zero-based.
1624 # Indexes are half open, e.g the start index is inclusive
1625 # and the end index is exclusive -- [start_index, end_index).
1626 # Missing indexes indicate the range is unbounded on that side.
1627 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001628 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001629 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001630 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001631 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001632 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001633 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001634 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001635 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001636 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001637 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001638 # `Sheet1!A:B == sheet_id: 0,
1639 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001640 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001641 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001642 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001643 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001644 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001645 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001646 #
1647 # The start index must always be less than or equal to the end index.
1648 # If the start index equals the end index, then the range is empty.
1649 # Empty ranges are typically not meaningful and are usually rendered in the
1650 # UI as `#REF!`.
1651 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
1652 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
1653 "sheetId": 42, # The sheet this range is on.
1654 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
1655 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
1656 },
1657 },
1658 },
1659 "deleteDimension": { # Deletes the dimensions from the sheet. # Deletes rows or columns in a sheet.
1660 "range": { # A range along a single dimension on a sheet. # The dimensions to delete from the sheet.
1661 # All indexes are zero-based.
1662 # Indexes are half open: the start index is inclusive
1663 # and the end index is exclusive.
1664 # Missing indexes indicate the range is unbounded on that side.
1665 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
1666 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
1667 "sheetId": 42, # The sheet this span is on.
1668 "dimension": "A String", # The dimension of the span.
1669 },
1670 },
1671 "addProtectedRange": { # Adds a new protected range. # Adds a protected range.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001672 "protectedRange": { # A protected range. # The protected range to be added. The
1673 # protectedRangeId field is optional; if
1674 # one is not set, an id will be randomly generated. (It is an error to
1675 # specify the ID of a range that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001676 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
1677 # Unprotected ranges are only supported on protected sheets.
1678 { # A range on a sheet.
1679 # All indexes are zero-based.
1680 # Indexes are half open, e.g the start index is inclusive
1681 # and the end index is exclusive -- [start_index, end_index).
1682 # Missing indexes indicate the range is unbounded on that side.
1683 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001684 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001685 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001686 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001687 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001688 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001689 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001690 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001691 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001692 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001693 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001694 # `Sheet1!A:B == sheet_id: 0,
1695 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001696 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001697 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001698 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001699 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001700 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001701 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001702 #
1703 # The start index must always be less than or equal to the end index.
1704 # If the start index equals the end index, then the range is empty.
1705 # Empty ranges are typically not meaningful and are usually rendered in the
1706 # UI as `#REF!`.
1707 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
1708 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
1709 "sheetId": 42, # The sheet this range is on.
1710 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
1711 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
1712 },
1713 ],
1714 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
1715 # protected area.
1716 # This field is read-only.
1717 "description": "A String", # The description of this protected range.
1718 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
1719 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001720 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001721 # may be set.
1722 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
1723 # This field is only visible to users with edit access to the protected
1724 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001725 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001726 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
1727 # range. Domain protection is only supported on documents within a domain.
1728 "users": [ # The email addresses of users with edit access to the protected range.
1729 "A String",
1730 ],
1731 "groups": [ # The email addresses of groups with edit access to the protected range.
1732 "A String",
1733 ],
1734 },
1735 "protectedRangeId": 42, # The ID of the protected range.
1736 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001737 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001738 # Warning-based protection means that every user can edit data in the
1739 # protected range, except editing will prompt a warning asking the user
1740 # to confirm the edit.
1741 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001742 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001743 # Additionally, if this field is changed from true to false and the
1744 # `editors` field is not set (nor included in the field mask), then
1745 # the editors will be set to all the editors in the document.
1746 "range": { # A range on a sheet. # The range that is being protected.
1747 # The range may be fully unbounded, in which case this is considered
1748 # a protected sheet.
1749 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001750 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001751 # may be set.
1752 # All indexes are zero-based.
1753 # Indexes are half open, e.g the start index is inclusive
1754 # and the end index is exclusive -- [start_index, end_index).
1755 # Missing indexes indicate the range is unbounded on that side.
1756 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001757 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001758 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001759 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001760 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001761 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001762 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001763 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001764 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001765 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001766 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001767 # `Sheet1!A:B == sheet_id: 0,
1768 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001769 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001770 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001771 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001772 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001773 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001774 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001775 #
1776 # The start index must always be less than or equal to the end index.
1777 # If the start index equals the end index, then the range is empty.
1778 # Empty ranges are typically not meaningful and are usually rendered in the
1779 # UI as `#REF!`.
1780 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
1781 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
1782 "sheetId": 42, # The sheet this range is on.
1783 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
1784 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
1785 },
1786 },
1787 },
1788 "deleteEmbeddedObject": { # Deletes the embedded object with the given ID. # Deletes an embedded object (e.g, chart, image) in a sheet.
1789 "objectId": 42, # The ID of the embedded object to delete.
1790 },
1791 "pasteData": { # Inserts data into the spreadsheet starting at the specified coordinate. # Pastes data (HTML or delimited) into a sheet.
1792 "coordinate": { # A coordinate in a sheet. # The coordinate at which the data should start being inserted.
1793 # All indexes are zero-based.
1794 "rowIndex": 42, # The row index of the coordinate.
1795 "columnIndex": 42, # The column index of the coordinate.
1796 "sheetId": 42, # The sheet this coordinate is on.
1797 },
1798 "type": "A String", # How the data should be pasted.
1799 "delimiter": "A String", # The delimiter in the data.
1800 "html": True or False, # True if the data is HTML.
1801 "data": "A String", # The data to insert.
1802 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001803 "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 -07001804 # inserting new rows into the sheet if necessary.
1805 "fields": "A String", # The fields of CellData that should be updated.
1806 # At least one field must be specified.
1807 # The root is the CellData; 'row.values.' should not be specified.
1808 # A single `"*"` can be used as short-hand for listing every field.
1809 "rows": [ # The data to append.
1810 { # Data about each cell in a row.
1811 "values": [ # The values in the row, one per column.
1812 { # Data about a specific cell.
1813 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
1814 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001815 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001816 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001817 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001818 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
1819 # or vertically (as rows).
1820 "rows": [ # Each row grouping in the pivot table.
1821 { # A single grouping (either row or column) in a pivot table.
1822 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
1823 "valueMetadata": [ # Metadata about values in the grouping.
1824 { # Metadata about a value in a pivot grouping.
1825 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
1826 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
1827 # (Note that formulaValue is not valid,
1828 # because the values will be calculated.)
1829 "numberValue": 3.14, # Represents a double value.
1830 # Note: Dates, Times and DateTimes are represented as doubles in
1831 # "serial number" format.
1832 "boolValue": True or False, # Represents a boolean value.
1833 "formulaValue": "A String", # Represents a formula.
1834 "stringValue": "A String", # Represents a string value.
1835 # Leading single quotes are not included. For example, if the user typed
1836 # `'123` into the UI, this would be represented as a `stringValue` of
1837 # `"123"`.
1838 "errorValue": { # An error in a cell. # Represents an error.
1839 # This field is read-only.
1840 "message": "A String", # A message with more information about the error
1841 # (in the spreadsheet's locale).
1842 "type": "A String", # The type of error.
1843 },
1844 },
1845 },
1846 ],
1847 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
1848 # If not specified, sorting is alphabetical by this group's values.
1849 "buckets": [ # Determines the bucket from which values are chosen to sort.
1850 #
1851 # For example, in a pivot table with one row group & two column groups,
1852 # the row group can list up to two values. The first value corresponds
1853 # to a value within the first column group, and the second value
1854 # corresponds to a value in the second column group. If no values
1855 # are listed, this would indicate that the row should be sorted according
1856 # to the "Grand Total" over the column groups. If a single value is listed,
1857 # this would correspond to using the "Total" of that bucket.
1858 { # The kinds of value that a cell in a spreadsheet can have.
1859 "numberValue": 3.14, # Represents a double value.
1860 # Note: Dates, Times and DateTimes are represented as doubles in
1861 # "serial number" format.
1862 "boolValue": True or False, # Represents a boolean value.
1863 "formulaValue": "A String", # Represents a formula.
1864 "stringValue": "A String", # Represents a string value.
1865 # Leading single quotes are not included. For example, if the user typed
1866 # `'123` into the UI, this would be represented as a `stringValue` of
1867 # `"123"`.
1868 "errorValue": { # An error in a cell. # Represents an error.
1869 # This field is read-only.
1870 "message": "A String", # A message with more information about the error
1871 # (in the spreadsheet's locale).
1872 "type": "A String", # The type of error.
1873 },
1874 },
1875 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001876 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001877 # grouping should be sorted by.
1878 },
1879 "sortOrder": "A String", # The order the values in this group should be sorted.
1880 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
1881 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001882 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001883 # means this group refers to column `C`, whereas the offset `1` would refer
1884 # to column `D`.
1885 },
1886 ],
1887 "source": { # A range on a sheet. # The range the pivot table is reading data from.
1888 # All indexes are zero-based.
1889 # Indexes are half open, e.g the start index is inclusive
1890 # and the end index is exclusive -- [start_index, end_index).
1891 # Missing indexes indicate the range is unbounded on that side.
1892 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001893 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001894 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001895 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001896 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001897 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001898 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001899 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001900 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001901 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001902 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001903 # `Sheet1!A:B == sheet_id: 0,
1904 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001905 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001906 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001907 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001908 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001909 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001910 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001911 #
1912 # The start index must always be less than or equal to the end index.
1913 # If the start index equals the end index, then the range is empty.
1914 # Empty ranges are typically not meaningful and are usually rendered in the
1915 # UI as `#REF!`.
1916 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
1917 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
1918 "sheetId": 42, # The sheet this range is on.
1919 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
1920 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
1921 },
1922 "values": [ # A list of values to include in the pivot table.
1923 { # The definition of how a value in a pivot table should be calculated.
1924 "formula": "A String", # A custom formula to calculate the value. The formula must start
1925 # with an `=` character.
1926 "summarizeFunction": "A String", # A function to summarize the value.
1927 # If formula is set, the only supported values are
1928 # SUM and
1929 # CUSTOM.
1930 # If sourceColumnOffset is set, then `CUSTOM`
1931 # is not supported.
1932 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
1933 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001934 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001935 # means this value refers to column `C`, whereas the offset `1` would
1936 # refer to column `D`.
1937 "name": "A String", # A name to use for the value. This is only used if formula was set.
1938 # Otherwise, the column name is used.
1939 },
1940 ],
1941 "criteria": { # An optional mapping of filters per source column offset.
1942 #
1943 # The filters will be applied before aggregating data into the pivot table.
1944 # The map's key is the column offset of the source range that you want to
1945 # filter, and the value is the criteria for that column.
1946 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001947 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001948 # for column `C`, whereas the key `1` is for column `D`.
1949 "a_key": { # Criteria for showing/hiding rows in a pivot table.
1950 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
1951 "A String",
1952 ],
1953 },
1954 },
1955 "columns": [ # Each column grouping in the pivot table.
1956 { # A single grouping (either row or column) in a pivot table.
1957 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
1958 "valueMetadata": [ # Metadata about values in the grouping.
1959 { # Metadata about a value in a pivot grouping.
1960 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
1961 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
1962 # (Note that formulaValue is not valid,
1963 # because the values will be calculated.)
1964 "numberValue": 3.14, # Represents a double value.
1965 # Note: Dates, Times and DateTimes are represented as doubles in
1966 # "serial number" format.
1967 "boolValue": True or False, # Represents a boolean value.
1968 "formulaValue": "A String", # Represents a formula.
1969 "stringValue": "A String", # Represents a string value.
1970 # Leading single quotes are not included. For example, if the user typed
1971 # `'123` into the UI, this would be represented as a `stringValue` of
1972 # `"123"`.
1973 "errorValue": { # An error in a cell. # Represents an error.
1974 # This field is read-only.
1975 "message": "A String", # A message with more information about the error
1976 # (in the spreadsheet's locale).
1977 "type": "A String", # The type of error.
1978 },
1979 },
1980 },
1981 ],
1982 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
1983 # If not specified, sorting is alphabetical by this group's values.
1984 "buckets": [ # Determines the bucket from which values are chosen to sort.
1985 #
1986 # For example, in a pivot table with one row group & two column groups,
1987 # the row group can list up to two values. The first value corresponds
1988 # to a value within the first column group, and the second value
1989 # corresponds to a value in the second column group. If no values
1990 # are listed, this would indicate that the row should be sorted according
1991 # to the "Grand Total" over the column groups. If a single value is listed,
1992 # this would correspond to using the "Total" of that bucket.
1993 { # The kinds of value that a cell in a spreadsheet can have.
1994 "numberValue": 3.14, # Represents a double value.
1995 # Note: Dates, Times and DateTimes are represented as doubles in
1996 # "serial number" format.
1997 "boolValue": True or False, # Represents a boolean value.
1998 "formulaValue": "A String", # Represents a formula.
1999 "stringValue": "A String", # Represents a string value.
2000 # Leading single quotes are not included. For example, if the user typed
2001 # `'123` into the UI, this would be represented as a `stringValue` of
2002 # `"123"`.
2003 "errorValue": { # An error in a cell. # Represents an error.
2004 # This field is read-only.
2005 "message": "A String", # A message with more information about the error
2006 # (in the spreadsheet's locale).
2007 "type": "A String", # The type of error.
2008 },
2009 },
2010 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002011 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002012 # grouping should be sorted by.
2013 },
2014 "sortOrder": "A String", # The order the values in this group should be sorted.
2015 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
2016 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002017 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002018 # means this group refers to column `C`, whereas the offset `1` would refer
2019 # to column `D`.
2020 },
2021 ],
2022 },
2023 "hyperlink": "A String", # A hyperlink this cell points to, if any.
2024 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
2025 "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
2026 # the calculated value. For cells with literals, this will be
2027 # the same as the user_entered_value.
2028 # This field is read-only.
2029 "numberValue": 3.14, # Represents a double value.
2030 # Note: Dates, Times and DateTimes are represented as doubles in
2031 # "serial number" format.
2032 "boolValue": True or False, # Represents a boolean value.
2033 "formulaValue": "A String", # Represents a formula.
2034 "stringValue": "A String", # Represents a string value.
2035 # Leading single quotes are not included. For example, if the user typed
2036 # `'123` into the UI, this would be represented as a `stringValue` of
2037 # `"123"`.
2038 "errorValue": { # An error in a cell. # Represents an error.
2039 # This field is read-only.
2040 "message": "A String", # A message with more information about the error
2041 # (in the spreadsheet's locale).
2042 "type": "A String", # The type of error.
2043 },
2044 },
2045 "formattedValue": "A String", # The formatted value of the cell.
2046 # This is the value as it's shown to the user.
2047 # This field is read-only.
2048 "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()`
2049 # Note: Dates, Times and DateTimes are represented as doubles in
2050 # serial number format.
2051 "numberValue": 3.14, # Represents a double value.
2052 # Note: Dates, Times and DateTimes are represented as doubles in
2053 # "serial number" format.
2054 "boolValue": True or False, # Represents a boolean value.
2055 "formulaValue": "A String", # Represents a formula.
2056 "stringValue": "A String", # Represents a string value.
2057 # Leading single quotes are not included. For example, if the user typed
2058 # `'123` into the UI, this would be represented as a `stringValue` of
2059 # `"123"`.
2060 "errorValue": { # An error in a cell. # Represents an error.
2061 # This field is read-only.
2062 "message": "A String", # A message with more information about the error
2063 # (in the spreadsheet's locale).
2064 "type": "A String", # The type of error.
2065 },
2066 },
2067 "note": "A String", # Any note on the cell.
2068 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
2069 # This includes the results of applying any conditional formatting and,
2070 # if the cell contains a formula, the computed number format.
2071 # If the effective format is the default format, effective format will
2072 # not be written.
2073 # This field is read-only.
2074 "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 -07002075 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
2076 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07002077 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
2078 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002079 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002080 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002081 },
2082 "textDirection": "A String", # The direction of the text in the cell.
2083 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
2084 # When updating padding, every field must be specified.
2085 "top": 42, # The top padding of the cell.
2086 "right": 42, # The right padding of the cell.
2087 "bottom": 42, # The bottom padding of the cell.
2088 "left": 42, # The left padding of the cell.
2089 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002090 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002091 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
2092 # for simplicity of conversion to/from color representations in various
2093 # languages over compactness; for example, the fields of this representation
2094 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2095 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2096 # method in iOS; and, with just a little work, it can be easily formatted into
2097 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2098 #
2099 # Example (Java):
2100 #
2101 # import com.google.type.Color;
2102 #
2103 # // ...
2104 # public static java.awt.Color fromProto(Color protocolor) {
2105 # float alpha = protocolor.hasAlpha()
2106 # ? protocolor.getAlpha().getValue()
2107 # : 1.0;
2108 #
2109 # return new java.awt.Color(
2110 # protocolor.getRed(),
2111 # protocolor.getGreen(),
2112 # protocolor.getBlue(),
2113 # alpha);
2114 # }
2115 #
2116 # public static Color toProto(java.awt.Color color) {
2117 # float red = (float) color.getRed();
2118 # float green = (float) color.getGreen();
2119 # float blue = (float) color.getBlue();
2120 # float denominator = 255.0;
2121 # Color.Builder resultBuilder =
2122 # Color
2123 # .newBuilder()
2124 # .setRed(red / denominator)
2125 # .setGreen(green / denominator)
2126 # .setBlue(blue / denominator);
2127 # int alpha = color.getAlpha();
2128 # if (alpha != 255) {
2129 # result.setAlpha(
2130 # FloatValue
2131 # .newBuilder()
2132 # .setValue(((float) alpha) / denominator)
2133 # .build());
2134 # }
2135 # return resultBuilder.build();
2136 # }
2137 # // ...
2138 #
2139 # Example (iOS / Obj-C):
2140 #
2141 # // ...
2142 # static UIColor* fromProto(Color* protocolor) {
2143 # float red = [protocolor red];
2144 # float green = [protocolor green];
2145 # float blue = [protocolor blue];
2146 # FloatValue* alpha_wrapper = [protocolor alpha];
2147 # float alpha = 1.0;
2148 # if (alpha_wrapper != nil) {
2149 # alpha = [alpha_wrapper value];
2150 # }
2151 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2152 # }
2153 #
2154 # static Color* toProto(UIColor* color) {
2155 # CGFloat red, green, blue, alpha;
2156 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2157 # return nil;
2158 # }
2159 # Color* result = [Color alloc] init];
2160 # [result setRed:red];
2161 # [result setGreen:green];
2162 # [result setBlue:blue];
2163 # if (alpha <= 0.9999) {
2164 # [result setAlpha:floatWrapperWithValue(alpha)];
2165 # }
2166 # [result autorelease];
2167 # return result;
2168 # }
2169 # // ...
2170 #
2171 # Example (JavaScript):
2172 #
2173 # // ...
2174 #
2175 # var protoToCssColor = function(rgb_color) {
2176 # var redFrac = rgb_color.red || 0.0;
2177 # var greenFrac = rgb_color.green || 0.0;
2178 # var blueFrac = rgb_color.blue || 0.0;
2179 # var red = Math.floor(redFrac * 255);
2180 # var green = Math.floor(greenFrac * 255);
2181 # var blue = Math.floor(blueFrac * 255);
2182 #
2183 # if (!('alpha' in rgb_color)) {
2184 # return rgbToCssColor_(red, green, blue);
2185 # }
2186 #
2187 # var alphaFrac = rgb_color.alpha.value || 0.0;
2188 # var rgbParams = [red, green, blue].join(',');
2189 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2190 # };
2191 #
2192 # var rgbToCssColor_ = function(red, green, blue) {
2193 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2194 # var hexString = rgbNumber.toString(16);
2195 # var missingZeros = 6 - hexString.length;
2196 # var resultBuilder = ['#'];
2197 # for (var i = 0; i < missingZeros; i++) {
2198 # resultBuilder.push('0');
2199 # }
2200 # resultBuilder.push(hexString);
2201 # return resultBuilder.join('');
2202 # };
2203 #
2204 # // ...
2205 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2206 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2207 # the final pixel color is defined by the equation:
2208 #
2209 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2210 #
2211 # This means that a value of 1.0 corresponds to a solid color, whereas
2212 # a value of 0.0 corresponds to a completely transparent color. This
2213 # uses a wrapper message rather than a simple float scalar so that it is
2214 # possible to distinguish between a default value and the value being unset.
2215 # If omitted, this color object is to be rendered as a solid color
2216 # (as if the alpha value had been explicitly given with a value of 1.0).
2217 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2218 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2219 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002220 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002221 "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).
2222 # Absent values indicate that the field isn't specified.
2223 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
2224 # for simplicity of conversion to/from color representations in various
2225 # languages over compactness; for example, the fields of this representation
2226 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2227 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2228 # method in iOS; and, with just a little work, it can be easily formatted into
2229 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2230 #
2231 # Example (Java):
2232 #
2233 # import com.google.type.Color;
2234 #
2235 # // ...
2236 # public static java.awt.Color fromProto(Color protocolor) {
2237 # float alpha = protocolor.hasAlpha()
2238 # ? protocolor.getAlpha().getValue()
2239 # : 1.0;
2240 #
2241 # return new java.awt.Color(
2242 # protocolor.getRed(),
2243 # protocolor.getGreen(),
2244 # protocolor.getBlue(),
2245 # alpha);
2246 # }
2247 #
2248 # public static Color toProto(java.awt.Color color) {
2249 # float red = (float) color.getRed();
2250 # float green = (float) color.getGreen();
2251 # float blue = (float) color.getBlue();
2252 # float denominator = 255.0;
2253 # Color.Builder resultBuilder =
2254 # Color
2255 # .newBuilder()
2256 # .setRed(red / denominator)
2257 # .setGreen(green / denominator)
2258 # .setBlue(blue / denominator);
2259 # int alpha = color.getAlpha();
2260 # if (alpha != 255) {
2261 # result.setAlpha(
2262 # FloatValue
2263 # .newBuilder()
2264 # .setValue(((float) alpha) / denominator)
2265 # .build());
2266 # }
2267 # return resultBuilder.build();
2268 # }
2269 # // ...
2270 #
2271 # Example (iOS / Obj-C):
2272 #
2273 # // ...
2274 # static UIColor* fromProto(Color* protocolor) {
2275 # float red = [protocolor red];
2276 # float green = [protocolor green];
2277 # float blue = [protocolor blue];
2278 # FloatValue* alpha_wrapper = [protocolor alpha];
2279 # float alpha = 1.0;
2280 # if (alpha_wrapper != nil) {
2281 # alpha = [alpha_wrapper value];
2282 # }
2283 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2284 # }
2285 #
2286 # static Color* toProto(UIColor* color) {
2287 # CGFloat red, green, blue, alpha;
2288 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2289 # return nil;
2290 # }
2291 # Color* result = [Color alloc] init];
2292 # [result setRed:red];
2293 # [result setGreen:green];
2294 # [result setBlue:blue];
2295 # if (alpha <= 0.9999) {
2296 # [result setAlpha:floatWrapperWithValue(alpha)];
2297 # }
2298 # [result autorelease];
2299 # return result;
2300 # }
2301 # // ...
2302 #
2303 # Example (JavaScript):
2304 #
2305 # // ...
2306 #
2307 # var protoToCssColor = function(rgb_color) {
2308 # var redFrac = rgb_color.red || 0.0;
2309 # var greenFrac = rgb_color.green || 0.0;
2310 # var blueFrac = rgb_color.blue || 0.0;
2311 # var red = Math.floor(redFrac * 255);
2312 # var green = Math.floor(greenFrac * 255);
2313 # var blue = Math.floor(blueFrac * 255);
2314 #
2315 # if (!('alpha' in rgb_color)) {
2316 # return rgbToCssColor_(red, green, blue);
2317 # }
2318 #
2319 # var alphaFrac = rgb_color.alpha.value || 0.0;
2320 # var rgbParams = [red, green, blue].join(',');
2321 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2322 # };
2323 #
2324 # var rgbToCssColor_ = function(red, green, blue) {
2325 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2326 # var hexString = rgbNumber.toString(16);
2327 # var missingZeros = 6 - hexString.length;
2328 # var resultBuilder = ['#'];
2329 # for (var i = 0; i < missingZeros; i++) {
2330 # resultBuilder.push('0');
2331 # }
2332 # resultBuilder.push(hexString);
2333 # return resultBuilder.join('');
2334 # };
2335 #
2336 # // ...
2337 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2338 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2339 # the final pixel color is defined by the equation:
2340 #
2341 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2342 #
2343 # This means that a value of 1.0 corresponds to a solid color, whereas
2344 # a value of 0.0 corresponds to a completely transparent color. This
2345 # uses a wrapper message rather than a simple float scalar so that it is
2346 # possible to distinguish between a default value and the value being unset.
2347 # If omitted, this color object is to be rendered as a solid color
2348 # (as if the alpha value had been explicitly given with a value of 1.0).
2349 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2350 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2351 },
2352 "bold": True or False, # True if the text is bold.
2353 "strikethrough": True or False, # True if the text has a strikethrough.
2354 "fontFamily": "A String", # The font family.
2355 "fontSize": 42, # The size of the font.
2356 "italic": True or False, # True if the text is italicized.
2357 "underline": True or False, # True if the text is underlined.
2358 },
2359 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
2360 "borders": { # The borders of the cell. # The borders of the cell.
2361 "top": { # A border along a cell. # The top border of the cell.
2362 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2363 # for simplicity of conversion to/from color representations in various
2364 # languages over compactness; for example, the fields of this representation
2365 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2366 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2367 # method in iOS; and, with just a little work, it can be easily formatted into
2368 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2369 #
2370 # Example (Java):
2371 #
2372 # import com.google.type.Color;
2373 #
2374 # // ...
2375 # public static java.awt.Color fromProto(Color protocolor) {
2376 # float alpha = protocolor.hasAlpha()
2377 # ? protocolor.getAlpha().getValue()
2378 # : 1.0;
2379 #
2380 # return new java.awt.Color(
2381 # protocolor.getRed(),
2382 # protocolor.getGreen(),
2383 # protocolor.getBlue(),
2384 # alpha);
2385 # }
2386 #
2387 # public static Color toProto(java.awt.Color color) {
2388 # float red = (float) color.getRed();
2389 # float green = (float) color.getGreen();
2390 # float blue = (float) color.getBlue();
2391 # float denominator = 255.0;
2392 # Color.Builder resultBuilder =
2393 # Color
2394 # .newBuilder()
2395 # .setRed(red / denominator)
2396 # .setGreen(green / denominator)
2397 # .setBlue(blue / denominator);
2398 # int alpha = color.getAlpha();
2399 # if (alpha != 255) {
2400 # result.setAlpha(
2401 # FloatValue
2402 # .newBuilder()
2403 # .setValue(((float) alpha) / denominator)
2404 # .build());
2405 # }
2406 # return resultBuilder.build();
2407 # }
2408 # // ...
2409 #
2410 # Example (iOS / Obj-C):
2411 #
2412 # // ...
2413 # static UIColor* fromProto(Color* protocolor) {
2414 # float red = [protocolor red];
2415 # float green = [protocolor green];
2416 # float blue = [protocolor blue];
2417 # FloatValue* alpha_wrapper = [protocolor alpha];
2418 # float alpha = 1.0;
2419 # if (alpha_wrapper != nil) {
2420 # alpha = [alpha_wrapper value];
2421 # }
2422 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2423 # }
2424 #
2425 # static Color* toProto(UIColor* color) {
2426 # CGFloat red, green, blue, alpha;
2427 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2428 # return nil;
2429 # }
2430 # Color* result = [Color alloc] init];
2431 # [result setRed:red];
2432 # [result setGreen:green];
2433 # [result setBlue:blue];
2434 # if (alpha <= 0.9999) {
2435 # [result setAlpha:floatWrapperWithValue(alpha)];
2436 # }
2437 # [result autorelease];
2438 # return result;
2439 # }
2440 # // ...
2441 #
2442 # Example (JavaScript):
2443 #
2444 # // ...
2445 #
2446 # var protoToCssColor = function(rgb_color) {
2447 # var redFrac = rgb_color.red || 0.0;
2448 # var greenFrac = rgb_color.green || 0.0;
2449 # var blueFrac = rgb_color.blue || 0.0;
2450 # var red = Math.floor(redFrac * 255);
2451 # var green = Math.floor(greenFrac * 255);
2452 # var blue = Math.floor(blueFrac * 255);
2453 #
2454 # if (!('alpha' in rgb_color)) {
2455 # return rgbToCssColor_(red, green, blue);
2456 # }
2457 #
2458 # var alphaFrac = rgb_color.alpha.value || 0.0;
2459 # var rgbParams = [red, green, blue].join(',');
2460 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2461 # };
2462 #
2463 # var rgbToCssColor_ = function(red, green, blue) {
2464 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2465 # var hexString = rgbNumber.toString(16);
2466 # var missingZeros = 6 - hexString.length;
2467 # var resultBuilder = ['#'];
2468 # for (var i = 0; i < missingZeros; i++) {
2469 # resultBuilder.push('0');
2470 # }
2471 # resultBuilder.push(hexString);
2472 # return resultBuilder.join('');
2473 # };
2474 #
2475 # // ...
2476 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2477 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2478 # the final pixel color is defined by the equation:
2479 #
2480 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2481 #
2482 # This means that a value of 1.0 corresponds to a solid color, whereas
2483 # a value of 0.0 corresponds to a completely transparent color. This
2484 # uses a wrapper message rather than a simple float scalar so that it is
2485 # possible to distinguish between a default value and the value being unset.
2486 # If omitted, this color object is to be rendered as a solid color
2487 # (as if the alpha value had been explicitly given with a value of 1.0).
2488 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2489 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2490 },
2491 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002492 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002493 "style": "A String", # The style of the border.
2494 },
2495 "right": { # A border along a cell. # The right border of the cell.
2496 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2497 # for simplicity of conversion to/from color representations in various
2498 # languages over compactness; for example, the fields of this representation
2499 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2500 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2501 # method in iOS; and, with just a little work, it can be easily formatted into
2502 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2503 #
2504 # Example (Java):
2505 #
2506 # import com.google.type.Color;
2507 #
2508 # // ...
2509 # public static java.awt.Color fromProto(Color protocolor) {
2510 # float alpha = protocolor.hasAlpha()
2511 # ? protocolor.getAlpha().getValue()
2512 # : 1.0;
2513 #
2514 # return new java.awt.Color(
2515 # protocolor.getRed(),
2516 # protocolor.getGreen(),
2517 # protocolor.getBlue(),
2518 # alpha);
2519 # }
2520 #
2521 # public static Color toProto(java.awt.Color color) {
2522 # float red = (float) color.getRed();
2523 # float green = (float) color.getGreen();
2524 # float blue = (float) color.getBlue();
2525 # float denominator = 255.0;
2526 # Color.Builder resultBuilder =
2527 # Color
2528 # .newBuilder()
2529 # .setRed(red / denominator)
2530 # .setGreen(green / denominator)
2531 # .setBlue(blue / denominator);
2532 # int alpha = color.getAlpha();
2533 # if (alpha != 255) {
2534 # result.setAlpha(
2535 # FloatValue
2536 # .newBuilder()
2537 # .setValue(((float) alpha) / denominator)
2538 # .build());
2539 # }
2540 # return resultBuilder.build();
2541 # }
2542 # // ...
2543 #
2544 # Example (iOS / Obj-C):
2545 #
2546 # // ...
2547 # static UIColor* fromProto(Color* protocolor) {
2548 # float red = [protocolor red];
2549 # float green = [protocolor green];
2550 # float blue = [protocolor blue];
2551 # FloatValue* alpha_wrapper = [protocolor alpha];
2552 # float alpha = 1.0;
2553 # if (alpha_wrapper != nil) {
2554 # alpha = [alpha_wrapper value];
2555 # }
2556 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2557 # }
2558 #
2559 # static Color* toProto(UIColor* color) {
2560 # CGFloat red, green, blue, alpha;
2561 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2562 # return nil;
2563 # }
2564 # Color* result = [Color alloc] init];
2565 # [result setRed:red];
2566 # [result setGreen:green];
2567 # [result setBlue:blue];
2568 # if (alpha <= 0.9999) {
2569 # [result setAlpha:floatWrapperWithValue(alpha)];
2570 # }
2571 # [result autorelease];
2572 # return result;
2573 # }
2574 # // ...
2575 #
2576 # Example (JavaScript):
2577 #
2578 # // ...
2579 #
2580 # var protoToCssColor = function(rgb_color) {
2581 # var redFrac = rgb_color.red || 0.0;
2582 # var greenFrac = rgb_color.green || 0.0;
2583 # var blueFrac = rgb_color.blue || 0.0;
2584 # var red = Math.floor(redFrac * 255);
2585 # var green = Math.floor(greenFrac * 255);
2586 # var blue = Math.floor(blueFrac * 255);
2587 #
2588 # if (!('alpha' in rgb_color)) {
2589 # return rgbToCssColor_(red, green, blue);
2590 # }
2591 #
2592 # var alphaFrac = rgb_color.alpha.value || 0.0;
2593 # var rgbParams = [red, green, blue].join(',');
2594 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2595 # };
2596 #
2597 # var rgbToCssColor_ = function(red, green, blue) {
2598 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2599 # var hexString = rgbNumber.toString(16);
2600 # var missingZeros = 6 - hexString.length;
2601 # var resultBuilder = ['#'];
2602 # for (var i = 0; i < missingZeros; i++) {
2603 # resultBuilder.push('0');
2604 # }
2605 # resultBuilder.push(hexString);
2606 # return resultBuilder.join('');
2607 # };
2608 #
2609 # // ...
2610 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2611 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2612 # the final pixel color is defined by the equation:
2613 #
2614 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2615 #
2616 # This means that a value of 1.0 corresponds to a solid color, whereas
2617 # a value of 0.0 corresponds to a completely transparent color. This
2618 # uses a wrapper message rather than a simple float scalar so that it is
2619 # possible to distinguish between a default value and the value being unset.
2620 # If omitted, this color object is to be rendered as a solid color
2621 # (as if the alpha value had been explicitly given with a value of 1.0).
2622 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2623 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2624 },
2625 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002626 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002627 "style": "A String", # The style of the border.
2628 },
2629 "bottom": { # A border along a cell. # The bottom border of the cell.
2630 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2631 # for simplicity of conversion to/from color representations in various
2632 # languages over compactness; for example, the fields of this representation
2633 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2634 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2635 # method in iOS; and, with just a little work, it can be easily formatted into
2636 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2637 #
2638 # Example (Java):
2639 #
2640 # import com.google.type.Color;
2641 #
2642 # // ...
2643 # public static java.awt.Color fromProto(Color protocolor) {
2644 # float alpha = protocolor.hasAlpha()
2645 # ? protocolor.getAlpha().getValue()
2646 # : 1.0;
2647 #
2648 # return new java.awt.Color(
2649 # protocolor.getRed(),
2650 # protocolor.getGreen(),
2651 # protocolor.getBlue(),
2652 # alpha);
2653 # }
2654 #
2655 # public static Color toProto(java.awt.Color color) {
2656 # float red = (float) color.getRed();
2657 # float green = (float) color.getGreen();
2658 # float blue = (float) color.getBlue();
2659 # float denominator = 255.0;
2660 # Color.Builder resultBuilder =
2661 # Color
2662 # .newBuilder()
2663 # .setRed(red / denominator)
2664 # .setGreen(green / denominator)
2665 # .setBlue(blue / denominator);
2666 # int alpha = color.getAlpha();
2667 # if (alpha != 255) {
2668 # result.setAlpha(
2669 # FloatValue
2670 # .newBuilder()
2671 # .setValue(((float) alpha) / denominator)
2672 # .build());
2673 # }
2674 # return resultBuilder.build();
2675 # }
2676 # // ...
2677 #
2678 # Example (iOS / Obj-C):
2679 #
2680 # // ...
2681 # static UIColor* fromProto(Color* protocolor) {
2682 # float red = [protocolor red];
2683 # float green = [protocolor green];
2684 # float blue = [protocolor blue];
2685 # FloatValue* alpha_wrapper = [protocolor alpha];
2686 # float alpha = 1.0;
2687 # if (alpha_wrapper != nil) {
2688 # alpha = [alpha_wrapper value];
2689 # }
2690 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2691 # }
2692 #
2693 # static Color* toProto(UIColor* color) {
2694 # CGFloat red, green, blue, alpha;
2695 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2696 # return nil;
2697 # }
2698 # Color* result = [Color alloc] init];
2699 # [result setRed:red];
2700 # [result setGreen:green];
2701 # [result setBlue:blue];
2702 # if (alpha <= 0.9999) {
2703 # [result setAlpha:floatWrapperWithValue(alpha)];
2704 # }
2705 # [result autorelease];
2706 # return result;
2707 # }
2708 # // ...
2709 #
2710 # Example (JavaScript):
2711 #
2712 # // ...
2713 #
2714 # var protoToCssColor = function(rgb_color) {
2715 # var redFrac = rgb_color.red || 0.0;
2716 # var greenFrac = rgb_color.green || 0.0;
2717 # var blueFrac = rgb_color.blue || 0.0;
2718 # var red = Math.floor(redFrac * 255);
2719 # var green = Math.floor(greenFrac * 255);
2720 # var blue = Math.floor(blueFrac * 255);
2721 #
2722 # if (!('alpha' in rgb_color)) {
2723 # return rgbToCssColor_(red, green, blue);
2724 # }
2725 #
2726 # var alphaFrac = rgb_color.alpha.value || 0.0;
2727 # var rgbParams = [red, green, blue].join(',');
2728 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2729 # };
2730 #
2731 # var rgbToCssColor_ = function(red, green, blue) {
2732 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2733 # var hexString = rgbNumber.toString(16);
2734 # var missingZeros = 6 - hexString.length;
2735 # var resultBuilder = ['#'];
2736 # for (var i = 0; i < missingZeros; i++) {
2737 # resultBuilder.push('0');
2738 # }
2739 # resultBuilder.push(hexString);
2740 # return resultBuilder.join('');
2741 # };
2742 #
2743 # // ...
2744 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2745 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2746 # the final pixel color is defined by the equation:
2747 #
2748 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2749 #
2750 # This means that a value of 1.0 corresponds to a solid color, whereas
2751 # a value of 0.0 corresponds to a completely transparent color. This
2752 # uses a wrapper message rather than a simple float scalar so that it is
2753 # possible to distinguish between a default value and the value being unset.
2754 # If omitted, this color object is to be rendered as a solid color
2755 # (as if the alpha value had been explicitly given with a value of 1.0).
2756 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2757 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2758 },
2759 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002760 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002761 "style": "A String", # The style of the border.
2762 },
2763 "left": { # A border along a cell. # The left border of the cell.
2764 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2765 # for simplicity of conversion to/from color representations in various
2766 # languages over compactness; for example, the fields of this representation
2767 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2768 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2769 # method in iOS; and, with just a little work, it can be easily formatted into
2770 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2771 #
2772 # Example (Java):
2773 #
2774 # import com.google.type.Color;
2775 #
2776 # // ...
2777 # public static java.awt.Color fromProto(Color protocolor) {
2778 # float alpha = protocolor.hasAlpha()
2779 # ? protocolor.getAlpha().getValue()
2780 # : 1.0;
2781 #
2782 # return new java.awt.Color(
2783 # protocolor.getRed(),
2784 # protocolor.getGreen(),
2785 # protocolor.getBlue(),
2786 # alpha);
2787 # }
2788 #
2789 # public static Color toProto(java.awt.Color color) {
2790 # float red = (float) color.getRed();
2791 # float green = (float) color.getGreen();
2792 # float blue = (float) color.getBlue();
2793 # float denominator = 255.0;
2794 # Color.Builder resultBuilder =
2795 # Color
2796 # .newBuilder()
2797 # .setRed(red / denominator)
2798 # .setGreen(green / denominator)
2799 # .setBlue(blue / denominator);
2800 # int alpha = color.getAlpha();
2801 # if (alpha != 255) {
2802 # result.setAlpha(
2803 # FloatValue
2804 # .newBuilder()
2805 # .setValue(((float) alpha) / denominator)
2806 # .build());
2807 # }
2808 # return resultBuilder.build();
2809 # }
2810 # // ...
2811 #
2812 # Example (iOS / Obj-C):
2813 #
2814 # // ...
2815 # static UIColor* fromProto(Color* protocolor) {
2816 # float red = [protocolor red];
2817 # float green = [protocolor green];
2818 # float blue = [protocolor blue];
2819 # FloatValue* alpha_wrapper = [protocolor alpha];
2820 # float alpha = 1.0;
2821 # if (alpha_wrapper != nil) {
2822 # alpha = [alpha_wrapper value];
2823 # }
2824 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2825 # }
2826 #
2827 # static Color* toProto(UIColor* color) {
2828 # CGFloat red, green, blue, alpha;
2829 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2830 # return nil;
2831 # }
2832 # Color* result = [Color alloc] init];
2833 # [result setRed:red];
2834 # [result setGreen:green];
2835 # [result setBlue:blue];
2836 # if (alpha <= 0.9999) {
2837 # [result setAlpha:floatWrapperWithValue(alpha)];
2838 # }
2839 # [result autorelease];
2840 # return result;
2841 # }
2842 # // ...
2843 #
2844 # Example (JavaScript):
2845 #
2846 # // ...
2847 #
2848 # var protoToCssColor = function(rgb_color) {
2849 # var redFrac = rgb_color.red || 0.0;
2850 # var greenFrac = rgb_color.green || 0.0;
2851 # var blueFrac = rgb_color.blue || 0.0;
2852 # var red = Math.floor(redFrac * 255);
2853 # var green = Math.floor(greenFrac * 255);
2854 # var blue = Math.floor(blueFrac * 255);
2855 #
2856 # if (!('alpha' in rgb_color)) {
2857 # return rgbToCssColor_(red, green, blue);
2858 # }
2859 #
2860 # var alphaFrac = rgb_color.alpha.value || 0.0;
2861 # var rgbParams = [red, green, blue].join(',');
2862 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2863 # };
2864 #
2865 # var rgbToCssColor_ = function(red, green, blue) {
2866 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2867 # var hexString = rgbNumber.toString(16);
2868 # var missingZeros = 6 - hexString.length;
2869 # var resultBuilder = ['#'];
2870 # for (var i = 0; i < missingZeros; i++) {
2871 # resultBuilder.push('0');
2872 # }
2873 # resultBuilder.push(hexString);
2874 # return resultBuilder.join('');
2875 # };
2876 #
2877 # // ...
2878 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2879 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2880 # the final pixel color is defined by the equation:
2881 #
2882 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2883 #
2884 # This means that a value of 1.0 corresponds to a solid color, whereas
2885 # a value of 0.0 corresponds to a completely transparent color. This
2886 # uses a wrapper message rather than a simple float scalar so that it is
2887 # possible to distinguish between a default value and the value being unset.
2888 # If omitted, this color object is to be rendered as a solid color
2889 # (as if the alpha value had been explicitly given with a value of 1.0).
2890 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2891 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2892 },
2893 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002894 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002895 "style": "A String", # The style of the border.
2896 },
2897 },
2898 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
2899 },
2900 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
2901 #
2902 # When writing, the new format will be merged with the existing format.
2903 "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 -07002904 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
2905 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07002906 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
2907 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002908 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002909 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002910 },
2911 "textDirection": "A String", # The direction of the text in the cell.
2912 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
2913 # When updating padding, every field must be specified.
2914 "top": 42, # The top padding of the cell.
2915 "right": 42, # The right padding of the cell.
2916 "bottom": 42, # The bottom padding of the cell.
2917 "left": 42, # The left padding of the cell.
2918 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002919 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002920 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
2921 # for simplicity of conversion to/from color representations in various
2922 # languages over compactness; for example, the fields of this representation
2923 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2924 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2925 # method in iOS; and, with just a little work, it can be easily formatted into
2926 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2927 #
2928 # Example (Java):
2929 #
2930 # import com.google.type.Color;
2931 #
2932 # // ...
2933 # public static java.awt.Color fromProto(Color protocolor) {
2934 # float alpha = protocolor.hasAlpha()
2935 # ? protocolor.getAlpha().getValue()
2936 # : 1.0;
2937 #
2938 # return new java.awt.Color(
2939 # protocolor.getRed(),
2940 # protocolor.getGreen(),
2941 # protocolor.getBlue(),
2942 # alpha);
2943 # }
2944 #
2945 # public static Color toProto(java.awt.Color color) {
2946 # float red = (float) color.getRed();
2947 # float green = (float) color.getGreen();
2948 # float blue = (float) color.getBlue();
2949 # float denominator = 255.0;
2950 # Color.Builder resultBuilder =
2951 # Color
2952 # .newBuilder()
2953 # .setRed(red / denominator)
2954 # .setGreen(green / denominator)
2955 # .setBlue(blue / denominator);
2956 # int alpha = color.getAlpha();
2957 # if (alpha != 255) {
2958 # result.setAlpha(
2959 # FloatValue
2960 # .newBuilder()
2961 # .setValue(((float) alpha) / denominator)
2962 # .build());
2963 # }
2964 # return resultBuilder.build();
2965 # }
2966 # // ...
2967 #
2968 # Example (iOS / Obj-C):
2969 #
2970 # // ...
2971 # static UIColor* fromProto(Color* protocolor) {
2972 # float red = [protocolor red];
2973 # float green = [protocolor green];
2974 # float blue = [protocolor blue];
2975 # FloatValue* alpha_wrapper = [protocolor alpha];
2976 # float alpha = 1.0;
2977 # if (alpha_wrapper != nil) {
2978 # alpha = [alpha_wrapper value];
2979 # }
2980 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2981 # }
2982 #
2983 # static Color* toProto(UIColor* color) {
2984 # CGFloat red, green, blue, alpha;
2985 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2986 # return nil;
2987 # }
2988 # Color* result = [Color alloc] init];
2989 # [result setRed:red];
2990 # [result setGreen:green];
2991 # [result setBlue:blue];
2992 # if (alpha <= 0.9999) {
2993 # [result setAlpha:floatWrapperWithValue(alpha)];
2994 # }
2995 # [result autorelease];
2996 # return result;
2997 # }
2998 # // ...
2999 #
3000 # Example (JavaScript):
3001 #
3002 # // ...
3003 #
3004 # var protoToCssColor = function(rgb_color) {
3005 # var redFrac = rgb_color.red || 0.0;
3006 # var greenFrac = rgb_color.green || 0.0;
3007 # var blueFrac = rgb_color.blue || 0.0;
3008 # var red = Math.floor(redFrac * 255);
3009 # var green = Math.floor(greenFrac * 255);
3010 # var blue = Math.floor(blueFrac * 255);
3011 #
3012 # if (!('alpha' in rgb_color)) {
3013 # return rgbToCssColor_(red, green, blue);
3014 # }
3015 #
3016 # var alphaFrac = rgb_color.alpha.value || 0.0;
3017 # var rgbParams = [red, green, blue].join(',');
3018 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3019 # };
3020 #
3021 # var rgbToCssColor_ = function(red, green, blue) {
3022 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3023 # var hexString = rgbNumber.toString(16);
3024 # var missingZeros = 6 - hexString.length;
3025 # var resultBuilder = ['#'];
3026 # for (var i = 0; i < missingZeros; i++) {
3027 # resultBuilder.push('0');
3028 # }
3029 # resultBuilder.push(hexString);
3030 # return resultBuilder.join('');
3031 # };
3032 #
3033 # // ...
3034 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3035 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3036 # the final pixel color is defined by the equation:
3037 #
3038 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3039 #
3040 # This means that a value of 1.0 corresponds to a solid color, whereas
3041 # a value of 0.0 corresponds to a completely transparent color. This
3042 # uses a wrapper message rather than a simple float scalar so that it is
3043 # possible to distinguish between a default value and the value being unset.
3044 # If omitted, this color object is to be rendered as a solid color
3045 # (as if the alpha value had been explicitly given with a value of 1.0).
3046 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3047 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3048 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003049 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003050 "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).
3051 # Absent values indicate that the field isn't specified.
3052 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
3053 # for simplicity of conversion to/from color representations in various
3054 # languages over compactness; for example, the fields of this representation
3055 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3056 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3057 # method in iOS; and, with just a little work, it can be easily formatted into
3058 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3059 #
3060 # Example (Java):
3061 #
3062 # import com.google.type.Color;
3063 #
3064 # // ...
3065 # public static java.awt.Color fromProto(Color protocolor) {
3066 # float alpha = protocolor.hasAlpha()
3067 # ? protocolor.getAlpha().getValue()
3068 # : 1.0;
3069 #
3070 # return new java.awt.Color(
3071 # protocolor.getRed(),
3072 # protocolor.getGreen(),
3073 # protocolor.getBlue(),
3074 # alpha);
3075 # }
3076 #
3077 # public static Color toProto(java.awt.Color color) {
3078 # float red = (float) color.getRed();
3079 # float green = (float) color.getGreen();
3080 # float blue = (float) color.getBlue();
3081 # float denominator = 255.0;
3082 # Color.Builder resultBuilder =
3083 # Color
3084 # .newBuilder()
3085 # .setRed(red / denominator)
3086 # .setGreen(green / denominator)
3087 # .setBlue(blue / denominator);
3088 # int alpha = color.getAlpha();
3089 # if (alpha != 255) {
3090 # result.setAlpha(
3091 # FloatValue
3092 # .newBuilder()
3093 # .setValue(((float) alpha) / denominator)
3094 # .build());
3095 # }
3096 # return resultBuilder.build();
3097 # }
3098 # // ...
3099 #
3100 # Example (iOS / Obj-C):
3101 #
3102 # // ...
3103 # static UIColor* fromProto(Color* protocolor) {
3104 # float red = [protocolor red];
3105 # float green = [protocolor green];
3106 # float blue = [protocolor blue];
3107 # FloatValue* alpha_wrapper = [protocolor alpha];
3108 # float alpha = 1.0;
3109 # if (alpha_wrapper != nil) {
3110 # alpha = [alpha_wrapper value];
3111 # }
3112 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3113 # }
3114 #
3115 # static Color* toProto(UIColor* color) {
3116 # CGFloat red, green, blue, alpha;
3117 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3118 # return nil;
3119 # }
3120 # Color* result = [Color alloc] init];
3121 # [result setRed:red];
3122 # [result setGreen:green];
3123 # [result setBlue:blue];
3124 # if (alpha <= 0.9999) {
3125 # [result setAlpha:floatWrapperWithValue(alpha)];
3126 # }
3127 # [result autorelease];
3128 # return result;
3129 # }
3130 # // ...
3131 #
3132 # Example (JavaScript):
3133 #
3134 # // ...
3135 #
3136 # var protoToCssColor = function(rgb_color) {
3137 # var redFrac = rgb_color.red || 0.0;
3138 # var greenFrac = rgb_color.green || 0.0;
3139 # var blueFrac = rgb_color.blue || 0.0;
3140 # var red = Math.floor(redFrac * 255);
3141 # var green = Math.floor(greenFrac * 255);
3142 # var blue = Math.floor(blueFrac * 255);
3143 #
3144 # if (!('alpha' in rgb_color)) {
3145 # return rgbToCssColor_(red, green, blue);
3146 # }
3147 #
3148 # var alphaFrac = rgb_color.alpha.value || 0.0;
3149 # var rgbParams = [red, green, blue].join(',');
3150 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3151 # };
3152 #
3153 # var rgbToCssColor_ = function(red, green, blue) {
3154 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3155 # var hexString = rgbNumber.toString(16);
3156 # var missingZeros = 6 - hexString.length;
3157 # var resultBuilder = ['#'];
3158 # for (var i = 0; i < missingZeros; i++) {
3159 # resultBuilder.push('0');
3160 # }
3161 # resultBuilder.push(hexString);
3162 # return resultBuilder.join('');
3163 # };
3164 #
3165 # // ...
3166 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3167 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3168 # the final pixel color is defined by the equation:
3169 #
3170 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3171 #
3172 # This means that a value of 1.0 corresponds to a solid color, whereas
3173 # a value of 0.0 corresponds to a completely transparent color. This
3174 # uses a wrapper message rather than a simple float scalar so that it is
3175 # possible to distinguish between a default value and the value being unset.
3176 # If omitted, this color object is to be rendered as a solid color
3177 # (as if the alpha value had been explicitly given with a value of 1.0).
3178 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3179 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3180 },
3181 "bold": True or False, # True if the text is bold.
3182 "strikethrough": True or False, # True if the text has a strikethrough.
3183 "fontFamily": "A String", # The font family.
3184 "fontSize": 42, # The size of the font.
3185 "italic": True or False, # True if the text is italicized.
3186 "underline": True or False, # True if the text is underlined.
3187 },
3188 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
3189 "borders": { # The borders of the cell. # The borders of the cell.
3190 "top": { # A border along a cell. # The top border of the cell.
3191 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3192 # for simplicity of conversion to/from color representations in various
3193 # languages over compactness; for example, the fields of this representation
3194 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3195 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3196 # method in iOS; and, with just a little work, it can be easily formatted into
3197 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3198 #
3199 # Example (Java):
3200 #
3201 # import com.google.type.Color;
3202 #
3203 # // ...
3204 # public static java.awt.Color fromProto(Color protocolor) {
3205 # float alpha = protocolor.hasAlpha()
3206 # ? protocolor.getAlpha().getValue()
3207 # : 1.0;
3208 #
3209 # return new java.awt.Color(
3210 # protocolor.getRed(),
3211 # protocolor.getGreen(),
3212 # protocolor.getBlue(),
3213 # alpha);
3214 # }
3215 #
3216 # public static Color toProto(java.awt.Color color) {
3217 # float red = (float) color.getRed();
3218 # float green = (float) color.getGreen();
3219 # float blue = (float) color.getBlue();
3220 # float denominator = 255.0;
3221 # Color.Builder resultBuilder =
3222 # Color
3223 # .newBuilder()
3224 # .setRed(red / denominator)
3225 # .setGreen(green / denominator)
3226 # .setBlue(blue / denominator);
3227 # int alpha = color.getAlpha();
3228 # if (alpha != 255) {
3229 # result.setAlpha(
3230 # FloatValue
3231 # .newBuilder()
3232 # .setValue(((float) alpha) / denominator)
3233 # .build());
3234 # }
3235 # return resultBuilder.build();
3236 # }
3237 # // ...
3238 #
3239 # Example (iOS / Obj-C):
3240 #
3241 # // ...
3242 # static UIColor* fromProto(Color* protocolor) {
3243 # float red = [protocolor red];
3244 # float green = [protocolor green];
3245 # float blue = [protocolor blue];
3246 # FloatValue* alpha_wrapper = [protocolor alpha];
3247 # float alpha = 1.0;
3248 # if (alpha_wrapper != nil) {
3249 # alpha = [alpha_wrapper value];
3250 # }
3251 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3252 # }
3253 #
3254 # static Color* toProto(UIColor* color) {
3255 # CGFloat red, green, blue, alpha;
3256 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3257 # return nil;
3258 # }
3259 # Color* result = [Color alloc] init];
3260 # [result setRed:red];
3261 # [result setGreen:green];
3262 # [result setBlue:blue];
3263 # if (alpha <= 0.9999) {
3264 # [result setAlpha:floatWrapperWithValue(alpha)];
3265 # }
3266 # [result autorelease];
3267 # return result;
3268 # }
3269 # // ...
3270 #
3271 # Example (JavaScript):
3272 #
3273 # // ...
3274 #
3275 # var protoToCssColor = function(rgb_color) {
3276 # var redFrac = rgb_color.red || 0.0;
3277 # var greenFrac = rgb_color.green || 0.0;
3278 # var blueFrac = rgb_color.blue || 0.0;
3279 # var red = Math.floor(redFrac * 255);
3280 # var green = Math.floor(greenFrac * 255);
3281 # var blue = Math.floor(blueFrac * 255);
3282 #
3283 # if (!('alpha' in rgb_color)) {
3284 # return rgbToCssColor_(red, green, blue);
3285 # }
3286 #
3287 # var alphaFrac = rgb_color.alpha.value || 0.0;
3288 # var rgbParams = [red, green, blue].join(',');
3289 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3290 # };
3291 #
3292 # var rgbToCssColor_ = function(red, green, blue) {
3293 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3294 # var hexString = rgbNumber.toString(16);
3295 # var missingZeros = 6 - hexString.length;
3296 # var resultBuilder = ['#'];
3297 # for (var i = 0; i < missingZeros; i++) {
3298 # resultBuilder.push('0');
3299 # }
3300 # resultBuilder.push(hexString);
3301 # return resultBuilder.join('');
3302 # };
3303 #
3304 # // ...
3305 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3306 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3307 # the final pixel color is defined by the equation:
3308 #
3309 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3310 #
3311 # This means that a value of 1.0 corresponds to a solid color, whereas
3312 # a value of 0.0 corresponds to a completely transparent color. This
3313 # uses a wrapper message rather than a simple float scalar so that it is
3314 # possible to distinguish between a default value and the value being unset.
3315 # If omitted, this color object is to be rendered as a solid color
3316 # (as if the alpha value had been explicitly given with a value of 1.0).
3317 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3318 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3319 },
3320 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003321 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003322 "style": "A String", # The style of the border.
3323 },
3324 "right": { # A border along a cell. # The right border of the cell.
3325 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3326 # for simplicity of conversion to/from color representations in various
3327 # languages over compactness; for example, the fields of this representation
3328 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3329 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3330 # method in iOS; and, with just a little work, it can be easily formatted into
3331 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3332 #
3333 # Example (Java):
3334 #
3335 # import com.google.type.Color;
3336 #
3337 # // ...
3338 # public static java.awt.Color fromProto(Color protocolor) {
3339 # float alpha = protocolor.hasAlpha()
3340 # ? protocolor.getAlpha().getValue()
3341 # : 1.0;
3342 #
3343 # return new java.awt.Color(
3344 # protocolor.getRed(),
3345 # protocolor.getGreen(),
3346 # protocolor.getBlue(),
3347 # alpha);
3348 # }
3349 #
3350 # public static Color toProto(java.awt.Color color) {
3351 # float red = (float) color.getRed();
3352 # float green = (float) color.getGreen();
3353 # float blue = (float) color.getBlue();
3354 # float denominator = 255.0;
3355 # Color.Builder resultBuilder =
3356 # Color
3357 # .newBuilder()
3358 # .setRed(red / denominator)
3359 # .setGreen(green / denominator)
3360 # .setBlue(blue / denominator);
3361 # int alpha = color.getAlpha();
3362 # if (alpha != 255) {
3363 # result.setAlpha(
3364 # FloatValue
3365 # .newBuilder()
3366 # .setValue(((float) alpha) / denominator)
3367 # .build());
3368 # }
3369 # return resultBuilder.build();
3370 # }
3371 # // ...
3372 #
3373 # Example (iOS / Obj-C):
3374 #
3375 # // ...
3376 # static UIColor* fromProto(Color* protocolor) {
3377 # float red = [protocolor red];
3378 # float green = [protocolor green];
3379 # float blue = [protocolor blue];
3380 # FloatValue* alpha_wrapper = [protocolor alpha];
3381 # float alpha = 1.0;
3382 # if (alpha_wrapper != nil) {
3383 # alpha = [alpha_wrapper value];
3384 # }
3385 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3386 # }
3387 #
3388 # static Color* toProto(UIColor* color) {
3389 # CGFloat red, green, blue, alpha;
3390 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3391 # return nil;
3392 # }
3393 # Color* result = [Color alloc] init];
3394 # [result setRed:red];
3395 # [result setGreen:green];
3396 # [result setBlue:blue];
3397 # if (alpha <= 0.9999) {
3398 # [result setAlpha:floatWrapperWithValue(alpha)];
3399 # }
3400 # [result autorelease];
3401 # return result;
3402 # }
3403 # // ...
3404 #
3405 # Example (JavaScript):
3406 #
3407 # // ...
3408 #
3409 # var protoToCssColor = function(rgb_color) {
3410 # var redFrac = rgb_color.red || 0.0;
3411 # var greenFrac = rgb_color.green || 0.0;
3412 # var blueFrac = rgb_color.blue || 0.0;
3413 # var red = Math.floor(redFrac * 255);
3414 # var green = Math.floor(greenFrac * 255);
3415 # var blue = Math.floor(blueFrac * 255);
3416 #
3417 # if (!('alpha' in rgb_color)) {
3418 # return rgbToCssColor_(red, green, blue);
3419 # }
3420 #
3421 # var alphaFrac = rgb_color.alpha.value || 0.0;
3422 # var rgbParams = [red, green, blue].join(',');
3423 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3424 # };
3425 #
3426 # var rgbToCssColor_ = function(red, green, blue) {
3427 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3428 # var hexString = rgbNumber.toString(16);
3429 # var missingZeros = 6 - hexString.length;
3430 # var resultBuilder = ['#'];
3431 # for (var i = 0; i < missingZeros; i++) {
3432 # resultBuilder.push('0');
3433 # }
3434 # resultBuilder.push(hexString);
3435 # return resultBuilder.join('');
3436 # };
3437 #
3438 # // ...
3439 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3440 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3441 # the final pixel color is defined by the equation:
3442 #
3443 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3444 #
3445 # This means that a value of 1.0 corresponds to a solid color, whereas
3446 # a value of 0.0 corresponds to a completely transparent color. This
3447 # uses a wrapper message rather than a simple float scalar so that it is
3448 # possible to distinguish between a default value and the value being unset.
3449 # If omitted, this color object is to be rendered as a solid color
3450 # (as if the alpha value had been explicitly given with a value of 1.0).
3451 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3452 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3453 },
3454 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003455 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003456 "style": "A String", # The style of the border.
3457 },
3458 "bottom": { # A border along a cell. # The bottom border of the cell.
3459 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3460 # for simplicity of conversion to/from color representations in various
3461 # languages over compactness; for example, the fields of this representation
3462 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3463 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3464 # method in iOS; and, with just a little work, it can be easily formatted into
3465 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3466 #
3467 # Example (Java):
3468 #
3469 # import com.google.type.Color;
3470 #
3471 # // ...
3472 # public static java.awt.Color fromProto(Color protocolor) {
3473 # float alpha = protocolor.hasAlpha()
3474 # ? protocolor.getAlpha().getValue()
3475 # : 1.0;
3476 #
3477 # return new java.awt.Color(
3478 # protocolor.getRed(),
3479 # protocolor.getGreen(),
3480 # protocolor.getBlue(),
3481 # alpha);
3482 # }
3483 #
3484 # public static Color toProto(java.awt.Color color) {
3485 # float red = (float) color.getRed();
3486 # float green = (float) color.getGreen();
3487 # float blue = (float) color.getBlue();
3488 # float denominator = 255.0;
3489 # Color.Builder resultBuilder =
3490 # Color
3491 # .newBuilder()
3492 # .setRed(red / denominator)
3493 # .setGreen(green / denominator)
3494 # .setBlue(blue / denominator);
3495 # int alpha = color.getAlpha();
3496 # if (alpha != 255) {
3497 # result.setAlpha(
3498 # FloatValue
3499 # .newBuilder()
3500 # .setValue(((float) alpha) / denominator)
3501 # .build());
3502 # }
3503 # return resultBuilder.build();
3504 # }
3505 # // ...
3506 #
3507 # Example (iOS / Obj-C):
3508 #
3509 # // ...
3510 # static UIColor* fromProto(Color* protocolor) {
3511 # float red = [protocolor red];
3512 # float green = [protocolor green];
3513 # float blue = [protocolor blue];
3514 # FloatValue* alpha_wrapper = [protocolor alpha];
3515 # float alpha = 1.0;
3516 # if (alpha_wrapper != nil) {
3517 # alpha = [alpha_wrapper value];
3518 # }
3519 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3520 # }
3521 #
3522 # static Color* toProto(UIColor* color) {
3523 # CGFloat red, green, blue, alpha;
3524 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3525 # return nil;
3526 # }
3527 # Color* result = [Color alloc] init];
3528 # [result setRed:red];
3529 # [result setGreen:green];
3530 # [result setBlue:blue];
3531 # if (alpha <= 0.9999) {
3532 # [result setAlpha:floatWrapperWithValue(alpha)];
3533 # }
3534 # [result autorelease];
3535 # return result;
3536 # }
3537 # // ...
3538 #
3539 # Example (JavaScript):
3540 #
3541 # // ...
3542 #
3543 # var protoToCssColor = function(rgb_color) {
3544 # var redFrac = rgb_color.red || 0.0;
3545 # var greenFrac = rgb_color.green || 0.0;
3546 # var blueFrac = rgb_color.blue || 0.0;
3547 # var red = Math.floor(redFrac * 255);
3548 # var green = Math.floor(greenFrac * 255);
3549 # var blue = Math.floor(blueFrac * 255);
3550 #
3551 # if (!('alpha' in rgb_color)) {
3552 # return rgbToCssColor_(red, green, blue);
3553 # }
3554 #
3555 # var alphaFrac = rgb_color.alpha.value || 0.0;
3556 # var rgbParams = [red, green, blue].join(',');
3557 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3558 # };
3559 #
3560 # var rgbToCssColor_ = function(red, green, blue) {
3561 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3562 # var hexString = rgbNumber.toString(16);
3563 # var missingZeros = 6 - hexString.length;
3564 # var resultBuilder = ['#'];
3565 # for (var i = 0; i < missingZeros; i++) {
3566 # resultBuilder.push('0');
3567 # }
3568 # resultBuilder.push(hexString);
3569 # return resultBuilder.join('');
3570 # };
3571 #
3572 # // ...
3573 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3574 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3575 # the final pixel color is defined by the equation:
3576 #
3577 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3578 #
3579 # This means that a value of 1.0 corresponds to a solid color, whereas
3580 # a value of 0.0 corresponds to a completely transparent color. This
3581 # uses a wrapper message rather than a simple float scalar so that it is
3582 # possible to distinguish between a default value and the value being unset.
3583 # If omitted, this color object is to be rendered as a solid color
3584 # (as if the alpha value had been explicitly given with a value of 1.0).
3585 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3586 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3587 },
3588 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003589 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003590 "style": "A String", # The style of the border.
3591 },
3592 "left": { # A border along a cell. # The left border of the cell.
3593 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3594 # for simplicity of conversion to/from color representations in various
3595 # languages over compactness; for example, the fields of this representation
3596 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3597 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3598 # method in iOS; and, with just a little work, it can be easily formatted into
3599 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3600 #
3601 # Example (Java):
3602 #
3603 # import com.google.type.Color;
3604 #
3605 # // ...
3606 # public static java.awt.Color fromProto(Color protocolor) {
3607 # float alpha = protocolor.hasAlpha()
3608 # ? protocolor.getAlpha().getValue()
3609 # : 1.0;
3610 #
3611 # return new java.awt.Color(
3612 # protocolor.getRed(),
3613 # protocolor.getGreen(),
3614 # protocolor.getBlue(),
3615 # alpha);
3616 # }
3617 #
3618 # public static Color toProto(java.awt.Color color) {
3619 # float red = (float) color.getRed();
3620 # float green = (float) color.getGreen();
3621 # float blue = (float) color.getBlue();
3622 # float denominator = 255.0;
3623 # Color.Builder resultBuilder =
3624 # Color
3625 # .newBuilder()
3626 # .setRed(red / denominator)
3627 # .setGreen(green / denominator)
3628 # .setBlue(blue / denominator);
3629 # int alpha = color.getAlpha();
3630 # if (alpha != 255) {
3631 # result.setAlpha(
3632 # FloatValue
3633 # .newBuilder()
3634 # .setValue(((float) alpha) / denominator)
3635 # .build());
3636 # }
3637 # return resultBuilder.build();
3638 # }
3639 # // ...
3640 #
3641 # Example (iOS / Obj-C):
3642 #
3643 # // ...
3644 # static UIColor* fromProto(Color* protocolor) {
3645 # float red = [protocolor red];
3646 # float green = [protocolor green];
3647 # float blue = [protocolor blue];
3648 # FloatValue* alpha_wrapper = [protocolor alpha];
3649 # float alpha = 1.0;
3650 # if (alpha_wrapper != nil) {
3651 # alpha = [alpha_wrapper value];
3652 # }
3653 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3654 # }
3655 #
3656 # static Color* toProto(UIColor* color) {
3657 # CGFloat red, green, blue, alpha;
3658 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3659 # return nil;
3660 # }
3661 # Color* result = [Color alloc] init];
3662 # [result setRed:red];
3663 # [result setGreen:green];
3664 # [result setBlue:blue];
3665 # if (alpha <= 0.9999) {
3666 # [result setAlpha:floatWrapperWithValue(alpha)];
3667 # }
3668 # [result autorelease];
3669 # return result;
3670 # }
3671 # // ...
3672 #
3673 # Example (JavaScript):
3674 #
3675 # // ...
3676 #
3677 # var protoToCssColor = function(rgb_color) {
3678 # var redFrac = rgb_color.red || 0.0;
3679 # var greenFrac = rgb_color.green || 0.0;
3680 # var blueFrac = rgb_color.blue || 0.0;
3681 # var red = Math.floor(redFrac * 255);
3682 # var green = Math.floor(greenFrac * 255);
3683 # var blue = Math.floor(blueFrac * 255);
3684 #
3685 # if (!('alpha' in rgb_color)) {
3686 # return rgbToCssColor_(red, green, blue);
3687 # }
3688 #
3689 # var alphaFrac = rgb_color.alpha.value || 0.0;
3690 # var rgbParams = [red, green, blue].join(',');
3691 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3692 # };
3693 #
3694 # var rgbToCssColor_ = function(red, green, blue) {
3695 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3696 # var hexString = rgbNumber.toString(16);
3697 # var missingZeros = 6 - hexString.length;
3698 # var resultBuilder = ['#'];
3699 # for (var i = 0; i < missingZeros; i++) {
3700 # resultBuilder.push('0');
3701 # }
3702 # resultBuilder.push(hexString);
3703 # return resultBuilder.join('');
3704 # };
3705 #
3706 # // ...
3707 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3708 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3709 # the final pixel color is defined by the equation:
3710 #
3711 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3712 #
3713 # This means that a value of 1.0 corresponds to a solid color, whereas
3714 # a value of 0.0 corresponds to a completely transparent color. This
3715 # uses a wrapper message rather than a simple float scalar so that it is
3716 # possible to distinguish between a default value and the value being unset.
3717 # If omitted, this color object is to be rendered as a solid color
3718 # (as if the alpha value had been explicitly given with a value of 1.0).
3719 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3720 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3721 },
3722 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003723 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003724 "style": "A String", # The style of the border.
3725 },
3726 },
3727 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
3728 },
3729 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
3730 #
3731 # When writing, the new data validation rule will overwrite any prior rule.
3732 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
3733 # If true, "List" conditions will show a dropdown.
3734 "strict": True or False, # True if invalid data should be rejected.
3735 "inputMessage": "A String", # A message to show the user when adding data to the cell.
3736 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
3737 # BooleanConditions are used by conditional formatting,
3738 # data validation, and the criteria in filters.
3739 "type": "A String", # The type of condition.
3740 "values": [ # The values of the condition. The number of supported values depends
3741 # on the condition type. Some support zero values,
3742 # others one or two values,
3743 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
3744 { # The value of the condition.
3745 "relativeDate": "A String", # A relative date (based on the current date).
3746 # Valid only if the type is
3747 # DATE_BEFORE,
3748 # DATE_AFTER,
3749 # DATE_ON_OR_BEFORE or
3750 # DATE_ON_OR_AFTER.
3751 #
3752 # Relative dates are not supported in data validation.
3753 # They are supported only in conditional formatting and
3754 # conditional filters.
3755 "userEnteredValue": "A String", # A value the condition is based on.
3756 # The value will be parsed as if the user typed into a cell.
3757 # Formulas are supported (and must begin with an `=`).
3758 },
3759 ],
3760 },
3761 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003762 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
3763 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003764 # Runs start at specific indexes in the text and continue until the next
3765 # run. Properties of a run will continue unless explicitly changed
3766 # in a subsequent run (and properties of the first run will continue
3767 # the properties of the cell unless explicitly changed).
3768 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003769 # When writing, the new runs will overwrite any prior runs. When writing a
3770 # new user_entered_value, previous runs will be erased.
3771 { # A run of a text format. The format of this run continues until the start
3772 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003773 # When updating, all fields must be set.
3774 "startIndex": 42, # The character index where this run starts.
3775 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
3776 # Absent values indicate that the field isn't specified.
3777 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
3778 # for simplicity of conversion to/from color representations in various
3779 # languages over compactness; for example, the fields of this representation
3780 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3781 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3782 # method in iOS; and, with just a little work, it can be easily formatted into
3783 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3784 #
3785 # Example (Java):
3786 #
3787 # import com.google.type.Color;
3788 #
3789 # // ...
3790 # public static java.awt.Color fromProto(Color protocolor) {
3791 # float alpha = protocolor.hasAlpha()
3792 # ? protocolor.getAlpha().getValue()
3793 # : 1.0;
3794 #
3795 # return new java.awt.Color(
3796 # protocolor.getRed(),
3797 # protocolor.getGreen(),
3798 # protocolor.getBlue(),
3799 # alpha);
3800 # }
3801 #
3802 # public static Color toProto(java.awt.Color color) {
3803 # float red = (float) color.getRed();
3804 # float green = (float) color.getGreen();
3805 # float blue = (float) color.getBlue();
3806 # float denominator = 255.0;
3807 # Color.Builder resultBuilder =
3808 # Color
3809 # .newBuilder()
3810 # .setRed(red / denominator)
3811 # .setGreen(green / denominator)
3812 # .setBlue(blue / denominator);
3813 # int alpha = color.getAlpha();
3814 # if (alpha != 255) {
3815 # result.setAlpha(
3816 # FloatValue
3817 # .newBuilder()
3818 # .setValue(((float) alpha) / denominator)
3819 # .build());
3820 # }
3821 # return resultBuilder.build();
3822 # }
3823 # // ...
3824 #
3825 # Example (iOS / Obj-C):
3826 #
3827 # // ...
3828 # static UIColor* fromProto(Color* protocolor) {
3829 # float red = [protocolor red];
3830 # float green = [protocolor green];
3831 # float blue = [protocolor blue];
3832 # FloatValue* alpha_wrapper = [protocolor alpha];
3833 # float alpha = 1.0;
3834 # if (alpha_wrapper != nil) {
3835 # alpha = [alpha_wrapper value];
3836 # }
3837 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3838 # }
3839 #
3840 # static Color* toProto(UIColor* color) {
3841 # CGFloat red, green, blue, alpha;
3842 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3843 # return nil;
3844 # }
3845 # Color* result = [Color alloc] init];
3846 # [result setRed:red];
3847 # [result setGreen:green];
3848 # [result setBlue:blue];
3849 # if (alpha <= 0.9999) {
3850 # [result setAlpha:floatWrapperWithValue(alpha)];
3851 # }
3852 # [result autorelease];
3853 # return result;
3854 # }
3855 # // ...
3856 #
3857 # Example (JavaScript):
3858 #
3859 # // ...
3860 #
3861 # var protoToCssColor = function(rgb_color) {
3862 # var redFrac = rgb_color.red || 0.0;
3863 # var greenFrac = rgb_color.green || 0.0;
3864 # var blueFrac = rgb_color.blue || 0.0;
3865 # var red = Math.floor(redFrac * 255);
3866 # var green = Math.floor(greenFrac * 255);
3867 # var blue = Math.floor(blueFrac * 255);
3868 #
3869 # if (!('alpha' in rgb_color)) {
3870 # return rgbToCssColor_(red, green, blue);
3871 # }
3872 #
3873 # var alphaFrac = rgb_color.alpha.value || 0.0;
3874 # var rgbParams = [red, green, blue].join(',');
3875 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3876 # };
3877 #
3878 # var rgbToCssColor_ = function(red, green, blue) {
3879 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3880 # var hexString = rgbNumber.toString(16);
3881 # var missingZeros = 6 - hexString.length;
3882 # var resultBuilder = ['#'];
3883 # for (var i = 0; i < missingZeros; i++) {
3884 # resultBuilder.push('0');
3885 # }
3886 # resultBuilder.push(hexString);
3887 # return resultBuilder.join('');
3888 # };
3889 #
3890 # // ...
3891 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3892 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3893 # the final pixel color is defined by the equation:
3894 #
3895 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3896 #
3897 # This means that a value of 1.0 corresponds to a solid color, whereas
3898 # a value of 0.0 corresponds to a completely transparent color. This
3899 # uses a wrapper message rather than a simple float scalar so that it is
3900 # possible to distinguish between a default value and the value being unset.
3901 # If omitted, this color object is to be rendered as a solid color
3902 # (as if the alpha value had been explicitly given with a value of 1.0).
3903 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3904 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3905 },
3906 "bold": True or False, # True if the text is bold.
3907 "strikethrough": True or False, # True if the text has a strikethrough.
3908 "fontFamily": "A String", # The font family.
3909 "fontSize": 42, # The size of the font.
3910 "italic": True or False, # True if the text is italicized.
3911 "underline": True or False, # True if the text is underlined.
3912 },
3913 },
3914 ],
3915 },
3916 ],
3917 },
3918 ],
3919 "sheetId": 42, # The sheet ID to append the data to.
3920 },
3921 "duplicateSheet": { # Duplicates the contents of a sheet. # Duplicates a sheet.
3922 "sourceSheetId": 42, # The sheet to duplicate.
3923 "insertSheetIndex": 42, # The zero-based index where the new sheet should be inserted.
3924 # The index of all sheets after this are incremented.
3925 "newSheetName": "A String", # The name of the new sheet. If empty, a new name is chosen for you.
3926 "newSheetId": 42, # If set, the ID of the new sheet. If not set, an ID is chosen.
3927 # If set, the ID must not conflict with any existing sheet ID.
3928 # If set, it must be non-negative.
3929 },
3930 "updateSheetProperties": { # Updates properties of the sheet with the specified # Updates a sheet's properties.
3931 # sheetId.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003932 "fields": "A String", # The fields that should be updated. At least one field must be specified.
3933 # The root `properties` is implied and should not be specified.
3934 # A single `"*"` can be used as short-hand for listing every field.
3935 "properties": { # Properties of a sheet. # The properties to update.
3936 "sheetType": "A String", # The type of sheet. Defaults to GRID.
3937 # This field cannot be changed once set.
3938 "index": 42, # The index of the sheet within the spreadsheet.
3939 # When adding or updating sheet properties, if this field
3940 # is excluded then the sheet will be added or moved to the end
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003941 # of the sheet list. When updating sheet indices or inserting
3942 # sheets, movement is considered in "before the move" indexes.
3943 # For example, if there were 3 sheets (S1, S2, S3) in order to
3944 # move S1 ahead of S2 the index would have to be set to 2. A sheet
3945 # index update request will be ignored if the requested index is
3946 # identical to the sheets current index or if the requested new
3947 # index is equal to the current sheet index + 1.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003948 "title": "A String", # The name of the sheet.
3949 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
3950 # (If the sheet is an object sheet, containing a chart or image, then
3951 # this field will be absent.)
3952 # When writing it is an error to set any grid properties on non-grid sheets.
3953 "columnCount": 42, # The number of columns in the grid.
3954 "rowCount": 42, # The number of rows in the grid.
3955 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
3956 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
3957 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
3958 },
3959 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
3960 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
3961 # for simplicity of conversion to/from color representations in various
3962 # languages over compactness; for example, the fields of this representation
3963 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3964 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3965 # method in iOS; and, with just a little work, it can be easily formatted into
3966 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3967 #
3968 # Example (Java):
3969 #
3970 # import com.google.type.Color;
3971 #
3972 # // ...
3973 # public static java.awt.Color fromProto(Color protocolor) {
3974 # float alpha = protocolor.hasAlpha()
3975 # ? protocolor.getAlpha().getValue()
3976 # : 1.0;
3977 #
3978 # return new java.awt.Color(
3979 # protocolor.getRed(),
3980 # protocolor.getGreen(),
3981 # protocolor.getBlue(),
3982 # alpha);
3983 # }
3984 #
3985 # public static Color toProto(java.awt.Color color) {
3986 # float red = (float) color.getRed();
3987 # float green = (float) color.getGreen();
3988 # float blue = (float) color.getBlue();
3989 # float denominator = 255.0;
3990 # Color.Builder resultBuilder =
3991 # Color
3992 # .newBuilder()
3993 # .setRed(red / denominator)
3994 # .setGreen(green / denominator)
3995 # .setBlue(blue / denominator);
3996 # int alpha = color.getAlpha();
3997 # if (alpha != 255) {
3998 # result.setAlpha(
3999 # FloatValue
4000 # .newBuilder()
4001 # .setValue(((float) alpha) / denominator)
4002 # .build());
4003 # }
4004 # return resultBuilder.build();
4005 # }
4006 # // ...
4007 #
4008 # Example (iOS / Obj-C):
4009 #
4010 # // ...
4011 # static UIColor* fromProto(Color* protocolor) {
4012 # float red = [protocolor red];
4013 # float green = [protocolor green];
4014 # float blue = [protocolor blue];
4015 # FloatValue* alpha_wrapper = [protocolor alpha];
4016 # float alpha = 1.0;
4017 # if (alpha_wrapper != nil) {
4018 # alpha = [alpha_wrapper value];
4019 # }
4020 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4021 # }
4022 #
4023 # static Color* toProto(UIColor* color) {
4024 # CGFloat red, green, blue, alpha;
4025 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4026 # return nil;
4027 # }
4028 # Color* result = [Color alloc] init];
4029 # [result setRed:red];
4030 # [result setGreen:green];
4031 # [result setBlue:blue];
4032 # if (alpha <= 0.9999) {
4033 # [result setAlpha:floatWrapperWithValue(alpha)];
4034 # }
4035 # [result autorelease];
4036 # return result;
4037 # }
4038 # // ...
4039 #
4040 # Example (JavaScript):
4041 #
4042 # // ...
4043 #
4044 # var protoToCssColor = function(rgb_color) {
4045 # var redFrac = rgb_color.red || 0.0;
4046 # var greenFrac = rgb_color.green || 0.0;
4047 # var blueFrac = rgb_color.blue || 0.0;
4048 # var red = Math.floor(redFrac * 255);
4049 # var green = Math.floor(greenFrac * 255);
4050 # var blue = Math.floor(blueFrac * 255);
4051 #
4052 # if (!('alpha' in rgb_color)) {
4053 # return rgbToCssColor_(red, green, blue);
4054 # }
4055 #
4056 # var alphaFrac = rgb_color.alpha.value || 0.0;
4057 # var rgbParams = [red, green, blue].join(',');
4058 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4059 # };
4060 #
4061 # var rgbToCssColor_ = function(red, green, blue) {
4062 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4063 # var hexString = rgbNumber.toString(16);
4064 # var missingZeros = 6 - hexString.length;
4065 # var resultBuilder = ['#'];
4066 # for (var i = 0; i < missingZeros; i++) {
4067 # resultBuilder.push('0');
4068 # }
4069 # resultBuilder.push(hexString);
4070 # return resultBuilder.join('');
4071 # };
4072 #
4073 # // ...
4074 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4075 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4076 # the final pixel color is defined by the equation:
4077 #
4078 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4079 #
4080 # This means that a value of 1.0 corresponds to a solid color, whereas
4081 # a value of 0.0 corresponds to a completely transparent color. This
4082 # uses a wrapper message rather than a simple float scalar so that it is
4083 # possible to distinguish between a default value and the value being unset.
4084 # If omitted, this color object is to be rendered as a solid color
4085 # (as if the alpha value had been explicitly given with a value of 1.0).
4086 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4087 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4088 },
4089 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
4090 "sheetId": 42, # The ID of the sheet. Must be non-negative.
4091 # This field cannot be changed once set.
4092 },
4093 },
4094 "addChart": { # Adds a chart to a sheet in the spreadsheet. # Adds a chart.
4095 "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 -07004096 # where it should be placed. The chartId
4097 # field is optional; if one is not set, an id will be randomly generated. (It
4098 # is an error to specify the ID of a chart that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004099 "chartId": 42, # The ID of the chart.
4100 "position": { # The position of an embedded object such as a chart. # The position of the chart.
4101 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
4102 # is chosen for you. Used only when writing.
4103 "sheetId": 42, # The sheet this is on. Set only if the embedded object
4104 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004105 "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 -07004106 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
4107 # All indexes are zero-based.
4108 "rowIndex": 42, # The row index of the coordinate.
4109 "columnIndex": 42, # The column index of the coordinate.
4110 "sheetId": 42, # The sheet this coordinate is on.
4111 },
4112 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
4113 # from the anchor cell.
4114 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
4115 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
4116 # from the anchor cell.
4117 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
4118 },
4119 },
4120 "spec": { # The specifications of a chart. # The specification of the chart.
4121 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004122 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
4123 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
4124 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
4125 "sources": [ # The ranges of data for a series or domain.
4126 # Exactly one dimension must have a length of 1,
4127 # and all sources in the list must have the same dimension
4128 # with length 1.
4129 # The domain (if it exists) & all series must have the same number
4130 # of source ranges. If using more than one source range, then the source
4131 # range at a given offset must be contiguous across the domain and series.
4132 #
4133 # For example, these are valid configurations:
4134 #
4135 # domain sources: A1:A5
4136 # series1 sources: B1:B5
4137 # series2 sources: D6:D10
4138 #
4139 # domain sources: A1:A5, C10:C12
4140 # series1 sources: B1:B5, D10:D12
4141 # series2 sources: C1:C5, E10:E12
4142 { # A range on a sheet.
4143 # All indexes are zero-based.
4144 # Indexes are half open, e.g the start index is inclusive
4145 # and the end index is exclusive -- [start_index, end_index).
4146 # Missing indexes indicate the range is unbounded on that side.
4147 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004148 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004149 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004150 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004151 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004152 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004153 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004154 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004155 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004156 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004157 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004158 # `Sheet1!A:B == sheet_id: 0,
4159 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004160 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004161 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004162 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004163 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004164 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004165 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004166 #
4167 # The start index must always be less than or equal to the end index.
4168 # If the start index equals the end index, then the range is empty.
4169 # Empty ranges are typically not meaningful and are usually rendered in the
4170 # UI as `#REF!`.
4171 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
4172 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
4173 "sheetId": 42, # The sheet this range is on.
4174 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
4175 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
4176 },
4177 ],
4178 },
4179 },
4180 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
4181 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
4182 "sources": [ # The ranges of data for a series or domain.
4183 # Exactly one dimension must have a length of 1,
4184 # and all sources in the list must have the same dimension
4185 # with length 1.
4186 # The domain (if it exists) & all series must have the same number
4187 # of source ranges. If using more than one source range, then the source
4188 # range at a given offset must be contiguous across the domain and series.
4189 #
4190 # For example, these are valid configurations:
4191 #
4192 # domain sources: A1:A5
4193 # series1 sources: B1:B5
4194 # series2 sources: D6:D10
4195 #
4196 # domain sources: A1:A5, C10:C12
4197 # series1 sources: B1:B5, D10:D12
4198 # series2 sources: C1:C5, E10:E12
4199 { # A range on a sheet.
4200 # All indexes are zero-based.
4201 # Indexes are half open, e.g the start index is inclusive
4202 # and the end index is exclusive -- [start_index, end_index).
4203 # Missing indexes indicate the range is unbounded on that side.
4204 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004205 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004206 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004207 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004208 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004209 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004210 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004211 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004212 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004213 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004214 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004215 # `Sheet1!A:B == sheet_id: 0,
4216 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004217 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004218 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004219 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004220 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004221 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004222 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004223 #
4224 # The start index must always be less than or equal to the end index.
4225 # If the start index equals the end index, then the range is empty.
4226 # Empty ranges are typically not meaningful and are usually rendered in the
4227 # UI as `#REF!`.
4228 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
4229 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
4230 "sheetId": 42, # The sheet this range is on.
4231 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
4232 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
4233 },
4234 ],
4235 },
4236 },
4237 "threeDimensional": True or False, # True if the pie is three dimensional.
4238 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
4239 "pieHole": 3.14, # The size of the hole in the pie chart.
4240 },
4241 "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 -07004242 # See BasicChartType for the list of all
4243 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004244 # of charts this supports.
4245 "headerCount": 42, # The number of rows or columns in the data that are "headers".
4246 # If not set, Google Sheets will guess how many rows are headers based
4247 # on the data.
4248 #
4249 # (Note that BasicChartAxis.title may override the axis title
4250 # inferred from the header values.)
4251 "series": [ # The data this chart is visualizing.
4252 { # A single series of data in a chart.
4253 # For example, if charting stock prices over time, multiple series may exist,
4254 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
4255 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
4256 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
4257 "sources": [ # The ranges of data for a series or domain.
4258 # Exactly one dimension must have a length of 1,
4259 # and all sources in the list must have the same dimension
4260 # with length 1.
4261 # The domain (if it exists) & all series must have the same number
4262 # of source ranges. If using more than one source range, then the source
4263 # range at a given offset must be contiguous across the domain and series.
4264 #
4265 # For example, these are valid configurations:
4266 #
4267 # domain sources: A1:A5
4268 # series1 sources: B1:B5
4269 # series2 sources: D6:D10
4270 #
4271 # domain sources: A1:A5, C10:C12
4272 # series1 sources: B1:B5, D10:D12
4273 # series2 sources: C1:C5, E10:E12
4274 { # A range on a sheet.
4275 # All indexes are zero-based.
4276 # Indexes are half open, e.g the start index is inclusive
4277 # and the end index is exclusive -- [start_index, end_index).
4278 # Missing indexes indicate the range is unbounded on that side.
4279 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004280 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004281 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004282 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004283 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004284 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004285 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004286 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004287 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004288 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004289 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004290 # `Sheet1!A:B == sheet_id: 0,
4291 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004292 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004293 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004294 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004295 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004296 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004297 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004298 #
4299 # The start index must always be less than or equal to the end index.
4300 # If the start index equals the end index, then the range is empty.
4301 # Empty ranges are typically not meaningful and are usually rendered in the
4302 # UI as `#REF!`.
4303 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
4304 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
4305 "sheetId": 42, # The sheet this range is on.
4306 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
4307 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
4308 },
4309 ],
4310 },
4311 },
4312 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
4313 # For example, if charting stocks over time, the "Volume" series
4314 # may want to be pinned to the right with the prices pinned to the left,
4315 # because the scale of trading volume is different than the scale of
4316 # prices.
4317 # It is an error to specify an axis that isn't a valid minor axis
4318 # for the chart's type.
4319 "type": "A String", # The type of this series. Valid only if the
4320 # chartType is
4321 # COMBO.
4322 # Different types will change the way the series is visualized.
4323 # Only LINE, AREA,
4324 # and COLUMN are supported.
4325 },
4326 ],
4327 "legendPosition": "A String", # The position of the chart legend.
4328 "domains": [ # The domain of data this is charting.
4329 # Only a single domain is currently supported.
4330 { # The domain of a chart.
4331 # For example, if charting stock prices over time, this would be the date.
4332 "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 -07004333 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004334 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
4335 "sources": [ # The ranges of data for a series or domain.
4336 # Exactly one dimension must have a length of 1,
4337 # and all sources in the list must have the same dimension
4338 # with length 1.
4339 # The domain (if it exists) & all series must have the same number
4340 # of source ranges. If using more than one source range, then the source
4341 # range at a given offset must be contiguous across the domain and series.
4342 #
4343 # For example, these are valid configurations:
4344 #
4345 # domain sources: A1:A5
4346 # series1 sources: B1:B5
4347 # series2 sources: D6:D10
4348 #
4349 # domain sources: A1:A5, C10:C12
4350 # series1 sources: B1:B5, D10:D12
4351 # series2 sources: C1:C5, E10:E12
4352 { # A range on a sheet.
4353 # All indexes are zero-based.
4354 # Indexes are half open, e.g the start index is inclusive
4355 # and the end index is exclusive -- [start_index, end_index).
4356 # Missing indexes indicate the range is unbounded on that side.
4357 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004358 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004359 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004360 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004361 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004362 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004363 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004364 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004365 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004366 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004367 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004368 # `Sheet1!A:B == sheet_id: 0,
4369 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004370 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004371 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004372 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004373 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004374 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004375 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004376 #
4377 # The start index must always be less than or equal to the end index.
4378 # If the start index equals the end index, then the range is empty.
4379 # Empty ranges are typically not meaningful and are usually rendered in the
4380 # UI as `#REF!`.
4381 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
4382 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
4383 "sheetId": 42, # The sheet this range is on.
4384 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
4385 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
4386 },
4387 ],
4388 },
4389 },
4390 },
4391 ],
4392 "chartType": "A String", # The type of the chart.
4393 "axis": [ # The axis on the chart.
4394 { # An axis of the chart.
4395 # A chart may not have more than one axis per
4396 # axis position.
4397 "position": "A String", # The position of this axis.
4398 "format": { # The format of a run of text in a cell. # The format of the title.
4399 # Only valid if the axis is not associated with the domain.
4400 # Absent values indicate that the field isn't specified.
4401 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
4402 # for simplicity of conversion to/from color representations in various
4403 # languages over compactness; for example, the fields of this representation
4404 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4405 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4406 # method in iOS; and, with just a little work, it can be easily formatted into
4407 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4408 #
4409 # Example (Java):
4410 #
4411 # import com.google.type.Color;
4412 #
4413 # // ...
4414 # public static java.awt.Color fromProto(Color protocolor) {
4415 # float alpha = protocolor.hasAlpha()
4416 # ? protocolor.getAlpha().getValue()
4417 # : 1.0;
4418 #
4419 # return new java.awt.Color(
4420 # protocolor.getRed(),
4421 # protocolor.getGreen(),
4422 # protocolor.getBlue(),
4423 # alpha);
4424 # }
4425 #
4426 # public static Color toProto(java.awt.Color color) {
4427 # float red = (float) color.getRed();
4428 # float green = (float) color.getGreen();
4429 # float blue = (float) color.getBlue();
4430 # float denominator = 255.0;
4431 # Color.Builder resultBuilder =
4432 # Color
4433 # .newBuilder()
4434 # .setRed(red / denominator)
4435 # .setGreen(green / denominator)
4436 # .setBlue(blue / denominator);
4437 # int alpha = color.getAlpha();
4438 # if (alpha != 255) {
4439 # result.setAlpha(
4440 # FloatValue
4441 # .newBuilder()
4442 # .setValue(((float) alpha) / denominator)
4443 # .build());
4444 # }
4445 # return resultBuilder.build();
4446 # }
4447 # // ...
4448 #
4449 # Example (iOS / Obj-C):
4450 #
4451 # // ...
4452 # static UIColor* fromProto(Color* protocolor) {
4453 # float red = [protocolor red];
4454 # float green = [protocolor green];
4455 # float blue = [protocolor blue];
4456 # FloatValue* alpha_wrapper = [protocolor alpha];
4457 # float alpha = 1.0;
4458 # if (alpha_wrapper != nil) {
4459 # alpha = [alpha_wrapper value];
4460 # }
4461 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4462 # }
4463 #
4464 # static Color* toProto(UIColor* color) {
4465 # CGFloat red, green, blue, alpha;
4466 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4467 # return nil;
4468 # }
4469 # Color* result = [Color alloc] init];
4470 # [result setRed:red];
4471 # [result setGreen:green];
4472 # [result setBlue:blue];
4473 # if (alpha <= 0.9999) {
4474 # [result setAlpha:floatWrapperWithValue(alpha)];
4475 # }
4476 # [result autorelease];
4477 # return result;
4478 # }
4479 # // ...
4480 #
4481 # Example (JavaScript):
4482 #
4483 # // ...
4484 #
4485 # var protoToCssColor = function(rgb_color) {
4486 # var redFrac = rgb_color.red || 0.0;
4487 # var greenFrac = rgb_color.green || 0.0;
4488 # var blueFrac = rgb_color.blue || 0.0;
4489 # var red = Math.floor(redFrac * 255);
4490 # var green = Math.floor(greenFrac * 255);
4491 # var blue = Math.floor(blueFrac * 255);
4492 #
4493 # if (!('alpha' in rgb_color)) {
4494 # return rgbToCssColor_(red, green, blue);
4495 # }
4496 #
4497 # var alphaFrac = rgb_color.alpha.value || 0.0;
4498 # var rgbParams = [red, green, blue].join(',');
4499 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4500 # };
4501 #
4502 # var rgbToCssColor_ = function(red, green, blue) {
4503 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4504 # var hexString = rgbNumber.toString(16);
4505 # var missingZeros = 6 - hexString.length;
4506 # var resultBuilder = ['#'];
4507 # for (var i = 0; i < missingZeros; i++) {
4508 # resultBuilder.push('0');
4509 # }
4510 # resultBuilder.push(hexString);
4511 # return resultBuilder.join('');
4512 # };
4513 #
4514 # // ...
4515 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4516 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4517 # the final pixel color is defined by the equation:
4518 #
4519 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4520 #
4521 # This means that a value of 1.0 corresponds to a solid color, whereas
4522 # a value of 0.0 corresponds to a completely transparent color. This
4523 # uses a wrapper message rather than a simple float scalar so that it is
4524 # possible to distinguish between a default value and the value being unset.
4525 # If omitted, this color object is to be rendered as a solid color
4526 # (as if the alpha value had been explicitly given with a value of 1.0).
4527 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4528 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4529 },
4530 "bold": True or False, # True if the text is bold.
4531 "strikethrough": True or False, # True if the text has a strikethrough.
4532 "fontFamily": "A String", # The font family.
4533 "fontSize": 42, # The size of the font.
4534 "italic": True or False, # True if the text is italicized.
4535 "underline": True or False, # True if the text is underlined.
4536 },
4537 "title": "A String", # The title of this axis. If set, this overrides any title inferred
4538 # from headers of the data.
4539 },
4540 ],
4541 },
4542 "title": "A String", # The title of the chart.
4543 },
4544 },
4545 },
4546 "addConditionalFormatRule": { # Adds a new conditional format rule at the given index. # Adds a new conditional format rule.
4547 # All subsequent rules' indexes are incremented.
4548 "index": 42, # The zero-based index where the rule should be inserted.
4549 "rule": { # A rule describing a conditional format. # The rule to add.
4550 "ranges": [ # The ranges that will be formatted if the condition is true.
4551 # All the ranges must be on the same grid.
4552 { # A range on a sheet.
4553 # All indexes are zero-based.
4554 # Indexes are half open, e.g the start index is inclusive
4555 # and the end index is exclusive -- [start_index, end_index).
4556 # Missing indexes indicate the range is unbounded on that side.
4557 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004558 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004559 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004560 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004561 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004562 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004563 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004564 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004565 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004566 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004567 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004568 # `Sheet1!A:B == sheet_id: 0,
4569 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004570 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004571 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004572 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004573 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004574 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004575 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004576 #
4577 # The start index must always be less than or equal to the end index.
4578 # If the start index equals the end index, then the range is empty.
4579 # Empty ranges are typically not meaningful and are usually rendered in the
4580 # UI as `#REF!`.
4581 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
4582 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
4583 "sheetId": 42, # The sheet this range is on.
4584 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
4585 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
4586 },
4587 ],
4588 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
4589 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
4590 # the format will be applied.
4591 # BooleanConditions are used by conditional formatting,
4592 # data validation, and the criteria in filters.
4593 "type": "A String", # The type of condition.
4594 "values": [ # The values of the condition. The number of supported values depends
4595 # on the condition type. Some support zero values,
4596 # others one or two values,
4597 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
4598 { # The value of the condition.
4599 "relativeDate": "A String", # A relative date (based on the current date).
4600 # Valid only if the type is
4601 # DATE_BEFORE,
4602 # DATE_AFTER,
4603 # DATE_ON_OR_BEFORE or
4604 # DATE_ON_OR_AFTER.
4605 #
4606 # Relative dates are not supported in data validation.
4607 # They are supported only in conditional formatting and
4608 # conditional filters.
4609 "userEnteredValue": "A String", # A value the condition is based on.
4610 # The value will be parsed as if the user typed into a cell.
4611 # Formulas are supported (and must begin with an `=`).
4612 },
4613 ],
4614 },
4615 "format": { # The format of a cell. # The format to apply.
4616 # Conditional formatting can only apply a subset of formatting:
4617 # bold, italic,
4618 # strikethrough,
4619 # foreground color &
4620 # background color.
4621 "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 -07004622 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
4623 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07004624 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
4625 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004626 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004627 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004628 },
4629 "textDirection": "A String", # The direction of the text in the cell.
4630 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
4631 # When updating padding, every field must be specified.
4632 "top": 42, # The top padding of the cell.
4633 "right": 42, # The right padding of the cell.
4634 "bottom": 42, # The bottom padding of the cell.
4635 "left": 42, # The left padding of the cell.
4636 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004637 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004638 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
4639 # for simplicity of conversion to/from color representations in various
4640 # languages over compactness; for example, the fields of this representation
4641 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4642 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4643 # method in iOS; and, with just a little work, it can be easily formatted into
4644 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4645 #
4646 # Example (Java):
4647 #
4648 # import com.google.type.Color;
4649 #
4650 # // ...
4651 # public static java.awt.Color fromProto(Color protocolor) {
4652 # float alpha = protocolor.hasAlpha()
4653 # ? protocolor.getAlpha().getValue()
4654 # : 1.0;
4655 #
4656 # return new java.awt.Color(
4657 # protocolor.getRed(),
4658 # protocolor.getGreen(),
4659 # protocolor.getBlue(),
4660 # alpha);
4661 # }
4662 #
4663 # public static Color toProto(java.awt.Color color) {
4664 # float red = (float) color.getRed();
4665 # float green = (float) color.getGreen();
4666 # float blue = (float) color.getBlue();
4667 # float denominator = 255.0;
4668 # Color.Builder resultBuilder =
4669 # Color
4670 # .newBuilder()
4671 # .setRed(red / denominator)
4672 # .setGreen(green / denominator)
4673 # .setBlue(blue / denominator);
4674 # int alpha = color.getAlpha();
4675 # if (alpha != 255) {
4676 # result.setAlpha(
4677 # FloatValue
4678 # .newBuilder()
4679 # .setValue(((float) alpha) / denominator)
4680 # .build());
4681 # }
4682 # return resultBuilder.build();
4683 # }
4684 # // ...
4685 #
4686 # Example (iOS / Obj-C):
4687 #
4688 # // ...
4689 # static UIColor* fromProto(Color* protocolor) {
4690 # float red = [protocolor red];
4691 # float green = [protocolor green];
4692 # float blue = [protocolor blue];
4693 # FloatValue* alpha_wrapper = [protocolor alpha];
4694 # float alpha = 1.0;
4695 # if (alpha_wrapper != nil) {
4696 # alpha = [alpha_wrapper value];
4697 # }
4698 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4699 # }
4700 #
4701 # static Color* toProto(UIColor* color) {
4702 # CGFloat red, green, blue, alpha;
4703 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4704 # return nil;
4705 # }
4706 # Color* result = [Color alloc] init];
4707 # [result setRed:red];
4708 # [result setGreen:green];
4709 # [result setBlue:blue];
4710 # if (alpha <= 0.9999) {
4711 # [result setAlpha:floatWrapperWithValue(alpha)];
4712 # }
4713 # [result autorelease];
4714 # return result;
4715 # }
4716 # // ...
4717 #
4718 # Example (JavaScript):
4719 #
4720 # // ...
4721 #
4722 # var protoToCssColor = function(rgb_color) {
4723 # var redFrac = rgb_color.red || 0.0;
4724 # var greenFrac = rgb_color.green || 0.0;
4725 # var blueFrac = rgb_color.blue || 0.0;
4726 # var red = Math.floor(redFrac * 255);
4727 # var green = Math.floor(greenFrac * 255);
4728 # var blue = Math.floor(blueFrac * 255);
4729 #
4730 # if (!('alpha' in rgb_color)) {
4731 # return rgbToCssColor_(red, green, blue);
4732 # }
4733 #
4734 # var alphaFrac = rgb_color.alpha.value || 0.0;
4735 # var rgbParams = [red, green, blue].join(',');
4736 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4737 # };
4738 #
4739 # var rgbToCssColor_ = function(red, green, blue) {
4740 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4741 # var hexString = rgbNumber.toString(16);
4742 # var missingZeros = 6 - hexString.length;
4743 # var resultBuilder = ['#'];
4744 # for (var i = 0; i < missingZeros; i++) {
4745 # resultBuilder.push('0');
4746 # }
4747 # resultBuilder.push(hexString);
4748 # return resultBuilder.join('');
4749 # };
4750 #
4751 # // ...
4752 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4753 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4754 # the final pixel color is defined by the equation:
4755 #
4756 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4757 #
4758 # This means that a value of 1.0 corresponds to a solid color, whereas
4759 # a value of 0.0 corresponds to a completely transparent color. This
4760 # uses a wrapper message rather than a simple float scalar so that it is
4761 # possible to distinguish between a default value and the value being unset.
4762 # If omitted, this color object is to be rendered as a solid color
4763 # (as if the alpha value had been explicitly given with a value of 1.0).
4764 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4765 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4766 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004767 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004768 "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).
4769 # Absent values indicate that the field isn't specified.
4770 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
4771 # for simplicity of conversion to/from color representations in various
4772 # languages over compactness; for example, the fields of this representation
4773 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4774 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4775 # method in iOS; and, with just a little work, it can be easily formatted into
4776 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4777 #
4778 # Example (Java):
4779 #
4780 # import com.google.type.Color;
4781 #
4782 # // ...
4783 # public static java.awt.Color fromProto(Color protocolor) {
4784 # float alpha = protocolor.hasAlpha()
4785 # ? protocolor.getAlpha().getValue()
4786 # : 1.0;
4787 #
4788 # return new java.awt.Color(
4789 # protocolor.getRed(),
4790 # protocolor.getGreen(),
4791 # protocolor.getBlue(),
4792 # alpha);
4793 # }
4794 #
4795 # public static Color toProto(java.awt.Color color) {
4796 # float red = (float) color.getRed();
4797 # float green = (float) color.getGreen();
4798 # float blue = (float) color.getBlue();
4799 # float denominator = 255.0;
4800 # Color.Builder resultBuilder =
4801 # Color
4802 # .newBuilder()
4803 # .setRed(red / denominator)
4804 # .setGreen(green / denominator)
4805 # .setBlue(blue / denominator);
4806 # int alpha = color.getAlpha();
4807 # if (alpha != 255) {
4808 # result.setAlpha(
4809 # FloatValue
4810 # .newBuilder()
4811 # .setValue(((float) alpha) / denominator)
4812 # .build());
4813 # }
4814 # return resultBuilder.build();
4815 # }
4816 # // ...
4817 #
4818 # Example (iOS / Obj-C):
4819 #
4820 # // ...
4821 # static UIColor* fromProto(Color* protocolor) {
4822 # float red = [protocolor red];
4823 # float green = [protocolor green];
4824 # float blue = [protocolor blue];
4825 # FloatValue* alpha_wrapper = [protocolor alpha];
4826 # float alpha = 1.0;
4827 # if (alpha_wrapper != nil) {
4828 # alpha = [alpha_wrapper value];
4829 # }
4830 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4831 # }
4832 #
4833 # static Color* toProto(UIColor* color) {
4834 # CGFloat red, green, blue, alpha;
4835 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4836 # return nil;
4837 # }
4838 # Color* result = [Color alloc] init];
4839 # [result setRed:red];
4840 # [result setGreen:green];
4841 # [result setBlue:blue];
4842 # if (alpha <= 0.9999) {
4843 # [result setAlpha:floatWrapperWithValue(alpha)];
4844 # }
4845 # [result autorelease];
4846 # return result;
4847 # }
4848 # // ...
4849 #
4850 # Example (JavaScript):
4851 #
4852 # // ...
4853 #
4854 # var protoToCssColor = function(rgb_color) {
4855 # var redFrac = rgb_color.red || 0.0;
4856 # var greenFrac = rgb_color.green || 0.0;
4857 # var blueFrac = rgb_color.blue || 0.0;
4858 # var red = Math.floor(redFrac * 255);
4859 # var green = Math.floor(greenFrac * 255);
4860 # var blue = Math.floor(blueFrac * 255);
4861 #
4862 # if (!('alpha' in rgb_color)) {
4863 # return rgbToCssColor_(red, green, blue);
4864 # }
4865 #
4866 # var alphaFrac = rgb_color.alpha.value || 0.0;
4867 # var rgbParams = [red, green, blue].join(',');
4868 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4869 # };
4870 #
4871 # var rgbToCssColor_ = function(red, green, blue) {
4872 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4873 # var hexString = rgbNumber.toString(16);
4874 # var missingZeros = 6 - hexString.length;
4875 # var resultBuilder = ['#'];
4876 # for (var i = 0; i < missingZeros; i++) {
4877 # resultBuilder.push('0');
4878 # }
4879 # resultBuilder.push(hexString);
4880 # return resultBuilder.join('');
4881 # };
4882 #
4883 # // ...
4884 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4885 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4886 # the final pixel color is defined by the equation:
4887 #
4888 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4889 #
4890 # This means that a value of 1.0 corresponds to a solid color, whereas
4891 # a value of 0.0 corresponds to a completely transparent color. This
4892 # uses a wrapper message rather than a simple float scalar so that it is
4893 # possible to distinguish between a default value and the value being unset.
4894 # If omitted, this color object is to be rendered as a solid color
4895 # (as if the alpha value had been explicitly given with a value of 1.0).
4896 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4897 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4898 },
4899 "bold": True or False, # True if the text is bold.
4900 "strikethrough": True or False, # True if the text has a strikethrough.
4901 "fontFamily": "A String", # The font family.
4902 "fontSize": 42, # The size of the font.
4903 "italic": True or False, # True if the text is italicized.
4904 "underline": True or False, # True if the text is underlined.
4905 },
4906 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
4907 "borders": { # The borders of the cell. # The borders of the cell.
4908 "top": { # A border along a cell. # The top border of the cell.
4909 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
4910 # for simplicity of conversion to/from color representations in various
4911 # languages over compactness; for example, the fields of this representation
4912 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4913 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4914 # method in iOS; and, with just a little work, it can be easily formatted into
4915 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4916 #
4917 # Example (Java):
4918 #
4919 # import com.google.type.Color;
4920 #
4921 # // ...
4922 # public static java.awt.Color fromProto(Color protocolor) {
4923 # float alpha = protocolor.hasAlpha()
4924 # ? protocolor.getAlpha().getValue()
4925 # : 1.0;
4926 #
4927 # return new java.awt.Color(
4928 # protocolor.getRed(),
4929 # protocolor.getGreen(),
4930 # protocolor.getBlue(),
4931 # alpha);
4932 # }
4933 #
4934 # public static Color toProto(java.awt.Color color) {
4935 # float red = (float) color.getRed();
4936 # float green = (float) color.getGreen();
4937 # float blue = (float) color.getBlue();
4938 # float denominator = 255.0;
4939 # Color.Builder resultBuilder =
4940 # Color
4941 # .newBuilder()
4942 # .setRed(red / denominator)
4943 # .setGreen(green / denominator)
4944 # .setBlue(blue / denominator);
4945 # int alpha = color.getAlpha();
4946 # if (alpha != 255) {
4947 # result.setAlpha(
4948 # FloatValue
4949 # .newBuilder()
4950 # .setValue(((float) alpha) / denominator)
4951 # .build());
4952 # }
4953 # return resultBuilder.build();
4954 # }
4955 # // ...
4956 #
4957 # Example (iOS / Obj-C):
4958 #
4959 # // ...
4960 # static UIColor* fromProto(Color* protocolor) {
4961 # float red = [protocolor red];
4962 # float green = [protocolor green];
4963 # float blue = [protocolor blue];
4964 # FloatValue* alpha_wrapper = [protocolor alpha];
4965 # float alpha = 1.0;
4966 # if (alpha_wrapper != nil) {
4967 # alpha = [alpha_wrapper value];
4968 # }
4969 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4970 # }
4971 #
4972 # static Color* toProto(UIColor* color) {
4973 # CGFloat red, green, blue, alpha;
4974 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4975 # return nil;
4976 # }
4977 # Color* result = [Color alloc] init];
4978 # [result setRed:red];
4979 # [result setGreen:green];
4980 # [result setBlue:blue];
4981 # if (alpha <= 0.9999) {
4982 # [result setAlpha:floatWrapperWithValue(alpha)];
4983 # }
4984 # [result autorelease];
4985 # return result;
4986 # }
4987 # // ...
4988 #
4989 # Example (JavaScript):
4990 #
4991 # // ...
4992 #
4993 # var protoToCssColor = function(rgb_color) {
4994 # var redFrac = rgb_color.red || 0.0;
4995 # var greenFrac = rgb_color.green || 0.0;
4996 # var blueFrac = rgb_color.blue || 0.0;
4997 # var red = Math.floor(redFrac * 255);
4998 # var green = Math.floor(greenFrac * 255);
4999 # var blue = Math.floor(blueFrac * 255);
5000 #
5001 # if (!('alpha' in rgb_color)) {
5002 # return rgbToCssColor_(red, green, blue);
5003 # }
5004 #
5005 # var alphaFrac = rgb_color.alpha.value || 0.0;
5006 # var rgbParams = [red, green, blue].join(',');
5007 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5008 # };
5009 #
5010 # var rgbToCssColor_ = function(red, green, blue) {
5011 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5012 # var hexString = rgbNumber.toString(16);
5013 # var missingZeros = 6 - hexString.length;
5014 # var resultBuilder = ['#'];
5015 # for (var i = 0; i < missingZeros; i++) {
5016 # resultBuilder.push('0');
5017 # }
5018 # resultBuilder.push(hexString);
5019 # return resultBuilder.join('');
5020 # };
5021 #
5022 # // ...
5023 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5024 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5025 # the final pixel color is defined by the equation:
5026 #
5027 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5028 #
5029 # This means that a value of 1.0 corresponds to a solid color, whereas
5030 # a value of 0.0 corresponds to a completely transparent color. This
5031 # uses a wrapper message rather than a simple float scalar so that it is
5032 # possible to distinguish between a default value and the value being unset.
5033 # If omitted, this color object is to be rendered as a solid color
5034 # (as if the alpha value had been explicitly given with a value of 1.0).
5035 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5036 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5037 },
5038 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005039 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005040 "style": "A String", # The style of the border.
5041 },
5042 "right": { # A border along a cell. # The right border of the cell.
5043 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
5044 # for simplicity of conversion to/from color representations in various
5045 # languages over compactness; for example, the fields of this representation
5046 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5047 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5048 # method in iOS; and, with just a little work, it can be easily formatted into
5049 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5050 #
5051 # Example (Java):
5052 #
5053 # import com.google.type.Color;
5054 #
5055 # // ...
5056 # public static java.awt.Color fromProto(Color protocolor) {
5057 # float alpha = protocolor.hasAlpha()
5058 # ? protocolor.getAlpha().getValue()
5059 # : 1.0;
5060 #
5061 # return new java.awt.Color(
5062 # protocolor.getRed(),
5063 # protocolor.getGreen(),
5064 # protocolor.getBlue(),
5065 # alpha);
5066 # }
5067 #
5068 # public static Color toProto(java.awt.Color color) {
5069 # float red = (float) color.getRed();
5070 # float green = (float) color.getGreen();
5071 # float blue = (float) color.getBlue();
5072 # float denominator = 255.0;
5073 # Color.Builder resultBuilder =
5074 # Color
5075 # .newBuilder()
5076 # .setRed(red / denominator)
5077 # .setGreen(green / denominator)
5078 # .setBlue(blue / denominator);
5079 # int alpha = color.getAlpha();
5080 # if (alpha != 255) {
5081 # result.setAlpha(
5082 # FloatValue
5083 # .newBuilder()
5084 # .setValue(((float) alpha) / denominator)
5085 # .build());
5086 # }
5087 # return resultBuilder.build();
5088 # }
5089 # // ...
5090 #
5091 # Example (iOS / Obj-C):
5092 #
5093 # // ...
5094 # static UIColor* fromProto(Color* protocolor) {
5095 # float red = [protocolor red];
5096 # float green = [protocolor green];
5097 # float blue = [protocolor blue];
5098 # FloatValue* alpha_wrapper = [protocolor alpha];
5099 # float alpha = 1.0;
5100 # if (alpha_wrapper != nil) {
5101 # alpha = [alpha_wrapper value];
5102 # }
5103 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5104 # }
5105 #
5106 # static Color* toProto(UIColor* color) {
5107 # CGFloat red, green, blue, alpha;
5108 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5109 # return nil;
5110 # }
5111 # Color* result = [Color alloc] init];
5112 # [result setRed:red];
5113 # [result setGreen:green];
5114 # [result setBlue:blue];
5115 # if (alpha <= 0.9999) {
5116 # [result setAlpha:floatWrapperWithValue(alpha)];
5117 # }
5118 # [result autorelease];
5119 # return result;
5120 # }
5121 # // ...
5122 #
5123 # Example (JavaScript):
5124 #
5125 # // ...
5126 #
5127 # var protoToCssColor = function(rgb_color) {
5128 # var redFrac = rgb_color.red || 0.0;
5129 # var greenFrac = rgb_color.green || 0.0;
5130 # var blueFrac = rgb_color.blue || 0.0;
5131 # var red = Math.floor(redFrac * 255);
5132 # var green = Math.floor(greenFrac * 255);
5133 # var blue = Math.floor(blueFrac * 255);
5134 #
5135 # if (!('alpha' in rgb_color)) {
5136 # return rgbToCssColor_(red, green, blue);
5137 # }
5138 #
5139 # var alphaFrac = rgb_color.alpha.value || 0.0;
5140 # var rgbParams = [red, green, blue].join(',');
5141 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5142 # };
5143 #
5144 # var rgbToCssColor_ = function(red, green, blue) {
5145 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5146 # var hexString = rgbNumber.toString(16);
5147 # var missingZeros = 6 - hexString.length;
5148 # var resultBuilder = ['#'];
5149 # for (var i = 0; i < missingZeros; i++) {
5150 # resultBuilder.push('0');
5151 # }
5152 # resultBuilder.push(hexString);
5153 # return resultBuilder.join('');
5154 # };
5155 #
5156 # // ...
5157 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5158 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5159 # the final pixel color is defined by the equation:
5160 #
5161 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5162 #
5163 # This means that a value of 1.0 corresponds to a solid color, whereas
5164 # a value of 0.0 corresponds to a completely transparent color. This
5165 # uses a wrapper message rather than a simple float scalar so that it is
5166 # possible to distinguish between a default value and the value being unset.
5167 # If omitted, this color object is to be rendered as a solid color
5168 # (as if the alpha value had been explicitly given with a value of 1.0).
5169 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5170 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5171 },
5172 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005173 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005174 "style": "A String", # The style of the border.
5175 },
5176 "bottom": { # A border along a cell. # The bottom border of the cell.
5177 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
5178 # for simplicity of conversion to/from color representations in various
5179 # languages over compactness; for example, the fields of this representation
5180 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5181 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5182 # method in iOS; and, with just a little work, it can be easily formatted into
5183 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5184 #
5185 # Example (Java):
5186 #
5187 # import com.google.type.Color;
5188 #
5189 # // ...
5190 # public static java.awt.Color fromProto(Color protocolor) {
5191 # float alpha = protocolor.hasAlpha()
5192 # ? protocolor.getAlpha().getValue()
5193 # : 1.0;
5194 #
5195 # return new java.awt.Color(
5196 # protocolor.getRed(),
5197 # protocolor.getGreen(),
5198 # protocolor.getBlue(),
5199 # alpha);
5200 # }
5201 #
5202 # public static Color toProto(java.awt.Color color) {
5203 # float red = (float) color.getRed();
5204 # float green = (float) color.getGreen();
5205 # float blue = (float) color.getBlue();
5206 # float denominator = 255.0;
5207 # Color.Builder resultBuilder =
5208 # Color
5209 # .newBuilder()
5210 # .setRed(red / denominator)
5211 # .setGreen(green / denominator)
5212 # .setBlue(blue / denominator);
5213 # int alpha = color.getAlpha();
5214 # if (alpha != 255) {
5215 # result.setAlpha(
5216 # FloatValue
5217 # .newBuilder()
5218 # .setValue(((float) alpha) / denominator)
5219 # .build());
5220 # }
5221 # return resultBuilder.build();
5222 # }
5223 # // ...
5224 #
5225 # Example (iOS / Obj-C):
5226 #
5227 # // ...
5228 # static UIColor* fromProto(Color* protocolor) {
5229 # float red = [protocolor red];
5230 # float green = [protocolor green];
5231 # float blue = [protocolor blue];
5232 # FloatValue* alpha_wrapper = [protocolor alpha];
5233 # float alpha = 1.0;
5234 # if (alpha_wrapper != nil) {
5235 # alpha = [alpha_wrapper value];
5236 # }
5237 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5238 # }
5239 #
5240 # static Color* toProto(UIColor* color) {
5241 # CGFloat red, green, blue, alpha;
5242 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5243 # return nil;
5244 # }
5245 # Color* result = [Color alloc] init];
5246 # [result setRed:red];
5247 # [result setGreen:green];
5248 # [result setBlue:blue];
5249 # if (alpha <= 0.9999) {
5250 # [result setAlpha:floatWrapperWithValue(alpha)];
5251 # }
5252 # [result autorelease];
5253 # return result;
5254 # }
5255 # // ...
5256 #
5257 # Example (JavaScript):
5258 #
5259 # // ...
5260 #
5261 # var protoToCssColor = function(rgb_color) {
5262 # var redFrac = rgb_color.red || 0.0;
5263 # var greenFrac = rgb_color.green || 0.0;
5264 # var blueFrac = rgb_color.blue || 0.0;
5265 # var red = Math.floor(redFrac * 255);
5266 # var green = Math.floor(greenFrac * 255);
5267 # var blue = Math.floor(blueFrac * 255);
5268 #
5269 # if (!('alpha' in rgb_color)) {
5270 # return rgbToCssColor_(red, green, blue);
5271 # }
5272 #
5273 # var alphaFrac = rgb_color.alpha.value || 0.0;
5274 # var rgbParams = [red, green, blue].join(',');
5275 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5276 # };
5277 #
5278 # var rgbToCssColor_ = function(red, green, blue) {
5279 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5280 # var hexString = rgbNumber.toString(16);
5281 # var missingZeros = 6 - hexString.length;
5282 # var resultBuilder = ['#'];
5283 # for (var i = 0; i < missingZeros; i++) {
5284 # resultBuilder.push('0');
5285 # }
5286 # resultBuilder.push(hexString);
5287 # return resultBuilder.join('');
5288 # };
5289 #
5290 # // ...
5291 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5292 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5293 # the final pixel color is defined by the equation:
5294 #
5295 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5296 #
5297 # This means that a value of 1.0 corresponds to a solid color, whereas
5298 # a value of 0.0 corresponds to a completely transparent color. This
5299 # uses a wrapper message rather than a simple float scalar so that it is
5300 # possible to distinguish between a default value and the value being unset.
5301 # If omitted, this color object is to be rendered as a solid color
5302 # (as if the alpha value had been explicitly given with a value of 1.0).
5303 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5304 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5305 },
5306 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005307 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005308 "style": "A String", # The style of the border.
5309 },
5310 "left": { # A border along a cell. # The left border of the cell.
5311 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
5312 # for simplicity of conversion to/from color representations in various
5313 # languages over compactness; for example, the fields of this representation
5314 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5315 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5316 # method in iOS; and, with just a little work, it can be easily formatted into
5317 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5318 #
5319 # Example (Java):
5320 #
5321 # import com.google.type.Color;
5322 #
5323 # // ...
5324 # public static java.awt.Color fromProto(Color protocolor) {
5325 # float alpha = protocolor.hasAlpha()
5326 # ? protocolor.getAlpha().getValue()
5327 # : 1.0;
5328 #
5329 # return new java.awt.Color(
5330 # protocolor.getRed(),
5331 # protocolor.getGreen(),
5332 # protocolor.getBlue(),
5333 # alpha);
5334 # }
5335 #
5336 # public static Color toProto(java.awt.Color color) {
5337 # float red = (float) color.getRed();
5338 # float green = (float) color.getGreen();
5339 # float blue = (float) color.getBlue();
5340 # float denominator = 255.0;
5341 # Color.Builder resultBuilder =
5342 # Color
5343 # .newBuilder()
5344 # .setRed(red / denominator)
5345 # .setGreen(green / denominator)
5346 # .setBlue(blue / denominator);
5347 # int alpha = color.getAlpha();
5348 # if (alpha != 255) {
5349 # result.setAlpha(
5350 # FloatValue
5351 # .newBuilder()
5352 # .setValue(((float) alpha) / denominator)
5353 # .build());
5354 # }
5355 # return resultBuilder.build();
5356 # }
5357 # // ...
5358 #
5359 # Example (iOS / Obj-C):
5360 #
5361 # // ...
5362 # static UIColor* fromProto(Color* protocolor) {
5363 # float red = [protocolor red];
5364 # float green = [protocolor green];
5365 # float blue = [protocolor blue];
5366 # FloatValue* alpha_wrapper = [protocolor alpha];
5367 # float alpha = 1.0;
5368 # if (alpha_wrapper != nil) {
5369 # alpha = [alpha_wrapper value];
5370 # }
5371 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5372 # }
5373 #
5374 # static Color* toProto(UIColor* color) {
5375 # CGFloat red, green, blue, alpha;
5376 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5377 # return nil;
5378 # }
5379 # Color* result = [Color alloc] init];
5380 # [result setRed:red];
5381 # [result setGreen:green];
5382 # [result setBlue:blue];
5383 # if (alpha <= 0.9999) {
5384 # [result setAlpha:floatWrapperWithValue(alpha)];
5385 # }
5386 # [result autorelease];
5387 # return result;
5388 # }
5389 # // ...
5390 #
5391 # Example (JavaScript):
5392 #
5393 # // ...
5394 #
5395 # var protoToCssColor = function(rgb_color) {
5396 # var redFrac = rgb_color.red || 0.0;
5397 # var greenFrac = rgb_color.green || 0.0;
5398 # var blueFrac = rgb_color.blue || 0.0;
5399 # var red = Math.floor(redFrac * 255);
5400 # var green = Math.floor(greenFrac * 255);
5401 # var blue = Math.floor(blueFrac * 255);
5402 #
5403 # if (!('alpha' in rgb_color)) {
5404 # return rgbToCssColor_(red, green, blue);
5405 # }
5406 #
5407 # var alphaFrac = rgb_color.alpha.value || 0.0;
5408 # var rgbParams = [red, green, blue].join(',');
5409 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5410 # };
5411 #
5412 # var rgbToCssColor_ = function(red, green, blue) {
5413 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5414 # var hexString = rgbNumber.toString(16);
5415 # var missingZeros = 6 - hexString.length;
5416 # var resultBuilder = ['#'];
5417 # for (var i = 0; i < missingZeros; i++) {
5418 # resultBuilder.push('0');
5419 # }
5420 # resultBuilder.push(hexString);
5421 # return resultBuilder.join('');
5422 # };
5423 #
5424 # // ...
5425 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5426 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5427 # the final pixel color is defined by the equation:
5428 #
5429 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5430 #
5431 # This means that a value of 1.0 corresponds to a solid color, whereas
5432 # a value of 0.0 corresponds to a completely transparent color. This
5433 # uses a wrapper message rather than a simple float scalar so that it is
5434 # possible to distinguish between a default value and the value being unset.
5435 # If omitted, this color object is to be rendered as a solid color
5436 # (as if the alpha value had been explicitly given with a value of 1.0).
5437 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5438 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5439 },
5440 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005441 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005442 "style": "A String", # The style of the border.
5443 },
5444 },
5445 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
5446 },
5447 },
5448 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
5449 # the interpolation points listed. The format of a cell will vary
5450 # based on its contents as compared to the values of the interpolation
5451 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005452 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005453 # These pin the gradient color scale according to the color,
5454 # type and value chosen.
5455 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
5456 # for simplicity of conversion to/from color representations in various
5457 # languages over compactness; for example, the fields of this representation
5458 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5459 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5460 # method in iOS; and, with just a little work, it can be easily formatted into
5461 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5462 #
5463 # Example (Java):
5464 #
5465 # import com.google.type.Color;
5466 #
5467 # // ...
5468 # public static java.awt.Color fromProto(Color protocolor) {
5469 # float alpha = protocolor.hasAlpha()
5470 # ? protocolor.getAlpha().getValue()
5471 # : 1.0;
5472 #
5473 # return new java.awt.Color(
5474 # protocolor.getRed(),
5475 # protocolor.getGreen(),
5476 # protocolor.getBlue(),
5477 # alpha);
5478 # }
5479 #
5480 # public static Color toProto(java.awt.Color color) {
5481 # float red = (float) color.getRed();
5482 # float green = (float) color.getGreen();
5483 # float blue = (float) color.getBlue();
5484 # float denominator = 255.0;
5485 # Color.Builder resultBuilder =
5486 # Color
5487 # .newBuilder()
5488 # .setRed(red / denominator)
5489 # .setGreen(green / denominator)
5490 # .setBlue(blue / denominator);
5491 # int alpha = color.getAlpha();
5492 # if (alpha != 255) {
5493 # result.setAlpha(
5494 # FloatValue
5495 # .newBuilder()
5496 # .setValue(((float) alpha) / denominator)
5497 # .build());
5498 # }
5499 # return resultBuilder.build();
5500 # }
5501 # // ...
5502 #
5503 # Example (iOS / Obj-C):
5504 #
5505 # // ...
5506 # static UIColor* fromProto(Color* protocolor) {
5507 # float red = [protocolor red];
5508 # float green = [protocolor green];
5509 # float blue = [protocolor blue];
5510 # FloatValue* alpha_wrapper = [protocolor alpha];
5511 # float alpha = 1.0;
5512 # if (alpha_wrapper != nil) {
5513 # alpha = [alpha_wrapper value];
5514 # }
5515 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5516 # }
5517 #
5518 # static Color* toProto(UIColor* color) {
5519 # CGFloat red, green, blue, alpha;
5520 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5521 # return nil;
5522 # }
5523 # Color* result = [Color alloc] init];
5524 # [result setRed:red];
5525 # [result setGreen:green];
5526 # [result setBlue:blue];
5527 # if (alpha <= 0.9999) {
5528 # [result setAlpha:floatWrapperWithValue(alpha)];
5529 # }
5530 # [result autorelease];
5531 # return result;
5532 # }
5533 # // ...
5534 #
5535 # Example (JavaScript):
5536 #
5537 # // ...
5538 #
5539 # var protoToCssColor = function(rgb_color) {
5540 # var redFrac = rgb_color.red || 0.0;
5541 # var greenFrac = rgb_color.green || 0.0;
5542 # var blueFrac = rgb_color.blue || 0.0;
5543 # var red = Math.floor(redFrac * 255);
5544 # var green = Math.floor(greenFrac * 255);
5545 # var blue = Math.floor(blueFrac * 255);
5546 #
5547 # if (!('alpha' in rgb_color)) {
5548 # return rgbToCssColor_(red, green, blue);
5549 # }
5550 #
5551 # var alphaFrac = rgb_color.alpha.value || 0.0;
5552 # var rgbParams = [red, green, blue].join(',');
5553 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5554 # };
5555 #
5556 # var rgbToCssColor_ = function(red, green, blue) {
5557 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5558 # var hexString = rgbNumber.toString(16);
5559 # var missingZeros = 6 - hexString.length;
5560 # var resultBuilder = ['#'];
5561 # for (var i = 0; i < missingZeros; i++) {
5562 # resultBuilder.push('0');
5563 # }
5564 # resultBuilder.push(hexString);
5565 # return resultBuilder.join('');
5566 # };
5567 #
5568 # // ...
5569 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5570 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5571 # the final pixel color is defined by the equation:
5572 #
5573 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5574 #
5575 # This means that a value of 1.0 corresponds to a solid color, whereas
5576 # a value of 0.0 corresponds to a completely transparent color. This
5577 # uses a wrapper message rather than a simple float scalar so that it is
5578 # possible to distinguish between a default value and the value being unset.
5579 # If omitted, this color object is to be rendered as a solid color
5580 # (as if the alpha value had been explicitly given with a value of 1.0).
5581 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5582 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5583 },
5584 "type": "A String", # How the value should be interpreted.
5585 "value": "A String", # The value this interpolation point uses. May be a formula.
5586 # Unused if type is MIN or
5587 # MAX.
5588 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005589 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005590 # These pin the gradient color scale according to the color,
5591 # type and value chosen.
5592 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
5593 # for simplicity of conversion to/from color representations in various
5594 # languages over compactness; for example, the fields of this representation
5595 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5596 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5597 # method in iOS; and, with just a little work, it can be easily formatted into
5598 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5599 #
5600 # Example (Java):
5601 #
5602 # import com.google.type.Color;
5603 #
5604 # // ...
5605 # public static java.awt.Color fromProto(Color protocolor) {
5606 # float alpha = protocolor.hasAlpha()
5607 # ? protocolor.getAlpha().getValue()
5608 # : 1.0;
5609 #
5610 # return new java.awt.Color(
5611 # protocolor.getRed(),
5612 # protocolor.getGreen(),
5613 # protocolor.getBlue(),
5614 # alpha);
5615 # }
5616 #
5617 # public static Color toProto(java.awt.Color color) {
5618 # float red = (float) color.getRed();
5619 # float green = (float) color.getGreen();
5620 # float blue = (float) color.getBlue();
5621 # float denominator = 255.0;
5622 # Color.Builder resultBuilder =
5623 # Color
5624 # .newBuilder()
5625 # .setRed(red / denominator)
5626 # .setGreen(green / denominator)
5627 # .setBlue(blue / denominator);
5628 # int alpha = color.getAlpha();
5629 # if (alpha != 255) {
5630 # result.setAlpha(
5631 # FloatValue
5632 # .newBuilder()
5633 # .setValue(((float) alpha) / denominator)
5634 # .build());
5635 # }
5636 # return resultBuilder.build();
5637 # }
5638 # // ...
5639 #
5640 # Example (iOS / Obj-C):
5641 #
5642 # // ...
5643 # static UIColor* fromProto(Color* protocolor) {
5644 # float red = [protocolor red];
5645 # float green = [protocolor green];
5646 # float blue = [protocolor blue];
5647 # FloatValue* alpha_wrapper = [protocolor alpha];
5648 # float alpha = 1.0;
5649 # if (alpha_wrapper != nil) {
5650 # alpha = [alpha_wrapper value];
5651 # }
5652 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5653 # }
5654 #
5655 # static Color* toProto(UIColor* color) {
5656 # CGFloat red, green, blue, alpha;
5657 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5658 # return nil;
5659 # }
5660 # Color* result = [Color alloc] init];
5661 # [result setRed:red];
5662 # [result setGreen:green];
5663 # [result setBlue:blue];
5664 # if (alpha <= 0.9999) {
5665 # [result setAlpha:floatWrapperWithValue(alpha)];
5666 # }
5667 # [result autorelease];
5668 # return result;
5669 # }
5670 # // ...
5671 #
5672 # Example (JavaScript):
5673 #
5674 # // ...
5675 #
5676 # var protoToCssColor = function(rgb_color) {
5677 # var redFrac = rgb_color.red || 0.0;
5678 # var greenFrac = rgb_color.green || 0.0;
5679 # var blueFrac = rgb_color.blue || 0.0;
5680 # var red = Math.floor(redFrac * 255);
5681 # var green = Math.floor(greenFrac * 255);
5682 # var blue = Math.floor(blueFrac * 255);
5683 #
5684 # if (!('alpha' in rgb_color)) {
5685 # return rgbToCssColor_(red, green, blue);
5686 # }
5687 #
5688 # var alphaFrac = rgb_color.alpha.value || 0.0;
5689 # var rgbParams = [red, green, blue].join(',');
5690 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5691 # };
5692 #
5693 # var rgbToCssColor_ = function(red, green, blue) {
5694 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5695 # var hexString = rgbNumber.toString(16);
5696 # var missingZeros = 6 - hexString.length;
5697 # var resultBuilder = ['#'];
5698 # for (var i = 0; i < missingZeros; i++) {
5699 # resultBuilder.push('0');
5700 # }
5701 # resultBuilder.push(hexString);
5702 # return resultBuilder.join('');
5703 # };
5704 #
5705 # // ...
5706 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5707 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5708 # the final pixel color is defined by the equation:
5709 #
5710 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5711 #
5712 # This means that a value of 1.0 corresponds to a solid color, whereas
5713 # a value of 0.0 corresponds to a completely transparent color. This
5714 # uses a wrapper message rather than a simple float scalar so that it is
5715 # possible to distinguish between a default value and the value being unset.
5716 # If omitted, this color object is to be rendered as a solid color
5717 # (as if the alpha value had been explicitly given with a value of 1.0).
5718 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5719 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5720 },
5721 "type": "A String", # How the value should be interpreted.
5722 "value": "A String", # The value this interpolation point uses. May be a formula.
5723 # Unused if type is MIN or
5724 # MAX.
5725 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005726 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005727 # These pin the gradient color scale according to the color,
5728 # type and value chosen.
5729 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
5730 # for simplicity of conversion to/from color representations in various
5731 # languages over compactness; for example, the fields of this representation
5732 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5733 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5734 # method in iOS; and, with just a little work, it can be easily formatted into
5735 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5736 #
5737 # Example (Java):
5738 #
5739 # import com.google.type.Color;
5740 #
5741 # // ...
5742 # public static java.awt.Color fromProto(Color protocolor) {
5743 # float alpha = protocolor.hasAlpha()
5744 # ? protocolor.getAlpha().getValue()
5745 # : 1.0;
5746 #
5747 # return new java.awt.Color(
5748 # protocolor.getRed(),
5749 # protocolor.getGreen(),
5750 # protocolor.getBlue(),
5751 # alpha);
5752 # }
5753 #
5754 # public static Color toProto(java.awt.Color color) {
5755 # float red = (float) color.getRed();
5756 # float green = (float) color.getGreen();
5757 # float blue = (float) color.getBlue();
5758 # float denominator = 255.0;
5759 # Color.Builder resultBuilder =
5760 # Color
5761 # .newBuilder()
5762 # .setRed(red / denominator)
5763 # .setGreen(green / denominator)
5764 # .setBlue(blue / denominator);
5765 # int alpha = color.getAlpha();
5766 # if (alpha != 255) {
5767 # result.setAlpha(
5768 # FloatValue
5769 # .newBuilder()
5770 # .setValue(((float) alpha) / denominator)
5771 # .build());
5772 # }
5773 # return resultBuilder.build();
5774 # }
5775 # // ...
5776 #
5777 # Example (iOS / Obj-C):
5778 #
5779 # // ...
5780 # static UIColor* fromProto(Color* protocolor) {
5781 # float red = [protocolor red];
5782 # float green = [protocolor green];
5783 # float blue = [protocolor blue];
5784 # FloatValue* alpha_wrapper = [protocolor alpha];
5785 # float alpha = 1.0;
5786 # if (alpha_wrapper != nil) {
5787 # alpha = [alpha_wrapper value];
5788 # }
5789 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5790 # }
5791 #
5792 # static Color* toProto(UIColor* color) {
5793 # CGFloat red, green, blue, alpha;
5794 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5795 # return nil;
5796 # }
5797 # Color* result = [Color alloc] init];
5798 # [result setRed:red];
5799 # [result setGreen:green];
5800 # [result setBlue:blue];
5801 # if (alpha <= 0.9999) {
5802 # [result setAlpha:floatWrapperWithValue(alpha)];
5803 # }
5804 # [result autorelease];
5805 # return result;
5806 # }
5807 # // ...
5808 #
5809 # Example (JavaScript):
5810 #
5811 # // ...
5812 #
5813 # var protoToCssColor = function(rgb_color) {
5814 # var redFrac = rgb_color.red || 0.0;
5815 # var greenFrac = rgb_color.green || 0.0;
5816 # var blueFrac = rgb_color.blue || 0.0;
5817 # var red = Math.floor(redFrac * 255);
5818 # var green = Math.floor(greenFrac * 255);
5819 # var blue = Math.floor(blueFrac * 255);
5820 #
5821 # if (!('alpha' in rgb_color)) {
5822 # return rgbToCssColor_(red, green, blue);
5823 # }
5824 #
5825 # var alphaFrac = rgb_color.alpha.value || 0.0;
5826 # var rgbParams = [red, green, blue].join(',');
5827 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5828 # };
5829 #
5830 # var rgbToCssColor_ = function(red, green, blue) {
5831 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5832 # var hexString = rgbNumber.toString(16);
5833 # var missingZeros = 6 - hexString.length;
5834 # var resultBuilder = ['#'];
5835 # for (var i = 0; i < missingZeros; i++) {
5836 # resultBuilder.push('0');
5837 # }
5838 # resultBuilder.push(hexString);
5839 # return resultBuilder.join('');
5840 # };
5841 #
5842 # // ...
5843 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5844 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5845 # the final pixel color is defined by the equation:
5846 #
5847 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5848 #
5849 # This means that a value of 1.0 corresponds to a solid color, whereas
5850 # a value of 0.0 corresponds to a completely transparent color. This
5851 # uses a wrapper message rather than a simple float scalar so that it is
5852 # possible to distinguish between a default value and the value being unset.
5853 # If omitted, this color object is to be rendered as a solid color
5854 # (as if the alpha value had been explicitly given with a value of 1.0).
5855 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5856 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5857 },
5858 "type": "A String", # How the value should be interpreted.
5859 "value": "A String", # The value this interpolation point uses. May be a formula.
5860 # Unused if type is MIN or
5861 # MAX.
5862 },
5863 },
5864 },
5865 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005866 "deleteBanding": { # Removes the banded range with the given ID from the spreadsheet. # Removes a banded range
5867 "bandedRangeId": 42, # The ID of the banded range to delete.
5868 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005869 "repeatCell": { # Updates all cells in the range to the values in the given Cell object. # Repeats a single cell across a range.
5870 # Only the fields listed in the fields field are updated; others are
5871 # unchanged.
5872 #
5873 # If writing a cell with a formula, the formula's ranges will automatically
5874 # increment for each field in the range.
5875 # For example, if writing a cell with formula `=A1` into range B2:C4,
5876 # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`,
5877 # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`.
5878 #
5879 # To keep the formula's ranges static, use the `$` indicator.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005880 # For example, use the formula `=$A$1` to prevent both the row and the
5881 # column from incrementing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005882 "cell": { # Data about a specific cell. # The data to write.
5883 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
5884 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005885 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005886 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005887 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005888 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
5889 # or vertically (as rows).
5890 "rows": [ # Each row grouping in the pivot table.
5891 { # A single grouping (either row or column) in a pivot table.
5892 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
5893 "valueMetadata": [ # Metadata about values in the grouping.
5894 { # Metadata about a value in a pivot grouping.
5895 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
5896 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
5897 # (Note that formulaValue is not valid,
5898 # because the values will be calculated.)
5899 "numberValue": 3.14, # Represents a double value.
5900 # Note: Dates, Times and DateTimes are represented as doubles in
5901 # "serial number" format.
5902 "boolValue": True or False, # Represents a boolean value.
5903 "formulaValue": "A String", # Represents a formula.
5904 "stringValue": "A String", # Represents a string value.
5905 # Leading single quotes are not included. For example, if the user typed
5906 # `'123` into the UI, this would be represented as a `stringValue` of
5907 # `"123"`.
5908 "errorValue": { # An error in a cell. # Represents an error.
5909 # This field is read-only.
5910 "message": "A String", # A message with more information about the error
5911 # (in the spreadsheet's locale).
5912 "type": "A String", # The type of error.
5913 },
5914 },
5915 },
5916 ],
5917 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
5918 # If not specified, sorting is alphabetical by this group's values.
5919 "buckets": [ # Determines the bucket from which values are chosen to sort.
5920 #
5921 # For example, in a pivot table with one row group & two column groups,
5922 # the row group can list up to two values. The first value corresponds
5923 # to a value within the first column group, and the second value
5924 # corresponds to a value in the second column group. If no values
5925 # are listed, this would indicate that the row should be sorted according
5926 # to the "Grand Total" over the column groups. If a single value is listed,
5927 # this would correspond to using the "Total" of that bucket.
5928 { # The kinds of value that a cell in a spreadsheet can have.
5929 "numberValue": 3.14, # Represents a double value.
5930 # Note: Dates, Times and DateTimes are represented as doubles in
5931 # "serial number" format.
5932 "boolValue": True or False, # Represents a boolean value.
5933 "formulaValue": "A String", # Represents a formula.
5934 "stringValue": "A String", # Represents a string value.
5935 # Leading single quotes are not included. For example, if the user typed
5936 # `'123` into the UI, this would be represented as a `stringValue` of
5937 # `"123"`.
5938 "errorValue": { # An error in a cell. # Represents an error.
5939 # This field is read-only.
5940 "message": "A String", # A message with more information about the error
5941 # (in the spreadsheet's locale).
5942 "type": "A String", # The type of error.
5943 },
5944 },
5945 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005946 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005947 # grouping should be sorted by.
5948 },
5949 "sortOrder": "A String", # The order the values in this group should be sorted.
5950 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
5951 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005952 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005953 # means this group refers to column `C`, whereas the offset `1` would refer
5954 # to column `D`.
5955 },
5956 ],
5957 "source": { # A range on a sheet. # The range the pivot table is reading data from.
5958 # All indexes are zero-based.
5959 # Indexes are half open, e.g the start index is inclusive
5960 # and the end index is exclusive -- [start_index, end_index).
5961 # Missing indexes indicate the range is unbounded on that side.
5962 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005963 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005964 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005965 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005966 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005967 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005968 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005969 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005970 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005971 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005972 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005973 # `Sheet1!A:B == sheet_id: 0,
5974 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005975 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005976 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005977 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005978 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005979 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005980 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005981 #
5982 # The start index must always be less than or equal to the end index.
5983 # If the start index equals the end index, then the range is empty.
5984 # Empty ranges are typically not meaningful and are usually rendered in the
5985 # UI as `#REF!`.
5986 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
5987 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
5988 "sheetId": 42, # The sheet this range is on.
5989 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
5990 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
5991 },
5992 "values": [ # A list of values to include in the pivot table.
5993 { # The definition of how a value in a pivot table should be calculated.
5994 "formula": "A String", # A custom formula to calculate the value. The formula must start
5995 # with an `=` character.
5996 "summarizeFunction": "A String", # A function to summarize the value.
5997 # If formula is set, the only supported values are
5998 # SUM and
5999 # CUSTOM.
6000 # If sourceColumnOffset is set, then `CUSTOM`
6001 # is not supported.
6002 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
6003 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006004 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006005 # means this value refers to column `C`, whereas the offset `1` would
6006 # refer to column `D`.
6007 "name": "A String", # A name to use for the value. This is only used if formula was set.
6008 # Otherwise, the column name is used.
6009 },
6010 ],
6011 "criteria": { # An optional mapping of filters per source column offset.
6012 #
6013 # The filters will be applied before aggregating data into the pivot table.
6014 # The map's key is the column offset of the source range that you want to
6015 # filter, and the value is the criteria for that column.
6016 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006017 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006018 # for column `C`, whereas the key `1` is for column `D`.
6019 "a_key": { # Criteria for showing/hiding rows in a pivot table.
6020 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
6021 "A String",
6022 ],
6023 },
6024 },
6025 "columns": [ # Each column grouping in the pivot table.
6026 { # A single grouping (either row or column) in a pivot table.
6027 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
6028 "valueMetadata": [ # Metadata about values in the grouping.
6029 { # Metadata about a value in a pivot grouping.
6030 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
6031 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
6032 # (Note that formulaValue is not valid,
6033 # because the values will be calculated.)
6034 "numberValue": 3.14, # Represents a double value.
6035 # Note: Dates, Times and DateTimes are represented as doubles in
6036 # "serial number" format.
6037 "boolValue": True or False, # Represents a boolean value.
6038 "formulaValue": "A String", # Represents a formula.
6039 "stringValue": "A String", # Represents a string value.
6040 # Leading single quotes are not included. For example, if the user typed
6041 # `'123` into the UI, this would be represented as a `stringValue` of
6042 # `"123"`.
6043 "errorValue": { # An error in a cell. # Represents an error.
6044 # This field is read-only.
6045 "message": "A String", # A message with more information about the error
6046 # (in the spreadsheet's locale).
6047 "type": "A String", # The type of error.
6048 },
6049 },
6050 },
6051 ],
6052 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
6053 # If not specified, sorting is alphabetical by this group's values.
6054 "buckets": [ # Determines the bucket from which values are chosen to sort.
6055 #
6056 # For example, in a pivot table with one row group & two column groups,
6057 # the row group can list up to two values. The first value corresponds
6058 # to a value within the first column group, and the second value
6059 # corresponds to a value in the second column group. If no values
6060 # are listed, this would indicate that the row should be sorted according
6061 # to the "Grand Total" over the column groups. If a single value is listed,
6062 # this would correspond to using the "Total" of that bucket.
6063 { # The kinds of value that a cell in a spreadsheet can have.
6064 "numberValue": 3.14, # Represents a double value.
6065 # Note: Dates, Times and DateTimes are represented as doubles in
6066 # "serial number" format.
6067 "boolValue": True or False, # Represents a boolean value.
6068 "formulaValue": "A String", # Represents a formula.
6069 "stringValue": "A String", # Represents a string value.
6070 # Leading single quotes are not included. For example, if the user typed
6071 # `'123` into the UI, this would be represented as a `stringValue` of
6072 # `"123"`.
6073 "errorValue": { # An error in a cell. # Represents an error.
6074 # This field is read-only.
6075 "message": "A String", # A message with more information about the error
6076 # (in the spreadsheet's locale).
6077 "type": "A String", # The type of error.
6078 },
6079 },
6080 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006081 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006082 # grouping should be sorted by.
6083 },
6084 "sortOrder": "A String", # The order the values in this group should be sorted.
6085 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
6086 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006087 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006088 # means this group refers to column `C`, whereas the offset `1` would refer
6089 # to column `D`.
6090 },
6091 ],
6092 },
6093 "hyperlink": "A String", # A hyperlink this cell points to, if any.
6094 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
6095 "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
6096 # the calculated value. For cells with literals, this will be
6097 # the same as the user_entered_value.
6098 # This field is read-only.
6099 "numberValue": 3.14, # Represents a double value.
6100 # Note: Dates, Times and DateTimes are represented as doubles in
6101 # "serial number" format.
6102 "boolValue": True or False, # Represents a boolean value.
6103 "formulaValue": "A String", # Represents a formula.
6104 "stringValue": "A String", # Represents a string value.
6105 # Leading single quotes are not included. For example, if the user typed
6106 # `'123` into the UI, this would be represented as a `stringValue` of
6107 # `"123"`.
6108 "errorValue": { # An error in a cell. # Represents an error.
6109 # This field is read-only.
6110 "message": "A String", # A message with more information about the error
6111 # (in the spreadsheet's locale).
6112 "type": "A String", # The type of error.
6113 },
6114 },
6115 "formattedValue": "A String", # The formatted value of the cell.
6116 # This is the value as it's shown to the user.
6117 # This field is read-only.
6118 "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()`
6119 # Note: Dates, Times and DateTimes are represented as doubles in
6120 # serial number format.
6121 "numberValue": 3.14, # Represents a double value.
6122 # Note: Dates, Times and DateTimes are represented as doubles in
6123 # "serial number" format.
6124 "boolValue": True or False, # Represents a boolean value.
6125 "formulaValue": "A String", # Represents a formula.
6126 "stringValue": "A String", # Represents a string value.
6127 # Leading single quotes are not included. For example, if the user typed
6128 # `'123` into the UI, this would be represented as a `stringValue` of
6129 # `"123"`.
6130 "errorValue": { # An error in a cell. # Represents an error.
6131 # This field is read-only.
6132 "message": "A String", # A message with more information about the error
6133 # (in the spreadsheet's locale).
6134 "type": "A String", # The type of error.
6135 },
6136 },
6137 "note": "A String", # Any note on the cell.
6138 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
6139 # This includes the results of applying any conditional formatting and,
6140 # if the cell contains a formula, the computed number format.
6141 # If the effective format is the default format, effective format will
6142 # not be written.
6143 # This field is read-only.
6144 "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 -07006145 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
6146 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07006147 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
6148 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006149 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006150 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006151 },
6152 "textDirection": "A String", # The direction of the text in the cell.
6153 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
6154 # When updating padding, every field must be specified.
6155 "top": 42, # The top padding of the cell.
6156 "right": 42, # The right padding of the cell.
6157 "bottom": 42, # The bottom padding of the cell.
6158 "left": 42, # The left padding of the cell.
6159 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006160 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006161 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
6162 # for simplicity of conversion to/from color representations in various
6163 # languages over compactness; for example, the fields of this representation
6164 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6165 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6166 # method in iOS; and, with just a little work, it can be easily formatted into
6167 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6168 #
6169 # Example (Java):
6170 #
6171 # import com.google.type.Color;
6172 #
6173 # // ...
6174 # public static java.awt.Color fromProto(Color protocolor) {
6175 # float alpha = protocolor.hasAlpha()
6176 # ? protocolor.getAlpha().getValue()
6177 # : 1.0;
6178 #
6179 # return new java.awt.Color(
6180 # protocolor.getRed(),
6181 # protocolor.getGreen(),
6182 # protocolor.getBlue(),
6183 # alpha);
6184 # }
6185 #
6186 # public static Color toProto(java.awt.Color color) {
6187 # float red = (float) color.getRed();
6188 # float green = (float) color.getGreen();
6189 # float blue = (float) color.getBlue();
6190 # float denominator = 255.0;
6191 # Color.Builder resultBuilder =
6192 # Color
6193 # .newBuilder()
6194 # .setRed(red / denominator)
6195 # .setGreen(green / denominator)
6196 # .setBlue(blue / denominator);
6197 # int alpha = color.getAlpha();
6198 # if (alpha != 255) {
6199 # result.setAlpha(
6200 # FloatValue
6201 # .newBuilder()
6202 # .setValue(((float) alpha) / denominator)
6203 # .build());
6204 # }
6205 # return resultBuilder.build();
6206 # }
6207 # // ...
6208 #
6209 # Example (iOS / Obj-C):
6210 #
6211 # // ...
6212 # static UIColor* fromProto(Color* protocolor) {
6213 # float red = [protocolor red];
6214 # float green = [protocolor green];
6215 # float blue = [protocolor blue];
6216 # FloatValue* alpha_wrapper = [protocolor alpha];
6217 # float alpha = 1.0;
6218 # if (alpha_wrapper != nil) {
6219 # alpha = [alpha_wrapper value];
6220 # }
6221 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6222 # }
6223 #
6224 # static Color* toProto(UIColor* color) {
6225 # CGFloat red, green, blue, alpha;
6226 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6227 # return nil;
6228 # }
6229 # Color* result = [Color alloc] init];
6230 # [result setRed:red];
6231 # [result setGreen:green];
6232 # [result setBlue:blue];
6233 # if (alpha <= 0.9999) {
6234 # [result setAlpha:floatWrapperWithValue(alpha)];
6235 # }
6236 # [result autorelease];
6237 # return result;
6238 # }
6239 # // ...
6240 #
6241 # Example (JavaScript):
6242 #
6243 # // ...
6244 #
6245 # var protoToCssColor = function(rgb_color) {
6246 # var redFrac = rgb_color.red || 0.0;
6247 # var greenFrac = rgb_color.green || 0.0;
6248 # var blueFrac = rgb_color.blue || 0.0;
6249 # var red = Math.floor(redFrac * 255);
6250 # var green = Math.floor(greenFrac * 255);
6251 # var blue = Math.floor(blueFrac * 255);
6252 #
6253 # if (!('alpha' in rgb_color)) {
6254 # return rgbToCssColor_(red, green, blue);
6255 # }
6256 #
6257 # var alphaFrac = rgb_color.alpha.value || 0.0;
6258 # var rgbParams = [red, green, blue].join(',');
6259 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6260 # };
6261 #
6262 # var rgbToCssColor_ = function(red, green, blue) {
6263 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6264 # var hexString = rgbNumber.toString(16);
6265 # var missingZeros = 6 - hexString.length;
6266 # var resultBuilder = ['#'];
6267 # for (var i = 0; i < missingZeros; i++) {
6268 # resultBuilder.push('0');
6269 # }
6270 # resultBuilder.push(hexString);
6271 # return resultBuilder.join('');
6272 # };
6273 #
6274 # // ...
6275 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6276 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6277 # the final pixel color is defined by the equation:
6278 #
6279 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6280 #
6281 # This means that a value of 1.0 corresponds to a solid color, whereas
6282 # a value of 0.0 corresponds to a completely transparent color. This
6283 # uses a wrapper message rather than a simple float scalar so that it is
6284 # possible to distinguish between a default value and the value being unset.
6285 # If omitted, this color object is to be rendered as a solid color
6286 # (as if the alpha value had been explicitly given with a value of 1.0).
6287 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6288 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6289 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006290 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006291 "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).
6292 # Absent values indicate that the field isn't specified.
6293 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
6294 # for simplicity of conversion to/from color representations in various
6295 # languages over compactness; for example, the fields of this representation
6296 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6297 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6298 # method in iOS; and, with just a little work, it can be easily formatted into
6299 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6300 #
6301 # Example (Java):
6302 #
6303 # import com.google.type.Color;
6304 #
6305 # // ...
6306 # public static java.awt.Color fromProto(Color protocolor) {
6307 # float alpha = protocolor.hasAlpha()
6308 # ? protocolor.getAlpha().getValue()
6309 # : 1.0;
6310 #
6311 # return new java.awt.Color(
6312 # protocolor.getRed(),
6313 # protocolor.getGreen(),
6314 # protocolor.getBlue(),
6315 # alpha);
6316 # }
6317 #
6318 # public static Color toProto(java.awt.Color color) {
6319 # float red = (float) color.getRed();
6320 # float green = (float) color.getGreen();
6321 # float blue = (float) color.getBlue();
6322 # float denominator = 255.0;
6323 # Color.Builder resultBuilder =
6324 # Color
6325 # .newBuilder()
6326 # .setRed(red / denominator)
6327 # .setGreen(green / denominator)
6328 # .setBlue(blue / denominator);
6329 # int alpha = color.getAlpha();
6330 # if (alpha != 255) {
6331 # result.setAlpha(
6332 # FloatValue
6333 # .newBuilder()
6334 # .setValue(((float) alpha) / denominator)
6335 # .build());
6336 # }
6337 # return resultBuilder.build();
6338 # }
6339 # // ...
6340 #
6341 # Example (iOS / Obj-C):
6342 #
6343 # // ...
6344 # static UIColor* fromProto(Color* protocolor) {
6345 # float red = [protocolor red];
6346 # float green = [protocolor green];
6347 # float blue = [protocolor blue];
6348 # FloatValue* alpha_wrapper = [protocolor alpha];
6349 # float alpha = 1.0;
6350 # if (alpha_wrapper != nil) {
6351 # alpha = [alpha_wrapper value];
6352 # }
6353 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6354 # }
6355 #
6356 # static Color* toProto(UIColor* color) {
6357 # CGFloat red, green, blue, alpha;
6358 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6359 # return nil;
6360 # }
6361 # Color* result = [Color alloc] init];
6362 # [result setRed:red];
6363 # [result setGreen:green];
6364 # [result setBlue:blue];
6365 # if (alpha <= 0.9999) {
6366 # [result setAlpha:floatWrapperWithValue(alpha)];
6367 # }
6368 # [result autorelease];
6369 # return result;
6370 # }
6371 # // ...
6372 #
6373 # Example (JavaScript):
6374 #
6375 # // ...
6376 #
6377 # var protoToCssColor = function(rgb_color) {
6378 # var redFrac = rgb_color.red || 0.0;
6379 # var greenFrac = rgb_color.green || 0.0;
6380 # var blueFrac = rgb_color.blue || 0.0;
6381 # var red = Math.floor(redFrac * 255);
6382 # var green = Math.floor(greenFrac * 255);
6383 # var blue = Math.floor(blueFrac * 255);
6384 #
6385 # if (!('alpha' in rgb_color)) {
6386 # return rgbToCssColor_(red, green, blue);
6387 # }
6388 #
6389 # var alphaFrac = rgb_color.alpha.value || 0.0;
6390 # var rgbParams = [red, green, blue].join(',');
6391 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6392 # };
6393 #
6394 # var rgbToCssColor_ = function(red, green, blue) {
6395 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6396 # var hexString = rgbNumber.toString(16);
6397 # var missingZeros = 6 - hexString.length;
6398 # var resultBuilder = ['#'];
6399 # for (var i = 0; i < missingZeros; i++) {
6400 # resultBuilder.push('0');
6401 # }
6402 # resultBuilder.push(hexString);
6403 # return resultBuilder.join('');
6404 # };
6405 #
6406 # // ...
6407 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6408 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6409 # the final pixel color is defined by the equation:
6410 #
6411 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6412 #
6413 # This means that a value of 1.0 corresponds to a solid color, whereas
6414 # a value of 0.0 corresponds to a completely transparent color. This
6415 # uses a wrapper message rather than a simple float scalar so that it is
6416 # possible to distinguish between a default value and the value being unset.
6417 # If omitted, this color object is to be rendered as a solid color
6418 # (as if the alpha value had been explicitly given with a value of 1.0).
6419 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6420 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6421 },
6422 "bold": True or False, # True if the text is bold.
6423 "strikethrough": True or False, # True if the text has a strikethrough.
6424 "fontFamily": "A String", # The font family.
6425 "fontSize": 42, # The size of the font.
6426 "italic": True or False, # True if the text is italicized.
6427 "underline": True or False, # True if the text is underlined.
6428 },
6429 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
6430 "borders": { # The borders of the cell. # The borders of the cell.
6431 "top": { # A border along a cell. # The top border of the cell.
6432 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
6433 # for simplicity of conversion to/from color representations in various
6434 # languages over compactness; for example, the fields of this representation
6435 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6436 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6437 # method in iOS; and, with just a little work, it can be easily formatted into
6438 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6439 #
6440 # Example (Java):
6441 #
6442 # import com.google.type.Color;
6443 #
6444 # // ...
6445 # public static java.awt.Color fromProto(Color protocolor) {
6446 # float alpha = protocolor.hasAlpha()
6447 # ? protocolor.getAlpha().getValue()
6448 # : 1.0;
6449 #
6450 # return new java.awt.Color(
6451 # protocolor.getRed(),
6452 # protocolor.getGreen(),
6453 # protocolor.getBlue(),
6454 # alpha);
6455 # }
6456 #
6457 # public static Color toProto(java.awt.Color color) {
6458 # float red = (float) color.getRed();
6459 # float green = (float) color.getGreen();
6460 # float blue = (float) color.getBlue();
6461 # float denominator = 255.0;
6462 # Color.Builder resultBuilder =
6463 # Color
6464 # .newBuilder()
6465 # .setRed(red / denominator)
6466 # .setGreen(green / denominator)
6467 # .setBlue(blue / denominator);
6468 # int alpha = color.getAlpha();
6469 # if (alpha != 255) {
6470 # result.setAlpha(
6471 # FloatValue
6472 # .newBuilder()
6473 # .setValue(((float) alpha) / denominator)
6474 # .build());
6475 # }
6476 # return resultBuilder.build();
6477 # }
6478 # // ...
6479 #
6480 # Example (iOS / Obj-C):
6481 #
6482 # // ...
6483 # static UIColor* fromProto(Color* protocolor) {
6484 # float red = [protocolor red];
6485 # float green = [protocolor green];
6486 # float blue = [protocolor blue];
6487 # FloatValue* alpha_wrapper = [protocolor alpha];
6488 # float alpha = 1.0;
6489 # if (alpha_wrapper != nil) {
6490 # alpha = [alpha_wrapper value];
6491 # }
6492 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6493 # }
6494 #
6495 # static Color* toProto(UIColor* color) {
6496 # CGFloat red, green, blue, alpha;
6497 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6498 # return nil;
6499 # }
6500 # Color* result = [Color alloc] init];
6501 # [result setRed:red];
6502 # [result setGreen:green];
6503 # [result setBlue:blue];
6504 # if (alpha <= 0.9999) {
6505 # [result setAlpha:floatWrapperWithValue(alpha)];
6506 # }
6507 # [result autorelease];
6508 # return result;
6509 # }
6510 # // ...
6511 #
6512 # Example (JavaScript):
6513 #
6514 # // ...
6515 #
6516 # var protoToCssColor = function(rgb_color) {
6517 # var redFrac = rgb_color.red || 0.0;
6518 # var greenFrac = rgb_color.green || 0.0;
6519 # var blueFrac = rgb_color.blue || 0.0;
6520 # var red = Math.floor(redFrac * 255);
6521 # var green = Math.floor(greenFrac * 255);
6522 # var blue = Math.floor(blueFrac * 255);
6523 #
6524 # if (!('alpha' in rgb_color)) {
6525 # return rgbToCssColor_(red, green, blue);
6526 # }
6527 #
6528 # var alphaFrac = rgb_color.alpha.value || 0.0;
6529 # var rgbParams = [red, green, blue].join(',');
6530 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6531 # };
6532 #
6533 # var rgbToCssColor_ = function(red, green, blue) {
6534 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6535 # var hexString = rgbNumber.toString(16);
6536 # var missingZeros = 6 - hexString.length;
6537 # var resultBuilder = ['#'];
6538 # for (var i = 0; i < missingZeros; i++) {
6539 # resultBuilder.push('0');
6540 # }
6541 # resultBuilder.push(hexString);
6542 # return resultBuilder.join('');
6543 # };
6544 #
6545 # // ...
6546 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6547 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6548 # the final pixel color is defined by the equation:
6549 #
6550 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6551 #
6552 # This means that a value of 1.0 corresponds to a solid color, whereas
6553 # a value of 0.0 corresponds to a completely transparent color. This
6554 # uses a wrapper message rather than a simple float scalar so that it is
6555 # possible to distinguish between a default value and the value being unset.
6556 # If omitted, this color object is to be rendered as a solid color
6557 # (as if the alpha value had been explicitly given with a value of 1.0).
6558 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6559 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6560 },
6561 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006562 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006563 "style": "A String", # The style of the border.
6564 },
6565 "right": { # A border along a cell. # The right border of the cell.
6566 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
6567 # for simplicity of conversion to/from color representations in various
6568 # languages over compactness; for example, the fields of this representation
6569 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6570 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6571 # method in iOS; and, with just a little work, it can be easily formatted into
6572 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6573 #
6574 # Example (Java):
6575 #
6576 # import com.google.type.Color;
6577 #
6578 # // ...
6579 # public static java.awt.Color fromProto(Color protocolor) {
6580 # float alpha = protocolor.hasAlpha()
6581 # ? protocolor.getAlpha().getValue()
6582 # : 1.0;
6583 #
6584 # return new java.awt.Color(
6585 # protocolor.getRed(),
6586 # protocolor.getGreen(),
6587 # protocolor.getBlue(),
6588 # alpha);
6589 # }
6590 #
6591 # public static Color toProto(java.awt.Color color) {
6592 # float red = (float) color.getRed();
6593 # float green = (float) color.getGreen();
6594 # float blue = (float) color.getBlue();
6595 # float denominator = 255.0;
6596 # Color.Builder resultBuilder =
6597 # Color
6598 # .newBuilder()
6599 # .setRed(red / denominator)
6600 # .setGreen(green / denominator)
6601 # .setBlue(blue / denominator);
6602 # int alpha = color.getAlpha();
6603 # if (alpha != 255) {
6604 # result.setAlpha(
6605 # FloatValue
6606 # .newBuilder()
6607 # .setValue(((float) alpha) / denominator)
6608 # .build());
6609 # }
6610 # return resultBuilder.build();
6611 # }
6612 # // ...
6613 #
6614 # Example (iOS / Obj-C):
6615 #
6616 # // ...
6617 # static UIColor* fromProto(Color* protocolor) {
6618 # float red = [protocolor red];
6619 # float green = [protocolor green];
6620 # float blue = [protocolor blue];
6621 # FloatValue* alpha_wrapper = [protocolor alpha];
6622 # float alpha = 1.0;
6623 # if (alpha_wrapper != nil) {
6624 # alpha = [alpha_wrapper value];
6625 # }
6626 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6627 # }
6628 #
6629 # static Color* toProto(UIColor* color) {
6630 # CGFloat red, green, blue, alpha;
6631 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6632 # return nil;
6633 # }
6634 # Color* result = [Color alloc] init];
6635 # [result setRed:red];
6636 # [result setGreen:green];
6637 # [result setBlue:blue];
6638 # if (alpha <= 0.9999) {
6639 # [result setAlpha:floatWrapperWithValue(alpha)];
6640 # }
6641 # [result autorelease];
6642 # return result;
6643 # }
6644 # // ...
6645 #
6646 # Example (JavaScript):
6647 #
6648 # // ...
6649 #
6650 # var protoToCssColor = function(rgb_color) {
6651 # var redFrac = rgb_color.red || 0.0;
6652 # var greenFrac = rgb_color.green || 0.0;
6653 # var blueFrac = rgb_color.blue || 0.0;
6654 # var red = Math.floor(redFrac * 255);
6655 # var green = Math.floor(greenFrac * 255);
6656 # var blue = Math.floor(blueFrac * 255);
6657 #
6658 # if (!('alpha' in rgb_color)) {
6659 # return rgbToCssColor_(red, green, blue);
6660 # }
6661 #
6662 # var alphaFrac = rgb_color.alpha.value || 0.0;
6663 # var rgbParams = [red, green, blue].join(',');
6664 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6665 # };
6666 #
6667 # var rgbToCssColor_ = function(red, green, blue) {
6668 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6669 # var hexString = rgbNumber.toString(16);
6670 # var missingZeros = 6 - hexString.length;
6671 # var resultBuilder = ['#'];
6672 # for (var i = 0; i < missingZeros; i++) {
6673 # resultBuilder.push('0');
6674 # }
6675 # resultBuilder.push(hexString);
6676 # return resultBuilder.join('');
6677 # };
6678 #
6679 # // ...
6680 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6681 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6682 # the final pixel color is defined by the equation:
6683 #
6684 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6685 #
6686 # This means that a value of 1.0 corresponds to a solid color, whereas
6687 # a value of 0.0 corresponds to a completely transparent color. This
6688 # uses a wrapper message rather than a simple float scalar so that it is
6689 # possible to distinguish between a default value and the value being unset.
6690 # If omitted, this color object is to be rendered as a solid color
6691 # (as if the alpha value had been explicitly given with a value of 1.0).
6692 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6693 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6694 },
6695 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006696 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006697 "style": "A String", # The style of the border.
6698 },
6699 "bottom": { # A border along a cell. # The bottom border of the cell.
6700 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
6701 # for simplicity of conversion to/from color representations in various
6702 # languages over compactness; for example, the fields of this representation
6703 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6704 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6705 # method in iOS; and, with just a little work, it can be easily formatted into
6706 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6707 #
6708 # Example (Java):
6709 #
6710 # import com.google.type.Color;
6711 #
6712 # // ...
6713 # public static java.awt.Color fromProto(Color protocolor) {
6714 # float alpha = protocolor.hasAlpha()
6715 # ? protocolor.getAlpha().getValue()
6716 # : 1.0;
6717 #
6718 # return new java.awt.Color(
6719 # protocolor.getRed(),
6720 # protocolor.getGreen(),
6721 # protocolor.getBlue(),
6722 # alpha);
6723 # }
6724 #
6725 # public static Color toProto(java.awt.Color color) {
6726 # float red = (float) color.getRed();
6727 # float green = (float) color.getGreen();
6728 # float blue = (float) color.getBlue();
6729 # float denominator = 255.0;
6730 # Color.Builder resultBuilder =
6731 # Color
6732 # .newBuilder()
6733 # .setRed(red / denominator)
6734 # .setGreen(green / denominator)
6735 # .setBlue(blue / denominator);
6736 # int alpha = color.getAlpha();
6737 # if (alpha != 255) {
6738 # result.setAlpha(
6739 # FloatValue
6740 # .newBuilder()
6741 # .setValue(((float) alpha) / denominator)
6742 # .build());
6743 # }
6744 # return resultBuilder.build();
6745 # }
6746 # // ...
6747 #
6748 # Example (iOS / Obj-C):
6749 #
6750 # // ...
6751 # static UIColor* fromProto(Color* protocolor) {
6752 # float red = [protocolor red];
6753 # float green = [protocolor green];
6754 # float blue = [protocolor blue];
6755 # FloatValue* alpha_wrapper = [protocolor alpha];
6756 # float alpha = 1.0;
6757 # if (alpha_wrapper != nil) {
6758 # alpha = [alpha_wrapper value];
6759 # }
6760 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6761 # }
6762 #
6763 # static Color* toProto(UIColor* color) {
6764 # CGFloat red, green, blue, alpha;
6765 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6766 # return nil;
6767 # }
6768 # Color* result = [Color alloc] init];
6769 # [result setRed:red];
6770 # [result setGreen:green];
6771 # [result setBlue:blue];
6772 # if (alpha <= 0.9999) {
6773 # [result setAlpha:floatWrapperWithValue(alpha)];
6774 # }
6775 # [result autorelease];
6776 # return result;
6777 # }
6778 # // ...
6779 #
6780 # Example (JavaScript):
6781 #
6782 # // ...
6783 #
6784 # var protoToCssColor = function(rgb_color) {
6785 # var redFrac = rgb_color.red || 0.0;
6786 # var greenFrac = rgb_color.green || 0.0;
6787 # var blueFrac = rgb_color.blue || 0.0;
6788 # var red = Math.floor(redFrac * 255);
6789 # var green = Math.floor(greenFrac * 255);
6790 # var blue = Math.floor(blueFrac * 255);
6791 #
6792 # if (!('alpha' in rgb_color)) {
6793 # return rgbToCssColor_(red, green, blue);
6794 # }
6795 #
6796 # var alphaFrac = rgb_color.alpha.value || 0.0;
6797 # var rgbParams = [red, green, blue].join(',');
6798 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6799 # };
6800 #
6801 # var rgbToCssColor_ = function(red, green, blue) {
6802 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6803 # var hexString = rgbNumber.toString(16);
6804 # var missingZeros = 6 - hexString.length;
6805 # var resultBuilder = ['#'];
6806 # for (var i = 0; i < missingZeros; i++) {
6807 # resultBuilder.push('0');
6808 # }
6809 # resultBuilder.push(hexString);
6810 # return resultBuilder.join('');
6811 # };
6812 #
6813 # // ...
6814 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6815 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6816 # the final pixel color is defined by the equation:
6817 #
6818 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6819 #
6820 # This means that a value of 1.0 corresponds to a solid color, whereas
6821 # a value of 0.0 corresponds to a completely transparent color. This
6822 # uses a wrapper message rather than a simple float scalar so that it is
6823 # possible to distinguish between a default value and the value being unset.
6824 # If omitted, this color object is to be rendered as a solid color
6825 # (as if the alpha value had been explicitly given with a value of 1.0).
6826 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6827 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6828 },
6829 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006830 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006831 "style": "A String", # The style of the border.
6832 },
6833 "left": { # A border along a cell. # The left border of the cell.
6834 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
6835 # for simplicity of conversion to/from color representations in various
6836 # languages over compactness; for example, the fields of this representation
6837 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6838 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6839 # method in iOS; and, with just a little work, it can be easily formatted into
6840 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6841 #
6842 # Example (Java):
6843 #
6844 # import com.google.type.Color;
6845 #
6846 # // ...
6847 # public static java.awt.Color fromProto(Color protocolor) {
6848 # float alpha = protocolor.hasAlpha()
6849 # ? protocolor.getAlpha().getValue()
6850 # : 1.0;
6851 #
6852 # return new java.awt.Color(
6853 # protocolor.getRed(),
6854 # protocolor.getGreen(),
6855 # protocolor.getBlue(),
6856 # alpha);
6857 # }
6858 #
6859 # public static Color toProto(java.awt.Color color) {
6860 # float red = (float) color.getRed();
6861 # float green = (float) color.getGreen();
6862 # float blue = (float) color.getBlue();
6863 # float denominator = 255.0;
6864 # Color.Builder resultBuilder =
6865 # Color
6866 # .newBuilder()
6867 # .setRed(red / denominator)
6868 # .setGreen(green / denominator)
6869 # .setBlue(blue / denominator);
6870 # int alpha = color.getAlpha();
6871 # if (alpha != 255) {
6872 # result.setAlpha(
6873 # FloatValue
6874 # .newBuilder()
6875 # .setValue(((float) alpha) / denominator)
6876 # .build());
6877 # }
6878 # return resultBuilder.build();
6879 # }
6880 # // ...
6881 #
6882 # Example (iOS / Obj-C):
6883 #
6884 # // ...
6885 # static UIColor* fromProto(Color* protocolor) {
6886 # float red = [protocolor red];
6887 # float green = [protocolor green];
6888 # float blue = [protocolor blue];
6889 # FloatValue* alpha_wrapper = [protocolor alpha];
6890 # float alpha = 1.0;
6891 # if (alpha_wrapper != nil) {
6892 # alpha = [alpha_wrapper value];
6893 # }
6894 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6895 # }
6896 #
6897 # static Color* toProto(UIColor* color) {
6898 # CGFloat red, green, blue, alpha;
6899 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6900 # return nil;
6901 # }
6902 # Color* result = [Color alloc] init];
6903 # [result setRed:red];
6904 # [result setGreen:green];
6905 # [result setBlue:blue];
6906 # if (alpha <= 0.9999) {
6907 # [result setAlpha:floatWrapperWithValue(alpha)];
6908 # }
6909 # [result autorelease];
6910 # return result;
6911 # }
6912 # // ...
6913 #
6914 # Example (JavaScript):
6915 #
6916 # // ...
6917 #
6918 # var protoToCssColor = function(rgb_color) {
6919 # var redFrac = rgb_color.red || 0.0;
6920 # var greenFrac = rgb_color.green || 0.0;
6921 # var blueFrac = rgb_color.blue || 0.0;
6922 # var red = Math.floor(redFrac * 255);
6923 # var green = Math.floor(greenFrac * 255);
6924 # var blue = Math.floor(blueFrac * 255);
6925 #
6926 # if (!('alpha' in rgb_color)) {
6927 # return rgbToCssColor_(red, green, blue);
6928 # }
6929 #
6930 # var alphaFrac = rgb_color.alpha.value || 0.0;
6931 # var rgbParams = [red, green, blue].join(',');
6932 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6933 # };
6934 #
6935 # var rgbToCssColor_ = function(red, green, blue) {
6936 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6937 # var hexString = rgbNumber.toString(16);
6938 # var missingZeros = 6 - hexString.length;
6939 # var resultBuilder = ['#'];
6940 # for (var i = 0; i < missingZeros; i++) {
6941 # resultBuilder.push('0');
6942 # }
6943 # resultBuilder.push(hexString);
6944 # return resultBuilder.join('');
6945 # };
6946 #
6947 # // ...
6948 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6949 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6950 # the final pixel color is defined by the equation:
6951 #
6952 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6953 #
6954 # This means that a value of 1.0 corresponds to a solid color, whereas
6955 # a value of 0.0 corresponds to a completely transparent color. This
6956 # uses a wrapper message rather than a simple float scalar so that it is
6957 # possible to distinguish between a default value and the value being unset.
6958 # If omitted, this color object is to be rendered as a solid color
6959 # (as if the alpha value had been explicitly given with a value of 1.0).
6960 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6961 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6962 },
6963 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006964 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006965 "style": "A String", # The style of the border.
6966 },
6967 },
6968 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
6969 },
6970 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
6971 #
6972 # When writing, the new format will be merged with the existing format.
6973 "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 -07006974 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
6975 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07006976 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
6977 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006978 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006979 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006980 },
6981 "textDirection": "A String", # The direction of the text in the cell.
6982 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
6983 # When updating padding, every field must be specified.
6984 "top": 42, # The top padding of the cell.
6985 "right": 42, # The right padding of the cell.
6986 "bottom": 42, # The bottom padding of the cell.
6987 "left": 42, # The left padding of the cell.
6988 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006989 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006990 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
6991 # for simplicity of conversion to/from color representations in various
6992 # languages over compactness; for example, the fields of this representation
6993 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6994 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6995 # method in iOS; and, with just a little work, it can be easily formatted into
6996 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6997 #
6998 # Example (Java):
6999 #
7000 # import com.google.type.Color;
7001 #
7002 # // ...
7003 # public static java.awt.Color fromProto(Color protocolor) {
7004 # float alpha = protocolor.hasAlpha()
7005 # ? protocolor.getAlpha().getValue()
7006 # : 1.0;
7007 #
7008 # return new java.awt.Color(
7009 # protocolor.getRed(),
7010 # protocolor.getGreen(),
7011 # protocolor.getBlue(),
7012 # alpha);
7013 # }
7014 #
7015 # public static Color toProto(java.awt.Color color) {
7016 # float red = (float) color.getRed();
7017 # float green = (float) color.getGreen();
7018 # float blue = (float) color.getBlue();
7019 # float denominator = 255.0;
7020 # Color.Builder resultBuilder =
7021 # Color
7022 # .newBuilder()
7023 # .setRed(red / denominator)
7024 # .setGreen(green / denominator)
7025 # .setBlue(blue / denominator);
7026 # int alpha = color.getAlpha();
7027 # if (alpha != 255) {
7028 # result.setAlpha(
7029 # FloatValue
7030 # .newBuilder()
7031 # .setValue(((float) alpha) / denominator)
7032 # .build());
7033 # }
7034 # return resultBuilder.build();
7035 # }
7036 # // ...
7037 #
7038 # Example (iOS / Obj-C):
7039 #
7040 # // ...
7041 # static UIColor* fromProto(Color* protocolor) {
7042 # float red = [protocolor red];
7043 # float green = [protocolor green];
7044 # float blue = [protocolor blue];
7045 # FloatValue* alpha_wrapper = [protocolor alpha];
7046 # float alpha = 1.0;
7047 # if (alpha_wrapper != nil) {
7048 # alpha = [alpha_wrapper value];
7049 # }
7050 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7051 # }
7052 #
7053 # static Color* toProto(UIColor* color) {
7054 # CGFloat red, green, blue, alpha;
7055 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7056 # return nil;
7057 # }
7058 # Color* result = [Color alloc] init];
7059 # [result setRed:red];
7060 # [result setGreen:green];
7061 # [result setBlue:blue];
7062 # if (alpha <= 0.9999) {
7063 # [result setAlpha:floatWrapperWithValue(alpha)];
7064 # }
7065 # [result autorelease];
7066 # return result;
7067 # }
7068 # // ...
7069 #
7070 # Example (JavaScript):
7071 #
7072 # // ...
7073 #
7074 # var protoToCssColor = function(rgb_color) {
7075 # var redFrac = rgb_color.red || 0.0;
7076 # var greenFrac = rgb_color.green || 0.0;
7077 # var blueFrac = rgb_color.blue || 0.0;
7078 # var red = Math.floor(redFrac * 255);
7079 # var green = Math.floor(greenFrac * 255);
7080 # var blue = Math.floor(blueFrac * 255);
7081 #
7082 # if (!('alpha' in rgb_color)) {
7083 # return rgbToCssColor_(red, green, blue);
7084 # }
7085 #
7086 # var alphaFrac = rgb_color.alpha.value || 0.0;
7087 # var rgbParams = [red, green, blue].join(',');
7088 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7089 # };
7090 #
7091 # var rgbToCssColor_ = function(red, green, blue) {
7092 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7093 # var hexString = rgbNumber.toString(16);
7094 # var missingZeros = 6 - hexString.length;
7095 # var resultBuilder = ['#'];
7096 # for (var i = 0; i < missingZeros; i++) {
7097 # resultBuilder.push('0');
7098 # }
7099 # resultBuilder.push(hexString);
7100 # return resultBuilder.join('');
7101 # };
7102 #
7103 # // ...
7104 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7105 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7106 # the final pixel color is defined by the equation:
7107 #
7108 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7109 #
7110 # This means that a value of 1.0 corresponds to a solid color, whereas
7111 # a value of 0.0 corresponds to a completely transparent color. This
7112 # uses a wrapper message rather than a simple float scalar so that it is
7113 # possible to distinguish between a default value and the value being unset.
7114 # If omitted, this color object is to be rendered as a solid color
7115 # (as if the alpha value had been explicitly given with a value of 1.0).
7116 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7117 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7118 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007119 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007120 "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).
7121 # Absent values indicate that the field isn't specified.
7122 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
7123 # for simplicity of conversion to/from color representations in various
7124 # languages over compactness; for example, the fields of this representation
7125 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7126 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7127 # method in iOS; and, with just a little work, it can be easily formatted into
7128 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7129 #
7130 # Example (Java):
7131 #
7132 # import com.google.type.Color;
7133 #
7134 # // ...
7135 # public static java.awt.Color fromProto(Color protocolor) {
7136 # float alpha = protocolor.hasAlpha()
7137 # ? protocolor.getAlpha().getValue()
7138 # : 1.0;
7139 #
7140 # return new java.awt.Color(
7141 # protocolor.getRed(),
7142 # protocolor.getGreen(),
7143 # protocolor.getBlue(),
7144 # alpha);
7145 # }
7146 #
7147 # public static Color toProto(java.awt.Color color) {
7148 # float red = (float) color.getRed();
7149 # float green = (float) color.getGreen();
7150 # float blue = (float) color.getBlue();
7151 # float denominator = 255.0;
7152 # Color.Builder resultBuilder =
7153 # Color
7154 # .newBuilder()
7155 # .setRed(red / denominator)
7156 # .setGreen(green / denominator)
7157 # .setBlue(blue / denominator);
7158 # int alpha = color.getAlpha();
7159 # if (alpha != 255) {
7160 # result.setAlpha(
7161 # FloatValue
7162 # .newBuilder()
7163 # .setValue(((float) alpha) / denominator)
7164 # .build());
7165 # }
7166 # return resultBuilder.build();
7167 # }
7168 # // ...
7169 #
7170 # Example (iOS / Obj-C):
7171 #
7172 # // ...
7173 # static UIColor* fromProto(Color* protocolor) {
7174 # float red = [protocolor red];
7175 # float green = [protocolor green];
7176 # float blue = [protocolor blue];
7177 # FloatValue* alpha_wrapper = [protocolor alpha];
7178 # float alpha = 1.0;
7179 # if (alpha_wrapper != nil) {
7180 # alpha = [alpha_wrapper value];
7181 # }
7182 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7183 # }
7184 #
7185 # static Color* toProto(UIColor* color) {
7186 # CGFloat red, green, blue, alpha;
7187 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7188 # return nil;
7189 # }
7190 # Color* result = [Color alloc] init];
7191 # [result setRed:red];
7192 # [result setGreen:green];
7193 # [result setBlue:blue];
7194 # if (alpha <= 0.9999) {
7195 # [result setAlpha:floatWrapperWithValue(alpha)];
7196 # }
7197 # [result autorelease];
7198 # return result;
7199 # }
7200 # // ...
7201 #
7202 # Example (JavaScript):
7203 #
7204 # // ...
7205 #
7206 # var protoToCssColor = function(rgb_color) {
7207 # var redFrac = rgb_color.red || 0.0;
7208 # var greenFrac = rgb_color.green || 0.0;
7209 # var blueFrac = rgb_color.blue || 0.0;
7210 # var red = Math.floor(redFrac * 255);
7211 # var green = Math.floor(greenFrac * 255);
7212 # var blue = Math.floor(blueFrac * 255);
7213 #
7214 # if (!('alpha' in rgb_color)) {
7215 # return rgbToCssColor_(red, green, blue);
7216 # }
7217 #
7218 # var alphaFrac = rgb_color.alpha.value || 0.0;
7219 # var rgbParams = [red, green, blue].join(',');
7220 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7221 # };
7222 #
7223 # var rgbToCssColor_ = function(red, green, blue) {
7224 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7225 # var hexString = rgbNumber.toString(16);
7226 # var missingZeros = 6 - hexString.length;
7227 # var resultBuilder = ['#'];
7228 # for (var i = 0; i < missingZeros; i++) {
7229 # resultBuilder.push('0');
7230 # }
7231 # resultBuilder.push(hexString);
7232 # return resultBuilder.join('');
7233 # };
7234 #
7235 # // ...
7236 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7237 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7238 # the final pixel color is defined by the equation:
7239 #
7240 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7241 #
7242 # This means that a value of 1.0 corresponds to a solid color, whereas
7243 # a value of 0.0 corresponds to a completely transparent color. This
7244 # uses a wrapper message rather than a simple float scalar so that it is
7245 # possible to distinguish between a default value and the value being unset.
7246 # If omitted, this color object is to be rendered as a solid color
7247 # (as if the alpha value had been explicitly given with a value of 1.0).
7248 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7249 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7250 },
7251 "bold": True or False, # True if the text is bold.
7252 "strikethrough": True or False, # True if the text has a strikethrough.
7253 "fontFamily": "A String", # The font family.
7254 "fontSize": 42, # The size of the font.
7255 "italic": True or False, # True if the text is italicized.
7256 "underline": True or False, # True if the text is underlined.
7257 },
7258 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
7259 "borders": { # The borders of the cell. # The borders of the cell.
7260 "top": { # A border along a cell. # The top border of the cell.
7261 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7262 # for simplicity of conversion to/from color representations in various
7263 # languages over compactness; for example, the fields of this representation
7264 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7265 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7266 # method in iOS; and, with just a little work, it can be easily formatted into
7267 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7268 #
7269 # Example (Java):
7270 #
7271 # import com.google.type.Color;
7272 #
7273 # // ...
7274 # public static java.awt.Color fromProto(Color protocolor) {
7275 # float alpha = protocolor.hasAlpha()
7276 # ? protocolor.getAlpha().getValue()
7277 # : 1.0;
7278 #
7279 # return new java.awt.Color(
7280 # protocolor.getRed(),
7281 # protocolor.getGreen(),
7282 # protocolor.getBlue(),
7283 # alpha);
7284 # }
7285 #
7286 # public static Color toProto(java.awt.Color color) {
7287 # float red = (float) color.getRed();
7288 # float green = (float) color.getGreen();
7289 # float blue = (float) color.getBlue();
7290 # float denominator = 255.0;
7291 # Color.Builder resultBuilder =
7292 # Color
7293 # .newBuilder()
7294 # .setRed(red / denominator)
7295 # .setGreen(green / denominator)
7296 # .setBlue(blue / denominator);
7297 # int alpha = color.getAlpha();
7298 # if (alpha != 255) {
7299 # result.setAlpha(
7300 # FloatValue
7301 # .newBuilder()
7302 # .setValue(((float) alpha) / denominator)
7303 # .build());
7304 # }
7305 # return resultBuilder.build();
7306 # }
7307 # // ...
7308 #
7309 # Example (iOS / Obj-C):
7310 #
7311 # // ...
7312 # static UIColor* fromProto(Color* protocolor) {
7313 # float red = [protocolor red];
7314 # float green = [protocolor green];
7315 # float blue = [protocolor blue];
7316 # FloatValue* alpha_wrapper = [protocolor alpha];
7317 # float alpha = 1.0;
7318 # if (alpha_wrapper != nil) {
7319 # alpha = [alpha_wrapper value];
7320 # }
7321 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7322 # }
7323 #
7324 # static Color* toProto(UIColor* color) {
7325 # CGFloat red, green, blue, alpha;
7326 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7327 # return nil;
7328 # }
7329 # Color* result = [Color alloc] init];
7330 # [result setRed:red];
7331 # [result setGreen:green];
7332 # [result setBlue:blue];
7333 # if (alpha <= 0.9999) {
7334 # [result setAlpha:floatWrapperWithValue(alpha)];
7335 # }
7336 # [result autorelease];
7337 # return result;
7338 # }
7339 # // ...
7340 #
7341 # Example (JavaScript):
7342 #
7343 # // ...
7344 #
7345 # var protoToCssColor = function(rgb_color) {
7346 # var redFrac = rgb_color.red || 0.0;
7347 # var greenFrac = rgb_color.green || 0.0;
7348 # var blueFrac = rgb_color.blue || 0.0;
7349 # var red = Math.floor(redFrac * 255);
7350 # var green = Math.floor(greenFrac * 255);
7351 # var blue = Math.floor(blueFrac * 255);
7352 #
7353 # if (!('alpha' in rgb_color)) {
7354 # return rgbToCssColor_(red, green, blue);
7355 # }
7356 #
7357 # var alphaFrac = rgb_color.alpha.value || 0.0;
7358 # var rgbParams = [red, green, blue].join(',');
7359 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7360 # };
7361 #
7362 # var rgbToCssColor_ = function(red, green, blue) {
7363 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7364 # var hexString = rgbNumber.toString(16);
7365 # var missingZeros = 6 - hexString.length;
7366 # var resultBuilder = ['#'];
7367 # for (var i = 0; i < missingZeros; i++) {
7368 # resultBuilder.push('0');
7369 # }
7370 # resultBuilder.push(hexString);
7371 # return resultBuilder.join('');
7372 # };
7373 #
7374 # // ...
7375 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7376 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7377 # the final pixel color is defined by the equation:
7378 #
7379 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7380 #
7381 # This means that a value of 1.0 corresponds to a solid color, whereas
7382 # a value of 0.0 corresponds to a completely transparent color. This
7383 # uses a wrapper message rather than a simple float scalar so that it is
7384 # possible to distinguish between a default value and the value being unset.
7385 # If omitted, this color object is to be rendered as a solid color
7386 # (as if the alpha value had been explicitly given with a value of 1.0).
7387 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7388 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7389 },
7390 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07007391 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007392 "style": "A String", # The style of the border.
7393 },
7394 "right": { # A border along a cell. # The right border of the cell.
7395 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7396 # for simplicity of conversion to/from color representations in various
7397 # languages over compactness; for example, the fields of this representation
7398 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7399 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7400 # method in iOS; and, with just a little work, it can be easily formatted into
7401 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7402 #
7403 # Example (Java):
7404 #
7405 # import com.google.type.Color;
7406 #
7407 # // ...
7408 # public static java.awt.Color fromProto(Color protocolor) {
7409 # float alpha = protocolor.hasAlpha()
7410 # ? protocolor.getAlpha().getValue()
7411 # : 1.0;
7412 #
7413 # return new java.awt.Color(
7414 # protocolor.getRed(),
7415 # protocolor.getGreen(),
7416 # protocolor.getBlue(),
7417 # alpha);
7418 # }
7419 #
7420 # public static Color toProto(java.awt.Color color) {
7421 # float red = (float) color.getRed();
7422 # float green = (float) color.getGreen();
7423 # float blue = (float) color.getBlue();
7424 # float denominator = 255.0;
7425 # Color.Builder resultBuilder =
7426 # Color
7427 # .newBuilder()
7428 # .setRed(red / denominator)
7429 # .setGreen(green / denominator)
7430 # .setBlue(blue / denominator);
7431 # int alpha = color.getAlpha();
7432 # if (alpha != 255) {
7433 # result.setAlpha(
7434 # FloatValue
7435 # .newBuilder()
7436 # .setValue(((float) alpha) / denominator)
7437 # .build());
7438 # }
7439 # return resultBuilder.build();
7440 # }
7441 # // ...
7442 #
7443 # Example (iOS / Obj-C):
7444 #
7445 # // ...
7446 # static UIColor* fromProto(Color* protocolor) {
7447 # float red = [protocolor red];
7448 # float green = [protocolor green];
7449 # float blue = [protocolor blue];
7450 # FloatValue* alpha_wrapper = [protocolor alpha];
7451 # float alpha = 1.0;
7452 # if (alpha_wrapper != nil) {
7453 # alpha = [alpha_wrapper value];
7454 # }
7455 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7456 # }
7457 #
7458 # static Color* toProto(UIColor* color) {
7459 # CGFloat red, green, blue, alpha;
7460 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7461 # return nil;
7462 # }
7463 # Color* result = [Color alloc] init];
7464 # [result setRed:red];
7465 # [result setGreen:green];
7466 # [result setBlue:blue];
7467 # if (alpha <= 0.9999) {
7468 # [result setAlpha:floatWrapperWithValue(alpha)];
7469 # }
7470 # [result autorelease];
7471 # return result;
7472 # }
7473 # // ...
7474 #
7475 # Example (JavaScript):
7476 #
7477 # // ...
7478 #
7479 # var protoToCssColor = function(rgb_color) {
7480 # var redFrac = rgb_color.red || 0.0;
7481 # var greenFrac = rgb_color.green || 0.0;
7482 # var blueFrac = rgb_color.blue || 0.0;
7483 # var red = Math.floor(redFrac * 255);
7484 # var green = Math.floor(greenFrac * 255);
7485 # var blue = Math.floor(blueFrac * 255);
7486 #
7487 # if (!('alpha' in rgb_color)) {
7488 # return rgbToCssColor_(red, green, blue);
7489 # }
7490 #
7491 # var alphaFrac = rgb_color.alpha.value || 0.0;
7492 # var rgbParams = [red, green, blue].join(',');
7493 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7494 # };
7495 #
7496 # var rgbToCssColor_ = function(red, green, blue) {
7497 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7498 # var hexString = rgbNumber.toString(16);
7499 # var missingZeros = 6 - hexString.length;
7500 # var resultBuilder = ['#'];
7501 # for (var i = 0; i < missingZeros; i++) {
7502 # resultBuilder.push('0');
7503 # }
7504 # resultBuilder.push(hexString);
7505 # return resultBuilder.join('');
7506 # };
7507 #
7508 # // ...
7509 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7510 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7511 # the final pixel color is defined by the equation:
7512 #
7513 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7514 #
7515 # This means that a value of 1.0 corresponds to a solid color, whereas
7516 # a value of 0.0 corresponds to a completely transparent color. This
7517 # uses a wrapper message rather than a simple float scalar so that it is
7518 # possible to distinguish between a default value and the value being unset.
7519 # If omitted, this color object is to be rendered as a solid color
7520 # (as if the alpha value had been explicitly given with a value of 1.0).
7521 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7522 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7523 },
7524 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07007525 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007526 "style": "A String", # The style of the border.
7527 },
7528 "bottom": { # A border along a cell. # The bottom border of the cell.
7529 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7530 # for simplicity of conversion to/from color representations in various
7531 # languages over compactness; for example, the fields of this representation
7532 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7533 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7534 # method in iOS; and, with just a little work, it can be easily formatted into
7535 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7536 #
7537 # Example (Java):
7538 #
7539 # import com.google.type.Color;
7540 #
7541 # // ...
7542 # public static java.awt.Color fromProto(Color protocolor) {
7543 # float alpha = protocolor.hasAlpha()
7544 # ? protocolor.getAlpha().getValue()
7545 # : 1.0;
7546 #
7547 # return new java.awt.Color(
7548 # protocolor.getRed(),
7549 # protocolor.getGreen(),
7550 # protocolor.getBlue(),
7551 # alpha);
7552 # }
7553 #
7554 # public static Color toProto(java.awt.Color color) {
7555 # float red = (float) color.getRed();
7556 # float green = (float) color.getGreen();
7557 # float blue = (float) color.getBlue();
7558 # float denominator = 255.0;
7559 # Color.Builder resultBuilder =
7560 # Color
7561 # .newBuilder()
7562 # .setRed(red / denominator)
7563 # .setGreen(green / denominator)
7564 # .setBlue(blue / denominator);
7565 # int alpha = color.getAlpha();
7566 # if (alpha != 255) {
7567 # result.setAlpha(
7568 # FloatValue
7569 # .newBuilder()
7570 # .setValue(((float) alpha) / denominator)
7571 # .build());
7572 # }
7573 # return resultBuilder.build();
7574 # }
7575 # // ...
7576 #
7577 # Example (iOS / Obj-C):
7578 #
7579 # // ...
7580 # static UIColor* fromProto(Color* protocolor) {
7581 # float red = [protocolor red];
7582 # float green = [protocolor green];
7583 # float blue = [protocolor blue];
7584 # FloatValue* alpha_wrapper = [protocolor alpha];
7585 # float alpha = 1.0;
7586 # if (alpha_wrapper != nil) {
7587 # alpha = [alpha_wrapper value];
7588 # }
7589 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7590 # }
7591 #
7592 # static Color* toProto(UIColor* color) {
7593 # CGFloat red, green, blue, alpha;
7594 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7595 # return nil;
7596 # }
7597 # Color* result = [Color alloc] init];
7598 # [result setRed:red];
7599 # [result setGreen:green];
7600 # [result setBlue:blue];
7601 # if (alpha <= 0.9999) {
7602 # [result setAlpha:floatWrapperWithValue(alpha)];
7603 # }
7604 # [result autorelease];
7605 # return result;
7606 # }
7607 # // ...
7608 #
7609 # Example (JavaScript):
7610 #
7611 # // ...
7612 #
7613 # var protoToCssColor = function(rgb_color) {
7614 # var redFrac = rgb_color.red || 0.0;
7615 # var greenFrac = rgb_color.green || 0.0;
7616 # var blueFrac = rgb_color.blue || 0.0;
7617 # var red = Math.floor(redFrac * 255);
7618 # var green = Math.floor(greenFrac * 255);
7619 # var blue = Math.floor(blueFrac * 255);
7620 #
7621 # if (!('alpha' in rgb_color)) {
7622 # return rgbToCssColor_(red, green, blue);
7623 # }
7624 #
7625 # var alphaFrac = rgb_color.alpha.value || 0.0;
7626 # var rgbParams = [red, green, blue].join(',');
7627 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7628 # };
7629 #
7630 # var rgbToCssColor_ = function(red, green, blue) {
7631 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7632 # var hexString = rgbNumber.toString(16);
7633 # var missingZeros = 6 - hexString.length;
7634 # var resultBuilder = ['#'];
7635 # for (var i = 0; i < missingZeros; i++) {
7636 # resultBuilder.push('0');
7637 # }
7638 # resultBuilder.push(hexString);
7639 # return resultBuilder.join('');
7640 # };
7641 #
7642 # // ...
7643 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7644 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7645 # the final pixel color is defined by the equation:
7646 #
7647 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7648 #
7649 # This means that a value of 1.0 corresponds to a solid color, whereas
7650 # a value of 0.0 corresponds to a completely transparent color. This
7651 # uses a wrapper message rather than a simple float scalar so that it is
7652 # possible to distinguish between a default value and the value being unset.
7653 # If omitted, this color object is to be rendered as a solid color
7654 # (as if the alpha value had been explicitly given with a value of 1.0).
7655 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7656 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7657 },
7658 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07007659 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007660 "style": "A String", # The style of the border.
7661 },
7662 "left": { # A border along a cell. # The left border of the cell.
7663 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7664 # for simplicity of conversion to/from color representations in various
7665 # languages over compactness; for example, the fields of this representation
7666 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7667 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7668 # method in iOS; and, with just a little work, it can be easily formatted into
7669 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7670 #
7671 # Example (Java):
7672 #
7673 # import com.google.type.Color;
7674 #
7675 # // ...
7676 # public static java.awt.Color fromProto(Color protocolor) {
7677 # float alpha = protocolor.hasAlpha()
7678 # ? protocolor.getAlpha().getValue()
7679 # : 1.0;
7680 #
7681 # return new java.awt.Color(
7682 # protocolor.getRed(),
7683 # protocolor.getGreen(),
7684 # protocolor.getBlue(),
7685 # alpha);
7686 # }
7687 #
7688 # public static Color toProto(java.awt.Color color) {
7689 # float red = (float) color.getRed();
7690 # float green = (float) color.getGreen();
7691 # float blue = (float) color.getBlue();
7692 # float denominator = 255.0;
7693 # Color.Builder resultBuilder =
7694 # Color
7695 # .newBuilder()
7696 # .setRed(red / denominator)
7697 # .setGreen(green / denominator)
7698 # .setBlue(blue / denominator);
7699 # int alpha = color.getAlpha();
7700 # if (alpha != 255) {
7701 # result.setAlpha(
7702 # FloatValue
7703 # .newBuilder()
7704 # .setValue(((float) alpha) / denominator)
7705 # .build());
7706 # }
7707 # return resultBuilder.build();
7708 # }
7709 # // ...
7710 #
7711 # Example (iOS / Obj-C):
7712 #
7713 # // ...
7714 # static UIColor* fromProto(Color* protocolor) {
7715 # float red = [protocolor red];
7716 # float green = [protocolor green];
7717 # float blue = [protocolor blue];
7718 # FloatValue* alpha_wrapper = [protocolor alpha];
7719 # float alpha = 1.0;
7720 # if (alpha_wrapper != nil) {
7721 # alpha = [alpha_wrapper value];
7722 # }
7723 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7724 # }
7725 #
7726 # static Color* toProto(UIColor* color) {
7727 # CGFloat red, green, blue, alpha;
7728 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7729 # return nil;
7730 # }
7731 # Color* result = [Color alloc] init];
7732 # [result setRed:red];
7733 # [result setGreen:green];
7734 # [result setBlue:blue];
7735 # if (alpha <= 0.9999) {
7736 # [result setAlpha:floatWrapperWithValue(alpha)];
7737 # }
7738 # [result autorelease];
7739 # return result;
7740 # }
7741 # // ...
7742 #
7743 # Example (JavaScript):
7744 #
7745 # // ...
7746 #
7747 # var protoToCssColor = function(rgb_color) {
7748 # var redFrac = rgb_color.red || 0.0;
7749 # var greenFrac = rgb_color.green || 0.0;
7750 # var blueFrac = rgb_color.blue || 0.0;
7751 # var red = Math.floor(redFrac * 255);
7752 # var green = Math.floor(greenFrac * 255);
7753 # var blue = Math.floor(blueFrac * 255);
7754 #
7755 # if (!('alpha' in rgb_color)) {
7756 # return rgbToCssColor_(red, green, blue);
7757 # }
7758 #
7759 # var alphaFrac = rgb_color.alpha.value || 0.0;
7760 # var rgbParams = [red, green, blue].join(',');
7761 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7762 # };
7763 #
7764 # var rgbToCssColor_ = function(red, green, blue) {
7765 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7766 # var hexString = rgbNumber.toString(16);
7767 # var missingZeros = 6 - hexString.length;
7768 # var resultBuilder = ['#'];
7769 # for (var i = 0; i < missingZeros; i++) {
7770 # resultBuilder.push('0');
7771 # }
7772 # resultBuilder.push(hexString);
7773 # return resultBuilder.join('');
7774 # };
7775 #
7776 # // ...
7777 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7778 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7779 # the final pixel color is defined by the equation:
7780 #
7781 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7782 #
7783 # This means that a value of 1.0 corresponds to a solid color, whereas
7784 # a value of 0.0 corresponds to a completely transparent color. This
7785 # uses a wrapper message rather than a simple float scalar so that it is
7786 # possible to distinguish between a default value and the value being unset.
7787 # If omitted, this color object is to be rendered as a solid color
7788 # (as if the alpha value had been explicitly given with a value of 1.0).
7789 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7790 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7791 },
7792 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07007793 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007794 "style": "A String", # The style of the border.
7795 },
7796 },
7797 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
7798 },
7799 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
7800 #
7801 # When writing, the new data validation rule will overwrite any prior rule.
7802 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
7803 # If true, "List" conditions will show a dropdown.
7804 "strict": True or False, # True if invalid data should be rejected.
7805 "inputMessage": "A String", # A message to show the user when adding data to the cell.
7806 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
7807 # BooleanConditions are used by conditional formatting,
7808 # data validation, and the criteria in filters.
7809 "type": "A String", # The type of condition.
7810 "values": [ # The values of the condition. The number of supported values depends
7811 # on the condition type. Some support zero values,
7812 # others one or two values,
7813 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
7814 { # The value of the condition.
7815 "relativeDate": "A String", # A relative date (based on the current date).
7816 # Valid only if the type is
7817 # DATE_BEFORE,
7818 # DATE_AFTER,
7819 # DATE_ON_OR_BEFORE or
7820 # DATE_ON_OR_AFTER.
7821 #
7822 # Relative dates are not supported in data validation.
7823 # They are supported only in conditional formatting and
7824 # conditional filters.
7825 "userEnteredValue": "A String", # A value the condition is based on.
7826 # The value will be parsed as if the user typed into a cell.
7827 # Formulas are supported (and must begin with an `=`).
7828 },
7829 ],
7830 },
7831 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007832 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
7833 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007834 # Runs start at specific indexes in the text and continue until the next
7835 # run. Properties of a run will continue unless explicitly changed
7836 # in a subsequent run (and properties of the first run will continue
7837 # the properties of the cell unless explicitly changed).
7838 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007839 # When writing, the new runs will overwrite any prior runs. When writing a
7840 # new user_entered_value, previous runs will be erased.
7841 { # A run of a text format. The format of this run continues until the start
7842 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007843 # When updating, all fields must be set.
7844 "startIndex": 42, # The character index where this run starts.
7845 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
7846 # Absent values indicate that the field isn't specified.
7847 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
7848 # for simplicity of conversion to/from color representations in various
7849 # languages over compactness; for example, the fields of this representation
7850 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7851 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7852 # method in iOS; and, with just a little work, it can be easily formatted into
7853 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7854 #
7855 # Example (Java):
7856 #
7857 # import com.google.type.Color;
7858 #
7859 # // ...
7860 # public static java.awt.Color fromProto(Color protocolor) {
7861 # float alpha = protocolor.hasAlpha()
7862 # ? protocolor.getAlpha().getValue()
7863 # : 1.0;
7864 #
7865 # return new java.awt.Color(
7866 # protocolor.getRed(),
7867 # protocolor.getGreen(),
7868 # protocolor.getBlue(),
7869 # alpha);
7870 # }
7871 #
7872 # public static Color toProto(java.awt.Color color) {
7873 # float red = (float) color.getRed();
7874 # float green = (float) color.getGreen();
7875 # float blue = (float) color.getBlue();
7876 # float denominator = 255.0;
7877 # Color.Builder resultBuilder =
7878 # Color
7879 # .newBuilder()
7880 # .setRed(red / denominator)
7881 # .setGreen(green / denominator)
7882 # .setBlue(blue / denominator);
7883 # int alpha = color.getAlpha();
7884 # if (alpha != 255) {
7885 # result.setAlpha(
7886 # FloatValue
7887 # .newBuilder()
7888 # .setValue(((float) alpha) / denominator)
7889 # .build());
7890 # }
7891 # return resultBuilder.build();
7892 # }
7893 # // ...
7894 #
7895 # Example (iOS / Obj-C):
7896 #
7897 # // ...
7898 # static UIColor* fromProto(Color* protocolor) {
7899 # float red = [protocolor red];
7900 # float green = [protocolor green];
7901 # float blue = [protocolor blue];
7902 # FloatValue* alpha_wrapper = [protocolor alpha];
7903 # float alpha = 1.0;
7904 # if (alpha_wrapper != nil) {
7905 # alpha = [alpha_wrapper value];
7906 # }
7907 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7908 # }
7909 #
7910 # static Color* toProto(UIColor* color) {
7911 # CGFloat red, green, blue, alpha;
7912 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7913 # return nil;
7914 # }
7915 # Color* result = [Color alloc] init];
7916 # [result setRed:red];
7917 # [result setGreen:green];
7918 # [result setBlue:blue];
7919 # if (alpha <= 0.9999) {
7920 # [result setAlpha:floatWrapperWithValue(alpha)];
7921 # }
7922 # [result autorelease];
7923 # return result;
7924 # }
7925 # // ...
7926 #
7927 # Example (JavaScript):
7928 #
7929 # // ...
7930 #
7931 # var protoToCssColor = function(rgb_color) {
7932 # var redFrac = rgb_color.red || 0.0;
7933 # var greenFrac = rgb_color.green || 0.0;
7934 # var blueFrac = rgb_color.blue || 0.0;
7935 # var red = Math.floor(redFrac * 255);
7936 # var green = Math.floor(greenFrac * 255);
7937 # var blue = Math.floor(blueFrac * 255);
7938 #
7939 # if (!('alpha' in rgb_color)) {
7940 # return rgbToCssColor_(red, green, blue);
7941 # }
7942 #
7943 # var alphaFrac = rgb_color.alpha.value || 0.0;
7944 # var rgbParams = [red, green, blue].join(',');
7945 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7946 # };
7947 #
7948 # var rgbToCssColor_ = function(red, green, blue) {
7949 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7950 # var hexString = rgbNumber.toString(16);
7951 # var missingZeros = 6 - hexString.length;
7952 # var resultBuilder = ['#'];
7953 # for (var i = 0; i < missingZeros; i++) {
7954 # resultBuilder.push('0');
7955 # }
7956 # resultBuilder.push(hexString);
7957 # return resultBuilder.join('');
7958 # };
7959 #
7960 # // ...
7961 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7962 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7963 # the final pixel color is defined by the equation:
7964 #
7965 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7966 #
7967 # This means that a value of 1.0 corresponds to a solid color, whereas
7968 # a value of 0.0 corresponds to a completely transparent color. This
7969 # uses a wrapper message rather than a simple float scalar so that it is
7970 # possible to distinguish between a default value and the value being unset.
7971 # If omitted, this color object is to be rendered as a solid color
7972 # (as if the alpha value had been explicitly given with a value of 1.0).
7973 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7974 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7975 },
7976 "bold": True or False, # True if the text is bold.
7977 "strikethrough": True or False, # True if the text has a strikethrough.
7978 "fontFamily": "A String", # The font family.
7979 "fontSize": 42, # The size of the font.
7980 "italic": True or False, # True if the text is italicized.
7981 "underline": True or False, # True if the text is underlined.
7982 },
7983 },
7984 ],
7985 },
7986 "fields": "A String", # The fields that should be updated. At least one field must be specified.
7987 # The root `cell` is implied and should not be specified.
7988 # A single `"*"` can be used as short-hand for listing every field.
7989 "range": { # A range on a sheet. # The range to repeat the cell in.
7990 # All indexes are zero-based.
7991 # Indexes are half open, e.g the start index is inclusive
7992 # and the end index is exclusive -- [start_index, end_index).
7993 # Missing indexes indicate the range is unbounded on that side.
7994 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007995 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007996 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007997 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007998 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007999 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008000 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008001 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008002 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008003 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008004 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008005 # `Sheet1!A:B == sheet_id: 0,
8006 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008007 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008008 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008009 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008010 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008011 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008012 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008013 #
8014 # The start index must always be less than or equal to the end index.
8015 # If the start index equals the end index, then the range is empty.
8016 # Empty ranges are typically not meaningful and are usually rendered in the
8017 # UI as `#REF!`.
8018 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
8019 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
8020 "sheetId": 42, # The sheet this range is on.
8021 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
8022 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
8023 },
8024 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008025 "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 -07008026 "includeFormulas": True or False, # True if the search should include cells with formulas.
8027 # False to skip cells with formulas.
8028 "matchEntireCell": True or False, # True if the find value should match the entire cell.
8029 "allSheets": True or False, # True to find/replace over all sheets.
8030 "matchCase": True or False, # True if the search is case sensitive.
8031 "sheetId": 42, # The sheet to find/replace over.
8032 "range": { # A range on a sheet. # The range to find/replace over.
8033 # All indexes are zero-based.
8034 # Indexes are half open, e.g the start index is inclusive
8035 # and the end index is exclusive -- [start_index, end_index).
8036 # Missing indexes indicate the range is unbounded on that side.
8037 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008038 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008039 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008040 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008041 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008042 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008043 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008044 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008045 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008046 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008047 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008048 # `Sheet1!A:B == sheet_id: 0,
8049 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008050 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008051 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008052 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008053 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008054 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008055 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008056 #
8057 # The start index must always be less than or equal to the end index.
8058 # If the start index equals the end index, then the range is empty.
8059 # Empty ranges are typically not meaningful and are usually rendered in the
8060 # UI as `#REF!`.
8061 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
8062 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
8063 "sheetId": 42, # The sheet this range is on.
8064 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
8065 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
8066 },
8067 "searchByRegex": True or False, # True if the find value is a regex.
8068 # The regular expression and replacement should follow Java regex rules
8069 # at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html.
8070 # The replacement string is allowed to refer to capturing groups.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008071 # For example, if one cell has the contents `"Google Sheets"` and another
8072 # has `"Google Docs"`, then searching for `"o.* (.*)"` with a replacement of
8073 # `"$1 Rocks"` would change the contents of the cells to
8074 # `"GSheets Rocks"` and `"GDocs Rocks"` respectively.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008075 "find": "A String", # The value to search.
8076 "replacement": "A String", # The value to use as the replacement.
8077 },
8078 "setBasicFilter": { # Sets the basic filter associated with a sheet. # Sets the basic filter on a sheet.
8079 "filter": { # The default filter associated with a sheet. # The filter to set.
8080 "range": { # A range on a sheet. # The range the filter covers.
8081 # All indexes are zero-based.
8082 # Indexes are half open, e.g the start index is inclusive
8083 # and the end index is exclusive -- [start_index, end_index).
8084 # Missing indexes indicate the range is unbounded on that side.
8085 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008086 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008087 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008088 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008089 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008090 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008091 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008092 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008093 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008094 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008095 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008096 # `Sheet1!A:B == sheet_id: 0,
8097 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008098 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008099 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008100 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008101 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008102 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008103 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008104 #
8105 # The start index must always be less than or equal to the end index.
8106 # If the start index equals the end index, then the range is empty.
8107 # Empty ranges are typically not meaningful and are usually rendered in the
8108 # UI as `#REF!`.
8109 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
8110 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
8111 "sheetId": 42, # The sheet this range is on.
8112 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
8113 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
8114 },
8115 "sortSpecs": [ # The sort order per column. Later specifications are used when values
8116 # are equal in the earlier specifications.
8117 { # A sort order associated with a specific column or row.
8118 "sortOrder": "A String", # The order data should be sorted.
8119 "dimensionIndex": 42, # The dimension the sort should be applied to.
8120 },
8121 ],
8122 "criteria": { # The criteria for showing/hiding values per column.
8123 # The map's key is the column index, and the value is the criteria for
8124 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008125 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008126 "hiddenValues": [ # Values that should be hidden.
8127 "A String",
8128 ],
8129 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
8130 # (This does not override hiddenValues -- if a value is listed there,
8131 # it will still be hidden.)
8132 # BooleanConditions are used by conditional formatting,
8133 # data validation, and the criteria in filters.
8134 "type": "A String", # The type of condition.
8135 "values": [ # The values of the condition. The number of supported values depends
8136 # on the condition type. Some support zero values,
8137 # others one or two values,
8138 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
8139 { # The value of the condition.
8140 "relativeDate": "A String", # A relative date (based on the current date).
8141 # Valid only if the type is
8142 # DATE_BEFORE,
8143 # DATE_AFTER,
8144 # DATE_ON_OR_BEFORE or
8145 # DATE_ON_OR_AFTER.
8146 #
8147 # Relative dates are not supported in data validation.
8148 # They are supported only in conditional formatting and
8149 # conditional filters.
8150 "userEnteredValue": "A String", # A value the condition is based on.
8151 # The value will be parsed as if the user typed into a cell.
8152 # Formulas are supported (and must begin with an `=`).
8153 },
8154 ],
8155 },
8156 },
8157 },
8158 },
8159 },
8160 "updateSpreadsheetProperties": { # Updates properties of a spreadsheet. # Updates the spreadsheet's properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008161 "fields": "A String", # The fields that should be updated. At least one field must be specified.
8162 # The root 'properties' is implied and should not be specified.
8163 # A single `"*"` can be used as short-hand for listing every field.
8164 "properties": { # Properties of a spreadsheet. # The properties to update.
8165 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008166 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008167 # * an ISO 639-1 language code such as `en`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008168 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008169 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008170 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008171 # * a combination of the ISO language code and country code, such as `en_US`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008172 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008173 # Note: when updating this field, not all locales/languages are supported.
8174 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
8175 # `America/New_York`. If the time zone isn't recognized, this may
8176 # be a custom time zone such as `GMT-07:00`.
8177 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
8178 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008179 # CellData.effectiveFormat will not be set if the
8180 # cell's format is equal to this default format.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008181 # This field is read-only.
8182 "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 -07008183 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
8184 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07008185 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
8186 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008187 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008188 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008189 },
8190 "textDirection": "A String", # The direction of the text in the cell.
8191 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
8192 # When updating padding, every field must be specified.
8193 "top": 42, # The top padding of the cell.
8194 "right": 42, # The right padding of the cell.
8195 "bottom": 42, # The bottom padding of the cell.
8196 "left": 42, # The left padding of the cell.
8197 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008198 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008199 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
8200 # for simplicity of conversion to/from color representations in various
8201 # languages over compactness; for example, the fields of this representation
8202 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8203 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8204 # method in iOS; and, with just a little work, it can be easily formatted into
8205 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8206 #
8207 # Example (Java):
8208 #
8209 # import com.google.type.Color;
8210 #
8211 # // ...
8212 # public static java.awt.Color fromProto(Color protocolor) {
8213 # float alpha = protocolor.hasAlpha()
8214 # ? protocolor.getAlpha().getValue()
8215 # : 1.0;
8216 #
8217 # return new java.awt.Color(
8218 # protocolor.getRed(),
8219 # protocolor.getGreen(),
8220 # protocolor.getBlue(),
8221 # alpha);
8222 # }
8223 #
8224 # public static Color toProto(java.awt.Color color) {
8225 # float red = (float) color.getRed();
8226 # float green = (float) color.getGreen();
8227 # float blue = (float) color.getBlue();
8228 # float denominator = 255.0;
8229 # Color.Builder resultBuilder =
8230 # Color
8231 # .newBuilder()
8232 # .setRed(red / denominator)
8233 # .setGreen(green / denominator)
8234 # .setBlue(blue / denominator);
8235 # int alpha = color.getAlpha();
8236 # if (alpha != 255) {
8237 # result.setAlpha(
8238 # FloatValue
8239 # .newBuilder()
8240 # .setValue(((float) alpha) / denominator)
8241 # .build());
8242 # }
8243 # return resultBuilder.build();
8244 # }
8245 # // ...
8246 #
8247 # Example (iOS / Obj-C):
8248 #
8249 # // ...
8250 # static UIColor* fromProto(Color* protocolor) {
8251 # float red = [protocolor red];
8252 # float green = [protocolor green];
8253 # float blue = [protocolor blue];
8254 # FloatValue* alpha_wrapper = [protocolor alpha];
8255 # float alpha = 1.0;
8256 # if (alpha_wrapper != nil) {
8257 # alpha = [alpha_wrapper value];
8258 # }
8259 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8260 # }
8261 #
8262 # static Color* toProto(UIColor* color) {
8263 # CGFloat red, green, blue, alpha;
8264 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8265 # return nil;
8266 # }
8267 # Color* result = [Color alloc] init];
8268 # [result setRed:red];
8269 # [result setGreen:green];
8270 # [result setBlue:blue];
8271 # if (alpha <= 0.9999) {
8272 # [result setAlpha:floatWrapperWithValue(alpha)];
8273 # }
8274 # [result autorelease];
8275 # return result;
8276 # }
8277 # // ...
8278 #
8279 # Example (JavaScript):
8280 #
8281 # // ...
8282 #
8283 # var protoToCssColor = function(rgb_color) {
8284 # var redFrac = rgb_color.red || 0.0;
8285 # var greenFrac = rgb_color.green || 0.0;
8286 # var blueFrac = rgb_color.blue || 0.0;
8287 # var red = Math.floor(redFrac * 255);
8288 # var green = Math.floor(greenFrac * 255);
8289 # var blue = Math.floor(blueFrac * 255);
8290 #
8291 # if (!('alpha' in rgb_color)) {
8292 # return rgbToCssColor_(red, green, blue);
8293 # }
8294 #
8295 # var alphaFrac = rgb_color.alpha.value || 0.0;
8296 # var rgbParams = [red, green, blue].join(',');
8297 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8298 # };
8299 #
8300 # var rgbToCssColor_ = function(red, green, blue) {
8301 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8302 # var hexString = rgbNumber.toString(16);
8303 # var missingZeros = 6 - hexString.length;
8304 # var resultBuilder = ['#'];
8305 # for (var i = 0; i < missingZeros; i++) {
8306 # resultBuilder.push('0');
8307 # }
8308 # resultBuilder.push(hexString);
8309 # return resultBuilder.join('');
8310 # };
8311 #
8312 # // ...
8313 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8314 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8315 # the final pixel color is defined by the equation:
8316 #
8317 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8318 #
8319 # This means that a value of 1.0 corresponds to a solid color, whereas
8320 # a value of 0.0 corresponds to a completely transparent color. This
8321 # uses a wrapper message rather than a simple float scalar so that it is
8322 # possible to distinguish between a default value and the value being unset.
8323 # If omitted, this color object is to be rendered as a solid color
8324 # (as if the alpha value had been explicitly given with a value of 1.0).
8325 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8326 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8327 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008328 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008329 "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).
8330 # Absent values indicate that the field isn't specified.
8331 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
8332 # for simplicity of conversion to/from color representations in various
8333 # languages over compactness; for example, the fields of this representation
8334 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8335 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8336 # method in iOS; and, with just a little work, it can be easily formatted into
8337 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8338 #
8339 # Example (Java):
8340 #
8341 # import com.google.type.Color;
8342 #
8343 # // ...
8344 # public static java.awt.Color fromProto(Color protocolor) {
8345 # float alpha = protocolor.hasAlpha()
8346 # ? protocolor.getAlpha().getValue()
8347 # : 1.0;
8348 #
8349 # return new java.awt.Color(
8350 # protocolor.getRed(),
8351 # protocolor.getGreen(),
8352 # protocolor.getBlue(),
8353 # alpha);
8354 # }
8355 #
8356 # public static Color toProto(java.awt.Color color) {
8357 # float red = (float) color.getRed();
8358 # float green = (float) color.getGreen();
8359 # float blue = (float) color.getBlue();
8360 # float denominator = 255.0;
8361 # Color.Builder resultBuilder =
8362 # Color
8363 # .newBuilder()
8364 # .setRed(red / denominator)
8365 # .setGreen(green / denominator)
8366 # .setBlue(blue / denominator);
8367 # int alpha = color.getAlpha();
8368 # if (alpha != 255) {
8369 # result.setAlpha(
8370 # FloatValue
8371 # .newBuilder()
8372 # .setValue(((float) alpha) / denominator)
8373 # .build());
8374 # }
8375 # return resultBuilder.build();
8376 # }
8377 # // ...
8378 #
8379 # Example (iOS / Obj-C):
8380 #
8381 # // ...
8382 # static UIColor* fromProto(Color* protocolor) {
8383 # float red = [protocolor red];
8384 # float green = [protocolor green];
8385 # float blue = [protocolor blue];
8386 # FloatValue* alpha_wrapper = [protocolor alpha];
8387 # float alpha = 1.0;
8388 # if (alpha_wrapper != nil) {
8389 # alpha = [alpha_wrapper value];
8390 # }
8391 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8392 # }
8393 #
8394 # static Color* toProto(UIColor* color) {
8395 # CGFloat red, green, blue, alpha;
8396 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8397 # return nil;
8398 # }
8399 # Color* result = [Color alloc] init];
8400 # [result setRed:red];
8401 # [result setGreen:green];
8402 # [result setBlue:blue];
8403 # if (alpha <= 0.9999) {
8404 # [result setAlpha:floatWrapperWithValue(alpha)];
8405 # }
8406 # [result autorelease];
8407 # return result;
8408 # }
8409 # // ...
8410 #
8411 # Example (JavaScript):
8412 #
8413 # // ...
8414 #
8415 # var protoToCssColor = function(rgb_color) {
8416 # var redFrac = rgb_color.red || 0.0;
8417 # var greenFrac = rgb_color.green || 0.0;
8418 # var blueFrac = rgb_color.blue || 0.0;
8419 # var red = Math.floor(redFrac * 255);
8420 # var green = Math.floor(greenFrac * 255);
8421 # var blue = Math.floor(blueFrac * 255);
8422 #
8423 # if (!('alpha' in rgb_color)) {
8424 # return rgbToCssColor_(red, green, blue);
8425 # }
8426 #
8427 # var alphaFrac = rgb_color.alpha.value || 0.0;
8428 # var rgbParams = [red, green, blue].join(',');
8429 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8430 # };
8431 #
8432 # var rgbToCssColor_ = function(red, green, blue) {
8433 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8434 # var hexString = rgbNumber.toString(16);
8435 # var missingZeros = 6 - hexString.length;
8436 # var resultBuilder = ['#'];
8437 # for (var i = 0; i < missingZeros; i++) {
8438 # resultBuilder.push('0');
8439 # }
8440 # resultBuilder.push(hexString);
8441 # return resultBuilder.join('');
8442 # };
8443 #
8444 # // ...
8445 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8446 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8447 # the final pixel color is defined by the equation:
8448 #
8449 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8450 #
8451 # This means that a value of 1.0 corresponds to a solid color, whereas
8452 # a value of 0.0 corresponds to a completely transparent color. This
8453 # uses a wrapper message rather than a simple float scalar so that it is
8454 # possible to distinguish between a default value and the value being unset.
8455 # If omitted, this color object is to be rendered as a solid color
8456 # (as if the alpha value had been explicitly given with a value of 1.0).
8457 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8458 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8459 },
8460 "bold": True or False, # True if the text is bold.
8461 "strikethrough": True or False, # True if the text has a strikethrough.
8462 "fontFamily": "A String", # The font family.
8463 "fontSize": 42, # The size of the font.
8464 "italic": True or False, # True if the text is italicized.
8465 "underline": True or False, # True if the text is underlined.
8466 },
8467 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
8468 "borders": { # The borders of the cell. # The borders of the cell.
8469 "top": { # A border along a cell. # The top border of the cell.
8470 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8471 # for simplicity of conversion to/from color representations in various
8472 # languages over compactness; for example, the fields of this representation
8473 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8474 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8475 # method in iOS; and, with just a little work, it can be easily formatted into
8476 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8477 #
8478 # Example (Java):
8479 #
8480 # import com.google.type.Color;
8481 #
8482 # // ...
8483 # public static java.awt.Color fromProto(Color protocolor) {
8484 # float alpha = protocolor.hasAlpha()
8485 # ? protocolor.getAlpha().getValue()
8486 # : 1.0;
8487 #
8488 # return new java.awt.Color(
8489 # protocolor.getRed(),
8490 # protocolor.getGreen(),
8491 # protocolor.getBlue(),
8492 # alpha);
8493 # }
8494 #
8495 # public static Color toProto(java.awt.Color color) {
8496 # float red = (float) color.getRed();
8497 # float green = (float) color.getGreen();
8498 # float blue = (float) color.getBlue();
8499 # float denominator = 255.0;
8500 # Color.Builder resultBuilder =
8501 # Color
8502 # .newBuilder()
8503 # .setRed(red / denominator)
8504 # .setGreen(green / denominator)
8505 # .setBlue(blue / denominator);
8506 # int alpha = color.getAlpha();
8507 # if (alpha != 255) {
8508 # result.setAlpha(
8509 # FloatValue
8510 # .newBuilder()
8511 # .setValue(((float) alpha) / denominator)
8512 # .build());
8513 # }
8514 # return resultBuilder.build();
8515 # }
8516 # // ...
8517 #
8518 # Example (iOS / Obj-C):
8519 #
8520 # // ...
8521 # static UIColor* fromProto(Color* protocolor) {
8522 # float red = [protocolor red];
8523 # float green = [protocolor green];
8524 # float blue = [protocolor blue];
8525 # FloatValue* alpha_wrapper = [protocolor alpha];
8526 # float alpha = 1.0;
8527 # if (alpha_wrapper != nil) {
8528 # alpha = [alpha_wrapper value];
8529 # }
8530 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8531 # }
8532 #
8533 # static Color* toProto(UIColor* color) {
8534 # CGFloat red, green, blue, alpha;
8535 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8536 # return nil;
8537 # }
8538 # Color* result = [Color alloc] init];
8539 # [result setRed:red];
8540 # [result setGreen:green];
8541 # [result setBlue:blue];
8542 # if (alpha <= 0.9999) {
8543 # [result setAlpha:floatWrapperWithValue(alpha)];
8544 # }
8545 # [result autorelease];
8546 # return result;
8547 # }
8548 # // ...
8549 #
8550 # Example (JavaScript):
8551 #
8552 # // ...
8553 #
8554 # var protoToCssColor = function(rgb_color) {
8555 # var redFrac = rgb_color.red || 0.0;
8556 # var greenFrac = rgb_color.green || 0.0;
8557 # var blueFrac = rgb_color.blue || 0.0;
8558 # var red = Math.floor(redFrac * 255);
8559 # var green = Math.floor(greenFrac * 255);
8560 # var blue = Math.floor(blueFrac * 255);
8561 #
8562 # if (!('alpha' in rgb_color)) {
8563 # return rgbToCssColor_(red, green, blue);
8564 # }
8565 #
8566 # var alphaFrac = rgb_color.alpha.value || 0.0;
8567 # var rgbParams = [red, green, blue].join(',');
8568 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8569 # };
8570 #
8571 # var rgbToCssColor_ = function(red, green, blue) {
8572 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8573 # var hexString = rgbNumber.toString(16);
8574 # var missingZeros = 6 - hexString.length;
8575 # var resultBuilder = ['#'];
8576 # for (var i = 0; i < missingZeros; i++) {
8577 # resultBuilder.push('0');
8578 # }
8579 # resultBuilder.push(hexString);
8580 # return resultBuilder.join('');
8581 # };
8582 #
8583 # // ...
8584 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8585 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8586 # the final pixel color is defined by the equation:
8587 #
8588 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8589 #
8590 # This means that a value of 1.0 corresponds to a solid color, whereas
8591 # a value of 0.0 corresponds to a completely transparent color. This
8592 # uses a wrapper message rather than a simple float scalar so that it is
8593 # possible to distinguish between a default value and the value being unset.
8594 # If omitted, this color object is to be rendered as a solid color
8595 # (as if the alpha value had been explicitly given with a value of 1.0).
8596 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8597 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8598 },
8599 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07008600 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008601 "style": "A String", # The style of the border.
8602 },
8603 "right": { # A border along a cell. # The right border of the cell.
8604 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8605 # for simplicity of conversion to/from color representations in various
8606 # languages over compactness; for example, the fields of this representation
8607 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8608 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8609 # method in iOS; and, with just a little work, it can be easily formatted into
8610 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8611 #
8612 # Example (Java):
8613 #
8614 # import com.google.type.Color;
8615 #
8616 # // ...
8617 # public static java.awt.Color fromProto(Color protocolor) {
8618 # float alpha = protocolor.hasAlpha()
8619 # ? protocolor.getAlpha().getValue()
8620 # : 1.0;
8621 #
8622 # return new java.awt.Color(
8623 # protocolor.getRed(),
8624 # protocolor.getGreen(),
8625 # protocolor.getBlue(),
8626 # alpha);
8627 # }
8628 #
8629 # public static Color toProto(java.awt.Color color) {
8630 # float red = (float) color.getRed();
8631 # float green = (float) color.getGreen();
8632 # float blue = (float) color.getBlue();
8633 # float denominator = 255.0;
8634 # Color.Builder resultBuilder =
8635 # Color
8636 # .newBuilder()
8637 # .setRed(red / denominator)
8638 # .setGreen(green / denominator)
8639 # .setBlue(blue / denominator);
8640 # int alpha = color.getAlpha();
8641 # if (alpha != 255) {
8642 # result.setAlpha(
8643 # FloatValue
8644 # .newBuilder()
8645 # .setValue(((float) alpha) / denominator)
8646 # .build());
8647 # }
8648 # return resultBuilder.build();
8649 # }
8650 # // ...
8651 #
8652 # Example (iOS / Obj-C):
8653 #
8654 # // ...
8655 # static UIColor* fromProto(Color* protocolor) {
8656 # float red = [protocolor red];
8657 # float green = [protocolor green];
8658 # float blue = [protocolor blue];
8659 # FloatValue* alpha_wrapper = [protocolor alpha];
8660 # float alpha = 1.0;
8661 # if (alpha_wrapper != nil) {
8662 # alpha = [alpha_wrapper value];
8663 # }
8664 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8665 # }
8666 #
8667 # static Color* toProto(UIColor* color) {
8668 # CGFloat red, green, blue, alpha;
8669 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8670 # return nil;
8671 # }
8672 # Color* result = [Color alloc] init];
8673 # [result setRed:red];
8674 # [result setGreen:green];
8675 # [result setBlue:blue];
8676 # if (alpha <= 0.9999) {
8677 # [result setAlpha:floatWrapperWithValue(alpha)];
8678 # }
8679 # [result autorelease];
8680 # return result;
8681 # }
8682 # // ...
8683 #
8684 # Example (JavaScript):
8685 #
8686 # // ...
8687 #
8688 # var protoToCssColor = function(rgb_color) {
8689 # var redFrac = rgb_color.red || 0.0;
8690 # var greenFrac = rgb_color.green || 0.0;
8691 # var blueFrac = rgb_color.blue || 0.0;
8692 # var red = Math.floor(redFrac * 255);
8693 # var green = Math.floor(greenFrac * 255);
8694 # var blue = Math.floor(blueFrac * 255);
8695 #
8696 # if (!('alpha' in rgb_color)) {
8697 # return rgbToCssColor_(red, green, blue);
8698 # }
8699 #
8700 # var alphaFrac = rgb_color.alpha.value || 0.0;
8701 # var rgbParams = [red, green, blue].join(',');
8702 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8703 # };
8704 #
8705 # var rgbToCssColor_ = function(red, green, blue) {
8706 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8707 # var hexString = rgbNumber.toString(16);
8708 # var missingZeros = 6 - hexString.length;
8709 # var resultBuilder = ['#'];
8710 # for (var i = 0; i < missingZeros; i++) {
8711 # resultBuilder.push('0');
8712 # }
8713 # resultBuilder.push(hexString);
8714 # return resultBuilder.join('');
8715 # };
8716 #
8717 # // ...
8718 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8719 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8720 # the final pixel color is defined by the equation:
8721 #
8722 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8723 #
8724 # This means that a value of 1.0 corresponds to a solid color, whereas
8725 # a value of 0.0 corresponds to a completely transparent color. This
8726 # uses a wrapper message rather than a simple float scalar so that it is
8727 # possible to distinguish between a default value and the value being unset.
8728 # If omitted, this color object is to be rendered as a solid color
8729 # (as if the alpha value had been explicitly given with a value of 1.0).
8730 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8731 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8732 },
8733 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07008734 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008735 "style": "A String", # The style of the border.
8736 },
8737 "bottom": { # A border along a cell. # The bottom border of the cell.
8738 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8739 # for simplicity of conversion to/from color representations in various
8740 # languages over compactness; for example, the fields of this representation
8741 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8742 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8743 # method in iOS; and, with just a little work, it can be easily formatted into
8744 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8745 #
8746 # Example (Java):
8747 #
8748 # import com.google.type.Color;
8749 #
8750 # // ...
8751 # public static java.awt.Color fromProto(Color protocolor) {
8752 # float alpha = protocolor.hasAlpha()
8753 # ? protocolor.getAlpha().getValue()
8754 # : 1.0;
8755 #
8756 # return new java.awt.Color(
8757 # protocolor.getRed(),
8758 # protocolor.getGreen(),
8759 # protocolor.getBlue(),
8760 # alpha);
8761 # }
8762 #
8763 # public static Color toProto(java.awt.Color color) {
8764 # float red = (float) color.getRed();
8765 # float green = (float) color.getGreen();
8766 # float blue = (float) color.getBlue();
8767 # float denominator = 255.0;
8768 # Color.Builder resultBuilder =
8769 # Color
8770 # .newBuilder()
8771 # .setRed(red / denominator)
8772 # .setGreen(green / denominator)
8773 # .setBlue(blue / denominator);
8774 # int alpha = color.getAlpha();
8775 # if (alpha != 255) {
8776 # result.setAlpha(
8777 # FloatValue
8778 # .newBuilder()
8779 # .setValue(((float) alpha) / denominator)
8780 # .build());
8781 # }
8782 # return resultBuilder.build();
8783 # }
8784 # // ...
8785 #
8786 # Example (iOS / Obj-C):
8787 #
8788 # // ...
8789 # static UIColor* fromProto(Color* protocolor) {
8790 # float red = [protocolor red];
8791 # float green = [protocolor green];
8792 # float blue = [protocolor blue];
8793 # FloatValue* alpha_wrapper = [protocolor alpha];
8794 # float alpha = 1.0;
8795 # if (alpha_wrapper != nil) {
8796 # alpha = [alpha_wrapper value];
8797 # }
8798 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8799 # }
8800 #
8801 # static Color* toProto(UIColor* color) {
8802 # CGFloat red, green, blue, alpha;
8803 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8804 # return nil;
8805 # }
8806 # Color* result = [Color alloc] init];
8807 # [result setRed:red];
8808 # [result setGreen:green];
8809 # [result setBlue:blue];
8810 # if (alpha <= 0.9999) {
8811 # [result setAlpha:floatWrapperWithValue(alpha)];
8812 # }
8813 # [result autorelease];
8814 # return result;
8815 # }
8816 # // ...
8817 #
8818 # Example (JavaScript):
8819 #
8820 # // ...
8821 #
8822 # var protoToCssColor = function(rgb_color) {
8823 # var redFrac = rgb_color.red || 0.0;
8824 # var greenFrac = rgb_color.green || 0.0;
8825 # var blueFrac = rgb_color.blue || 0.0;
8826 # var red = Math.floor(redFrac * 255);
8827 # var green = Math.floor(greenFrac * 255);
8828 # var blue = Math.floor(blueFrac * 255);
8829 #
8830 # if (!('alpha' in rgb_color)) {
8831 # return rgbToCssColor_(red, green, blue);
8832 # }
8833 #
8834 # var alphaFrac = rgb_color.alpha.value || 0.0;
8835 # var rgbParams = [red, green, blue].join(',');
8836 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8837 # };
8838 #
8839 # var rgbToCssColor_ = function(red, green, blue) {
8840 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8841 # var hexString = rgbNumber.toString(16);
8842 # var missingZeros = 6 - hexString.length;
8843 # var resultBuilder = ['#'];
8844 # for (var i = 0; i < missingZeros; i++) {
8845 # resultBuilder.push('0');
8846 # }
8847 # resultBuilder.push(hexString);
8848 # return resultBuilder.join('');
8849 # };
8850 #
8851 # // ...
8852 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8853 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8854 # the final pixel color is defined by the equation:
8855 #
8856 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8857 #
8858 # This means that a value of 1.0 corresponds to a solid color, whereas
8859 # a value of 0.0 corresponds to a completely transparent color. This
8860 # uses a wrapper message rather than a simple float scalar so that it is
8861 # possible to distinguish between a default value and the value being unset.
8862 # If omitted, this color object is to be rendered as a solid color
8863 # (as if the alpha value had been explicitly given with a value of 1.0).
8864 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8865 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8866 },
8867 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07008868 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008869 "style": "A String", # The style of the border.
8870 },
8871 "left": { # A border along a cell. # The left border of the cell.
8872 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8873 # for simplicity of conversion to/from color representations in various
8874 # languages over compactness; for example, the fields of this representation
8875 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8876 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8877 # method in iOS; and, with just a little work, it can be easily formatted into
8878 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8879 #
8880 # Example (Java):
8881 #
8882 # import com.google.type.Color;
8883 #
8884 # // ...
8885 # public static java.awt.Color fromProto(Color protocolor) {
8886 # float alpha = protocolor.hasAlpha()
8887 # ? protocolor.getAlpha().getValue()
8888 # : 1.0;
8889 #
8890 # return new java.awt.Color(
8891 # protocolor.getRed(),
8892 # protocolor.getGreen(),
8893 # protocolor.getBlue(),
8894 # alpha);
8895 # }
8896 #
8897 # public static Color toProto(java.awt.Color color) {
8898 # float red = (float) color.getRed();
8899 # float green = (float) color.getGreen();
8900 # float blue = (float) color.getBlue();
8901 # float denominator = 255.0;
8902 # Color.Builder resultBuilder =
8903 # Color
8904 # .newBuilder()
8905 # .setRed(red / denominator)
8906 # .setGreen(green / denominator)
8907 # .setBlue(blue / denominator);
8908 # int alpha = color.getAlpha();
8909 # if (alpha != 255) {
8910 # result.setAlpha(
8911 # FloatValue
8912 # .newBuilder()
8913 # .setValue(((float) alpha) / denominator)
8914 # .build());
8915 # }
8916 # return resultBuilder.build();
8917 # }
8918 # // ...
8919 #
8920 # Example (iOS / Obj-C):
8921 #
8922 # // ...
8923 # static UIColor* fromProto(Color* protocolor) {
8924 # float red = [protocolor red];
8925 # float green = [protocolor green];
8926 # float blue = [protocolor blue];
8927 # FloatValue* alpha_wrapper = [protocolor alpha];
8928 # float alpha = 1.0;
8929 # if (alpha_wrapper != nil) {
8930 # alpha = [alpha_wrapper value];
8931 # }
8932 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8933 # }
8934 #
8935 # static Color* toProto(UIColor* color) {
8936 # CGFloat red, green, blue, alpha;
8937 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8938 # return nil;
8939 # }
8940 # Color* result = [Color alloc] init];
8941 # [result setRed:red];
8942 # [result setGreen:green];
8943 # [result setBlue:blue];
8944 # if (alpha <= 0.9999) {
8945 # [result setAlpha:floatWrapperWithValue(alpha)];
8946 # }
8947 # [result autorelease];
8948 # return result;
8949 # }
8950 # // ...
8951 #
8952 # Example (JavaScript):
8953 #
8954 # // ...
8955 #
8956 # var protoToCssColor = function(rgb_color) {
8957 # var redFrac = rgb_color.red || 0.0;
8958 # var greenFrac = rgb_color.green || 0.0;
8959 # var blueFrac = rgb_color.blue || 0.0;
8960 # var red = Math.floor(redFrac * 255);
8961 # var green = Math.floor(greenFrac * 255);
8962 # var blue = Math.floor(blueFrac * 255);
8963 #
8964 # if (!('alpha' in rgb_color)) {
8965 # return rgbToCssColor_(red, green, blue);
8966 # }
8967 #
8968 # var alphaFrac = rgb_color.alpha.value || 0.0;
8969 # var rgbParams = [red, green, blue].join(',');
8970 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8971 # };
8972 #
8973 # var rgbToCssColor_ = function(red, green, blue) {
8974 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8975 # var hexString = rgbNumber.toString(16);
8976 # var missingZeros = 6 - hexString.length;
8977 # var resultBuilder = ['#'];
8978 # for (var i = 0; i < missingZeros; i++) {
8979 # resultBuilder.push('0');
8980 # }
8981 # resultBuilder.push(hexString);
8982 # return resultBuilder.join('');
8983 # };
8984 #
8985 # // ...
8986 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8987 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8988 # the final pixel color is defined by the equation:
8989 #
8990 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8991 #
8992 # This means that a value of 1.0 corresponds to a solid color, whereas
8993 # a value of 0.0 corresponds to a completely transparent color. This
8994 # uses a wrapper message rather than a simple float scalar so that it is
8995 # possible to distinguish between a default value and the value being unset.
8996 # If omitted, this color object is to be rendered as a solid color
8997 # (as if the alpha value had been explicitly given with a value of 1.0).
8998 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8999 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9000 },
9001 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07009002 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009003 "style": "A String", # The style of the border.
9004 },
9005 },
9006 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
9007 },
9008 "title": "A String", # The title of the spreadsheet.
9009 },
9010 },
9011 "updateCells": { # Updates all cells in a range with new data. # Updates many cells at once.
9012 "fields": "A String", # The fields of CellData that should be updated.
9013 # At least one field must be specified.
9014 # The root is the CellData; 'row.values.' should not be specified.
9015 # A single `"*"` can be used as short-hand for listing every field.
9016 "range": { # A range on a sheet. # The range to write data to.
9017 #
9018 # If the data in rows does not cover the entire requested range,
9019 # the fields matching those set in fields will be cleared.
9020 # All indexes are zero-based.
9021 # Indexes are half open, e.g the start index is inclusive
9022 # and the end index is exclusive -- [start_index, end_index).
9023 # Missing indexes indicate the range is unbounded on that side.
9024 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009025 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009026 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009027 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009028 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009029 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009030 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009031 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009032 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009033 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009034 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009035 # `Sheet1!A:B == sheet_id: 0,
9036 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009037 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009038 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009039 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009040 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009041 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009042 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009043 #
9044 # The start index must always be less than or equal to the end index.
9045 # If the start index equals the end index, then the range is empty.
9046 # Empty ranges are typically not meaningful and are usually rendered in the
9047 # UI as `#REF!`.
9048 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
9049 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
9050 "sheetId": 42, # The sheet this range is on.
9051 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
9052 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
9053 },
9054 "rows": [ # The data to write.
9055 { # Data about each cell in a row.
9056 "values": [ # The values in the row, one per column.
9057 { # Data about a specific cell.
9058 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
9059 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009060 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009061 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009062 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009063 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
9064 # or vertically (as rows).
9065 "rows": [ # Each row grouping in the pivot table.
9066 { # A single grouping (either row or column) in a pivot table.
9067 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
9068 "valueMetadata": [ # Metadata about values in the grouping.
9069 { # Metadata about a value in a pivot grouping.
9070 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
9071 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
9072 # (Note that formulaValue is not valid,
9073 # because the values will be calculated.)
9074 "numberValue": 3.14, # Represents a double value.
9075 # Note: Dates, Times and DateTimes are represented as doubles in
9076 # "serial number" format.
9077 "boolValue": True or False, # Represents a boolean value.
9078 "formulaValue": "A String", # Represents a formula.
9079 "stringValue": "A String", # Represents a string value.
9080 # Leading single quotes are not included. For example, if the user typed
9081 # `'123` into the UI, this would be represented as a `stringValue` of
9082 # `"123"`.
9083 "errorValue": { # An error in a cell. # Represents an error.
9084 # This field is read-only.
9085 "message": "A String", # A message with more information about the error
9086 # (in the spreadsheet's locale).
9087 "type": "A String", # The type of error.
9088 },
9089 },
9090 },
9091 ],
9092 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
9093 # If not specified, sorting is alphabetical by this group's values.
9094 "buckets": [ # Determines the bucket from which values are chosen to sort.
9095 #
9096 # For example, in a pivot table with one row group & two column groups,
9097 # the row group can list up to two values. The first value corresponds
9098 # to a value within the first column group, and the second value
9099 # corresponds to a value in the second column group. If no values
9100 # are listed, this would indicate that the row should be sorted according
9101 # to the "Grand Total" over the column groups. If a single value is listed,
9102 # this would correspond to using the "Total" of that bucket.
9103 { # The kinds of value that a cell in a spreadsheet can have.
9104 "numberValue": 3.14, # Represents a double value.
9105 # Note: Dates, Times and DateTimes are represented as doubles in
9106 # "serial number" format.
9107 "boolValue": True or False, # Represents a boolean value.
9108 "formulaValue": "A String", # Represents a formula.
9109 "stringValue": "A String", # Represents a string value.
9110 # Leading single quotes are not included. For example, if the user typed
9111 # `'123` into the UI, this would be represented as a `stringValue` of
9112 # `"123"`.
9113 "errorValue": { # An error in a cell. # Represents an error.
9114 # This field is read-only.
9115 "message": "A String", # A message with more information about the error
9116 # (in the spreadsheet's locale).
9117 "type": "A String", # The type of error.
9118 },
9119 },
9120 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009121 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009122 # grouping should be sorted by.
9123 },
9124 "sortOrder": "A String", # The order the values in this group should be sorted.
9125 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
9126 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009127 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009128 # means this group refers to column `C`, whereas the offset `1` would refer
9129 # to column `D`.
9130 },
9131 ],
9132 "source": { # A range on a sheet. # The range the pivot table is reading data from.
9133 # All indexes are zero-based.
9134 # Indexes are half open, e.g the start index is inclusive
9135 # and the end index is exclusive -- [start_index, end_index).
9136 # Missing indexes indicate the range is unbounded on that side.
9137 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009138 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009139 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009140 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009141 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009142 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009143 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009144 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009145 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009146 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009147 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009148 # `Sheet1!A:B == sheet_id: 0,
9149 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009150 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009151 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009152 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009153 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009154 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009155 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009156 #
9157 # The start index must always be less than or equal to the end index.
9158 # If the start index equals the end index, then the range is empty.
9159 # Empty ranges are typically not meaningful and are usually rendered in the
9160 # UI as `#REF!`.
9161 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
9162 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
9163 "sheetId": 42, # The sheet this range is on.
9164 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
9165 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
9166 },
9167 "values": [ # A list of values to include in the pivot table.
9168 { # The definition of how a value in a pivot table should be calculated.
9169 "formula": "A String", # A custom formula to calculate the value. The formula must start
9170 # with an `=` character.
9171 "summarizeFunction": "A String", # A function to summarize the value.
9172 # If formula is set, the only supported values are
9173 # SUM and
9174 # CUSTOM.
9175 # If sourceColumnOffset is set, then `CUSTOM`
9176 # is not supported.
9177 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
9178 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009179 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009180 # means this value refers to column `C`, whereas the offset `1` would
9181 # refer to column `D`.
9182 "name": "A String", # A name to use for the value. This is only used if formula was set.
9183 # Otherwise, the column name is used.
9184 },
9185 ],
9186 "criteria": { # An optional mapping of filters per source column offset.
9187 #
9188 # The filters will be applied before aggregating data into the pivot table.
9189 # The map's key is the column offset of the source range that you want to
9190 # filter, and the value is the criteria for that column.
9191 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009192 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009193 # for column `C`, whereas the key `1` is for column `D`.
9194 "a_key": { # Criteria for showing/hiding rows in a pivot table.
9195 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
9196 "A String",
9197 ],
9198 },
9199 },
9200 "columns": [ # Each column grouping in the pivot table.
9201 { # A single grouping (either row or column) in a pivot table.
9202 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
9203 "valueMetadata": [ # Metadata about values in the grouping.
9204 { # Metadata about a value in a pivot grouping.
9205 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
9206 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
9207 # (Note that formulaValue is not valid,
9208 # because the values will be calculated.)
9209 "numberValue": 3.14, # Represents a double value.
9210 # Note: Dates, Times and DateTimes are represented as doubles in
9211 # "serial number" format.
9212 "boolValue": True or False, # Represents a boolean value.
9213 "formulaValue": "A String", # Represents a formula.
9214 "stringValue": "A String", # Represents a string value.
9215 # Leading single quotes are not included. For example, if the user typed
9216 # `'123` into the UI, this would be represented as a `stringValue` of
9217 # `"123"`.
9218 "errorValue": { # An error in a cell. # Represents an error.
9219 # This field is read-only.
9220 "message": "A String", # A message with more information about the error
9221 # (in the spreadsheet's locale).
9222 "type": "A String", # The type of error.
9223 },
9224 },
9225 },
9226 ],
9227 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
9228 # If not specified, sorting is alphabetical by this group's values.
9229 "buckets": [ # Determines the bucket from which values are chosen to sort.
9230 #
9231 # For example, in a pivot table with one row group & two column groups,
9232 # the row group can list up to two values. The first value corresponds
9233 # to a value within the first column group, and the second value
9234 # corresponds to a value in the second column group. If no values
9235 # are listed, this would indicate that the row should be sorted according
9236 # to the "Grand Total" over the column groups. If a single value is listed,
9237 # this would correspond to using the "Total" of that bucket.
9238 { # The kinds of value that a cell in a spreadsheet can have.
9239 "numberValue": 3.14, # Represents a double value.
9240 # Note: Dates, Times and DateTimes are represented as doubles in
9241 # "serial number" format.
9242 "boolValue": True or False, # Represents a boolean value.
9243 "formulaValue": "A String", # Represents a formula.
9244 "stringValue": "A String", # Represents a string value.
9245 # Leading single quotes are not included. For example, if the user typed
9246 # `'123` into the UI, this would be represented as a `stringValue` of
9247 # `"123"`.
9248 "errorValue": { # An error in a cell. # Represents an error.
9249 # This field is read-only.
9250 "message": "A String", # A message with more information about the error
9251 # (in the spreadsheet's locale).
9252 "type": "A String", # The type of error.
9253 },
9254 },
9255 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009256 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009257 # grouping should be sorted by.
9258 },
9259 "sortOrder": "A String", # The order the values in this group should be sorted.
9260 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
9261 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009262 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009263 # means this group refers to column `C`, whereas the offset `1` would refer
9264 # to column `D`.
9265 },
9266 ],
9267 },
9268 "hyperlink": "A String", # A hyperlink this cell points to, if any.
9269 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
9270 "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
9271 # the calculated value. For cells with literals, this will be
9272 # the same as the user_entered_value.
9273 # This field is read-only.
9274 "numberValue": 3.14, # Represents a double value.
9275 # Note: Dates, Times and DateTimes are represented as doubles in
9276 # "serial number" format.
9277 "boolValue": True or False, # Represents a boolean value.
9278 "formulaValue": "A String", # Represents a formula.
9279 "stringValue": "A String", # Represents a string value.
9280 # Leading single quotes are not included. For example, if the user typed
9281 # `'123` into the UI, this would be represented as a `stringValue` of
9282 # `"123"`.
9283 "errorValue": { # An error in a cell. # Represents an error.
9284 # This field is read-only.
9285 "message": "A String", # A message with more information about the error
9286 # (in the spreadsheet's locale).
9287 "type": "A String", # The type of error.
9288 },
9289 },
9290 "formattedValue": "A String", # The formatted value of the cell.
9291 # This is the value as it's shown to the user.
9292 # This field is read-only.
9293 "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()`
9294 # Note: Dates, Times and DateTimes are represented as doubles in
9295 # serial number format.
9296 "numberValue": 3.14, # Represents a double value.
9297 # Note: Dates, Times and DateTimes are represented as doubles in
9298 # "serial number" format.
9299 "boolValue": True or False, # Represents a boolean value.
9300 "formulaValue": "A String", # Represents a formula.
9301 "stringValue": "A String", # Represents a string value.
9302 # Leading single quotes are not included. For example, if the user typed
9303 # `'123` into the UI, this would be represented as a `stringValue` of
9304 # `"123"`.
9305 "errorValue": { # An error in a cell. # Represents an error.
9306 # This field is read-only.
9307 "message": "A String", # A message with more information about the error
9308 # (in the spreadsheet's locale).
9309 "type": "A String", # The type of error.
9310 },
9311 },
9312 "note": "A String", # Any note on the cell.
9313 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
9314 # This includes the results of applying any conditional formatting and,
9315 # if the cell contains a formula, the computed number format.
9316 # If the effective format is the default format, effective format will
9317 # not be written.
9318 # This field is read-only.
9319 "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 -07009320 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
9321 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07009322 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
9323 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009324 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009325 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009326 },
9327 "textDirection": "A String", # The direction of the text in the cell.
9328 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
9329 # When updating padding, every field must be specified.
9330 "top": 42, # The top padding of the cell.
9331 "right": 42, # The right padding of the cell.
9332 "bottom": 42, # The bottom padding of the cell.
9333 "left": 42, # The left padding of the cell.
9334 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009335 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009336 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
9337 # for simplicity of conversion to/from color representations in various
9338 # languages over compactness; for example, the fields of this representation
9339 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9340 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9341 # method in iOS; and, with just a little work, it can be easily formatted into
9342 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9343 #
9344 # Example (Java):
9345 #
9346 # import com.google.type.Color;
9347 #
9348 # // ...
9349 # public static java.awt.Color fromProto(Color protocolor) {
9350 # float alpha = protocolor.hasAlpha()
9351 # ? protocolor.getAlpha().getValue()
9352 # : 1.0;
9353 #
9354 # return new java.awt.Color(
9355 # protocolor.getRed(),
9356 # protocolor.getGreen(),
9357 # protocolor.getBlue(),
9358 # alpha);
9359 # }
9360 #
9361 # public static Color toProto(java.awt.Color color) {
9362 # float red = (float) color.getRed();
9363 # float green = (float) color.getGreen();
9364 # float blue = (float) color.getBlue();
9365 # float denominator = 255.0;
9366 # Color.Builder resultBuilder =
9367 # Color
9368 # .newBuilder()
9369 # .setRed(red / denominator)
9370 # .setGreen(green / denominator)
9371 # .setBlue(blue / denominator);
9372 # int alpha = color.getAlpha();
9373 # if (alpha != 255) {
9374 # result.setAlpha(
9375 # FloatValue
9376 # .newBuilder()
9377 # .setValue(((float) alpha) / denominator)
9378 # .build());
9379 # }
9380 # return resultBuilder.build();
9381 # }
9382 # // ...
9383 #
9384 # Example (iOS / Obj-C):
9385 #
9386 # // ...
9387 # static UIColor* fromProto(Color* protocolor) {
9388 # float red = [protocolor red];
9389 # float green = [protocolor green];
9390 # float blue = [protocolor blue];
9391 # FloatValue* alpha_wrapper = [protocolor alpha];
9392 # float alpha = 1.0;
9393 # if (alpha_wrapper != nil) {
9394 # alpha = [alpha_wrapper value];
9395 # }
9396 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9397 # }
9398 #
9399 # static Color* toProto(UIColor* color) {
9400 # CGFloat red, green, blue, alpha;
9401 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9402 # return nil;
9403 # }
9404 # Color* result = [Color alloc] init];
9405 # [result setRed:red];
9406 # [result setGreen:green];
9407 # [result setBlue:blue];
9408 # if (alpha <= 0.9999) {
9409 # [result setAlpha:floatWrapperWithValue(alpha)];
9410 # }
9411 # [result autorelease];
9412 # return result;
9413 # }
9414 # // ...
9415 #
9416 # Example (JavaScript):
9417 #
9418 # // ...
9419 #
9420 # var protoToCssColor = function(rgb_color) {
9421 # var redFrac = rgb_color.red || 0.0;
9422 # var greenFrac = rgb_color.green || 0.0;
9423 # var blueFrac = rgb_color.blue || 0.0;
9424 # var red = Math.floor(redFrac * 255);
9425 # var green = Math.floor(greenFrac * 255);
9426 # var blue = Math.floor(blueFrac * 255);
9427 #
9428 # if (!('alpha' in rgb_color)) {
9429 # return rgbToCssColor_(red, green, blue);
9430 # }
9431 #
9432 # var alphaFrac = rgb_color.alpha.value || 0.0;
9433 # var rgbParams = [red, green, blue].join(',');
9434 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9435 # };
9436 #
9437 # var rgbToCssColor_ = function(red, green, blue) {
9438 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9439 # var hexString = rgbNumber.toString(16);
9440 # var missingZeros = 6 - hexString.length;
9441 # var resultBuilder = ['#'];
9442 # for (var i = 0; i < missingZeros; i++) {
9443 # resultBuilder.push('0');
9444 # }
9445 # resultBuilder.push(hexString);
9446 # return resultBuilder.join('');
9447 # };
9448 #
9449 # // ...
9450 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9451 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9452 # the final pixel color is defined by the equation:
9453 #
9454 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9455 #
9456 # This means that a value of 1.0 corresponds to a solid color, whereas
9457 # a value of 0.0 corresponds to a completely transparent color. This
9458 # uses a wrapper message rather than a simple float scalar so that it is
9459 # possible to distinguish between a default value and the value being unset.
9460 # If omitted, this color object is to be rendered as a solid color
9461 # (as if the alpha value had been explicitly given with a value of 1.0).
9462 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9463 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9464 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009465 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009466 "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).
9467 # Absent values indicate that the field isn't specified.
9468 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
9469 # for simplicity of conversion to/from color representations in various
9470 # languages over compactness; for example, the fields of this representation
9471 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9472 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9473 # method in iOS; and, with just a little work, it can be easily formatted into
9474 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9475 #
9476 # Example (Java):
9477 #
9478 # import com.google.type.Color;
9479 #
9480 # // ...
9481 # public static java.awt.Color fromProto(Color protocolor) {
9482 # float alpha = protocolor.hasAlpha()
9483 # ? protocolor.getAlpha().getValue()
9484 # : 1.0;
9485 #
9486 # return new java.awt.Color(
9487 # protocolor.getRed(),
9488 # protocolor.getGreen(),
9489 # protocolor.getBlue(),
9490 # alpha);
9491 # }
9492 #
9493 # public static Color toProto(java.awt.Color color) {
9494 # float red = (float) color.getRed();
9495 # float green = (float) color.getGreen();
9496 # float blue = (float) color.getBlue();
9497 # float denominator = 255.0;
9498 # Color.Builder resultBuilder =
9499 # Color
9500 # .newBuilder()
9501 # .setRed(red / denominator)
9502 # .setGreen(green / denominator)
9503 # .setBlue(blue / denominator);
9504 # int alpha = color.getAlpha();
9505 # if (alpha != 255) {
9506 # result.setAlpha(
9507 # FloatValue
9508 # .newBuilder()
9509 # .setValue(((float) alpha) / denominator)
9510 # .build());
9511 # }
9512 # return resultBuilder.build();
9513 # }
9514 # // ...
9515 #
9516 # Example (iOS / Obj-C):
9517 #
9518 # // ...
9519 # static UIColor* fromProto(Color* protocolor) {
9520 # float red = [protocolor red];
9521 # float green = [protocolor green];
9522 # float blue = [protocolor blue];
9523 # FloatValue* alpha_wrapper = [protocolor alpha];
9524 # float alpha = 1.0;
9525 # if (alpha_wrapper != nil) {
9526 # alpha = [alpha_wrapper value];
9527 # }
9528 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9529 # }
9530 #
9531 # static Color* toProto(UIColor* color) {
9532 # CGFloat red, green, blue, alpha;
9533 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9534 # return nil;
9535 # }
9536 # Color* result = [Color alloc] init];
9537 # [result setRed:red];
9538 # [result setGreen:green];
9539 # [result setBlue:blue];
9540 # if (alpha <= 0.9999) {
9541 # [result setAlpha:floatWrapperWithValue(alpha)];
9542 # }
9543 # [result autorelease];
9544 # return result;
9545 # }
9546 # // ...
9547 #
9548 # Example (JavaScript):
9549 #
9550 # // ...
9551 #
9552 # var protoToCssColor = function(rgb_color) {
9553 # var redFrac = rgb_color.red || 0.0;
9554 # var greenFrac = rgb_color.green || 0.0;
9555 # var blueFrac = rgb_color.blue || 0.0;
9556 # var red = Math.floor(redFrac * 255);
9557 # var green = Math.floor(greenFrac * 255);
9558 # var blue = Math.floor(blueFrac * 255);
9559 #
9560 # if (!('alpha' in rgb_color)) {
9561 # return rgbToCssColor_(red, green, blue);
9562 # }
9563 #
9564 # var alphaFrac = rgb_color.alpha.value || 0.0;
9565 # var rgbParams = [red, green, blue].join(',');
9566 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9567 # };
9568 #
9569 # var rgbToCssColor_ = function(red, green, blue) {
9570 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9571 # var hexString = rgbNumber.toString(16);
9572 # var missingZeros = 6 - hexString.length;
9573 # var resultBuilder = ['#'];
9574 # for (var i = 0; i < missingZeros; i++) {
9575 # resultBuilder.push('0');
9576 # }
9577 # resultBuilder.push(hexString);
9578 # return resultBuilder.join('');
9579 # };
9580 #
9581 # // ...
9582 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9583 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9584 # the final pixel color is defined by the equation:
9585 #
9586 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9587 #
9588 # This means that a value of 1.0 corresponds to a solid color, whereas
9589 # a value of 0.0 corresponds to a completely transparent color. This
9590 # uses a wrapper message rather than a simple float scalar so that it is
9591 # possible to distinguish between a default value and the value being unset.
9592 # If omitted, this color object is to be rendered as a solid color
9593 # (as if the alpha value had been explicitly given with a value of 1.0).
9594 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9595 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9596 },
9597 "bold": True or False, # True if the text is bold.
9598 "strikethrough": True or False, # True if the text has a strikethrough.
9599 "fontFamily": "A String", # The font family.
9600 "fontSize": 42, # The size of the font.
9601 "italic": True or False, # True if the text is italicized.
9602 "underline": True or False, # True if the text is underlined.
9603 },
9604 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
9605 "borders": { # The borders of the cell. # The borders of the cell.
9606 "top": { # A border along a cell. # The top border of the cell.
9607 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
9608 # for simplicity of conversion to/from color representations in various
9609 # languages over compactness; for example, the fields of this representation
9610 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9611 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9612 # method in iOS; and, with just a little work, it can be easily formatted into
9613 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9614 #
9615 # Example (Java):
9616 #
9617 # import com.google.type.Color;
9618 #
9619 # // ...
9620 # public static java.awt.Color fromProto(Color protocolor) {
9621 # float alpha = protocolor.hasAlpha()
9622 # ? protocolor.getAlpha().getValue()
9623 # : 1.0;
9624 #
9625 # return new java.awt.Color(
9626 # protocolor.getRed(),
9627 # protocolor.getGreen(),
9628 # protocolor.getBlue(),
9629 # alpha);
9630 # }
9631 #
9632 # public static Color toProto(java.awt.Color color) {
9633 # float red = (float) color.getRed();
9634 # float green = (float) color.getGreen();
9635 # float blue = (float) color.getBlue();
9636 # float denominator = 255.0;
9637 # Color.Builder resultBuilder =
9638 # Color
9639 # .newBuilder()
9640 # .setRed(red / denominator)
9641 # .setGreen(green / denominator)
9642 # .setBlue(blue / denominator);
9643 # int alpha = color.getAlpha();
9644 # if (alpha != 255) {
9645 # result.setAlpha(
9646 # FloatValue
9647 # .newBuilder()
9648 # .setValue(((float) alpha) / denominator)
9649 # .build());
9650 # }
9651 # return resultBuilder.build();
9652 # }
9653 # // ...
9654 #
9655 # Example (iOS / Obj-C):
9656 #
9657 # // ...
9658 # static UIColor* fromProto(Color* protocolor) {
9659 # float red = [protocolor red];
9660 # float green = [protocolor green];
9661 # float blue = [protocolor blue];
9662 # FloatValue* alpha_wrapper = [protocolor alpha];
9663 # float alpha = 1.0;
9664 # if (alpha_wrapper != nil) {
9665 # alpha = [alpha_wrapper value];
9666 # }
9667 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9668 # }
9669 #
9670 # static Color* toProto(UIColor* color) {
9671 # CGFloat red, green, blue, alpha;
9672 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9673 # return nil;
9674 # }
9675 # Color* result = [Color alloc] init];
9676 # [result setRed:red];
9677 # [result setGreen:green];
9678 # [result setBlue:blue];
9679 # if (alpha <= 0.9999) {
9680 # [result setAlpha:floatWrapperWithValue(alpha)];
9681 # }
9682 # [result autorelease];
9683 # return result;
9684 # }
9685 # // ...
9686 #
9687 # Example (JavaScript):
9688 #
9689 # // ...
9690 #
9691 # var protoToCssColor = function(rgb_color) {
9692 # var redFrac = rgb_color.red || 0.0;
9693 # var greenFrac = rgb_color.green || 0.0;
9694 # var blueFrac = rgb_color.blue || 0.0;
9695 # var red = Math.floor(redFrac * 255);
9696 # var green = Math.floor(greenFrac * 255);
9697 # var blue = Math.floor(blueFrac * 255);
9698 #
9699 # if (!('alpha' in rgb_color)) {
9700 # return rgbToCssColor_(red, green, blue);
9701 # }
9702 #
9703 # var alphaFrac = rgb_color.alpha.value || 0.0;
9704 # var rgbParams = [red, green, blue].join(',');
9705 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9706 # };
9707 #
9708 # var rgbToCssColor_ = function(red, green, blue) {
9709 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9710 # var hexString = rgbNumber.toString(16);
9711 # var missingZeros = 6 - hexString.length;
9712 # var resultBuilder = ['#'];
9713 # for (var i = 0; i < missingZeros; i++) {
9714 # resultBuilder.push('0');
9715 # }
9716 # resultBuilder.push(hexString);
9717 # return resultBuilder.join('');
9718 # };
9719 #
9720 # // ...
9721 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9722 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9723 # the final pixel color is defined by the equation:
9724 #
9725 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9726 #
9727 # This means that a value of 1.0 corresponds to a solid color, whereas
9728 # a value of 0.0 corresponds to a completely transparent color. This
9729 # uses a wrapper message rather than a simple float scalar so that it is
9730 # possible to distinguish between a default value and the value being unset.
9731 # If omitted, this color object is to be rendered as a solid color
9732 # (as if the alpha value had been explicitly given with a value of 1.0).
9733 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9734 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9735 },
9736 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07009737 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009738 "style": "A String", # The style of the border.
9739 },
9740 "right": { # A border along a cell. # The right border of the cell.
9741 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
9742 # for simplicity of conversion to/from color representations in various
9743 # languages over compactness; for example, the fields of this representation
9744 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9745 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9746 # method in iOS; and, with just a little work, it can be easily formatted into
9747 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9748 #
9749 # Example (Java):
9750 #
9751 # import com.google.type.Color;
9752 #
9753 # // ...
9754 # public static java.awt.Color fromProto(Color protocolor) {
9755 # float alpha = protocolor.hasAlpha()
9756 # ? protocolor.getAlpha().getValue()
9757 # : 1.0;
9758 #
9759 # return new java.awt.Color(
9760 # protocolor.getRed(),
9761 # protocolor.getGreen(),
9762 # protocolor.getBlue(),
9763 # alpha);
9764 # }
9765 #
9766 # public static Color toProto(java.awt.Color color) {
9767 # float red = (float) color.getRed();
9768 # float green = (float) color.getGreen();
9769 # float blue = (float) color.getBlue();
9770 # float denominator = 255.0;
9771 # Color.Builder resultBuilder =
9772 # Color
9773 # .newBuilder()
9774 # .setRed(red / denominator)
9775 # .setGreen(green / denominator)
9776 # .setBlue(blue / denominator);
9777 # int alpha = color.getAlpha();
9778 # if (alpha != 255) {
9779 # result.setAlpha(
9780 # FloatValue
9781 # .newBuilder()
9782 # .setValue(((float) alpha) / denominator)
9783 # .build());
9784 # }
9785 # return resultBuilder.build();
9786 # }
9787 # // ...
9788 #
9789 # Example (iOS / Obj-C):
9790 #
9791 # // ...
9792 # static UIColor* fromProto(Color* protocolor) {
9793 # float red = [protocolor red];
9794 # float green = [protocolor green];
9795 # float blue = [protocolor blue];
9796 # FloatValue* alpha_wrapper = [protocolor alpha];
9797 # float alpha = 1.0;
9798 # if (alpha_wrapper != nil) {
9799 # alpha = [alpha_wrapper value];
9800 # }
9801 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9802 # }
9803 #
9804 # static Color* toProto(UIColor* color) {
9805 # CGFloat red, green, blue, alpha;
9806 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9807 # return nil;
9808 # }
9809 # Color* result = [Color alloc] init];
9810 # [result setRed:red];
9811 # [result setGreen:green];
9812 # [result setBlue:blue];
9813 # if (alpha <= 0.9999) {
9814 # [result setAlpha:floatWrapperWithValue(alpha)];
9815 # }
9816 # [result autorelease];
9817 # return result;
9818 # }
9819 # // ...
9820 #
9821 # Example (JavaScript):
9822 #
9823 # // ...
9824 #
9825 # var protoToCssColor = function(rgb_color) {
9826 # var redFrac = rgb_color.red || 0.0;
9827 # var greenFrac = rgb_color.green || 0.0;
9828 # var blueFrac = rgb_color.blue || 0.0;
9829 # var red = Math.floor(redFrac * 255);
9830 # var green = Math.floor(greenFrac * 255);
9831 # var blue = Math.floor(blueFrac * 255);
9832 #
9833 # if (!('alpha' in rgb_color)) {
9834 # return rgbToCssColor_(red, green, blue);
9835 # }
9836 #
9837 # var alphaFrac = rgb_color.alpha.value || 0.0;
9838 # var rgbParams = [red, green, blue].join(',');
9839 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9840 # };
9841 #
9842 # var rgbToCssColor_ = function(red, green, blue) {
9843 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9844 # var hexString = rgbNumber.toString(16);
9845 # var missingZeros = 6 - hexString.length;
9846 # var resultBuilder = ['#'];
9847 # for (var i = 0; i < missingZeros; i++) {
9848 # resultBuilder.push('0');
9849 # }
9850 # resultBuilder.push(hexString);
9851 # return resultBuilder.join('');
9852 # };
9853 #
9854 # // ...
9855 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9856 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9857 # the final pixel color is defined by the equation:
9858 #
9859 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9860 #
9861 # This means that a value of 1.0 corresponds to a solid color, whereas
9862 # a value of 0.0 corresponds to a completely transparent color. This
9863 # uses a wrapper message rather than a simple float scalar so that it is
9864 # possible to distinguish between a default value and the value being unset.
9865 # If omitted, this color object is to be rendered as a solid color
9866 # (as if the alpha value had been explicitly given with a value of 1.0).
9867 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9868 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9869 },
9870 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07009871 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009872 "style": "A String", # The style of the border.
9873 },
9874 "bottom": { # A border along a cell. # The bottom border of the cell.
9875 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
9876 # for simplicity of conversion to/from color representations in various
9877 # languages over compactness; for example, the fields of this representation
9878 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9879 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9880 # method in iOS; and, with just a little work, it can be easily formatted into
9881 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9882 #
9883 # Example (Java):
9884 #
9885 # import com.google.type.Color;
9886 #
9887 # // ...
9888 # public static java.awt.Color fromProto(Color protocolor) {
9889 # float alpha = protocolor.hasAlpha()
9890 # ? protocolor.getAlpha().getValue()
9891 # : 1.0;
9892 #
9893 # return new java.awt.Color(
9894 # protocolor.getRed(),
9895 # protocolor.getGreen(),
9896 # protocolor.getBlue(),
9897 # alpha);
9898 # }
9899 #
9900 # public static Color toProto(java.awt.Color color) {
9901 # float red = (float) color.getRed();
9902 # float green = (float) color.getGreen();
9903 # float blue = (float) color.getBlue();
9904 # float denominator = 255.0;
9905 # Color.Builder resultBuilder =
9906 # Color
9907 # .newBuilder()
9908 # .setRed(red / denominator)
9909 # .setGreen(green / denominator)
9910 # .setBlue(blue / denominator);
9911 # int alpha = color.getAlpha();
9912 # if (alpha != 255) {
9913 # result.setAlpha(
9914 # FloatValue
9915 # .newBuilder()
9916 # .setValue(((float) alpha) / denominator)
9917 # .build());
9918 # }
9919 # return resultBuilder.build();
9920 # }
9921 # // ...
9922 #
9923 # Example (iOS / Obj-C):
9924 #
9925 # // ...
9926 # static UIColor* fromProto(Color* protocolor) {
9927 # float red = [protocolor red];
9928 # float green = [protocolor green];
9929 # float blue = [protocolor blue];
9930 # FloatValue* alpha_wrapper = [protocolor alpha];
9931 # float alpha = 1.0;
9932 # if (alpha_wrapper != nil) {
9933 # alpha = [alpha_wrapper value];
9934 # }
9935 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9936 # }
9937 #
9938 # static Color* toProto(UIColor* color) {
9939 # CGFloat red, green, blue, alpha;
9940 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9941 # return nil;
9942 # }
9943 # Color* result = [Color alloc] init];
9944 # [result setRed:red];
9945 # [result setGreen:green];
9946 # [result setBlue:blue];
9947 # if (alpha <= 0.9999) {
9948 # [result setAlpha:floatWrapperWithValue(alpha)];
9949 # }
9950 # [result autorelease];
9951 # return result;
9952 # }
9953 # // ...
9954 #
9955 # Example (JavaScript):
9956 #
9957 # // ...
9958 #
9959 # var protoToCssColor = function(rgb_color) {
9960 # var redFrac = rgb_color.red || 0.0;
9961 # var greenFrac = rgb_color.green || 0.0;
9962 # var blueFrac = rgb_color.blue || 0.0;
9963 # var red = Math.floor(redFrac * 255);
9964 # var green = Math.floor(greenFrac * 255);
9965 # var blue = Math.floor(blueFrac * 255);
9966 #
9967 # if (!('alpha' in rgb_color)) {
9968 # return rgbToCssColor_(red, green, blue);
9969 # }
9970 #
9971 # var alphaFrac = rgb_color.alpha.value || 0.0;
9972 # var rgbParams = [red, green, blue].join(',');
9973 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9974 # };
9975 #
9976 # var rgbToCssColor_ = function(red, green, blue) {
9977 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9978 # var hexString = rgbNumber.toString(16);
9979 # var missingZeros = 6 - hexString.length;
9980 # var resultBuilder = ['#'];
9981 # for (var i = 0; i < missingZeros; i++) {
9982 # resultBuilder.push('0');
9983 # }
9984 # resultBuilder.push(hexString);
9985 # return resultBuilder.join('');
9986 # };
9987 #
9988 # // ...
9989 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9990 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9991 # the final pixel color is defined by the equation:
9992 #
9993 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9994 #
9995 # This means that a value of 1.0 corresponds to a solid color, whereas
9996 # a value of 0.0 corresponds to a completely transparent color. This
9997 # uses a wrapper message rather than a simple float scalar so that it is
9998 # possible to distinguish between a default value and the value being unset.
9999 # If omitted, this color object is to be rendered as a solid color
10000 # (as if the alpha value had been explicitly given with a value of 1.0).
10001 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10002 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10003 },
10004 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010005 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010006 "style": "A String", # The style of the border.
10007 },
10008 "left": { # A border along a cell. # The left border of the cell.
10009 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10010 # for simplicity of conversion to/from color representations in various
10011 # languages over compactness; for example, the fields of this representation
10012 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10013 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10014 # method in iOS; and, with just a little work, it can be easily formatted into
10015 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10016 #
10017 # Example (Java):
10018 #
10019 # import com.google.type.Color;
10020 #
10021 # // ...
10022 # public static java.awt.Color fromProto(Color protocolor) {
10023 # float alpha = protocolor.hasAlpha()
10024 # ? protocolor.getAlpha().getValue()
10025 # : 1.0;
10026 #
10027 # return new java.awt.Color(
10028 # protocolor.getRed(),
10029 # protocolor.getGreen(),
10030 # protocolor.getBlue(),
10031 # alpha);
10032 # }
10033 #
10034 # public static Color toProto(java.awt.Color color) {
10035 # float red = (float) color.getRed();
10036 # float green = (float) color.getGreen();
10037 # float blue = (float) color.getBlue();
10038 # float denominator = 255.0;
10039 # Color.Builder resultBuilder =
10040 # Color
10041 # .newBuilder()
10042 # .setRed(red / denominator)
10043 # .setGreen(green / denominator)
10044 # .setBlue(blue / denominator);
10045 # int alpha = color.getAlpha();
10046 # if (alpha != 255) {
10047 # result.setAlpha(
10048 # FloatValue
10049 # .newBuilder()
10050 # .setValue(((float) alpha) / denominator)
10051 # .build());
10052 # }
10053 # return resultBuilder.build();
10054 # }
10055 # // ...
10056 #
10057 # Example (iOS / Obj-C):
10058 #
10059 # // ...
10060 # static UIColor* fromProto(Color* protocolor) {
10061 # float red = [protocolor red];
10062 # float green = [protocolor green];
10063 # float blue = [protocolor blue];
10064 # FloatValue* alpha_wrapper = [protocolor alpha];
10065 # float alpha = 1.0;
10066 # if (alpha_wrapper != nil) {
10067 # alpha = [alpha_wrapper value];
10068 # }
10069 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10070 # }
10071 #
10072 # static Color* toProto(UIColor* color) {
10073 # CGFloat red, green, blue, alpha;
10074 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10075 # return nil;
10076 # }
10077 # Color* result = [Color alloc] init];
10078 # [result setRed:red];
10079 # [result setGreen:green];
10080 # [result setBlue:blue];
10081 # if (alpha <= 0.9999) {
10082 # [result setAlpha:floatWrapperWithValue(alpha)];
10083 # }
10084 # [result autorelease];
10085 # return result;
10086 # }
10087 # // ...
10088 #
10089 # Example (JavaScript):
10090 #
10091 # // ...
10092 #
10093 # var protoToCssColor = function(rgb_color) {
10094 # var redFrac = rgb_color.red || 0.0;
10095 # var greenFrac = rgb_color.green || 0.0;
10096 # var blueFrac = rgb_color.blue || 0.0;
10097 # var red = Math.floor(redFrac * 255);
10098 # var green = Math.floor(greenFrac * 255);
10099 # var blue = Math.floor(blueFrac * 255);
10100 #
10101 # if (!('alpha' in rgb_color)) {
10102 # return rgbToCssColor_(red, green, blue);
10103 # }
10104 #
10105 # var alphaFrac = rgb_color.alpha.value || 0.0;
10106 # var rgbParams = [red, green, blue].join(',');
10107 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10108 # };
10109 #
10110 # var rgbToCssColor_ = function(red, green, blue) {
10111 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10112 # var hexString = rgbNumber.toString(16);
10113 # var missingZeros = 6 - hexString.length;
10114 # var resultBuilder = ['#'];
10115 # for (var i = 0; i < missingZeros; i++) {
10116 # resultBuilder.push('0');
10117 # }
10118 # resultBuilder.push(hexString);
10119 # return resultBuilder.join('');
10120 # };
10121 #
10122 # // ...
10123 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10124 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10125 # the final pixel color is defined by the equation:
10126 #
10127 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10128 #
10129 # This means that a value of 1.0 corresponds to a solid color, whereas
10130 # a value of 0.0 corresponds to a completely transparent color. This
10131 # uses a wrapper message rather than a simple float scalar so that it is
10132 # possible to distinguish between a default value and the value being unset.
10133 # If omitted, this color object is to be rendered as a solid color
10134 # (as if the alpha value had been explicitly given with a value of 1.0).
10135 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10136 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10137 },
10138 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010139 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010140 "style": "A String", # The style of the border.
10141 },
10142 },
10143 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
10144 },
10145 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
10146 #
10147 # When writing, the new format will be merged with the existing format.
10148 "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 -070010149 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
10150 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070010151 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
10152 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010153 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010154 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010155 },
10156 "textDirection": "A String", # The direction of the text in the cell.
10157 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
10158 # When updating padding, every field must be specified.
10159 "top": 42, # The top padding of the cell.
10160 "right": 42, # The right padding of the cell.
10161 "bottom": 42, # The bottom padding of the cell.
10162 "left": 42, # The left padding of the cell.
10163 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010164 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010165 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
10166 # for simplicity of conversion to/from color representations in various
10167 # languages over compactness; for example, the fields of this representation
10168 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10169 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10170 # method in iOS; and, with just a little work, it can be easily formatted into
10171 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10172 #
10173 # Example (Java):
10174 #
10175 # import com.google.type.Color;
10176 #
10177 # // ...
10178 # public static java.awt.Color fromProto(Color protocolor) {
10179 # float alpha = protocolor.hasAlpha()
10180 # ? protocolor.getAlpha().getValue()
10181 # : 1.0;
10182 #
10183 # return new java.awt.Color(
10184 # protocolor.getRed(),
10185 # protocolor.getGreen(),
10186 # protocolor.getBlue(),
10187 # alpha);
10188 # }
10189 #
10190 # public static Color toProto(java.awt.Color color) {
10191 # float red = (float) color.getRed();
10192 # float green = (float) color.getGreen();
10193 # float blue = (float) color.getBlue();
10194 # float denominator = 255.0;
10195 # Color.Builder resultBuilder =
10196 # Color
10197 # .newBuilder()
10198 # .setRed(red / denominator)
10199 # .setGreen(green / denominator)
10200 # .setBlue(blue / denominator);
10201 # int alpha = color.getAlpha();
10202 # if (alpha != 255) {
10203 # result.setAlpha(
10204 # FloatValue
10205 # .newBuilder()
10206 # .setValue(((float) alpha) / denominator)
10207 # .build());
10208 # }
10209 # return resultBuilder.build();
10210 # }
10211 # // ...
10212 #
10213 # Example (iOS / Obj-C):
10214 #
10215 # // ...
10216 # static UIColor* fromProto(Color* protocolor) {
10217 # float red = [protocolor red];
10218 # float green = [protocolor green];
10219 # float blue = [protocolor blue];
10220 # FloatValue* alpha_wrapper = [protocolor alpha];
10221 # float alpha = 1.0;
10222 # if (alpha_wrapper != nil) {
10223 # alpha = [alpha_wrapper value];
10224 # }
10225 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10226 # }
10227 #
10228 # static Color* toProto(UIColor* color) {
10229 # CGFloat red, green, blue, alpha;
10230 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10231 # return nil;
10232 # }
10233 # Color* result = [Color alloc] init];
10234 # [result setRed:red];
10235 # [result setGreen:green];
10236 # [result setBlue:blue];
10237 # if (alpha <= 0.9999) {
10238 # [result setAlpha:floatWrapperWithValue(alpha)];
10239 # }
10240 # [result autorelease];
10241 # return result;
10242 # }
10243 # // ...
10244 #
10245 # Example (JavaScript):
10246 #
10247 # // ...
10248 #
10249 # var protoToCssColor = function(rgb_color) {
10250 # var redFrac = rgb_color.red || 0.0;
10251 # var greenFrac = rgb_color.green || 0.0;
10252 # var blueFrac = rgb_color.blue || 0.0;
10253 # var red = Math.floor(redFrac * 255);
10254 # var green = Math.floor(greenFrac * 255);
10255 # var blue = Math.floor(blueFrac * 255);
10256 #
10257 # if (!('alpha' in rgb_color)) {
10258 # return rgbToCssColor_(red, green, blue);
10259 # }
10260 #
10261 # var alphaFrac = rgb_color.alpha.value || 0.0;
10262 # var rgbParams = [red, green, blue].join(',');
10263 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10264 # };
10265 #
10266 # var rgbToCssColor_ = function(red, green, blue) {
10267 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10268 # var hexString = rgbNumber.toString(16);
10269 # var missingZeros = 6 - hexString.length;
10270 # var resultBuilder = ['#'];
10271 # for (var i = 0; i < missingZeros; i++) {
10272 # resultBuilder.push('0');
10273 # }
10274 # resultBuilder.push(hexString);
10275 # return resultBuilder.join('');
10276 # };
10277 #
10278 # // ...
10279 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10280 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10281 # the final pixel color is defined by the equation:
10282 #
10283 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10284 #
10285 # This means that a value of 1.0 corresponds to a solid color, whereas
10286 # a value of 0.0 corresponds to a completely transparent color. This
10287 # uses a wrapper message rather than a simple float scalar so that it is
10288 # possible to distinguish between a default value and the value being unset.
10289 # If omitted, this color object is to be rendered as a solid color
10290 # (as if the alpha value had been explicitly given with a value of 1.0).
10291 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10292 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10293 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010294 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010295 "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).
10296 # Absent values indicate that the field isn't specified.
10297 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
10298 # for simplicity of conversion to/from color representations in various
10299 # languages over compactness; for example, the fields of this representation
10300 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10301 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10302 # method in iOS; and, with just a little work, it can be easily formatted into
10303 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10304 #
10305 # Example (Java):
10306 #
10307 # import com.google.type.Color;
10308 #
10309 # // ...
10310 # public static java.awt.Color fromProto(Color protocolor) {
10311 # float alpha = protocolor.hasAlpha()
10312 # ? protocolor.getAlpha().getValue()
10313 # : 1.0;
10314 #
10315 # return new java.awt.Color(
10316 # protocolor.getRed(),
10317 # protocolor.getGreen(),
10318 # protocolor.getBlue(),
10319 # alpha);
10320 # }
10321 #
10322 # public static Color toProto(java.awt.Color color) {
10323 # float red = (float) color.getRed();
10324 # float green = (float) color.getGreen();
10325 # float blue = (float) color.getBlue();
10326 # float denominator = 255.0;
10327 # Color.Builder resultBuilder =
10328 # Color
10329 # .newBuilder()
10330 # .setRed(red / denominator)
10331 # .setGreen(green / denominator)
10332 # .setBlue(blue / denominator);
10333 # int alpha = color.getAlpha();
10334 # if (alpha != 255) {
10335 # result.setAlpha(
10336 # FloatValue
10337 # .newBuilder()
10338 # .setValue(((float) alpha) / denominator)
10339 # .build());
10340 # }
10341 # return resultBuilder.build();
10342 # }
10343 # // ...
10344 #
10345 # Example (iOS / Obj-C):
10346 #
10347 # // ...
10348 # static UIColor* fromProto(Color* protocolor) {
10349 # float red = [protocolor red];
10350 # float green = [protocolor green];
10351 # float blue = [protocolor blue];
10352 # FloatValue* alpha_wrapper = [protocolor alpha];
10353 # float alpha = 1.0;
10354 # if (alpha_wrapper != nil) {
10355 # alpha = [alpha_wrapper value];
10356 # }
10357 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10358 # }
10359 #
10360 # static Color* toProto(UIColor* color) {
10361 # CGFloat red, green, blue, alpha;
10362 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10363 # return nil;
10364 # }
10365 # Color* result = [Color alloc] init];
10366 # [result setRed:red];
10367 # [result setGreen:green];
10368 # [result setBlue:blue];
10369 # if (alpha <= 0.9999) {
10370 # [result setAlpha:floatWrapperWithValue(alpha)];
10371 # }
10372 # [result autorelease];
10373 # return result;
10374 # }
10375 # // ...
10376 #
10377 # Example (JavaScript):
10378 #
10379 # // ...
10380 #
10381 # var protoToCssColor = function(rgb_color) {
10382 # var redFrac = rgb_color.red || 0.0;
10383 # var greenFrac = rgb_color.green || 0.0;
10384 # var blueFrac = rgb_color.blue || 0.0;
10385 # var red = Math.floor(redFrac * 255);
10386 # var green = Math.floor(greenFrac * 255);
10387 # var blue = Math.floor(blueFrac * 255);
10388 #
10389 # if (!('alpha' in rgb_color)) {
10390 # return rgbToCssColor_(red, green, blue);
10391 # }
10392 #
10393 # var alphaFrac = rgb_color.alpha.value || 0.0;
10394 # var rgbParams = [red, green, blue].join(',');
10395 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10396 # };
10397 #
10398 # var rgbToCssColor_ = function(red, green, blue) {
10399 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10400 # var hexString = rgbNumber.toString(16);
10401 # var missingZeros = 6 - hexString.length;
10402 # var resultBuilder = ['#'];
10403 # for (var i = 0; i < missingZeros; i++) {
10404 # resultBuilder.push('0');
10405 # }
10406 # resultBuilder.push(hexString);
10407 # return resultBuilder.join('');
10408 # };
10409 #
10410 # // ...
10411 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10412 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10413 # the final pixel color is defined by the equation:
10414 #
10415 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10416 #
10417 # This means that a value of 1.0 corresponds to a solid color, whereas
10418 # a value of 0.0 corresponds to a completely transparent color. This
10419 # uses a wrapper message rather than a simple float scalar so that it is
10420 # possible to distinguish between a default value and the value being unset.
10421 # If omitted, this color object is to be rendered as a solid color
10422 # (as if the alpha value had been explicitly given with a value of 1.0).
10423 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10424 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10425 },
10426 "bold": True or False, # True if the text is bold.
10427 "strikethrough": True or False, # True if the text has a strikethrough.
10428 "fontFamily": "A String", # The font family.
10429 "fontSize": 42, # The size of the font.
10430 "italic": True or False, # True if the text is italicized.
10431 "underline": True or False, # True if the text is underlined.
10432 },
10433 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
10434 "borders": { # The borders of the cell. # The borders of the cell.
10435 "top": { # A border along a cell. # The top border of the cell.
10436 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10437 # for simplicity of conversion to/from color representations in various
10438 # languages over compactness; for example, the fields of this representation
10439 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10440 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10441 # method in iOS; and, with just a little work, it can be easily formatted into
10442 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10443 #
10444 # Example (Java):
10445 #
10446 # import com.google.type.Color;
10447 #
10448 # // ...
10449 # public static java.awt.Color fromProto(Color protocolor) {
10450 # float alpha = protocolor.hasAlpha()
10451 # ? protocolor.getAlpha().getValue()
10452 # : 1.0;
10453 #
10454 # return new java.awt.Color(
10455 # protocolor.getRed(),
10456 # protocolor.getGreen(),
10457 # protocolor.getBlue(),
10458 # alpha);
10459 # }
10460 #
10461 # public static Color toProto(java.awt.Color color) {
10462 # float red = (float) color.getRed();
10463 # float green = (float) color.getGreen();
10464 # float blue = (float) color.getBlue();
10465 # float denominator = 255.0;
10466 # Color.Builder resultBuilder =
10467 # Color
10468 # .newBuilder()
10469 # .setRed(red / denominator)
10470 # .setGreen(green / denominator)
10471 # .setBlue(blue / denominator);
10472 # int alpha = color.getAlpha();
10473 # if (alpha != 255) {
10474 # result.setAlpha(
10475 # FloatValue
10476 # .newBuilder()
10477 # .setValue(((float) alpha) / denominator)
10478 # .build());
10479 # }
10480 # return resultBuilder.build();
10481 # }
10482 # // ...
10483 #
10484 # Example (iOS / Obj-C):
10485 #
10486 # // ...
10487 # static UIColor* fromProto(Color* protocolor) {
10488 # float red = [protocolor red];
10489 # float green = [protocolor green];
10490 # float blue = [protocolor blue];
10491 # FloatValue* alpha_wrapper = [protocolor alpha];
10492 # float alpha = 1.0;
10493 # if (alpha_wrapper != nil) {
10494 # alpha = [alpha_wrapper value];
10495 # }
10496 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10497 # }
10498 #
10499 # static Color* toProto(UIColor* color) {
10500 # CGFloat red, green, blue, alpha;
10501 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10502 # return nil;
10503 # }
10504 # Color* result = [Color alloc] init];
10505 # [result setRed:red];
10506 # [result setGreen:green];
10507 # [result setBlue:blue];
10508 # if (alpha <= 0.9999) {
10509 # [result setAlpha:floatWrapperWithValue(alpha)];
10510 # }
10511 # [result autorelease];
10512 # return result;
10513 # }
10514 # // ...
10515 #
10516 # Example (JavaScript):
10517 #
10518 # // ...
10519 #
10520 # var protoToCssColor = function(rgb_color) {
10521 # var redFrac = rgb_color.red || 0.0;
10522 # var greenFrac = rgb_color.green || 0.0;
10523 # var blueFrac = rgb_color.blue || 0.0;
10524 # var red = Math.floor(redFrac * 255);
10525 # var green = Math.floor(greenFrac * 255);
10526 # var blue = Math.floor(blueFrac * 255);
10527 #
10528 # if (!('alpha' in rgb_color)) {
10529 # return rgbToCssColor_(red, green, blue);
10530 # }
10531 #
10532 # var alphaFrac = rgb_color.alpha.value || 0.0;
10533 # var rgbParams = [red, green, blue].join(',');
10534 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10535 # };
10536 #
10537 # var rgbToCssColor_ = function(red, green, blue) {
10538 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10539 # var hexString = rgbNumber.toString(16);
10540 # var missingZeros = 6 - hexString.length;
10541 # var resultBuilder = ['#'];
10542 # for (var i = 0; i < missingZeros; i++) {
10543 # resultBuilder.push('0');
10544 # }
10545 # resultBuilder.push(hexString);
10546 # return resultBuilder.join('');
10547 # };
10548 #
10549 # // ...
10550 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10551 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10552 # the final pixel color is defined by the equation:
10553 #
10554 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10555 #
10556 # This means that a value of 1.0 corresponds to a solid color, whereas
10557 # a value of 0.0 corresponds to a completely transparent color. This
10558 # uses a wrapper message rather than a simple float scalar so that it is
10559 # possible to distinguish between a default value and the value being unset.
10560 # If omitted, this color object is to be rendered as a solid color
10561 # (as if the alpha value had been explicitly given with a value of 1.0).
10562 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10563 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10564 },
10565 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010566 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010567 "style": "A String", # The style of the border.
10568 },
10569 "right": { # A border along a cell. # The right border of the cell.
10570 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10571 # for simplicity of conversion to/from color representations in various
10572 # languages over compactness; for example, the fields of this representation
10573 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10574 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10575 # method in iOS; and, with just a little work, it can be easily formatted into
10576 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10577 #
10578 # Example (Java):
10579 #
10580 # import com.google.type.Color;
10581 #
10582 # // ...
10583 # public static java.awt.Color fromProto(Color protocolor) {
10584 # float alpha = protocolor.hasAlpha()
10585 # ? protocolor.getAlpha().getValue()
10586 # : 1.0;
10587 #
10588 # return new java.awt.Color(
10589 # protocolor.getRed(),
10590 # protocolor.getGreen(),
10591 # protocolor.getBlue(),
10592 # alpha);
10593 # }
10594 #
10595 # public static Color toProto(java.awt.Color color) {
10596 # float red = (float) color.getRed();
10597 # float green = (float) color.getGreen();
10598 # float blue = (float) color.getBlue();
10599 # float denominator = 255.0;
10600 # Color.Builder resultBuilder =
10601 # Color
10602 # .newBuilder()
10603 # .setRed(red / denominator)
10604 # .setGreen(green / denominator)
10605 # .setBlue(blue / denominator);
10606 # int alpha = color.getAlpha();
10607 # if (alpha != 255) {
10608 # result.setAlpha(
10609 # FloatValue
10610 # .newBuilder()
10611 # .setValue(((float) alpha) / denominator)
10612 # .build());
10613 # }
10614 # return resultBuilder.build();
10615 # }
10616 # // ...
10617 #
10618 # Example (iOS / Obj-C):
10619 #
10620 # // ...
10621 # static UIColor* fromProto(Color* protocolor) {
10622 # float red = [protocolor red];
10623 # float green = [protocolor green];
10624 # float blue = [protocolor blue];
10625 # FloatValue* alpha_wrapper = [protocolor alpha];
10626 # float alpha = 1.0;
10627 # if (alpha_wrapper != nil) {
10628 # alpha = [alpha_wrapper value];
10629 # }
10630 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10631 # }
10632 #
10633 # static Color* toProto(UIColor* color) {
10634 # CGFloat red, green, blue, alpha;
10635 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10636 # return nil;
10637 # }
10638 # Color* result = [Color alloc] init];
10639 # [result setRed:red];
10640 # [result setGreen:green];
10641 # [result setBlue:blue];
10642 # if (alpha <= 0.9999) {
10643 # [result setAlpha:floatWrapperWithValue(alpha)];
10644 # }
10645 # [result autorelease];
10646 # return result;
10647 # }
10648 # // ...
10649 #
10650 # Example (JavaScript):
10651 #
10652 # // ...
10653 #
10654 # var protoToCssColor = function(rgb_color) {
10655 # var redFrac = rgb_color.red || 0.0;
10656 # var greenFrac = rgb_color.green || 0.0;
10657 # var blueFrac = rgb_color.blue || 0.0;
10658 # var red = Math.floor(redFrac * 255);
10659 # var green = Math.floor(greenFrac * 255);
10660 # var blue = Math.floor(blueFrac * 255);
10661 #
10662 # if (!('alpha' in rgb_color)) {
10663 # return rgbToCssColor_(red, green, blue);
10664 # }
10665 #
10666 # var alphaFrac = rgb_color.alpha.value || 0.0;
10667 # var rgbParams = [red, green, blue].join(',');
10668 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10669 # };
10670 #
10671 # var rgbToCssColor_ = function(red, green, blue) {
10672 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10673 # var hexString = rgbNumber.toString(16);
10674 # var missingZeros = 6 - hexString.length;
10675 # var resultBuilder = ['#'];
10676 # for (var i = 0; i < missingZeros; i++) {
10677 # resultBuilder.push('0');
10678 # }
10679 # resultBuilder.push(hexString);
10680 # return resultBuilder.join('');
10681 # };
10682 #
10683 # // ...
10684 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10685 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10686 # the final pixel color is defined by the equation:
10687 #
10688 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10689 #
10690 # This means that a value of 1.0 corresponds to a solid color, whereas
10691 # a value of 0.0 corresponds to a completely transparent color. This
10692 # uses a wrapper message rather than a simple float scalar so that it is
10693 # possible to distinguish between a default value and the value being unset.
10694 # If omitted, this color object is to be rendered as a solid color
10695 # (as if the alpha value had been explicitly given with a value of 1.0).
10696 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10697 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10698 },
10699 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010700 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010701 "style": "A String", # The style of the border.
10702 },
10703 "bottom": { # A border along a cell. # The bottom border of the cell.
10704 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10705 # for simplicity of conversion to/from color representations in various
10706 # languages over compactness; for example, the fields of this representation
10707 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10708 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10709 # method in iOS; and, with just a little work, it can be easily formatted into
10710 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10711 #
10712 # Example (Java):
10713 #
10714 # import com.google.type.Color;
10715 #
10716 # // ...
10717 # public static java.awt.Color fromProto(Color protocolor) {
10718 # float alpha = protocolor.hasAlpha()
10719 # ? protocolor.getAlpha().getValue()
10720 # : 1.0;
10721 #
10722 # return new java.awt.Color(
10723 # protocolor.getRed(),
10724 # protocolor.getGreen(),
10725 # protocolor.getBlue(),
10726 # alpha);
10727 # }
10728 #
10729 # public static Color toProto(java.awt.Color color) {
10730 # float red = (float) color.getRed();
10731 # float green = (float) color.getGreen();
10732 # float blue = (float) color.getBlue();
10733 # float denominator = 255.0;
10734 # Color.Builder resultBuilder =
10735 # Color
10736 # .newBuilder()
10737 # .setRed(red / denominator)
10738 # .setGreen(green / denominator)
10739 # .setBlue(blue / denominator);
10740 # int alpha = color.getAlpha();
10741 # if (alpha != 255) {
10742 # result.setAlpha(
10743 # FloatValue
10744 # .newBuilder()
10745 # .setValue(((float) alpha) / denominator)
10746 # .build());
10747 # }
10748 # return resultBuilder.build();
10749 # }
10750 # // ...
10751 #
10752 # Example (iOS / Obj-C):
10753 #
10754 # // ...
10755 # static UIColor* fromProto(Color* protocolor) {
10756 # float red = [protocolor red];
10757 # float green = [protocolor green];
10758 # float blue = [protocolor blue];
10759 # FloatValue* alpha_wrapper = [protocolor alpha];
10760 # float alpha = 1.0;
10761 # if (alpha_wrapper != nil) {
10762 # alpha = [alpha_wrapper value];
10763 # }
10764 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10765 # }
10766 #
10767 # static Color* toProto(UIColor* color) {
10768 # CGFloat red, green, blue, alpha;
10769 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10770 # return nil;
10771 # }
10772 # Color* result = [Color alloc] init];
10773 # [result setRed:red];
10774 # [result setGreen:green];
10775 # [result setBlue:blue];
10776 # if (alpha <= 0.9999) {
10777 # [result setAlpha:floatWrapperWithValue(alpha)];
10778 # }
10779 # [result autorelease];
10780 # return result;
10781 # }
10782 # // ...
10783 #
10784 # Example (JavaScript):
10785 #
10786 # // ...
10787 #
10788 # var protoToCssColor = function(rgb_color) {
10789 # var redFrac = rgb_color.red || 0.0;
10790 # var greenFrac = rgb_color.green || 0.0;
10791 # var blueFrac = rgb_color.blue || 0.0;
10792 # var red = Math.floor(redFrac * 255);
10793 # var green = Math.floor(greenFrac * 255);
10794 # var blue = Math.floor(blueFrac * 255);
10795 #
10796 # if (!('alpha' in rgb_color)) {
10797 # return rgbToCssColor_(red, green, blue);
10798 # }
10799 #
10800 # var alphaFrac = rgb_color.alpha.value || 0.0;
10801 # var rgbParams = [red, green, blue].join(',');
10802 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10803 # };
10804 #
10805 # var rgbToCssColor_ = function(red, green, blue) {
10806 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10807 # var hexString = rgbNumber.toString(16);
10808 # var missingZeros = 6 - hexString.length;
10809 # var resultBuilder = ['#'];
10810 # for (var i = 0; i < missingZeros; i++) {
10811 # resultBuilder.push('0');
10812 # }
10813 # resultBuilder.push(hexString);
10814 # return resultBuilder.join('');
10815 # };
10816 #
10817 # // ...
10818 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10819 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10820 # the final pixel color is defined by the equation:
10821 #
10822 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10823 #
10824 # This means that a value of 1.0 corresponds to a solid color, whereas
10825 # a value of 0.0 corresponds to a completely transparent color. This
10826 # uses a wrapper message rather than a simple float scalar so that it is
10827 # possible to distinguish between a default value and the value being unset.
10828 # If omitted, this color object is to be rendered as a solid color
10829 # (as if the alpha value had been explicitly given with a value of 1.0).
10830 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10831 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10832 },
10833 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010834 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010835 "style": "A String", # The style of the border.
10836 },
10837 "left": { # A border along a cell. # The left border of the cell.
10838 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10839 # for simplicity of conversion to/from color representations in various
10840 # languages over compactness; for example, the fields of this representation
10841 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10842 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10843 # method in iOS; and, with just a little work, it can be easily formatted into
10844 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10845 #
10846 # Example (Java):
10847 #
10848 # import com.google.type.Color;
10849 #
10850 # // ...
10851 # public static java.awt.Color fromProto(Color protocolor) {
10852 # float alpha = protocolor.hasAlpha()
10853 # ? protocolor.getAlpha().getValue()
10854 # : 1.0;
10855 #
10856 # return new java.awt.Color(
10857 # protocolor.getRed(),
10858 # protocolor.getGreen(),
10859 # protocolor.getBlue(),
10860 # alpha);
10861 # }
10862 #
10863 # public static Color toProto(java.awt.Color color) {
10864 # float red = (float) color.getRed();
10865 # float green = (float) color.getGreen();
10866 # float blue = (float) color.getBlue();
10867 # float denominator = 255.0;
10868 # Color.Builder resultBuilder =
10869 # Color
10870 # .newBuilder()
10871 # .setRed(red / denominator)
10872 # .setGreen(green / denominator)
10873 # .setBlue(blue / denominator);
10874 # int alpha = color.getAlpha();
10875 # if (alpha != 255) {
10876 # result.setAlpha(
10877 # FloatValue
10878 # .newBuilder()
10879 # .setValue(((float) alpha) / denominator)
10880 # .build());
10881 # }
10882 # return resultBuilder.build();
10883 # }
10884 # // ...
10885 #
10886 # Example (iOS / Obj-C):
10887 #
10888 # // ...
10889 # static UIColor* fromProto(Color* protocolor) {
10890 # float red = [protocolor red];
10891 # float green = [protocolor green];
10892 # float blue = [protocolor blue];
10893 # FloatValue* alpha_wrapper = [protocolor alpha];
10894 # float alpha = 1.0;
10895 # if (alpha_wrapper != nil) {
10896 # alpha = [alpha_wrapper value];
10897 # }
10898 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10899 # }
10900 #
10901 # static Color* toProto(UIColor* color) {
10902 # CGFloat red, green, blue, alpha;
10903 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10904 # return nil;
10905 # }
10906 # Color* result = [Color alloc] init];
10907 # [result setRed:red];
10908 # [result setGreen:green];
10909 # [result setBlue:blue];
10910 # if (alpha <= 0.9999) {
10911 # [result setAlpha:floatWrapperWithValue(alpha)];
10912 # }
10913 # [result autorelease];
10914 # return result;
10915 # }
10916 # // ...
10917 #
10918 # Example (JavaScript):
10919 #
10920 # // ...
10921 #
10922 # var protoToCssColor = function(rgb_color) {
10923 # var redFrac = rgb_color.red || 0.0;
10924 # var greenFrac = rgb_color.green || 0.0;
10925 # var blueFrac = rgb_color.blue || 0.0;
10926 # var red = Math.floor(redFrac * 255);
10927 # var green = Math.floor(greenFrac * 255);
10928 # var blue = Math.floor(blueFrac * 255);
10929 #
10930 # if (!('alpha' in rgb_color)) {
10931 # return rgbToCssColor_(red, green, blue);
10932 # }
10933 #
10934 # var alphaFrac = rgb_color.alpha.value || 0.0;
10935 # var rgbParams = [red, green, blue].join(',');
10936 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10937 # };
10938 #
10939 # var rgbToCssColor_ = function(red, green, blue) {
10940 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10941 # var hexString = rgbNumber.toString(16);
10942 # var missingZeros = 6 - hexString.length;
10943 # var resultBuilder = ['#'];
10944 # for (var i = 0; i < missingZeros; i++) {
10945 # resultBuilder.push('0');
10946 # }
10947 # resultBuilder.push(hexString);
10948 # return resultBuilder.join('');
10949 # };
10950 #
10951 # // ...
10952 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10953 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10954 # the final pixel color is defined by the equation:
10955 #
10956 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10957 #
10958 # This means that a value of 1.0 corresponds to a solid color, whereas
10959 # a value of 0.0 corresponds to a completely transparent color. This
10960 # uses a wrapper message rather than a simple float scalar so that it is
10961 # possible to distinguish between a default value and the value being unset.
10962 # If omitted, this color object is to be rendered as a solid color
10963 # (as if the alpha value had been explicitly given with a value of 1.0).
10964 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10965 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10966 },
10967 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010968 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010969 "style": "A String", # The style of the border.
10970 },
10971 },
10972 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
10973 },
10974 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
10975 #
10976 # When writing, the new data validation rule will overwrite any prior rule.
10977 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
10978 # If true, "List" conditions will show a dropdown.
10979 "strict": True or False, # True if invalid data should be rejected.
10980 "inputMessage": "A String", # A message to show the user when adding data to the cell.
10981 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
10982 # BooleanConditions are used by conditional formatting,
10983 # data validation, and the criteria in filters.
10984 "type": "A String", # The type of condition.
10985 "values": [ # The values of the condition. The number of supported values depends
10986 # on the condition type. Some support zero values,
10987 # others one or two values,
10988 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
10989 { # The value of the condition.
10990 "relativeDate": "A String", # A relative date (based on the current date).
10991 # Valid only if the type is
10992 # DATE_BEFORE,
10993 # DATE_AFTER,
10994 # DATE_ON_OR_BEFORE or
10995 # DATE_ON_OR_AFTER.
10996 #
10997 # Relative dates are not supported in data validation.
10998 # They are supported only in conditional formatting and
10999 # conditional filters.
11000 "userEnteredValue": "A String", # A value the condition is based on.
11001 # The value will be parsed as if the user typed into a cell.
11002 # Formulas are supported (and must begin with an `=`).
11003 },
11004 ],
11005 },
11006 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011007 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
11008 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011009 # Runs start at specific indexes in the text and continue until the next
11010 # run. Properties of a run will continue unless explicitly changed
11011 # in a subsequent run (and properties of the first run will continue
11012 # the properties of the cell unless explicitly changed).
11013 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011014 # When writing, the new runs will overwrite any prior runs. When writing a
11015 # new user_entered_value, previous runs will be erased.
11016 { # A run of a text format. The format of this run continues until the start
11017 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011018 # When updating, all fields must be set.
11019 "startIndex": 42, # The character index where this run starts.
11020 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
11021 # Absent values indicate that the field isn't specified.
11022 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
11023 # for simplicity of conversion to/from color representations in various
11024 # languages over compactness; for example, the fields of this representation
11025 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11026 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11027 # method in iOS; and, with just a little work, it can be easily formatted into
11028 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11029 #
11030 # Example (Java):
11031 #
11032 # import com.google.type.Color;
11033 #
11034 # // ...
11035 # public static java.awt.Color fromProto(Color protocolor) {
11036 # float alpha = protocolor.hasAlpha()
11037 # ? protocolor.getAlpha().getValue()
11038 # : 1.0;
11039 #
11040 # return new java.awt.Color(
11041 # protocolor.getRed(),
11042 # protocolor.getGreen(),
11043 # protocolor.getBlue(),
11044 # alpha);
11045 # }
11046 #
11047 # public static Color toProto(java.awt.Color color) {
11048 # float red = (float) color.getRed();
11049 # float green = (float) color.getGreen();
11050 # float blue = (float) color.getBlue();
11051 # float denominator = 255.0;
11052 # Color.Builder resultBuilder =
11053 # Color
11054 # .newBuilder()
11055 # .setRed(red / denominator)
11056 # .setGreen(green / denominator)
11057 # .setBlue(blue / denominator);
11058 # int alpha = color.getAlpha();
11059 # if (alpha != 255) {
11060 # result.setAlpha(
11061 # FloatValue
11062 # .newBuilder()
11063 # .setValue(((float) alpha) / denominator)
11064 # .build());
11065 # }
11066 # return resultBuilder.build();
11067 # }
11068 # // ...
11069 #
11070 # Example (iOS / Obj-C):
11071 #
11072 # // ...
11073 # static UIColor* fromProto(Color* protocolor) {
11074 # float red = [protocolor red];
11075 # float green = [protocolor green];
11076 # float blue = [protocolor blue];
11077 # FloatValue* alpha_wrapper = [protocolor alpha];
11078 # float alpha = 1.0;
11079 # if (alpha_wrapper != nil) {
11080 # alpha = [alpha_wrapper value];
11081 # }
11082 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11083 # }
11084 #
11085 # static Color* toProto(UIColor* color) {
11086 # CGFloat red, green, blue, alpha;
11087 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11088 # return nil;
11089 # }
11090 # Color* result = [Color alloc] init];
11091 # [result setRed:red];
11092 # [result setGreen:green];
11093 # [result setBlue:blue];
11094 # if (alpha <= 0.9999) {
11095 # [result setAlpha:floatWrapperWithValue(alpha)];
11096 # }
11097 # [result autorelease];
11098 # return result;
11099 # }
11100 # // ...
11101 #
11102 # Example (JavaScript):
11103 #
11104 # // ...
11105 #
11106 # var protoToCssColor = function(rgb_color) {
11107 # var redFrac = rgb_color.red || 0.0;
11108 # var greenFrac = rgb_color.green || 0.0;
11109 # var blueFrac = rgb_color.blue || 0.0;
11110 # var red = Math.floor(redFrac * 255);
11111 # var green = Math.floor(greenFrac * 255);
11112 # var blue = Math.floor(blueFrac * 255);
11113 #
11114 # if (!('alpha' in rgb_color)) {
11115 # return rgbToCssColor_(red, green, blue);
11116 # }
11117 #
11118 # var alphaFrac = rgb_color.alpha.value || 0.0;
11119 # var rgbParams = [red, green, blue].join(',');
11120 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11121 # };
11122 #
11123 # var rgbToCssColor_ = function(red, green, blue) {
11124 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11125 # var hexString = rgbNumber.toString(16);
11126 # var missingZeros = 6 - hexString.length;
11127 # var resultBuilder = ['#'];
11128 # for (var i = 0; i < missingZeros; i++) {
11129 # resultBuilder.push('0');
11130 # }
11131 # resultBuilder.push(hexString);
11132 # return resultBuilder.join('');
11133 # };
11134 #
11135 # // ...
11136 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11137 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11138 # the final pixel color is defined by the equation:
11139 #
11140 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11141 #
11142 # This means that a value of 1.0 corresponds to a solid color, whereas
11143 # a value of 0.0 corresponds to a completely transparent color. This
11144 # uses a wrapper message rather than a simple float scalar so that it is
11145 # possible to distinguish between a default value and the value being unset.
11146 # If omitted, this color object is to be rendered as a solid color
11147 # (as if the alpha value had been explicitly given with a value of 1.0).
11148 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11149 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11150 },
11151 "bold": True or False, # True if the text is bold.
11152 "strikethrough": True or False, # True if the text has a strikethrough.
11153 "fontFamily": "A String", # The font family.
11154 "fontSize": 42, # The size of the font.
11155 "italic": True or False, # True if the text is italicized.
11156 "underline": True or False, # True if the text is underlined.
11157 },
11158 },
11159 ],
11160 },
11161 ],
11162 },
11163 ],
11164 "start": { # A coordinate in a sheet. # The coordinate to start writing data at.
11165 # Any number of rows and columns (including a different number of
11166 # columns per row) may be written.
11167 # All indexes are zero-based.
11168 "rowIndex": 42, # The row index of the coordinate.
11169 "columnIndex": 42, # The column index of the coordinate.
11170 "sheetId": 42, # The sheet this coordinate is on.
11171 },
11172 },
11173 "autoFill": { # Fills in more data based on existing data. # Automatically fills in more data based on existing data.
11174 "useAlternateSeries": True or False, # True if we should generate data with the "alternate" series.
11175 # This differs based on the type and amount of source data.
11176 "range": { # A range on a sheet. # The range to autofill. This will examine the range and detect
11177 # the location that has data and automatically fill that data
11178 # in to the rest of the range.
11179 # All indexes are zero-based.
11180 # Indexes are half open, e.g the start index is inclusive
11181 # and the end index is exclusive -- [start_index, end_index).
11182 # Missing indexes indicate the range is unbounded on that side.
11183 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011184 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011185 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011186 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011187 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011188 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011189 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011190 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011191 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011192 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011193 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011194 # `Sheet1!A:B == sheet_id: 0,
11195 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011196 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011197 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011198 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011199 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011200 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011201 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011202 #
11203 # The start index must always be less than or equal to the end index.
11204 # If the start index equals the end index, then the range is empty.
11205 # Empty ranges are typically not meaningful and are usually rendered in the
11206 # UI as `#REF!`.
11207 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11208 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11209 "sheetId": 42, # The sheet this range is on.
11210 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11211 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11212 },
11213 "sourceAndDestination": { # A combination of a source range and how to extend that source. # The source and destination areas to autofill.
11214 # This explicitly lists the source of the autofill and where to
11215 # extend that data.
11216 "source": { # A range on a sheet. # The location of the data to use as the source of the autofill.
11217 # All indexes are zero-based.
11218 # Indexes are half open, e.g the start index is inclusive
11219 # and the end index is exclusive -- [start_index, end_index).
11220 # Missing indexes indicate the range is unbounded on that side.
11221 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011222 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011223 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011224 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011225 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011226 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011227 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011228 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011229 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011230 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011231 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011232 # `Sheet1!A:B == sheet_id: 0,
11233 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011234 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011235 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011236 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011237 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011238 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011239 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011240 #
11241 # The start index must always be less than or equal to the end index.
11242 # If the start index equals the end index, then the range is empty.
11243 # Empty ranges are typically not meaningful and are usually rendered in the
11244 # UI as `#REF!`.
11245 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11246 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11247 "sheetId": 42, # The sheet this range is on.
11248 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11249 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11250 },
11251 "dimension": "A String", # The dimension that data should be filled into.
11252 "fillLength": 42, # The number of rows or columns that data should be filled into.
11253 # Positive numbers expand beyond the last row or last column
11254 # of the source. Negative numbers expand before the first row
11255 # or first column of the source.
11256 },
11257 },
11258 "appendDimension": { # Appends rows or columns to the end of a sheet. # Appends dimensions to the end of a sheet.
11259 "length": 42, # The number of rows or columns to append.
11260 "sheetId": 42, # The sheet to append rows or columns to.
11261 "dimension": "A String", # Whether rows or columns should be appended.
11262 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080011263 "updateBanding": { # Updates properties of the supplied banded range. # Updates a banded range
11264 "fields": "A String", # The fields that should be updated. At least one field must be specified.
11265 # The root `bandedRange` is implied and should not be specified.
11266 # A single `"*"` can be used as short-hand for listing every field.
11267 "bandedRange": { # A banded (alternating colors) range in a sheet. # The banded range to update with the new properties.
11268 "range": { # A range on a sheet. # The range over which these properties are applied.
11269 # All indexes are zero-based.
11270 # Indexes are half open, e.g the start index is inclusive
11271 # and the end index is exclusive -- [start_index, end_index).
11272 # Missing indexes indicate the range is unbounded on that side.
11273 #
11274 # For example, if `"Sheet1"` is sheet ID 0, then:
11275 #
11276 # `Sheet1!A1:A1 == sheet_id: 0,
11277 # start_row_index: 0, end_row_index: 1,
11278 # start_column_index: 0, end_column_index: 1`
11279 #
11280 # `Sheet1!A3:B4 == sheet_id: 0,
11281 # start_row_index: 2, end_row_index: 4,
11282 # start_column_index: 0, end_column_index: 2`
11283 #
11284 # `Sheet1!A:B == sheet_id: 0,
11285 # start_column_index: 0, end_column_index: 2`
11286 #
11287 # `Sheet1!A5:B == sheet_id: 0,
11288 # start_row_index: 4,
11289 # start_column_index: 0, end_column_index: 2`
11290 #
11291 # `Sheet1 == sheet_id:0`
11292 #
11293 # The start index must always be less than or equal to the end index.
11294 # If the start index equals the end index, then the range is empty.
11295 # Empty ranges are typically not meaningful and are usually rendered in the
11296 # UI as `#REF!`.
11297 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
11298 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
11299 "sheetId": 42, # The sheet this range is on.
11300 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
11301 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
11302 },
11303 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
11304 # by-column basis throughout all the columns in the range. At least one of
11305 # row_properties or column_properties must be specified.
11306 # BandedRange.row_properties and BandedRange.column_properties are
11307 # set, the fill colors are applied to cells according to the following rules:
11308 #
11309 # * header_color and footer_color take priority over band colors.
11310 # * first_band_color takes priority over second_band_color.
11311 # * row_properties takes priority over column_properties.
11312 #
11313 # For example, the first row color takes priority over the first column
11314 # color, but the first column color takes priority over the second row color.
11315 # Similarly, the row header takes priority over the column header in the
11316 # top left cell, but the column header takes priority over the first row
11317 # color if the row header is not set.
11318 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
11319 # for simplicity of conversion to/from color representations in various
11320 # languages over compactness; for example, the fields of this representation
11321 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11322 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11323 # method in iOS; and, with just a little work, it can be easily formatted into
11324 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11325 #
11326 # Example (Java):
11327 #
11328 # import com.google.type.Color;
11329 #
11330 # // ...
11331 # public static java.awt.Color fromProto(Color protocolor) {
11332 # float alpha = protocolor.hasAlpha()
11333 # ? protocolor.getAlpha().getValue()
11334 # : 1.0;
11335 #
11336 # return new java.awt.Color(
11337 # protocolor.getRed(),
11338 # protocolor.getGreen(),
11339 # protocolor.getBlue(),
11340 # alpha);
11341 # }
11342 #
11343 # public static Color toProto(java.awt.Color color) {
11344 # float red = (float) color.getRed();
11345 # float green = (float) color.getGreen();
11346 # float blue = (float) color.getBlue();
11347 # float denominator = 255.0;
11348 # Color.Builder resultBuilder =
11349 # Color
11350 # .newBuilder()
11351 # .setRed(red / denominator)
11352 # .setGreen(green / denominator)
11353 # .setBlue(blue / denominator);
11354 # int alpha = color.getAlpha();
11355 # if (alpha != 255) {
11356 # result.setAlpha(
11357 # FloatValue
11358 # .newBuilder()
11359 # .setValue(((float) alpha) / denominator)
11360 # .build());
11361 # }
11362 # return resultBuilder.build();
11363 # }
11364 # // ...
11365 #
11366 # Example (iOS / Obj-C):
11367 #
11368 # // ...
11369 # static UIColor* fromProto(Color* protocolor) {
11370 # float red = [protocolor red];
11371 # float green = [protocolor green];
11372 # float blue = [protocolor blue];
11373 # FloatValue* alpha_wrapper = [protocolor alpha];
11374 # float alpha = 1.0;
11375 # if (alpha_wrapper != nil) {
11376 # alpha = [alpha_wrapper value];
11377 # }
11378 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11379 # }
11380 #
11381 # static Color* toProto(UIColor* color) {
11382 # CGFloat red, green, blue, alpha;
11383 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11384 # return nil;
11385 # }
11386 # Color* result = [Color alloc] init];
11387 # [result setRed:red];
11388 # [result setGreen:green];
11389 # [result setBlue:blue];
11390 # if (alpha <= 0.9999) {
11391 # [result setAlpha:floatWrapperWithValue(alpha)];
11392 # }
11393 # [result autorelease];
11394 # return result;
11395 # }
11396 # // ...
11397 #
11398 # Example (JavaScript):
11399 #
11400 # // ...
11401 #
11402 # var protoToCssColor = function(rgb_color) {
11403 # var redFrac = rgb_color.red || 0.0;
11404 # var greenFrac = rgb_color.green || 0.0;
11405 # var blueFrac = rgb_color.blue || 0.0;
11406 # var red = Math.floor(redFrac * 255);
11407 # var green = Math.floor(greenFrac * 255);
11408 # var blue = Math.floor(blueFrac * 255);
11409 #
11410 # if (!('alpha' in rgb_color)) {
11411 # return rgbToCssColor_(red, green, blue);
11412 # }
11413 #
11414 # var alphaFrac = rgb_color.alpha.value || 0.0;
11415 # var rgbParams = [red, green, blue].join(',');
11416 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11417 # };
11418 #
11419 # var rgbToCssColor_ = function(red, green, blue) {
11420 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11421 # var hexString = rgbNumber.toString(16);
11422 # var missingZeros = 6 - hexString.length;
11423 # var resultBuilder = ['#'];
11424 # for (var i = 0; i < missingZeros; i++) {
11425 # resultBuilder.push('0');
11426 # }
11427 # resultBuilder.push(hexString);
11428 # return resultBuilder.join('');
11429 # };
11430 #
11431 # // ...
11432 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11433 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11434 # the final pixel color is defined by the equation:
11435 #
11436 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11437 #
11438 # This means that a value of 1.0 corresponds to a solid color, whereas
11439 # a value of 0.0 corresponds to a completely transparent color. This
11440 # uses a wrapper message rather than a simple float scalar so that it is
11441 # possible to distinguish between a default value and the value being unset.
11442 # If omitted, this color object is to be rendered as a solid color
11443 # (as if the alpha value had been explicitly given with a value of 1.0).
11444 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11445 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11446 },
11447 "headerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the first row or column. If this field is set, the first
11448 # row or column will be filled with this color and the colors will
11449 # alternate between first_band_color and second_band_color starting
11450 # from the second row or column. Otherwise, the first row or column will be
11451 # filled with first_band_color and the colors will proceed to alternate
11452 # as they normally would.
11453 # for simplicity of conversion to/from color representations in various
11454 # languages over compactness; for example, the fields of this representation
11455 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11456 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11457 # method in iOS; and, with just a little work, it can be easily formatted into
11458 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11459 #
11460 # Example (Java):
11461 #
11462 # import com.google.type.Color;
11463 #
11464 # // ...
11465 # public static java.awt.Color fromProto(Color protocolor) {
11466 # float alpha = protocolor.hasAlpha()
11467 # ? protocolor.getAlpha().getValue()
11468 # : 1.0;
11469 #
11470 # return new java.awt.Color(
11471 # protocolor.getRed(),
11472 # protocolor.getGreen(),
11473 # protocolor.getBlue(),
11474 # alpha);
11475 # }
11476 #
11477 # public static Color toProto(java.awt.Color color) {
11478 # float red = (float) color.getRed();
11479 # float green = (float) color.getGreen();
11480 # float blue = (float) color.getBlue();
11481 # float denominator = 255.0;
11482 # Color.Builder resultBuilder =
11483 # Color
11484 # .newBuilder()
11485 # .setRed(red / denominator)
11486 # .setGreen(green / denominator)
11487 # .setBlue(blue / denominator);
11488 # int alpha = color.getAlpha();
11489 # if (alpha != 255) {
11490 # result.setAlpha(
11491 # FloatValue
11492 # .newBuilder()
11493 # .setValue(((float) alpha) / denominator)
11494 # .build());
11495 # }
11496 # return resultBuilder.build();
11497 # }
11498 # // ...
11499 #
11500 # Example (iOS / Obj-C):
11501 #
11502 # // ...
11503 # static UIColor* fromProto(Color* protocolor) {
11504 # float red = [protocolor red];
11505 # float green = [protocolor green];
11506 # float blue = [protocolor blue];
11507 # FloatValue* alpha_wrapper = [protocolor alpha];
11508 # float alpha = 1.0;
11509 # if (alpha_wrapper != nil) {
11510 # alpha = [alpha_wrapper value];
11511 # }
11512 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11513 # }
11514 #
11515 # static Color* toProto(UIColor* color) {
11516 # CGFloat red, green, blue, alpha;
11517 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11518 # return nil;
11519 # }
11520 # Color* result = [Color alloc] init];
11521 # [result setRed:red];
11522 # [result setGreen:green];
11523 # [result setBlue:blue];
11524 # if (alpha <= 0.9999) {
11525 # [result setAlpha:floatWrapperWithValue(alpha)];
11526 # }
11527 # [result autorelease];
11528 # return result;
11529 # }
11530 # // ...
11531 #
11532 # Example (JavaScript):
11533 #
11534 # // ...
11535 #
11536 # var protoToCssColor = function(rgb_color) {
11537 # var redFrac = rgb_color.red || 0.0;
11538 # var greenFrac = rgb_color.green || 0.0;
11539 # var blueFrac = rgb_color.blue || 0.0;
11540 # var red = Math.floor(redFrac * 255);
11541 # var green = Math.floor(greenFrac * 255);
11542 # var blue = Math.floor(blueFrac * 255);
11543 #
11544 # if (!('alpha' in rgb_color)) {
11545 # return rgbToCssColor_(red, green, blue);
11546 # }
11547 #
11548 # var alphaFrac = rgb_color.alpha.value || 0.0;
11549 # var rgbParams = [red, green, blue].join(',');
11550 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11551 # };
11552 #
11553 # var rgbToCssColor_ = function(red, green, blue) {
11554 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11555 # var hexString = rgbNumber.toString(16);
11556 # var missingZeros = 6 - hexString.length;
11557 # var resultBuilder = ['#'];
11558 # for (var i = 0; i < missingZeros; i++) {
11559 # resultBuilder.push('0');
11560 # }
11561 # resultBuilder.push(hexString);
11562 # return resultBuilder.join('');
11563 # };
11564 #
11565 # // ...
11566 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11567 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11568 # the final pixel color is defined by the equation:
11569 #
11570 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11571 #
11572 # This means that a value of 1.0 corresponds to a solid color, whereas
11573 # a value of 0.0 corresponds to a completely transparent color. This
11574 # uses a wrapper message rather than a simple float scalar so that it is
11575 # possible to distinguish between a default value and the value being unset.
11576 # If omitted, this color object is to be rendered as a solid color
11577 # (as if the alpha value had been explicitly given with a value of 1.0).
11578 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11579 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11580 },
11581 "footerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the last row or column. If this field is not set, the last
11582 # row or column will be filled with either first_band_color or
11583 # second_band_color, depending on the color of the previous row or
11584 # column.
11585 # for simplicity of conversion to/from color representations in various
11586 # languages over compactness; for example, the fields of this representation
11587 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11588 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11589 # method in iOS; and, with just a little work, it can be easily formatted into
11590 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11591 #
11592 # Example (Java):
11593 #
11594 # import com.google.type.Color;
11595 #
11596 # // ...
11597 # public static java.awt.Color fromProto(Color protocolor) {
11598 # float alpha = protocolor.hasAlpha()
11599 # ? protocolor.getAlpha().getValue()
11600 # : 1.0;
11601 #
11602 # return new java.awt.Color(
11603 # protocolor.getRed(),
11604 # protocolor.getGreen(),
11605 # protocolor.getBlue(),
11606 # alpha);
11607 # }
11608 #
11609 # public static Color toProto(java.awt.Color color) {
11610 # float red = (float) color.getRed();
11611 # float green = (float) color.getGreen();
11612 # float blue = (float) color.getBlue();
11613 # float denominator = 255.0;
11614 # Color.Builder resultBuilder =
11615 # Color
11616 # .newBuilder()
11617 # .setRed(red / denominator)
11618 # .setGreen(green / denominator)
11619 # .setBlue(blue / denominator);
11620 # int alpha = color.getAlpha();
11621 # if (alpha != 255) {
11622 # result.setAlpha(
11623 # FloatValue
11624 # .newBuilder()
11625 # .setValue(((float) alpha) / denominator)
11626 # .build());
11627 # }
11628 # return resultBuilder.build();
11629 # }
11630 # // ...
11631 #
11632 # Example (iOS / Obj-C):
11633 #
11634 # // ...
11635 # static UIColor* fromProto(Color* protocolor) {
11636 # float red = [protocolor red];
11637 # float green = [protocolor green];
11638 # float blue = [protocolor blue];
11639 # FloatValue* alpha_wrapper = [protocolor alpha];
11640 # float alpha = 1.0;
11641 # if (alpha_wrapper != nil) {
11642 # alpha = [alpha_wrapper value];
11643 # }
11644 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11645 # }
11646 #
11647 # static Color* toProto(UIColor* color) {
11648 # CGFloat red, green, blue, alpha;
11649 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11650 # return nil;
11651 # }
11652 # Color* result = [Color alloc] init];
11653 # [result setRed:red];
11654 # [result setGreen:green];
11655 # [result setBlue:blue];
11656 # if (alpha <= 0.9999) {
11657 # [result setAlpha:floatWrapperWithValue(alpha)];
11658 # }
11659 # [result autorelease];
11660 # return result;
11661 # }
11662 # // ...
11663 #
11664 # Example (JavaScript):
11665 #
11666 # // ...
11667 #
11668 # var protoToCssColor = function(rgb_color) {
11669 # var redFrac = rgb_color.red || 0.0;
11670 # var greenFrac = rgb_color.green || 0.0;
11671 # var blueFrac = rgb_color.blue || 0.0;
11672 # var red = Math.floor(redFrac * 255);
11673 # var green = Math.floor(greenFrac * 255);
11674 # var blue = Math.floor(blueFrac * 255);
11675 #
11676 # if (!('alpha' in rgb_color)) {
11677 # return rgbToCssColor_(red, green, blue);
11678 # }
11679 #
11680 # var alphaFrac = rgb_color.alpha.value || 0.0;
11681 # var rgbParams = [red, green, blue].join(',');
11682 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11683 # };
11684 #
11685 # var rgbToCssColor_ = function(red, green, blue) {
11686 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11687 # var hexString = rgbNumber.toString(16);
11688 # var missingZeros = 6 - hexString.length;
11689 # var resultBuilder = ['#'];
11690 # for (var i = 0; i < missingZeros; i++) {
11691 # resultBuilder.push('0');
11692 # }
11693 # resultBuilder.push(hexString);
11694 # return resultBuilder.join('');
11695 # };
11696 #
11697 # // ...
11698 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11699 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11700 # the final pixel color is defined by the equation:
11701 #
11702 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11703 #
11704 # This means that a value of 1.0 corresponds to a solid color, whereas
11705 # a value of 0.0 corresponds to a completely transparent color. This
11706 # uses a wrapper message rather than a simple float scalar so that it is
11707 # possible to distinguish between a default value and the value being unset.
11708 # If omitted, this color object is to be rendered as a solid color
11709 # (as if the alpha value had been explicitly given with a value of 1.0).
11710 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11711 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11712 },
11713 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
11714 # for simplicity of conversion to/from color representations in various
11715 # languages over compactness; for example, the fields of this representation
11716 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11717 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11718 # method in iOS; and, with just a little work, it can be easily formatted into
11719 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11720 #
11721 # Example (Java):
11722 #
11723 # import com.google.type.Color;
11724 #
11725 # // ...
11726 # public static java.awt.Color fromProto(Color protocolor) {
11727 # float alpha = protocolor.hasAlpha()
11728 # ? protocolor.getAlpha().getValue()
11729 # : 1.0;
11730 #
11731 # return new java.awt.Color(
11732 # protocolor.getRed(),
11733 # protocolor.getGreen(),
11734 # protocolor.getBlue(),
11735 # alpha);
11736 # }
11737 #
11738 # public static Color toProto(java.awt.Color color) {
11739 # float red = (float) color.getRed();
11740 # float green = (float) color.getGreen();
11741 # float blue = (float) color.getBlue();
11742 # float denominator = 255.0;
11743 # Color.Builder resultBuilder =
11744 # Color
11745 # .newBuilder()
11746 # .setRed(red / denominator)
11747 # .setGreen(green / denominator)
11748 # .setBlue(blue / denominator);
11749 # int alpha = color.getAlpha();
11750 # if (alpha != 255) {
11751 # result.setAlpha(
11752 # FloatValue
11753 # .newBuilder()
11754 # .setValue(((float) alpha) / denominator)
11755 # .build());
11756 # }
11757 # return resultBuilder.build();
11758 # }
11759 # // ...
11760 #
11761 # Example (iOS / Obj-C):
11762 #
11763 # // ...
11764 # static UIColor* fromProto(Color* protocolor) {
11765 # float red = [protocolor red];
11766 # float green = [protocolor green];
11767 # float blue = [protocolor blue];
11768 # FloatValue* alpha_wrapper = [protocolor alpha];
11769 # float alpha = 1.0;
11770 # if (alpha_wrapper != nil) {
11771 # alpha = [alpha_wrapper value];
11772 # }
11773 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11774 # }
11775 #
11776 # static Color* toProto(UIColor* color) {
11777 # CGFloat red, green, blue, alpha;
11778 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11779 # return nil;
11780 # }
11781 # Color* result = [Color alloc] init];
11782 # [result setRed:red];
11783 # [result setGreen:green];
11784 # [result setBlue:blue];
11785 # if (alpha <= 0.9999) {
11786 # [result setAlpha:floatWrapperWithValue(alpha)];
11787 # }
11788 # [result autorelease];
11789 # return result;
11790 # }
11791 # // ...
11792 #
11793 # Example (JavaScript):
11794 #
11795 # // ...
11796 #
11797 # var protoToCssColor = function(rgb_color) {
11798 # var redFrac = rgb_color.red || 0.0;
11799 # var greenFrac = rgb_color.green || 0.0;
11800 # var blueFrac = rgb_color.blue || 0.0;
11801 # var red = Math.floor(redFrac * 255);
11802 # var green = Math.floor(greenFrac * 255);
11803 # var blue = Math.floor(blueFrac * 255);
11804 #
11805 # if (!('alpha' in rgb_color)) {
11806 # return rgbToCssColor_(red, green, blue);
11807 # }
11808 #
11809 # var alphaFrac = rgb_color.alpha.value || 0.0;
11810 # var rgbParams = [red, green, blue].join(',');
11811 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11812 # };
11813 #
11814 # var rgbToCssColor_ = function(red, green, blue) {
11815 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11816 # var hexString = rgbNumber.toString(16);
11817 # var missingZeros = 6 - hexString.length;
11818 # var resultBuilder = ['#'];
11819 # for (var i = 0; i < missingZeros; i++) {
11820 # resultBuilder.push('0');
11821 # }
11822 # resultBuilder.push(hexString);
11823 # return resultBuilder.join('');
11824 # };
11825 #
11826 # // ...
11827 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11828 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11829 # the final pixel color is defined by the equation:
11830 #
11831 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11832 #
11833 # This means that a value of 1.0 corresponds to a solid color, whereas
11834 # a value of 0.0 corresponds to a completely transparent color. This
11835 # uses a wrapper message rather than a simple float scalar so that it is
11836 # possible to distinguish between a default value and the value being unset.
11837 # If omitted, this color object is to be rendered as a solid color
11838 # (as if the alpha value had been explicitly given with a value of 1.0).
11839 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11840 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11841 },
11842 },
11843 "rowProperties": { # Properties referring a single dimension (either row or column). If both # Properties for row bands. These properties will be applied on a row-by-row
11844 # basis throughout all the rows in the range. At least one of
11845 # row_properties or column_properties must be specified.
11846 # BandedRange.row_properties and BandedRange.column_properties are
11847 # set, the fill colors are applied to cells according to the following rules:
11848 #
11849 # * header_color and footer_color take priority over band colors.
11850 # * first_band_color takes priority over second_band_color.
11851 # * row_properties takes priority over column_properties.
11852 #
11853 # For example, the first row color takes priority over the first column
11854 # color, but the first column color takes priority over the second row color.
11855 # Similarly, the row header takes priority over the column header in the
11856 # top left cell, but the column header takes priority over the first row
11857 # color if the row header is not set.
11858 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
11859 # for simplicity of conversion to/from color representations in various
11860 # languages over compactness; for example, the fields of this representation
11861 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11862 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11863 # method in iOS; and, with just a little work, it can be easily formatted into
11864 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11865 #
11866 # Example (Java):
11867 #
11868 # import com.google.type.Color;
11869 #
11870 # // ...
11871 # public static java.awt.Color fromProto(Color protocolor) {
11872 # float alpha = protocolor.hasAlpha()
11873 # ? protocolor.getAlpha().getValue()
11874 # : 1.0;
11875 #
11876 # return new java.awt.Color(
11877 # protocolor.getRed(),
11878 # protocolor.getGreen(),
11879 # protocolor.getBlue(),
11880 # alpha);
11881 # }
11882 #
11883 # public static Color toProto(java.awt.Color color) {
11884 # float red = (float) color.getRed();
11885 # float green = (float) color.getGreen();
11886 # float blue = (float) color.getBlue();
11887 # float denominator = 255.0;
11888 # Color.Builder resultBuilder =
11889 # Color
11890 # .newBuilder()
11891 # .setRed(red / denominator)
11892 # .setGreen(green / denominator)
11893 # .setBlue(blue / denominator);
11894 # int alpha = color.getAlpha();
11895 # if (alpha != 255) {
11896 # result.setAlpha(
11897 # FloatValue
11898 # .newBuilder()
11899 # .setValue(((float) alpha) / denominator)
11900 # .build());
11901 # }
11902 # return resultBuilder.build();
11903 # }
11904 # // ...
11905 #
11906 # Example (iOS / Obj-C):
11907 #
11908 # // ...
11909 # static UIColor* fromProto(Color* protocolor) {
11910 # float red = [protocolor red];
11911 # float green = [protocolor green];
11912 # float blue = [protocolor blue];
11913 # FloatValue* alpha_wrapper = [protocolor alpha];
11914 # float alpha = 1.0;
11915 # if (alpha_wrapper != nil) {
11916 # alpha = [alpha_wrapper value];
11917 # }
11918 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11919 # }
11920 #
11921 # static Color* toProto(UIColor* color) {
11922 # CGFloat red, green, blue, alpha;
11923 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11924 # return nil;
11925 # }
11926 # Color* result = [Color alloc] init];
11927 # [result setRed:red];
11928 # [result setGreen:green];
11929 # [result setBlue:blue];
11930 # if (alpha <= 0.9999) {
11931 # [result setAlpha:floatWrapperWithValue(alpha)];
11932 # }
11933 # [result autorelease];
11934 # return result;
11935 # }
11936 # // ...
11937 #
11938 # Example (JavaScript):
11939 #
11940 # // ...
11941 #
11942 # var protoToCssColor = function(rgb_color) {
11943 # var redFrac = rgb_color.red || 0.0;
11944 # var greenFrac = rgb_color.green || 0.0;
11945 # var blueFrac = rgb_color.blue || 0.0;
11946 # var red = Math.floor(redFrac * 255);
11947 # var green = Math.floor(greenFrac * 255);
11948 # var blue = Math.floor(blueFrac * 255);
11949 #
11950 # if (!('alpha' in rgb_color)) {
11951 # return rgbToCssColor_(red, green, blue);
11952 # }
11953 #
11954 # var alphaFrac = rgb_color.alpha.value || 0.0;
11955 # var rgbParams = [red, green, blue].join(',');
11956 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11957 # };
11958 #
11959 # var rgbToCssColor_ = function(red, green, blue) {
11960 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11961 # var hexString = rgbNumber.toString(16);
11962 # var missingZeros = 6 - hexString.length;
11963 # var resultBuilder = ['#'];
11964 # for (var i = 0; i < missingZeros; i++) {
11965 # resultBuilder.push('0');
11966 # }
11967 # resultBuilder.push(hexString);
11968 # return resultBuilder.join('');
11969 # };
11970 #
11971 # // ...
11972 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11973 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11974 # the final pixel color is defined by the equation:
11975 #
11976 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11977 #
11978 # This means that a value of 1.0 corresponds to a solid color, whereas
11979 # a value of 0.0 corresponds to a completely transparent color. This
11980 # uses a wrapper message rather than a simple float scalar so that it is
11981 # possible to distinguish between a default value and the value being unset.
11982 # If omitted, this color object is to be rendered as a solid color
11983 # (as if the alpha value had been explicitly given with a value of 1.0).
11984 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11985 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11986 },
11987 "headerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the first row or column. If this field is set, the first
11988 # row or column will be filled with this color and the colors will
11989 # alternate between first_band_color and second_band_color starting
11990 # from the second row or column. Otherwise, the first row or column will be
11991 # filled with first_band_color and the colors will proceed to alternate
11992 # as they normally would.
11993 # for simplicity of conversion to/from color representations in various
11994 # languages over compactness; for example, the fields of this representation
11995 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11996 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11997 # method in iOS; and, with just a little work, it can be easily formatted into
11998 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11999 #
12000 # Example (Java):
12001 #
12002 # import com.google.type.Color;
12003 #
12004 # // ...
12005 # public static java.awt.Color fromProto(Color protocolor) {
12006 # float alpha = protocolor.hasAlpha()
12007 # ? protocolor.getAlpha().getValue()
12008 # : 1.0;
12009 #
12010 # return new java.awt.Color(
12011 # protocolor.getRed(),
12012 # protocolor.getGreen(),
12013 # protocolor.getBlue(),
12014 # alpha);
12015 # }
12016 #
12017 # public static Color toProto(java.awt.Color color) {
12018 # float red = (float) color.getRed();
12019 # float green = (float) color.getGreen();
12020 # float blue = (float) color.getBlue();
12021 # float denominator = 255.0;
12022 # Color.Builder resultBuilder =
12023 # Color
12024 # .newBuilder()
12025 # .setRed(red / denominator)
12026 # .setGreen(green / denominator)
12027 # .setBlue(blue / denominator);
12028 # int alpha = color.getAlpha();
12029 # if (alpha != 255) {
12030 # result.setAlpha(
12031 # FloatValue
12032 # .newBuilder()
12033 # .setValue(((float) alpha) / denominator)
12034 # .build());
12035 # }
12036 # return resultBuilder.build();
12037 # }
12038 # // ...
12039 #
12040 # Example (iOS / Obj-C):
12041 #
12042 # // ...
12043 # static UIColor* fromProto(Color* protocolor) {
12044 # float red = [protocolor red];
12045 # float green = [protocolor green];
12046 # float blue = [protocolor blue];
12047 # FloatValue* alpha_wrapper = [protocolor alpha];
12048 # float alpha = 1.0;
12049 # if (alpha_wrapper != nil) {
12050 # alpha = [alpha_wrapper value];
12051 # }
12052 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12053 # }
12054 #
12055 # static Color* toProto(UIColor* color) {
12056 # CGFloat red, green, blue, alpha;
12057 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12058 # return nil;
12059 # }
12060 # Color* result = [Color alloc] init];
12061 # [result setRed:red];
12062 # [result setGreen:green];
12063 # [result setBlue:blue];
12064 # if (alpha <= 0.9999) {
12065 # [result setAlpha:floatWrapperWithValue(alpha)];
12066 # }
12067 # [result autorelease];
12068 # return result;
12069 # }
12070 # // ...
12071 #
12072 # Example (JavaScript):
12073 #
12074 # // ...
12075 #
12076 # var protoToCssColor = function(rgb_color) {
12077 # var redFrac = rgb_color.red || 0.0;
12078 # var greenFrac = rgb_color.green || 0.0;
12079 # var blueFrac = rgb_color.blue || 0.0;
12080 # var red = Math.floor(redFrac * 255);
12081 # var green = Math.floor(greenFrac * 255);
12082 # var blue = Math.floor(blueFrac * 255);
12083 #
12084 # if (!('alpha' in rgb_color)) {
12085 # return rgbToCssColor_(red, green, blue);
12086 # }
12087 #
12088 # var alphaFrac = rgb_color.alpha.value || 0.0;
12089 # var rgbParams = [red, green, blue].join(',');
12090 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12091 # };
12092 #
12093 # var rgbToCssColor_ = function(red, green, blue) {
12094 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12095 # var hexString = rgbNumber.toString(16);
12096 # var missingZeros = 6 - hexString.length;
12097 # var resultBuilder = ['#'];
12098 # for (var i = 0; i < missingZeros; i++) {
12099 # resultBuilder.push('0');
12100 # }
12101 # resultBuilder.push(hexString);
12102 # return resultBuilder.join('');
12103 # };
12104 #
12105 # // ...
12106 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12107 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12108 # the final pixel color is defined by the equation:
12109 #
12110 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12111 #
12112 # This means that a value of 1.0 corresponds to a solid color, whereas
12113 # a value of 0.0 corresponds to a completely transparent color. This
12114 # uses a wrapper message rather than a simple float scalar so that it is
12115 # possible to distinguish between a default value and the value being unset.
12116 # If omitted, this color object is to be rendered as a solid color
12117 # (as if the alpha value had been explicitly given with a value of 1.0).
12118 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12119 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12120 },
12121 "footerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the last row or column. If this field is not set, the last
12122 # row or column will be filled with either first_band_color or
12123 # second_band_color, depending on the color of the previous row or
12124 # column.
12125 # for simplicity of conversion to/from color representations in various
12126 # languages over compactness; for example, the fields of this representation
12127 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12128 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12129 # method in iOS; and, with just a little work, it can be easily formatted into
12130 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12131 #
12132 # Example (Java):
12133 #
12134 # import com.google.type.Color;
12135 #
12136 # // ...
12137 # public static java.awt.Color fromProto(Color protocolor) {
12138 # float alpha = protocolor.hasAlpha()
12139 # ? protocolor.getAlpha().getValue()
12140 # : 1.0;
12141 #
12142 # return new java.awt.Color(
12143 # protocolor.getRed(),
12144 # protocolor.getGreen(),
12145 # protocolor.getBlue(),
12146 # alpha);
12147 # }
12148 #
12149 # public static Color toProto(java.awt.Color color) {
12150 # float red = (float) color.getRed();
12151 # float green = (float) color.getGreen();
12152 # float blue = (float) color.getBlue();
12153 # float denominator = 255.0;
12154 # Color.Builder resultBuilder =
12155 # Color
12156 # .newBuilder()
12157 # .setRed(red / denominator)
12158 # .setGreen(green / denominator)
12159 # .setBlue(blue / denominator);
12160 # int alpha = color.getAlpha();
12161 # if (alpha != 255) {
12162 # result.setAlpha(
12163 # FloatValue
12164 # .newBuilder()
12165 # .setValue(((float) alpha) / denominator)
12166 # .build());
12167 # }
12168 # return resultBuilder.build();
12169 # }
12170 # // ...
12171 #
12172 # Example (iOS / Obj-C):
12173 #
12174 # // ...
12175 # static UIColor* fromProto(Color* protocolor) {
12176 # float red = [protocolor red];
12177 # float green = [protocolor green];
12178 # float blue = [protocolor blue];
12179 # FloatValue* alpha_wrapper = [protocolor alpha];
12180 # float alpha = 1.0;
12181 # if (alpha_wrapper != nil) {
12182 # alpha = [alpha_wrapper value];
12183 # }
12184 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12185 # }
12186 #
12187 # static Color* toProto(UIColor* color) {
12188 # CGFloat red, green, blue, alpha;
12189 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12190 # return nil;
12191 # }
12192 # Color* result = [Color alloc] init];
12193 # [result setRed:red];
12194 # [result setGreen:green];
12195 # [result setBlue:blue];
12196 # if (alpha <= 0.9999) {
12197 # [result setAlpha:floatWrapperWithValue(alpha)];
12198 # }
12199 # [result autorelease];
12200 # return result;
12201 # }
12202 # // ...
12203 #
12204 # Example (JavaScript):
12205 #
12206 # // ...
12207 #
12208 # var protoToCssColor = function(rgb_color) {
12209 # var redFrac = rgb_color.red || 0.0;
12210 # var greenFrac = rgb_color.green || 0.0;
12211 # var blueFrac = rgb_color.blue || 0.0;
12212 # var red = Math.floor(redFrac * 255);
12213 # var green = Math.floor(greenFrac * 255);
12214 # var blue = Math.floor(blueFrac * 255);
12215 #
12216 # if (!('alpha' in rgb_color)) {
12217 # return rgbToCssColor_(red, green, blue);
12218 # }
12219 #
12220 # var alphaFrac = rgb_color.alpha.value || 0.0;
12221 # var rgbParams = [red, green, blue].join(',');
12222 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12223 # };
12224 #
12225 # var rgbToCssColor_ = function(red, green, blue) {
12226 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12227 # var hexString = rgbNumber.toString(16);
12228 # var missingZeros = 6 - hexString.length;
12229 # var resultBuilder = ['#'];
12230 # for (var i = 0; i < missingZeros; i++) {
12231 # resultBuilder.push('0');
12232 # }
12233 # resultBuilder.push(hexString);
12234 # return resultBuilder.join('');
12235 # };
12236 #
12237 # // ...
12238 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12239 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12240 # the final pixel color is defined by the equation:
12241 #
12242 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12243 #
12244 # This means that a value of 1.0 corresponds to a solid color, whereas
12245 # a value of 0.0 corresponds to a completely transparent color. This
12246 # uses a wrapper message rather than a simple float scalar so that it is
12247 # possible to distinguish between a default value and the value being unset.
12248 # If omitted, this color object is to be rendered as a solid color
12249 # (as if the alpha value had been explicitly given with a value of 1.0).
12250 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12251 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12252 },
12253 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
12254 # for simplicity of conversion to/from color representations in various
12255 # languages over compactness; for example, the fields of this representation
12256 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12257 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12258 # method in iOS; and, with just a little work, it can be easily formatted into
12259 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12260 #
12261 # Example (Java):
12262 #
12263 # import com.google.type.Color;
12264 #
12265 # // ...
12266 # public static java.awt.Color fromProto(Color protocolor) {
12267 # float alpha = protocolor.hasAlpha()
12268 # ? protocolor.getAlpha().getValue()
12269 # : 1.0;
12270 #
12271 # return new java.awt.Color(
12272 # protocolor.getRed(),
12273 # protocolor.getGreen(),
12274 # protocolor.getBlue(),
12275 # alpha);
12276 # }
12277 #
12278 # public static Color toProto(java.awt.Color color) {
12279 # float red = (float) color.getRed();
12280 # float green = (float) color.getGreen();
12281 # float blue = (float) color.getBlue();
12282 # float denominator = 255.0;
12283 # Color.Builder resultBuilder =
12284 # Color
12285 # .newBuilder()
12286 # .setRed(red / denominator)
12287 # .setGreen(green / denominator)
12288 # .setBlue(blue / denominator);
12289 # int alpha = color.getAlpha();
12290 # if (alpha != 255) {
12291 # result.setAlpha(
12292 # FloatValue
12293 # .newBuilder()
12294 # .setValue(((float) alpha) / denominator)
12295 # .build());
12296 # }
12297 # return resultBuilder.build();
12298 # }
12299 # // ...
12300 #
12301 # Example (iOS / Obj-C):
12302 #
12303 # // ...
12304 # static UIColor* fromProto(Color* protocolor) {
12305 # float red = [protocolor red];
12306 # float green = [protocolor green];
12307 # float blue = [protocolor blue];
12308 # FloatValue* alpha_wrapper = [protocolor alpha];
12309 # float alpha = 1.0;
12310 # if (alpha_wrapper != nil) {
12311 # alpha = [alpha_wrapper value];
12312 # }
12313 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12314 # }
12315 #
12316 # static Color* toProto(UIColor* color) {
12317 # CGFloat red, green, blue, alpha;
12318 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12319 # return nil;
12320 # }
12321 # Color* result = [Color alloc] init];
12322 # [result setRed:red];
12323 # [result setGreen:green];
12324 # [result setBlue:blue];
12325 # if (alpha <= 0.9999) {
12326 # [result setAlpha:floatWrapperWithValue(alpha)];
12327 # }
12328 # [result autorelease];
12329 # return result;
12330 # }
12331 # // ...
12332 #
12333 # Example (JavaScript):
12334 #
12335 # // ...
12336 #
12337 # var protoToCssColor = function(rgb_color) {
12338 # var redFrac = rgb_color.red || 0.0;
12339 # var greenFrac = rgb_color.green || 0.0;
12340 # var blueFrac = rgb_color.blue || 0.0;
12341 # var red = Math.floor(redFrac * 255);
12342 # var green = Math.floor(greenFrac * 255);
12343 # var blue = Math.floor(blueFrac * 255);
12344 #
12345 # if (!('alpha' in rgb_color)) {
12346 # return rgbToCssColor_(red, green, blue);
12347 # }
12348 #
12349 # var alphaFrac = rgb_color.alpha.value || 0.0;
12350 # var rgbParams = [red, green, blue].join(',');
12351 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12352 # };
12353 #
12354 # var rgbToCssColor_ = function(red, green, blue) {
12355 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12356 # var hexString = rgbNumber.toString(16);
12357 # var missingZeros = 6 - hexString.length;
12358 # var resultBuilder = ['#'];
12359 # for (var i = 0; i < missingZeros; i++) {
12360 # resultBuilder.push('0');
12361 # }
12362 # resultBuilder.push(hexString);
12363 # return resultBuilder.join('');
12364 # };
12365 #
12366 # // ...
12367 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12368 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12369 # the final pixel color is defined by the equation:
12370 #
12371 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12372 #
12373 # This means that a value of 1.0 corresponds to a solid color, whereas
12374 # a value of 0.0 corresponds to a completely transparent color. This
12375 # uses a wrapper message rather than a simple float scalar so that it is
12376 # possible to distinguish between a default value and the value being unset.
12377 # If omitted, this color object is to be rendered as a solid color
12378 # (as if the alpha value had been explicitly given with a value of 1.0).
12379 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12380 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12381 },
12382 },
12383 "bandedRangeId": 42, # The id of the banded range.
12384 },
12385 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012386 "autoResizeDimensions": { # Automatically resizes one or more dimensions based on the contents # Automatically resizes one or more dimensions based on the contents
12387 # of the cells in that dimension.
12388 # of the cells in that dimension.
12389 "dimensions": { # A range along a single dimension on a sheet. # The dimensions to automatically resize.
12390 # Only COLUMNS are supported.
12391 # All indexes are zero-based.
12392 # Indexes are half open: the start index is inclusive
12393 # and the end index is exclusive.
12394 # Missing indexes indicate the range is unbounded on that side.
12395 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
12396 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
12397 "sheetId": 42, # The sheet this span is on.
12398 "dimension": "A String", # The dimension of the span.
12399 },
12400 },
12401 "updateDimensionProperties": { # Updates properties of dimensions within the specified range. # Updates dimensions' properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012402 "fields": "A String", # The fields that should be updated. At least one field must be specified.
12403 # The root `properties` is implied and should not be specified.
12404 # A single `"*"` can be used as short-hand for listing every field.
12405 "range": { # A range along a single dimension on a sheet. # The rows or columns to update.
12406 # All indexes are zero-based.
12407 # Indexes are half open: the start index is inclusive
12408 # and the end index is exclusive.
12409 # Missing indexes indicate the range is unbounded on that side.
12410 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
12411 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
12412 "sheetId": 42, # The sheet this span is on.
12413 "dimension": "A String", # The dimension of the span.
12414 },
12415 "properties": { # Properties about a dimension. # Properties to update.
12416 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
12417 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
12418 "hiddenByFilter": True or False, # True if this dimension is being filtered.
12419 # This field is read-only.
12420 },
12421 },
12422 "unmergeCells": { # Unmerges cells in the given range. # Unmerges merged cells.
12423 "range": { # A range on a sheet. # The range within which all cells should be unmerged.
12424 # If the range spans multiple merges, all will be unmerged.
12425 # The range must not partially span any merge.
12426 # All indexes are zero-based.
12427 # Indexes are half open, e.g the start index is inclusive
12428 # and the end index is exclusive -- [start_index, end_index).
12429 # Missing indexes indicate the range is unbounded on that side.
12430 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012431 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012432 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012433 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012434 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012435 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012436 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012437 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012438 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012439 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012440 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012441 # `Sheet1!A:B == sheet_id: 0,
12442 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012443 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012444 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012445 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012446 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012447 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012448 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012449 #
12450 # The start index must always be less than or equal to the end index.
12451 # If the start index equals the end index, then the range is empty.
12452 # Empty ranges are typically not meaningful and are usually rendered in the
12453 # UI as `#REF!`.
12454 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12455 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12456 "sheetId": 42, # The sheet this range is on.
12457 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12458 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12459 },
12460 },
12461 "setDataValidation": { # Sets a data validation rule to every cell in the range. # Sets data validation for one or more cells.
12462 # To clear validation in a range, call this with no rule specified.
12463 "range": { # A range on a sheet. # The range the data validation rule should apply to.
12464 # All indexes are zero-based.
12465 # Indexes are half open, e.g the start index is inclusive
12466 # and the end index is exclusive -- [start_index, end_index).
12467 # Missing indexes indicate the range is unbounded on that side.
12468 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012469 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012470 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012471 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012472 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012473 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012474 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012475 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012476 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012477 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012478 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012479 # `Sheet1!A:B == sheet_id: 0,
12480 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012481 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012482 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012483 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012484 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012485 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012486 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012487 #
12488 # The start index must always be less than or equal to the end index.
12489 # If the start index equals the end index, then the range is empty.
12490 # Empty ranges are typically not meaningful and are usually rendered in the
12491 # UI as `#REF!`.
12492 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12493 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12494 "sheetId": 42, # The sheet this range is on.
12495 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12496 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12497 },
12498 "rule": { # A data validation rule. # The data validation rule to set on each cell in the range,
12499 # or empty to clear the data validation in the range.
12500 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
12501 # If true, "List" conditions will show a dropdown.
12502 "strict": True or False, # True if invalid data should be rejected.
12503 "inputMessage": "A String", # A message to show the user when adding data to the cell.
12504 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
12505 # BooleanConditions are used by conditional formatting,
12506 # data validation, and the criteria in filters.
12507 "type": "A String", # The type of condition.
12508 "values": [ # The values of the condition. The number of supported values depends
12509 # on the condition type. Some support zero values,
12510 # others one or two values,
12511 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
12512 { # The value of the condition.
12513 "relativeDate": "A String", # A relative date (based on the current date).
12514 # Valid only if the type is
12515 # DATE_BEFORE,
12516 # DATE_AFTER,
12517 # DATE_ON_OR_BEFORE or
12518 # DATE_ON_OR_AFTER.
12519 #
12520 # Relative dates are not supported in data validation.
12521 # They are supported only in conditional formatting and
12522 # conditional filters.
12523 "userEnteredValue": "A String", # A value the condition is based on.
12524 # The value will be parsed as if the user typed into a cell.
12525 # Formulas are supported (and must begin with an `=`).
12526 },
12527 ],
12528 },
12529 },
12530 },
12531 "clearBasicFilter": { # Clears the basic filter, if any exists on the sheet. # Clears the basic filter on a sheet.
12532 "sheetId": 42, # The sheet ID on which the basic filter should be cleared.
12533 },
12534 "addNamedRange": { # Adds a named range to the spreadsheet. # Adds a named range.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012535 "namedRange": { # A named range. # The named range to add. The namedRangeId
12536 # field is optional; if one is not set, an id will be randomly generated. (It
12537 # is an error to specify the ID of a range that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012538 "namedRangeId": "A String", # The ID of the named range.
12539 "range": { # A range on a sheet. # The range this represents.
12540 # All indexes are zero-based.
12541 # Indexes are half open, e.g the start index is inclusive
12542 # and the end index is exclusive -- [start_index, end_index).
12543 # Missing indexes indicate the range is unbounded on that side.
12544 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012545 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012546 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012547 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012548 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012549 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012550 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012551 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012552 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012553 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012554 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012555 # `Sheet1!A:B == sheet_id: 0,
12556 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012557 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012558 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012559 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012560 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012561 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012562 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012563 #
12564 # The start index must always be less than or equal to the end index.
12565 # If the start index equals the end index, then the range is empty.
12566 # Empty ranges are typically not meaningful and are usually rendered in the
12567 # UI as `#REF!`.
12568 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12569 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12570 "sheetId": 42, # The sheet this range is on.
12571 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12572 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12573 },
12574 "name": "A String", # The name of the named range.
12575 },
12576 },
12577 "updateChartSpec": { # Updates a chart's specifications. # Updates a chart's specifications.
12578 # (This does not move or resize a chart. To move or resize a chart, use
12579 # UpdateEmbeddedObjectPositionRequest.)
12580 "chartId": 42, # The ID of the chart to update.
12581 "spec": { # The specifications of a chart. # The specification to apply to the chart.
12582 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012583 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
12584 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
12585 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
12586 "sources": [ # The ranges of data for a series or domain.
12587 # Exactly one dimension must have a length of 1,
12588 # and all sources in the list must have the same dimension
12589 # with length 1.
12590 # The domain (if it exists) & all series must have the same number
12591 # of source ranges. If using more than one source range, then the source
12592 # range at a given offset must be contiguous across the domain and series.
12593 #
12594 # For example, these are valid configurations:
12595 #
12596 # domain sources: A1:A5
12597 # series1 sources: B1:B5
12598 # series2 sources: D6:D10
12599 #
12600 # domain sources: A1:A5, C10:C12
12601 # series1 sources: B1:B5, D10:D12
12602 # series2 sources: C1:C5, E10:E12
12603 { # A range on a sheet.
12604 # All indexes are zero-based.
12605 # Indexes are half open, e.g the start index is inclusive
12606 # and the end index is exclusive -- [start_index, end_index).
12607 # Missing indexes indicate the range is unbounded on that side.
12608 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012609 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012610 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012611 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012612 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012613 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012614 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012615 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012616 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012617 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012618 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012619 # `Sheet1!A:B == sheet_id: 0,
12620 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012621 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012622 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012623 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012624 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012625 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012626 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012627 #
12628 # The start index must always be less than or equal to the end index.
12629 # If the start index equals the end index, then the range is empty.
12630 # Empty ranges are typically not meaningful and are usually rendered in the
12631 # UI as `#REF!`.
12632 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12633 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12634 "sheetId": 42, # The sheet this range is on.
12635 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12636 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12637 },
12638 ],
12639 },
12640 },
12641 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
12642 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
12643 "sources": [ # The ranges of data for a series or domain.
12644 # Exactly one dimension must have a length of 1,
12645 # and all sources in the list must have the same dimension
12646 # with length 1.
12647 # The domain (if it exists) & all series must have the same number
12648 # of source ranges. If using more than one source range, then the source
12649 # range at a given offset must be contiguous across the domain and series.
12650 #
12651 # For example, these are valid configurations:
12652 #
12653 # domain sources: A1:A5
12654 # series1 sources: B1:B5
12655 # series2 sources: D6:D10
12656 #
12657 # domain sources: A1:A5, C10:C12
12658 # series1 sources: B1:B5, D10:D12
12659 # series2 sources: C1:C5, E10:E12
12660 { # A range on a sheet.
12661 # All indexes are zero-based.
12662 # Indexes are half open, e.g the start index is inclusive
12663 # and the end index is exclusive -- [start_index, end_index).
12664 # Missing indexes indicate the range is unbounded on that side.
12665 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012666 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012667 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012668 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012669 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012670 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012671 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012672 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012673 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012674 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012675 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012676 # `Sheet1!A:B == sheet_id: 0,
12677 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012678 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012679 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012680 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012681 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012682 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012683 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012684 #
12685 # The start index must always be less than or equal to the end index.
12686 # If the start index equals the end index, then the range is empty.
12687 # Empty ranges are typically not meaningful and are usually rendered in the
12688 # UI as `#REF!`.
12689 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12690 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12691 "sheetId": 42, # The sheet this range is on.
12692 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12693 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12694 },
12695 ],
12696 },
12697 },
12698 "threeDimensional": True or False, # True if the pie is three dimensional.
12699 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
12700 "pieHole": 3.14, # The size of the hole in the pie chart.
12701 },
12702 "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 -070012703 # See BasicChartType for the list of all
12704 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012705 # of charts this supports.
12706 "headerCount": 42, # The number of rows or columns in the data that are "headers".
12707 # If not set, Google Sheets will guess how many rows are headers based
12708 # on the data.
12709 #
12710 # (Note that BasicChartAxis.title may override the axis title
12711 # inferred from the header values.)
12712 "series": [ # The data this chart is visualizing.
12713 { # A single series of data in a chart.
12714 # For example, if charting stock prices over time, multiple series may exist,
12715 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
12716 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
12717 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
12718 "sources": [ # The ranges of data for a series or domain.
12719 # Exactly one dimension must have a length of 1,
12720 # and all sources in the list must have the same dimension
12721 # with length 1.
12722 # The domain (if it exists) & all series must have the same number
12723 # of source ranges. If using more than one source range, then the source
12724 # range at a given offset must be contiguous across the domain and series.
12725 #
12726 # For example, these are valid configurations:
12727 #
12728 # domain sources: A1:A5
12729 # series1 sources: B1:B5
12730 # series2 sources: D6:D10
12731 #
12732 # domain sources: A1:A5, C10:C12
12733 # series1 sources: B1:B5, D10:D12
12734 # series2 sources: C1:C5, E10:E12
12735 { # A range on a sheet.
12736 # All indexes are zero-based.
12737 # Indexes are half open, e.g the start index is inclusive
12738 # and the end index is exclusive -- [start_index, end_index).
12739 # Missing indexes indicate the range is unbounded on that side.
12740 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012741 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012742 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012743 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012744 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012745 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012746 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012747 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012748 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012749 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012750 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012751 # `Sheet1!A:B == sheet_id: 0,
12752 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012753 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012754 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012755 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012756 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012757 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012758 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012759 #
12760 # The start index must always be less than or equal to the end index.
12761 # If the start index equals the end index, then the range is empty.
12762 # Empty ranges are typically not meaningful and are usually rendered in the
12763 # UI as `#REF!`.
12764 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12765 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12766 "sheetId": 42, # The sheet this range is on.
12767 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12768 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12769 },
12770 ],
12771 },
12772 },
12773 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
12774 # For example, if charting stocks over time, the "Volume" series
12775 # may want to be pinned to the right with the prices pinned to the left,
12776 # because the scale of trading volume is different than the scale of
12777 # prices.
12778 # It is an error to specify an axis that isn't a valid minor axis
12779 # for the chart's type.
12780 "type": "A String", # The type of this series. Valid only if the
12781 # chartType is
12782 # COMBO.
12783 # Different types will change the way the series is visualized.
12784 # Only LINE, AREA,
12785 # and COLUMN are supported.
12786 },
12787 ],
12788 "legendPosition": "A String", # The position of the chart legend.
12789 "domains": [ # The domain of data this is charting.
12790 # Only a single domain is currently supported.
12791 { # The domain of a chart.
12792 # For example, if charting stock prices over time, this would be the date.
12793 "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 -070012794 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012795 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
12796 "sources": [ # The ranges of data for a series or domain.
12797 # Exactly one dimension must have a length of 1,
12798 # and all sources in the list must have the same dimension
12799 # with length 1.
12800 # The domain (if it exists) & all series must have the same number
12801 # of source ranges. If using more than one source range, then the source
12802 # range at a given offset must be contiguous across the domain and series.
12803 #
12804 # For example, these are valid configurations:
12805 #
12806 # domain sources: A1:A5
12807 # series1 sources: B1:B5
12808 # series2 sources: D6:D10
12809 #
12810 # domain sources: A1:A5, C10:C12
12811 # series1 sources: B1:B5, D10:D12
12812 # series2 sources: C1:C5, E10:E12
12813 { # A range on a sheet.
12814 # All indexes are zero-based.
12815 # Indexes are half open, e.g the start index is inclusive
12816 # and the end index is exclusive -- [start_index, end_index).
12817 # Missing indexes indicate the range is unbounded on that side.
12818 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012819 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012820 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012821 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012822 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012823 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012824 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012825 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012826 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012827 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012828 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012829 # `Sheet1!A:B == sheet_id: 0,
12830 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012831 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012832 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012833 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012834 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012835 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012836 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012837 #
12838 # The start index must always be less than or equal to the end index.
12839 # If the start index equals the end index, then the range is empty.
12840 # Empty ranges are typically not meaningful and are usually rendered in the
12841 # UI as `#REF!`.
12842 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12843 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12844 "sheetId": 42, # The sheet this range is on.
12845 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12846 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12847 },
12848 ],
12849 },
12850 },
12851 },
12852 ],
12853 "chartType": "A String", # The type of the chart.
12854 "axis": [ # The axis on the chart.
12855 { # An axis of the chart.
12856 # A chart may not have more than one axis per
12857 # axis position.
12858 "position": "A String", # The position of this axis.
12859 "format": { # The format of a run of text in a cell. # The format of the title.
12860 # Only valid if the axis is not associated with the domain.
12861 # Absent values indicate that the field isn't specified.
12862 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
12863 # for simplicity of conversion to/from color representations in various
12864 # languages over compactness; for example, the fields of this representation
12865 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12866 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12867 # method in iOS; and, with just a little work, it can be easily formatted into
12868 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12869 #
12870 # Example (Java):
12871 #
12872 # import com.google.type.Color;
12873 #
12874 # // ...
12875 # public static java.awt.Color fromProto(Color protocolor) {
12876 # float alpha = protocolor.hasAlpha()
12877 # ? protocolor.getAlpha().getValue()
12878 # : 1.0;
12879 #
12880 # return new java.awt.Color(
12881 # protocolor.getRed(),
12882 # protocolor.getGreen(),
12883 # protocolor.getBlue(),
12884 # alpha);
12885 # }
12886 #
12887 # public static Color toProto(java.awt.Color color) {
12888 # float red = (float) color.getRed();
12889 # float green = (float) color.getGreen();
12890 # float blue = (float) color.getBlue();
12891 # float denominator = 255.0;
12892 # Color.Builder resultBuilder =
12893 # Color
12894 # .newBuilder()
12895 # .setRed(red / denominator)
12896 # .setGreen(green / denominator)
12897 # .setBlue(blue / denominator);
12898 # int alpha = color.getAlpha();
12899 # if (alpha != 255) {
12900 # result.setAlpha(
12901 # FloatValue
12902 # .newBuilder()
12903 # .setValue(((float) alpha) / denominator)
12904 # .build());
12905 # }
12906 # return resultBuilder.build();
12907 # }
12908 # // ...
12909 #
12910 # Example (iOS / Obj-C):
12911 #
12912 # // ...
12913 # static UIColor* fromProto(Color* protocolor) {
12914 # float red = [protocolor red];
12915 # float green = [protocolor green];
12916 # float blue = [protocolor blue];
12917 # FloatValue* alpha_wrapper = [protocolor alpha];
12918 # float alpha = 1.0;
12919 # if (alpha_wrapper != nil) {
12920 # alpha = [alpha_wrapper value];
12921 # }
12922 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12923 # }
12924 #
12925 # static Color* toProto(UIColor* color) {
12926 # CGFloat red, green, blue, alpha;
12927 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12928 # return nil;
12929 # }
12930 # Color* result = [Color alloc] init];
12931 # [result setRed:red];
12932 # [result setGreen:green];
12933 # [result setBlue:blue];
12934 # if (alpha <= 0.9999) {
12935 # [result setAlpha:floatWrapperWithValue(alpha)];
12936 # }
12937 # [result autorelease];
12938 # return result;
12939 # }
12940 # // ...
12941 #
12942 # Example (JavaScript):
12943 #
12944 # // ...
12945 #
12946 # var protoToCssColor = function(rgb_color) {
12947 # var redFrac = rgb_color.red || 0.0;
12948 # var greenFrac = rgb_color.green || 0.0;
12949 # var blueFrac = rgb_color.blue || 0.0;
12950 # var red = Math.floor(redFrac * 255);
12951 # var green = Math.floor(greenFrac * 255);
12952 # var blue = Math.floor(blueFrac * 255);
12953 #
12954 # if (!('alpha' in rgb_color)) {
12955 # return rgbToCssColor_(red, green, blue);
12956 # }
12957 #
12958 # var alphaFrac = rgb_color.alpha.value || 0.0;
12959 # var rgbParams = [red, green, blue].join(',');
12960 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12961 # };
12962 #
12963 # var rgbToCssColor_ = function(red, green, blue) {
12964 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12965 # var hexString = rgbNumber.toString(16);
12966 # var missingZeros = 6 - hexString.length;
12967 # var resultBuilder = ['#'];
12968 # for (var i = 0; i < missingZeros; i++) {
12969 # resultBuilder.push('0');
12970 # }
12971 # resultBuilder.push(hexString);
12972 # return resultBuilder.join('');
12973 # };
12974 #
12975 # // ...
12976 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12977 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12978 # the final pixel color is defined by the equation:
12979 #
12980 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12981 #
12982 # This means that a value of 1.0 corresponds to a solid color, whereas
12983 # a value of 0.0 corresponds to a completely transparent color. This
12984 # uses a wrapper message rather than a simple float scalar so that it is
12985 # possible to distinguish between a default value and the value being unset.
12986 # If omitted, this color object is to be rendered as a solid color
12987 # (as if the alpha value had been explicitly given with a value of 1.0).
12988 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12989 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12990 },
12991 "bold": True or False, # True if the text is bold.
12992 "strikethrough": True or False, # True if the text has a strikethrough.
12993 "fontFamily": "A String", # The font family.
12994 "fontSize": 42, # The size of the font.
12995 "italic": True or False, # True if the text is italicized.
12996 "underline": True or False, # True if the text is underlined.
12997 },
12998 "title": "A String", # The title of this axis. If set, this overrides any title inferred
12999 # from headers of the data.
13000 },
13001 ],
13002 },
13003 "title": "A String", # The title of the chart.
13004 },
13005 },
13006 "moveDimension": { # Moves one or more rows or columns. # Moves rows or columns to another location in a sheet.
13007 "source": { # A range along a single dimension on a sheet. # The source dimensions to move.
13008 # All indexes are zero-based.
13009 # Indexes are half open: the start index is inclusive
13010 # and the end index is exclusive.
13011 # Missing indexes indicate the range is unbounded on that side.
13012 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
13013 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
13014 "sheetId": 42, # The sheet this span is on.
13015 "dimension": "A String", # The dimension of the span.
13016 },
13017 "destinationIndex": 42, # The zero-based start index of where to move the source data to,
13018 # based on the coordinates *before* the source data is removed
13019 # from the grid. Existing data will be shifted down or right
13020 # (depending on the dimension) to make room for the moved dimensions.
13021 # The source dimensions are removed from the grid, so the
13022 # the data may end up in a different index than specified.
13023 #
13024 # For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013025 # `"1"` and `"2"` to between `"3"` and `"4"`, the source would be
13026 # `ROWS [1..3)`,and the destination index would be `"4"`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013027 # (the zero-based index of row 5).
13028 # The end result would be `A1..A5` of `0, 3, 1, 2, 4`.
13029 },
13030 "textToColumns": { # Splits a column of text into multiple columns, # Converts a column of text into many columns of text.
13031 # based on a delimiter in each cell.
13032 "source": { # A range on a sheet. # The source data range. This must span exactly one column.
13033 # All indexes are zero-based.
13034 # Indexes are half open, e.g the start index is inclusive
13035 # and the end index is exclusive -- [start_index, end_index).
13036 # Missing indexes indicate the range is unbounded on that side.
13037 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013038 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013039 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013040 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013041 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013042 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013043 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013044 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013045 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013046 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013047 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013048 # `Sheet1!A:B == sheet_id: 0,
13049 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013050 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013051 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013052 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013053 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013054 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013055 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013056 #
13057 # The start index must always be less than or equal to the end index.
13058 # If the start index equals the end index, then the range is empty.
13059 # Empty ranges are typically not meaningful and are usually rendered in the
13060 # UI as `#REF!`.
13061 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13062 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13063 "sheetId": 42, # The sheet this range is on.
13064 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13065 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13066 },
13067 "delimiter": "A String", # The delimiter to use. Used only if delimiterType is
13068 # CUSTOM.
13069 "delimiterType": "A String", # The delimiter type to use.
13070 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080013071 "addBanding": { # Adds a new banded range to the spreadsheet. # Adds a new banded range
13072 "bandedRange": { # A banded (alternating colors) range in a sheet. # The banded range to add. The bandedRangeId
13073 # field is optional; if one is not set, an id will be randomly generated. (It
13074 # is an error to specify the ID of a range that already exists.)
13075 "range": { # A range on a sheet. # The range over which these properties are applied.
13076 # All indexes are zero-based.
13077 # Indexes are half open, e.g the start index is inclusive
13078 # and the end index is exclusive -- [start_index, end_index).
13079 # Missing indexes indicate the range is unbounded on that side.
13080 #
13081 # For example, if `"Sheet1"` is sheet ID 0, then:
13082 #
13083 # `Sheet1!A1:A1 == sheet_id: 0,
13084 # start_row_index: 0, end_row_index: 1,
13085 # start_column_index: 0, end_column_index: 1`
13086 #
13087 # `Sheet1!A3:B4 == sheet_id: 0,
13088 # start_row_index: 2, end_row_index: 4,
13089 # start_column_index: 0, end_column_index: 2`
13090 #
13091 # `Sheet1!A:B == sheet_id: 0,
13092 # start_column_index: 0, end_column_index: 2`
13093 #
13094 # `Sheet1!A5:B == sheet_id: 0,
13095 # start_row_index: 4,
13096 # start_column_index: 0, end_column_index: 2`
13097 #
13098 # `Sheet1 == sheet_id:0`
13099 #
13100 # The start index must always be less than or equal to the end index.
13101 # If the start index equals the end index, then the range is empty.
13102 # Empty ranges are typically not meaningful and are usually rendered in the
13103 # UI as `#REF!`.
13104 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13105 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13106 "sheetId": 42, # The sheet this range is on.
13107 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13108 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13109 },
13110 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
13111 # by-column basis throughout all the columns in the range. At least one of
13112 # row_properties or column_properties must be specified.
13113 # BandedRange.row_properties and BandedRange.column_properties are
13114 # set, the fill colors are applied to cells according to the following rules:
13115 #
13116 # * header_color and footer_color take priority over band colors.
13117 # * first_band_color takes priority over second_band_color.
13118 # * row_properties takes priority over column_properties.
13119 #
13120 # For example, the first row color takes priority over the first column
13121 # color, but the first column color takes priority over the second row color.
13122 # Similarly, the row header takes priority over the column header in the
13123 # top left cell, but the column header takes priority over the first row
13124 # color if the row header is not set.
13125 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
13126 # for simplicity of conversion to/from color representations in various
13127 # languages over compactness; for example, the fields of this representation
13128 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13129 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13130 # method in iOS; and, with just a little work, it can be easily formatted into
13131 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13132 #
13133 # Example (Java):
13134 #
13135 # import com.google.type.Color;
13136 #
13137 # // ...
13138 # public static java.awt.Color fromProto(Color protocolor) {
13139 # float alpha = protocolor.hasAlpha()
13140 # ? protocolor.getAlpha().getValue()
13141 # : 1.0;
13142 #
13143 # return new java.awt.Color(
13144 # protocolor.getRed(),
13145 # protocolor.getGreen(),
13146 # protocolor.getBlue(),
13147 # alpha);
13148 # }
13149 #
13150 # public static Color toProto(java.awt.Color color) {
13151 # float red = (float) color.getRed();
13152 # float green = (float) color.getGreen();
13153 # float blue = (float) color.getBlue();
13154 # float denominator = 255.0;
13155 # Color.Builder resultBuilder =
13156 # Color
13157 # .newBuilder()
13158 # .setRed(red / denominator)
13159 # .setGreen(green / denominator)
13160 # .setBlue(blue / denominator);
13161 # int alpha = color.getAlpha();
13162 # if (alpha != 255) {
13163 # result.setAlpha(
13164 # FloatValue
13165 # .newBuilder()
13166 # .setValue(((float) alpha) / denominator)
13167 # .build());
13168 # }
13169 # return resultBuilder.build();
13170 # }
13171 # // ...
13172 #
13173 # Example (iOS / Obj-C):
13174 #
13175 # // ...
13176 # static UIColor* fromProto(Color* protocolor) {
13177 # float red = [protocolor red];
13178 # float green = [protocolor green];
13179 # float blue = [protocolor blue];
13180 # FloatValue* alpha_wrapper = [protocolor alpha];
13181 # float alpha = 1.0;
13182 # if (alpha_wrapper != nil) {
13183 # alpha = [alpha_wrapper value];
13184 # }
13185 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13186 # }
13187 #
13188 # static Color* toProto(UIColor* color) {
13189 # CGFloat red, green, blue, alpha;
13190 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13191 # return nil;
13192 # }
13193 # Color* result = [Color alloc] init];
13194 # [result setRed:red];
13195 # [result setGreen:green];
13196 # [result setBlue:blue];
13197 # if (alpha <= 0.9999) {
13198 # [result setAlpha:floatWrapperWithValue(alpha)];
13199 # }
13200 # [result autorelease];
13201 # return result;
13202 # }
13203 # // ...
13204 #
13205 # Example (JavaScript):
13206 #
13207 # // ...
13208 #
13209 # var protoToCssColor = function(rgb_color) {
13210 # var redFrac = rgb_color.red || 0.0;
13211 # var greenFrac = rgb_color.green || 0.0;
13212 # var blueFrac = rgb_color.blue || 0.0;
13213 # var red = Math.floor(redFrac * 255);
13214 # var green = Math.floor(greenFrac * 255);
13215 # var blue = Math.floor(blueFrac * 255);
13216 #
13217 # if (!('alpha' in rgb_color)) {
13218 # return rgbToCssColor_(red, green, blue);
13219 # }
13220 #
13221 # var alphaFrac = rgb_color.alpha.value || 0.0;
13222 # var rgbParams = [red, green, blue].join(',');
13223 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13224 # };
13225 #
13226 # var rgbToCssColor_ = function(red, green, blue) {
13227 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13228 # var hexString = rgbNumber.toString(16);
13229 # var missingZeros = 6 - hexString.length;
13230 # var resultBuilder = ['#'];
13231 # for (var i = 0; i < missingZeros; i++) {
13232 # resultBuilder.push('0');
13233 # }
13234 # resultBuilder.push(hexString);
13235 # return resultBuilder.join('');
13236 # };
13237 #
13238 # // ...
13239 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13240 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13241 # the final pixel color is defined by the equation:
13242 #
13243 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13244 #
13245 # This means that a value of 1.0 corresponds to a solid color, whereas
13246 # a value of 0.0 corresponds to a completely transparent color. This
13247 # uses a wrapper message rather than a simple float scalar so that it is
13248 # possible to distinguish between a default value and the value being unset.
13249 # If omitted, this color object is to be rendered as a solid color
13250 # (as if the alpha value had been explicitly given with a value of 1.0).
13251 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13252 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13253 },
13254 "headerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the first row or column. If this field is set, the first
13255 # row or column will be filled with this color and the colors will
13256 # alternate between first_band_color and second_band_color starting
13257 # from the second row or column. Otherwise, the first row or column will be
13258 # filled with first_band_color and the colors will proceed to alternate
13259 # as they normally would.
13260 # for simplicity of conversion to/from color representations in various
13261 # languages over compactness; for example, the fields of this representation
13262 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13263 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13264 # method in iOS; and, with just a little work, it can be easily formatted into
13265 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13266 #
13267 # Example (Java):
13268 #
13269 # import com.google.type.Color;
13270 #
13271 # // ...
13272 # public static java.awt.Color fromProto(Color protocolor) {
13273 # float alpha = protocolor.hasAlpha()
13274 # ? protocolor.getAlpha().getValue()
13275 # : 1.0;
13276 #
13277 # return new java.awt.Color(
13278 # protocolor.getRed(),
13279 # protocolor.getGreen(),
13280 # protocolor.getBlue(),
13281 # alpha);
13282 # }
13283 #
13284 # public static Color toProto(java.awt.Color color) {
13285 # float red = (float) color.getRed();
13286 # float green = (float) color.getGreen();
13287 # float blue = (float) color.getBlue();
13288 # float denominator = 255.0;
13289 # Color.Builder resultBuilder =
13290 # Color
13291 # .newBuilder()
13292 # .setRed(red / denominator)
13293 # .setGreen(green / denominator)
13294 # .setBlue(blue / denominator);
13295 # int alpha = color.getAlpha();
13296 # if (alpha != 255) {
13297 # result.setAlpha(
13298 # FloatValue
13299 # .newBuilder()
13300 # .setValue(((float) alpha) / denominator)
13301 # .build());
13302 # }
13303 # return resultBuilder.build();
13304 # }
13305 # // ...
13306 #
13307 # Example (iOS / Obj-C):
13308 #
13309 # // ...
13310 # static UIColor* fromProto(Color* protocolor) {
13311 # float red = [protocolor red];
13312 # float green = [protocolor green];
13313 # float blue = [protocolor blue];
13314 # FloatValue* alpha_wrapper = [protocolor alpha];
13315 # float alpha = 1.0;
13316 # if (alpha_wrapper != nil) {
13317 # alpha = [alpha_wrapper value];
13318 # }
13319 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13320 # }
13321 #
13322 # static Color* toProto(UIColor* color) {
13323 # CGFloat red, green, blue, alpha;
13324 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13325 # return nil;
13326 # }
13327 # Color* result = [Color alloc] init];
13328 # [result setRed:red];
13329 # [result setGreen:green];
13330 # [result setBlue:blue];
13331 # if (alpha <= 0.9999) {
13332 # [result setAlpha:floatWrapperWithValue(alpha)];
13333 # }
13334 # [result autorelease];
13335 # return result;
13336 # }
13337 # // ...
13338 #
13339 # Example (JavaScript):
13340 #
13341 # // ...
13342 #
13343 # var protoToCssColor = function(rgb_color) {
13344 # var redFrac = rgb_color.red || 0.0;
13345 # var greenFrac = rgb_color.green || 0.0;
13346 # var blueFrac = rgb_color.blue || 0.0;
13347 # var red = Math.floor(redFrac * 255);
13348 # var green = Math.floor(greenFrac * 255);
13349 # var blue = Math.floor(blueFrac * 255);
13350 #
13351 # if (!('alpha' in rgb_color)) {
13352 # return rgbToCssColor_(red, green, blue);
13353 # }
13354 #
13355 # var alphaFrac = rgb_color.alpha.value || 0.0;
13356 # var rgbParams = [red, green, blue].join(',');
13357 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13358 # };
13359 #
13360 # var rgbToCssColor_ = function(red, green, blue) {
13361 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13362 # var hexString = rgbNumber.toString(16);
13363 # var missingZeros = 6 - hexString.length;
13364 # var resultBuilder = ['#'];
13365 # for (var i = 0; i < missingZeros; i++) {
13366 # resultBuilder.push('0');
13367 # }
13368 # resultBuilder.push(hexString);
13369 # return resultBuilder.join('');
13370 # };
13371 #
13372 # // ...
13373 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13374 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13375 # the final pixel color is defined by the equation:
13376 #
13377 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13378 #
13379 # This means that a value of 1.0 corresponds to a solid color, whereas
13380 # a value of 0.0 corresponds to a completely transparent color. This
13381 # uses a wrapper message rather than a simple float scalar so that it is
13382 # possible to distinguish between a default value and the value being unset.
13383 # If omitted, this color object is to be rendered as a solid color
13384 # (as if the alpha value had been explicitly given with a value of 1.0).
13385 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13386 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13387 },
13388 "footerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the last row or column. If this field is not set, the last
13389 # row or column will be filled with either first_band_color or
13390 # second_band_color, depending on the color of the previous row or
13391 # column.
13392 # for simplicity of conversion to/from color representations in various
13393 # languages over compactness; for example, the fields of this representation
13394 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13395 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13396 # method in iOS; and, with just a little work, it can be easily formatted into
13397 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13398 #
13399 # Example (Java):
13400 #
13401 # import com.google.type.Color;
13402 #
13403 # // ...
13404 # public static java.awt.Color fromProto(Color protocolor) {
13405 # float alpha = protocolor.hasAlpha()
13406 # ? protocolor.getAlpha().getValue()
13407 # : 1.0;
13408 #
13409 # return new java.awt.Color(
13410 # protocolor.getRed(),
13411 # protocolor.getGreen(),
13412 # protocolor.getBlue(),
13413 # alpha);
13414 # }
13415 #
13416 # public static Color toProto(java.awt.Color color) {
13417 # float red = (float) color.getRed();
13418 # float green = (float) color.getGreen();
13419 # float blue = (float) color.getBlue();
13420 # float denominator = 255.0;
13421 # Color.Builder resultBuilder =
13422 # Color
13423 # .newBuilder()
13424 # .setRed(red / denominator)
13425 # .setGreen(green / denominator)
13426 # .setBlue(blue / denominator);
13427 # int alpha = color.getAlpha();
13428 # if (alpha != 255) {
13429 # result.setAlpha(
13430 # FloatValue
13431 # .newBuilder()
13432 # .setValue(((float) alpha) / denominator)
13433 # .build());
13434 # }
13435 # return resultBuilder.build();
13436 # }
13437 # // ...
13438 #
13439 # Example (iOS / Obj-C):
13440 #
13441 # // ...
13442 # static UIColor* fromProto(Color* protocolor) {
13443 # float red = [protocolor red];
13444 # float green = [protocolor green];
13445 # float blue = [protocolor blue];
13446 # FloatValue* alpha_wrapper = [protocolor alpha];
13447 # float alpha = 1.0;
13448 # if (alpha_wrapper != nil) {
13449 # alpha = [alpha_wrapper value];
13450 # }
13451 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13452 # }
13453 #
13454 # static Color* toProto(UIColor* color) {
13455 # CGFloat red, green, blue, alpha;
13456 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13457 # return nil;
13458 # }
13459 # Color* result = [Color alloc] init];
13460 # [result setRed:red];
13461 # [result setGreen:green];
13462 # [result setBlue:blue];
13463 # if (alpha <= 0.9999) {
13464 # [result setAlpha:floatWrapperWithValue(alpha)];
13465 # }
13466 # [result autorelease];
13467 # return result;
13468 # }
13469 # // ...
13470 #
13471 # Example (JavaScript):
13472 #
13473 # // ...
13474 #
13475 # var protoToCssColor = function(rgb_color) {
13476 # var redFrac = rgb_color.red || 0.0;
13477 # var greenFrac = rgb_color.green || 0.0;
13478 # var blueFrac = rgb_color.blue || 0.0;
13479 # var red = Math.floor(redFrac * 255);
13480 # var green = Math.floor(greenFrac * 255);
13481 # var blue = Math.floor(blueFrac * 255);
13482 #
13483 # if (!('alpha' in rgb_color)) {
13484 # return rgbToCssColor_(red, green, blue);
13485 # }
13486 #
13487 # var alphaFrac = rgb_color.alpha.value || 0.0;
13488 # var rgbParams = [red, green, blue].join(',');
13489 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13490 # };
13491 #
13492 # var rgbToCssColor_ = function(red, green, blue) {
13493 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13494 # var hexString = rgbNumber.toString(16);
13495 # var missingZeros = 6 - hexString.length;
13496 # var resultBuilder = ['#'];
13497 # for (var i = 0; i < missingZeros; i++) {
13498 # resultBuilder.push('0');
13499 # }
13500 # resultBuilder.push(hexString);
13501 # return resultBuilder.join('');
13502 # };
13503 #
13504 # // ...
13505 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13506 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13507 # the final pixel color is defined by the equation:
13508 #
13509 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13510 #
13511 # This means that a value of 1.0 corresponds to a solid color, whereas
13512 # a value of 0.0 corresponds to a completely transparent color. This
13513 # uses a wrapper message rather than a simple float scalar so that it is
13514 # possible to distinguish between a default value and the value being unset.
13515 # If omitted, this color object is to be rendered as a solid color
13516 # (as if the alpha value had been explicitly given with a value of 1.0).
13517 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13518 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13519 },
13520 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
13521 # for simplicity of conversion to/from color representations in various
13522 # languages over compactness; for example, the fields of this representation
13523 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13524 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13525 # method in iOS; and, with just a little work, it can be easily formatted into
13526 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13527 #
13528 # Example (Java):
13529 #
13530 # import com.google.type.Color;
13531 #
13532 # // ...
13533 # public static java.awt.Color fromProto(Color protocolor) {
13534 # float alpha = protocolor.hasAlpha()
13535 # ? protocolor.getAlpha().getValue()
13536 # : 1.0;
13537 #
13538 # return new java.awt.Color(
13539 # protocolor.getRed(),
13540 # protocolor.getGreen(),
13541 # protocolor.getBlue(),
13542 # alpha);
13543 # }
13544 #
13545 # public static Color toProto(java.awt.Color color) {
13546 # float red = (float) color.getRed();
13547 # float green = (float) color.getGreen();
13548 # float blue = (float) color.getBlue();
13549 # float denominator = 255.0;
13550 # Color.Builder resultBuilder =
13551 # Color
13552 # .newBuilder()
13553 # .setRed(red / denominator)
13554 # .setGreen(green / denominator)
13555 # .setBlue(blue / denominator);
13556 # int alpha = color.getAlpha();
13557 # if (alpha != 255) {
13558 # result.setAlpha(
13559 # FloatValue
13560 # .newBuilder()
13561 # .setValue(((float) alpha) / denominator)
13562 # .build());
13563 # }
13564 # return resultBuilder.build();
13565 # }
13566 # // ...
13567 #
13568 # Example (iOS / Obj-C):
13569 #
13570 # // ...
13571 # static UIColor* fromProto(Color* protocolor) {
13572 # float red = [protocolor red];
13573 # float green = [protocolor green];
13574 # float blue = [protocolor blue];
13575 # FloatValue* alpha_wrapper = [protocolor alpha];
13576 # float alpha = 1.0;
13577 # if (alpha_wrapper != nil) {
13578 # alpha = [alpha_wrapper value];
13579 # }
13580 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13581 # }
13582 #
13583 # static Color* toProto(UIColor* color) {
13584 # CGFloat red, green, blue, alpha;
13585 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13586 # return nil;
13587 # }
13588 # Color* result = [Color alloc] init];
13589 # [result setRed:red];
13590 # [result setGreen:green];
13591 # [result setBlue:blue];
13592 # if (alpha <= 0.9999) {
13593 # [result setAlpha:floatWrapperWithValue(alpha)];
13594 # }
13595 # [result autorelease];
13596 # return result;
13597 # }
13598 # // ...
13599 #
13600 # Example (JavaScript):
13601 #
13602 # // ...
13603 #
13604 # var protoToCssColor = function(rgb_color) {
13605 # var redFrac = rgb_color.red || 0.0;
13606 # var greenFrac = rgb_color.green || 0.0;
13607 # var blueFrac = rgb_color.blue || 0.0;
13608 # var red = Math.floor(redFrac * 255);
13609 # var green = Math.floor(greenFrac * 255);
13610 # var blue = Math.floor(blueFrac * 255);
13611 #
13612 # if (!('alpha' in rgb_color)) {
13613 # return rgbToCssColor_(red, green, blue);
13614 # }
13615 #
13616 # var alphaFrac = rgb_color.alpha.value || 0.0;
13617 # var rgbParams = [red, green, blue].join(',');
13618 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13619 # };
13620 #
13621 # var rgbToCssColor_ = function(red, green, blue) {
13622 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13623 # var hexString = rgbNumber.toString(16);
13624 # var missingZeros = 6 - hexString.length;
13625 # var resultBuilder = ['#'];
13626 # for (var i = 0; i < missingZeros; i++) {
13627 # resultBuilder.push('0');
13628 # }
13629 # resultBuilder.push(hexString);
13630 # return resultBuilder.join('');
13631 # };
13632 #
13633 # // ...
13634 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13635 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13636 # the final pixel color is defined by the equation:
13637 #
13638 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13639 #
13640 # This means that a value of 1.0 corresponds to a solid color, whereas
13641 # a value of 0.0 corresponds to a completely transparent color. This
13642 # uses a wrapper message rather than a simple float scalar so that it is
13643 # possible to distinguish between a default value and the value being unset.
13644 # If omitted, this color object is to be rendered as a solid color
13645 # (as if the alpha value had been explicitly given with a value of 1.0).
13646 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13647 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13648 },
13649 },
13650 "rowProperties": { # Properties referring a single dimension (either row or column). If both # Properties for row bands. These properties will be applied on a row-by-row
13651 # basis throughout all the rows in the range. At least one of
13652 # row_properties or column_properties must be specified.
13653 # BandedRange.row_properties and BandedRange.column_properties are
13654 # set, the fill colors are applied to cells according to the following rules:
13655 #
13656 # * header_color and footer_color take priority over band colors.
13657 # * first_band_color takes priority over second_band_color.
13658 # * row_properties takes priority over column_properties.
13659 #
13660 # For example, the first row color takes priority over the first column
13661 # color, but the first column color takes priority over the second row color.
13662 # Similarly, the row header takes priority over the column header in the
13663 # top left cell, but the column header takes priority over the first row
13664 # color if the row header is not set.
13665 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
13666 # for simplicity of conversion to/from color representations in various
13667 # languages over compactness; for example, the fields of this representation
13668 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13669 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13670 # method in iOS; and, with just a little work, it can be easily formatted into
13671 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13672 #
13673 # Example (Java):
13674 #
13675 # import com.google.type.Color;
13676 #
13677 # // ...
13678 # public static java.awt.Color fromProto(Color protocolor) {
13679 # float alpha = protocolor.hasAlpha()
13680 # ? protocolor.getAlpha().getValue()
13681 # : 1.0;
13682 #
13683 # return new java.awt.Color(
13684 # protocolor.getRed(),
13685 # protocolor.getGreen(),
13686 # protocolor.getBlue(),
13687 # alpha);
13688 # }
13689 #
13690 # public static Color toProto(java.awt.Color color) {
13691 # float red = (float) color.getRed();
13692 # float green = (float) color.getGreen();
13693 # float blue = (float) color.getBlue();
13694 # float denominator = 255.0;
13695 # Color.Builder resultBuilder =
13696 # Color
13697 # .newBuilder()
13698 # .setRed(red / denominator)
13699 # .setGreen(green / denominator)
13700 # .setBlue(blue / denominator);
13701 # int alpha = color.getAlpha();
13702 # if (alpha != 255) {
13703 # result.setAlpha(
13704 # FloatValue
13705 # .newBuilder()
13706 # .setValue(((float) alpha) / denominator)
13707 # .build());
13708 # }
13709 # return resultBuilder.build();
13710 # }
13711 # // ...
13712 #
13713 # Example (iOS / Obj-C):
13714 #
13715 # // ...
13716 # static UIColor* fromProto(Color* protocolor) {
13717 # float red = [protocolor red];
13718 # float green = [protocolor green];
13719 # float blue = [protocolor blue];
13720 # FloatValue* alpha_wrapper = [protocolor alpha];
13721 # float alpha = 1.0;
13722 # if (alpha_wrapper != nil) {
13723 # alpha = [alpha_wrapper value];
13724 # }
13725 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13726 # }
13727 #
13728 # static Color* toProto(UIColor* color) {
13729 # CGFloat red, green, blue, alpha;
13730 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13731 # return nil;
13732 # }
13733 # Color* result = [Color alloc] init];
13734 # [result setRed:red];
13735 # [result setGreen:green];
13736 # [result setBlue:blue];
13737 # if (alpha <= 0.9999) {
13738 # [result setAlpha:floatWrapperWithValue(alpha)];
13739 # }
13740 # [result autorelease];
13741 # return result;
13742 # }
13743 # // ...
13744 #
13745 # Example (JavaScript):
13746 #
13747 # // ...
13748 #
13749 # var protoToCssColor = function(rgb_color) {
13750 # var redFrac = rgb_color.red || 0.0;
13751 # var greenFrac = rgb_color.green || 0.0;
13752 # var blueFrac = rgb_color.blue || 0.0;
13753 # var red = Math.floor(redFrac * 255);
13754 # var green = Math.floor(greenFrac * 255);
13755 # var blue = Math.floor(blueFrac * 255);
13756 #
13757 # if (!('alpha' in rgb_color)) {
13758 # return rgbToCssColor_(red, green, blue);
13759 # }
13760 #
13761 # var alphaFrac = rgb_color.alpha.value || 0.0;
13762 # var rgbParams = [red, green, blue].join(',');
13763 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13764 # };
13765 #
13766 # var rgbToCssColor_ = function(red, green, blue) {
13767 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13768 # var hexString = rgbNumber.toString(16);
13769 # var missingZeros = 6 - hexString.length;
13770 # var resultBuilder = ['#'];
13771 # for (var i = 0; i < missingZeros; i++) {
13772 # resultBuilder.push('0');
13773 # }
13774 # resultBuilder.push(hexString);
13775 # return resultBuilder.join('');
13776 # };
13777 #
13778 # // ...
13779 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13780 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13781 # the final pixel color is defined by the equation:
13782 #
13783 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13784 #
13785 # This means that a value of 1.0 corresponds to a solid color, whereas
13786 # a value of 0.0 corresponds to a completely transparent color. This
13787 # uses a wrapper message rather than a simple float scalar so that it is
13788 # possible to distinguish between a default value and the value being unset.
13789 # If omitted, this color object is to be rendered as a solid color
13790 # (as if the alpha value had been explicitly given with a value of 1.0).
13791 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13792 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13793 },
13794 "headerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the first row or column. If this field is set, the first
13795 # row or column will be filled with this color and the colors will
13796 # alternate between first_band_color and second_band_color starting
13797 # from the second row or column. Otherwise, the first row or column will be
13798 # filled with first_band_color and the colors will proceed to alternate
13799 # as they normally would.
13800 # for simplicity of conversion to/from color representations in various
13801 # languages over compactness; for example, the fields of this representation
13802 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13803 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13804 # method in iOS; and, with just a little work, it can be easily formatted into
13805 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13806 #
13807 # Example (Java):
13808 #
13809 # import com.google.type.Color;
13810 #
13811 # // ...
13812 # public static java.awt.Color fromProto(Color protocolor) {
13813 # float alpha = protocolor.hasAlpha()
13814 # ? protocolor.getAlpha().getValue()
13815 # : 1.0;
13816 #
13817 # return new java.awt.Color(
13818 # protocolor.getRed(),
13819 # protocolor.getGreen(),
13820 # protocolor.getBlue(),
13821 # alpha);
13822 # }
13823 #
13824 # public static Color toProto(java.awt.Color color) {
13825 # float red = (float) color.getRed();
13826 # float green = (float) color.getGreen();
13827 # float blue = (float) color.getBlue();
13828 # float denominator = 255.0;
13829 # Color.Builder resultBuilder =
13830 # Color
13831 # .newBuilder()
13832 # .setRed(red / denominator)
13833 # .setGreen(green / denominator)
13834 # .setBlue(blue / denominator);
13835 # int alpha = color.getAlpha();
13836 # if (alpha != 255) {
13837 # result.setAlpha(
13838 # FloatValue
13839 # .newBuilder()
13840 # .setValue(((float) alpha) / denominator)
13841 # .build());
13842 # }
13843 # return resultBuilder.build();
13844 # }
13845 # // ...
13846 #
13847 # Example (iOS / Obj-C):
13848 #
13849 # // ...
13850 # static UIColor* fromProto(Color* protocolor) {
13851 # float red = [protocolor red];
13852 # float green = [protocolor green];
13853 # float blue = [protocolor blue];
13854 # FloatValue* alpha_wrapper = [protocolor alpha];
13855 # float alpha = 1.0;
13856 # if (alpha_wrapper != nil) {
13857 # alpha = [alpha_wrapper value];
13858 # }
13859 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13860 # }
13861 #
13862 # static Color* toProto(UIColor* color) {
13863 # CGFloat red, green, blue, alpha;
13864 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13865 # return nil;
13866 # }
13867 # Color* result = [Color alloc] init];
13868 # [result setRed:red];
13869 # [result setGreen:green];
13870 # [result setBlue:blue];
13871 # if (alpha <= 0.9999) {
13872 # [result setAlpha:floatWrapperWithValue(alpha)];
13873 # }
13874 # [result autorelease];
13875 # return result;
13876 # }
13877 # // ...
13878 #
13879 # Example (JavaScript):
13880 #
13881 # // ...
13882 #
13883 # var protoToCssColor = function(rgb_color) {
13884 # var redFrac = rgb_color.red || 0.0;
13885 # var greenFrac = rgb_color.green || 0.0;
13886 # var blueFrac = rgb_color.blue || 0.0;
13887 # var red = Math.floor(redFrac * 255);
13888 # var green = Math.floor(greenFrac * 255);
13889 # var blue = Math.floor(blueFrac * 255);
13890 #
13891 # if (!('alpha' in rgb_color)) {
13892 # return rgbToCssColor_(red, green, blue);
13893 # }
13894 #
13895 # var alphaFrac = rgb_color.alpha.value || 0.0;
13896 # var rgbParams = [red, green, blue].join(',');
13897 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13898 # };
13899 #
13900 # var rgbToCssColor_ = function(red, green, blue) {
13901 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13902 # var hexString = rgbNumber.toString(16);
13903 # var missingZeros = 6 - hexString.length;
13904 # var resultBuilder = ['#'];
13905 # for (var i = 0; i < missingZeros; i++) {
13906 # resultBuilder.push('0');
13907 # }
13908 # resultBuilder.push(hexString);
13909 # return resultBuilder.join('');
13910 # };
13911 #
13912 # // ...
13913 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13914 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13915 # the final pixel color is defined by the equation:
13916 #
13917 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13918 #
13919 # This means that a value of 1.0 corresponds to a solid color, whereas
13920 # a value of 0.0 corresponds to a completely transparent color. This
13921 # uses a wrapper message rather than a simple float scalar so that it is
13922 # possible to distinguish between a default value and the value being unset.
13923 # If omitted, this color object is to be rendered as a solid color
13924 # (as if the alpha value had been explicitly given with a value of 1.0).
13925 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13926 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13927 },
13928 "footerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the last row or column. If this field is not set, the last
13929 # row or column will be filled with either first_band_color or
13930 # second_band_color, depending on the color of the previous row or
13931 # column.
13932 # for simplicity of conversion to/from color representations in various
13933 # languages over compactness; for example, the fields of this representation
13934 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13935 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13936 # method in iOS; and, with just a little work, it can be easily formatted into
13937 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13938 #
13939 # Example (Java):
13940 #
13941 # import com.google.type.Color;
13942 #
13943 # // ...
13944 # public static java.awt.Color fromProto(Color protocolor) {
13945 # float alpha = protocolor.hasAlpha()
13946 # ? protocolor.getAlpha().getValue()
13947 # : 1.0;
13948 #
13949 # return new java.awt.Color(
13950 # protocolor.getRed(),
13951 # protocolor.getGreen(),
13952 # protocolor.getBlue(),
13953 # alpha);
13954 # }
13955 #
13956 # public static Color toProto(java.awt.Color color) {
13957 # float red = (float) color.getRed();
13958 # float green = (float) color.getGreen();
13959 # float blue = (float) color.getBlue();
13960 # float denominator = 255.0;
13961 # Color.Builder resultBuilder =
13962 # Color
13963 # .newBuilder()
13964 # .setRed(red / denominator)
13965 # .setGreen(green / denominator)
13966 # .setBlue(blue / denominator);
13967 # int alpha = color.getAlpha();
13968 # if (alpha != 255) {
13969 # result.setAlpha(
13970 # FloatValue
13971 # .newBuilder()
13972 # .setValue(((float) alpha) / denominator)
13973 # .build());
13974 # }
13975 # return resultBuilder.build();
13976 # }
13977 # // ...
13978 #
13979 # Example (iOS / Obj-C):
13980 #
13981 # // ...
13982 # static UIColor* fromProto(Color* protocolor) {
13983 # float red = [protocolor red];
13984 # float green = [protocolor green];
13985 # float blue = [protocolor blue];
13986 # FloatValue* alpha_wrapper = [protocolor alpha];
13987 # float alpha = 1.0;
13988 # if (alpha_wrapper != nil) {
13989 # alpha = [alpha_wrapper value];
13990 # }
13991 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13992 # }
13993 #
13994 # static Color* toProto(UIColor* color) {
13995 # CGFloat red, green, blue, alpha;
13996 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13997 # return nil;
13998 # }
13999 # Color* result = [Color alloc] init];
14000 # [result setRed:red];
14001 # [result setGreen:green];
14002 # [result setBlue:blue];
14003 # if (alpha <= 0.9999) {
14004 # [result setAlpha:floatWrapperWithValue(alpha)];
14005 # }
14006 # [result autorelease];
14007 # return result;
14008 # }
14009 # // ...
14010 #
14011 # Example (JavaScript):
14012 #
14013 # // ...
14014 #
14015 # var protoToCssColor = function(rgb_color) {
14016 # var redFrac = rgb_color.red || 0.0;
14017 # var greenFrac = rgb_color.green || 0.0;
14018 # var blueFrac = rgb_color.blue || 0.0;
14019 # var red = Math.floor(redFrac * 255);
14020 # var green = Math.floor(greenFrac * 255);
14021 # var blue = Math.floor(blueFrac * 255);
14022 #
14023 # if (!('alpha' in rgb_color)) {
14024 # return rgbToCssColor_(red, green, blue);
14025 # }
14026 #
14027 # var alphaFrac = rgb_color.alpha.value || 0.0;
14028 # var rgbParams = [red, green, blue].join(',');
14029 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14030 # };
14031 #
14032 # var rgbToCssColor_ = function(red, green, blue) {
14033 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14034 # var hexString = rgbNumber.toString(16);
14035 # var missingZeros = 6 - hexString.length;
14036 # var resultBuilder = ['#'];
14037 # for (var i = 0; i < missingZeros; i++) {
14038 # resultBuilder.push('0');
14039 # }
14040 # resultBuilder.push(hexString);
14041 # return resultBuilder.join('');
14042 # };
14043 #
14044 # // ...
14045 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14046 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14047 # the final pixel color is defined by the equation:
14048 #
14049 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14050 #
14051 # This means that a value of 1.0 corresponds to a solid color, whereas
14052 # a value of 0.0 corresponds to a completely transparent color. This
14053 # uses a wrapper message rather than a simple float scalar so that it is
14054 # possible to distinguish between a default value and the value being unset.
14055 # If omitted, this color object is to be rendered as a solid color
14056 # (as if the alpha value had been explicitly given with a value of 1.0).
14057 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14058 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14059 },
14060 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
14061 # for simplicity of conversion to/from color representations in various
14062 # languages over compactness; for example, the fields of this representation
14063 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14064 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14065 # method in iOS; and, with just a little work, it can be easily formatted into
14066 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14067 #
14068 # Example (Java):
14069 #
14070 # import com.google.type.Color;
14071 #
14072 # // ...
14073 # public static java.awt.Color fromProto(Color protocolor) {
14074 # float alpha = protocolor.hasAlpha()
14075 # ? protocolor.getAlpha().getValue()
14076 # : 1.0;
14077 #
14078 # return new java.awt.Color(
14079 # protocolor.getRed(),
14080 # protocolor.getGreen(),
14081 # protocolor.getBlue(),
14082 # alpha);
14083 # }
14084 #
14085 # public static Color toProto(java.awt.Color color) {
14086 # float red = (float) color.getRed();
14087 # float green = (float) color.getGreen();
14088 # float blue = (float) color.getBlue();
14089 # float denominator = 255.0;
14090 # Color.Builder resultBuilder =
14091 # Color
14092 # .newBuilder()
14093 # .setRed(red / denominator)
14094 # .setGreen(green / denominator)
14095 # .setBlue(blue / denominator);
14096 # int alpha = color.getAlpha();
14097 # if (alpha != 255) {
14098 # result.setAlpha(
14099 # FloatValue
14100 # .newBuilder()
14101 # .setValue(((float) alpha) / denominator)
14102 # .build());
14103 # }
14104 # return resultBuilder.build();
14105 # }
14106 # // ...
14107 #
14108 # Example (iOS / Obj-C):
14109 #
14110 # // ...
14111 # static UIColor* fromProto(Color* protocolor) {
14112 # float red = [protocolor red];
14113 # float green = [protocolor green];
14114 # float blue = [protocolor blue];
14115 # FloatValue* alpha_wrapper = [protocolor alpha];
14116 # float alpha = 1.0;
14117 # if (alpha_wrapper != nil) {
14118 # alpha = [alpha_wrapper value];
14119 # }
14120 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14121 # }
14122 #
14123 # static Color* toProto(UIColor* color) {
14124 # CGFloat red, green, blue, alpha;
14125 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14126 # return nil;
14127 # }
14128 # Color* result = [Color alloc] init];
14129 # [result setRed:red];
14130 # [result setGreen:green];
14131 # [result setBlue:blue];
14132 # if (alpha <= 0.9999) {
14133 # [result setAlpha:floatWrapperWithValue(alpha)];
14134 # }
14135 # [result autorelease];
14136 # return result;
14137 # }
14138 # // ...
14139 #
14140 # Example (JavaScript):
14141 #
14142 # // ...
14143 #
14144 # var protoToCssColor = function(rgb_color) {
14145 # var redFrac = rgb_color.red || 0.0;
14146 # var greenFrac = rgb_color.green || 0.0;
14147 # var blueFrac = rgb_color.blue || 0.0;
14148 # var red = Math.floor(redFrac * 255);
14149 # var green = Math.floor(greenFrac * 255);
14150 # var blue = Math.floor(blueFrac * 255);
14151 #
14152 # if (!('alpha' in rgb_color)) {
14153 # return rgbToCssColor_(red, green, blue);
14154 # }
14155 #
14156 # var alphaFrac = rgb_color.alpha.value || 0.0;
14157 # var rgbParams = [red, green, blue].join(',');
14158 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14159 # };
14160 #
14161 # var rgbToCssColor_ = function(red, green, blue) {
14162 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14163 # var hexString = rgbNumber.toString(16);
14164 # var missingZeros = 6 - hexString.length;
14165 # var resultBuilder = ['#'];
14166 # for (var i = 0; i < missingZeros; i++) {
14167 # resultBuilder.push('0');
14168 # }
14169 # resultBuilder.push(hexString);
14170 # return resultBuilder.join('');
14171 # };
14172 #
14173 # // ...
14174 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14175 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14176 # the final pixel color is defined by the equation:
14177 #
14178 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14179 #
14180 # This means that a value of 1.0 corresponds to a solid color, whereas
14181 # a value of 0.0 corresponds to a completely transparent color. This
14182 # uses a wrapper message rather than a simple float scalar so that it is
14183 # possible to distinguish between a default value and the value being unset.
14184 # If omitted, this color object is to be rendered as a solid color
14185 # (as if the alpha value had been explicitly given with a value of 1.0).
14186 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14187 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14188 },
14189 },
14190 "bandedRangeId": 42, # The id of the banded range.
14191 },
14192 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014193 "deleteFilterView": { # Deletes a particular filter view. # Deletes a filter view from a sheet.
14194 "filterId": 42, # The ID of the filter to delete.
14195 },
14196 "mergeCells": { # Merges all cells in the range. # Merges cells together.
14197 "range": { # A range on a sheet. # The range of cells to merge.
14198 # All indexes are zero-based.
14199 # Indexes are half open, e.g the start index is inclusive
14200 # and the end index is exclusive -- [start_index, end_index).
14201 # Missing indexes indicate the range is unbounded on that side.
14202 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014203 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014204 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014205 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014206 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014207 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014208 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014209 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014210 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014211 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014212 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014213 # `Sheet1!A:B == sheet_id: 0,
14214 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014215 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014216 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014217 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014218 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014219 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014220 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014221 #
14222 # The start index must always be less than or equal to the end index.
14223 # If the start index equals the end index, then the range is empty.
14224 # Empty ranges are typically not meaningful and are usually rendered in the
14225 # UI as `#REF!`.
14226 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
14227 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
14228 "sheetId": 42, # The sheet this range is on.
14229 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
14230 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
14231 },
14232 "mergeType": "A String", # How the cells should be merged.
14233 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014234 "deleteProtectedRange": { # Deletes the protected range with the given ID. # Deletes a protected range.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014235 "protectedRangeId": 42, # The ID of the protected range to delete.
14236 },
14237 "addFilterView": { # Adds a filter view. # Adds a filter view.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014238 "filter": { # A filter view. # The filter to add. The filterViewId
14239 # field is optional; if one is not set, an id will be randomly generated. (It
14240 # is an error to specify the ID of a filter that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014241 "title": "A String", # The name of the filter view.
14242 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
14243 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014244 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014245 # may be set.
14246 "filterViewId": 42, # The ID of the filter view.
14247 "range": { # A range on a sheet. # The range this filter view covers.
14248 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014249 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014250 # may be set.
14251 # All indexes are zero-based.
14252 # Indexes are half open, e.g the start index is inclusive
14253 # and the end index is exclusive -- [start_index, end_index).
14254 # Missing indexes indicate the range is unbounded on that side.
14255 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014256 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014257 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014258 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014259 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014260 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014261 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014262 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014263 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014264 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014265 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014266 # `Sheet1!A:B == sheet_id: 0,
14267 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014268 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014269 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014270 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014271 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014272 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014273 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014274 #
14275 # The start index must always be less than or equal to the end index.
14276 # If the start index equals the end index, then the range is empty.
14277 # Empty ranges are typically not meaningful and are usually rendered in the
14278 # UI as `#REF!`.
14279 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
14280 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
14281 "sheetId": 42, # The sheet this range is on.
14282 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
14283 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
14284 },
14285 "sortSpecs": [ # The sort order per column. Later specifications are used when values
14286 # are equal in the earlier specifications.
14287 { # A sort order associated with a specific column or row.
14288 "sortOrder": "A String", # The order data should be sorted.
14289 "dimensionIndex": 42, # The dimension the sort should be applied to.
14290 },
14291 ],
14292 "criteria": { # The criteria for showing/hiding values per column.
14293 # The map's key is the column index, and the value is the criteria for
14294 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014295 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014296 "hiddenValues": [ # Values that should be hidden.
14297 "A String",
14298 ],
14299 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
14300 # (This does not override hiddenValues -- if a value is listed there,
14301 # it will still be hidden.)
14302 # BooleanConditions are used by conditional formatting,
14303 # data validation, and the criteria in filters.
14304 "type": "A String", # The type of condition.
14305 "values": [ # The values of the condition. The number of supported values depends
14306 # on the condition type. Some support zero values,
14307 # others one or two values,
14308 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
14309 { # The value of the condition.
14310 "relativeDate": "A String", # A relative date (based on the current date).
14311 # Valid only if the type is
14312 # DATE_BEFORE,
14313 # DATE_AFTER,
14314 # DATE_ON_OR_BEFORE or
14315 # DATE_ON_OR_AFTER.
14316 #
14317 # Relative dates are not supported in data validation.
14318 # They are supported only in conditional formatting and
14319 # conditional filters.
14320 "userEnteredValue": "A String", # A value the condition is based on.
14321 # The value will be parsed as if the user typed into a cell.
14322 # Formulas are supported (and must begin with an `=`).
14323 },
14324 ],
14325 },
14326 },
14327 },
14328 },
14329 },
14330 "deleteSheet": { # Deletes the requested sheet. # Deletes a sheet.
14331 "sheetId": 42, # The ID of the sheet to delete.
14332 },
14333 "updateBorders": { # Updates the borders of a range. # Updates the borders in a range of cells.
14334 # If a field is not set in the request, that means the border remains as-is.
14335 # For example, with two subsequent UpdateBordersRequest:
14336 #
14337 # 1. range: A1:A5 `{ top: RED, bottom: WHITE }`
14338 # 2. range: A1:A5 `{ left: BLUE }`
14339 #
14340 # That would result in A1:A5 having a borders of
14341 # `{ top: RED, bottom: WHITE, left: BLUE }`.
14342 # If you want to clear a border, explicitly set the style to
14343 # NONE.
14344 "right": { # A border along a cell. # The border to put at the right of the range.
14345 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14346 # for simplicity of conversion to/from color representations in various
14347 # languages over compactness; for example, the fields of this representation
14348 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14349 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14350 # method in iOS; and, with just a little work, it can be easily formatted into
14351 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14352 #
14353 # Example (Java):
14354 #
14355 # import com.google.type.Color;
14356 #
14357 # // ...
14358 # public static java.awt.Color fromProto(Color protocolor) {
14359 # float alpha = protocolor.hasAlpha()
14360 # ? protocolor.getAlpha().getValue()
14361 # : 1.0;
14362 #
14363 # return new java.awt.Color(
14364 # protocolor.getRed(),
14365 # protocolor.getGreen(),
14366 # protocolor.getBlue(),
14367 # alpha);
14368 # }
14369 #
14370 # public static Color toProto(java.awt.Color color) {
14371 # float red = (float) color.getRed();
14372 # float green = (float) color.getGreen();
14373 # float blue = (float) color.getBlue();
14374 # float denominator = 255.0;
14375 # Color.Builder resultBuilder =
14376 # Color
14377 # .newBuilder()
14378 # .setRed(red / denominator)
14379 # .setGreen(green / denominator)
14380 # .setBlue(blue / denominator);
14381 # int alpha = color.getAlpha();
14382 # if (alpha != 255) {
14383 # result.setAlpha(
14384 # FloatValue
14385 # .newBuilder()
14386 # .setValue(((float) alpha) / denominator)
14387 # .build());
14388 # }
14389 # return resultBuilder.build();
14390 # }
14391 # // ...
14392 #
14393 # Example (iOS / Obj-C):
14394 #
14395 # // ...
14396 # static UIColor* fromProto(Color* protocolor) {
14397 # float red = [protocolor red];
14398 # float green = [protocolor green];
14399 # float blue = [protocolor blue];
14400 # FloatValue* alpha_wrapper = [protocolor alpha];
14401 # float alpha = 1.0;
14402 # if (alpha_wrapper != nil) {
14403 # alpha = [alpha_wrapper value];
14404 # }
14405 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14406 # }
14407 #
14408 # static Color* toProto(UIColor* color) {
14409 # CGFloat red, green, blue, alpha;
14410 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14411 # return nil;
14412 # }
14413 # Color* result = [Color alloc] init];
14414 # [result setRed:red];
14415 # [result setGreen:green];
14416 # [result setBlue:blue];
14417 # if (alpha <= 0.9999) {
14418 # [result setAlpha:floatWrapperWithValue(alpha)];
14419 # }
14420 # [result autorelease];
14421 # return result;
14422 # }
14423 # // ...
14424 #
14425 # Example (JavaScript):
14426 #
14427 # // ...
14428 #
14429 # var protoToCssColor = function(rgb_color) {
14430 # var redFrac = rgb_color.red || 0.0;
14431 # var greenFrac = rgb_color.green || 0.0;
14432 # var blueFrac = rgb_color.blue || 0.0;
14433 # var red = Math.floor(redFrac * 255);
14434 # var green = Math.floor(greenFrac * 255);
14435 # var blue = Math.floor(blueFrac * 255);
14436 #
14437 # if (!('alpha' in rgb_color)) {
14438 # return rgbToCssColor_(red, green, blue);
14439 # }
14440 #
14441 # var alphaFrac = rgb_color.alpha.value || 0.0;
14442 # var rgbParams = [red, green, blue].join(',');
14443 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14444 # };
14445 #
14446 # var rgbToCssColor_ = function(red, green, blue) {
14447 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14448 # var hexString = rgbNumber.toString(16);
14449 # var missingZeros = 6 - hexString.length;
14450 # var resultBuilder = ['#'];
14451 # for (var i = 0; i < missingZeros; i++) {
14452 # resultBuilder.push('0');
14453 # }
14454 # resultBuilder.push(hexString);
14455 # return resultBuilder.join('');
14456 # };
14457 #
14458 # // ...
14459 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14460 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14461 # the final pixel color is defined by the equation:
14462 #
14463 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14464 #
14465 # This means that a value of 1.0 corresponds to a solid color, whereas
14466 # a value of 0.0 corresponds to a completely transparent color. This
14467 # uses a wrapper message rather than a simple float scalar so that it is
14468 # possible to distinguish between a default value and the value being unset.
14469 # If omitted, this color object is to be rendered as a solid color
14470 # (as if the alpha value had been explicitly given with a value of 1.0).
14471 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14472 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14473 },
14474 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070014475 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014476 "style": "A String", # The style of the border.
14477 },
14478 "bottom": { # A border along a cell. # The border to put at the bottom of the range.
14479 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14480 # for simplicity of conversion to/from color representations in various
14481 # languages over compactness; for example, the fields of this representation
14482 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14483 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14484 # method in iOS; and, with just a little work, it can be easily formatted into
14485 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14486 #
14487 # Example (Java):
14488 #
14489 # import com.google.type.Color;
14490 #
14491 # // ...
14492 # public static java.awt.Color fromProto(Color protocolor) {
14493 # float alpha = protocolor.hasAlpha()
14494 # ? protocolor.getAlpha().getValue()
14495 # : 1.0;
14496 #
14497 # return new java.awt.Color(
14498 # protocolor.getRed(),
14499 # protocolor.getGreen(),
14500 # protocolor.getBlue(),
14501 # alpha);
14502 # }
14503 #
14504 # public static Color toProto(java.awt.Color color) {
14505 # float red = (float) color.getRed();
14506 # float green = (float) color.getGreen();
14507 # float blue = (float) color.getBlue();
14508 # float denominator = 255.0;
14509 # Color.Builder resultBuilder =
14510 # Color
14511 # .newBuilder()
14512 # .setRed(red / denominator)
14513 # .setGreen(green / denominator)
14514 # .setBlue(blue / denominator);
14515 # int alpha = color.getAlpha();
14516 # if (alpha != 255) {
14517 # result.setAlpha(
14518 # FloatValue
14519 # .newBuilder()
14520 # .setValue(((float) alpha) / denominator)
14521 # .build());
14522 # }
14523 # return resultBuilder.build();
14524 # }
14525 # // ...
14526 #
14527 # Example (iOS / Obj-C):
14528 #
14529 # // ...
14530 # static UIColor* fromProto(Color* protocolor) {
14531 # float red = [protocolor red];
14532 # float green = [protocolor green];
14533 # float blue = [protocolor blue];
14534 # FloatValue* alpha_wrapper = [protocolor alpha];
14535 # float alpha = 1.0;
14536 # if (alpha_wrapper != nil) {
14537 # alpha = [alpha_wrapper value];
14538 # }
14539 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14540 # }
14541 #
14542 # static Color* toProto(UIColor* color) {
14543 # CGFloat red, green, blue, alpha;
14544 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14545 # return nil;
14546 # }
14547 # Color* result = [Color alloc] init];
14548 # [result setRed:red];
14549 # [result setGreen:green];
14550 # [result setBlue:blue];
14551 # if (alpha <= 0.9999) {
14552 # [result setAlpha:floatWrapperWithValue(alpha)];
14553 # }
14554 # [result autorelease];
14555 # return result;
14556 # }
14557 # // ...
14558 #
14559 # Example (JavaScript):
14560 #
14561 # // ...
14562 #
14563 # var protoToCssColor = function(rgb_color) {
14564 # var redFrac = rgb_color.red || 0.0;
14565 # var greenFrac = rgb_color.green || 0.0;
14566 # var blueFrac = rgb_color.blue || 0.0;
14567 # var red = Math.floor(redFrac * 255);
14568 # var green = Math.floor(greenFrac * 255);
14569 # var blue = Math.floor(blueFrac * 255);
14570 #
14571 # if (!('alpha' in rgb_color)) {
14572 # return rgbToCssColor_(red, green, blue);
14573 # }
14574 #
14575 # var alphaFrac = rgb_color.alpha.value || 0.0;
14576 # var rgbParams = [red, green, blue].join(',');
14577 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14578 # };
14579 #
14580 # var rgbToCssColor_ = function(red, green, blue) {
14581 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14582 # var hexString = rgbNumber.toString(16);
14583 # var missingZeros = 6 - hexString.length;
14584 # var resultBuilder = ['#'];
14585 # for (var i = 0; i < missingZeros; i++) {
14586 # resultBuilder.push('0');
14587 # }
14588 # resultBuilder.push(hexString);
14589 # return resultBuilder.join('');
14590 # };
14591 #
14592 # // ...
14593 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14594 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14595 # the final pixel color is defined by the equation:
14596 #
14597 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14598 #
14599 # This means that a value of 1.0 corresponds to a solid color, whereas
14600 # a value of 0.0 corresponds to a completely transparent color. This
14601 # uses a wrapper message rather than a simple float scalar so that it is
14602 # possible to distinguish between a default value and the value being unset.
14603 # If omitted, this color object is to be rendered as a solid color
14604 # (as if the alpha value had been explicitly given with a value of 1.0).
14605 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14606 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14607 },
14608 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070014609 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014610 "style": "A String", # The style of the border.
14611 },
14612 "top": { # A border along a cell. # The border to put at the top of the range.
14613 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14614 # for simplicity of conversion to/from color representations in various
14615 # languages over compactness; for example, the fields of this representation
14616 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14617 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14618 # method in iOS; and, with just a little work, it can be easily formatted into
14619 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14620 #
14621 # Example (Java):
14622 #
14623 # import com.google.type.Color;
14624 #
14625 # // ...
14626 # public static java.awt.Color fromProto(Color protocolor) {
14627 # float alpha = protocolor.hasAlpha()
14628 # ? protocolor.getAlpha().getValue()
14629 # : 1.0;
14630 #
14631 # return new java.awt.Color(
14632 # protocolor.getRed(),
14633 # protocolor.getGreen(),
14634 # protocolor.getBlue(),
14635 # alpha);
14636 # }
14637 #
14638 # public static Color toProto(java.awt.Color color) {
14639 # float red = (float) color.getRed();
14640 # float green = (float) color.getGreen();
14641 # float blue = (float) color.getBlue();
14642 # float denominator = 255.0;
14643 # Color.Builder resultBuilder =
14644 # Color
14645 # .newBuilder()
14646 # .setRed(red / denominator)
14647 # .setGreen(green / denominator)
14648 # .setBlue(blue / denominator);
14649 # int alpha = color.getAlpha();
14650 # if (alpha != 255) {
14651 # result.setAlpha(
14652 # FloatValue
14653 # .newBuilder()
14654 # .setValue(((float) alpha) / denominator)
14655 # .build());
14656 # }
14657 # return resultBuilder.build();
14658 # }
14659 # // ...
14660 #
14661 # Example (iOS / Obj-C):
14662 #
14663 # // ...
14664 # static UIColor* fromProto(Color* protocolor) {
14665 # float red = [protocolor red];
14666 # float green = [protocolor green];
14667 # float blue = [protocolor blue];
14668 # FloatValue* alpha_wrapper = [protocolor alpha];
14669 # float alpha = 1.0;
14670 # if (alpha_wrapper != nil) {
14671 # alpha = [alpha_wrapper value];
14672 # }
14673 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14674 # }
14675 #
14676 # static Color* toProto(UIColor* color) {
14677 # CGFloat red, green, blue, alpha;
14678 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14679 # return nil;
14680 # }
14681 # Color* result = [Color alloc] init];
14682 # [result setRed:red];
14683 # [result setGreen:green];
14684 # [result setBlue:blue];
14685 # if (alpha <= 0.9999) {
14686 # [result setAlpha:floatWrapperWithValue(alpha)];
14687 # }
14688 # [result autorelease];
14689 # return result;
14690 # }
14691 # // ...
14692 #
14693 # Example (JavaScript):
14694 #
14695 # // ...
14696 #
14697 # var protoToCssColor = function(rgb_color) {
14698 # var redFrac = rgb_color.red || 0.0;
14699 # var greenFrac = rgb_color.green || 0.0;
14700 # var blueFrac = rgb_color.blue || 0.0;
14701 # var red = Math.floor(redFrac * 255);
14702 # var green = Math.floor(greenFrac * 255);
14703 # var blue = Math.floor(blueFrac * 255);
14704 #
14705 # if (!('alpha' in rgb_color)) {
14706 # return rgbToCssColor_(red, green, blue);
14707 # }
14708 #
14709 # var alphaFrac = rgb_color.alpha.value || 0.0;
14710 # var rgbParams = [red, green, blue].join(',');
14711 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14712 # };
14713 #
14714 # var rgbToCssColor_ = function(red, green, blue) {
14715 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14716 # var hexString = rgbNumber.toString(16);
14717 # var missingZeros = 6 - hexString.length;
14718 # var resultBuilder = ['#'];
14719 # for (var i = 0; i < missingZeros; i++) {
14720 # resultBuilder.push('0');
14721 # }
14722 # resultBuilder.push(hexString);
14723 # return resultBuilder.join('');
14724 # };
14725 #
14726 # // ...
14727 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14728 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14729 # the final pixel color is defined by the equation:
14730 #
14731 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14732 #
14733 # This means that a value of 1.0 corresponds to a solid color, whereas
14734 # a value of 0.0 corresponds to a completely transparent color. This
14735 # uses a wrapper message rather than a simple float scalar so that it is
14736 # possible to distinguish between a default value and the value being unset.
14737 # If omitted, this color object is to be rendered as a solid color
14738 # (as if the alpha value had been explicitly given with a value of 1.0).
14739 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14740 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14741 },
14742 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070014743 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014744 "style": "A String", # The style of the border.
14745 },
14746 "innerHorizontal": { # A border along a cell. # The horizontal border to put within the range.
14747 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14748 # for simplicity of conversion to/from color representations in various
14749 # languages over compactness; for example, the fields of this representation
14750 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14751 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14752 # method in iOS; and, with just a little work, it can be easily formatted into
14753 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14754 #
14755 # Example (Java):
14756 #
14757 # import com.google.type.Color;
14758 #
14759 # // ...
14760 # public static java.awt.Color fromProto(Color protocolor) {
14761 # float alpha = protocolor.hasAlpha()
14762 # ? protocolor.getAlpha().getValue()
14763 # : 1.0;
14764 #
14765 # return new java.awt.Color(
14766 # protocolor.getRed(),
14767 # protocolor.getGreen(),
14768 # protocolor.getBlue(),
14769 # alpha);
14770 # }
14771 #
14772 # public static Color toProto(java.awt.Color color) {
14773 # float red = (float) color.getRed();
14774 # float green = (float) color.getGreen();
14775 # float blue = (float) color.getBlue();
14776 # float denominator = 255.0;
14777 # Color.Builder resultBuilder =
14778 # Color
14779 # .newBuilder()
14780 # .setRed(red / denominator)
14781 # .setGreen(green / denominator)
14782 # .setBlue(blue / denominator);
14783 # int alpha = color.getAlpha();
14784 # if (alpha != 255) {
14785 # result.setAlpha(
14786 # FloatValue
14787 # .newBuilder()
14788 # .setValue(((float) alpha) / denominator)
14789 # .build());
14790 # }
14791 # return resultBuilder.build();
14792 # }
14793 # // ...
14794 #
14795 # Example (iOS / Obj-C):
14796 #
14797 # // ...
14798 # static UIColor* fromProto(Color* protocolor) {
14799 # float red = [protocolor red];
14800 # float green = [protocolor green];
14801 # float blue = [protocolor blue];
14802 # FloatValue* alpha_wrapper = [protocolor alpha];
14803 # float alpha = 1.0;
14804 # if (alpha_wrapper != nil) {
14805 # alpha = [alpha_wrapper value];
14806 # }
14807 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14808 # }
14809 #
14810 # static Color* toProto(UIColor* color) {
14811 # CGFloat red, green, blue, alpha;
14812 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14813 # return nil;
14814 # }
14815 # Color* result = [Color alloc] init];
14816 # [result setRed:red];
14817 # [result setGreen:green];
14818 # [result setBlue:blue];
14819 # if (alpha <= 0.9999) {
14820 # [result setAlpha:floatWrapperWithValue(alpha)];
14821 # }
14822 # [result autorelease];
14823 # return result;
14824 # }
14825 # // ...
14826 #
14827 # Example (JavaScript):
14828 #
14829 # // ...
14830 #
14831 # var protoToCssColor = function(rgb_color) {
14832 # var redFrac = rgb_color.red || 0.0;
14833 # var greenFrac = rgb_color.green || 0.0;
14834 # var blueFrac = rgb_color.blue || 0.0;
14835 # var red = Math.floor(redFrac * 255);
14836 # var green = Math.floor(greenFrac * 255);
14837 # var blue = Math.floor(blueFrac * 255);
14838 #
14839 # if (!('alpha' in rgb_color)) {
14840 # return rgbToCssColor_(red, green, blue);
14841 # }
14842 #
14843 # var alphaFrac = rgb_color.alpha.value || 0.0;
14844 # var rgbParams = [red, green, blue].join(',');
14845 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14846 # };
14847 #
14848 # var rgbToCssColor_ = function(red, green, blue) {
14849 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14850 # var hexString = rgbNumber.toString(16);
14851 # var missingZeros = 6 - hexString.length;
14852 # var resultBuilder = ['#'];
14853 # for (var i = 0; i < missingZeros; i++) {
14854 # resultBuilder.push('0');
14855 # }
14856 # resultBuilder.push(hexString);
14857 # return resultBuilder.join('');
14858 # };
14859 #
14860 # // ...
14861 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14862 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14863 # the final pixel color is defined by the equation:
14864 #
14865 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14866 #
14867 # This means that a value of 1.0 corresponds to a solid color, whereas
14868 # a value of 0.0 corresponds to a completely transparent color. This
14869 # uses a wrapper message rather than a simple float scalar so that it is
14870 # possible to distinguish between a default value and the value being unset.
14871 # If omitted, this color object is to be rendered as a solid color
14872 # (as if the alpha value had been explicitly given with a value of 1.0).
14873 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14874 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14875 },
14876 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070014877 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014878 "style": "A String", # The style of the border.
14879 },
14880 "range": { # A range on a sheet. # The range whose borders should be updated.
14881 # All indexes are zero-based.
14882 # Indexes are half open, e.g the start index is inclusive
14883 # and the end index is exclusive -- [start_index, end_index).
14884 # Missing indexes indicate the range is unbounded on that side.
14885 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014886 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014887 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014888 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014889 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014890 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014891 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014892 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014893 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014894 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014895 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014896 # `Sheet1!A:B == sheet_id: 0,
14897 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014898 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014899 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014900 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014901 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014902 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014903 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014904 #
14905 # The start index must always be less than or equal to the end index.
14906 # If the start index equals the end index, then the range is empty.
14907 # Empty ranges are typically not meaningful and are usually rendered in the
14908 # UI as `#REF!`.
14909 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
14910 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
14911 "sheetId": 42, # The sheet this range is on.
14912 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
14913 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
14914 },
14915 "innerVertical": { # A border along a cell. # The vertical border to put within the range.
14916 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14917 # for simplicity of conversion to/from color representations in various
14918 # languages over compactness; for example, the fields of this representation
14919 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14920 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14921 # method in iOS; and, with just a little work, it can be easily formatted into
14922 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14923 #
14924 # Example (Java):
14925 #
14926 # import com.google.type.Color;
14927 #
14928 # // ...
14929 # public static java.awt.Color fromProto(Color protocolor) {
14930 # float alpha = protocolor.hasAlpha()
14931 # ? protocolor.getAlpha().getValue()
14932 # : 1.0;
14933 #
14934 # return new java.awt.Color(
14935 # protocolor.getRed(),
14936 # protocolor.getGreen(),
14937 # protocolor.getBlue(),
14938 # alpha);
14939 # }
14940 #
14941 # public static Color toProto(java.awt.Color color) {
14942 # float red = (float) color.getRed();
14943 # float green = (float) color.getGreen();
14944 # float blue = (float) color.getBlue();
14945 # float denominator = 255.0;
14946 # Color.Builder resultBuilder =
14947 # Color
14948 # .newBuilder()
14949 # .setRed(red / denominator)
14950 # .setGreen(green / denominator)
14951 # .setBlue(blue / denominator);
14952 # int alpha = color.getAlpha();
14953 # if (alpha != 255) {
14954 # result.setAlpha(
14955 # FloatValue
14956 # .newBuilder()
14957 # .setValue(((float) alpha) / denominator)
14958 # .build());
14959 # }
14960 # return resultBuilder.build();
14961 # }
14962 # // ...
14963 #
14964 # Example (iOS / Obj-C):
14965 #
14966 # // ...
14967 # static UIColor* fromProto(Color* protocolor) {
14968 # float red = [protocolor red];
14969 # float green = [protocolor green];
14970 # float blue = [protocolor blue];
14971 # FloatValue* alpha_wrapper = [protocolor alpha];
14972 # float alpha = 1.0;
14973 # if (alpha_wrapper != nil) {
14974 # alpha = [alpha_wrapper value];
14975 # }
14976 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14977 # }
14978 #
14979 # static Color* toProto(UIColor* color) {
14980 # CGFloat red, green, blue, alpha;
14981 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14982 # return nil;
14983 # }
14984 # Color* result = [Color alloc] init];
14985 # [result setRed:red];
14986 # [result setGreen:green];
14987 # [result setBlue:blue];
14988 # if (alpha <= 0.9999) {
14989 # [result setAlpha:floatWrapperWithValue(alpha)];
14990 # }
14991 # [result autorelease];
14992 # return result;
14993 # }
14994 # // ...
14995 #
14996 # Example (JavaScript):
14997 #
14998 # // ...
14999 #
15000 # var protoToCssColor = function(rgb_color) {
15001 # var redFrac = rgb_color.red || 0.0;
15002 # var greenFrac = rgb_color.green || 0.0;
15003 # var blueFrac = rgb_color.blue || 0.0;
15004 # var red = Math.floor(redFrac * 255);
15005 # var green = Math.floor(greenFrac * 255);
15006 # var blue = Math.floor(blueFrac * 255);
15007 #
15008 # if (!('alpha' in rgb_color)) {
15009 # return rgbToCssColor_(red, green, blue);
15010 # }
15011 #
15012 # var alphaFrac = rgb_color.alpha.value || 0.0;
15013 # var rgbParams = [red, green, blue].join(',');
15014 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15015 # };
15016 #
15017 # var rgbToCssColor_ = function(red, green, blue) {
15018 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15019 # var hexString = rgbNumber.toString(16);
15020 # var missingZeros = 6 - hexString.length;
15021 # var resultBuilder = ['#'];
15022 # for (var i = 0; i < missingZeros; i++) {
15023 # resultBuilder.push('0');
15024 # }
15025 # resultBuilder.push(hexString);
15026 # return resultBuilder.join('');
15027 # };
15028 #
15029 # // ...
15030 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15031 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15032 # the final pixel color is defined by the equation:
15033 #
15034 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15035 #
15036 # This means that a value of 1.0 corresponds to a solid color, whereas
15037 # a value of 0.0 corresponds to a completely transparent color. This
15038 # uses a wrapper message rather than a simple float scalar so that it is
15039 # possible to distinguish between a default value and the value being unset.
15040 # If omitted, this color object is to be rendered as a solid color
15041 # (as if the alpha value had been explicitly given with a value of 1.0).
15042 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15043 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15044 },
15045 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070015046 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015047 "style": "A String", # The style of the border.
15048 },
15049 "left": { # A border along a cell. # The border to put at the left of the range.
15050 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
15051 # for simplicity of conversion to/from color representations in various
15052 # languages over compactness; for example, the fields of this representation
15053 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15054 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15055 # method in iOS; and, with just a little work, it can be easily formatted into
15056 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15057 #
15058 # Example (Java):
15059 #
15060 # import com.google.type.Color;
15061 #
15062 # // ...
15063 # public static java.awt.Color fromProto(Color protocolor) {
15064 # float alpha = protocolor.hasAlpha()
15065 # ? protocolor.getAlpha().getValue()
15066 # : 1.0;
15067 #
15068 # return new java.awt.Color(
15069 # protocolor.getRed(),
15070 # protocolor.getGreen(),
15071 # protocolor.getBlue(),
15072 # alpha);
15073 # }
15074 #
15075 # public static Color toProto(java.awt.Color color) {
15076 # float red = (float) color.getRed();
15077 # float green = (float) color.getGreen();
15078 # float blue = (float) color.getBlue();
15079 # float denominator = 255.0;
15080 # Color.Builder resultBuilder =
15081 # Color
15082 # .newBuilder()
15083 # .setRed(red / denominator)
15084 # .setGreen(green / denominator)
15085 # .setBlue(blue / denominator);
15086 # int alpha = color.getAlpha();
15087 # if (alpha != 255) {
15088 # result.setAlpha(
15089 # FloatValue
15090 # .newBuilder()
15091 # .setValue(((float) alpha) / denominator)
15092 # .build());
15093 # }
15094 # return resultBuilder.build();
15095 # }
15096 # // ...
15097 #
15098 # Example (iOS / Obj-C):
15099 #
15100 # // ...
15101 # static UIColor* fromProto(Color* protocolor) {
15102 # float red = [protocolor red];
15103 # float green = [protocolor green];
15104 # float blue = [protocolor blue];
15105 # FloatValue* alpha_wrapper = [protocolor alpha];
15106 # float alpha = 1.0;
15107 # if (alpha_wrapper != nil) {
15108 # alpha = [alpha_wrapper value];
15109 # }
15110 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15111 # }
15112 #
15113 # static Color* toProto(UIColor* color) {
15114 # CGFloat red, green, blue, alpha;
15115 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15116 # return nil;
15117 # }
15118 # Color* result = [Color alloc] init];
15119 # [result setRed:red];
15120 # [result setGreen:green];
15121 # [result setBlue:blue];
15122 # if (alpha <= 0.9999) {
15123 # [result setAlpha:floatWrapperWithValue(alpha)];
15124 # }
15125 # [result autorelease];
15126 # return result;
15127 # }
15128 # // ...
15129 #
15130 # Example (JavaScript):
15131 #
15132 # // ...
15133 #
15134 # var protoToCssColor = function(rgb_color) {
15135 # var redFrac = rgb_color.red || 0.0;
15136 # var greenFrac = rgb_color.green || 0.0;
15137 # var blueFrac = rgb_color.blue || 0.0;
15138 # var red = Math.floor(redFrac * 255);
15139 # var green = Math.floor(greenFrac * 255);
15140 # var blue = Math.floor(blueFrac * 255);
15141 #
15142 # if (!('alpha' in rgb_color)) {
15143 # return rgbToCssColor_(red, green, blue);
15144 # }
15145 #
15146 # var alphaFrac = rgb_color.alpha.value || 0.0;
15147 # var rgbParams = [red, green, blue].join(',');
15148 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15149 # };
15150 #
15151 # var rgbToCssColor_ = function(red, green, blue) {
15152 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15153 # var hexString = rgbNumber.toString(16);
15154 # var missingZeros = 6 - hexString.length;
15155 # var resultBuilder = ['#'];
15156 # for (var i = 0; i < missingZeros; i++) {
15157 # resultBuilder.push('0');
15158 # }
15159 # resultBuilder.push(hexString);
15160 # return resultBuilder.join('');
15161 # };
15162 #
15163 # // ...
15164 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15165 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15166 # the final pixel color is defined by the equation:
15167 #
15168 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15169 #
15170 # This means that a value of 1.0 corresponds to a solid color, whereas
15171 # a value of 0.0 corresponds to a completely transparent color. This
15172 # uses a wrapper message rather than a simple float scalar so that it is
15173 # possible to distinguish between a default value and the value being unset.
15174 # If omitted, this color object is to be rendered as a solid color
15175 # (as if the alpha value had been explicitly given with a value of 1.0).
15176 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15177 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15178 },
15179 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070015180 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015181 "style": "A String", # The style of the border.
15182 },
15183 },
15184 "cutPaste": { # Moves data from the source to the destination. # Cuts data from one area and pastes it to another.
15185 "pasteType": "A String", # What kind of data to paste. All the source data will be cut, regardless
15186 # of what is pasted.
15187 "source": { # A range on a sheet. # The source data to cut.
15188 # All indexes are zero-based.
15189 # Indexes are half open, e.g the start index is inclusive
15190 # and the end index is exclusive -- [start_index, end_index).
15191 # Missing indexes indicate the range is unbounded on that side.
15192 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015193 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015194 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015195 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015196 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015197 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015198 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015199 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015200 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015201 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015202 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015203 # `Sheet1!A:B == sheet_id: 0,
15204 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015205 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015206 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015207 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015208 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015209 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015210 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015211 #
15212 # The start index must always be less than or equal to the end index.
15213 # If the start index equals the end index, then the range is empty.
15214 # Empty ranges are typically not meaningful and are usually rendered in the
15215 # UI as `#REF!`.
15216 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
15217 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
15218 "sheetId": 42, # The sheet this range is on.
15219 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
15220 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
15221 },
15222 "destination": { # A coordinate in a sheet. # The top-left coordinate where the data should be pasted.
15223 # All indexes are zero-based.
15224 "rowIndex": 42, # The row index of the coordinate.
15225 "columnIndex": 42, # The column index of the coordinate.
15226 "sheetId": 42, # The sheet this coordinate is on.
15227 },
15228 },
15229 "copyPaste": { # Copies data from the source to the destination. # Copies data from one area and pastes it to another.
15230 "pasteType": "A String", # What kind of data to paste.
15231 "source": { # A range on a sheet. # The source range to copy.
15232 # All indexes are zero-based.
15233 # Indexes are half open, e.g the start index is inclusive
15234 # and the end index is exclusive -- [start_index, end_index).
15235 # Missing indexes indicate the range is unbounded on that side.
15236 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015237 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015238 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015239 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015240 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015241 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015242 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015243 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015244 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015245 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015246 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015247 # `Sheet1!A:B == sheet_id: 0,
15248 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015249 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015250 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015251 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015252 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015253 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015254 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015255 #
15256 # The start index must always be less than or equal to the end index.
15257 # If the start index equals the end index, then the range is empty.
15258 # Empty ranges are typically not meaningful and are usually rendered in the
15259 # UI as `#REF!`.
15260 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
15261 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
15262 "sheetId": 42, # The sheet this range is on.
15263 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
15264 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
15265 },
15266 "destination": { # A range on a sheet. # The location to paste to. If the range covers a span that's
15267 # a multiple of the source's height or width, then the
15268 # data will be repeated to fill in the destination range.
15269 # If the range is smaller than the source range, the entire
15270 # source data will still be copied (beyond the end of the destination range).
15271 # All indexes are zero-based.
15272 # Indexes are half open, e.g the start index is inclusive
15273 # and the end index is exclusive -- [start_index, end_index).
15274 # Missing indexes indicate the range is unbounded on that side.
15275 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015276 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015277 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015278 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015279 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015280 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015281 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015282 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015283 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015284 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015285 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015286 # `Sheet1!A:B == sheet_id: 0,
15287 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015288 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015289 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015290 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015291 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015292 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015293 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015294 #
15295 # The start index must always be less than or equal to the end index.
15296 # If the start index equals the end index, then the range is empty.
15297 # Empty ranges are typically not meaningful and are usually rendered in the
15298 # UI as `#REF!`.
15299 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
15300 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
15301 "sheetId": 42, # The sheet this range is on.
15302 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
15303 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
15304 },
15305 "pasteOrientation": "A String", # How that data should be oriented when pasting.
15306 },
15307 "addSheet": { # Adds a new sheet. # Adds a sheet.
15308 # When a sheet is added at a given index,
15309 # all subsequent sheets' indexes are incremented.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015310 # To add an object sheet, use AddChartRequest instead and specify
15311 # EmbeddedObjectPosition.sheetId or
15312 # EmbeddedObjectPosition.newSheet.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015313 "properties": { # Properties of a sheet. # The properties the new sheet should have.
15314 # All properties are optional.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015315 # The sheetId field is optional; if one is not
15316 # set, an id will be randomly generated. (It is an error to specify the ID
15317 # of a sheet that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015318 "sheetType": "A String", # The type of sheet. Defaults to GRID.
15319 # This field cannot be changed once set.
15320 "index": 42, # The index of the sheet within the spreadsheet.
15321 # When adding or updating sheet properties, if this field
15322 # is excluded then the sheet will be added or moved to the end
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080015323 # of the sheet list. When updating sheet indices or inserting
15324 # sheets, movement is considered in "before the move" indexes.
15325 # For example, if there were 3 sheets (S1, S2, S3) in order to
15326 # move S1 ahead of S2 the index would have to be set to 2. A sheet
15327 # index update request will be ignored if the requested index is
15328 # identical to the sheets current index or if the requested new
15329 # index is equal to the current sheet index + 1.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015330 "title": "A String", # The name of the sheet.
15331 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
15332 # (If the sheet is an object sheet, containing a chart or image, then
15333 # this field will be absent.)
15334 # When writing it is an error to set any grid properties on non-grid sheets.
15335 "columnCount": 42, # The number of columns in the grid.
15336 "rowCount": 42, # The number of rows in the grid.
15337 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
15338 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
15339 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
15340 },
15341 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
15342 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
15343 # for simplicity of conversion to/from color representations in various
15344 # languages over compactness; for example, the fields of this representation
15345 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15346 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15347 # method in iOS; and, with just a little work, it can be easily formatted into
15348 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15349 #
15350 # Example (Java):
15351 #
15352 # import com.google.type.Color;
15353 #
15354 # // ...
15355 # public static java.awt.Color fromProto(Color protocolor) {
15356 # float alpha = protocolor.hasAlpha()
15357 # ? protocolor.getAlpha().getValue()
15358 # : 1.0;
15359 #
15360 # return new java.awt.Color(
15361 # protocolor.getRed(),
15362 # protocolor.getGreen(),
15363 # protocolor.getBlue(),
15364 # alpha);
15365 # }
15366 #
15367 # public static Color toProto(java.awt.Color color) {
15368 # float red = (float) color.getRed();
15369 # float green = (float) color.getGreen();
15370 # float blue = (float) color.getBlue();
15371 # float denominator = 255.0;
15372 # Color.Builder resultBuilder =
15373 # Color
15374 # .newBuilder()
15375 # .setRed(red / denominator)
15376 # .setGreen(green / denominator)
15377 # .setBlue(blue / denominator);
15378 # int alpha = color.getAlpha();
15379 # if (alpha != 255) {
15380 # result.setAlpha(
15381 # FloatValue
15382 # .newBuilder()
15383 # .setValue(((float) alpha) / denominator)
15384 # .build());
15385 # }
15386 # return resultBuilder.build();
15387 # }
15388 # // ...
15389 #
15390 # Example (iOS / Obj-C):
15391 #
15392 # // ...
15393 # static UIColor* fromProto(Color* protocolor) {
15394 # float red = [protocolor red];
15395 # float green = [protocolor green];
15396 # float blue = [protocolor blue];
15397 # FloatValue* alpha_wrapper = [protocolor alpha];
15398 # float alpha = 1.0;
15399 # if (alpha_wrapper != nil) {
15400 # alpha = [alpha_wrapper value];
15401 # }
15402 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15403 # }
15404 #
15405 # static Color* toProto(UIColor* color) {
15406 # CGFloat red, green, blue, alpha;
15407 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15408 # return nil;
15409 # }
15410 # Color* result = [Color alloc] init];
15411 # [result setRed:red];
15412 # [result setGreen:green];
15413 # [result setBlue:blue];
15414 # if (alpha <= 0.9999) {
15415 # [result setAlpha:floatWrapperWithValue(alpha)];
15416 # }
15417 # [result autorelease];
15418 # return result;
15419 # }
15420 # // ...
15421 #
15422 # Example (JavaScript):
15423 #
15424 # // ...
15425 #
15426 # var protoToCssColor = function(rgb_color) {
15427 # var redFrac = rgb_color.red || 0.0;
15428 # var greenFrac = rgb_color.green || 0.0;
15429 # var blueFrac = rgb_color.blue || 0.0;
15430 # var red = Math.floor(redFrac * 255);
15431 # var green = Math.floor(greenFrac * 255);
15432 # var blue = Math.floor(blueFrac * 255);
15433 #
15434 # if (!('alpha' in rgb_color)) {
15435 # return rgbToCssColor_(red, green, blue);
15436 # }
15437 #
15438 # var alphaFrac = rgb_color.alpha.value || 0.0;
15439 # var rgbParams = [red, green, blue].join(',');
15440 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15441 # };
15442 #
15443 # var rgbToCssColor_ = function(red, green, blue) {
15444 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15445 # var hexString = rgbNumber.toString(16);
15446 # var missingZeros = 6 - hexString.length;
15447 # var resultBuilder = ['#'];
15448 # for (var i = 0; i < missingZeros; i++) {
15449 # resultBuilder.push('0');
15450 # }
15451 # resultBuilder.push(hexString);
15452 # return resultBuilder.join('');
15453 # };
15454 #
15455 # // ...
15456 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15457 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15458 # the final pixel color is defined by the equation:
15459 #
15460 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15461 #
15462 # This means that a value of 1.0 corresponds to a solid color, whereas
15463 # a value of 0.0 corresponds to a completely transparent color. This
15464 # uses a wrapper message rather than a simple float scalar so that it is
15465 # possible to distinguish between a default value and the value being unset.
15466 # If omitted, this color object is to be rendered as a solid color
15467 # (as if the alpha value had been explicitly given with a value of 1.0).
15468 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15469 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15470 },
15471 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
15472 "sheetId": 42, # The ID of the sheet. Must be non-negative.
15473 # This field cannot be changed once set.
15474 },
15475 },
15476 "deleteNamedRange": { # Removes the named range with the given ID from the spreadsheet. # Deletes a named range.
15477 "namedRangeId": "A String", # The ID of the named range to delete.
15478 },
15479 "updateNamedRange": { # Updates properties of the named range with the specified # Updates a named range.
15480 # namedRangeId.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015481 "fields": "A String", # The fields that should be updated. At least one field must be specified.
15482 # The root `namedRange` is implied and should not be specified.
15483 # A single `"*"` can be used as short-hand for listing every field.
15484 "namedRange": { # A named range. # The named range to update with the new properties.
15485 "namedRangeId": "A String", # The ID of the named range.
15486 "range": { # A range on a sheet. # The range this represents.
15487 # All indexes are zero-based.
15488 # Indexes are half open, e.g the start index is inclusive
15489 # and the end index is exclusive -- [start_index, end_index).
15490 # Missing indexes indicate the range is unbounded on that side.
15491 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015492 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015493 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015494 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015495 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015496 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015497 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015498 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015499 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015500 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015501 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015502 # `Sheet1!A:B == sheet_id: 0,
15503 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015504 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015505 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015506 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015507 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015508 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015509 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015510 #
15511 # The start index must always be less than or equal to the end index.
15512 # If the start index equals the end index, then the range is empty.
15513 # Empty ranges are typically not meaningful and are usually rendered in the
15514 # UI as `#REF!`.
15515 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
15516 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
15517 "sheetId": 42, # The sheet this range is on.
15518 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
15519 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
15520 },
15521 "name": "A String", # The name of the named range.
15522 },
15523 },
15524 "insertDimension": { # Inserts rows or columns in a sheet at a particular index. # Inserts new rows or columns in a sheet.
15525 "inheritFromBefore": True or False, # Whether dimension properties should be extended from the dimensions
15526 # before or after the newly inserted dimensions.
15527 # True to inherit from the dimensions before (in which case the start
15528 # index must be greater than 0), and false to inherit from the dimensions
15529 # after.
15530 #
15531 # For example, if row index 0 has red background and row index 1
15532 # has a green background, then inserting 2 rows at index 1 can inherit
15533 # either the green or red background. If `inheritFromBefore` is true,
15534 # the two new rows will be red (because the row before the insertion point
15535 # was red), whereas if `inheritFromBefore` is false, the two new rows will
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015536 # be green (because the row after the insertion point was green).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015537 "range": { # A range along a single dimension on a sheet. # The dimensions to insert. Both the start and end indexes must be bounded.
15538 # All indexes are zero-based.
15539 # Indexes are half open: the start index is inclusive
15540 # and the end index is exclusive.
15541 # Missing indexes indicate the range is unbounded on that side.
15542 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
15543 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
15544 "sheetId": 42, # The sheet this span is on.
15545 "dimension": "A String", # The dimension of the span.
15546 },
15547 },
15548 "updateFilterView": { # Updates properties of the filter view. # Updates the properties of a filter view.
15549 "filter": { # A filter view. # The new properties of the filter view.
15550 "title": "A String", # The name of the filter view.
15551 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
15552 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015553 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015554 # may be set.
15555 "filterViewId": 42, # The ID of the filter view.
15556 "range": { # A range on a sheet. # The range this filter view covers.
15557 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015558 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015559 # may be set.
15560 # All indexes are zero-based.
15561 # Indexes are half open, e.g the start index is inclusive
15562 # and the end index is exclusive -- [start_index, end_index).
15563 # Missing indexes indicate the range is unbounded on that side.
15564 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015565 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015566 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015567 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015568 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015569 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015570 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015571 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015572 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015573 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015574 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015575 # `Sheet1!A:B == sheet_id: 0,
15576 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015577 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015578 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015579 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015580 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015581 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015582 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015583 #
15584 # The start index must always be less than or equal to the end index.
15585 # If the start index equals the end index, then the range is empty.
15586 # Empty ranges are typically not meaningful and are usually rendered in the
15587 # UI as `#REF!`.
15588 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
15589 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
15590 "sheetId": 42, # The sheet this range is on.
15591 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
15592 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
15593 },
15594 "sortSpecs": [ # The sort order per column. Later specifications are used when values
15595 # are equal in the earlier specifications.
15596 { # A sort order associated with a specific column or row.
15597 "sortOrder": "A String", # The order data should be sorted.
15598 "dimensionIndex": 42, # The dimension the sort should be applied to.
15599 },
15600 ],
15601 "criteria": { # The criteria for showing/hiding values per column.
15602 # The map's key is the column index, and the value is the criteria for
15603 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015604 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015605 "hiddenValues": [ # Values that should be hidden.
15606 "A String",
15607 ],
15608 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
15609 # (This does not override hiddenValues -- if a value is listed there,
15610 # it will still be hidden.)
15611 # BooleanConditions are used by conditional formatting,
15612 # data validation, and the criteria in filters.
15613 "type": "A String", # The type of condition.
15614 "values": [ # The values of the condition. The number of supported values depends
15615 # on the condition type. Some support zero values,
15616 # others one or two values,
15617 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
15618 { # The value of the condition.
15619 "relativeDate": "A String", # A relative date (based on the current date).
15620 # Valid only if the type is
15621 # DATE_BEFORE,
15622 # DATE_AFTER,
15623 # DATE_ON_OR_BEFORE or
15624 # DATE_ON_OR_AFTER.
15625 #
15626 # Relative dates are not supported in data validation.
15627 # They are supported only in conditional formatting and
15628 # conditional filters.
15629 "userEnteredValue": "A String", # A value the condition is based on.
15630 # The value will be parsed as if the user typed into a cell.
15631 # Formulas are supported (and must begin with an `=`).
15632 },
15633 ],
15634 },
15635 },
15636 },
15637 },
15638 "fields": "A String", # The fields that should be updated. At least one field must be specified.
15639 # The root `filter` is implied and should not be specified.
15640 # A single `"*"` can be used as short-hand for listing every field.
15641 },
15642 "deleteConditionalFormatRule": { # Deletes a conditional format rule at the given index. # Deletes an existing conditional format rule.
15643 # All subsequent rules' indexes are decremented.
15644 "index": 42, # The zero-based index of the rule to be deleted.
15645 "sheetId": 42, # The sheet the rule is being deleted from.
15646 },
15647 },
15648 ],
15649 }
15650
15651 x__xgafv: string, V1 error format.
15652 Allowed values
15653 1 - v1 error format
15654 2 - v2 error format
15655
15656Returns:
15657 An object of the form:
15658
15659 { # The reply for batch updating a spreadsheet.
15660 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080015661 "updatedSpreadsheet": { # Resource that represents a spreadsheet. # The spreadsheet after updates were applied. This is only set if
15662 # [BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response] is `true`.
15663 "spreadsheetId": "A String", # The ID of the spreadsheet.
15664 # This field is read-only.
15665 "namedRanges": [ # The named ranges defined in a spreadsheet.
15666 { # A named range.
15667 "namedRangeId": "A String", # The ID of the named range.
15668 "range": { # A range on a sheet. # The range this represents.
15669 # All indexes are zero-based.
15670 # Indexes are half open, e.g the start index is inclusive
15671 # and the end index is exclusive -- [start_index, end_index).
15672 # Missing indexes indicate the range is unbounded on that side.
15673 #
15674 # For example, if `"Sheet1"` is sheet ID 0, then:
15675 #
15676 # `Sheet1!A1:A1 == sheet_id: 0,
15677 # start_row_index: 0, end_row_index: 1,
15678 # start_column_index: 0, end_column_index: 1`
15679 #
15680 # `Sheet1!A3:B4 == sheet_id: 0,
15681 # start_row_index: 2, end_row_index: 4,
15682 # start_column_index: 0, end_column_index: 2`
15683 #
15684 # `Sheet1!A:B == sheet_id: 0,
15685 # start_column_index: 0, end_column_index: 2`
15686 #
15687 # `Sheet1!A5:B == sheet_id: 0,
15688 # start_row_index: 4,
15689 # start_column_index: 0, end_column_index: 2`
15690 #
15691 # `Sheet1 == sheet_id:0`
15692 #
15693 # The start index must always be less than or equal to the end index.
15694 # If the start index equals the end index, then the range is empty.
15695 # Empty ranges are typically not meaningful and are usually rendered in the
15696 # UI as `#REF!`.
15697 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
15698 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
15699 "sheetId": 42, # The sheet this range is on.
15700 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
15701 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
15702 },
15703 "name": "A String", # The name of the named range.
15704 },
15705 ],
15706 "properties": { # Properties of a spreadsheet. # Overall properties of a spreadsheet.
15707 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
15708 #
15709 # * an ISO 639-1 language code such as `en`
15710 #
15711 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
15712 #
15713 # * a combination of the ISO language code and country code, such as `en_US`
15714 #
15715 # Note: when updating this field, not all locales/languages are supported.
15716 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
15717 # `America/New_York`. If the time zone isn't recognized, this may
15718 # be a custom time zone such as `GMT-07:00`.
15719 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
15720 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
15721 # CellData.effectiveFormat will not be set if the
15722 # cell's format is equal to this default format.
15723 # This field is read-only.
15724 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
15725 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
15726 # the user's locale will be used if necessary for the given type.
15727 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
15728 # information about the supported patterns.
15729 "type": "A String", # The type of the number format.
15730 # When writing, this field must be set.
15731 },
15732 "textDirection": "A String", # The direction of the text in the cell.
15733 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
15734 # When updating padding, every field must be specified.
15735 "top": 42, # The top padding of the cell.
15736 "right": 42, # The right padding of the cell.
15737 "bottom": 42, # The bottom padding of the cell.
15738 "left": 42, # The left padding of the cell.
15739 },
15740 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
15741 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
15742 # for simplicity of conversion to/from color representations in various
15743 # languages over compactness; for example, the fields of this representation
15744 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15745 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15746 # method in iOS; and, with just a little work, it can be easily formatted into
15747 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15748 #
15749 # Example (Java):
15750 #
15751 # import com.google.type.Color;
15752 #
15753 # // ...
15754 # public static java.awt.Color fromProto(Color protocolor) {
15755 # float alpha = protocolor.hasAlpha()
15756 # ? protocolor.getAlpha().getValue()
15757 # : 1.0;
15758 #
15759 # return new java.awt.Color(
15760 # protocolor.getRed(),
15761 # protocolor.getGreen(),
15762 # protocolor.getBlue(),
15763 # alpha);
15764 # }
15765 #
15766 # public static Color toProto(java.awt.Color color) {
15767 # float red = (float) color.getRed();
15768 # float green = (float) color.getGreen();
15769 # float blue = (float) color.getBlue();
15770 # float denominator = 255.0;
15771 # Color.Builder resultBuilder =
15772 # Color
15773 # .newBuilder()
15774 # .setRed(red / denominator)
15775 # .setGreen(green / denominator)
15776 # .setBlue(blue / denominator);
15777 # int alpha = color.getAlpha();
15778 # if (alpha != 255) {
15779 # result.setAlpha(
15780 # FloatValue
15781 # .newBuilder()
15782 # .setValue(((float) alpha) / denominator)
15783 # .build());
15784 # }
15785 # return resultBuilder.build();
15786 # }
15787 # // ...
15788 #
15789 # Example (iOS / Obj-C):
15790 #
15791 # // ...
15792 # static UIColor* fromProto(Color* protocolor) {
15793 # float red = [protocolor red];
15794 # float green = [protocolor green];
15795 # float blue = [protocolor blue];
15796 # FloatValue* alpha_wrapper = [protocolor alpha];
15797 # float alpha = 1.0;
15798 # if (alpha_wrapper != nil) {
15799 # alpha = [alpha_wrapper value];
15800 # }
15801 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15802 # }
15803 #
15804 # static Color* toProto(UIColor* color) {
15805 # CGFloat red, green, blue, alpha;
15806 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15807 # return nil;
15808 # }
15809 # Color* result = [Color alloc] init];
15810 # [result setRed:red];
15811 # [result setGreen:green];
15812 # [result setBlue:blue];
15813 # if (alpha <= 0.9999) {
15814 # [result setAlpha:floatWrapperWithValue(alpha)];
15815 # }
15816 # [result autorelease];
15817 # return result;
15818 # }
15819 # // ...
15820 #
15821 # Example (JavaScript):
15822 #
15823 # // ...
15824 #
15825 # var protoToCssColor = function(rgb_color) {
15826 # var redFrac = rgb_color.red || 0.0;
15827 # var greenFrac = rgb_color.green || 0.0;
15828 # var blueFrac = rgb_color.blue || 0.0;
15829 # var red = Math.floor(redFrac * 255);
15830 # var green = Math.floor(greenFrac * 255);
15831 # var blue = Math.floor(blueFrac * 255);
15832 #
15833 # if (!('alpha' in rgb_color)) {
15834 # return rgbToCssColor_(red, green, blue);
15835 # }
15836 #
15837 # var alphaFrac = rgb_color.alpha.value || 0.0;
15838 # var rgbParams = [red, green, blue].join(',');
15839 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15840 # };
15841 #
15842 # var rgbToCssColor_ = function(red, green, blue) {
15843 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15844 # var hexString = rgbNumber.toString(16);
15845 # var missingZeros = 6 - hexString.length;
15846 # var resultBuilder = ['#'];
15847 # for (var i = 0; i < missingZeros; i++) {
15848 # resultBuilder.push('0');
15849 # }
15850 # resultBuilder.push(hexString);
15851 # return resultBuilder.join('');
15852 # };
15853 #
15854 # // ...
15855 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15856 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15857 # the final pixel color is defined by the equation:
15858 #
15859 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15860 #
15861 # This means that a value of 1.0 corresponds to a solid color, whereas
15862 # a value of 0.0 corresponds to a completely transparent color. This
15863 # uses a wrapper message rather than a simple float scalar so that it is
15864 # possible to distinguish between a default value and the value being unset.
15865 # If omitted, this color object is to be rendered as a solid color
15866 # (as if the alpha value had been explicitly given with a value of 1.0).
15867 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15868 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15869 },
15870 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
15871 "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).
15872 # Absent values indicate that the field isn't specified.
15873 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
15874 # for simplicity of conversion to/from color representations in various
15875 # languages over compactness; for example, the fields of this representation
15876 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15877 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15878 # method in iOS; and, with just a little work, it can be easily formatted into
15879 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15880 #
15881 # Example (Java):
15882 #
15883 # import com.google.type.Color;
15884 #
15885 # // ...
15886 # public static java.awt.Color fromProto(Color protocolor) {
15887 # float alpha = protocolor.hasAlpha()
15888 # ? protocolor.getAlpha().getValue()
15889 # : 1.0;
15890 #
15891 # return new java.awt.Color(
15892 # protocolor.getRed(),
15893 # protocolor.getGreen(),
15894 # protocolor.getBlue(),
15895 # alpha);
15896 # }
15897 #
15898 # public static Color toProto(java.awt.Color color) {
15899 # float red = (float) color.getRed();
15900 # float green = (float) color.getGreen();
15901 # float blue = (float) color.getBlue();
15902 # float denominator = 255.0;
15903 # Color.Builder resultBuilder =
15904 # Color
15905 # .newBuilder()
15906 # .setRed(red / denominator)
15907 # .setGreen(green / denominator)
15908 # .setBlue(blue / denominator);
15909 # int alpha = color.getAlpha();
15910 # if (alpha != 255) {
15911 # result.setAlpha(
15912 # FloatValue
15913 # .newBuilder()
15914 # .setValue(((float) alpha) / denominator)
15915 # .build());
15916 # }
15917 # return resultBuilder.build();
15918 # }
15919 # // ...
15920 #
15921 # Example (iOS / Obj-C):
15922 #
15923 # // ...
15924 # static UIColor* fromProto(Color* protocolor) {
15925 # float red = [protocolor red];
15926 # float green = [protocolor green];
15927 # float blue = [protocolor blue];
15928 # FloatValue* alpha_wrapper = [protocolor alpha];
15929 # float alpha = 1.0;
15930 # if (alpha_wrapper != nil) {
15931 # alpha = [alpha_wrapper value];
15932 # }
15933 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15934 # }
15935 #
15936 # static Color* toProto(UIColor* color) {
15937 # CGFloat red, green, blue, alpha;
15938 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15939 # return nil;
15940 # }
15941 # Color* result = [Color alloc] init];
15942 # [result setRed:red];
15943 # [result setGreen:green];
15944 # [result setBlue:blue];
15945 # if (alpha <= 0.9999) {
15946 # [result setAlpha:floatWrapperWithValue(alpha)];
15947 # }
15948 # [result autorelease];
15949 # return result;
15950 # }
15951 # // ...
15952 #
15953 # Example (JavaScript):
15954 #
15955 # // ...
15956 #
15957 # var protoToCssColor = function(rgb_color) {
15958 # var redFrac = rgb_color.red || 0.0;
15959 # var greenFrac = rgb_color.green || 0.0;
15960 # var blueFrac = rgb_color.blue || 0.0;
15961 # var red = Math.floor(redFrac * 255);
15962 # var green = Math.floor(greenFrac * 255);
15963 # var blue = Math.floor(blueFrac * 255);
15964 #
15965 # if (!('alpha' in rgb_color)) {
15966 # return rgbToCssColor_(red, green, blue);
15967 # }
15968 #
15969 # var alphaFrac = rgb_color.alpha.value || 0.0;
15970 # var rgbParams = [red, green, blue].join(',');
15971 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15972 # };
15973 #
15974 # var rgbToCssColor_ = function(red, green, blue) {
15975 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15976 # var hexString = rgbNumber.toString(16);
15977 # var missingZeros = 6 - hexString.length;
15978 # var resultBuilder = ['#'];
15979 # for (var i = 0; i < missingZeros; i++) {
15980 # resultBuilder.push('0');
15981 # }
15982 # resultBuilder.push(hexString);
15983 # return resultBuilder.join('');
15984 # };
15985 #
15986 # // ...
15987 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15988 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15989 # the final pixel color is defined by the equation:
15990 #
15991 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15992 #
15993 # This means that a value of 1.0 corresponds to a solid color, whereas
15994 # a value of 0.0 corresponds to a completely transparent color. This
15995 # uses a wrapper message rather than a simple float scalar so that it is
15996 # possible to distinguish between a default value and the value being unset.
15997 # If omitted, this color object is to be rendered as a solid color
15998 # (as if the alpha value had been explicitly given with a value of 1.0).
15999 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16000 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16001 },
16002 "bold": True or False, # True if the text is bold.
16003 "strikethrough": True or False, # True if the text has a strikethrough.
16004 "fontFamily": "A String", # The font family.
16005 "fontSize": 42, # The size of the font.
16006 "italic": True or False, # True if the text is italicized.
16007 "underline": True or False, # True if the text is underlined.
16008 },
16009 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
16010 "borders": { # The borders of the cell. # The borders of the cell.
16011 "top": { # A border along a cell. # The top border of the cell.
16012 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16013 # for simplicity of conversion to/from color representations in various
16014 # languages over compactness; for example, the fields of this representation
16015 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16016 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16017 # method in iOS; and, with just a little work, it can be easily formatted into
16018 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16019 #
16020 # Example (Java):
16021 #
16022 # import com.google.type.Color;
16023 #
16024 # // ...
16025 # public static java.awt.Color fromProto(Color protocolor) {
16026 # float alpha = protocolor.hasAlpha()
16027 # ? protocolor.getAlpha().getValue()
16028 # : 1.0;
16029 #
16030 # return new java.awt.Color(
16031 # protocolor.getRed(),
16032 # protocolor.getGreen(),
16033 # protocolor.getBlue(),
16034 # alpha);
16035 # }
16036 #
16037 # public static Color toProto(java.awt.Color color) {
16038 # float red = (float) color.getRed();
16039 # float green = (float) color.getGreen();
16040 # float blue = (float) color.getBlue();
16041 # float denominator = 255.0;
16042 # Color.Builder resultBuilder =
16043 # Color
16044 # .newBuilder()
16045 # .setRed(red / denominator)
16046 # .setGreen(green / denominator)
16047 # .setBlue(blue / denominator);
16048 # int alpha = color.getAlpha();
16049 # if (alpha != 255) {
16050 # result.setAlpha(
16051 # FloatValue
16052 # .newBuilder()
16053 # .setValue(((float) alpha) / denominator)
16054 # .build());
16055 # }
16056 # return resultBuilder.build();
16057 # }
16058 # // ...
16059 #
16060 # Example (iOS / Obj-C):
16061 #
16062 # // ...
16063 # static UIColor* fromProto(Color* protocolor) {
16064 # float red = [protocolor red];
16065 # float green = [protocolor green];
16066 # float blue = [protocolor blue];
16067 # FloatValue* alpha_wrapper = [protocolor alpha];
16068 # float alpha = 1.0;
16069 # if (alpha_wrapper != nil) {
16070 # alpha = [alpha_wrapper value];
16071 # }
16072 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16073 # }
16074 #
16075 # static Color* toProto(UIColor* color) {
16076 # CGFloat red, green, blue, alpha;
16077 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16078 # return nil;
16079 # }
16080 # Color* result = [Color alloc] init];
16081 # [result setRed:red];
16082 # [result setGreen:green];
16083 # [result setBlue:blue];
16084 # if (alpha <= 0.9999) {
16085 # [result setAlpha:floatWrapperWithValue(alpha)];
16086 # }
16087 # [result autorelease];
16088 # return result;
16089 # }
16090 # // ...
16091 #
16092 # Example (JavaScript):
16093 #
16094 # // ...
16095 #
16096 # var protoToCssColor = function(rgb_color) {
16097 # var redFrac = rgb_color.red || 0.0;
16098 # var greenFrac = rgb_color.green || 0.0;
16099 # var blueFrac = rgb_color.blue || 0.0;
16100 # var red = Math.floor(redFrac * 255);
16101 # var green = Math.floor(greenFrac * 255);
16102 # var blue = Math.floor(blueFrac * 255);
16103 #
16104 # if (!('alpha' in rgb_color)) {
16105 # return rgbToCssColor_(red, green, blue);
16106 # }
16107 #
16108 # var alphaFrac = rgb_color.alpha.value || 0.0;
16109 # var rgbParams = [red, green, blue].join(',');
16110 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16111 # };
16112 #
16113 # var rgbToCssColor_ = function(red, green, blue) {
16114 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16115 # var hexString = rgbNumber.toString(16);
16116 # var missingZeros = 6 - hexString.length;
16117 # var resultBuilder = ['#'];
16118 # for (var i = 0; i < missingZeros; i++) {
16119 # resultBuilder.push('0');
16120 # }
16121 # resultBuilder.push(hexString);
16122 # return resultBuilder.join('');
16123 # };
16124 #
16125 # // ...
16126 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16127 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16128 # the final pixel color is defined by the equation:
16129 #
16130 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16131 #
16132 # This means that a value of 1.0 corresponds to a solid color, whereas
16133 # a value of 0.0 corresponds to a completely transparent color. This
16134 # uses a wrapper message rather than a simple float scalar so that it is
16135 # possible to distinguish between a default value and the value being unset.
16136 # If omitted, this color object is to be rendered as a solid color
16137 # (as if the alpha value had been explicitly given with a value of 1.0).
16138 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16139 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16140 },
16141 "width": 42, # The width of the border, in pixels.
16142 # Deprecated; the width is determined by the "style" field.
16143 "style": "A String", # The style of the border.
16144 },
16145 "right": { # A border along a cell. # The right border of the cell.
16146 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16147 # for simplicity of conversion to/from color representations in various
16148 # languages over compactness; for example, the fields of this representation
16149 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16150 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16151 # method in iOS; and, with just a little work, it can be easily formatted into
16152 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16153 #
16154 # Example (Java):
16155 #
16156 # import com.google.type.Color;
16157 #
16158 # // ...
16159 # public static java.awt.Color fromProto(Color protocolor) {
16160 # float alpha = protocolor.hasAlpha()
16161 # ? protocolor.getAlpha().getValue()
16162 # : 1.0;
16163 #
16164 # return new java.awt.Color(
16165 # protocolor.getRed(),
16166 # protocolor.getGreen(),
16167 # protocolor.getBlue(),
16168 # alpha);
16169 # }
16170 #
16171 # public static Color toProto(java.awt.Color color) {
16172 # float red = (float) color.getRed();
16173 # float green = (float) color.getGreen();
16174 # float blue = (float) color.getBlue();
16175 # float denominator = 255.0;
16176 # Color.Builder resultBuilder =
16177 # Color
16178 # .newBuilder()
16179 # .setRed(red / denominator)
16180 # .setGreen(green / denominator)
16181 # .setBlue(blue / denominator);
16182 # int alpha = color.getAlpha();
16183 # if (alpha != 255) {
16184 # result.setAlpha(
16185 # FloatValue
16186 # .newBuilder()
16187 # .setValue(((float) alpha) / denominator)
16188 # .build());
16189 # }
16190 # return resultBuilder.build();
16191 # }
16192 # // ...
16193 #
16194 # Example (iOS / Obj-C):
16195 #
16196 # // ...
16197 # static UIColor* fromProto(Color* protocolor) {
16198 # float red = [protocolor red];
16199 # float green = [protocolor green];
16200 # float blue = [protocolor blue];
16201 # FloatValue* alpha_wrapper = [protocolor alpha];
16202 # float alpha = 1.0;
16203 # if (alpha_wrapper != nil) {
16204 # alpha = [alpha_wrapper value];
16205 # }
16206 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16207 # }
16208 #
16209 # static Color* toProto(UIColor* color) {
16210 # CGFloat red, green, blue, alpha;
16211 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16212 # return nil;
16213 # }
16214 # Color* result = [Color alloc] init];
16215 # [result setRed:red];
16216 # [result setGreen:green];
16217 # [result setBlue:blue];
16218 # if (alpha <= 0.9999) {
16219 # [result setAlpha:floatWrapperWithValue(alpha)];
16220 # }
16221 # [result autorelease];
16222 # return result;
16223 # }
16224 # // ...
16225 #
16226 # Example (JavaScript):
16227 #
16228 # // ...
16229 #
16230 # var protoToCssColor = function(rgb_color) {
16231 # var redFrac = rgb_color.red || 0.0;
16232 # var greenFrac = rgb_color.green || 0.0;
16233 # var blueFrac = rgb_color.blue || 0.0;
16234 # var red = Math.floor(redFrac * 255);
16235 # var green = Math.floor(greenFrac * 255);
16236 # var blue = Math.floor(blueFrac * 255);
16237 #
16238 # if (!('alpha' in rgb_color)) {
16239 # return rgbToCssColor_(red, green, blue);
16240 # }
16241 #
16242 # var alphaFrac = rgb_color.alpha.value || 0.0;
16243 # var rgbParams = [red, green, blue].join(',');
16244 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16245 # };
16246 #
16247 # var rgbToCssColor_ = function(red, green, blue) {
16248 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16249 # var hexString = rgbNumber.toString(16);
16250 # var missingZeros = 6 - hexString.length;
16251 # var resultBuilder = ['#'];
16252 # for (var i = 0; i < missingZeros; i++) {
16253 # resultBuilder.push('0');
16254 # }
16255 # resultBuilder.push(hexString);
16256 # return resultBuilder.join('');
16257 # };
16258 #
16259 # // ...
16260 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16261 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16262 # the final pixel color is defined by the equation:
16263 #
16264 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16265 #
16266 # This means that a value of 1.0 corresponds to a solid color, whereas
16267 # a value of 0.0 corresponds to a completely transparent color. This
16268 # uses a wrapper message rather than a simple float scalar so that it is
16269 # possible to distinguish between a default value and the value being unset.
16270 # If omitted, this color object is to be rendered as a solid color
16271 # (as if the alpha value had been explicitly given with a value of 1.0).
16272 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16273 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16274 },
16275 "width": 42, # The width of the border, in pixels.
16276 # Deprecated; the width is determined by the "style" field.
16277 "style": "A String", # The style of the border.
16278 },
16279 "bottom": { # A border along a cell. # The bottom border of the cell.
16280 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16281 # for simplicity of conversion to/from color representations in various
16282 # languages over compactness; for example, the fields of this representation
16283 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16284 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16285 # method in iOS; and, with just a little work, it can be easily formatted into
16286 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16287 #
16288 # Example (Java):
16289 #
16290 # import com.google.type.Color;
16291 #
16292 # // ...
16293 # public static java.awt.Color fromProto(Color protocolor) {
16294 # float alpha = protocolor.hasAlpha()
16295 # ? protocolor.getAlpha().getValue()
16296 # : 1.0;
16297 #
16298 # return new java.awt.Color(
16299 # protocolor.getRed(),
16300 # protocolor.getGreen(),
16301 # protocolor.getBlue(),
16302 # alpha);
16303 # }
16304 #
16305 # public static Color toProto(java.awt.Color color) {
16306 # float red = (float) color.getRed();
16307 # float green = (float) color.getGreen();
16308 # float blue = (float) color.getBlue();
16309 # float denominator = 255.0;
16310 # Color.Builder resultBuilder =
16311 # Color
16312 # .newBuilder()
16313 # .setRed(red / denominator)
16314 # .setGreen(green / denominator)
16315 # .setBlue(blue / denominator);
16316 # int alpha = color.getAlpha();
16317 # if (alpha != 255) {
16318 # result.setAlpha(
16319 # FloatValue
16320 # .newBuilder()
16321 # .setValue(((float) alpha) / denominator)
16322 # .build());
16323 # }
16324 # return resultBuilder.build();
16325 # }
16326 # // ...
16327 #
16328 # Example (iOS / Obj-C):
16329 #
16330 # // ...
16331 # static UIColor* fromProto(Color* protocolor) {
16332 # float red = [protocolor red];
16333 # float green = [protocolor green];
16334 # float blue = [protocolor blue];
16335 # FloatValue* alpha_wrapper = [protocolor alpha];
16336 # float alpha = 1.0;
16337 # if (alpha_wrapper != nil) {
16338 # alpha = [alpha_wrapper value];
16339 # }
16340 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16341 # }
16342 #
16343 # static Color* toProto(UIColor* color) {
16344 # CGFloat red, green, blue, alpha;
16345 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16346 # return nil;
16347 # }
16348 # Color* result = [Color alloc] init];
16349 # [result setRed:red];
16350 # [result setGreen:green];
16351 # [result setBlue:blue];
16352 # if (alpha <= 0.9999) {
16353 # [result setAlpha:floatWrapperWithValue(alpha)];
16354 # }
16355 # [result autorelease];
16356 # return result;
16357 # }
16358 # // ...
16359 #
16360 # Example (JavaScript):
16361 #
16362 # // ...
16363 #
16364 # var protoToCssColor = function(rgb_color) {
16365 # var redFrac = rgb_color.red || 0.0;
16366 # var greenFrac = rgb_color.green || 0.0;
16367 # var blueFrac = rgb_color.blue || 0.0;
16368 # var red = Math.floor(redFrac * 255);
16369 # var green = Math.floor(greenFrac * 255);
16370 # var blue = Math.floor(blueFrac * 255);
16371 #
16372 # if (!('alpha' in rgb_color)) {
16373 # return rgbToCssColor_(red, green, blue);
16374 # }
16375 #
16376 # var alphaFrac = rgb_color.alpha.value || 0.0;
16377 # var rgbParams = [red, green, blue].join(',');
16378 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16379 # };
16380 #
16381 # var rgbToCssColor_ = function(red, green, blue) {
16382 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16383 # var hexString = rgbNumber.toString(16);
16384 # var missingZeros = 6 - hexString.length;
16385 # var resultBuilder = ['#'];
16386 # for (var i = 0; i < missingZeros; i++) {
16387 # resultBuilder.push('0');
16388 # }
16389 # resultBuilder.push(hexString);
16390 # return resultBuilder.join('');
16391 # };
16392 #
16393 # // ...
16394 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16395 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16396 # the final pixel color is defined by the equation:
16397 #
16398 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16399 #
16400 # This means that a value of 1.0 corresponds to a solid color, whereas
16401 # a value of 0.0 corresponds to a completely transparent color. This
16402 # uses a wrapper message rather than a simple float scalar so that it is
16403 # possible to distinguish between a default value and the value being unset.
16404 # If omitted, this color object is to be rendered as a solid color
16405 # (as if the alpha value had been explicitly given with a value of 1.0).
16406 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16407 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16408 },
16409 "width": 42, # The width of the border, in pixels.
16410 # Deprecated; the width is determined by the "style" field.
16411 "style": "A String", # The style of the border.
16412 },
16413 "left": { # A border along a cell. # The left border of the cell.
16414 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16415 # for simplicity of conversion to/from color representations in various
16416 # languages over compactness; for example, the fields of this representation
16417 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16418 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16419 # method in iOS; and, with just a little work, it can be easily formatted into
16420 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16421 #
16422 # Example (Java):
16423 #
16424 # import com.google.type.Color;
16425 #
16426 # // ...
16427 # public static java.awt.Color fromProto(Color protocolor) {
16428 # float alpha = protocolor.hasAlpha()
16429 # ? protocolor.getAlpha().getValue()
16430 # : 1.0;
16431 #
16432 # return new java.awt.Color(
16433 # protocolor.getRed(),
16434 # protocolor.getGreen(),
16435 # protocolor.getBlue(),
16436 # alpha);
16437 # }
16438 #
16439 # public static Color toProto(java.awt.Color color) {
16440 # float red = (float) color.getRed();
16441 # float green = (float) color.getGreen();
16442 # float blue = (float) color.getBlue();
16443 # float denominator = 255.0;
16444 # Color.Builder resultBuilder =
16445 # Color
16446 # .newBuilder()
16447 # .setRed(red / denominator)
16448 # .setGreen(green / denominator)
16449 # .setBlue(blue / denominator);
16450 # int alpha = color.getAlpha();
16451 # if (alpha != 255) {
16452 # result.setAlpha(
16453 # FloatValue
16454 # .newBuilder()
16455 # .setValue(((float) alpha) / denominator)
16456 # .build());
16457 # }
16458 # return resultBuilder.build();
16459 # }
16460 # // ...
16461 #
16462 # Example (iOS / Obj-C):
16463 #
16464 # // ...
16465 # static UIColor* fromProto(Color* protocolor) {
16466 # float red = [protocolor red];
16467 # float green = [protocolor green];
16468 # float blue = [protocolor blue];
16469 # FloatValue* alpha_wrapper = [protocolor alpha];
16470 # float alpha = 1.0;
16471 # if (alpha_wrapper != nil) {
16472 # alpha = [alpha_wrapper value];
16473 # }
16474 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16475 # }
16476 #
16477 # static Color* toProto(UIColor* color) {
16478 # CGFloat red, green, blue, alpha;
16479 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16480 # return nil;
16481 # }
16482 # Color* result = [Color alloc] init];
16483 # [result setRed:red];
16484 # [result setGreen:green];
16485 # [result setBlue:blue];
16486 # if (alpha <= 0.9999) {
16487 # [result setAlpha:floatWrapperWithValue(alpha)];
16488 # }
16489 # [result autorelease];
16490 # return result;
16491 # }
16492 # // ...
16493 #
16494 # Example (JavaScript):
16495 #
16496 # // ...
16497 #
16498 # var protoToCssColor = function(rgb_color) {
16499 # var redFrac = rgb_color.red || 0.0;
16500 # var greenFrac = rgb_color.green || 0.0;
16501 # var blueFrac = rgb_color.blue || 0.0;
16502 # var red = Math.floor(redFrac * 255);
16503 # var green = Math.floor(greenFrac * 255);
16504 # var blue = Math.floor(blueFrac * 255);
16505 #
16506 # if (!('alpha' in rgb_color)) {
16507 # return rgbToCssColor_(red, green, blue);
16508 # }
16509 #
16510 # var alphaFrac = rgb_color.alpha.value || 0.0;
16511 # var rgbParams = [red, green, blue].join(',');
16512 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16513 # };
16514 #
16515 # var rgbToCssColor_ = function(red, green, blue) {
16516 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16517 # var hexString = rgbNumber.toString(16);
16518 # var missingZeros = 6 - hexString.length;
16519 # var resultBuilder = ['#'];
16520 # for (var i = 0; i < missingZeros; i++) {
16521 # resultBuilder.push('0');
16522 # }
16523 # resultBuilder.push(hexString);
16524 # return resultBuilder.join('');
16525 # };
16526 #
16527 # // ...
16528 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16529 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16530 # the final pixel color is defined by the equation:
16531 #
16532 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16533 #
16534 # This means that a value of 1.0 corresponds to a solid color, whereas
16535 # a value of 0.0 corresponds to a completely transparent color. This
16536 # uses a wrapper message rather than a simple float scalar so that it is
16537 # possible to distinguish between a default value and the value being unset.
16538 # If omitted, this color object is to be rendered as a solid color
16539 # (as if the alpha value had been explicitly given with a value of 1.0).
16540 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16541 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16542 },
16543 "width": 42, # The width of the border, in pixels.
16544 # Deprecated; the width is determined by the "style" field.
16545 "style": "A String", # The style of the border.
16546 },
16547 },
16548 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
16549 },
16550 "title": "A String", # The title of the spreadsheet.
16551 },
16552 "sheets": [ # The sheets that are part of a spreadsheet.
16553 { # A sheet in a spreadsheet.
16554 "conditionalFormats": [ # The conditional format rules in this sheet.
16555 { # A rule describing a conditional format.
16556 "ranges": [ # The ranges that will be formatted if the condition is true.
16557 # All the ranges must be on the same grid.
16558 { # A range on a sheet.
16559 # All indexes are zero-based.
16560 # Indexes are half open, e.g the start index is inclusive
16561 # and the end index is exclusive -- [start_index, end_index).
16562 # Missing indexes indicate the range is unbounded on that side.
16563 #
16564 # For example, if `"Sheet1"` is sheet ID 0, then:
16565 #
16566 # `Sheet1!A1:A1 == sheet_id: 0,
16567 # start_row_index: 0, end_row_index: 1,
16568 # start_column_index: 0, end_column_index: 1`
16569 #
16570 # `Sheet1!A3:B4 == sheet_id: 0,
16571 # start_row_index: 2, end_row_index: 4,
16572 # start_column_index: 0, end_column_index: 2`
16573 #
16574 # `Sheet1!A:B == sheet_id: 0,
16575 # start_column_index: 0, end_column_index: 2`
16576 #
16577 # `Sheet1!A5:B == sheet_id: 0,
16578 # start_row_index: 4,
16579 # start_column_index: 0, end_column_index: 2`
16580 #
16581 # `Sheet1 == sheet_id:0`
16582 #
16583 # The start index must always be less than or equal to the end index.
16584 # If the start index equals the end index, then the range is empty.
16585 # Empty ranges are typically not meaningful and are usually rendered in the
16586 # UI as `#REF!`.
16587 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
16588 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
16589 "sheetId": 42, # The sheet this range is on.
16590 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
16591 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
16592 },
16593 ],
16594 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
16595 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
16596 # the format will be applied.
16597 # BooleanConditions are used by conditional formatting,
16598 # data validation, and the criteria in filters.
16599 "type": "A String", # The type of condition.
16600 "values": [ # The values of the condition. The number of supported values depends
16601 # on the condition type. Some support zero values,
16602 # others one or two values,
16603 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
16604 { # The value of the condition.
16605 "relativeDate": "A String", # A relative date (based on the current date).
16606 # Valid only if the type is
16607 # DATE_BEFORE,
16608 # DATE_AFTER,
16609 # DATE_ON_OR_BEFORE or
16610 # DATE_ON_OR_AFTER.
16611 #
16612 # Relative dates are not supported in data validation.
16613 # They are supported only in conditional formatting and
16614 # conditional filters.
16615 "userEnteredValue": "A String", # A value the condition is based on.
16616 # The value will be parsed as if the user typed into a cell.
16617 # Formulas are supported (and must begin with an `=`).
16618 },
16619 ],
16620 },
16621 "format": { # The format of a cell. # The format to apply.
16622 # Conditional formatting can only apply a subset of formatting:
16623 # bold, italic,
16624 # strikethrough,
16625 # foreground color &
16626 # background color.
16627 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
16628 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
16629 # the user's locale will be used if necessary for the given type.
16630 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
16631 # information about the supported patterns.
16632 "type": "A String", # The type of the number format.
16633 # When writing, this field must be set.
16634 },
16635 "textDirection": "A String", # The direction of the text in the cell.
16636 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
16637 # When updating padding, every field must be specified.
16638 "top": 42, # The top padding of the cell.
16639 "right": 42, # The right padding of the cell.
16640 "bottom": 42, # The bottom padding of the cell.
16641 "left": 42, # The left padding of the cell.
16642 },
16643 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
16644 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
16645 # for simplicity of conversion to/from color representations in various
16646 # languages over compactness; for example, the fields of this representation
16647 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16648 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16649 # method in iOS; and, with just a little work, it can be easily formatted into
16650 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16651 #
16652 # Example (Java):
16653 #
16654 # import com.google.type.Color;
16655 #
16656 # // ...
16657 # public static java.awt.Color fromProto(Color protocolor) {
16658 # float alpha = protocolor.hasAlpha()
16659 # ? protocolor.getAlpha().getValue()
16660 # : 1.0;
16661 #
16662 # return new java.awt.Color(
16663 # protocolor.getRed(),
16664 # protocolor.getGreen(),
16665 # protocolor.getBlue(),
16666 # alpha);
16667 # }
16668 #
16669 # public static Color toProto(java.awt.Color color) {
16670 # float red = (float) color.getRed();
16671 # float green = (float) color.getGreen();
16672 # float blue = (float) color.getBlue();
16673 # float denominator = 255.0;
16674 # Color.Builder resultBuilder =
16675 # Color
16676 # .newBuilder()
16677 # .setRed(red / denominator)
16678 # .setGreen(green / denominator)
16679 # .setBlue(blue / denominator);
16680 # int alpha = color.getAlpha();
16681 # if (alpha != 255) {
16682 # result.setAlpha(
16683 # FloatValue
16684 # .newBuilder()
16685 # .setValue(((float) alpha) / denominator)
16686 # .build());
16687 # }
16688 # return resultBuilder.build();
16689 # }
16690 # // ...
16691 #
16692 # Example (iOS / Obj-C):
16693 #
16694 # // ...
16695 # static UIColor* fromProto(Color* protocolor) {
16696 # float red = [protocolor red];
16697 # float green = [protocolor green];
16698 # float blue = [protocolor blue];
16699 # FloatValue* alpha_wrapper = [protocolor alpha];
16700 # float alpha = 1.0;
16701 # if (alpha_wrapper != nil) {
16702 # alpha = [alpha_wrapper value];
16703 # }
16704 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16705 # }
16706 #
16707 # static Color* toProto(UIColor* color) {
16708 # CGFloat red, green, blue, alpha;
16709 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16710 # return nil;
16711 # }
16712 # Color* result = [Color alloc] init];
16713 # [result setRed:red];
16714 # [result setGreen:green];
16715 # [result setBlue:blue];
16716 # if (alpha <= 0.9999) {
16717 # [result setAlpha:floatWrapperWithValue(alpha)];
16718 # }
16719 # [result autorelease];
16720 # return result;
16721 # }
16722 # // ...
16723 #
16724 # Example (JavaScript):
16725 #
16726 # // ...
16727 #
16728 # var protoToCssColor = function(rgb_color) {
16729 # var redFrac = rgb_color.red || 0.0;
16730 # var greenFrac = rgb_color.green || 0.0;
16731 # var blueFrac = rgb_color.blue || 0.0;
16732 # var red = Math.floor(redFrac * 255);
16733 # var green = Math.floor(greenFrac * 255);
16734 # var blue = Math.floor(blueFrac * 255);
16735 #
16736 # if (!('alpha' in rgb_color)) {
16737 # return rgbToCssColor_(red, green, blue);
16738 # }
16739 #
16740 # var alphaFrac = rgb_color.alpha.value || 0.0;
16741 # var rgbParams = [red, green, blue].join(',');
16742 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16743 # };
16744 #
16745 # var rgbToCssColor_ = function(red, green, blue) {
16746 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16747 # var hexString = rgbNumber.toString(16);
16748 # var missingZeros = 6 - hexString.length;
16749 # var resultBuilder = ['#'];
16750 # for (var i = 0; i < missingZeros; i++) {
16751 # resultBuilder.push('0');
16752 # }
16753 # resultBuilder.push(hexString);
16754 # return resultBuilder.join('');
16755 # };
16756 #
16757 # // ...
16758 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16759 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16760 # the final pixel color is defined by the equation:
16761 #
16762 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16763 #
16764 # This means that a value of 1.0 corresponds to a solid color, whereas
16765 # a value of 0.0 corresponds to a completely transparent color. This
16766 # uses a wrapper message rather than a simple float scalar so that it is
16767 # possible to distinguish between a default value and the value being unset.
16768 # If omitted, this color object is to be rendered as a solid color
16769 # (as if the alpha value had been explicitly given with a value of 1.0).
16770 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16771 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16772 },
16773 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
16774 "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).
16775 # Absent values indicate that the field isn't specified.
16776 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
16777 # for simplicity of conversion to/from color representations in various
16778 # languages over compactness; for example, the fields of this representation
16779 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16780 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16781 # method in iOS; and, with just a little work, it can be easily formatted into
16782 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16783 #
16784 # Example (Java):
16785 #
16786 # import com.google.type.Color;
16787 #
16788 # // ...
16789 # public static java.awt.Color fromProto(Color protocolor) {
16790 # float alpha = protocolor.hasAlpha()
16791 # ? protocolor.getAlpha().getValue()
16792 # : 1.0;
16793 #
16794 # return new java.awt.Color(
16795 # protocolor.getRed(),
16796 # protocolor.getGreen(),
16797 # protocolor.getBlue(),
16798 # alpha);
16799 # }
16800 #
16801 # public static Color toProto(java.awt.Color color) {
16802 # float red = (float) color.getRed();
16803 # float green = (float) color.getGreen();
16804 # float blue = (float) color.getBlue();
16805 # float denominator = 255.0;
16806 # Color.Builder resultBuilder =
16807 # Color
16808 # .newBuilder()
16809 # .setRed(red / denominator)
16810 # .setGreen(green / denominator)
16811 # .setBlue(blue / denominator);
16812 # int alpha = color.getAlpha();
16813 # if (alpha != 255) {
16814 # result.setAlpha(
16815 # FloatValue
16816 # .newBuilder()
16817 # .setValue(((float) alpha) / denominator)
16818 # .build());
16819 # }
16820 # return resultBuilder.build();
16821 # }
16822 # // ...
16823 #
16824 # Example (iOS / Obj-C):
16825 #
16826 # // ...
16827 # static UIColor* fromProto(Color* protocolor) {
16828 # float red = [protocolor red];
16829 # float green = [protocolor green];
16830 # float blue = [protocolor blue];
16831 # FloatValue* alpha_wrapper = [protocolor alpha];
16832 # float alpha = 1.0;
16833 # if (alpha_wrapper != nil) {
16834 # alpha = [alpha_wrapper value];
16835 # }
16836 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16837 # }
16838 #
16839 # static Color* toProto(UIColor* color) {
16840 # CGFloat red, green, blue, alpha;
16841 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16842 # return nil;
16843 # }
16844 # Color* result = [Color alloc] init];
16845 # [result setRed:red];
16846 # [result setGreen:green];
16847 # [result setBlue:blue];
16848 # if (alpha <= 0.9999) {
16849 # [result setAlpha:floatWrapperWithValue(alpha)];
16850 # }
16851 # [result autorelease];
16852 # return result;
16853 # }
16854 # // ...
16855 #
16856 # Example (JavaScript):
16857 #
16858 # // ...
16859 #
16860 # var protoToCssColor = function(rgb_color) {
16861 # var redFrac = rgb_color.red || 0.0;
16862 # var greenFrac = rgb_color.green || 0.0;
16863 # var blueFrac = rgb_color.blue || 0.0;
16864 # var red = Math.floor(redFrac * 255);
16865 # var green = Math.floor(greenFrac * 255);
16866 # var blue = Math.floor(blueFrac * 255);
16867 #
16868 # if (!('alpha' in rgb_color)) {
16869 # return rgbToCssColor_(red, green, blue);
16870 # }
16871 #
16872 # var alphaFrac = rgb_color.alpha.value || 0.0;
16873 # var rgbParams = [red, green, blue].join(',');
16874 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16875 # };
16876 #
16877 # var rgbToCssColor_ = function(red, green, blue) {
16878 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16879 # var hexString = rgbNumber.toString(16);
16880 # var missingZeros = 6 - hexString.length;
16881 # var resultBuilder = ['#'];
16882 # for (var i = 0; i < missingZeros; i++) {
16883 # resultBuilder.push('0');
16884 # }
16885 # resultBuilder.push(hexString);
16886 # return resultBuilder.join('');
16887 # };
16888 #
16889 # // ...
16890 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16891 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16892 # the final pixel color is defined by the equation:
16893 #
16894 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16895 #
16896 # This means that a value of 1.0 corresponds to a solid color, whereas
16897 # a value of 0.0 corresponds to a completely transparent color. This
16898 # uses a wrapper message rather than a simple float scalar so that it is
16899 # possible to distinguish between a default value and the value being unset.
16900 # If omitted, this color object is to be rendered as a solid color
16901 # (as if the alpha value had been explicitly given with a value of 1.0).
16902 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16903 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16904 },
16905 "bold": True or False, # True if the text is bold.
16906 "strikethrough": True or False, # True if the text has a strikethrough.
16907 "fontFamily": "A String", # The font family.
16908 "fontSize": 42, # The size of the font.
16909 "italic": True or False, # True if the text is italicized.
16910 "underline": True or False, # True if the text is underlined.
16911 },
16912 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
16913 "borders": { # The borders of the cell. # The borders of the cell.
16914 "top": { # A border along a cell. # The top border of the cell.
16915 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16916 # for simplicity of conversion to/from color representations in various
16917 # languages over compactness; for example, the fields of this representation
16918 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16919 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16920 # method in iOS; and, with just a little work, it can be easily formatted into
16921 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16922 #
16923 # Example (Java):
16924 #
16925 # import com.google.type.Color;
16926 #
16927 # // ...
16928 # public static java.awt.Color fromProto(Color protocolor) {
16929 # float alpha = protocolor.hasAlpha()
16930 # ? protocolor.getAlpha().getValue()
16931 # : 1.0;
16932 #
16933 # return new java.awt.Color(
16934 # protocolor.getRed(),
16935 # protocolor.getGreen(),
16936 # protocolor.getBlue(),
16937 # alpha);
16938 # }
16939 #
16940 # public static Color toProto(java.awt.Color color) {
16941 # float red = (float) color.getRed();
16942 # float green = (float) color.getGreen();
16943 # float blue = (float) color.getBlue();
16944 # float denominator = 255.0;
16945 # Color.Builder resultBuilder =
16946 # Color
16947 # .newBuilder()
16948 # .setRed(red / denominator)
16949 # .setGreen(green / denominator)
16950 # .setBlue(blue / denominator);
16951 # int alpha = color.getAlpha();
16952 # if (alpha != 255) {
16953 # result.setAlpha(
16954 # FloatValue
16955 # .newBuilder()
16956 # .setValue(((float) alpha) / denominator)
16957 # .build());
16958 # }
16959 # return resultBuilder.build();
16960 # }
16961 # // ...
16962 #
16963 # Example (iOS / Obj-C):
16964 #
16965 # // ...
16966 # static UIColor* fromProto(Color* protocolor) {
16967 # float red = [protocolor red];
16968 # float green = [protocolor green];
16969 # float blue = [protocolor blue];
16970 # FloatValue* alpha_wrapper = [protocolor alpha];
16971 # float alpha = 1.0;
16972 # if (alpha_wrapper != nil) {
16973 # alpha = [alpha_wrapper value];
16974 # }
16975 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16976 # }
16977 #
16978 # static Color* toProto(UIColor* color) {
16979 # CGFloat red, green, blue, alpha;
16980 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16981 # return nil;
16982 # }
16983 # Color* result = [Color alloc] init];
16984 # [result setRed:red];
16985 # [result setGreen:green];
16986 # [result setBlue:blue];
16987 # if (alpha <= 0.9999) {
16988 # [result setAlpha:floatWrapperWithValue(alpha)];
16989 # }
16990 # [result autorelease];
16991 # return result;
16992 # }
16993 # // ...
16994 #
16995 # Example (JavaScript):
16996 #
16997 # // ...
16998 #
16999 # var protoToCssColor = function(rgb_color) {
17000 # var redFrac = rgb_color.red || 0.0;
17001 # var greenFrac = rgb_color.green || 0.0;
17002 # var blueFrac = rgb_color.blue || 0.0;
17003 # var red = Math.floor(redFrac * 255);
17004 # var green = Math.floor(greenFrac * 255);
17005 # var blue = Math.floor(blueFrac * 255);
17006 #
17007 # if (!('alpha' in rgb_color)) {
17008 # return rgbToCssColor_(red, green, blue);
17009 # }
17010 #
17011 # var alphaFrac = rgb_color.alpha.value || 0.0;
17012 # var rgbParams = [red, green, blue].join(',');
17013 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17014 # };
17015 #
17016 # var rgbToCssColor_ = function(red, green, blue) {
17017 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17018 # var hexString = rgbNumber.toString(16);
17019 # var missingZeros = 6 - hexString.length;
17020 # var resultBuilder = ['#'];
17021 # for (var i = 0; i < missingZeros; i++) {
17022 # resultBuilder.push('0');
17023 # }
17024 # resultBuilder.push(hexString);
17025 # return resultBuilder.join('');
17026 # };
17027 #
17028 # // ...
17029 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17030 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17031 # the final pixel color is defined by the equation:
17032 #
17033 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17034 #
17035 # This means that a value of 1.0 corresponds to a solid color, whereas
17036 # a value of 0.0 corresponds to a completely transparent color. This
17037 # uses a wrapper message rather than a simple float scalar so that it is
17038 # possible to distinguish between a default value and the value being unset.
17039 # If omitted, this color object is to be rendered as a solid color
17040 # (as if the alpha value had been explicitly given with a value of 1.0).
17041 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17042 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17043 },
17044 "width": 42, # The width of the border, in pixels.
17045 # Deprecated; the width is determined by the "style" field.
17046 "style": "A String", # The style of the border.
17047 },
17048 "right": { # A border along a cell. # The right border of the cell.
17049 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17050 # for simplicity of conversion to/from color representations in various
17051 # languages over compactness; for example, the fields of this representation
17052 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17053 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17054 # method in iOS; and, with just a little work, it can be easily formatted into
17055 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17056 #
17057 # Example (Java):
17058 #
17059 # import com.google.type.Color;
17060 #
17061 # // ...
17062 # public static java.awt.Color fromProto(Color protocolor) {
17063 # float alpha = protocolor.hasAlpha()
17064 # ? protocolor.getAlpha().getValue()
17065 # : 1.0;
17066 #
17067 # return new java.awt.Color(
17068 # protocolor.getRed(),
17069 # protocolor.getGreen(),
17070 # protocolor.getBlue(),
17071 # alpha);
17072 # }
17073 #
17074 # public static Color toProto(java.awt.Color color) {
17075 # float red = (float) color.getRed();
17076 # float green = (float) color.getGreen();
17077 # float blue = (float) color.getBlue();
17078 # float denominator = 255.0;
17079 # Color.Builder resultBuilder =
17080 # Color
17081 # .newBuilder()
17082 # .setRed(red / denominator)
17083 # .setGreen(green / denominator)
17084 # .setBlue(blue / denominator);
17085 # int alpha = color.getAlpha();
17086 # if (alpha != 255) {
17087 # result.setAlpha(
17088 # FloatValue
17089 # .newBuilder()
17090 # .setValue(((float) alpha) / denominator)
17091 # .build());
17092 # }
17093 # return resultBuilder.build();
17094 # }
17095 # // ...
17096 #
17097 # Example (iOS / Obj-C):
17098 #
17099 # // ...
17100 # static UIColor* fromProto(Color* protocolor) {
17101 # float red = [protocolor red];
17102 # float green = [protocolor green];
17103 # float blue = [protocolor blue];
17104 # FloatValue* alpha_wrapper = [protocolor alpha];
17105 # float alpha = 1.0;
17106 # if (alpha_wrapper != nil) {
17107 # alpha = [alpha_wrapper value];
17108 # }
17109 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17110 # }
17111 #
17112 # static Color* toProto(UIColor* color) {
17113 # CGFloat red, green, blue, alpha;
17114 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17115 # return nil;
17116 # }
17117 # Color* result = [Color alloc] init];
17118 # [result setRed:red];
17119 # [result setGreen:green];
17120 # [result setBlue:blue];
17121 # if (alpha <= 0.9999) {
17122 # [result setAlpha:floatWrapperWithValue(alpha)];
17123 # }
17124 # [result autorelease];
17125 # return result;
17126 # }
17127 # // ...
17128 #
17129 # Example (JavaScript):
17130 #
17131 # // ...
17132 #
17133 # var protoToCssColor = function(rgb_color) {
17134 # var redFrac = rgb_color.red || 0.0;
17135 # var greenFrac = rgb_color.green || 0.0;
17136 # var blueFrac = rgb_color.blue || 0.0;
17137 # var red = Math.floor(redFrac * 255);
17138 # var green = Math.floor(greenFrac * 255);
17139 # var blue = Math.floor(blueFrac * 255);
17140 #
17141 # if (!('alpha' in rgb_color)) {
17142 # return rgbToCssColor_(red, green, blue);
17143 # }
17144 #
17145 # var alphaFrac = rgb_color.alpha.value || 0.0;
17146 # var rgbParams = [red, green, blue].join(',');
17147 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17148 # };
17149 #
17150 # var rgbToCssColor_ = function(red, green, blue) {
17151 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17152 # var hexString = rgbNumber.toString(16);
17153 # var missingZeros = 6 - hexString.length;
17154 # var resultBuilder = ['#'];
17155 # for (var i = 0; i < missingZeros; i++) {
17156 # resultBuilder.push('0');
17157 # }
17158 # resultBuilder.push(hexString);
17159 # return resultBuilder.join('');
17160 # };
17161 #
17162 # // ...
17163 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17164 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17165 # the final pixel color is defined by the equation:
17166 #
17167 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17168 #
17169 # This means that a value of 1.0 corresponds to a solid color, whereas
17170 # a value of 0.0 corresponds to a completely transparent color. This
17171 # uses a wrapper message rather than a simple float scalar so that it is
17172 # possible to distinguish between a default value and the value being unset.
17173 # If omitted, this color object is to be rendered as a solid color
17174 # (as if the alpha value had been explicitly given with a value of 1.0).
17175 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17176 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17177 },
17178 "width": 42, # The width of the border, in pixels.
17179 # Deprecated; the width is determined by the "style" field.
17180 "style": "A String", # The style of the border.
17181 },
17182 "bottom": { # A border along a cell. # The bottom border of the cell.
17183 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17184 # for simplicity of conversion to/from color representations in various
17185 # languages over compactness; for example, the fields of this representation
17186 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17187 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17188 # method in iOS; and, with just a little work, it can be easily formatted into
17189 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17190 #
17191 # Example (Java):
17192 #
17193 # import com.google.type.Color;
17194 #
17195 # // ...
17196 # public static java.awt.Color fromProto(Color protocolor) {
17197 # float alpha = protocolor.hasAlpha()
17198 # ? protocolor.getAlpha().getValue()
17199 # : 1.0;
17200 #
17201 # return new java.awt.Color(
17202 # protocolor.getRed(),
17203 # protocolor.getGreen(),
17204 # protocolor.getBlue(),
17205 # alpha);
17206 # }
17207 #
17208 # public static Color toProto(java.awt.Color color) {
17209 # float red = (float) color.getRed();
17210 # float green = (float) color.getGreen();
17211 # float blue = (float) color.getBlue();
17212 # float denominator = 255.0;
17213 # Color.Builder resultBuilder =
17214 # Color
17215 # .newBuilder()
17216 # .setRed(red / denominator)
17217 # .setGreen(green / denominator)
17218 # .setBlue(blue / denominator);
17219 # int alpha = color.getAlpha();
17220 # if (alpha != 255) {
17221 # result.setAlpha(
17222 # FloatValue
17223 # .newBuilder()
17224 # .setValue(((float) alpha) / denominator)
17225 # .build());
17226 # }
17227 # return resultBuilder.build();
17228 # }
17229 # // ...
17230 #
17231 # Example (iOS / Obj-C):
17232 #
17233 # // ...
17234 # static UIColor* fromProto(Color* protocolor) {
17235 # float red = [protocolor red];
17236 # float green = [protocolor green];
17237 # float blue = [protocolor blue];
17238 # FloatValue* alpha_wrapper = [protocolor alpha];
17239 # float alpha = 1.0;
17240 # if (alpha_wrapper != nil) {
17241 # alpha = [alpha_wrapper value];
17242 # }
17243 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17244 # }
17245 #
17246 # static Color* toProto(UIColor* color) {
17247 # CGFloat red, green, blue, alpha;
17248 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17249 # return nil;
17250 # }
17251 # Color* result = [Color alloc] init];
17252 # [result setRed:red];
17253 # [result setGreen:green];
17254 # [result setBlue:blue];
17255 # if (alpha <= 0.9999) {
17256 # [result setAlpha:floatWrapperWithValue(alpha)];
17257 # }
17258 # [result autorelease];
17259 # return result;
17260 # }
17261 # // ...
17262 #
17263 # Example (JavaScript):
17264 #
17265 # // ...
17266 #
17267 # var protoToCssColor = function(rgb_color) {
17268 # var redFrac = rgb_color.red || 0.0;
17269 # var greenFrac = rgb_color.green || 0.0;
17270 # var blueFrac = rgb_color.blue || 0.0;
17271 # var red = Math.floor(redFrac * 255);
17272 # var green = Math.floor(greenFrac * 255);
17273 # var blue = Math.floor(blueFrac * 255);
17274 #
17275 # if (!('alpha' in rgb_color)) {
17276 # return rgbToCssColor_(red, green, blue);
17277 # }
17278 #
17279 # var alphaFrac = rgb_color.alpha.value || 0.0;
17280 # var rgbParams = [red, green, blue].join(',');
17281 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17282 # };
17283 #
17284 # var rgbToCssColor_ = function(red, green, blue) {
17285 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17286 # var hexString = rgbNumber.toString(16);
17287 # var missingZeros = 6 - hexString.length;
17288 # var resultBuilder = ['#'];
17289 # for (var i = 0; i < missingZeros; i++) {
17290 # resultBuilder.push('0');
17291 # }
17292 # resultBuilder.push(hexString);
17293 # return resultBuilder.join('');
17294 # };
17295 #
17296 # // ...
17297 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17298 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17299 # the final pixel color is defined by the equation:
17300 #
17301 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17302 #
17303 # This means that a value of 1.0 corresponds to a solid color, whereas
17304 # a value of 0.0 corresponds to a completely transparent color. This
17305 # uses a wrapper message rather than a simple float scalar so that it is
17306 # possible to distinguish between a default value and the value being unset.
17307 # If omitted, this color object is to be rendered as a solid color
17308 # (as if the alpha value had been explicitly given with a value of 1.0).
17309 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17310 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17311 },
17312 "width": 42, # The width of the border, in pixels.
17313 # Deprecated; the width is determined by the "style" field.
17314 "style": "A String", # The style of the border.
17315 },
17316 "left": { # A border along a cell. # The left border of the cell.
17317 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17318 # for simplicity of conversion to/from color representations in various
17319 # languages over compactness; for example, the fields of this representation
17320 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17321 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17322 # method in iOS; and, with just a little work, it can be easily formatted into
17323 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17324 #
17325 # Example (Java):
17326 #
17327 # import com.google.type.Color;
17328 #
17329 # // ...
17330 # public static java.awt.Color fromProto(Color protocolor) {
17331 # float alpha = protocolor.hasAlpha()
17332 # ? protocolor.getAlpha().getValue()
17333 # : 1.0;
17334 #
17335 # return new java.awt.Color(
17336 # protocolor.getRed(),
17337 # protocolor.getGreen(),
17338 # protocolor.getBlue(),
17339 # alpha);
17340 # }
17341 #
17342 # public static Color toProto(java.awt.Color color) {
17343 # float red = (float) color.getRed();
17344 # float green = (float) color.getGreen();
17345 # float blue = (float) color.getBlue();
17346 # float denominator = 255.0;
17347 # Color.Builder resultBuilder =
17348 # Color
17349 # .newBuilder()
17350 # .setRed(red / denominator)
17351 # .setGreen(green / denominator)
17352 # .setBlue(blue / denominator);
17353 # int alpha = color.getAlpha();
17354 # if (alpha != 255) {
17355 # result.setAlpha(
17356 # FloatValue
17357 # .newBuilder()
17358 # .setValue(((float) alpha) / denominator)
17359 # .build());
17360 # }
17361 # return resultBuilder.build();
17362 # }
17363 # // ...
17364 #
17365 # Example (iOS / Obj-C):
17366 #
17367 # // ...
17368 # static UIColor* fromProto(Color* protocolor) {
17369 # float red = [protocolor red];
17370 # float green = [protocolor green];
17371 # float blue = [protocolor blue];
17372 # FloatValue* alpha_wrapper = [protocolor alpha];
17373 # float alpha = 1.0;
17374 # if (alpha_wrapper != nil) {
17375 # alpha = [alpha_wrapper value];
17376 # }
17377 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17378 # }
17379 #
17380 # static Color* toProto(UIColor* color) {
17381 # CGFloat red, green, blue, alpha;
17382 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17383 # return nil;
17384 # }
17385 # Color* result = [Color alloc] init];
17386 # [result setRed:red];
17387 # [result setGreen:green];
17388 # [result setBlue:blue];
17389 # if (alpha <= 0.9999) {
17390 # [result setAlpha:floatWrapperWithValue(alpha)];
17391 # }
17392 # [result autorelease];
17393 # return result;
17394 # }
17395 # // ...
17396 #
17397 # Example (JavaScript):
17398 #
17399 # // ...
17400 #
17401 # var protoToCssColor = function(rgb_color) {
17402 # var redFrac = rgb_color.red || 0.0;
17403 # var greenFrac = rgb_color.green || 0.0;
17404 # var blueFrac = rgb_color.blue || 0.0;
17405 # var red = Math.floor(redFrac * 255);
17406 # var green = Math.floor(greenFrac * 255);
17407 # var blue = Math.floor(blueFrac * 255);
17408 #
17409 # if (!('alpha' in rgb_color)) {
17410 # return rgbToCssColor_(red, green, blue);
17411 # }
17412 #
17413 # var alphaFrac = rgb_color.alpha.value || 0.0;
17414 # var rgbParams = [red, green, blue].join(',');
17415 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17416 # };
17417 #
17418 # var rgbToCssColor_ = function(red, green, blue) {
17419 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17420 # var hexString = rgbNumber.toString(16);
17421 # var missingZeros = 6 - hexString.length;
17422 # var resultBuilder = ['#'];
17423 # for (var i = 0; i < missingZeros; i++) {
17424 # resultBuilder.push('0');
17425 # }
17426 # resultBuilder.push(hexString);
17427 # return resultBuilder.join('');
17428 # };
17429 #
17430 # // ...
17431 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17432 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17433 # the final pixel color is defined by the equation:
17434 #
17435 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17436 #
17437 # This means that a value of 1.0 corresponds to a solid color, whereas
17438 # a value of 0.0 corresponds to a completely transparent color. This
17439 # uses a wrapper message rather than a simple float scalar so that it is
17440 # possible to distinguish between a default value and the value being unset.
17441 # If omitted, this color object is to be rendered as a solid color
17442 # (as if the alpha value had been explicitly given with a value of 1.0).
17443 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17444 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17445 },
17446 "width": 42, # The width of the border, in pixels.
17447 # Deprecated; the width is determined by the "style" field.
17448 "style": "A String", # The style of the border.
17449 },
17450 },
17451 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
17452 },
17453 },
17454 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
17455 # the interpolation points listed. The format of a cell will vary
17456 # based on its contents as compared to the values of the interpolation
17457 # points.
17458 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
17459 # These pin the gradient color scale according to the color,
17460 # type and value chosen.
17461 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
17462 # for simplicity of conversion to/from color representations in various
17463 # languages over compactness; for example, the fields of this representation
17464 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17465 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17466 # method in iOS; and, with just a little work, it can be easily formatted into
17467 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17468 #
17469 # Example (Java):
17470 #
17471 # import com.google.type.Color;
17472 #
17473 # // ...
17474 # public static java.awt.Color fromProto(Color protocolor) {
17475 # float alpha = protocolor.hasAlpha()
17476 # ? protocolor.getAlpha().getValue()
17477 # : 1.0;
17478 #
17479 # return new java.awt.Color(
17480 # protocolor.getRed(),
17481 # protocolor.getGreen(),
17482 # protocolor.getBlue(),
17483 # alpha);
17484 # }
17485 #
17486 # public static Color toProto(java.awt.Color color) {
17487 # float red = (float) color.getRed();
17488 # float green = (float) color.getGreen();
17489 # float blue = (float) color.getBlue();
17490 # float denominator = 255.0;
17491 # Color.Builder resultBuilder =
17492 # Color
17493 # .newBuilder()
17494 # .setRed(red / denominator)
17495 # .setGreen(green / denominator)
17496 # .setBlue(blue / denominator);
17497 # int alpha = color.getAlpha();
17498 # if (alpha != 255) {
17499 # result.setAlpha(
17500 # FloatValue
17501 # .newBuilder()
17502 # .setValue(((float) alpha) / denominator)
17503 # .build());
17504 # }
17505 # return resultBuilder.build();
17506 # }
17507 # // ...
17508 #
17509 # Example (iOS / Obj-C):
17510 #
17511 # // ...
17512 # static UIColor* fromProto(Color* protocolor) {
17513 # float red = [protocolor red];
17514 # float green = [protocolor green];
17515 # float blue = [protocolor blue];
17516 # FloatValue* alpha_wrapper = [protocolor alpha];
17517 # float alpha = 1.0;
17518 # if (alpha_wrapper != nil) {
17519 # alpha = [alpha_wrapper value];
17520 # }
17521 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17522 # }
17523 #
17524 # static Color* toProto(UIColor* color) {
17525 # CGFloat red, green, blue, alpha;
17526 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17527 # return nil;
17528 # }
17529 # Color* result = [Color alloc] init];
17530 # [result setRed:red];
17531 # [result setGreen:green];
17532 # [result setBlue:blue];
17533 # if (alpha <= 0.9999) {
17534 # [result setAlpha:floatWrapperWithValue(alpha)];
17535 # }
17536 # [result autorelease];
17537 # return result;
17538 # }
17539 # // ...
17540 #
17541 # Example (JavaScript):
17542 #
17543 # // ...
17544 #
17545 # var protoToCssColor = function(rgb_color) {
17546 # var redFrac = rgb_color.red || 0.0;
17547 # var greenFrac = rgb_color.green || 0.0;
17548 # var blueFrac = rgb_color.blue || 0.0;
17549 # var red = Math.floor(redFrac * 255);
17550 # var green = Math.floor(greenFrac * 255);
17551 # var blue = Math.floor(blueFrac * 255);
17552 #
17553 # if (!('alpha' in rgb_color)) {
17554 # return rgbToCssColor_(red, green, blue);
17555 # }
17556 #
17557 # var alphaFrac = rgb_color.alpha.value || 0.0;
17558 # var rgbParams = [red, green, blue].join(',');
17559 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17560 # };
17561 #
17562 # var rgbToCssColor_ = function(red, green, blue) {
17563 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17564 # var hexString = rgbNumber.toString(16);
17565 # var missingZeros = 6 - hexString.length;
17566 # var resultBuilder = ['#'];
17567 # for (var i = 0; i < missingZeros; i++) {
17568 # resultBuilder.push('0');
17569 # }
17570 # resultBuilder.push(hexString);
17571 # return resultBuilder.join('');
17572 # };
17573 #
17574 # // ...
17575 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17576 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17577 # the final pixel color is defined by the equation:
17578 #
17579 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17580 #
17581 # This means that a value of 1.0 corresponds to a solid color, whereas
17582 # a value of 0.0 corresponds to a completely transparent color. This
17583 # uses a wrapper message rather than a simple float scalar so that it is
17584 # possible to distinguish between a default value and the value being unset.
17585 # If omitted, this color object is to be rendered as a solid color
17586 # (as if the alpha value had been explicitly given with a value of 1.0).
17587 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17588 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17589 },
17590 "type": "A String", # How the value should be interpreted.
17591 "value": "A String", # The value this interpolation point uses. May be a formula.
17592 # Unused if type is MIN or
17593 # MAX.
17594 },
17595 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
17596 # These pin the gradient color scale according to the color,
17597 # type and value chosen.
17598 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
17599 # for simplicity of conversion to/from color representations in various
17600 # languages over compactness; for example, the fields of this representation
17601 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17602 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17603 # method in iOS; and, with just a little work, it can be easily formatted into
17604 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17605 #
17606 # Example (Java):
17607 #
17608 # import com.google.type.Color;
17609 #
17610 # // ...
17611 # public static java.awt.Color fromProto(Color protocolor) {
17612 # float alpha = protocolor.hasAlpha()
17613 # ? protocolor.getAlpha().getValue()
17614 # : 1.0;
17615 #
17616 # return new java.awt.Color(
17617 # protocolor.getRed(),
17618 # protocolor.getGreen(),
17619 # protocolor.getBlue(),
17620 # alpha);
17621 # }
17622 #
17623 # public static Color toProto(java.awt.Color color) {
17624 # float red = (float) color.getRed();
17625 # float green = (float) color.getGreen();
17626 # float blue = (float) color.getBlue();
17627 # float denominator = 255.0;
17628 # Color.Builder resultBuilder =
17629 # Color
17630 # .newBuilder()
17631 # .setRed(red / denominator)
17632 # .setGreen(green / denominator)
17633 # .setBlue(blue / denominator);
17634 # int alpha = color.getAlpha();
17635 # if (alpha != 255) {
17636 # result.setAlpha(
17637 # FloatValue
17638 # .newBuilder()
17639 # .setValue(((float) alpha) / denominator)
17640 # .build());
17641 # }
17642 # return resultBuilder.build();
17643 # }
17644 # // ...
17645 #
17646 # Example (iOS / Obj-C):
17647 #
17648 # // ...
17649 # static UIColor* fromProto(Color* protocolor) {
17650 # float red = [protocolor red];
17651 # float green = [protocolor green];
17652 # float blue = [protocolor blue];
17653 # FloatValue* alpha_wrapper = [protocolor alpha];
17654 # float alpha = 1.0;
17655 # if (alpha_wrapper != nil) {
17656 # alpha = [alpha_wrapper value];
17657 # }
17658 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17659 # }
17660 #
17661 # static Color* toProto(UIColor* color) {
17662 # CGFloat red, green, blue, alpha;
17663 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17664 # return nil;
17665 # }
17666 # Color* result = [Color alloc] init];
17667 # [result setRed:red];
17668 # [result setGreen:green];
17669 # [result setBlue:blue];
17670 # if (alpha <= 0.9999) {
17671 # [result setAlpha:floatWrapperWithValue(alpha)];
17672 # }
17673 # [result autorelease];
17674 # return result;
17675 # }
17676 # // ...
17677 #
17678 # Example (JavaScript):
17679 #
17680 # // ...
17681 #
17682 # var protoToCssColor = function(rgb_color) {
17683 # var redFrac = rgb_color.red || 0.0;
17684 # var greenFrac = rgb_color.green || 0.0;
17685 # var blueFrac = rgb_color.blue || 0.0;
17686 # var red = Math.floor(redFrac * 255);
17687 # var green = Math.floor(greenFrac * 255);
17688 # var blue = Math.floor(blueFrac * 255);
17689 #
17690 # if (!('alpha' in rgb_color)) {
17691 # return rgbToCssColor_(red, green, blue);
17692 # }
17693 #
17694 # var alphaFrac = rgb_color.alpha.value || 0.0;
17695 # var rgbParams = [red, green, blue].join(',');
17696 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17697 # };
17698 #
17699 # var rgbToCssColor_ = function(red, green, blue) {
17700 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17701 # var hexString = rgbNumber.toString(16);
17702 # var missingZeros = 6 - hexString.length;
17703 # var resultBuilder = ['#'];
17704 # for (var i = 0; i < missingZeros; i++) {
17705 # resultBuilder.push('0');
17706 # }
17707 # resultBuilder.push(hexString);
17708 # return resultBuilder.join('');
17709 # };
17710 #
17711 # // ...
17712 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17713 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17714 # the final pixel color is defined by the equation:
17715 #
17716 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17717 #
17718 # This means that a value of 1.0 corresponds to a solid color, whereas
17719 # a value of 0.0 corresponds to a completely transparent color. This
17720 # uses a wrapper message rather than a simple float scalar so that it is
17721 # possible to distinguish between a default value and the value being unset.
17722 # If omitted, this color object is to be rendered as a solid color
17723 # (as if the alpha value had been explicitly given with a value of 1.0).
17724 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17725 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17726 },
17727 "type": "A String", # How the value should be interpreted.
17728 "value": "A String", # The value this interpolation point uses. May be a formula.
17729 # Unused if type is MIN or
17730 # MAX.
17731 },
17732 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
17733 # These pin the gradient color scale according to the color,
17734 # type and value chosen.
17735 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
17736 # for simplicity of conversion to/from color representations in various
17737 # languages over compactness; for example, the fields of this representation
17738 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17739 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17740 # method in iOS; and, with just a little work, it can be easily formatted into
17741 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17742 #
17743 # Example (Java):
17744 #
17745 # import com.google.type.Color;
17746 #
17747 # // ...
17748 # public static java.awt.Color fromProto(Color protocolor) {
17749 # float alpha = protocolor.hasAlpha()
17750 # ? protocolor.getAlpha().getValue()
17751 # : 1.0;
17752 #
17753 # return new java.awt.Color(
17754 # protocolor.getRed(),
17755 # protocolor.getGreen(),
17756 # protocolor.getBlue(),
17757 # alpha);
17758 # }
17759 #
17760 # public static Color toProto(java.awt.Color color) {
17761 # float red = (float) color.getRed();
17762 # float green = (float) color.getGreen();
17763 # float blue = (float) color.getBlue();
17764 # float denominator = 255.0;
17765 # Color.Builder resultBuilder =
17766 # Color
17767 # .newBuilder()
17768 # .setRed(red / denominator)
17769 # .setGreen(green / denominator)
17770 # .setBlue(blue / denominator);
17771 # int alpha = color.getAlpha();
17772 # if (alpha != 255) {
17773 # result.setAlpha(
17774 # FloatValue
17775 # .newBuilder()
17776 # .setValue(((float) alpha) / denominator)
17777 # .build());
17778 # }
17779 # return resultBuilder.build();
17780 # }
17781 # // ...
17782 #
17783 # Example (iOS / Obj-C):
17784 #
17785 # // ...
17786 # static UIColor* fromProto(Color* protocolor) {
17787 # float red = [protocolor red];
17788 # float green = [protocolor green];
17789 # float blue = [protocolor blue];
17790 # FloatValue* alpha_wrapper = [protocolor alpha];
17791 # float alpha = 1.0;
17792 # if (alpha_wrapper != nil) {
17793 # alpha = [alpha_wrapper value];
17794 # }
17795 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17796 # }
17797 #
17798 # static Color* toProto(UIColor* color) {
17799 # CGFloat red, green, blue, alpha;
17800 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17801 # return nil;
17802 # }
17803 # Color* result = [Color alloc] init];
17804 # [result setRed:red];
17805 # [result setGreen:green];
17806 # [result setBlue:blue];
17807 # if (alpha <= 0.9999) {
17808 # [result setAlpha:floatWrapperWithValue(alpha)];
17809 # }
17810 # [result autorelease];
17811 # return result;
17812 # }
17813 # // ...
17814 #
17815 # Example (JavaScript):
17816 #
17817 # // ...
17818 #
17819 # var protoToCssColor = function(rgb_color) {
17820 # var redFrac = rgb_color.red || 0.0;
17821 # var greenFrac = rgb_color.green || 0.0;
17822 # var blueFrac = rgb_color.blue || 0.0;
17823 # var red = Math.floor(redFrac * 255);
17824 # var green = Math.floor(greenFrac * 255);
17825 # var blue = Math.floor(blueFrac * 255);
17826 #
17827 # if (!('alpha' in rgb_color)) {
17828 # return rgbToCssColor_(red, green, blue);
17829 # }
17830 #
17831 # var alphaFrac = rgb_color.alpha.value || 0.0;
17832 # var rgbParams = [red, green, blue].join(',');
17833 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17834 # };
17835 #
17836 # var rgbToCssColor_ = function(red, green, blue) {
17837 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17838 # var hexString = rgbNumber.toString(16);
17839 # var missingZeros = 6 - hexString.length;
17840 # var resultBuilder = ['#'];
17841 # for (var i = 0; i < missingZeros; i++) {
17842 # resultBuilder.push('0');
17843 # }
17844 # resultBuilder.push(hexString);
17845 # return resultBuilder.join('');
17846 # };
17847 #
17848 # // ...
17849 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17850 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17851 # the final pixel color is defined by the equation:
17852 #
17853 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17854 #
17855 # This means that a value of 1.0 corresponds to a solid color, whereas
17856 # a value of 0.0 corresponds to a completely transparent color. This
17857 # uses a wrapper message rather than a simple float scalar so that it is
17858 # possible to distinguish between a default value and the value being unset.
17859 # If omitted, this color object is to be rendered as a solid color
17860 # (as if the alpha value had been explicitly given with a value of 1.0).
17861 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17862 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17863 },
17864 "type": "A String", # How the value should be interpreted.
17865 "value": "A String", # The value this interpolation point uses. May be a formula.
17866 # Unused if type is MIN or
17867 # MAX.
17868 },
17869 },
17870 },
17871 ],
17872 "bandedRanges": [ # The banded (i.e. alternating colors) ranges on this sheet.
17873 { # A banded (alternating colors) range in a sheet.
17874 "range": { # A range on a sheet. # The range over which these properties are applied.
17875 # All indexes are zero-based.
17876 # Indexes are half open, e.g the start index is inclusive
17877 # and the end index is exclusive -- [start_index, end_index).
17878 # Missing indexes indicate the range is unbounded on that side.
17879 #
17880 # For example, if `"Sheet1"` is sheet ID 0, then:
17881 #
17882 # `Sheet1!A1:A1 == sheet_id: 0,
17883 # start_row_index: 0, end_row_index: 1,
17884 # start_column_index: 0, end_column_index: 1`
17885 #
17886 # `Sheet1!A3:B4 == sheet_id: 0,
17887 # start_row_index: 2, end_row_index: 4,
17888 # start_column_index: 0, end_column_index: 2`
17889 #
17890 # `Sheet1!A:B == sheet_id: 0,
17891 # start_column_index: 0, end_column_index: 2`
17892 #
17893 # `Sheet1!A5:B == sheet_id: 0,
17894 # start_row_index: 4,
17895 # start_column_index: 0, end_column_index: 2`
17896 #
17897 # `Sheet1 == sheet_id:0`
17898 #
17899 # The start index must always be less than or equal to the end index.
17900 # If the start index equals the end index, then the range is empty.
17901 # Empty ranges are typically not meaningful and are usually rendered in the
17902 # UI as `#REF!`.
17903 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
17904 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
17905 "sheetId": 42, # The sheet this range is on.
17906 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
17907 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
17908 },
17909 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
17910 # by-column basis throughout all the columns in the range. At least one of
17911 # row_properties or column_properties must be specified.
17912 # BandedRange.row_properties and BandedRange.column_properties are
17913 # set, the fill colors are applied to cells according to the following rules:
17914 #
17915 # * header_color and footer_color take priority over band colors.
17916 # * first_band_color takes priority over second_band_color.
17917 # * row_properties takes priority over column_properties.
17918 #
17919 # For example, the first row color takes priority over the first column
17920 # color, but the first column color takes priority over the second row color.
17921 # Similarly, the row header takes priority over the column header in the
17922 # top left cell, but the column header takes priority over the first row
17923 # color if the row header is not set.
17924 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
17925 # for simplicity of conversion to/from color representations in various
17926 # languages over compactness; for example, the fields of this representation
17927 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17928 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17929 # method in iOS; and, with just a little work, it can be easily formatted into
17930 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17931 #
17932 # Example (Java):
17933 #
17934 # import com.google.type.Color;
17935 #
17936 # // ...
17937 # public static java.awt.Color fromProto(Color protocolor) {
17938 # float alpha = protocolor.hasAlpha()
17939 # ? protocolor.getAlpha().getValue()
17940 # : 1.0;
17941 #
17942 # return new java.awt.Color(
17943 # protocolor.getRed(),
17944 # protocolor.getGreen(),
17945 # protocolor.getBlue(),
17946 # alpha);
17947 # }
17948 #
17949 # public static Color toProto(java.awt.Color color) {
17950 # float red = (float) color.getRed();
17951 # float green = (float) color.getGreen();
17952 # float blue = (float) color.getBlue();
17953 # float denominator = 255.0;
17954 # Color.Builder resultBuilder =
17955 # Color
17956 # .newBuilder()
17957 # .setRed(red / denominator)
17958 # .setGreen(green / denominator)
17959 # .setBlue(blue / denominator);
17960 # int alpha = color.getAlpha();
17961 # if (alpha != 255) {
17962 # result.setAlpha(
17963 # FloatValue
17964 # .newBuilder()
17965 # .setValue(((float) alpha) / denominator)
17966 # .build());
17967 # }
17968 # return resultBuilder.build();
17969 # }
17970 # // ...
17971 #
17972 # Example (iOS / Obj-C):
17973 #
17974 # // ...
17975 # static UIColor* fromProto(Color* protocolor) {
17976 # float red = [protocolor red];
17977 # float green = [protocolor green];
17978 # float blue = [protocolor blue];
17979 # FloatValue* alpha_wrapper = [protocolor alpha];
17980 # float alpha = 1.0;
17981 # if (alpha_wrapper != nil) {
17982 # alpha = [alpha_wrapper value];
17983 # }
17984 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17985 # }
17986 #
17987 # static Color* toProto(UIColor* color) {
17988 # CGFloat red, green, blue, alpha;
17989 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17990 # return nil;
17991 # }
17992 # Color* result = [Color alloc] init];
17993 # [result setRed:red];
17994 # [result setGreen:green];
17995 # [result setBlue:blue];
17996 # if (alpha <= 0.9999) {
17997 # [result setAlpha:floatWrapperWithValue(alpha)];
17998 # }
17999 # [result autorelease];
18000 # return result;
18001 # }
18002 # // ...
18003 #
18004 # Example (JavaScript):
18005 #
18006 # // ...
18007 #
18008 # var protoToCssColor = function(rgb_color) {
18009 # var redFrac = rgb_color.red || 0.0;
18010 # var greenFrac = rgb_color.green || 0.0;
18011 # var blueFrac = rgb_color.blue || 0.0;
18012 # var red = Math.floor(redFrac * 255);
18013 # var green = Math.floor(greenFrac * 255);
18014 # var blue = Math.floor(blueFrac * 255);
18015 #
18016 # if (!('alpha' in rgb_color)) {
18017 # return rgbToCssColor_(red, green, blue);
18018 # }
18019 #
18020 # var alphaFrac = rgb_color.alpha.value || 0.0;
18021 # var rgbParams = [red, green, blue].join(',');
18022 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18023 # };
18024 #
18025 # var rgbToCssColor_ = function(red, green, blue) {
18026 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18027 # var hexString = rgbNumber.toString(16);
18028 # var missingZeros = 6 - hexString.length;
18029 # var resultBuilder = ['#'];
18030 # for (var i = 0; i < missingZeros; i++) {
18031 # resultBuilder.push('0');
18032 # }
18033 # resultBuilder.push(hexString);
18034 # return resultBuilder.join('');
18035 # };
18036 #
18037 # // ...
18038 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18039 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18040 # the final pixel color is defined by the equation:
18041 #
18042 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18043 #
18044 # This means that a value of 1.0 corresponds to a solid color, whereas
18045 # a value of 0.0 corresponds to a completely transparent color. This
18046 # uses a wrapper message rather than a simple float scalar so that it is
18047 # possible to distinguish between a default value and the value being unset.
18048 # If omitted, this color object is to be rendered as a solid color
18049 # (as if the alpha value had been explicitly given with a value of 1.0).
18050 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18051 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18052 },
18053 "headerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the first row or column. If this field is set, the first
18054 # row or column will be filled with this color and the colors will
18055 # alternate between first_band_color and second_band_color starting
18056 # from the second row or column. Otherwise, the first row or column will be
18057 # filled with first_band_color and the colors will proceed to alternate
18058 # as they normally would.
18059 # for simplicity of conversion to/from color representations in various
18060 # languages over compactness; for example, the fields of this representation
18061 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18062 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18063 # method in iOS; and, with just a little work, it can be easily formatted into
18064 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18065 #
18066 # Example (Java):
18067 #
18068 # import com.google.type.Color;
18069 #
18070 # // ...
18071 # public static java.awt.Color fromProto(Color protocolor) {
18072 # float alpha = protocolor.hasAlpha()
18073 # ? protocolor.getAlpha().getValue()
18074 # : 1.0;
18075 #
18076 # return new java.awt.Color(
18077 # protocolor.getRed(),
18078 # protocolor.getGreen(),
18079 # protocolor.getBlue(),
18080 # alpha);
18081 # }
18082 #
18083 # public static Color toProto(java.awt.Color color) {
18084 # float red = (float) color.getRed();
18085 # float green = (float) color.getGreen();
18086 # float blue = (float) color.getBlue();
18087 # float denominator = 255.0;
18088 # Color.Builder resultBuilder =
18089 # Color
18090 # .newBuilder()
18091 # .setRed(red / denominator)
18092 # .setGreen(green / denominator)
18093 # .setBlue(blue / denominator);
18094 # int alpha = color.getAlpha();
18095 # if (alpha != 255) {
18096 # result.setAlpha(
18097 # FloatValue
18098 # .newBuilder()
18099 # .setValue(((float) alpha) / denominator)
18100 # .build());
18101 # }
18102 # return resultBuilder.build();
18103 # }
18104 # // ...
18105 #
18106 # Example (iOS / Obj-C):
18107 #
18108 # // ...
18109 # static UIColor* fromProto(Color* protocolor) {
18110 # float red = [protocolor red];
18111 # float green = [protocolor green];
18112 # float blue = [protocolor blue];
18113 # FloatValue* alpha_wrapper = [protocolor alpha];
18114 # float alpha = 1.0;
18115 # if (alpha_wrapper != nil) {
18116 # alpha = [alpha_wrapper value];
18117 # }
18118 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18119 # }
18120 #
18121 # static Color* toProto(UIColor* color) {
18122 # CGFloat red, green, blue, alpha;
18123 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18124 # return nil;
18125 # }
18126 # Color* result = [Color alloc] init];
18127 # [result setRed:red];
18128 # [result setGreen:green];
18129 # [result setBlue:blue];
18130 # if (alpha <= 0.9999) {
18131 # [result setAlpha:floatWrapperWithValue(alpha)];
18132 # }
18133 # [result autorelease];
18134 # return result;
18135 # }
18136 # // ...
18137 #
18138 # Example (JavaScript):
18139 #
18140 # // ...
18141 #
18142 # var protoToCssColor = function(rgb_color) {
18143 # var redFrac = rgb_color.red || 0.0;
18144 # var greenFrac = rgb_color.green || 0.0;
18145 # var blueFrac = rgb_color.blue || 0.0;
18146 # var red = Math.floor(redFrac * 255);
18147 # var green = Math.floor(greenFrac * 255);
18148 # var blue = Math.floor(blueFrac * 255);
18149 #
18150 # if (!('alpha' in rgb_color)) {
18151 # return rgbToCssColor_(red, green, blue);
18152 # }
18153 #
18154 # var alphaFrac = rgb_color.alpha.value || 0.0;
18155 # var rgbParams = [red, green, blue].join(',');
18156 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18157 # };
18158 #
18159 # var rgbToCssColor_ = function(red, green, blue) {
18160 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18161 # var hexString = rgbNumber.toString(16);
18162 # var missingZeros = 6 - hexString.length;
18163 # var resultBuilder = ['#'];
18164 # for (var i = 0; i < missingZeros; i++) {
18165 # resultBuilder.push('0');
18166 # }
18167 # resultBuilder.push(hexString);
18168 # return resultBuilder.join('');
18169 # };
18170 #
18171 # // ...
18172 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18173 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18174 # the final pixel color is defined by the equation:
18175 #
18176 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18177 #
18178 # This means that a value of 1.0 corresponds to a solid color, whereas
18179 # a value of 0.0 corresponds to a completely transparent color. This
18180 # uses a wrapper message rather than a simple float scalar so that it is
18181 # possible to distinguish between a default value and the value being unset.
18182 # If omitted, this color object is to be rendered as a solid color
18183 # (as if the alpha value had been explicitly given with a value of 1.0).
18184 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18185 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18186 },
18187 "footerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the last row or column. If this field is not set, the last
18188 # row or column will be filled with either first_band_color or
18189 # second_band_color, depending on the color of the previous row or
18190 # column.
18191 # for simplicity of conversion to/from color representations in various
18192 # languages over compactness; for example, the fields of this representation
18193 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18194 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18195 # method in iOS; and, with just a little work, it can be easily formatted into
18196 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18197 #
18198 # Example (Java):
18199 #
18200 # import com.google.type.Color;
18201 #
18202 # // ...
18203 # public static java.awt.Color fromProto(Color protocolor) {
18204 # float alpha = protocolor.hasAlpha()
18205 # ? protocolor.getAlpha().getValue()
18206 # : 1.0;
18207 #
18208 # return new java.awt.Color(
18209 # protocolor.getRed(),
18210 # protocolor.getGreen(),
18211 # protocolor.getBlue(),
18212 # alpha);
18213 # }
18214 #
18215 # public static Color toProto(java.awt.Color color) {
18216 # float red = (float) color.getRed();
18217 # float green = (float) color.getGreen();
18218 # float blue = (float) color.getBlue();
18219 # float denominator = 255.0;
18220 # Color.Builder resultBuilder =
18221 # Color
18222 # .newBuilder()
18223 # .setRed(red / denominator)
18224 # .setGreen(green / denominator)
18225 # .setBlue(blue / denominator);
18226 # int alpha = color.getAlpha();
18227 # if (alpha != 255) {
18228 # result.setAlpha(
18229 # FloatValue
18230 # .newBuilder()
18231 # .setValue(((float) alpha) / denominator)
18232 # .build());
18233 # }
18234 # return resultBuilder.build();
18235 # }
18236 # // ...
18237 #
18238 # Example (iOS / Obj-C):
18239 #
18240 # // ...
18241 # static UIColor* fromProto(Color* protocolor) {
18242 # float red = [protocolor red];
18243 # float green = [protocolor green];
18244 # float blue = [protocolor blue];
18245 # FloatValue* alpha_wrapper = [protocolor alpha];
18246 # float alpha = 1.0;
18247 # if (alpha_wrapper != nil) {
18248 # alpha = [alpha_wrapper value];
18249 # }
18250 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18251 # }
18252 #
18253 # static Color* toProto(UIColor* color) {
18254 # CGFloat red, green, blue, alpha;
18255 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18256 # return nil;
18257 # }
18258 # Color* result = [Color alloc] init];
18259 # [result setRed:red];
18260 # [result setGreen:green];
18261 # [result setBlue:blue];
18262 # if (alpha <= 0.9999) {
18263 # [result setAlpha:floatWrapperWithValue(alpha)];
18264 # }
18265 # [result autorelease];
18266 # return result;
18267 # }
18268 # // ...
18269 #
18270 # Example (JavaScript):
18271 #
18272 # // ...
18273 #
18274 # var protoToCssColor = function(rgb_color) {
18275 # var redFrac = rgb_color.red || 0.0;
18276 # var greenFrac = rgb_color.green || 0.0;
18277 # var blueFrac = rgb_color.blue || 0.0;
18278 # var red = Math.floor(redFrac * 255);
18279 # var green = Math.floor(greenFrac * 255);
18280 # var blue = Math.floor(blueFrac * 255);
18281 #
18282 # if (!('alpha' in rgb_color)) {
18283 # return rgbToCssColor_(red, green, blue);
18284 # }
18285 #
18286 # var alphaFrac = rgb_color.alpha.value || 0.0;
18287 # var rgbParams = [red, green, blue].join(',');
18288 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18289 # };
18290 #
18291 # var rgbToCssColor_ = function(red, green, blue) {
18292 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18293 # var hexString = rgbNumber.toString(16);
18294 # var missingZeros = 6 - hexString.length;
18295 # var resultBuilder = ['#'];
18296 # for (var i = 0; i < missingZeros; i++) {
18297 # resultBuilder.push('0');
18298 # }
18299 # resultBuilder.push(hexString);
18300 # return resultBuilder.join('');
18301 # };
18302 #
18303 # // ...
18304 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18305 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18306 # the final pixel color is defined by the equation:
18307 #
18308 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18309 #
18310 # This means that a value of 1.0 corresponds to a solid color, whereas
18311 # a value of 0.0 corresponds to a completely transparent color. This
18312 # uses a wrapper message rather than a simple float scalar so that it is
18313 # possible to distinguish between a default value and the value being unset.
18314 # If omitted, this color object is to be rendered as a solid color
18315 # (as if the alpha value had been explicitly given with a value of 1.0).
18316 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18317 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18318 },
18319 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
18320 # for simplicity of conversion to/from color representations in various
18321 # languages over compactness; for example, the fields of this representation
18322 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18323 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18324 # method in iOS; and, with just a little work, it can be easily formatted into
18325 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18326 #
18327 # Example (Java):
18328 #
18329 # import com.google.type.Color;
18330 #
18331 # // ...
18332 # public static java.awt.Color fromProto(Color protocolor) {
18333 # float alpha = protocolor.hasAlpha()
18334 # ? protocolor.getAlpha().getValue()
18335 # : 1.0;
18336 #
18337 # return new java.awt.Color(
18338 # protocolor.getRed(),
18339 # protocolor.getGreen(),
18340 # protocolor.getBlue(),
18341 # alpha);
18342 # }
18343 #
18344 # public static Color toProto(java.awt.Color color) {
18345 # float red = (float) color.getRed();
18346 # float green = (float) color.getGreen();
18347 # float blue = (float) color.getBlue();
18348 # float denominator = 255.0;
18349 # Color.Builder resultBuilder =
18350 # Color
18351 # .newBuilder()
18352 # .setRed(red / denominator)
18353 # .setGreen(green / denominator)
18354 # .setBlue(blue / denominator);
18355 # int alpha = color.getAlpha();
18356 # if (alpha != 255) {
18357 # result.setAlpha(
18358 # FloatValue
18359 # .newBuilder()
18360 # .setValue(((float) alpha) / denominator)
18361 # .build());
18362 # }
18363 # return resultBuilder.build();
18364 # }
18365 # // ...
18366 #
18367 # Example (iOS / Obj-C):
18368 #
18369 # // ...
18370 # static UIColor* fromProto(Color* protocolor) {
18371 # float red = [protocolor red];
18372 # float green = [protocolor green];
18373 # float blue = [protocolor blue];
18374 # FloatValue* alpha_wrapper = [protocolor alpha];
18375 # float alpha = 1.0;
18376 # if (alpha_wrapper != nil) {
18377 # alpha = [alpha_wrapper value];
18378 # }
18379 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18380 # }
18381 #
18382 # static Color* toProto(UIColor* color) {
18383 # CGFloat red, green, blue, alpha;
18384 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18385 # return nil;
18386 # }
18387 # Color* result = [Color alloc] init];
18388 # [result setRed:red];
18389 # [result setGreen:green];
18390 # [result setBlue:blue];
18391 # if (alpha <= 0.9999) {
18392 # [result setAlpha:floatWrapperWithValue(alpha)];
18393 # }
18394 # [result autorelease];
18395 # return result;
18396 # }
18397 # // ...
18398 #
18399 # Example (JavaScript):
18400 #
18401 # // ...
18402 #
18403 # var protoToCssColor = function(rgb_color) {
18404 # var redFrac = rgb_color.red || 0.0;
18405 # var greenFrac = rgb_color.green || 0.0;
18406 # var blueFrac = rgb_color.blue || 0.0;
18407 # var red = Math.floor(redFrac * 255);
18408 # var green = Math.floor(greenFrac * 255);
18409 # var blue = Math.floor(blueFrac * 255);
18410 #
18411 # if (!('alpha' in rgb_color)) {
18412 # return rgbToCssColor_(red, green, blue);
18413 # }
18414 #
18415 # var alphaFrac = rgb_color.alpha.value || 0.0;
18416 # var rgbParams = [red, green, blue].join(',');
18417 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18418 # };
18419 #
18420 # var rgbToCssColor_ = function(red, green, blue) {
18421 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18422 # var hexString = rgbNumber.toString(16);
18423 # var missingZeros = 6 - hexString.length;
18424 # var resultBuilder = ['#'];
18425 # for (var i = 0; i < missingZeros; i++) {
18426 # resultBuilder.push('0');
18427 # }
18428 # resultBuilder.push(hexString);
18429 # return resultBuilder.join('');
18430 # };
18431 #
18432 # // ...
18433 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18434 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18435 # the final pixel color is defined by the equation:
18436 #
18437 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18438 #
18439 # This means that a value of 1.0 corresponds to a solid color, whereas
18440 # a value of 0.0 corresponds to a completely transparent color. This
18441 # uses a wrapper message rather than a simple float scalar so that it is
18442 # possible to distinguish between a default value and the value being unset.
18443 # If omitted, this color object is to be rendered as a solid color
18444 # (as if the alpha value had been explicitly given with a value of 1.0).
18445 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18446 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18447 },
18448 },
18449 "rowProperties": { # Properties referring a single dimension (either row or column). If both # Properties for row bands. These properties will be applied on a row-by-row
18450 # basis throughout all the rows in the range. At least one of
18451 # row_properties or column_properties must be specified.
18452 # BandedRange.row_properties and BandedRange.column_properties are
18453 # set, the fill colors are applied to cells according to the following rules:
18454 #
18455 # * header_color and footer_color take priority over band colors.
18456 # * first_band_color takes priority over second_band_color.
18457 # * row_properties takes priority over column_properties.
18458 #
18459 # For example, the first row color takes priority over the first column
18460 # color, but the first column color takes priority over the second row color.
18461 # Similarly, the row header takes priority over the column header in the
18462 # top left cell, but the column header takes priority over the first row
18463 # color if the row header is not set.
18464 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
18465 # for simplicity of conversion to/from color representations in various
18466 # languages over compactness; for example, the fields of this representation
18467 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18468 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18469 # method in iOS; and, with just a little work, it can be easily formatted into
18470 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18471 #
18472 # Example (Java):
18473 #
18474 # import com.google.type.Color;
18475 #
18476 # // ...
18477 # public static java.awt.Color fromProto(Color protocolor) {
18478 # float alpha = protocolor.hasAlpha()
18479 # ? protocolor.getAlpha().getValue()
18480 # : 1.0;
18481 #
18482 # return new java.awt.Color(
18483 # protocolor.getRed(),
18484 # protocolor.getGreen(),
18485 # protocolor.getBlue(),
18486 # alpha);
18487 # }
18488 #
18489 # public static Color toProto(java.awt.Color color) {
18490 # float red = (float) color.getRed();
18491 # float green = (float) color.getGreen();
18492 # float blue = (float) color.getBlue();
18493 # float denominator = 255.0;
18494 # Color.Builder resultBuilder =
18495 # Color
18496 # .newBuilder()
18497 # .setRed(red / denominator)
18498 # .setGreen(green / denominator)
18499 # .setBlue(blue / denominator);
18500 # int alpha = color.getAlpha();
18501 # if (alpha != 255) {
18502 # result.setAlpha(
18503 # FloatValue
18504 # .newBuilder()
18505 # .setValue(((float) alpha) / denominator)
18506 # .build());
18507 # }
18508 # return resultBuilder.build();
18509 # }
18510 # // ...
18511 #
18512 # Example (iOS / Obj-C):
18513 #
18514 # // ...
18515 # static UIColor* fromProto(Color* protocolor) {
18516 # float red = [protocolor red];
18517 # float green = [protocolor green];
18518 # float blue = [protocolor blue];
18519 # FloatValue* alpha_wrapper = [protocolor alpha];
18520 # float alpha = 1.0;
18521 # if (alpha_wrapper != nil) {
18522 # alpha = [alpha_wrapper value];
18523 # }
18524 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18525 # }
18526 #
18527 # static Color* toProto(UIColor* color) {
18528 # CGFloat red, green, blue, alpha;
18529 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18530 # return nil;
18531 # }
18532 # Color* result = [Color alloc] init];
18533 # [result setRed:red];
18534 # [result setGreen:green];
18535 # [result setBlue:blue];
18536 # if (alpha <= 0.9999) {
18537 # [result setAlpha:floatWrapperWithValue(alpha)];
18538 # }
18539 # [result autorelease];
18540 # return result;
18541 # }
18542 # // ...
18543 #
18544 # Example (JavaScript):
18545 #
18546 # // ...
18547 #
18548 # var protoToCssColor = function(rgb_color) {
18549 # var redFrac = rgb_color.red || 0.0;
18550 # var greenFrac = rgb_color.green || 0.0;
18551 # var blueFrac = rgb_color.blue || 0.0;
18552 # var red = Math.floor(redFrac * 255);
18553 # var green = Math.floor(greenFrac * 255);
18554 # var blue = Math.floor(blueFrac * 255);
18555 #
18556 # if (!('alpha' in rgb_color)) {
18557 # return rgbToCssColor_(red, green, blue);
18558 # }
18559 #
18560 # var alphaFrac = rgb_color.alpha.value || 0.0;
18561 # var rgbParams = [red, green, blue].join(',');
18562 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18563 # };
18564 #
18565 # var rgbToCssColor_ = function(red, green, blue) {
18566 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18567 # var hexString = rgbNumber.toString(16);
18568 # var missingZeros = 6 - hexString.length;
18569 # var resultBuilder = ['#'];
18570 # for (var i = 0; i < missingZeros; i++) {
18571 # resultBuilder.push('0');
18572 # }
18573 # resultBuilder.push(hexString);
18574 # return resultBuilder.join('');
18575 # };
18576 #
18577 # // ...
18578 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18579 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18580 # the final pixel color is defined by the equation:
18581 #
18582 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18583 #
18584 # This means that a value of 1.0 corresponds to a solid color, whereas
18585 # a value of 0.0 corresponds to a completely transparent color. This
18586 # uses a wrapper message rather than a simple float scalar so that it is
18587 # possible to distinguish between a default value and the value being unset.
18588 # If omitted, this color object is to be rendered as a solid color
18589 # (as if the alpha value had been explicitly given with a value of 1.0).
18590 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18591 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18592 },
18593 "headerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the first row or column. If this field is set, the first
18594 # row or column will be filled with this color and the colors will
18595 # alternate between first_band_color and second_band_color starting
18596 # from the second row or column. Otherwise, the first row or column will be
18597 # filled with first_band_color and the colors will proceed to alternate
18598 # as they normally would.
18599 # for simplicity of conversion to/from color representations in various
18600 # languages over compactness; for example, the fields of this representation
18601 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18602 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18603 # method in iOS; and, with just a little work, it can be easily formatted into
18604 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18605 #
18606 # Example (Java):
18607 #
18608 # import com.google.type.Color;
18609 #
18610 # // ...
18611 # public static java.awt.Color fromProto(Color protocolor) {
18612 # float alpha = protocolor.hasAlpha()
18613 # ? protocolor.getAlpha().getValue()
18614 # : 1.0;
18615 #
18616 # return new java.awt.Color(
18617 # protocolor.getRed(),
18618 # protocolor.getGreen(),
18619 # protocolor.getBlue(),
18620 # alpha);
18621 # }
18622 #
18623 # public static Color toProto(java.awt.Color color) {
18624 # float red = (float) color.getRed();
18625 # float green = (float) color.getGreen();
18626 # float blue = (float) color.getBlue();
18627 # float denominator = 255.0;
18628 # Color.Builder resultBuilder =
18629 # Color
18630 # .newBuilder()
18631 # .setRed(red / denominator)
18632 # .setGreen(green / denominator)
18633 # .setBlue(blue / denominator);
18634 # int alpha = color.getAlpha();
18635 # if (alpha != 255) {
18636 # result.setAlpha(
18637 # FloatValue
18638 # .newBuilder()
18639 # .setValue(((float) alpha) / denominator)
18640 # .build());
18641 # }
18642 # return resultBuilder.build();
18643 # }
18644 # // ...
18645 #
18646 # Example (iOS / Obj-C):
18647 #
18648 # // ...
18649 # static UIColor* fromProto(Color* protocolor) {
18650 # float red = [protocolor red];
18651 # float green = [protocolor green];
18652 # float blue = [protocolor blue];
18653 # FloatValue* alpha_wrapper = [protocolor alpha];
18654 # float alpha = 1.0;
18655 # if (alpha_wrapper != nil) {
18656 # alpha = [alpha_wrapper value];
18657 # }
18658 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18659 # }
18660 #
18661 # static Color* toProto(UIColor* color) {
18662 # CGFloat red, green, blue, alpha;
18663 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18664 # return nil;
18665 # }
18666 # Color* result = [Color alloc] init];
18667 # [result setRed:red];
18668 # [result setGreen:green];
18669 # [result setBlue:blue];
18670 # if (alpha <= 0.9999) {
18671 # [result setAlpha:floatWrapperWithValue(alpha)];
18672 # }
18673 # [result autorelease];
18674 # return result;
18675 # }
18676 # // ...
18677 #
18678 # Example (JavaScript):
18679 #
18680 # // ...
18681 #
18682 # var protoToCssColor = function(rgb_color) {
18683 # var redFrac = rgb_color.red || 0.0;
18684 # var greenFrac = rgb_color.green || 0.0;
18685 # var blueFrac = rgb_color.blue || 0.0;
18686 # var red = Math.floor(redFrac * 255);
18687 # var green = Math.floor(greenFrac * 255);
18688 # var blue = Math.floor(blueFrac * 255);
18689 #
18690 # if (!('alpha' in rgb_color)) {
18691 # return rgbToCssColor_(red, green, blue);
18692 # }
18693 #
18694 # var alphaFrac = rgb_color.alpha.value || 0.0;
18695 # var rgbParams = [red, green, blue].join(',');
18696 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18697 # };
18698 #
18699 # var rgbToCssColor_ = function(red, green, blue) {
18700 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18701 # var hexString = rgbNumber.toString(16);
18702 # var missingZeros = 6 - hexString.length;
18703 # var resultBuilder = ['#'];
18704 # for (var i = 0; i < missingZeros; i++) {
18705 # resultBuilder.push('0');
18706 # }
18707 # resultBuilder.push(hexString);
18708 # return resultBuilder.join('');
18709 # };
18710 #
18711 # // ...
18712 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18713 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18714 # the final pixel color is defined by the equation:
18715 #
18716 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18717 #
18718 # This means that a value of 1.0 corresponds to a solid color, whereas
18719 # a value of 0.0 corresponds to a completely transparent color. This
18720 # uses a wrapper message rather than a simple float scalar so that it is
18721 # possible to distinguish between a default value and the value being unset.
18722 # If omitted, this color object is to be rendered as a solid color
18723 # (as if the alpha value had been explicitly given with a value of 1.0).
18724 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18725 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18726 },
18727 "footerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the last row or column. If this field is not set, the last
18728 # row or column will be filled with either first_band_color or
18729 # second_band_color, depending on the color of the previous row or
18730 # column.
18731 # for simplicity of conversion to/from color representations in various
18732 # languages over compactness; for example, the fields of this representation
18733 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18734 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18735 # method in iOS; and, with just a little work, it can be easily formatted into
18736 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18737 #
18738 # Example (Java):
18739 #
18740 # import com.google.type.Color;
18741 #
18742 # // ...
18743 # public static java.awt.Color fromProto(Color protocolor) {
18744 # float alpha = protocolor.hasAlpha()
18745 # ? protocolor.getAlpha().getValue()
18746 # : 1.0;
18747 #
18748 # return new java.awt.Color(
18749 # protocolor.getRed(),
18750 # protocolor.getGreen(),
18751 # protocolor.getBlue(),
18752 # alpha);
18753 # }
18754 #
18755 # public static Color toProto(java.awt.Color color) {
18756 # float red = (float) color.getRed();
18757 # float green = (float) color.getGreen();
18758 # float blue = (float) color.getBlue();
18759 # float denominator = 255.0;
18760 # Color.Builder resultBuilder =
18761 # Color
18762 # .newBuilder()
18763 # .setRed(red / denominator)
18764 # .setGreen(green / denominator)
18765 # .setBlue(blue / denominator);
18766 # int alpha = color.getAlpha();
18767 # if (alpha != 255) {
18768 # result.setAlpha(
18769 # FloatValue
18770 # .newBuilder()
18771 # .setValue(((float) alpha) / denominator)
18772 # .build());
18773 # }
18774 # return resultBuilder.build();
18775 # }
18776 # // ...
18777 #
18778 # Example (iOS / Obj-C):
18779 #
18780 # // ...
18781 # static UIColor* fromProto(Color* protocolor) {
18782 # float red = [protocolor red];
18783 # float green = [protocolor green];
18784 # float blue = [protocolor blue];
18785 # FloatValue* alpha_wrapper = [protocolor alpha];
18786 # float alpha = 1.0;
18787 # if (alpha_wrapper != nil) {
18788 # alpha = [alpha_wrapper value];
18789 # }
18790 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18791 # }
18792 #
18793 # static Color* toProto(UIColor* color) {
18794 # CGFloat red, green, blue, alpha;
18795 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18796 # return nil;
18797 # }
18798 # Color* result = [Color alloc] init];
18799 # [result setRed:red];
18800 # [result setGreen:green];
18801 # [result setBlue:blue];
18802 # if (alpha <= 0.9999) {
18803 # [result setAlpha:floatWrapperWithValue(alpha)];
18804 # }
18805 # [result autorelease];
18806 # return result;
18807 # }
18808 # // ...
18809 #
18810 # Example (JavaScript):
18811 #
18812 # // ...
18813 #
18814 # var protoToCssColor = function(rgb_color) {
18815 # var redFrac = rgb_color.red || 0.0;
18816 # var greenFrac = rgb_color.green || 0.0;
18817 # var blueFrac = rgb_color.blue || 0.0;
18818 # var red = Math.floor(redFrac * 255);
18819 # var green = Math.floor(greenFrac * 255);
18820 # var blue = Math.floor(blueFrac * 255);
18821 #
18822 # if (!('alpha' in rgb_color)) {
18823 # return rgbToCssColor_(red, green, blue);
18824 # }
18825 #
18826 # var alphaFrac = rgb_color.alpha.value || 0.0;
18827 # var rgbParams = [red, green, blue].join(',');
18828 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18829 # };
18830 #
18831 # var rgbToCssColor_ = function(red, green, blue) {
18832 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18833 # var hexString = rgbNumber.toString(16);
18834 # var missingZeros = 6 - hexString.length;
18835 # var resultBuilder = ['#'];
18836 # for (var i = 0; i < missingZeros; i++) {
18837 # resultBuilder.push('0');
18838 # }
18839 # resultBuilder.push(hexString);
18840 # return resultBuilder.join('');
18841 # };
18842 #
18843 # // ...
18844 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18845 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18846 # the final pixel color is defined by the equation:
18847 #
18848 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18849 #
18850 # This means that a value of 1.0 corresponds to a solid color, whereas
18851 # a value of 0.0 corresponds to a completely transparent color. This
18852 # uses a wrapper message rather than a simple float scalar so that it is
18853 # possible to distinguish between a default value and the value being unset.
18854 # If omitted, this color object is to be rendered as a solid color
18855 # (as if the alpha value had been explicitly given with a value of 1.0).
18856 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18857 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18858 },
18859 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
18860 # for simplicity of conversion to/from color representations in various
18861 # languages over compactness; for example, the fields of this representation
18862 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18863 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18864 # method in iOS; and, with just a little work, it can be easily formatted into
18865 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18866 #
18867 # Example (Java):
18868 #
18869 # import com.google.type.Color;
18870 #
18871 # // ...
18872 # public static java.awt.Color fromProto(Color protocolor) {
18873 # float alpha = protocolor.hasAlpha()
18874 # ? protocolor.getAlpha().getValue()
18875 # : 1.0;
18876 #
18877 # return new java.awt.Color(
18878 # protocolor.getRed(),
18879 # protocolor.getGreen(),
18880 # protocolor.getBlue(),
18881 # alpha);
18882 # }
18883 #
18884 # public static Color toProto(java.awt.Color color) {
18885 # float red = (float) color.getRed();
18886 # float green = (float) color.getGreen();
18887 # float blue = (float) color.getBlue();
18888 # float denominator = 255.0;
18889 # Color.Builder resultBuilder =
18890 # Color
18891 # .newBuilder()
18892 # .setRed(red / denominator)
18893 # .setGreen(green / denominator)
18894 # .setBlue(blue / denominator);
18895 # int alpha = color.getAlpha();
18896 # if (alpha != 255) {
18897 # result.setAlpha(
18898 # FloatValue
18899 # .newBuilder()
18900 # .setValue(((float) alpha) / denominator)
18901 # .build());
18902 # }
18903 # return resultBuilder.build();
18904 # }
18905 # // ...
18906 #
18907 # Example (iOS / Obj-C):
18908 #
18909 # // ...
18910 # static UIColor* fromProto(Color* protocolor) {
18911 # float red = [protocolor red];
18912 # float green = [protocolor green];
18913 # float blue = [protocolor blue];
18914 # FloatValue* alpha_wrapper = [protocolor alpha];
18915 # float alpha = 1.0;
18916 # if (alpha_wrapper != nil) {
18917 # alpha = [alpha_wrapper value];
18918 # }
18919 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18920 # }
18921 #
18922 # static Color* toProto(UIColor* color) {
18923 # CGFloat red, green, blue, alpha;
18924 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18925 # return nil;
18926 # }
18927 # Color* result = [Color alloc] init];
18928 # [result setRed:red];
18929 # [result setGreen:green];
18930 # [result setBlue:blue];
18931 # if (alpha <= 0.9999) {
18932 # [result setAlpha:floatWrapperWithValue(alpha)];
18933 # }
18934 # [result autorelease];
18935 # return result;
18936 # }
18937 # // ...
18938 #
18939 # Example (JavaScript):
18940 #
18941 # // ...
18942 #
18943 # var protoToCssColor = function(rgb_color) {
18944 # var redFrac = rgb_color.red || 0.0;
18945 # var greenFrac = rgb_color.green || 0.0;
18946 # var blueFrac = rgb_color.blue || 0.0;
18947 # var red = Math.floor(redFrac * 255);
18948 # var green = Math.floor(greenFrac * 255);
18949 # var blue = Math.floor(blueFrac * 255);
18950 #
18951 # if (!('alpha' in rgb_color)) {
18952 # return rgbToCssColor_(red, green, blue);
18953 # }
18954 #
18955 # var alphaFrac = rgb_color.alpha.value || 0.0;
18956 # var rgbParams = [red, green, blue].join(',');
18957 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18958 # };
18959 #
18960 # var rgbToCssColor_ = function(red, green, blue) {
18961 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18962 # var hexString = rgbNumber.toString(16);
18963 # var missingZeros = 6 - hexString.length;
18964 # var resultBuilder = ['#'];
18965 # for (var i = 0; i < missingZeros; i++) {
18966 # resultBuilder.push('0');
18967 # }
18968 # resultBuilder.push(hexString);
18969 # return resultBuilder.join('');
18970 # };
18971 #
18972 # // ...
18973 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18974 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18975 # the final pixel color is defined by the equation:
18976 #
18977 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18978 #
18979 # This means that a value of 1.0 corresponds to a solid color, whereas
18980 # a value of 0.0 corresponds to a completely transparent color. This
18981 # uses a wrapper message rather than a simple float scalar so that it is
18982 # possible to distinguish between a default value and the value being unset.
18983 # If omitted, this color object is to be rendered as a solid color
18984 # (as if the alpha value had been explicitly given with a value of 1.0).
18985 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18986 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18987 },
18988 },
18989 "bandedRangeId": 42, # The id of the banded range.
18990 },
18991 ],
18992 "merges": [ # The ranges that are merged together.
18993 { # A range on a sheet.
18994 # All indexes are zero-based.
18995 # Indexes are half open, e.g the start index is inclusive
18996 # and the end index is exclusive -- [start_index, end_index).
18997 # Missing indexes indicate the range is unbounded on that side.
18998 #
18999 # For example, if `"Sheet1"` is sheet ID 0, then:
19000 #
19001 # `Sheet1!A1:A1 == sheet_id: 0,
19002 # start_row_index: 0, end_row_index: 1,
19003 # start_column_index: 0, end_column_index: 1`
19004 #
19005 # `Sheet1!A3:B4 == sheet_id: 0,
19006 # start_row_index: 2, end_row_index: 4,
19007 # start_column_index: 0, end_column_index: 2`
19008 #
19009 # `Sheet1!A:B == sheet_id: 0,
19010 # start_column_index: 0, end_column_index: 2`
19011 #
19012 # `Sheet1!A5:B == sheet_id: 0,
19013 # start_row_index: 4,
19014 # start_column_index: 0, end_column_index: 2`
19015 #
19016 # `Sheet1 == sheet_id:0`
19017 #
19018 # The start index must always be less than or equal to the end index.
19019 # If the start index equals the end index, then the range is empty.
19020 # Empty ranges are typically not meaningful and are usually rendered in the
19021 # UI as `#REF!`.
19022 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
19023 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
19024 "sheetId": 42, # The sheet this range is on.
19025 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
19026 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
19027 },
19028 ],
19029 "basicFilter": { # The default filter associated with a sheet. # The filter on this sheet, if any.
19030 "range": { # A range on a sheet. # The range the filter covers.
19031 # All indexes are zero-based.
19032 # Indexes are half open, e.g the start index is inclusive
19033 # and the end index is exclusive -- [start_index, end_index).
19034 # Missing indexes indicate the range is unbounded on that side.
19035 #
19036 # For example, if `"Sheet1"` is sheet ID 0, then:
19037 #
19038 # `Sheet1!A1:A1 == sheet_id: 0,
19039 # start_row_index: 0, end_row_index: 1,
19040 # start_column_index: 0, end_column_index: 1`
19041 #
19042 # `Sheet1!A3:B4 == sheet_id: 0,
19043 # start_row_index: 2, end_row_index: 4,
19044 # start_column_index: 0, end_column_index: 2`
19045 #
19046 # `Sheet1!A:B == sheet_id: 0,
19047 # start_column_index: 0, end_column_index: 2`
19048 #
19049 # `Sheet1!A5:B == sheet_id: 0,
19050 # start_row_index: 4,
19051 # start_column_index: 0, end_column_index: 2`
19052 #
19053 # `Sheet1 == sheet_id:0`
19054 #
19055 # The start index must always be less than or equal to the end index.
19056 # If the start index equals the end index, then the range is empty.
19057 # Empty ranges are typically not meaningful and are usually rendered in the
19058 # UI as `#REF!`.
19059 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
19060 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
19061 "sheetId": 42, # The sheet this range is on.
19062 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
19063 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
19064 },
19065 "sortSpecs": [ # The sort order per column. Later specifications are used when values
19066 # are equal in the earlier specifications.
19067 { # A sort order associated with a specific column or row.
19068 "sortOrder": "A String", # The order data should be sorted.
19069 "dimensionIndex": 42, # The dimension the sort should be applied to.
19070 },
19071 ],
19072 "criteria": { # The criteria for showing/hiding values per column.
19073 # The map's key is the column index, and the value is the criteria for
19074 # that column.
19075 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
19076 "hiddenValues": [ # Values that should be hidden.
19077 "A String",
19078 ],
19079 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
19080 # (This does not override hiddenValues -- if a value is listed there,
19081 # it will still be hidden.)
19082 # BooleanConditions are used by conditional formatting,
19083 # data validation, and the criteria in filters.
19084 "type": "A String", # The type of condition.
19085 "values": [ # The values of the condition. The number of supported values depends
19086 # on the condition type. Some support zero values,
19087 # others one or two values,
19088 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
19089 { # The value of the condition.
19090 "relativeDate": "A String", # A relative date (based on the current date).
19091 # Valid only if the type is
19092 # DATE_BEFORE,
19093 # DATE_AFTER,
19094 # DATE_ON_OR_BEFORE or
19095 # DATE_ON_OR_AFTER.
19096 #
19097 # Relative dates are not supported in data validation.
19098 # They are supported only in conditional formatting and
19099 # conditional filters.
19100 "userEnteredValue": "A String", # A value the condition is based on.
19101 # The value will be parsed as if the user typed into a cell.
19102 # Formulas are supported (and must begin with an `=`).
19103 },
19104 ],
19105 },
19106 },
19107 },
19108 },
19109 "charts": [ # The specifications of every chart on this sheet.
19110 { # A chart embedded in a sheet.
19111 "chartId": 42, # The ID of the chart.
19112 "position": { # The position of an embedded object such as a chart. # The position of the chart.
19113 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
19114 # is chosen for you. Used only when writing.
19115 "sheetId": 42, # The sheet this is on. Set only if the embedded object
19116 # is on its own sheet. Must be non-negative.
19117 "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.
19118 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
19119 # All indexes are zero-based.
19120 "rowIndex": 42, # The row index of the coordinate.
19121 "columnIndex": 42, # The column index of the coordinate.
19122 "sheetId": 42, # The sheet this coordinate is on.
19123 },
19124 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
19125 # from the anchor cell.
19126 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
19127 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
19128 # from the anchor cell.
19129 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
19130 },
19131 },
19132 "spec": { # The specifications of a chart. # The specification of the chart.
19133 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
19134 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
19135 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
19136 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
19137 "sources": [ # The ranges of data for a series or domain.
19138 # Exactly one dimension must have a length of 1,
19139 # and all sources in the list must have the same dimension
19140 # with length 1.
19141 # The domain (if it exists) & all series must have the same number
19142 # of source ranges. If using more than one source range, then the source
19143 # range at a given offset must be contiguous across the domain and series.
19144 #
19145 # For example, these are valid configurations:
19146 #
19147 # domain sources: A1:A5
19148 # series1 sources: B1:B5
19149 # series2 sources: D6:D10
19150 #
19151 # domain sources: A1:A5, C10:C12
19152 # series1 sources: B1:B5, D10:D12
19153 # series2 sources: C1:C5, E10:E12
19154 { # A range on a sheet.
19155 # All indexes are zero-based.
19156 # Indexes are half open, e.g the start index is inclusive
19157 # and the end index is exclusive -- [start_index, end_index).
19158 # Missing indexes indicate the range is unbounded on that side.
19159 #
19160 # For example, if `"Sheet1"` is sheet ID 0, then:
19161 #
19162 # `Sheet1!A1:A1 == sheet_id: 0,
19163 # start_row_index: 0, end_row_index: 1,
19164 # start_column_index: 0, end_column_index: 1`
19165 #
19166 # `Sheet1!A3:B4 == sheet_id: 0,
19167 # start_row_index: 2, end_row_index: 4,
19168 # start_column_index: 0, end_column_index: 2`
19169 #
19170 # `Sheet1!A:B == sheet_id: 0,
19171 # start_column_index: 0, end_column_index: 2`
19172 #
19173 # `Sheet1!A5:B == sheet_id: 0,
19174 # start_row_index: 4,
19175 # start_column_index: 0, end_column_index: 2`
19176 #
19177 # `Sheet1 == sheet_id:0`
19178 #
19179 # The start index must always be less than or equal to the end index.
19180 # If the start index equals the end index, then the range is empty.
19181 # Empty ranges are typically not meaningful and are usually rendered in the
19182 # UI as `#REF!`.
19183 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
19184 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
19185 "sheetId": 42, # The sheet this range is on.
19186 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
19187 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
19188 },
19189 ],
19190 },
19191 },
19192 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
19193 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
19194 "sources": [ # The ranges of data for a series or domain.
19195 # Exactly one dimension must have a length of 1,
19196 # and all sources in the list must have the same dimension
19197 # with length 1.
19198 # The domain (if it exists) & all series must have the same number
19199 # of source ranges. If using more than one source range, then the source
19200 # range at a given offset must be contiguous across the domain and series.
19201 #
19202 # For example, these are valid configurations:
19203 #
19204 # domain sources: A1:A5
19205 # series1 sources: B1:B5
19206 # series2 sources: D6:D10
19207 #
19208 # domain sources: A1:A5, C10:C12
19209 # series1 sources: B1:B5, D10:D12
19210 # series2 sources: C1:C5, E10:E12
19211 { # A range on a sheet.
19212 # All indexes are zero-based.
19213 # Indexes are half open, e.g the start index is inclusive
19214 # and the end index is exclusive -- [start_index, end_index).
19215 # Missing indexes indicate the range is unbounded on that side.
19216 #
19217 # For example, if `"Sheet1"` is sheet ID 0, then:
19218 #
19219 # `Sheet1!A1:A1 == sheet_id: 0,
19220 # start_row_index: 0, end_row_index: 1,
19221 # start_column_index: 0, end_column_index: 1`
19222 #
19223 # `Sheet1!A3:B4 == sheet_id: 0,
19224 # start_row_index: 2, end_row_index: 4,
19225 # start_column_index: 0, end_column_index: 2`
19226 #
19227 # `Sheet1!A:B == sheet_id: 0,
19228 # start_column_index: 0, end_column_index: 2`
19229 #
19230 # `Sheet1!A5:B == sheet_id: 0,
19231 # start_row_index: 4,
19232 # start_column_index: 0, end_column_index: 2`
19233 #
19234 # `Sheet1 == sheet_id:0`
19235 #
19236 # The start index must always be less than or equal to the end index.
19237 # If the start index equals the end index, then the range is empty.
19238 # Empty ranges are typically not meaningful and are usually rendered in the
19239 # UI as `#REF!`.
19240 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
19241 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
19242 "sheetId": 42, # The sheet this range is on.
19243 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
19244 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
19245 },
19246 ],
19247 },
19248 },
19249 "threeDimensional": True or False, # True if the pie is three dimensional.
19250 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
19251 "pieHole": 3.14, # The size of the hole in the pie chart.
19252 },
19253 "basicChart": { # The specification for a basic chart. See BasicChartType for the list # A basic chart specification, can be one of many kinds of charts.
19254 # See BasicChartType for the list of all
19255 # charts this supports.
19256 # of charts this supports.
19257 "headerCount": 42, # The number of rows or columns in the data that are "headers".
19258 # If not set, Google Sheets will guess how many rows are headers based
19259 # on the data.
19260 #
19261 # (Note that BasicChartAxis.title may override the axis title
19262 # inferred from the header values.)
19263 "series": [ # The data this chart is visualizing.
19264 { # A single series of data in a chart.
19265 # For example, if charting stock prices over time, multiple series may exist,
19266 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
19267 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
19268 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
19269 "sources": [ # The ranges of data for a series or domain.
19270 # Exactly one dimension must have a length of 1,
19271 # and all sources in the list must have the same dimension
19272 # with length 1.
19273 # The domain (if it exists) & all series must have the same number
19274 # of source ranges. If using more than one source range, then the source
19275 # range at a given offset must be contiguous across the domain and series.
19276 #
19277 # For example, these are valid configurations:
19278 #
19279 # domain sources: A1:A5
19280 # series1 sources: B1:B5
19281 # series2 sources: D6:D10
19282 #
19283 # domain sources: A1:A5, C10:C12
19284 # series1 sources: B1:B5, D10:D12
19285 # series2 sources: C1:C5, E10:E12
19286 { # A range on a sheet.
19287 # All indexes are zero-based.
19288 # Indexes are half open, e.g the start index is inclusive
19289 # and the end index is exclusive -- [start_index, end_index).
19290 # Missing indexes indicate the range is unbounded on that side.
19291 #
19292 # For example, if `"Sheet1"` is sheet ID 0, then:
19293 #
19294 # `Sheet1!A1:A1 == sheet_id: 0,
19295 # start_row_index: 0, end_row_index: 1,
19296 # start_column_index: 0, end_column_index: 1`
19297 #
19298 # `Sheet1!A3:B4 == sheet_id: 0,
19299 # start_row_index: 2, end_row_index: 4,
19300 # start_column_index: 0, end_column_index: 2`
19301 #
19302 # `Sheet1!A:B == sheet_id: 0,
19303 # start_column_index: 0, end_column_index: 2`
19304 #
19305 # `Sheet1!A5:B == sheet_id: 0,
19306 # start_row_index: 4,
19307 # start_column_index: 0, end_column_index: 2`
19308 #
19309 # `Sheet1 == sheet_id:0`
19310 #
19311 # The start index must always be less than or equal to the end index.
19312 # If the start index equals the end index, then the range is empty.
19313 # Empty ranges are typically not meaningful and are usually rendered in the
19314 # UI as `#REF!`.
19315 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
19316 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
19317 "sheetId": 42, # The sheet this range is on.
19318 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
19319 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
19320 },
19321 ],
19322 },
19323 },
19324 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
19325 # For example, if charting stocks over time, the "Volume" series
19326 # may want to be pinned to the right with the prices pinned to the left,
19327 # because the scale of trading volume is different than the scale of
19328 # prices.
19329 # It is an error to specify an axis that isn't a valid minor axis
19330 # for the chart's type.
19331 "type": "A String", # The type of this series. Valid only if the
19332 # chartType is
19333 # COMBO.
19334 # Different types will change the way the series is visualized.
19335 # Only LINE, AREA,
19336 # and COLUMN are supported.
19337 },
19338 ],
19339 "legendPosition": "A String", # The position of the chart legend.
19340 "domains": [ # The domain of data this is charting.
19341 # Only a single domain is currently supported.
19342 { # The domain of a chart.
19343 # For example, if charting stock prices over time, this would be the date.
19344 "domain": { # The data included in a domain or series. # The data of the domain. For example, if charting stock prices over time,
19345 # this is the data representing the dates.
19346 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
19347 "sources": [ # The ranges of data for a series or domain.
19348 # Exactly one dimension must have a length of 1,
19349 # and all sources in the list must have the same dimension
19350 # with length 1.
19351 # The domain (if it exists) & all series must have the same number
19352 # of source ranges. If using more than one source range, then the source
19353 # range at a given offset must be contiguous across the domain and series.
19354 #
19355 # For example, these are valid configurations:
19356 #
19357 # domain sources: A1:A5
19358 # series1 sources: B1:B5
19359 # series2 sources: D6:D10
19360 #
19361 # domain sources: A1:A5, C10:C12
19362 # series1 sources: B1:B5, D10:D12
19363 # series2 sources: C1:C5, E10:E12
19364 { # A range on a sheet.
19365 # All indexes are zero-based.
19366 # Indexes are half open, e.g the start index is inclusive
19367 # and the end index is exclusive -- [start_index, end_index).
19368 # Missing indexes indicate the range is unbounded on that side.
19369 #
19370 # For example, if `"Sheet1"` is sheet ID 0, then:
19371 #
19372 # `Sheet1!A1:A1 == sheet_id: 0,
19373 # start_row_index: 0, end_row_index: 1,
19374 # start_column_index: 0, end_column_index: 1`
19375 #
19376 # `Sheet1!A3:B4 == sheet_id: 0,
19377 # start_row_index: 2, end_row_index: 4,
19378 # start_column_index: 0, end_column_index: 2`
19379 #
19380 # `Sheet1!A:B == sheet_id: 0,
19381 # start_column_index: 0, end_column_index: 2`
19382 #
19383 # `Sheet1!A5:B == sheet_id: 0,
19384 # start_row_index: 4,
19385 # start_column_index: 0, end_column_index: 2`
19386 #
19387 # `Sheet1 == sheet_id:0`
19388 #
19389 # The start index must always be less than or equal to the end index.
19390 # If the start index equals the end index, then the range is empty.
19391 # Empty ranges are typically not meaningful and are usually rendered in the
19392 # UI as `#REF!`.
19393 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
19394 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
19395 "sheetId": 42, # The sheet this range is on.
19396 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
19397 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
19398 },
19399 ],
19400 },
19401 },
19402 },
19403 ],
19404 "chartType": "A String", # The type of the chart.
19405 "axis": [ # The axis on the chart.
19406 { # An axis of the chart.
19407 # A chart may not have more than one axis per
19408 # axis position.
19409 "position": "A String", # The position of this axis.
19410 "format": { # The format of a run of text in a cell. # The format of the title.
19411 # Only valid if the axis is not associated with the domain.
19412 # Absent values indicate that the field isn't specified.
19413 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
19414 # for simplicity of conversion to/from color representations in various
19415 # languages over compactness; for example, the fields of this representation
19416 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19417 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19418 # method in iOS; and, with just a little work, it can be easily formatted into
19419 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19420 #
19421 # Example (Java):
19422 #
19423 # import com.google.type.Color;
19424 #
19425 # // ...
19426 # public static java.awt.Color fromProto(Color protocolor) {
19427 # float alpha = protocolor.hasAlpha()
19428 # ? protocolor.getAlpha().getValue()
19429 # : 1.0;
19430 #
19431 # return new java.awt.Color(
19432 # protocolor.getRed(),
19433 # protocolor.getGreen(),
19434 # protocolor.getBlue(),
19435 # alpha);
19436 # }
19437 #
19438 # public static Color toProto(java.awt.Color color) {
19439 # float red = (float) color.getRed();
19440 # float green = (float) color.getGreen();
19441 # float blue = (float) color.getBlue();
19442 # float denominator = 255.0;
19443 # Color.Builder resultBuilder =
19444 # Color
19445 # .newBuilder()
19446 # .setRed(red / denominator)
19447 # .setGreen(green / denominator)
19448 # .setBlue(blue / denominator);
19449 # int alpha = color.getAlpha();
19450 # if (alpha != 255) {
19451 # result.setAlpha(
19452 # FloatValue
19453 # .newBuilder()
19454 # .setValue(((float) alpha) / denominator)
19455 # .build());
19456 # }
19457 # return resultBuilder.build();
19458 # }
19459 # // ...
19460 #
19461 # Example (iOS / Obj-C):
19462 #
19463 # // ...
19464 # static UIColor* fromProto(Color* protocolor) {
19465 # float red = [protocolor red];
19466 # float green = [protocolor green];
19467 # float blue = [protocolor blue];
19468 # FloatValue* alpha_wrapper = [protocolor alpha];
19469 # float alpha = 1.0;
19470 # if (alpha_wrapper != nil) {
19471 # alpha = [alpha_wrapper value];
19472 # }
19473 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19474 # }
19475 #
19476 # static Color* toProto(UIColor* color) {
19477 # CGFloat red, green, blue, alpha;
19478 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19479 # return nil;
19480 # }
19481 # Color* result = [Color alloc] init];
19482 # [result setRed:red];
19483 # [result setGreen:green];
19484 # [result setBlue:blue];
19485 # if (alpha <= 0.9999) {
19486 # [result setAlpha:floatWrapperWithValue(alpha)];
19487 # }
19488 # [result autorelease];
19489 # return result;
19490 # }
19491 # // ...
19492 #
19493 # Example (JavaScript):
19494 #
19495 # // ...
19496 #
19497 # var protoToCssColor = function(rgb_color) {
19498 # var redFrac = rgb_color.red || 0.0;
19499 # var greenFrac = rgb_color.green || 0.0;
19500 # var blueFrac = rgb_color.blue || 0.0;
19501 # var red = Math.floor(redFrac * 255);
19502 # var green = Math.floor(greenFrac * 255);
19503 # var blue = Math.floor(blueFrac * 255);
19504 #
19505 # if (!('alpha' in rgb_color)) {
19506 # return rgbToCssColor_(red, green, blue);
19507 # }
19508 #
19509 # var alphaFrac = rgb_color.alpha.value || 0.0;
19510 # var rgbParams = [red, green, blue].join(',');
19511 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19512 # };
19513 #
19514 # var rgbToCssColor_ = function(red, green, blue) {
19515 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19516 # var hexString = rgbNumber.toString(16);
19517 # var missingZeros = 6 - hexString.length;
19518 # var resultBuilder = ['#'];
19519 # for (var i = 0; i < missingZeros; i++) {
19520 # resultBuilder.push('0');
19521 # }
19522 # resultBuilder.push(hexString);
19523 # return resultBuilder.join('');
19524 # };
19525 #
19526 # // ...
19527 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19528 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19529 # the final pixel color is defined by the equation:
19530 #
19531 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19532 #
19533 # This means that a value of 1.0 corresponds to a solid color, whereas
19534 # a value of 0.0 corresponds to a completely transparent color. This
19535 # uses a wrapper message rather than a simple float scalar so that it is
19536 # possible to distinguish between a default value and the value being unset.
19537 # If omitted, this color object is to be rendered as a solid color
19538 # (as if the alpha value had been explicitly given with a value of 1.0).
19539 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19540 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19541 },
19542 "bold": True or False, # True if the text is bold.
19543 "strikethrough": True or False, # True if the text has a strikethrough.
19544 "fontFamily": "A String", # The font family.
19545 "fontSize": 42, # The size of the font.
19546 "italic": True or False, # True if the text is italicized.
19547 "underline": True or False, # True if the text is underlined.
19548 },
19549 "title": "A String", # The title of this axis. If set, this overrides any title inferred
19550 # from headers of the data.
19551 },
19552 ],
19553 },
19554 "title": "A String", # The title of the chart.
19555 },
19556 },
19557 ],
19558 "filterViews": [ # The filter views in this sheet.
19559 { # A filter view.
19560 "title": "A String", # The name of the filter view.
19561 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
19562 #
19563 # When writing, only one of range or named_range_id
19564 # may be set.
19565 "filterViewId": 42, # The ID of the filter view.
19566 "range": { # A range on a sheet. # The range this filter view covers.
19567 #
19568 # When writing, only one of range or named_range_id
19569 # may be set.
19570 # All indexes are zero-based.
19571 # Indexes are half open, e.g the start index is inclusive
19572 # and the end index is exclusive -- [start_index, end_index).
19573 # Missing indexes indicate the range is unbounded on that side.
19574 #
19575 # For example, if `"Sheet1"` is sheet ID 0, then:
19576 #
19577 # `Sheet1!A1:A1 == sheet_id: 0,
19578 # start_row_index: 0, end_row_index: 1,
19579 # start_column_index: 0, end_column_index: 1`
19580 #
19581 # `Sheet1!A3:B4 == sheet_id: 0,
19582 # start_row_index: 2, end_row_index: 4,
19583 # start_column_index: 0, end_column_index: 2`
19584 #
19585 # `Sheet1!A:B == sheet_id: 0,
19586 # start_column_index: 0, end_column_index: 2`
19587 #
19588 # `Sheet1!A5:B == sheet_id: 0,
19589 # start_row_index: 4,
19590 # start_column_index: 0, end_column_index: 2`
19591 #
19592 # `Sheet1 == sheet_id:0`
19593 #
19594 # The start index must always be less than or equal to the end index.
19595 # If the start index equals the end index, then the range is empty.
19596 # Empty ranges are typically not meaningful and are usually rendered in the
19597 # UI as `#REF!`.
19598 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
19599 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
19600 "sheetId": 42, # The sheet this range is on.
19601 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
19602 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
19603 },
19604 "sortSpecs": [ # The sort order per column. Later specifications are used when values
19605 # are equal in the earlier specifications.
19606 { # A sort order associated with a specific column or row.
19607 "sortOrder": "A String", # The order data should be sorted.
19608 "dimensionIndex": 42, # The dimension the sort should be applied to.
19609 },
19610 ],
19611 "criteria": { # The criteria for showing/hiding values per column.
19612 # The map's key is the column index, and the value is the criteria for
19613 # that column.
19614 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
19615 "hiddenValues": [ # Values that should be hidden.
19616 "A String",
19617 ],
19618 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
19619 # (This does not override hiddenValues -- if a value is listed there,
19620 # it will still be hidden.)
19621 # BooleanConditions are used by conditional formatting,
19622 # data validation, and the criteria in filters.
19623 "type": "A String", # The type of condition.
19624 "values": [ # The values of the condition. The number of supported values depends
19625 # on the condition type. Some support zero values,
19626 # others one or two values,
19627 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
19628 { # The value of the condition.
19629 "relativeDate": "A String", # A relative date (based on the current date).
19630 # Valid only if the type is
19631 # DATE_BEFORE,
19632 # DATE_AFTER,
19633 # DATE_ON_OR_BEFORE or
19634 # DATE_ON_OR_AFTER.
19635 #
19636 # Relative dates are not supported in data validation.
19637 # They are supported only in conditional formatting and
19638 # conditional filters.
19639 "userEnteredValue": "A String", # A value the condition is based on.
19640 # The value will be parsed as if the user typed into a cell.
19641 # Formulas are supported (and must begin with an `=`).
19642 },
19643 ],
19644 },
19645 },
19646 },
19647 },
19648 ],
19649 "protectedRanges": [ # The protected ranges in this sheet.
19650 { # A protected range.
19651 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
19652 # Unprotected ranges are only supported on protected sheets.
19653 { # A range on a sheet.
19654 # All indexes are zero-based.
19655 # Indexes are half open, e.g the start index is inclusive
19656 # and the end index is exclusive -- [start_index, end_index).
19657 # Missing indexes indicate the range is unbounded on that side.
19658 #
19659 # For example, if `"Sheet1"` is sheet ID 0, then:
19660 #
19661 # `Sheet1!A1:A1 == sheet_id: 0,
19662 # start_row_index: 0, end_row_index: 1,
19663 # start_column_index: 0, end_column_index: 1`
19664 #
19665 # `Sheet1!A3:B4 == sheet_id: 0,
19666 # start_row_index: 2, end_row_index: 4,
19667 # start_column_index: 0, end_column_index: 2`
19668 #
19669 # `Sheet1!A:B == sheet_id: 0,
19670 # start_column_index: 0, end_column_index: 2`
19671 #
19672 # `Sheet1!A5:B == sheet_id: 0,
19673 # start_row_index: 4,
19674 # start_column_index: 0, end_column_index: 2`
19675 #
19676 # `Sheet1 == sheet_id:0`
19677 #
19678 # The start index must always be less than or equal to the end index.
19679 # If the start index equals the end index, then the range is empty.
19680 # Empty ranges are typically not meaningful and are usually rendered in the
19681 # UI as `#REF!`.
19682 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
19683 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
19684 "sheetId": 42, # The sheet this range is on.
19685 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
19686 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
19687 },
19688 ],
19689 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
19690 # protected area.
19691 # This field is read-only.
19692 "description": "A String", # The description of this protected range.
19693 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
19694 #
19695 # When writing, only one of range or named_range_id
19696 # may be set.
19697 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
19698 # This field is only visible to users with edit access to the protected
19699 # range and the document.
19700 # Editors are not supported with warning_only protection.
19701 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
19702 # range. Domain protection is only supported on documents within a domain.
19703 "users": [ # The email addresses of users with edit access to the protected range.
19704 "A String",
19705 ],
19706 "groups": [ # The email addresses of groups with edit access to the protected range.
19707 "A String",
19708 ],
19709 },
19710 "protectedRangeId": 42, # The ID of the protected range.
19711 # This field is read-only.
19712 "warningOnly": True or False, # True if this protected range will show a warning when editing.
19713 # Warning-based protection means that every user can edit data in the
19714 # protected range, except editing will prompt a warning asking the user
19715 # to confirm the edit.
19716 #
19717 # When writing: if this field is true, then editors is ignored.
19718 # Additionally, if this field is changed from true to false and the
19719 # `editors` field is not set (nor included in the field mask), then
19720 # the editors will be set to all the editors in the document.
19721 "range": { # A range on a sheet. # The range that is being protected.
19722 # The range may be fully unbounded, in which case this is considered
19723 # a protected sheet.
19724 #
19725 # When writing, only one of range or named_range_id
19726 # may be set.
19727 # All indexes are zero-based.
19728 # Indexes are half open, e.g the start index is inclusive
19729 # and the end index is exclusive -- [start_index, end_index).
19730 # Missing indexes indicate the range is unbounded on that side.
19731 #
19732 # For example, if `"Sheet1"` is sheet ID 0, then:
19733 #
19734 # `Sheet1!A1:A1 == sheet_id: 0,
19735 # start_row_index: 0, end_row_index: 1,
19736 # start_column_index: 0, end_column_index: 1`
19737 #
19738 # `Sheet1!A3:B4 == sheet_id: 0,
19739 # start_row_index: 2, end_row_index: 4,
19740 # start_column_index: 0, end_column_index: 2`
19741 #
19742 # `Sheet1!A:B == sheet_id: 0,
19743 # start_column_index: 0, end_column_index: 2`
19744 #
19745 # `Sheet1!A5:B == sheet_id: 0,
19746 # start_row_index: 4,
19747 # start_column_index: 0, end_column_index: 2`
19748 #
19749 # `Sheet1 == sheet_id:0`
19750 #
19751 # The start index must always be less than or equal to the end index.
19752 # If the start index equals the end index, then the range is empty.
19753 # Empty ranges are typically not meaningful and are usually rendered in the
19754 # UI as `#REF!`.
19755 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
19756 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
19757 "sheetId": 42, # The sheet this range is on.
19758 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
19759 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
19760 },
19761 },
19762 ],
19763 "data": [ # Data in the grid, if this is a grid sheet.
19764 # The number of GridData objects returned is dependent on the number of
19765 # ranges requested on this sheet. For example, if this is representing
19766 # `Sheet1`, and the spreadsheet was requested with ranges
19767 # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a
19768 # startRow/startColumn of `0`,
19769 # while the second one will have `startRow 14` (zero-based row 15),
19770 # and `startColumn 3` (zero-based column D).
19771 { # Data in the grid, as well as metadata about the dimensions.
19772 "startRow": 42, # The first row this GridData refers to, zero-based.
19773 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
19774 # in start_row.
19775 { # Properties about a dimension.
19776 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
19777 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
19778 "hiddenByFilter": True or False, # True if this dimension is being filtered.
19779 # This field is read-only.
19780 },
19781 ],
19782 "startColumn": 42, # The first column this GridData refers to, zero-based.
19783 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
19784 # in start_column.
19785 { # Properties about a dimension.
19786 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
19787 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
19788 "hiddenByFilter": True or False, # True if this dimension is being filtered.
19789 # This field is read-only.
19790 },
19791 ],
19792 "rowData": [ # The data in the grid, one entry per row,
19793 # starting with the row in startRow.
19794 # The values in RowData will correspond to columns starting
19795 # at start_column.
19796 { # Data about each cell in a row.
19797 "values": [ # The values in the row, one per column.
19798 { # Data about a specific cell.
19799 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
19800 # is computed dynamically based on its data, grouping, filters, values,
19801 # etc. Only the top-left cell of the pivot table contains the pivot table
19802 # definition. The other cells will contain the calculated values of the
19803 # results of the pivot in their effective_value fields.
19804 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
19805 # or vertically (as rows).
19806 "rows": [ # Each row grouping in the pivot table.
19807 { # A single grouping (either row or column) in a pivot table.
19808 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
19809 "valueMetadata": [ # Metadata about values in the grouping.
19810 { # Metadata about a value in a pivot grouping.
19811 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
19812 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
19813 # (Note that formulaValue is not valid,
19814 # because the values will be calculated.)
19815 "numberValue": 3.14, # Represents a double value.
19816 # Note: Dates, Times and DateTimes are represented as doubles in
19817 # "serial number" format.
19818 "boolValue": True or False, # Represents a boolean value.
19819 "formulaValue": "A String", # Represents a formula.
19820 "stringValue": "A String", # Represents a string value.
19821 # Leading single quotes are not included. For example, if the user typed
19822 # `'123` into the UI, this would be represented as a `stringValue` of
19823 # `"123"`.
19824 "errorValue": { # An error in a cell. # Represents an error.
19825 # This field is read-only.
19826 "message": "A String", # A message with more information about the error
19827 # (in the spreadsheet's locale).
19828 "type": "A String", # The type of error.
19829 },
19830 },
19831 },
19832 ],
19833 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
19834 # If not specified, sorting is alphabetical by this group's values.
19835 "buckets": [ # Determines the bucket from which values are chosen to sort.
19836 #
19837 # For example, in a pivot table with one row group & two column groups,
19838 # the row group can list up to two values. The first value corresponds
19839 # to a value within the first column group, and the second value
19840 # corresponds to a value in the second column group. If no values
19841 # are listed, this would indicate that the row should be sorted according
19842 # to the "Grand Total" over the column groups. If a single value is listed,
19843 # this would correspond to using the "Total" of that bucket.
19844 { # The kinds of value that a cell in a spreadsheet can have.
19845 "numberValue": 3.14, # Represents a double value.
19846 # Note: Dates, Times and DateTimes are represented as doubles in
19847 # "serial number" format.
19848 "boolValue": True or False, # Represents a boolean value.
19849 "formulaValue": "A String", # Represents a formula.
19850 "stringValue": "A String", # Represents a string value.
19851 # Leading single quotes are not included. For example, if the user typed
19852 # `'123` into the UI, this would be represented as a `stringValue` of
19853 # `"123"`.
19854 "errorValue": { # An error in a cell. # Represents an error.
19855 # This field is read-only.
19856 "message": "A String", # A message with more information about the error
19857 # (in the spreadsheet's locale).
19858 "type": "A String", # The type of error.
19859 },
19860 },
19861 ],
19862 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
19863 # grouping should be sorted by.
19864 },
19865 "sortOrder": "A String", # The order the values in this group should be sorted.
19866 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
19867 #
19868 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
19869 # means this group refers to column `C`, whereas the offset `1` would refer
19870 # to column `D`.
19871 },
19872 ],
19873 "source": { # A range on a sheet. # The range the pivot table is reading data from.
19874 # All indexes are zero-based.
19875 # Indexes are half open, e.g the start index is inclusive
19876 # and the end index is exclusive -- [start_index, end_index).
19877 # Missing indexes indicate the range is unbounded on that side.
19878 #
19879 # For example, if `"Sheet1"` is sheet ID 0, then:
19880 #
19881 # `Sheet1!A1:A1 == sheet_id: 0,
19882 # start_row_index: 0, end_row_index: 1,
19883 # start_column_index: 0, end_column_index: 1`
19884 #
19885 # `Sheet1!A3:B4 == sheet_id: 0,
19886 # start_row_index: 2, end_row_index: 4,
19887 # start_column_index: 0, end_column_index: 2`
19888 #
19889 # `Sheet1!A:B == sheet_id: 0,
19890 # start_column_index: 0, end_column_index: 2`
19891 #
19892 # `Sheet1!A5:B == sheet_id: 0,
19893 # start_row_index: 4,
19894 # start_column_index: 0, end_column_index: 2`
19895 #
19896 # `Sheet1 == sheet_id:0`
19897 #
19898 # The start index must always be less than or equal to the end index.
19899 # If the start index equals the end index, then the range is empty.
19900 # Empty ranges are typically not meaningful and are usually rendered in the
19901 # UI as `#REF!`.
19902 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
19903 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
19904 "sheetId": 42, # The sheet this range is on.
19905 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
19906 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
19907 },
19908 "values": [ # A list of values to include in the pivot table.
19909 { # The definition of how a value in a pivot table should be calculated.
19910 "formula": "A String", # A custom formula to calculate the value. The formula must start
19911 # with an `=` character.
19912 "summarizeFunction": "A String", # A function to summarize the value.
19913 # If formula is set, the only supported values are
19914 # SUM and
19915 # CUSTOM.
19916 # If sourceColumnOffset is set, then `CUSTOM`
19917 # is not supported.
19918 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
19919 #
19920 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
19921 # means this value refers to column `C`, whereas the offset `1` would
19922 # refer to column `D`.
19923 "name": "A String", # A name to use for the value. This is only used if formula was set.
19924 # Otherwise, the column name is used.
19925 },
19926 ],
19927 "criteria": { # An optional mapping of filters per source column offset.
19928 #
19929 # The filters will be applied before aggregating data into the pivot table.
19930 # The map's key is the column offset of the source range that you want to
19931 # filter, and the value is the criteria for that column.
19932 #
19933 # For example, if the source was `C10:E15`, a key of `0` will have the filter
19934 # for column `C`, whereas the key `1` is for column `D`.
19935 "a_key": { # Criteria for showing/hiding rows in a pivot table.
19936 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
19937 "A String",
19938 ],
19939 },
19940 },
19941 "columns": [ # Each column grouping in the pivot table.
19942 { # A single grouping (either row or column) in a pivot table.
19943 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
19944 "valueMetadata": [ # Metadata about values in the grouping.
19945 { # Metadata about a value in a pivot grouping.
19946 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
19947 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
19948 # (Note that formulaValue is not valid,
19949 # because the values will be calculated.)
19950 "numberValue": 3.14, # Represents a double value.
19951 # Note: Dates, Times and DateTimes are represented as doubles in
19952 # "serial number" format.
19953 "boolValue": True or False, # Represents a boolean value.
19954 "formulaValue": "A String", # Represents a formula.
19955 "stringValue": "A String", # Represents a string value.
19956 # Leading single quotes are not included. For example, if the user typed
19957 # `'123` into the UI, this would be represented as a `stringValue` of
19958 # `"123"`.
19959 "errorValue": { # An error in a cell. # Represents an error.
19960 # This field is read-only.
19961 "message": "A String", # A message with more information about the error
19962 # (in the spreadsheet's locale).
19963 "type": "A String", # The type of error.
19964 },
19965 },
19966 },
19967 ],
19968 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
19969 # If not specified, sorting is alphabetical by this group's values.
19970 "buckets": [ # Determines the bucket from which values are chosen to sort.
19971 #
19972 # For example, in a pivot table with one row group & two column groups,
19973 # the row group can list up to two values. The first value corresponds
19974 # to a value within the first column group, and the second value
19975 # corresponds to a value in the second column group. If no values
19976 # are listed, this would indicate that the row should be sorted according
19977 # to the "Grand Total" over the column groups. If a single value is listed,
19978 # this would correspond to using the "Total" of that bucket.
19979 { # The kinds of value that a cell in a spreadsheet can have.
19980 "numberValue": 3.14, # Represents a double value.
19981 # Note: Dates, Times and DateTimes are represented as doubles in
19982 # "serial number" format.
19983 "boolValue": True or False, # Represents a boolean value.
19984 "formulaValue": "A String", # Represents a formula.
19985 "stringValue": "A String", # Represents a string value.
19986 # Leading single quotes are not included. For example, if the user typed
19987 # `'123` into the UI, this would be represented as a `stringValue` of
19988 # `"123"`.
19989 "errorValue": { # An error in a cell. # Represents an error.
19990 # This field is read-only.
19991 "message": "A String", # A message with more information about the error
19992 # (in the spreadsheet's locale).
19993 "type": "A String", # The type of error.
19994 },
19995 },
19996 ],
19997 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
19998 # grouping should be sorted by.
19999 },
20000 "sortOrder": "A String", # The order the values in this group should be sorted.
20001 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
20002 #
20003 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
20004 # means this group refers to column `C`, whereas the offset `1` would refer
20005 # to column `D`.
20006 },
20007 ],
20008 },
20009 "hyperlink": "A String", # A hyperlink this cell points to, if any.
20010 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
20011 "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
20012 # the calculated value. For cells with literals, this will be
20013 # the same as the user_entered_value.
20014 # This field is read-only.
20015 "numberValue": 3.14, # Represents a double value.
20016 # Note: Dates, Times and DateTimes are represented as doubles in
20017 # "serial number" format.
20018 "boolValue": True or False, # Represents a boolean value.
20019 "formulaValue": "A String", # Represents a formula.
20020 "stringValue": "A String", # Represents a string value.
20021 # Leading single quotes are not included. For example, if the user typed
20022 # `'123` into the UI, this would be represented as a `stringValue` of
20023 # `"123"`.
20024 "errorValue": { # An error in a cell. # Represents an error.
20025 # This field is read-only.
20026 "message": "A String", # A message with more information about the error
20027 # (in the spreadsheet's locale).
20028 "type": "A String", # The type of error.
20029 },
20030 },
20031 "formattedValue": "A String", # The formatted value of the cell.
20032 # This is the value as it's shown to the user.
20033 # This field is read-only.
20034 "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()`
20035 # Note: Dates, Times and DateTimes are represented as doubles in
20036 # serial number format.
20037 "numberValue": 3.14, # Represents a double value.
20038 # Note: Dates, Times and DateTimes are represented as doubles in
20039 # "serial number" format.
20040 "boolValue": True or False, # Represents a boolean value.
20041 "formulaValue": "A String", # Represents a formula.
20042 "stringValue": "A String", # Represents a string value.
20043 # Leading single quotes are not included. For example, if the user typed
20044 # `'123` into the UI, this would be represented as a `stringValue` of
20045 # `"123"`.
20046 "errorValue": { # An error in a cell. # Represents an error.
20047 # This field is read-only.
20048 "message": "A String", # A message with more information about the error
20049 # (in the spreadsheet's locale).
20050 "type": "A String", # The type of error.
20051 },
20052 },
20053 "note": "A String", # Any note on the cell.
20054 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
20055 # This includes the results of applying any conditional formatting and,
20056 # if the cell contains a formula, the computed number format.
20057 # If the effective format is the default format, effective format will
20058 # not be written.
20059 # This field is read-only.
20060 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
20061 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
20062 # the user's locale will be used if necessary for the given type.
20063 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
20064 # information about the supported patterns.
20065 "type": "A String", # The type of the number format.
20066 # When writing, this field must be set.
20067 },
20068 "textDirection": "A String", # The direction of the text in the cell.
20069 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
20070 # When updating padding, every field must be specified.
20071 "top": 42, # The top padding of the cell.
20072 "right": 42, # The right padding of the cell.
20073 "bottom": 42, # The bottom padding of the cell.
20074 "left": 42, # The left padding of the cell.
20075 },
20076 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
20077 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
20078 # for simplicity of conversion to/from color representations in various
20079 # languages over compactness; for example, the fields of this representation
20080 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20081 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20082 # method in iOS; and, with just a little work, it can be easily formatted into
20083 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20084 #
20085 # Example (Java):
20086 #
20087 # import com.google.type.Color;
20088 #
20089 # // ...
20090 # public static java.awt.Color fromProto(Color protocolor) {
20091 # float alpha = protocolor.hasAlpha()
20092 # ? protocolor.getAlpha().getValue()
20093 # : 1.0;
20094 #
20095 # return new java.awt.Color(
20096 # protocolor.getRed(),
20097 # protocolor.getGreen(),
20098 # protocolor.getBlue(),
20099 # alpha);
20100 # }
20101 #
20102 # public static Color toProto(java.awt.Color color) {
20103 # float red = (float) color.getRed();
20104 # float green = (float) color.getGreen();
20105 # float blue = (float) color.getBlue();
20106 # float denominator = 255.0;
20107 # Color.Builder resultBuilder =
20108 # Color
20109 # .newBuilder()
20110 # .setRed(red / denominator)
20111 # .setGreen(green / denominator)
20112 # .setBlue(blue / denominator);
20113 # int alpha = color.getAlpha();
20114 # if (alpha != 255) {
20115 # result.setAlpha(
20116 # FloatValue
20117 # .newBuilder()
20118 # .setValue(((float) alpha) / denominator)
20119 # .build());
20120 # }
20121 # return resultBuilder.build();
20122 # }
20123 # // ...
20124 #
20125 # Example (iOS / Obj-C):
20126 #
20127 # // ...
20128 # static UIColor* fromProto(Color* protocolor) {
20129 # float red = [protocolor red];
20130 # float green = [protocolor green];
20131 # float blue = [protocolor blue];
20132 # FloatValue* alpha_wrapper = [protocolor alpha];
20133 # float alpha = 1.0;
20134 # if (alpha_wrapper != nil) {
20135 # alpha = [alpha_wrapper value];
20136 # }
20137 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20138 # }
20139 #
20140 # static Color* toProto(UIColor* color) {
20141 # CGFloat red, green, blue, alpha;
20142 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20143 # return nil;
20144 # }
20145 # Color* result = [Color alloc] init];
20146 # [result setRed:red];
20147 # [result setGreen:green];
20148 # [result setBlue:blue];
20149 # if (alpha <= 0.9999) {
20150 # [result setAlpha:floatWrapperWithValue(alpha)];
20151 # }
20152 # [result autorelease];
20153 # return result;
20154 # }
20155 # // ...
20156 #
20157 # Example (JavaScript):
20158 #
20159 # // ...
20160 #
20161 # var protoToCssColor = function(rgb_color) {
20162 # var redFrac = rgb_color.red || 0.0;
20163 # var greenFrac = rgb_color.green || 0.0;
20164 # var blueFrac = rgb_color.blue || 0.0;
20165 # var red = Math.floor(redFrac * 255);
20166 # var green = Math.floor(greenFrac * 255);
20167 # var blue = Math.floor(blueFrac * 255);
20168 #
20169 # if (!('alpha' in rgb_color)) {
20170 # return rgbToCssColor_(red, green, blue);
20171 # }
20172 #
20173 # var alphaFrac = rgb_color.alpha.value || 0.0;
20174 # var rgbParams = [red, green, blue].join(',');
20175 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20176 # };
20177 #
20178 # var rgbToCssColor_ = function(red, green, blue) {
20179 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20180 # var hexString = rgbNumber.toString(16);
20181 # var missingZeros = 6 - hexString.length;
20182 # var resultBuilder = ['#'];
20183 # for (var i = 0; i < missingZeros; i++) {
20184 # resultBuilder.push('0');
20185 # }
20186 # resultBuilder.push(hexString);
20187 # return resultBuilder.join('');
20188 # };
20189 #
20190 # // ...
20191 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20192 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20193 # the final pixel color is defined by the equation:
20194 #
20195 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20196 #
20197 # This means that a value of 1.0 corresponds to a solid color, whereas
20198 # a value of 0.0 corresponds to a completely transparent color. This
20199 # uses a wrapper message rather than a simple float scalar so that it is
20200 # possible to distinguish between a default value and the value being unset.
20201 # If omitted, this color object is to be rendered as a solid color
20202 # (as if the alpha value had been explicitly given with a value of 1.0).
20203 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20204 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20205 },
20206 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
20207 "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).
20208 # Absent values indicate that the field isn't specified.
20209 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
20210 # for simplicity of conversion to/from color representations in various
20211 # languages over compactness; for example, the fields of this representation
20212 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20213 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20214 # method in iOS; and, with just a little work, it can be easily formatted into
20215 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20216 #
20217 # Example (Java):
20218 #
20219 # import com.google.type.Color;
20220 #
20221 # // ...
20222 # public static java.awt.Color fromProto(Color protocolor) {
20223 # float alpha = protocolor.hasAlpha()
20224 # ? protocolor.getAlpha().getValue()
20225 # : 1.0;
20226 #
20227 # return new java.awt.Color(
20228 # protocolor.getRed(),
20229 # protocolor.getGreen(),
20230 # protocolor.getBlue(),
20231 # alpha);
20232 # }
20233 #
20234 # public static Color toProto(java.awt.Color color) {
20235 # float red = (float) color.getRed();
20236 # float green = (float) color.getGreen();
20237 # float blue = (float) color.getBlue();
20238 # float denominator = 255.0;
20239 # Color.Builder resultBuilder =
20240 # Color
20241 # .newBuilder()
20242 # .setRed(red / denominator)
20243 # .setGreen(green / denominator)
20244 # .setBlue(blue / denominator);
20245 # int alpha = color.getAlpha();
20246 # if (alpha != 255) {
20247 # result.setAlpha(
20248 # FloatValue
20249 # .newBuilder()
20250 # .setValue(((float) alpha) / denominator)
20251 # .build());
20252 # }
20253 # return resultBuilder.build();
20254 # }
20255 # // ...
20256 #
20257 # Example (iOS / Obj-C):
20258 #
20259 # // ...
20260 # static UIColor* fromProto(Color* protocolor) {
20261 # float red = [protocolor red];
20262 # float green = [protocolor green];
20263 # float blue = [protocolor blue];
20264 # FloatValue* alpha_wrapper = [protocolor alpha];
20265 # float alpha = 1.0;
20266 # if (alpha_wrapper != nil) {
20267 # alpha = [alpha_wrapper value];
20268 # }
20269 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20270 # }
20271 #
20272 # static Color* toProto(UIColor* color) {
20273 # CGFloat red, green, blue, alpha;
20274 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20275 # return nil;
20276 # }
20277 # Color* result = [Color alloc] init];
20278 # [result setRed:red];
20279 # [result setGreen:green];
20280 # [result setBlue:blue];
20281 # if (alpha <= 0.9999) {
20282 # [result setAlpha:floatWrapperWithValue(alpha)];
20283 # }
20284 # [result autorelease];
20285 # return result;
20286 # }
20287 # // ...
20288 #
20289 # Example (JavaScript):
20290 #
20291 # // ...
20292 #
20293 # var protoToCssColor = function(rgb_color) {
20294 # var redFrac = rgb_color.red || 0.0;
20295 # var greenFrac = rgb_color.green || 0.0;
20296 # var blueFrac = rgb_color.blue || 0.0;
20297 # var red = Math.floor(redFrac * 255);
20298 # var green = Math.floor(greenFrac * 255);
20299 # var blue = Math.floor(blueFrac * 255);
20300 #
20301 # if (!('alpha' in rgb_color)) {
20302 # return rgbToCssColor_(red, green, blue);
20303 # }
20304 #
20305 # var alphaFrac = rgb_color.alpha.value || 0.0;
20306 # var rgbParams = [red, green, blue].join(',');
20307 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20308 # };
20309 #
20310 # var rgbToCssColor_ = function(red, green, blue) {
20311 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20312 # var hexString = rgbNumber.toString(16);
20313 # var missingZeros = 6 - hexString.length;
20314 # var resultBuilder = ['#'];
20315 # for (var i = 0; i < missingZeros; i++) {
20316 # resultBuilder.push('0');
20317 # }
20318 # resultBuilder.push(hexString);
20319 # return resultBuilder.join('');
20320 # };
20321 #
20322 # // ...
20323 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20324 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20325 # the final pixel color is defined by the equation:
20326 #
20327 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20328 #
20329 # This means that a value of 1.0 corresponds to a solid color, whereas
20330 # a value of 0.0 corresponds to a completely transparent color. This
20331 # uses a wrapper message rather than a simple float scalar so that it is
20332 # possible to distinguish between a default value and the value being unset.
20333 # If omitted, this color object is to be rendered as a solid color
20334 # (as if the alpha value had been explicitly given with a value of 1.0).
20335 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20336 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20337 },
20338 "bold": True or False, # True if the text is bold.
20339 "strikethrough": True or False, # True if the text has a strikethrough.
20340 "fontFamily": "A String", # The font family.
20341 "fontSize": 42, # The size of the font.
20342 "italic": True or False, # True if the text is italicized.
20343 "underline": True or False, # True if the text is underlined.
20344 },
20345 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
20346 "borders": { # The borders of the cell. # The borders of the cell.
20347 "top": { # A border along a cell. # The top border of the cell.
20348 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
20349 # for simplicity of conversion to/from color representations in various
20350 # languages over compactness; for example, the fields of this representation
20351 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20352 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20353 # method in iOS; and, with just a little work, it can be easily formatted into
20354 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20355 #
20356 # Example (Java):
20357 #
20358 # import com.google.type.Color;
20359 #
20360 # // ...
20361 # public static java.awt.Color fromProto(Color protocolor) {
20362 # float alpha = protocolor.hasAlpha()
20363 # ? protocolor.getAlpha().getValue()
20364 # : 1.0;
20365 #
20366 # return new java.awt.Color(
20367 # protocolor.getRed(),
20368 # protocolor.getGreen(),
20369 # protocolor.getBlue(),
20370 # alpha);
20371 # }
20372 #
20373 # public static Color toProto(java.awt.Color color) {
20374 # float red = (float) color.getRed();
20375 # float green = (float) color.getGreen();
20376 # float blue = (float) color.getBlue();
20377 # float denominator = 255.0;
20378 # Color.Builder resultBuilder =
20379 # Color
20380 # .newBuilder()
20381 # .setRed(red / denominator)
20382 # .setGreen(green / denominator)
20383 # .setBlue(blue / denominator);
20384 # int alpha = color.getAlpha();
20385 # if (alpha != 255) {
20386 # result.setAlpha(
20387 # FloatValue
20388 # .newBuilder()
20389 # .setValue(((float) alpha) / denominator)
20390 # .build());
20391 # }
20392 # return resultBuilder.build();
20393 # }
20394 # // ...
20395 #
20396 # Example (iOS / Obj-C):
20397 #
20398 # // ...
20399 # static UIColor* fromProto(Color* protocolor) {
20400 # float red = [protocolor red];
20401 # float green = [protocolor green];
20402 # float blue = [protocolor blue];
20403 # FloatValue* alpha_wrapper = [protocolor alpha];
20404 # float alpha = 1.0;
20405 # if (alpha_wrapper != nil) {
20406 # alpha = [alpha_wrapper value];
20407 # }
20408 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20409 # }
20410 #
20411 # static Color* toProto(UIColor* color) {
20412 # CGFloat red, green, blue, alpha;
20413 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20414 # return nil;
20415 # }
20416 # Color* result = [Color alloc] init];
20417 # [result setRed:red];
20418 # [result setGreen:green];
20419 # [result setBlue:blue];
20420 # if (alpha <= 0.9999) {
20421 # [result setAlpha:floatWrapperWithValue(alpha)];
20422 # }
20423 # [result autorelease];
20424 # return result;
20425 # }
20426 # // ...
20427 #
20428 # Example (JavaScript):
20429 #
20430 # // ...
20431 #
20432 # var protoToCssColor = function(rgb_color) {
20433 # var redFrac = rgb_color.red || 0.0;
20434 # var greenFrac = rgb_color.green || 0.0;
20435 # var blueFrac = rgb_color.blue || 0.0;
20436 # var red = Math.floor(redFrac * 255);
20437 # var green = Math.floor(greenFrac * 255);
20438 # var blue = Math.floor(blueFrac * 255);
20439 #
20440 # if (!('alpha' in rgb_color)) {
20441 # return rgbToCssColor_(red, green, blue);
20442 # }
20443 #
20444 # var alphaFrac = rgb_color.alpha.value || 0.0;
20445 # var rgbParams = [red, green, blue].join(',');
20446 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20447 # };
20448 #
20449 # var rgbToCssColor_ = function(red, green, blue) {
20450 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20451 # var hexString = rgbNumber.toString(16);
20452 # var missingZeros = 6 - hexString.length;
20453 # var resultBuilder = ['#'];
20454 # for (var i = 0; i < missingZeros; i++) {
20455 # resultBuilder.push('0');
20456 # }
20457 # resultBuilder.push(hexString);
20458 # return resultBuilder.join('');
20459 # };
20460 #
20461 # // ...
20462 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20463 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20464 # the final pixel color is defined by the equation:
20465 #
20466 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20467 #
20468 # This means that a value of 1.0 corresponds to a solid color, whereas
20469 # a value of 0.0 corresponds to a completely transparent color. This
20470 # uses a wrapper message rather than a simple float scalar so that it is
20471 # possible to distinguish between a default value and the value being unset.
20472 # If omitted, this color object is to be rendered as a solid color
20473 # (as if the alpha value had been explicitly given with a value of 1.0).
20474 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20475 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20476 },
20477 "width": 42, # The width of the border, in pixels.
20478 # Deprecated; the width is determined by the "style" field.
20479 "style": "A String", # The style of the border.
20480 },
20481 "right": { # A border along a cell. # The right border of the cell.
20482 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
20483 # for simplicity of conversion to/from color representations in various
20484 # languages over compactness; for example, the fields of this representation
20485 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20486 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20487 # method in iOS; and, with just a little work, it can be easily formatted into
20488 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20489 #
20490 # Example (Java):
20491 #
20492 # import com.google.type.Color;
20493 #
20494 # // ...
20495 # public static java.awt.Color fromProto(Color protocolor) {
20496 # float alpha = protocolor.hasAlpha()
20497 # ? protocolor.getAlpha().getValue()
20498 # : 1.0;
20499 #
20500 # return new java.awt.Color(
20501 # protocolor.getRed(),
20502 # protocolor.getGreen(),
20503 # protocolor.getBlue(),
20504 # alpha);
20505 # }
20506 #
20507 # public static Color toProto(java.awt.Color color) {
20508 # float red = (float) color.getRed();
20509 # float green = (float) color.getGreen();
20510 # float blue = (float) color.getBlue();
20511 # float denominator = 255.0;
20512 # Color.Builder resultBuilder =
20513 # Color
20514 # .newBuilder()
20515 # .setRed(red / denominator)
20516 # .setGreen(green / denominator)
20517 # .setBlue(blue / denominator);
20518 # int alpha = color.getAlpha();
20519 # if (alpha != 255) {
20520 # result.setAlpha(
20521 # FloatValue
20522 # .newBuilder()
20523 # .setValue(((float) alpha) / denominator)
20524 # .build());
20525 # }
20526 # return resultBuilder.build();
20527 # }
20528 # // ...
20529 #
20530 # Example (iOS / Obj-C):
20531 #
20532 # // ...
20533 # static UIColor* fromProto(Color* protocolor) {
20534 # float red = [protocolor red];
20535 # float green = [protocolor green];
20536 # float blue = [protocolor blue];
20537 # FloatValue* alpha_wrapper = [protocolor alpha];
20538 # float alpha = 1.0;
20539 # if (alpha_wrapper != nil) {
20540 # alpha = [alpha_wrapper value];
20541 # }
20542 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20543 # }
20544 #
20545 # static Color* toProto(UIColor* color) {
20546 # CGFloat red, green, blue, alpha;
20547 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20548 # return nil;
20549 # }
20550 # Color* result = [Color alloc] init];
20551 # [result setRed:red];
20552 # [result setGreen:green];
20553 # [result setBlue:blue];
20554 # if (alpha <= 0.9999) {
20555 # [result setAlpha:floatWrapperWithValue(alpha)];
20556 # }
20557 # [result autorelease];
20558 # return result;
20559 # }
20560 # // ...
20561 #
20562 # Example (JavaScript):
20563 #
20564 # // ...
20565 #
20566 # var protoToCssColor = function(rgb_color) {
20567 # var redFrac = rgb_color.red || 0.0;
20568 # var greenFrac = rgb_color.green || 0.0;
20569 # var blueFrac = rgb_color.blue || 0.0;
20570 # var red = Math.floor(redFrac * 255);
20571 # var green = Math.floor(greenFrac * 255);
20572 # var blue = Math.floor(blueFrac * 255);
20573 #
20574 # if (!('alpha' in rgb_color)) {
20575 # return rgbToCssColor_(red, green, blue);
20576 # }
20577 #
20578 # var alphaFrac = rgb_color.alpha.value || 0.0;
20579 # var rgbParams = [red, green, blue].join(',');
20580 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20581 # };
20582 #
20583 # var rgbToCssColor_ = function(red, green, blue) {
20584 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20585 # var hexString = rgbNumber.toString(16);
20586 # var missingZeros = 6 - hexString.length;
20587 # var resultBuilder = ['#'];
20588 # for (var i = 0; i < missingZeros; i++) {
20589 # resultBuilder.push('0');
20590 # }
20591 # resultBuilder.push(hexString);
20592 # return resultBuilder.join('');
20593 # };
20594 #
20595 # // ...
20596 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20597 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20598 # the final pixel color is defined by the equation:
20599 #
20600 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20601 #
20602 # This means that a value of 1.0 corresponds to a solid color, whereas
20603 # a value of 0.0 corresponds to a completely transparent color. This
20604 # uses a wrapper message rather than a simple float scalar so that it is
20605 # possible to distinguish between a default value and the value being unset.
20606 # If omitted, this color object is to be rendered as a solid color
20607 # (as if the alpha value had been explicitly given with a value of 1.0).
20608 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20609 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20610 },
20611 "width": 42, # The width of the border, in pixels.
20612 # Deprecated; the width is determined by the "style" field.
20613 "style": "A String", # The style of the border.
20614 },
20615 "bottom": { # A border along a cell. # The bottom border of the cell.
20616 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
20617 # for simplicity of conversion to/from color representations in various
20618 # languages over compactness; for example, the fields of this representation
20619 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20620 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20621 # method in iOS; and, with just a little work, it can be easily formatted into
20622 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20623 #
20624 # Example (Java):
20625 #
20626 # import com.google.type.Color;
20627 #
20628 # // ...
20629 # public static java.awt.Color fromProto(Color protocolor) {
20630 # float alpha = protocolor.hasAlpha()
20631 # ? protocolor.getAlpha().getValue()
20632 # : 1.0;
20633 #
20634 # return new java.awt.Color(
20635 # protocolor.getRed(),
20636 # protocolor.getGreen(),
20637 # protocolor.getBlue(),
20638 # alpha);
20639 # }
20640 #
20641 # public static Color toProto(java.awt.Color color) {
20642 # float red = (float) color.getRed();
20643 # float green = (float) color.getGreen();
20644 # float blue = (float) color.getBlue();
20645 # float denominator = 255.0;
20646 # Color.Builder resultBuilder =
20647 # Color
20648 # .newBuilder()
20649 # .setRed(red / denominator)
20650 # .setGreen(green / denominator)
20651 # .setBlue(blue / denominator);
20652 # int alpha = color.getAlpha();
20653 # if (alpha != 255) {
20654 # result.setAlpha(
20655 # FloatValue
20656 # .newBuilder()
20657 # .setValue(((float) alpha) / denominator)
20658 # .build());
20659 # }
20660 # return resultBuilder.build();
20661 # }
20662 # // ...
20663 #
20664 # Example (iOS / Obj-C):
20665 #
20666 # // ...
20667 # static UIColor* fromProto(Color* protocolor) {
20668 # float red = [protocolor red];
20669 # float green = [protocolor green];
20670 # float blue = [protocolor blue];
20671 # FloatValue* alpha_wrapper = [protocolor alpha];
20672 # float alpha = 1.0;
20673 # if (alpha_wrapper != nil) {
20674 # alpha = [alpha_wrapper value];
20675 # }
20676 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20677 # }
20678 #
20679 # static Color* toProto(UIColor* color) {
20680 # CGFloat red, green, blue, alpha;
20681 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20682 # return nil;
20683 # }
20684 # Color* result = [Color alloc] init];
20685 # [result setRed:red];
20686 # [result setGreen:green];
20687 # [result setBlue:blue];
20688 # if (alpha <= 0.9999) {
20689 # [result setAlpha:floatWrapperWithValue(alpha)];
20690 # }
20691 # [result autorelease];
20692 # return result;
20693 # }
20694 # // ...
20695 #
20696 # Example (JavaScript):
20697 #
20698 # // ...
20699 #
20700 # var protoToCssColor = function(rgb_color) {
20701 # var redFrac = rgb_color.red || 0.0;
20702 # var greenFrac = rgb_color.green || 0.0;
20703 # var blueFrac = rgb_color.blue || 0.0;
20704 # var red = Math.floor(redFrac * 255);
20705 # var green = Math.floor(greenFrac * 255);
20706 # var blue = Math.floor(blueFrac * 255);
20707 #
20708 # if (!('alpha' in rgb_color)) {
20709 # return rgbToCssColor_(red, green, blue);
20710 # }
20711 #
20712 # var alphaFrac = rgb_color.alpha.value || 0.0;
20713 # var rgbParams = [red, green, blue].join(',');
20714 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20715 # };
20716 #
20717 # var rgbToCssColor_ = function(red, green, blue) {
20718 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20719 # var hexString = rgbNumber.toString(16);
20720 # var missingZeros = 6 - hexString.length;
20721 # var resultBuilder = ['#'];
20722 # for (var i = 0; i < missingZeros; i++) {
20723 # resultBuilder.push('0');
20724 # }
20725 # resultBuilder.push(hexString);
20726 # return resultBuilder.join('');
20727 # };
20728 #
20729 # // ...
20730 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20731 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20732 # the final pixel color is defined by the equation:
20733 #
20734 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20735 #
20736 # This means that a value of 1.0 corresponds to a solid color, whereas
20737 # a value of 0.0 corresponds to a completely transparent color. This
20738 # uses a wrapper message rather than a simple float scalar so that it is
20739 # possible to distinguish between a default value and the value being unset.
20740 # If omitted, this color object is to be rendered as a solid color
20741 # (as if the alpha value had been explicitly given with a value of 1.0).
20742 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20743 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20744 },
20745 "width": 42, # The width of the border, in pixels.
20746 # Deprecated; the width is determined by the "style" field.
20747 "style": "A String", # The style of the border.
20748 },
20749 "left": { # A border along a cell. # The left border of the cell.
20750 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
20751 # for simplicity of conversion to/from color representations in various
20752 # languages over compactness; for example, the fields of this representation
20753 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20754 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20755 # method in iOS; and, with just a little work, it can be easily formatted into
20756 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20757 #
20758 # Example (Java):
20759 #
20760 # import com.google.type.Color;
20761 #
20762 # // ...
20763 # public static java.awt.Color fromProto(Color protocolor) {
20764 # float alpha = protocolor.hasAlpha()
20765 # ? protocolor.getAlpha().getValue()
20766 # : 1.0;
20767 #
20768 # return new java.awt.Color(
20769 # protocolor.getRed(),
20770 # protocolor.getGreen(),
20771 # protocolor.getBlue(),
20772 # alpha);
20773 # }
20774 #
20775 # public static Color toProto(java.awt.Color color) {
20776 # float red = (float) color.getRed();
20777 # float green = (float) color.getGreen();
20778 # float blue = (float) color.getBlue();
20779 # float denominator = 255.0;
20780 # Color.Builder resultBuilder =
20781 # Color
20782 # .newBuilder()
20783 # .setRed(red / denominator)
20784 # .setGreen(green / denominator)
20785 # .setBlue(blue / denominator);
20786 # int alpha = color.getAlpha();
20787 # if (alpha != 255) {
20788 # result.setAlpha(
20789 # FloatValue
20790 # .newBuilder()
20791 # .setValue(((float) alpha) / denominator)
20792 # .build());
20793 # }
20794 # return resultBuilder.build();
20795 # }
20796 # // ...
20797 #
20798 # Example (iOS / Obj-C):
20799 #
20800 # // ...
20801 # static UIColor* fromProto(Color* protocolor) {
20802 # float red = [protocolor red];
20803 # float green = [protocolor green];
20804 # float blue = [protocolor blue];
20805 # FloatValue* alpha_wrapper = [protocolor alpha];
20806 # float alpha = 1.0;
20807 # if (alpha_wrapper != nil) {
20808 # alpha = [alpha_wrapper value];
20809 # }
20810 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20811 # }
20812 #
20813 # static Color* toProto(UIColor* color) {
20814 # CGFloat red, green, blue, alpha;
20815 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20816 # return nil;
20817 # }
20818 # Color* result = [Color alloc] init];
20819 # [result setRed:red];
20820 # [result setGreen:green];
20821 # [result setBlue:blue];
20822 # if (alpha <= 0.9999) {
20823 # [result setAlpha:floatWrapperWithValue(alpha)];
20824 # }
20825 # [result autorelease];
20826 # return result;
20827 # }
20828 # // ...
20829 #
20830 # Example (JavaScript):
20831 #
20832 # // ...
20833 #
20834 # var protoToCssColor = function(rgb_color) {
20835 # var redFrac = rgb_color.red || 0.0;
20836 # var greenFrac = rgb_color.green || 0.0;
20837 # var blueFrac = rgb_color.blue || 0.0;
20838 # var red = Math.floor(redFrac * 255);
20839 # var green = Math.floor(greenFrac * 255);
20840 # var blue = Math.floor(blueFrac * 255);
20841 #
20842 # if (!('alpha' in rgb_color)) {
20843 # return rgbToCssColor_(red, green, blue);
20844 # }
20845 #
20846 # var alphaFrac = rgb_color.alpha.value || 0.0;
20847 # var rgbParams = [red, green, blue].join(',');
20848 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20849 # };
20850 #
20851 # var rgbToCssColor_ = function(red, green, blue) {
20852 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20853 # var hexString = rgbNumber.toString(16);
20854 # var missingZeros = 6 - hexString.length;
20855 # var resultBuilder = ['#'];
20856 # for (var i = 0; i < missingZeros; i++) {
20857 # resultBuilder.push('0');
20858 # }
20859 # resultBuilder.push(hexString);
20860 # return resultBuilder.join('');
20861 # };
20862 #
20863 # // ...
20864 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20865 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20866 # the final pixel color is defined by the equation:
20867 #
20868 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20869 #
20870 # This means that a value of 1.0 corresponds to a solid color, whereas
20871 # a value of 0.0 corresponds to a completely transparent color. This
20872 # uses a wrapper message rather than a simple float scalar so that it is
20873 # possible to distinguish between a default value and the value being unset.
20874 # If omitted, this color object is to be rendered as a solid color
20875 # (as if the alpha value had been explicitly given with a value of 1.0).
20876 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20877 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20878 },
20879 "width": 42, # The width of the border, in pixels.
20880 # Deprecated; the width is determined by the "style" field.
20881 "style": "A String", # The style of the border.
20882 },
20883 },
20884 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
20885 },
20886 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
20887 #
20888 # When writing, the new format will be merged with the existing format.
20889 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
20890 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
20891 # the user's locale will be used if necessary for the given type.
20892 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
20893 # information about the supported patterns.
20894 "type": "A String", # The type of the number format.
20895 # When writing, this field must be set.
20896 },
20897 "textDirection": "A String", # The direction of the text in the cell.
20898 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
20899 # When updating padding, every field must be specified.
20900 "top": 42, # The top padding of the cell.
20901 "right": 42, # The right padding of the cell.
20902 "bottom": 42, # The bottom padding of the cell.
20903 "left": 42, # The left padding of the cell.
20904 },
20905 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
20906 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
20907 # for simplicity of conversion to/from color representations in various
20908 # languages over compactness; for example, the fields of this representation
20909 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20910 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20911 # method in iOS; and, with just a little work, it can be easily formatted into
20912 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20913 #
20914 # Example (Java):
20915 #
20916 # import com.google.type.Color;
20917 #
20918 # // ...
20919 # public static java.awt.Color fromProto(Color protocolor) {
20920 # float alpha = protocolor.hasAlpha()
20921 # ? protocolor.getAlpha().getValue()
20922 # : 1.0;
20923 #
20924 # return new java.awt.Color(
20925 # protocolor.getRed(),
20926 # protocolor.getGreen(),
20927 # protocolor.getBlue(),
20928 # alpha);
20929 # }
20930 #
20931 # public static Color toProto(java.awt.Color color) {
20932 # float red = (float) color.getRed();
20933 # float green = (float) color.getGreen();
20934 # float blue = (float) color.getBlue();
20935 # float denominator = 255.0;
20936 # Color.Builder resultBuilder =
20937 # Color
20938 # .newBuilder()
20939 # .setRed(red / denominator)
20940 # .setGreen(green / denominator)
20941 # .setBlue(blue / denominator);
20942 # int alpha = color.getAlpha();
20943 # if (alpha != 255) {
20944 # result.setAlpha(
20945 # FloatValue
20946 # .newBuilder()
20947 # .setValue(((float) alpha) / denominator)
20948 # .build());
20949 # }
20950 # return resultBuilder.build();
20951 # }
20952 # // ...
20953 #
20954 # Example (iOS / Obj-C):
20955 #
20956 # // ...
20957 # static UIColor* fromProto(Color* protocolor) {
20958 # float red = [protocolor red];
20959 # float green = [protocolor green];
20960 # float blue = [protocolor blue];
20961 # FloatValue* alpha_wrapper = [protocolor alpha];
20962 # float alpha = 1.0;
20963 # if (alpha_wrapper != nil) {
20964 # alpha = [alpha_wrapper value];
20965 # }
20966 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20967 # }
20968 #
20969 # static Color* toProto(UIColor* color) {
20970 # CGFloat red, green, blue, alpha;
20971 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20972 # return nil;
20973 # }
20974 # Color* result = [Color alloc] init];
20975 # [result setRed:red];
20976 # [result setGreen:green];
20977 # [result setBlue:blue];
20978 # if (alpha <= 0.9999) {
20979 # [result setAlpha:floatWrapperWithValue(alpha)];
20980 # }
20981 # [result autorelease];
20982 # return result;
20983 # }
20984 # // ...
20985 #
20986 # Example (JavaScript):
20987 #
20988 # // ...
20989 #
20990 # var protoToCssColor = function(rgb_color) {
20991 # var redFrac = rgb_color.red || 0.0;
20992 # var greenFrac = rgb_color.green || 0.0;
20993 # var blueFrac = rgb_color.blue || 0.0;
20994 # var red = Math.floor(redFrac * 255);
20995 # var green = Math.floor(greenFrac * 255);
20996 # var blue = Math.floor(blueFrac * 255);
20997 #
20998 # if (!('alpha' in rgb_color)) {
20999 # return rgbToCssColor_(red, green, blue);
21000 # }
21001 #
21002 # var alphaFrac = rgb_color.alpha.value || 0.0;
21003 # var rgbParams = [red, green, blue].join(',');
21004 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21005 # };
21006 #
21007 # var rgbToCssColor_ = function(red, green, blue) {
21008 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21009 # var hexString = rgbNumber.toString(16);
21010 # var missingZeros = 6 - hexString.length;
21011 # var resultBuilder = ['#'];
21012 # for (var i = 0; i < missingZeros; i++) {
21013 # resultBuilder.push('0');
21014 # }
21015 # resultBuilder.push(hexString);
21016 # return resultBuilder.join('');
21017 # };
21018 #
21019 # // ...
21020 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21021 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21022 # the final pixel color is defined by the equation:
21023 #
21024 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21025 #
21026 # This means that a value of 1.0 corresponds to a solid color, whereas
21027 # a value of 0.0 corresponds to a completely transparent color. This
21028 # uses a wrapper message rather than a simple float scalar so that it is
21029 # possible to distinguish between a default value and the value being unset.
21030 # If omitted, this color object is to be rendered as a solid color
21031 # (as if the alpha value had been explicitly given with a value of 1.0).
21032 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21033 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21034 },
21035 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
21036 "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).
21037 # Absent values indicate that the field isn't specified.
21038 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
21039 # for simplicity of conversion to/from color representations in various
21040 # languages over compactness; for example, the fields of this representation
21041 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21042 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21043 # method in iOS; and, with just a little work, it can be easily formatted into
21044 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21045 #
21046 # Example (Java):
21047 #
21048 # import com.google.type.Color;
21049 #
21050 # // ...
21051 # public static java.awt.Color fromProto(Color protocolor) {
21052 # float alpha = protocolor.hasAlpha()
21053 # ? protocolor.getAlpha().getValue()
21054 # : 1.0;
21055 #
21056 # return new java.awt.Color(
21057 # protocolor.getRed(),
21058 # protocolor.getGreen(),
21059 # protocolor.getBlue(),
21060 # alpha);
21061 # }
21062 #
21063 # public static Color toProto(java.awt.Color color) {
21064 # float red = (float) color.getRed();
21065 # float green = (float) color.getGreen();
21066 # float blue = (float) color.getBlue();
21067 # float denominator = 255.0;
21068 # Color.Builder resultBuilder =
21069 # Color
21070 # .newBuilder()
21071 # .setRed(red / denominator)
21072 # .setGreen(green / denominator)
21073 # .setBlue(blue / denominator);
21074 # int alpha = color.getAlpha();
21075 # if (alpha != 255) {
21076 # result.setAlpha(
21077 # FloatValue
21078 # .newBuilder()
21079 # .setValue(((float) alpha) / denominator)
21080 # .build());
21081 # }
21082 # return resultBuilder.build();
21083 # }
21084 # // ...
21085 #
21086 # Example (iOS / Obj-C):
21087 #
21088 # // ...
21089 # static UIColor* fromProto(Color* protocolor) {
21090 # float red = [protocolor red];
21091 # float green = [protocolor green];
21092 # float blue = [protocolor blue];
21093 # FloatValue* alpha_wrapper = [protocolor alpha];
21094 # float alpha = 1.0;
21095 # if (alpha_wrapper != nil) {
21096 # alpha = [alpha_wrapper value];
21097 # }
21098 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21099 # }
21100 #
21101 # static Color* toProto(UIColor* color) {
21102 # CGFloat red, green, blue, alpha;
21103 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21104 # return nil;
21105 # }
21106 # Color* result = [Color alloc] init];
21107 # [result setRed:red];
21108 # [result setGreen:green];
21109 # [result setBlue:blue];
21110 # if (alpha <= 0.9999) {
21111 # [result setAlpha:floatWrapperWithValue(alpha)];
21112 # }
21113 # [result autorelease];
21114 # return result;
21115 # }
21116 # // ...
21117 #
21118 # Example (JavaScript):
21119 #
21120 # // ...
21121 #
21122 # var protoToCssColor = function(rgb_color) {
21123 # var redFrac = rgb_color.red || 0.0;
21124 # var greenFrac = rgb_color.green || 0.0;
21125 # var blueFrac = rgb_color.blue || 0.0;
21126 # var red = Math.floor(redFrac * 255);
21127 # var green = Math.floor(greenFrac * 255);
21128 # var blue = Math.floor(blueFrac * 255);
21129 #
21130 # if (!('alpha' in rgb_color)) {
21131 # return rgbToCssColor_(red, green, blue);
21132 # }
21133 #
21134 # var alphaFrac = rgb_color.alpha.value || 0.0;
21135 # var rgbParams = [red, green, blue].join(',');
21136 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21137 # };
21138 #
21139 # var rgbToCssColor_ = function(red, green, blue) {
21140 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21141 # var hexString = rgbNumber.toString(16);
21142 # var missingZeros = 6 - hexString.length;
21143 # var resultBuilder = ['#'];
21144 # for (var i = 0; i < missingZeros; i++) {
21145 # resultBuilder.push('0');
21146 # }
21147 # resultBuilder.push(hexString);
21148 # return resultBuilder.join('');
21149 # };
21150 #
21151 # // ...
21152 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21153 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21154 # the final pixel color is defined by the equation:
21155 #
21156 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21157 #
21158 # This means that a value of 1.0 corresponds to a solid color, whereas
21159 # a value of 0.0 corresponds to a completely transparent color. This
21160 # uses a wrapper message rather than a simple float scalar so that it is
21161 # possible to distinguish between a default value and the value being unset.
21162 # If omitted, this color object is to be rendered as a solid color
21163 # (as if the alpha value had been explicitly given with a value of 1.0).
21164 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21165 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21166 },
21167 "bold": True or False, # True if the text is bold.
21168 "strikethrough": True or False, # True if the text has a strikethrough.
21169 "fontFamily": "A String", # The font family.
21170 "fontSize": 42, # The size of the font.
21171 "italic": True or False, # True if the text is italicized.
21172 "underline": True or False, # True if the text is underlined.
21173 },
21174 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
21175 "borders": { # The borders of the cell. # The borders of the cell.
21176 "top": { # A border along a cell. # The top border of the cell.
21177 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
21178 # for simplicity of conversion to/from color representations in various
21179 # languages over compactness; for example, the fields of this representation
21180 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21181 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21182 # method in iOS; and, with just a little work, it can be easily formatted into
21183 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21184 #
21185 # Example (Java):
21186 #
21187 # import com.google.type.Color;
21188 #
21189 # // ...
21190 # public static java.awt.Color fromProto(Color protocolor) {
21191 # float alpha = protocolor.hasAlpha()
21192 # ? protocolor.getAlpha().getValue()
21193 # : 1.0;
21194 #
21195 # return new java.awt.Color(
21196 # protocolor.getRed(),
21197 # protocolor.getGreen(),
21198 # protocolor.getBlue(),
21199 # alpha);
21200 # }
21201 #
21202 # public static Color toProto(java.awt.Color color) {
21203 # float red = (float) color.getRed();
21204 # float green = (float) color.getGreen();
21205 # float blue = (float) color.getBlue();
21206 # float denominator = 255.0;
21207 # Color.Builder resultBuilder =
21208 # Color
21209 # .newBuilder()
21210 # .setRed(red / denominator)
21211 # .setGreen(green / denominator)
21212 # .setBlue(blue / denominator);
21213 # int alpha = color.getAlpha();
21214 # if (alpha != 255) {
21215 # result.setAlpha(
21216 # FloatValue
21217 # .newBuilder()
21218 # .setValue(((float) alpha) / denominator)
21219 # .build());
21220 # }
21221 # return resultBuilder.build();
21222 # }
21223 # // ...
21224 #
21225 # Example (iOS / Obj-C):
21226 #
21227 # // ...
21228 # static UIColor* fromProto(Color* protocolor) {
21229 # float red = [protocolor red];
21230 # float green = [protocolor green];
21231 # float blue = [protocolor blue];
21232 # FloatValue* alpha_wrapper = [protocolor alpha];
21233 # float alpha = 1.0;
21234 # if (alpha_wrapper != nil) {
21235 # alpha = [alpha_wrapper value];
21236 # }
21237 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21238 # }
21239 #
21240 # static Color* toProto(UIColor* color) {
21241 # CGFloat red, green, blue, alpha;
21242 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21243 # return nil;
21244 # }
21245 # Color* result = [Color alloc] init];
21246 # [result setRed:red];
21247 # [result setGreen:green];
21248 # [result setBlue:blue];
21249 # if (alpha <= 0.9999) {
21250 # [result setAlpha:floatWrapperWithValue(alpha)];
21251 # }
21252 # [result autorelease];
21253 # return result;
21254 # }
21255 # // ...
21256 #
21257 # Example (JavaScript):
21258 #
21259 # // ...
21260 #
21261 # var protoToCssColor = function(rgb_color) {
21262 # var redFrac = rgb_color.red || 0.0;
21263 # var greenFrac = rgb_color.green || 0.0;
21264 # var blueFrac = rgb_color.blue || 0.0;
21265 # var red = Math.floor(redFrac * 255);
21266 # var green = Math.floor(greenFrac * 255);
21267 # var blue = Math.floor(blueFrac * 255);
21268 #
21269 # if (!('alpha' in rgb_color)) {
21270 # return rgbToCssColor_(red, green, blue);
21271 # }
21272 #
21273 # var alphaFrac = rgb_color.alpha.value || 0.0;
21274 # var rgbParams = [red, green, blue].join(',');
21275 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21276 # };
21277 #
21278 # var rgbToCssColor_ = function(red, green, blue) {
21279 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21280 # var hexString = rgbNumber.toString(16);
21281 # var missingZeros = 6 - hexString.length;
21282 # var resultBuilder = ['#'];
21283 # for (var i = 0; i < missingZeros; i++) {
21284 # resultBuilder.push('0');
21285 # }
21286 # resultBuilder.push(hexString);
21287 # return resultBuilder.join('');
21288 # };
21289 #
21290 # // ...
21291 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21292 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21293 # the final pixel color is defined by the equation:
21294 #
21295 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21296 #
21297 # This means that a value of 1.0 corresponds to a solid color, whereas
21298 # a value of 0.0 corresponds to a completely transparent color. This
21299 # uses a wrapper message rather than a simple float scalar so that it is
21300 # possible to distinguish between a default value and the value being unset.
21301 # If omitted, this color object is to be rendered as a solid color
21302 # (as if the alpha value had been explicitly given with a value of 1.0).
21303 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21304 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21305 },
21306 "width": 42, # The width of the border, in pixels.
21307 # Deprecated; the width is determined by the "style" field.
21308 "style": "A String", # The style of the border.
21309 },
21310 "right": { # A border along a cell. # The right border of the cell.
21311 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
21312 # for simplicity of conversion to/from color representations in various
21313 # languages over compactness; for example, the fields of this representation
21314 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21315 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21316 # method in iOS; and, with just a little work, it can be easily formatted into
21317 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21318 #
21319 # Example (Java):
21320 #
21321 # import com.google.type.Color;
21322 #
21323 # // ...
21324 # public static java.awt.Color fromProto(Color protocolor) {
21325 # float alpha = protocolor.hasAlpha()
21326 # ? protocolor.getAlpha().getValue()
21327 # : 1.0;
21328 #
21329 # return new java.awt.Color(
21330 # protocolor.getRed(),
21331 # protocolor.getGreen(),
21332 # protocolor.getBlue(),
21333 # alpha);
21334 # }
21335 #
21336 # public static Color toProto(java.awt.Color color) {
21337 # float red = (float) color.getRed();
21338 # float green = (float) color.getGreen();
21339 # float blue = (float) color.getBlue();
21340 # float denominator = 255.0;
21341 # Color.Builder resultBuilder =
21342 # Color
21343 # .newBuilder()
21344 # .setRed(red / denominator)
21345 # .setGreen(green / denominator)
21346 # .setBlue(blue / denominator);
21347 # int alpha = color.getAlpha();
21348 # if (alpha != 255) {
21349 # result.setAlpha(
21350 # FloatValue
21351 # .newBuilder()
21352 # .setValue(((float) alpha) / denominator)
21353 # .build());
21354 # }
21355 # return resultBuilder.build();
21356 # }
21357 # // ...
21358 #
21359 # Example (iOS / Obj-C):
21360 #
21361 # // ...
21362 # static UIColor* fromProto(Color* protocolor) {
21363 # float red = [protocolor red];
21364 # float green = [protocolor green];
21365 # float blue = [protocolor blue];
21366 # FloatValue* alpha_wrapper = [protocolor alpha];
21367 # float alpha = 1.0;
21368 # if (alpha_wrapper != nil) {
21369 # alpha = [alpha_wrapper value];
21370 # }
21371 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21372 # }
21373 #
21374 # static Color* toProto(UIColor* color) {
21375 # CGFloat red, green, blue, alpha;
21376 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21377 # return nil;
21378 # }
21379 # Color* result = [Color alloc] init];
21380 # [result setRed:red];
21381 # [result setGreen:green];
21382 # [result setBlue:blue];
21383 # if (alpha <= 0.9999) {
21384 # [result setAlpha:floatWrapperWithValue(alpha)];
21385 # }
21386 # [result autorelease];
21387 # return result;
21388 # }
21389 # // ...
21390 #
21391 # Example (JavaScript):
21392 #
21393 # // ...
21394 #
21395 # var protoToCssColor = function(rgb_color) {
21396 # var redFrac = rgb_color.red || 0.0;
21397 # var greenFrac = rgb_color.green || 0.0;
21398 # var blueFrac = rgb_color.blue || 0.0;
21399 # var red = Math.floor(redFrac * 255);
21400 # var green = Math.floor(greenFrac * 255);
21401 # var blue = Math.floor(blueFrac * 255);
21402 #
21403 # if (!('alpha' in rgb_color)) {
21404 # return rgbToCssColor_(red, green, blue);
21405 # }
21406 #
21407 # var alphaFrac = rgb_color.alpha.value || 0.0;
21408 # var rgbParams = [red, green, blue].join(',');
21409 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21410 # };
21411 #
21412 # var rgbToCssColor_ = function(red, green, blue) {
21413 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21414 # var hexString = rgbNumber.toString(16);
21415 # var missingZeros = 6 - hexString.length;
21416 # var resultBuilder = ['#'];
21417 # for (var i = 0; i < missingZeros; i++) {
21418 # resultBuilder.push('0');
21419 # }
21420 # resultBuilder.push(hexString);
21421 # return resultBuilder.join('');
21422 # };
21423 #
21424 # // ...
21425 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21426 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21427 # the final pixel color is defined by the equation:
21428 #
21429 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21430 #
21431 # This means that a value of 1.0 corresponds to a solid color, whereas
21432 # a value of 0.0 corresponds to a completely transparent color. This
21433 # uses a wrapper message rather than a simple float scalar so that it is
21434 # possible to distinguish between a default value and the value being unset.
21435 # If omitted, this color object is to be rendered as a solid color
21436 # (as if the alpha value had been explicitly given with a value of 1.0).
21437 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21438 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21439 },
21440 "width": 42, # The width of the border, in pixels.
21441 # Deprecated; the width is determined by the "style" field.
21442 "style": "A String", # The style of the border.
21443 },
21444 "bottom": { # A border along a cell. # The bottom border of the cell.
21445 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
21446 # for simplicity of conversion to/from color representations in various
21447 # languages over compactness; for example, the fields of this representation
21448 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21449 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21450 # method in iOS; and, with just a little work, it can be easily formatted into
21451 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21452 #
21453 # Example (Java):
21454 #
21455 # import com.google.type.Color;
21456 #
21457 # // ...
21458 # public static java.awt.Color fromProto(Color protocolor) {
21459 # float alpha = protocolor.hasAlpha()
21460 # ? protocolor.getAlpha().getValue()
21461 # : 1.0;
21462 #
21463 # return new java.awt.Color(
21464 # protocolor.getRed(),
21465 # protocolor.getGreen(),
21466 # protocolor.getBlue(),
21467 # alpha);
21468 # }
21469 #
21470 # public static Color toProto(java.awt.Color color) {
21471 # float red = (float) color.getRed();
21472 # float green = (float) color.getGreen();
21473 # float blue = (float) color.getBlue();
21474 # float denominator = 255.0;
21475 # Color.Builder resultBuilder =
21476 # Color
21477 # .newBuilder()
21478 # .setRed(red / denominator)
21479 # .setGreen(green / denominator)
21480 # .setBlue(blue / denominator);
21481 # int alpha = color.getAlpha();
21482 # if (alpha != 255) {
21483 # result.setAlpha(
21484 # FloatValue
21485 # .newBuilder()
21486 # .setValue(((float) alpha) / denominator)
21487 # .build());
21488 # }
21489 # return resultBuilder.build();
21490 # }
21491 # // ...
21492 #
21493 # Example (iOS / Obj-C):
21494 #
21495 # // ...
21496 # static UIColor* fromProto(Color* protocolor) {
21497 # float red = [protocolor red];
21498 # float green = [protocolor green];
21499 # float blue = [protocolor blue];
21500 # FloatValue* alpha_wrapper = [protocolor alpha];
21501 # float alpha = 1.0;
21502 # if (alpha_wrapper != nil) {
21503 # alpha = [alpha_wrapper value];
21504 # }
21505 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21506 # }
21507 #
21508 # static Color* toProto(UIColor* color) {
21509 # CGFloat red, green, blue, alpha;
21510 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21511 # return nil;
21512 # }
21513 # Color* result = [Color alloc] init];
21514 # [result setRed:red];
21515 # [result setGreen:green];
21516 # [result setBlue:blue];
21517 # if (alpha <= 0.9999) {
21518 # [result setAlpha:floatWrapperWithValue(alpha)];
21519 # }
21520 # [result autorelease];
21521 # return result;
21522 # }
21523 # // ...
21524 #
21525 # Example (JavaScript):
21526 #
21527 # // ...
21528 #
21529 # var protoToCssColor = function(rgb_color) {
21530 # var redFrac = rgb_color.red || 0.0;
21531 # var greenFrac = rgb_color.green || 0.0;
21532 # var blueFrac = rgb_color.blue || 0.0;
21533 # var red = Math.floor(redFrac * 255);
21534 # var green = Math.floor(greenFrac * 255);
21535 # var blue = Math.floor(blueFrac * 255);
21536 #
21537 # if (!('alpha' in rgb_color)) {
21538 # return rgbToCssColor_(red, green, blue);
21539 # }
21540 #
21541 # var alphaFrac = rgb_color.alpha.value || 0.0;
21542 # var rgbParams = [red, green, blue].join(',');
21543 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21544 # };
21545 #
21546 # var rgbToCssColor_ = function(red, green, blue) {
21547 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21548 # var hexString = rgbNumber.toString(16);
21549 # var missingZeros = 6 - hexString.length;
21550 # var resultBuilder = ['#'];
21551 # for (var i = 0; i < missingZeros; i++) {
21552 # resultBuilder.push('0');
21553 # }
21554 # resultBuilder.push(hexString);
21555 # return resultBuilder.join('');
21556 # };
21557 #
21558 # // ...
21559 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21560 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21561 # the final pixel color is defined by the equation:
21562 #
21563 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21564 #
21565 # This means that a value of 1.0 corresponds to a solid color, whereas
21566 # a value of 0.0 corresponds to a completely transparent color. This
21567 # uses a wrapper message rather than a simple float scalar so that it is
21568 # possible to distinguish between a default value and the value being unset.
21569 # If omitted, this color object is to be rendered as a solid color
21570 # (as if the alpha value had been explicitly given with a value of 1.0).
21571 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21572 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21573 },
21574 "width": 42, # The width of the border, in pixels.
21575 # Deprecated; the width is determined by the "style" field.
21576 "style": "A String", # The style of the border.
21577 },
21578 "left": { # A border along a cell. # The left border of the cell.
21579 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
21580 # for simplicity of conversion to/from color representations in various
21581 # languages over compactness; for example, the fields of this representation
21582 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21583 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21584 # method in iOS; and, with just a little work, it can be easily formatted into
21585 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21586 #
21587 # Example (Java):
21588 #
21589 # import com.google.type.Color;
21590 #
21591 # // ...
21592 # public static java.awt.Color fromProto(Color protocolor) {
21593 # float alpha = protocolor.hasAlpha()
21594 # ? protocolor.getAlpha().getValue()
21595 # : 1.0;
21596 #
21597 # return new java.awt.Color(
21598 # protocolor.getRed(),
21599 # protocolor.getGreen(),
21600 # protocolor.getBlue(),
21601 # alpha);
21602 # }
21603 #
21604 # public static Color toProto(java.awt.Color color) {
21605 # float red = (float) color.getRed();
21606 # float green = (float) color.getGreen();
21607 # float blue = (float) color.getBlue();
21608 # float denominator = 255.0;
21609 # Color.Builder resultBuilder =
21610 # Color
21611 # .newBuilder()
21612 # .setRed(red / denominator)
21613 # .setGreen(green / denominator)
21614 # .setBlue(blue / denominator);
21615 # int alpha = color.getAlpha();
21616 # if (alpha != 255) {
21617 # result.setAlpha(
21618 # FloatValue
21619 # .newBuilder()
21620 # .setValue(((float) alpha) / denominator)
21621 # .build());
21622 # }
21623 # return resultBuilder.build();
21624 # }
21625 # // ...
21626 #
21627 # Example (iOS / Obj-C):
21628 #
21629 # // ...
21630 # static UIColor* fromProto(Color* protocolor) {
21631 # float red = [protocolor red];
21632 # float green = [protocolor green];
21633 # float blue = [protocolor blue];
21634 # FloatValue* alpha_wrapper = [protocolor alpha];
21635 # float alpha = 1.0;
21636 # if (alpha_wrapper != nil) {
21637 # alpha = [alpha_wrapper value];
21638 # }
21639 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21640 # }
21641 #
21642 # static Color* toProto(UIColor* color) {
21643 # CGFloat red, green, blue, alpha;
21644 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21645 # return nil;
21646 # }
21647 # Color* result = [Color alloc] init];
21648 # [result setRed:red];
21649 # [result setGreen:green];
21650 # [result setBlue:blue];
21651 # if (alpha <= 0.9999) {
21652 # [result setAlpha:floatWrapperWithValue(alpha)];
21653 # }
21654 # [result autorelease];
21655 # return result;
21656 # }
21657 # // ...
21658 #
21659 # Example (JavaScript):
21660 #
21661 # // ...
21662 #
21663 # var protoToCssColor = function(rgb_color) {
21664 # var redFrac = rgb_color.red || 0.0;
21665 # var greenFrac = rgb_color.green || 0.0;
21666 # var blueFrac = rgb_color.blue || 0.0;
21667 # var red = Math.floor(redFrac * 255);
21668 # var green = Math.floor(greenFrac * 255);
21669 # var blue = Math.floor(blueFrac * 255);
21670 #
21671 # if (!('alpha' in rgb_color)) {
21672 # return rgbToCssColor_(red, green, blue);
21673 # }
21674 #
21675 # var alphaFrac = rgb_color.alpha.value || 0.0;
21676 # var rgbParams = [red, green, blue].join(',');
21677 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21678 # };
21679 #
21680 # var rgbToCssColor_ = function(red, green, blue) {
21681 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21682 # var hexString = rgbNumber.toString(16);
21683 # var missingZeros = 6 - hexString.length;
21684 # var resultBuilder = ['#'];
21685 # for (var i = 0; i < missingZeros; i++) {
21686 # resultBuilder.push('0');
21687 # }
21688 # resultBuilder.push(hexString);
21689 # return resultBuilder.join('');
21690 # };
21691 #
21692 # // ...
21693 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21694 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21695 # the final pixel color is defined by the equation:
21696 #
21697 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21698 #
21699 # This means that a value of 1.0 corresponds to a solid color, whereas
21700 # a value of 0.0 corresponds to a completely transparent color. This
21701 # uses a wrapper message rather than a simple float scalar so that it is
21702 # possible to distinguish between a default value and the value being unset.
21703 # If omitted, this color object is to be rendered as a solid color
21704 # (as if the alpha value had been explicitly given with a value of 1.0).
21705 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21706 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21707 },
21708 "width": 42, # The width of the border, in pixels.
21709 # Deprecated; the width is determined by the "style" field.
21710 "style": "A String", # The style of the border.
21711 },
21712 },
21713 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
21714 },
21715 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
21716 #
21717 # When writing, the new data validation rule will overwrite any prior rule.
21718 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
21719 # If true, "List" conditions will show a dropdown.
21720 "strict": True or False, # True if invalid data should be rejected.
21721 "inputMessage": "A String", # A message to show the user when adding data to the cell.
21722 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
21723 # BooleanConditions are used by conditional formatting,
21724 # data validation, and the criteria in filters.
21725 "type": "A String", # The type of condition.
21726 "values": [ # The values of the condition. The number of supported values depends
21727 # on the condition type. Some support zero values,
21728 # others one or two values,
21729 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
21730 { # The value of the condition.
21731 "relativeDate": "A String", # A relative date (based on the current date).
21732 # Valid only if the type is
21733 # DATE_BEFORE,
21734 # DATE_AFTER,
21735 # DATE_ON_OR_BEFORE or
21736 # DATE_ON_OR_AFTER.
21737 #
21738 # Relative dates are not supported in data validation.
21739 # They are supported only in conditional formatting and
21740 # conditional filters.
21741 "userEnteredValue": "A String", # A value the condition is based on.
21742 # The value will be parsed as if the user typed into a cell.
21743 # Formulas are supported (and must begin with an `=`).
21744 },
21745 ],
21746 },
21747 },
21748 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
21749 # on user entered strings, not formulas, bools, or numbers.
21750 # Runs start at specific indexes in the text and continue until the next
21751 # run. Properties of a run will continue unless explicitly changed
21752 # in a subsequent run (and properties of the first run will continue
21753 # the properties of the cell unless explicitly changed).
21754 #
21755 # When writing, the new runs will overwrite any prior runs. When writing a
21756 # new user_entered_value, previous runs will be erased.
21757 { # A run of a text format. The format of this run continues until the start
21758 # index of the next run.
21759 # When updating, all fields must be set.
21760 "startIndex": 42, # The character index where this run starts.
21761 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
21762 # Absent values indicate that the field isn't specified.
21763 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
21764 # for simplicity of conversion to/from color representations in various
21765 # languages over compactness; for example, the fields of this representation
21766 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21767 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21768 # method in iOS; and, with just a little work, it can be easily formatted into
21769 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21770 #
21771 # Example (Java):
21772 #
21773 # import com.google.type.Color;
21774 #
21775 # // ...
21776 # public static java.awt.Color fromProto(Color protocolor) {
21777 # float alpha = protocolor.hasAlpha()
21778 # ? protocolor.getAlpha().getValue()
21779 # : 1.0;
21780 #
21781 # return new java.awt.Color(
21782 # protocolor.getRed(),
21783 # protocolor.getGreen(),
21784 # protocolor.getBlue(),
21785 # alpha);
21786 # }
21787 #
21788 # public static Color toProto(java.awt.Color color) {
21789 # float red = (float) color.getRed();
21790 # float green = (float) color.getGreen();
21791 # float blue = (float) color.getBlue();
21792 # float denominator = 255.0;
21793 # Color.Builder resultBuilder =
21794 # Color
21795 # .newBuilder()
21796 # .setRed(red / denominator)
21797 # .setGreen(green / denominator)
21798 # .setBlue(blue / denominator);
21799 # int alpha = color.getAlpha();
21800 # if (alpha != 255) {
21801 # result.setAlpha(
21802 # FloatValue
21803 # .newBuilder()
21804 # .setValue(((float) alpha) / denominator)
21805 # .build());
21806 # }
21807 # return resultBuilder.build();
21808 # }
21809 # // ...
21810 #
21811 # Example (iOS / Obj-C):
21812 #
21813 # // ...
21814 # static UIColor* fromProto(Color* protocolor) {
21815 # float red = [protocolor red];
21816 # float green = [protocolor green];
21817 # float blue = [protocolor blue];
21818 # FloatValue* alpha_wrapper = [protocolor alpha];
21819 # float alpha = 1.0;
21820 # if (alpha_wrapper != nil) {
21821 # alpha = [alpha_wrapper value];
21822 # }
21823 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21824 # }
21825 #
21826 # static Color* toProto(UIColor* color) {
21827 # CGFloat red, green, blue, alpha;
21828 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21829 # return nil;
21830 # }
21831 # Color* result = [Color alloc] init];
21832 # [result setRed:red];
21833 # [result setGreen:green];
21834 # [result setBlue:blue];
21835 # if (alpha <= 0.9999) {
21836 # [result setAlpha:floatWrapperWithValue(alpha)];
21837 # }
21838 # [result autorelease];
21839 # return result;
21840 # }
21841 # // ...
21842 #
21843 # Example (JavaScript):
21844 #
21845 # // ...
21846 #
21847 # var protoToCssColor = function(rgb_color) {
21848 # var redFrac = rgb_color.red || 0.0;
21849 # var greenFrac = rgb_color.green || 0.0;
21850 # var blueFrac = rgb_color.blue || 0.0;
21851 # var red = Math.floor(redFrac * 255);
21852 # var green = Math.floor(greenFrac * 255);
21853 # var blue = Math.floor(blueFrac * 255);
21854 #
21855 # if (!('alpha' in rgb_color)) {
21856 # return rgbToCssColor_(red, green, blue);
21857 # }
21858 #
21859 # var alphaFrac = rgb_color.alpha.value || 0.0;
21860 # var rgbParams = [red, green, blue].join(',');
21861 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21862 # };
21863 #
21864 # var rgbToCssColor_ = function(red, green, blue) {
21865 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21866 # var hexString = rgbNumber.toString(16);
21867 # var missingZeros = 6 - hexString.length;
21868 # var resultBuilder = ['#'];
21869 # for (var i = 0; i < missingZeros; i++) {
21870 # resultBuilder.push('0');
21871 # }
21872 # resultBuilder.push(hexString);
21873 # return resultBuilder.join('');
21874 # };
21875 #
21876 # // ...
21877 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21878 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21879 # the final pixel color is defined by the equation:
21880 #
21881 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21882 #
21883 # This means that a value of 1.0 corresponds to a solid color, whereas
21884 # a value of 0.0 corresponds to a completely transparent color. This
21885 # uses a wrapper message rather than a simple float scalar so that it is
21886 # possible to distinguish between a default value and the value being unset.
21887 # If omitted, this color object is to be rendered as a solid color
21888 # (as if the alpha value had been explicitly given with a value of 1.0).
21889 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21890 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21891 },
21892 "bold": True or False, # True if the text is bold.
21893 "strikethrough": True or False, # True if the text has a strikethrough.
21894 "fontFamily": "A String", # The font family.
21895 "fontSize": 42, # The size of the font.
21896 "italic": True or False, # True if the text is italicized.
21897 "underline": True or False, # True if the text is underlined.
21898 },
21899 },
21900 ],
21901 },
21902 ],
21903 },
21904 ],
21905 },
21906 ],
21907 "properties": { # Properties of a sheet. # The properties of the sheet.
21908 "sheetType": "A String", # The type of sheet. Defaults to GRID.
21909 # This field cannot be changed once set.
21910 "index": 42, # The index of the sheet within the spreadsheet.
21911 # When adding or updating sheet properties, if this field
21912 # is excluded then the sheet will be added or moved to the end
21913 # of the sheet list. When updating sheet indices or inserting
21914 # sheets, movement is considered in "before the move" indexes.
21915 # For example, if there were 3 sheets (S1, S2, S3) in order to
21916 # move S1 ahead of S2 the index would have to be set to 2. A sheet
21917 # index update request will be ignored if the requested index is
21918 # identical to the sheets current index or if the requested new
21919 # index is equal to the current sheet index + 1.
21920 "title": "A String", # The name of the sheet.
21921 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
21922 # (If the sheet is an object sheet, containing a chart or image, then
21923 # this field will be absent.)
21924 # When writing it is an error to set any grid properties on non-grid sheets.
21925 "columnCount": 42, # The number of columns in the grid.
21926 "rowCount": 42, # The number of rows in the grid.
21927 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
21928 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
21929 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
21930 },
21931 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
21932 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
21933 # for simplicity of conversion to/from color representations in various
21934 # languages over compactness; for example, the fields of this representation
21935 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21936 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21937 # method in iOS; and, with just a little work, it can be easily formatted into
21938 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21939 #
21940 # Example (Java):
21941 #
21942 # import com.google.type.Color;
21943 #
21944 # // ...
21945 # public static java.awt.Color fromProto(Color protocolor) {
21946 # float alpha = protocolor.hasAlpha()
21947 # ? protocolor.getAlpha().getValue()
21948 # : 1.0;
21949 #
21950 # return new java.awt.Color(
21951 # protocolor.getRed(),
21952 # protocolor.getGreen(),
21953 # protocolor.getBlue(),
21954 # alpha);
21955 # }
21956 #
21957 # public static Color toProto(java.awt.Color color) {
21958 # float red = (float) color.getRed();
21959 # float green = (float) color.getGreen();
21960 # float blue = (float) color.getBlue();
21961 # float denominator = 255.0;
21962 # Color.Builder resultBuilder =
21963 # Color
21964 # .newBuilder()
21965 # .setRed(red / denominator)
21966 # .setGreen(green / denominator)
21967 # .setBlue(blue / denominator);
21968 # int alpha = color.getAlpha();
21969 # if (alpha != 255) {
21970 # result.setAlpha(
21971 # FloatValue
21972 # .newBuilder()
21973 # .setValue(((float) alpha) / denominator)
21974 # .build());
21975 # }
21976 # return resultBuilder.build();
21977 # }
21978 # // ...
21979 #
21980 # Example (iOS / Obj-C):
21981 #
21982 # // ...
21983 # static UIColor* fromProto(Color* protocolor) {
21984 # float red = [protocolor red];
21985 # float green = [protocolor green];
21986 # float blue = [protocolor blue];
21987 # FloatValue* alpha_wrapper = [protocolor alpha];
21988 # float alpha = 1.0;
21989 # if (alpha_wrapper != nil) {
21990 # alpha = [alpha_wrapper value];
21991 # }
21992 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21993 # }
21994 #
21995 # static Color* toProto(UIColor* color) {
21996 # CGFloat red, green, blue, alpha;
21997 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21998 # return nil;
21999 # }
22000 # Color* result = [Color alloc] init];
22001 # [result setRed:red];
22002 # [result setGreen:green];
22003 # [result setBlue:blue];
22004 # if (alpha <= 0.9999) {
22005 # [result setAlpha:floatWrapperWithValue(alpha)];
22006 # }
22007 # [result autorelease];
22008 # return result;
22009 # }
22010 # // ...
22011 #
22012 # Example (JavaScript):
22013 #
22014 # // ...
22015 #
22016 # var protoToCssColor = function(rgb_color) {
22017 # var redFrac = rgb_color.red || 0.0;
22018 # var greenFrac = rgb_color.green || 0.0;
22019 # var blueFrac = rgb_color.blue || 0.0;
22020 # var red = Math.floor(redFrac * 255);
22021 # var green = Math.floor(greenFrac * 255);
22022 # var blue = Math.floor(blueFrac * 255);
22023 #
22024 # if (!('alpha' in rgb_color)) {
22025 # return rgbToCssColor_(red, green, blue);
22026 # }
22027 #
22028 # var alphaFrac = rgb_color.alpha.value || 0.0;
22029 # var rgbParams = [red, green, blue].join(',');
22030 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22031 # };
22032 #
22033 # var rgbToCssColor_ = function(red, green, blue) {
22034 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22035 # var hexString = rgbNumber.toString(16);
22036 # var missingZeros = 6 - hexString.length;
22037 # var resultBuilder = ['#'];
22038 # for (var i = 0; i < missingZeros; i++) {
22039 # resultBuilder.push('0');
22040 # }
22041 # resultBuilder.push(hexString);
22042 # return resultBuilder.join('');
22043 # };
22044 #
22045 # // ...
22046 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22047 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22048 # the final pixel color is defined by the equation:
22049 #
22050 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22051 #
22052 # This means that a value of 1.0 corresponds to a solid color, whereas
22053 # a value of 0.0 corresponds to a completely transparent color. This
22054 # uses a wrapper message rather than a simple float scalar so that it is
22055 # possible to distinguish between a default value and the value being unset.
22056 # If omitted, this color object is to be rendered as a solid color
22057 # (as if the alpha value had been explicitly given with a value of 1.0).
22058 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22059 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22060 },
22061 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
22062 "sheetId": 42, # The ID of the sheet. Must be non-negative.
22063 # This field cannot be changed once set.
22064 },
22065 },
22066 ],
22067 "spreadsheetUrl": "A String", # The url of the spreadsheet.
22068 # This field is read-only.
22069 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022070 "replies": [ # The reply of the updates. This maps 1:1 with the updates, although
22071 # replies to some requests may be empty.
22072 { # A single response from an update.
22073 "duplicateFilterView": { # The result of a filter view being duplicated. # A reply from duplicating a filter view.
22074 "filter": { # A filter view. # The newly created filter.
22075 "title": "A String", # The name of the filter view.
22076 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
22077 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022078 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022079 # may be set.
22080 "filterViewId": 42, # The ID of the filter view.
22081 "range": { # A range on a sheet. # The range this filter view covers.
22082 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022083 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022084 # may be set.
22085 # All indexes are zero-based.
22086 # Indexes are half open, e.g the start index is inclusive
22087 # and the end index is exclusive -- [start_index, end_index).
22088 # Missing indexes indicate the range is unbounded on that side.
22089 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022090 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022091 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022092 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022093 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022094 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022095 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022096 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022097 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022098 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022099 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022100 # `Sheet1!A:B == sheet_id: 0,
22101 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022102 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022103 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022104 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022105 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022106 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022107 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022108 #
22109 # The start index must always be less than or equal to the end index.
22110 # If the start index equals the end index, then the range is empty.
22111 # Empty ranges are typically not meaningful and are usually rendered in the
22112 # UI as `#REF!`.
22113 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
22114 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
22115 "sheetId": 42, # The sheet this range is on.
22116 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
22117 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
22118 },
22119 "sortSpecs": [ # The sort order per column. Later specifications are used when values
22120 # are equal in the earlier specifications.
22121 { # A sort order associated with a specific column or row.
22122 "sortOrder": "A String", # The order data should be sorted.
22123 "dimensionIndex": 42, # The dimension the sort should be applied to.
22124 },
22125 ],
22126 "criteria": { # The criteria for showing/hiding values per column.
22127 # The map's key is the column index, and the value is the criteria for
22128 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022129 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022130 "hiddenValues": [ # Values that should be hidden.
22131 "A String",
22132 ],
22133 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
22134 # (This does not override hiddenValues -- if a value is listed there,
22135 # it will still be hidden.)
22136 # BooleanConditions are used by conditional formatting,
22137 # data validation, and the criteria in filters.
22138 "type": "A String", # The type of condition.
22139 "values": [ # The values of the condition. The number of supported values depends
22140 # on the condition type. Some support zero values,
22141 # others one or two values,
22142 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
22143 { # The value of the condition.
22144 "relativeDate": "A String", # A relative date (based on the current date).
22145 # Valid only if the type is
22146 # DATE_BEFORE,
22147 # DATE_AFTER,
22148 # DATE_ON_OR_BEFORE or
22149 # DATE_ON_OR_AFTER.
22150 #
22151 # Relative dates are not supported in data validation.
22152 # They are supported only in conditional formatting and
22153 # conditional filters.
22154 "userEnteredValue": "A String", # A value the condition is based on.
22155 # The value will be parsed as if the user typed into a cell.
22156 # Formulas are supported (and must begin with an `=`).
22157 },
22158 ],
22159 },
22160 },
22161 },
22162 },
22163 },
22164 "duplicateSheet": { # The result of duplicating a sheet. # A reply from duplicating a sheet.
22165 "properties": { # Properties of a sheet. # The properties of the duplicate sheet.
22166 "sheetType": "A String", # The type of sheet. Defaults to GRID.
22167 # This field cannot be changed once set.
22168 "index": 42, # The index of the sheet within the spreadsheet.
22169 # When adding or updating sheet properties, if this field
22170 # is excluded then the sheet will be added or moved to the end
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080022171 # of the sheet list. When updating sheet indices or inserting
22172 # sheets, movement is considered in "before the move" indexes.
22173 # For example, if there were 3 sheets (S1, S2, S3) in order to
22174 # move S1 ahead of S2 the index would have to be set to 2. A sheet
22175 # index update request will be ignored if the requested index is
22176 # identical to the sheets current index or if the requested new
22177 # index is equal to the current sheet index + 1.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022178 "title": "A String", # The name of the sheet.
22179 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
22180 # (If the sheet is an object sheet, containing a chart or image, then
22181 # this field will be absent.)
22182 # When writing it is an error to set any grid properties on non-grid sheets.
22183 "columnCount": 42, # The number of columns in the grid.
22184 "rowCount": 42, # The number of rows in the grid.
22185 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
22186 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
22187 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
22188 },
22189 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
22190 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
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 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
22320 "sheetId": 42, # The ID of the sheet. Must be non-negative.
22321 # This field cannot be changed once set.
22322 },
22323 },
22324 "updateEmbeddedObjectPosition": { # The result of updating an embedded object's position. # A reply from updating an embedded object's position.
22325 "position": { # The position of an embedded object such as a chart. # The new position of the embedded object.
22326 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
22327 # is chosen for you. Used only when writing.
22328 "sheetId": 42, # The sheet this is on. Set only if the embedded object
22329 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022330 "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 -070022331 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
22332 # All indexes are zero-based.
22333 "rowIndex": 42, # The row index of the coordinate.
22334 "columnIndex": 42, # The column index of the coordinate.
22335 "sheetId": 42, # The sheet this coordinate is on.
22336 },
22337 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
22338 # from the anchor cell.
22339 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
22340 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
22341 # from the anchor cell.
22342 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
22343 },
22344 },
22345 },
22346 "addChart": { # The result of adding a chart to a spreadsheet. # A reply from adding a chart.
22347 "chart": { # A chart embedded in a sheet. # The newly added chart.
22348 "chartId": 42, # The ID of the chart.
22349 "position": { # The position of an embedded object such as a chart. # The position of the chart.
22350 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
22351 # is chosen for you. Used only when writing.
22352 "sheetId": 42, # The sheet this is on. Set only if the embedded object
22353 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022354 "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 -070022355 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
22356 # All indexes are zero-based.
22357 "rowIndex": 42, # The row index of the coordinate.
22358 "columnIndex": 42, # The column index of the coordinate.
22359 "sheetId": 42, # The sheet this coordinate is on.
22360 },
22361 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
22362 # from the anchor cell.
22363 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
22364 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
22365 # from the anchor cell.
22366 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
22367 },
22368 },
22369 "spec": { # The specifications of a chart. # The specification of the chart.
22370 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022371 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
22372 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
22373 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
22374 "sources": [ # The ranges of data for a series or domain.
22375 # Exactly one dimension must have a length of 1,
22376 # and all sources in the list must have the same dimension
22377 # with length 1.
22378 # The domain (if it exists) & all series must have the same number
22379 # of source ranges. If using more than one source range, then the source
22380 # range at a given offset must be contiguous across the domain and series.
22381 #
22382 # For example, these are valid configurations:
22383 #
22384 # domain sources: A1:A5
22385 # series1 sources: B1:B5
22386 # series2 sources: D6:D10
22387 #
22388 # domain sources: A1:A5, C10:C12
22389 # series1 sources: B1:B5, D10:D12
22390 # series2 sources: C1:C5, E10:E12
22391 { # A range on a sheet.
22392 # All indexes are zero-based.
22393 # Indexes are half open, e.g the start index is inclusive
22394 # and the end index is exclusive -- [start_index, end_index).
22395 # Missing indexes indicate the range is unbounded on that side.
22396 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022397 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022398 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022399 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022400 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022401 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022402 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022403 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022404 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022405 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022406 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022407 # `Sheet1!A:B == sheet_id: 0,
22408 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022409 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022410 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022411 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022412 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022413 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022414 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022415 #
22416 # The start index must always be less than or equal to the end index.
22417 # If the start index equals the end index, then the range is empty.
22418 # Empty ranges are typically not meaningful and are usually rendered in the
22419 # UI as `#REF!`.
22420 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
22421 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
22422 "sheetId": 42, # The sheet this range is on.
22423 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
22424 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
22425 },
22426 ],
22427 },
22428 },
22429 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
22430 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
22431 "sources": [ # The ranges of data for a series or domain.
22432 # Exactly one dimension must have a length of 1,
22433 # and all sources in the list must have the same dimension
22434 # with length 1.
22435 # The domain (if it exists) & all series must have the same number
22436 # of source ranges. If using more than one source range, then the source
22437 # range at a given offset must be contiguous across the domain and series.
22438 #
22439 # For example, these are valid configurations:
22440 #
22441 # domain sources: A1:A5
22442 # series1 sources: B1:B5
22443 # series2 sources: D6:D10
22444 #
22445 # domain sources: A1:A5, C10:C12
22446 # series1 sources: B1:B5, D10:D12
22447 # series2 sources: C1:C5, E10:E12
22448 { # A range on a sheet.
22449 # All indexes are zero-based.
22450 # Indexes are half open, e.g the start index is inclusive
22451 # and the end index is exclusive -- [start_index, end_index).
22452 # Missing indexes indicate the range is unbounded on that side.
22453 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022454 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022455 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022456 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022457 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022458 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022459 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022460 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022461 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022462 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022463 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022464 # `Sheet1!A:B == sheet_id: 0,
22465 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022466 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022467 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022468 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022469 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022470 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022471 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022472 #
22473 # The start index must always be less than or equal to the end index.
22474 # If the start index equals the end index, then the range is empty.
22475 # Empty ranges are typically not meaningful and are usually rendered in the
22476 # UI as `#REF!`.
22477 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
22478 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
22479 "sheetId": 42, # The sheet this range is on.
22480 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
22481 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
22482 },
22483 ],
22484 },
22485 },
22486 "threeDimensional": True or False, # True if the pie is three dimensional.
22487 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
22488 "pieHole": 3.14, # The size of the hole in the pie chart.
22489 },
22490 "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 -070022491 # See BasicChartType for the list of all
22492 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022493 # of charts this supports.
22494 "headerCount": 42, # The number of rows or columns in the data that are "headers".
22495 # If not set, Google Sheets will guess how many rows are headers based
22496 # on the data.
22497 #
22498 # (Note that BasicChartAxis.title may override the axis title
22499 # inferred from the header values.)
22500 "series": [ # The data this chart is visualizing.
22501 { # A single series of data in a chart.
22502 # For example, if charting stock prices over time, multiple series may exist,
22503 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
22504 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
22505 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
22506 "sources": [ # The ranges of data for a series or domain.
22507 # Exactly one dimension must have a length of 1,
22508 # and all sources in the list must have the same dimension
22509 # with length 1.
22510 # The domain (if it exists) & all series must have the same number
22511 # of source ranges. If using more than one source range, then the source
22512 # range at a given offset must be contiguous across the domain and series.
22513 #
22514 # For example, these are valid configurations:
22515 #
22516 # domain sources: A1:A5
22517 # series1 sources: B1:B5
22518 # series2 sources: D6:D10
22519 #
22520 # domain sources: A1:A5, C10:C12
22521 # series1 sources: B1:B5, D10:D12
22522 # series2 sources: C1:C5, E10:E12
22523 { # A range on a sheet.
22524 # All indexes are zero-based.
22525 # Indexes are half open, e.g the start index is inclusive
22526 # and the end index is exclusive -- [start_index, end_index).
22527 # Missing indexes indicate the range is unbounded on that side.
22528 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022529 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022530 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022531 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022532 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022533 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022534 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022535 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022536 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022537 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022538 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022539 # `Sheet1!A:B == sheet_id: 0,
22540 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022541 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022542 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022543 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022544 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022545 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022546 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022547 #
22548 # The start index must always be less than or equal to the end index.
22549 # If the start index equals the end index, then the range is empty.
22550 # Empty ranges are typically not meaningful and are usually rendered in the
22551 # UI as `#REF!`.
22552 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
22553 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
22554 "sheetId": 42, # The sheet this range is on.
22555 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
22556 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
22557 },
22558 ],
22559 },
22560 },
22561 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
22562 # For example, if charting stocks over time, the "Volume" series
22563 # may want to be pinned to the right with the prices pinned to the left,
22564 # because the scale of trading volume is different than the scale of
22565 # prices.
22566 # It is an error to specify an axis that isn't a valid minor axis
22567 # for the chart's type.
22568 "type": "A String", # The type of this series. Valid only if the
22569 # chartType is
22570 # COMBO.
22571 # Different types will change the way the series is visualized.
22572 # Only LINE, AREA,
22573 # and COLUMN are supported.
22574 },
22575 ],
22576 "legendPosition": "A String", # The position of the chart legend.
22577 "domains": [ # The domain of data this is charting.
22578 # Only a single domain is currently supported.
22579 { # The domain of a chart.
22580 # For example, if charting stock prices over time, this would be the date.
22581 "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 -070022582 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022583 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
22584 "sources": [ # The ranges of data for a series or domain.
22585 # Exactly one dimension must have a length of 1,
22586 # and all sources in the list must have the same dimension
22587 # with length 1.
22588 # The domain (if it exists) & all series must have the same number
22589 # of source ranges. If using more than one source range, then the source
22590 # range at a given offset must be contiguous across the domain and series.
22591 #
22592 # For example, these are valid configurations:
22593 #
22594 # domain sources: A1:A5
22595 # series1 sources: B1:B5
22596 # series2 sources: D6:D10
22597 #
22598 # domain sources: A1:A5, C10:C12
22599 # series1 sources: B1:B5, D10:D12
22600 # series2 sources: C1:C5, E10:E12
22601 { # A range on a sheet.
22602 # All indexes are zero-based.
22603 # Indexes are half open, e.g the start index is inclusive
22604 # and the end index is exclusive -- [start_index, end_index).
22605 # Missing indexes indicate the range is unbounded on that side.
22606 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022607 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022608 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022609 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022610 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022611 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022612 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022613 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022614 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022615 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022616 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022617 # `Sheet1!A:B == sheet_id: 0,
22618 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022619 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022620 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022621 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022622 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022623 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022624 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022625 #
22626 # The start index must always be less than or equal to the end index.
22627 # If the start index equals the end index, then the range is empty.
22628 # Empty ranges are typically not meaningful and are usually rendered in the
22629 # UI as `#REF!`.
22630 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
22631 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
22632 "sheetId": 42, # The sheet this range is on.
22633 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
22634 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
22635 },
22636 ],
22637 },
22638 },
22639 },
22640 ],
22641 "chartType": "A String", # The type of the chart.
22642 "axis": [ # The axis on the chart.
22643 { # An axis of the chart.
22644 # A chart may not have more than one axis per
22645 # axis position.
22646 "position": "A String", # The position of this axis.
22647 "format": { # The format of a run of text in a cell. # The format of the title.
22648 # Only valid if the axis is not associated with the domain.
22649 # Absent values indicate that the field isn't specified.
22650 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
22651 # for simplicity of conversion to/from color representations in various
22652 # languages over compactness; for example, the fields of this representation
22653 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22654 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22655 # method in iOS; and, with just a little work, it can be easily formatted into
22656 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22657 #
22658 # Example (Java):
22659 #
22660 # import com.google.type.Color;
22661 #
22662 # // ...
22663 # public static java.awt.Color fromProto(Color protocolor) {
22664 # float alpha = protocolor.hasAlpha()
22665 # ? protocolor.getAlpha().getValue()
22666 # : 1.0;
22667 #
22668 # return new java.awt.Color(
22669 # protocolor.getRed(),
22670 # protocolor.getGreen(),
22671 # protocolor.getBlue(),
22672 # alpha);
22673 # }
22674 #
22675 # public static Color toProto(java.awt.Color color) {
22676 # float red = (float) color.getRed();
22677 # float green = (float) color.getGreen();
22678 # float blue = (float) color.getBlue();
22679 # float denominator = 255.0;
22680 # Color.Builder resultBuilder =
22681 # Color
22682 # .newBuilder()
22683 # .setRed(red / denominator)
22684 # .setGreen(green / denominator)
22685 # .setBlue(blue / denominator);
22686 # int alpha = color.getAlpha();
22687 # if (alpha != 255) {
22688 # result.setAlpha(
22689 # FloatValue
22690 # .newBuilder()
22691 # .setValue(((float) alpha) / denominator)
22692 # .build());
22693 # }
22694 # return resultBuilder.build();
22695 # }
22696 # // ...
22697 #
22698 # Example (iOS / Obj-C):
22699 #
22700 # // ...
22701 # static UIColor* fromProto(Color* protocolor) {
22702 # float red = [protocolor red];
22703 # float green = [protocolor green];
22704 # float blue = [protocolor blue];
22705 # FloatValue* alpha_wrapper = [protocolor alpha];
22706 # float alpha = 1.0;
22707 # if (alpha_wrapper != nil) {
22708 # alpha = [alpha_wrapper value];
22709 # }
22710 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22711 # }
22712 #
22713 # static Color* toProto(UIColor* color) {
22714 # CGFloat red, green, blue, alpha;
22715 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22716 # return nil;
22717 # }
22718 # Color* result = [Color alloc] init];
22719 # [result setRed:red];
22720 # [result setGreen:green];
22721 # [result setBlue:blue];
22722 # if (alpha <= 0.9999) {
22723 # [result setAlpha:floatWrapperWithValue(alpha)];
22724 # }
22725 # [result autorelease];
22726 # return result;
22727 # }
22728 # // ...
22729 #
22730 # Example (JavaScript):
22731 #
22732 # // ...
22733 #
22734 # var protoToCssColor = function(rgb_color) {
22735 # var redFrac = rgb_color.red || 0.0;
22736 # var greenFrac = rgb_color.green || 0.0;
22737 # var blueFrac = rgb_color.blue || 0.0;
22738 # var red = Math.floor(redFrac * 255);
22739 # var green = Math.floor(greenFrac * 255);
22740 # var blue = Math.floor(blueFrac * 255);
22741 #
22742 # if (!('alpha' in rgb_color)) {
22743 # return rgbToCssColor_(red, green, blue);
22744 # }
22745 #
22746 # var alphaFrac = rgb_color.alpha.value || 0.0;
22747 # var rgbParams = [red, green, blue].join(',');
22748 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22749 # };
22750 #
22751 # var rgbToCssColor_ = function(red, green, blue) {
22752 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22753 # var hexString = rgbNumber.toString(16);
22754 # var missingZeros = 6 - hexString.length;
22755 # var resultBuilder = ['#'];
22756 # for (var i = 0; i < missingZeros; i++) {
22757 # resultBuilder.push('0');
22758 # }
22759 # resultBuilder.push(hexString);
22760 # return resultBuilder.join('');
22761 # };
22762 #
22763 # // ...
22764 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22765 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22766 # the final pixel color is defined by the equation:
22767 #
22768 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22769 #
22770 # This means that a value of 1.0 corresponds to a solid color, whereas
22771 # a value of 0.0 corresponds to a completely transparent color. This
22772 # uses a wrapper message rather than a simple float scalar so that it is
22773 # possible to distinguish between a default value and the value being unset.
22774 # If omitted, this color object is to be rendered as a solid color
22775 # (as if the alpha value had been explicitly given with a value of 1.0).
22776 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22777 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22778 },
22779 "bold": True or False, # True if the text is bold.
22780 "strikethrough": True or False, # True if the text has a strikethrough.
22781 "fontFamily": "A String", # The font family.
22782 "fontSize": 42, # The size of the font.
22783 "italic": True or False, # True if the text is italicized.
22784 "underline": True or False, # True if the text is underlined.
22785 },
22786 "title": "A String", # The title of this axis. If set, this overrides any title inferred
22787 # from headers of the data.
22788 },
22789 ],
22790 },
22791 "title": "A String", # The title of the chart.
22792 },
22793 },
22794 },
22795 "updateConditionalFormatRule": { # The result of updating a conditional format rule. # A reply from updating a conditional format rule.
22796 "oldIndex": 42, # The old index of the rule. Not set if a rule was replaced
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022797 # (because it is the same as new_index).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022798 "newIndex": 42, # The index of the new rule.
22799 "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 -070022800 # (because it is the same as new_rule).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022801 "ranges": [ # The ranges that will be formatted if the condition is true.
22802 # All the ranges must be on the same grid.
22803 { # A range on a sheet.
22804 # All indexes are zero-based.
22805 # Indexes are half open, e.g the start index is inclusive
22806 # and the end index is exclusive -- [start_index, end_index).
22807 # Missing indexes indicate the range is unbounded on that side.
22808 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022809 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022810 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022811 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022812 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022813 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022814 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022815 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022816 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022817 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022818 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022819 # `Sheet1!A:B == sheet_id: 0,
22820 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022821 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022822 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022823 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022824 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022825 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022826 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022827 #
22828 # The start index must always be less than or equal to the end index.
22829 # If the start index equals the end index, then the range is empty.
22830 # Empty ranges are typically not meaningful and are usually rendered in the
22831 # UI as `#REF!`.
22832 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
22833 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
22834 "sheetId": 42, # The sheet this range is on.
22835 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
22836 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
22837 },
22838 ],
22839 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
22840 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
22841 # the format will be applied.
22842 # BooleanConditions are used by conditional formatting,
22843 # data validation, and the criteria in filters.
22844 "type": "A String", # The type of condition.
22845 "values": [ # The values of the condition. The number of supported values depends
22846 # on the condition type. Some support zero values,
22847 # others one or two values,
22848 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
22849 { # The value of the condition.
22850 "relativeDate": "A String", # A relative date (based on the current date).
22851 # Valid only if the type is
22852 # DATE_BEFORE,
22853 # DATE_AFTER,
22854 # DATE_ON_OR_BEFORE or
22855 # DATE_ON_OR_AFTER.
22856 #
22857 # Relative dates are not supported in data validation.
22858 # They are supported only in conditional formatting and
22859 # conditional filters.
22860 "userEnteredValue": "A String", # A value the condition is based on.
22861 # The value will be parsed as if the user typed into a cell.
22862 # Formulas are supported (and must begin with an `=`).
22863 },
22864 ],
22865 },
22866 "format": { # The format of a cell. # The format to apply.
22867 # Conditional formatting can only apply a subset of formatting:
22868 # bold, italic,
22869 # strikethrough,
22870 # foreground color &
22871 # background color.
22872 "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 -070022873 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
22874 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070022875 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
22876 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022877 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022878 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022879 },
22880 "textDirection": "A String", # The direction of the text in the cell.
22881 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
22882 # When updating padding, every field must be specified.
22883 "top": 42, # The top padding of the cell.
22884 "right": 42, # The right padding of the cell.
22885 "bottom": 42, # The bottom padding of the cell.
22886 "left": 42, # The left padding of the cell.
22887 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022888 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022889 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
22890 # for simplicity of conversion to/from color representations in various
22891 # languages over compactness; for example, the fields of this representation
22892 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22893 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22894 # method in iOS; and, with just a little work, it can be easily formatted into
22895 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22896 #
22897 # Example (Java):
22898 #
22899 # import com.google.type.Color;
22900 #
22901 # // ...
22902 # public static java.awt.Color fromProto(Color protocolor) {
22903 # float alpha = protocolor.hasAlpha()
22904 # ? protocolor.getAlpha().getValue()
22905 # : 1.0;
22906 #
22907 # return new java.awt.Color(
22908 # protocolor.getRed(),
22909 # protocolor.getGreen(),
22910 # protocolor.getBlue(),
22911 # alpha);
22912 # }
22913 #
22914 # public static Color toProto(java.awt.Color color) {
22915 # float red = (float) color.getRed();
22916 # float green = (float) color.getGreen();
22917 # float blue = (float) color.getBlue();
22918 # float denominator = 255.0;
22919 # Color.Builder resultBuilder =
22920 # Color
22921 # .newBuilder()
22922 # .setRed(red / denominator)
22923 # .setGreen(green / denominator)
22924 # .setBlue(blue / denominator);
22925 # int alpha = color.getAlpha();
22926 # if (alpha != 255) {
22927 # result.setAlpha(
22928 # FloatValue
22929 # .newBuilder()
22930 # .setValue(((float) alpha) / denominator)
22931 # .build());
22932 # }
22933 # return resultBuilder.build();
22934 # }
22935 # // ...
22936 #
22937 # Example (iOS / Obj-C):
22938 #
22939 # // ...
22940 # static UIColor* fromProto(Color* protocolor) {
22941 # float red = [protocolor red];
22942 # float green = [protocolor green];
22943 # float blue = [protocolor blue];
22944 # FloatValue* alpha_wrapper = [protocolor alpha];
22945 # float alpha = 1.0;
22946 # if (alpha_wrapper != nil) {
22947 # alpha = [alpha_wrapper value];
22948 # }
22949 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22950 # }
22951 #
22952 # static Color* toProto(UIColor* color) {
22953 # CGFloat red, green, blue, alpha;
22954 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22955 # return nil;
22956 # }
22957 # Color* result = [Color alloc] init];
22958 # [result setRed:red];
22959 # [result setGreen:green];
22960 # [result setBlue:blue];
22961 # if (alpha <= 0.9999) {
22962 # [result setAlpha:floatWrapperWithValue(alpha)];
22963 # }
22964 # [result autorelease];
22965 # return result;
22966 # }
22967 # // ...
22968 #
22969 # Example (JavaScript):
22970 #
22971 # // ...
22972 #
22973 # var protoToCssColor = function(rgb_color) {
22974 # var redFrac = rgb_color.red || 0.0;
22975 # var greenFrac = rgb_color.green || 0.0;
22976 # var blueFrac = rgb_color.blue || 0.0;
22977 # var red = Math.floor(redFrac * 255);
22978 # var green = Math.floor(greenFrac * 255);
22979 # var blue = Math.floor(blueFrac * 255);
22980 #
22981 # if (!('alpha' in rgb_color)) {
22982 # return rgbToCssColor_(red, green, blue);
22983 # }
22984 #
22985 # var alphaFrac = rgb_color.alpha.value || 0.0;
22986 # var rgbParams = [red, green, blue].join(',');
22987 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22988 # };
22989 #
22990 # var rgbToCssColor_ = function(red, green, blue) {
22991 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22992 # var hexString = rgbNumber.toString(16);
22993 # var missingZeros = 6 - hexString.length;
22994 # var resultBuilder = ['#'];
22995 # for (var i = 0; i < missingZeros; i++) {
22996 # resultBuilder.push('0');
22997 # }
22998 # resultBuilder.push(hexString);
22999 # return resultBuilder.join('');
23000 # };
23001 #
23002 # // ...
23003 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23004 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23005 # the final pixel color is defined by the equation:
23006 #
23007 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23008 #
23009 # This means that a value of 1.0 corresponds to a solid color, whereas
23010 # a value of 0.0 corresponds to a completely transparent color. This
23011 # uses a wrapper message rather than a simple float scalar so that it is
23012 # possible to distinguish between a default value and the value being unset.
23013 # If omitted, this color object is to be rendered as a solid color
23014 # (as if the alpha value had been explicitly given with a value of 1.0).
23015 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23016 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23017 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023018 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023019 "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).
23020 # Absent values indicate that the field isn't specified.
23021 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
23022 # for simplicity of conversion to/from color representations in various
23023 # languages over compactness; for example, the fields of this representation
23024 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23025 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23026 # method in iOS; and, with just a little work, it can be easily formatted into
23027 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23028 #
23029 # Example (Java):
23030 #
23031 # import com.google.type.Color;
23032 #
23033 # // ...
23034 # public static java.awt.Color fromProto(Color protocolor) {
23035 # float alpha = protocolor.hasAlpha()
23036 # ? protocolor.getAlpha().getValue()
23037 # : 1.0;
23038 #
23039 # return new java.awt.Color(
23040 # protocolor.getRed(),
23041 # protocolor.getGreen(),
23042 # protocolor.getBlue(),
23043 # alpha);
23044 # }
23045 #
23046 # public static Color toProto(java.awt.Color color) {
23047 # float red = (float) color.getRed();
23048 # float green = (float) color.getGreen();
23049 # float blue = (float) color.getBlue();
23050 # float denominator = 255.0;
23051 # Color.Builder resultBuilder =
23052 # Color
23053 # .newBuilder()
23054 # .setRed(red / denominator)
23055 # .setGreen(green / denominator)
23056 # .setBlue(blue / denominator);
23057 # int alpha = color.getAlpha();
23058 # if (alpha != 255) {
23059 # result.setAlpha(
23060 # FloatValue
23061 # .newBuilder()
23062 # .setValue(((float) alpha) / denominator)
23063 # .build());
23064 # }
23065 # return resultBuilder.build();
23066 # }
23067 # // ...
23068 #
23069 # Example (iOS / Obj-C):
23070 #
23071 # // ...
23072 # static UIColor* fromProto(Color* protocolor) {
23073 # float red = [protocolor red];
23074 # float green = [protocolor green];
23075 # float blue = [protocolor blue];
23076 # FloatValue* alpha_wrapper = [protocolor alpha];
23077 # float alpha = 1.0;
23078 # if (alpha_wrapper != nil) {
23079 # alpha = [alpha_wrapper value];
23080 # }
23081 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23082 # }
23083 #
23084 # static Color* toProto(UIColor* color) {
23085 # CGFloat red, green, blue, alpha;
23086 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23087 # return nil;
23088 # }
23089 # Color* result = [Color alloc] init];
23090 # [result setRed:red];
23091 # [result setGreen:green];
23092 # [result setBlue:blue];
23093 # if (alpha <= 0.9999) {
23094 # [result setAlpha:floatWrapperWithValue(alpha)];
23095 # }
23096 # [result autorelease];
23097 # return result;
23098 # }
23099 # // ...
23100 #
23101 # Example (JavaScript):
23102 #
23103 # // ...
23104 #
23105 # var protoToCssColor = function(rgb_color) {
23106 # var redFrac = rgb_color.red || 0.0;
23107 # var greenFrac = rgb_color.green || 0.0;
23108 # var blueFrac = rgb_color.blue || 0.0;
23109 # var red = Math.floor(redFrac * 255);
23110 # var green = Math.floor(greenFrac * 255);
23111 # var blue = Math.floor(blueFrac * 255);
23112 #
23113 # if (!('alpha' in rgb_color)) {
23114 # return rgbToCssColor_(red, green, blue);
23115 # }
23116 #
23117 # var alphaFrac = rgb_color.alpha.value || 0.0;
23118 # var rgbParams = [red, green, blue].join(',');
23119 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23120 # };
23121 #
23122 # var rgbToCssColor_ = function(red, green, blue) {
23123 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23124 # var hexString = rgbNumber.toString(16);
23125 # var missingZeros = 6 - hexString.length;
23126 # var resultBuilder = ['#'];
23127 # for (var i = 0; i < missingZeros; i++) {
23128 # resultBuilder.push('0');
23129 # }
23130 # resultBuilder.push(hexString);
23131 # return resultBuilder.join('');
23132 # };
23133 #
23134 # // ...
23135 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23136 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23137 # the final pixel color is defined by the equation:
23138 #
23139 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23140 #
23141 # This means that a value of 1.0 corresponds to a solid color, whereas
23142 # a value of 0.0 corresponds to a completely transparent color. This
23143 # uses a wrapper message rather than a simple float scalar so that it is
23144 # possible to distinguish between a default value and the value being unset.
23145 # If omitted, this color object is to be rendered as a solid color
23146 # (as if the alpha value had been explicitly given with a value of 1.0).
23147 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23148 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23149 },
23150 "bold": True or False, # True if the text is bold.
23151 "strikethrough": True or False, # True if the text has a strikethrough.
23152 "fontFamily": "A String", # The font family.
23153 "fontSize": 42, # The size of the font.
23154 "italic": True or False, # True if the text is italicized.
23155 "underline": True or False, # True if the text is underlined.
23156 },
23157 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
23158 "borders": { # The borders of the cell. # The borders of the cell.
23159 "top": { # A border along a cell. # The top border of the cell.
23160 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23161 # for simplicity of conversion to/from color representations in various
23162 # languages over compactness; for example, the fields of this representation
23163 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23164 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23165 # method in iOS; and, with just a little work, it can be easily formatted into
23166 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23167 #
23168 # Example (Java):
23169 #
23170 # import com.google.type.Color;
23171 #
23172 # // ...
23173 # public static java.awt.Color fromProto(Color protocolor) {
23174 # float alpha = protocolor.hasAlpha()
23175 # ? protocolor.getAlpha().getValue()
23176 # : 1.0;
23177 #
23178 # return new java.awt.Color(
23179 # protocolor.getRed(),
23180 # protocolor.getGreen(),
23181 # protocolor.getBlue(),
23182 # alpha);
23183 # }
23184 #
23185 # public static Color toProto(java.awt.Color color) {
23186 # float red = (float) color.getRed();
23187 # float green = (float) color.getGreen();
23188 # float blue = (float) color.getBlue();
23189 # float denominator = 255.0;
23190 # Color.Builder resultBuilder =
23191 # Color
23192 # .newBuilder()
23193 # .setRed(red / denominator)
23194 # .setGreen(green / denominator)
23195 # .setBlue(blue / denominator);
23196 # int alpha = color.getAlpha();
23197 # if (alpha != 255) {
23198 # result.setAlpha(
23199 # FloatValue
23200 # .newBuilder()
23201 # .setValue(((float) alpha) / denominator)
23202 # .build());
23203 # }
23204 # return resultBuilder.build();
23205 # }
23206 # // ...
23207 #
23208 # Example (iOS / Obj-C):
23209 #
23210 # // ...
23211 # static UIColor* fromProto(Color* protocolor) {
23212 # float red = [protocolor red];
23213 # float green = [protocolor green];
23214 # float blue = [protocolor blue];
23215 # FloatValue* alpha_wrapper = [protocolor alpha];
23216 # float alpha = 1.0;
23217 # if (alpha_wrapper != nil) {
23218 # alpha = [alpha_wrapper value];
23219 # }
23220 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23221 # }
23222 #
23223 # static Color* toProto(UIColor* color) {
23224 # CGFloat red, green, blue, alpha;
23225 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23226 # return nil;
23227 # }
23228 # Color* result = [Color alloc] init];
23229 # [result setRed:red];
23230 # [result setGreen:green];
23231 # [result setBlue:blue];
23232 # if (alpha <= 0.9999) {
23233 # [result setAlpha:floatWrapperWithValue(alpha)];
23234 # }
23235 # [result autorelease];
23236 # return result;
23237 # }
23238 # // ...
23239 #
23240 # Example (JavaScript):
23241 #
23242 # // ...
23243 #
23244 # var protoToCssColor = function(rgb_color) {
23245 # var redFrac = rgb_color.red || 0.0;
23246 # var greenFrac = rgb_color.green || 0.0;
23247 # var blueFrac = rgb_color.blue || 0.0;
23248 # var red = Math.floor(redFrac * 255);
23249 # var green = Math.floor(greenFrac * 255);
23250 # var blue = Math.floor(blueFrac * 255);
23251 #
23252 # if (!('alpha' in rgb_color)) {
23253 # return rgbToCssColor_(red, green, blue);
23254 # }
23255 #
23256 # var alphaFrac = rgb_color.alpha.value || 0.0;
23257 # var rgbParams = [red, green, blue].join(',');
23258 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23259 # };
23260 #
23261 # var rgbToCssColor_ = function(red, green, blue) {
23262 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23263 # var hexString = rgbNumber.toString(16);
23264 # var missingZeros = 6 - hexString.length;
23265 # var resultBuilder = ['#'];
23266 # for (var i = 0; i < missingZeros; i++) {
23267 # resultBuilder.push('0');
23268 # }
23269 # resultBuilder.push(hexString);
23270 # return resultBuilder.join('');
23271 # };
23272 #
23273 # // ...
23274 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23275 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23276 # the final pixel color is defined by the equation:
23277 #
23278 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23279 #
23280 # This means that a value of 1.0 corresponds to a solid color, whereas
23281 # a value of 0.0 corresponds to a completely transparent color. This
23282 # uses a wrapper message rather than a simple float scalar so that it is
23283 # possible to distinguish between a default value and the value being unset.
23284 # If omitted, this color object is to be rendered as a solid color
23285 # (as if the alpha value had been explicitly given with a value of 1.0).
23286 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23287 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23288 },
23289 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070023290 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023291 "style": "A String", # The style of the border.
23292 },
23293 "right": { # A border along a cell. # The right border of the cell.
23294 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23295 # for simplicity of conversion to/from color representations in various
23296 # languages over compactness; for example, the fields of this representation
23297 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23298 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23299 # method in iOS; and, with just a little work, it can be easily formatted into
23300 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23301 #
23302 # Example (Java):
23303 #
23304 # import com.google.type.Color;
23305 #
23306 # // ...
23307 # public static java.awt.Color fromProto(Color protocolor) {
23308 # float alpha = protocolor.hasAlpha()
23309 # ? protocolor.getAlpha().getValue()
23310 # : 1.0;
23311 #
23312 # return new java.awt.Color(
23313 # protocolor.getRed(),
23314 # protocolor.getGreen(),
23315 # protocolor.getBlue(),
23316 # alpha);
23317 # }
23318 #
23319 # public static Color toProto(java.awt.Color color) {
23320 # float red = (float) color.getRed();
23321 # float green = (float) color.getGreen();
23322 # float blue = (float) color.getBlue();
23323 # float denominator = 255.0;
23324 # Color.Builder resultBuilder =
23325 # Color
23326 # .newBuilder()
23327 # .setRed(red / denominator)
23328 # .setGreen(green / denominator)
23329 # .setBlue(blue / denominator);
23330 # int alpha = color.getAlpha();
23331 # if (alpha != 255) {
23332 # result.setAlpha(
23333 # FloatValue
23334 # .newBuilder()
23335 # .setValue(((float) alpha) / denominator)
23336 # .build());
23337 # }
23338 # return resultBuilder.build();
23339 # }
23340 # // ...
23341 #
23342 # Example (iOS / Obj-C):
23343 #
23344 # // ...
23345 # static UIColor* fromProto(Color* protocolor) {
23346 # float red = [protocolor red];
23347 # float green = [protocolor green];
23348 # float blue = [protocolor blue];
23349 # FloatValue* alpha_wrapper = [protocolor alpha];
23350 # float alpha = 1.0;
23351 # if (alpha_wrapper != nil) {
23352 # alpha = [alpha_wrapper value];
23353 # }
23354 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23355 # }
23356 #
23357 # static Color* toProto(UIColor* color) {
23358 # CGFloat red, green, blue, alpha;
23359 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23360 # return nil;
23361 # }
23362 # Color* result = [Color alloc] init];
23363 # [result setRed:red];
23364 # [result setGreen:green];
23365 # [result setBlue:blue];
23366 # if (alpha <= 0.9999) {
23367 # [result setAlpha:floatWrapperWithValue(alpha)];
23368 # }
23369 # [result autorelease];
23370 # return result;
23371 # }
23372 # // ...
23373 #
23374 # Example (JavaScript):
23375 #
23376 # // ...
23377 #
23378 # var protoToCssColor = function(rgb_color) {
23379 # var redFrac = rgb_color.red || 0.0;
23380 # var greenFrac = rgb_color.green || 0.0;
23381 # var blueFrac = rgb_color.blue || 0.0;
23382 # var red = Math.floor(redFrac * 255);
23383 # var green = Math.floor(greenFrac * 255);
23384 # var blue = Math.floor(blueFrac * 255);
23385 #
23386 # if (!('alpha' in rgb_color)) {
23387 # return rgbToCssColor_(red, green, blue);
23388 # }
23389 #
23390 # var alphaFrac = rgb_color.alpha.value || 0.0;
23391 # var rgbParams = [red, green, blue].join(',');
23392 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23393 # };
23394 #
23395 # var rgbToCssColor_ = function(red, green, blue) {
23396 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23397 # var hexString = rgbNumber.toString(16);
23398 # var missingZeros = 6 - hexString.length;
23399 # var resultBuilder = ['#'];
23400 # for (var i = 0; i < missingZeros; i++) {
23401 # resultBuilder.push('0');
23402 # }
23403 # resultBuilder.push(hexString);
23404 # return resultBuilder.join('');
23405 # };
23406 #
23407 # // ...
23408 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23409 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23410 # the final pixel color is defined by the equation:
23411 #
23412 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23413 #
23414 # This means that a value of 1.0 corresponds to a solid color, whereas
23415 # a value of 0.0 corresponds to a completely transparent color. This
23416 # uses a wrapper message rather than a simple float scalar so that it is
23417 # possible to distinguish between a default value and the value being unset.
23418 # If omitted, this color object is to be rendered as a solid color
23419 # (as if the alpha value had been explicitly given with a value of 1.0).
23420 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23421 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23422 },
23423 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070023424 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023425 "style": "A String", # The style of the border.
23426 },
23427 "bottom": { # A border along a cell. # The bottom border of the cell.
23428 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23429 # for simplicity of conversion to/from color representations in various
23430 # languages over compactness; for example, the fields of this representation
23431 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23432 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23433 # method in iOS; and, with just a little work, it can be easily formatted into
23434 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23435 #
23436 # Example (Java):
23437 #
23438 # import com.google.type.Color;
23439 #
23440 # // ...
23441 # public static java.awt.Color fromProto(Color protocolor) {
23442 # float alpha = protocolor.hasAlpha()
23443 # ? protocolor.getAlpha().getValue()
23444 # : 1.0;
23445 #
23446 # return new java.awt.Color(
23447 # protocolor.getRed(),
23448 # protocolor.getGreen(),
23449 # protocolor.getBlue(),
23450 # alpha);
23451 # }
23452 #
23453 # public static Color toProto(java.awt.Color color) {
23454 # float red = (float) color.getRed();
23455 # float green = (float) color.getGreen();
23456 # float blue = (float) color.getBlue();
23457 # float denominator = 255.0;
23458 # Color.Builder resultBuilder =
23459 # Color
23460 # .newBuilder()
23461 # .setRed(red / denominator)
23462 # .setGreen(green / denominator)
23463 # .setBlue(blue / denominator);
23464 # int alpha = color.getAlpha();
23465 # if (alpha != 255) {
23466 # result.setAlpha(
23467 # FloatValue
23468 # .newBuilder()
23469 # .setValue(((float) alpha) / denominator)
23470 # .build());
23471 # }
23472 # return resultBuilder.build();
23473 # }
23474 # // ...
23475 #
23476 # Example (iOS / Obj-C):
23477 #
23478 # // ...
23479 # static UIColor* fromProto(Color* protocolor) {
23480 # float red = [protocolor red];
23481 # float green = [protocolor green];
23482 # float blue = [protocolor blue];
23483 # FloatValue* alpha_wrapper = [protocolor alpha];
23484 # float alpha = 1.0;
23485 # if (alpha_wrapper != nil) {
23486 # alpha = [alpha_wrapper value];
23487 # }
23488 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23489 # }
23490 #
23491 # static Color* toProto(UIColor* color) {
23492 # CGFloat red, green, blue, alpha;
23493 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23494 # return nil;
23495 # }
23496 # Color* result = [Color alloc] init];
23497 # [result setRed:red];
23498 # [result setGreen:green];
23499 # [result setBlue:blue];
23500 # if (alpha <= 0.9999) {
23501 # [result setAlpha:floatWrapperWithValue(alpha)];
23502 # }
23503 # [result autorelease];
23504 # return result;
23505 # }
23506 # // ...
23507 #
23508 # Example (JavaScript):
23509 #
23510 # // ...
23511 #
23512 # var protoToCssColor = function(rgb_color) {
23513 # var redFrac = rgb_color.red || 0.0;
23514 # var greenFrac = rgb_color.green || 0.0;
23515 # var blueFrac = rgb_color.blue || 0.0;
23516 # var red = Math.floor(redFrac * 255);
23517 # var green = Math.floor(greenFrac * 255);
23518 # var blue = Math.floor(blueFrac * 255);
23519 #
23520 # if (!('alpha' in rgb_color)) {
23521 # return rgbToCssColor_(red, green, blue);
23522 # }
23523 #
23524 # var alphaFrac = rgb_color.alpha.value || 0.0;
23525 # var rgbParams = [red, green, blue].join(',');
23526 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23527 # };
23528 #
23529 # var rgbToCssColor_ = function(red, green, blue) {
23530 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23531 # var hexString = rgbNumber.toString(16);
23532 # var missingZeros = 6 - hexString.length;
23533 # var resultBuilder = ['#'];
23534 # for (var i = 0; i < missingZeros; i++) {
23535 # resultBuilder.push('0');
23536 # }
23537 # resultBuilder.push(hexString);
23538 # return resultBuilder.join('');
23539 # };
23540 #
23541 # // ...
23542 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23543 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23544 # the final pixel color is defined by the equation:
23545 #
23546 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23547 #
23548 # This means that a value of 1.0 corresponds to a solid color, whereas
23549 # a value of 0.0 corresponds to a completely transparent color. This
23550 # uses a wrapper message rather than a simple float scalar so that it is
23551 # possible to distinguish between a default value and the value being unset.
23552 # If omitted, this color object is to be rendered as a solid color
23553 # (as if the alpha value had been explicitly given with a value of 1.0).
23554 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23555 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23556 },
23557 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070023558 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023559 "style": "A String", # The style of the border.
23560 },
23561 "left": { # A border along a cell. # The left border of the cell.
23562 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23563 # for simplicity of conversion to/from color representations in various
23564 # languages over compactness; for example, the fields of this representation
23565 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23566 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23567 # method in iOS; and, with just a little work, it can be easily formatted into
23568 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23569 #
23570 # Example (Java):
23571 #
23572 # import com.google.type.Color;
23573 #
23574 # // ...
23575 # public static java.awt.Color fromProto(Color protocolor) {
23576 # float alpha = protocolor.hasAlpha()
23577 # ? protocolor.getAlpha().getValue()
23578 # : 1.0;
23579 #
23580 # return new java.awt.Color(
23581 # protocolor.getRed(),
23582 # protocolor.getGreen(),
23583 # protocolor.getBlue(),
23584 # alpha);
23585 # }
23586 #
23587 # public static Color toProto(java.awt.Color color) {
23588 # float red = (float) color.getRed();
23589 # float green = (float) color.getGreen();
23590 # float blue = (float) color.getBlue();
23591 # float denominator = 255.0;
23592 # Color.Builder resultBuilder =
23593 # Color
23594 # .newBuilder()
23595 # .setRed(red / denominator)
23596 # .setGreen(green / denominator)
23597 # .setBlue(blue / denominator);
23598 # int alpha = color.getAlpha();
23599 # if (alpha != 255) {
23600 # result.setAlpha(
23601 # FloatValue
23602 # .newBuilder()
23603 # .setValue(((float) alpha) / denominator)
23604 # .build());
23605 # }
23606 # return resultBuilder.build();
23607 # }
23608 # // ...
23609 #
23610 # Example (iOS / Obj-C):
23611 #
23612 # // ...
23613 # static UIColor* fromProto(Color* protocolor) {
23614 # float red = [protocolor red];
23615 # float green = [protocolor green];
23616 # float blue = [protocolor blue];
23617 # FloatValue* alpha_wrapper = [protocolor alpha];
23618 # float alpha = 1.0;
23619 # if (alpha_wrapper != nil) {
23620 # alpha = [alpha_wrapper value];
23621 # }
23622 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23623 # }
23624 #
23625 # static Color* toProto(UIColor* color) {
23626 # CGFloat red, green, blue, alpha;
23627 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23628 # return nil;
23629 # }
23630 # Color* result = [Color alloc] init];
23631 # [result setRed:red];
23632 # [result setGreen:green];
23633 # [result setBlue:blue];
23634 # if (alpha <= 0.9999) {
23635 # [result setAlpha:floatWrapperWithValue(alpha)];
23636 # }
23637 # [result autorelease];
23638 # return result;
23639 # }
23640 # // ...
23641 #
23642 # Example (JavaScript):
23643 #
23644 # // ...
23645 #
23646 # var protoToCssColor = function(rgb_color) {
23647 # var redFrac = rgb_color.red || 0.0;
23648 # var greenFrac = rgb_color.green || 0.0;
23649 # var blueFrac = rgb_color.blue || 0.0;
23650 # var red = Math.floor(redFrac * 255);
23651 # var green = Math.floor(greenFrac * 255);
23652 # var blue = Math.floor(blueFrac * 255);
23653 #
23654 # if (!('alpha' in rgb_color)) {
23655 # return rgbToCssColor_(red, green, blue);
23656 # }
23657 #
23658 # var alphaFrac = rgb_color.alpha.value || 0.0;
23659 # var rgbParams = [red, green, blue].join(',');
23660 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23661 # };
23662 #
23663 # var rgbToCssColor_ = function(red, green, blue) {
23664 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23665 # var hexString = rgbNumber.toString(16);
23666 # var missingZeros = 6 - hexString.length;
23667 # var resultBuilder = ['#'];
23668 # for (var i = 0; i < missingZeros; i++) {
23669 # resultBuilder.push('0');
23670 # }
23671 # resultBuilder.push(hexString);
23672 # return resultBuilder.join('');
23673 # };
23674 #
23675 # // ...
23676 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23677 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23678 # the final pixel color is defined by the equation:
23679 #
23680 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23681 #
23682 # This means that a value of 1.0 corresponds to a solid color, whereas
23683 # a value of 0.0 corresponds to a completely transparent color. This
23684 # uses a wrapper message rather than a simple float scalar so that it is
23685 # possible to distinguish between a default value and the value being unset.
23686 # If omitted, this color object is to be rendered as a solid color
23687 # (as if the alpha value had been explicitly given with a value of 1.0).
23688 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23689 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23690 },
23691 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070023692 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023693 "style": "A String", # The style of the border.
23694 },
23695 },
23696 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
23697 },
23698 },
23699 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
23700 # the interpolation points listed. The format of a cell will vary
23701 # based on its contents as compared to the values of the interpolation
23702 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023703 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023704 # These pin the gradient color scale according to the color,
23705 # type and value chosen.
23706 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
23707 # for simplicity of conversion to/from color representations in various
23708 # languages over compactness; for example, the fields of this representation
23709 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23710 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23711 # method in iOS; and, with just a little work, it can be easily formatted into
23712 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23713 #
23714 # Example (Java):
23715 #
23716 # import com.google.type.Color;
23717 #
23718 # // ...
23719 # public static java.awt.Color fromProto(Color protocolor) {
23720 # float alpha = protocolor.hasAlpha()
23721 # ? protocolor.getAlpha().getValue()
23722 # : 1.0;
23723 #
23724 # return new java.awt.Color(
23725 # protocolor.getRed(),
23726 # protocolor.getGreen(),
23727 # protocolor.getBlue(),
23728 # alpha);
23729 # }
23730 #
23731 # public static Color toProto(java.awt.Color color) {
23732 # float red = (float) color.getRed();
23733 # float green = (float) color.getGreen();
23734 # float blue = (float) color.getBlue();
23735 # float denominator = 255.0;
23736 # Color.Builder resultBuilder =
23737 # Color
23738 # .newBuilder()
23739 # .setRed(red / denominator)
23740 # .setGreen(green / denominator)
23741 # .setBlue(blue / denominator);
23742 # int alpha = color.getAlpha();
23743 # if (alpha != 255) {
23744 # result.setAlpha(
23745 # FloatValue
23746 # .newBuilder()
23747 # .setValue(((float) alpha) / denominator)
23748 # .build());
23749 # }
23750 # return resultBuilder.build();
23751 # }
23752 # // ...
23753 #
23754 # Example (iOS / Obj-C):
23755 #
23756 # // ...
23757 # static UIColor* fromProto(Color* protocolor) {
23758 # float red = [protocolor red];
23759 # float green = [protocolor green];
23760 # float blue = [protocolor blue];
23761 # FloatValue* alpha_wrapper = [protocolor alpha];
23762 # float alpha = 1.0;
23763 # if (alpha_wrapper != nil) {
23764 # alpha = [alpha_wrapper value];
23765 # }
23766 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23767 # }
23768 #
23769 # static Color* toProto(UIColor* color) {
23770 # CGFloat red, green, blue, alpha;
23771 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23772 # return nil;
23773 # }
23774 # Color* result = [Color alloc] init];
23775 # [result setRed:red];
23776 # [result setGreen:green];
23777 # [result setBlue:blue];
23778 # if (alpha <= 0.9999) {
23779 # [result setAlpha:floatWrapperWithValue(alpha)];
23780 # }
23781 # [result autorelease];
23782 # return result;
23783 # }
23784 # // ...
23785 #
23786 # Example (JavaScript):
23787 #
23788 # // ...
23789 #
23790 # var protoToCssColor = function(rgb_color) {
23791 # var redFrac = rgb_color.red || 0.0;
23792 # var greenFrac = rgb_color.green || 0.0;
23793 # var blueFrac = rgb_color.blue || 0.0;
23794 # var red = Math.floor(redFrac * 255);
23795 # var green = Math.floor(greenFrac * 255);
23796 # var blue = Math.floor(blueFrac * 255);
23797 #
23798 # if (!('alpha' in rgb_color)) {
23799 # return rgbToCssColor_(red, green, blue);
23800 # }
23801 #
23802 # var alphaFrac = rgb_color.alpha.value || 0.0;
23803 # var rgbParams = [red, green, blue].join(',');
23804 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23805 # };
23806 #
23807 # var rgbToCssColor_ = function(red, green, blue) {
23808 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23809 # var hexString = rgbNumber.toString(16);
23810 # var missingZeros = 6 - hexString.length;
23811 # var resultBuilder = ['#'];
23812 # for (var i = 0; i < missingZeros; i++) {
23813 # resultBuilder.push('0');
23814 # }
23815 # resultBuilder.push(hexString);
23816 # return resultBuilder.join('');
23817 # };
23818 #
23819 # // ...
23820 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23821 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23822 # the final pixel color is defined by the equation:
23823 #
23824 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23825 #
23826 # This means that a value of 1.0 corresponds to a solid color, whereas
23827 # a value of 0.0 corresponds to a completely transparent color. This
23828 # uses a wrapper message rather than a simple float scalar so that it is
23829 # possible to distinguish between a default value and the value being unset.
23830 # If omitted, this color object is to be rendered as a solid color
23831 # (as if the alpha value had been explicitly given with a value of 1.0).
23832 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23833 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23834 },
23835 "type": "A String", # How the value should be interpreted.
23836 "value": "A String", # The value this interpolation point uses. May be a formula.
23837 # Unused if type is MIN or
23838 # MAX.
23839 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023840 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023841 # These pin the gradient color scale according to the color,
23842 # type and value chosen.
23843 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
23844 # for simplicity of conversion to/from color representations in various
23845 # languages over compactness; for example, the fields of this representation
23846 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23847 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23848 # method in iOS; and, with just a little work, it can be easily formatted into
23849 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23850 #
23851 # Example (Java):
23852 #
23853 # import com.google.type.Color;
23854 #
23855 # // ...
23856 # public static java.awt.Color fromProto(Color protocolor) {
23857 # float alpha = protocolor.hasAlpha()
23858 # ? protocolor.getAlpha().getValue()
23859 # : 1.0;
23860 #
23861 # return new java.awt.Color(
23862 # protocolor.getRed(),
23863 # protocolor.getGreen(),
23864 # protocolor.getBlue(),
23865 # alpha);
23866 # }
23867 #
23868 # public static Color toProto(java.awt.Color color) {
23869 # float red = (float) color.getRed();
23870 # float green = (float) color.getGreen();
23871 # float blue = (float) color.getBlue();
23872 # float denominator = 255.0;
23873 # Color.Builder resultBuilder =
23874 # Color
23875 # .newBuilder()
23876 # .setRed(red / denominator)
23877 # .setGreen(green / denominator)
23878 # .setBlue(blue / denominator);
23879 # int alpha = color.getAlpha();
23880 # if (alpha != 255) {
23881 # result.setAlpha(
23882 # FloatValue
23883 # .newBuilder()
23884 # .setValue(((float) alpha) / denominator)
23885 # .build());
23886 # }
23887 # return resultBuilder.build();
23888 # }
23889 # // ...
23890 #
23891 # Example (iOS / Obj-C):
23892 #
23893 # // ...
23894 # static UIColor* fromProto(Color* protocolor) {
23895 # float red = [protocolor red];
23896 # float green = [protocolor green];
23897 # float blue = [protocolor blue];
23898 # FloatValue* alpha_wrapper = [protocolor alpha];
23899 # float alpha = 1.0;
23900 # if (alpha_wrapper != nil) {
23901 # alpha = [alpha_wrapper value];
23902 # }
23903 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23904 # }
23905 #
23906 # static Color* toProto(UIColor* color) {
23907 # CGFloat red, green, blue, alpha;
23908 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23909 # return nil;
23910 # }
23911 # Color* result = [Color alloc] init];
23912 # [result setRed:red];
23913 # [result setGreen:green];
23914 # [result setBlue:blue];
23915 # if (alpha <= 0.9999) {
23916 # [result setAlpha:floatWrapperWithValue(alpha)];
23917 # }
23918 # [result autorelease];
23919 # return result;
23920 # }
23921 # // ...
23922 #
23923 # Example (JavaScript):
23924 #
23925 # // ...
23926 #
23927 # var protoToCssColor = function(rgb_color) {
23928 # var redFrac = rgb_color.red || 0.0;
23929 # var greenFrac = rgb_color.green || 0.0;
23930 # var blueFrac = rgb_color.blue || 0.0;
23931 # var red = Math.floor(redFrac * 255);
23932 # var green = Math.floor(greenFrac * 255);
23933 # var blue = Math.floor(blueFrac * 255);
23934 #
23935 # if (!('alpha' in rgb_color)) {
23936 # return rgbToCssColor_(red, green, blue);
23937 # }
23938 #
23939 # var alphaFrac = rgb_color.alpha.value || 0.0;
23940 # var rgbParams = [red, green, blue].join(',');
23941 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23942 # };
23943 #
23944 # var rgbToCssColor_ = function(red, green, blue) {
23945 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23946 # var hexString = rgbNumber.toString(16);
23947 # var missingZeros = 6 - hexString.length;
23948 # var resultBuilder = ['#'];
23949 # for (var i = 0; i < missingZeros; i++) {
23950 # resultBuilder.push('0');
23951 # }
23952 # resultBuilder.push(hexString);
23953 # return resultBuilder.join('');
23954 # };
23955 #
23956 # // ...
23957 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23958 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23959 # the final pixel color is defined by the equation:
23960 #
23961 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23962 #
23963 # This means that a value of 1.0 corresponds to a solid color, whereas
23964 # a value of 0.0 corresponds to a completely transparent color. This
23965 # uses a wrapper message rather than a simple float scalar so that it is
23966 # possible to distinguish between a default value and the value being unset.
23967 # If omitted, this color object is to be rendered as a solid color
23968 # (as if the alpha value had been explicitly given with a value of 1.0).
23969 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23970 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23971 },
23972 "type": "A String", # How the value should be interpreted.
23973 "value": "A String", # The value this interpolation point uses. May be a formula.
23974 # Unused if type is MIN or
23975 # MAX.
23976 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023977 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023978 # These pin the gradient color scale according to the color,
23979 # type and value chosen.
23980 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
23981 # for simplicity of conversion to/from color representations in various
23982 # languages over compactness; for example, the fields of this representation
23983 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23984 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23985 # method in iOS; and, with just a little work, it can be easily formatted into
23986 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23987 #
23988 # Example (Java):
23989 #
23990 # import com.google.type.Color;
23991 #
23992 # // ...
23993 # public static java.awt.Color fromProto(Color protocolor) {
23994 # float alpha = protocolor.hasAlpha()
23995 # ? protocolor.getAlpha().getValue()
23996 # : 1.0;
23997 #
23998 # return new java.awt.Color(
23999 # protocolor.getRed(),
24000 # protocolor.getGreen(),
24001 # protocolor.getBlue(),
24002 # alpha);
24003 # }
24004 #
24005 # public static Color toProto(java.awt.Color color) {
24006 # float red = (float) color.getRed();
24007 # float green = (float) color.getGreen();
24008 # float blue = (float) color.getBlue();
24009 # float denominator = 255.0;
24010 # Color.Builder resultBuilder =
24011 # Color
24012 # .newBuilder()
24013 # .setRed(red / denominator)
24014 # .setGreen(green / denominator)
24015 # .setBlue(blue / denominator);
24016 # int alpha = color.getAlpha();
24017 # if (alpha != 255) {
24018 # result.setAlpha(
24019 # FloatValue
24020 # .newBuilder()
24021 # .setValue(((float) alpha) / denominator)
24022 # .build());
24023 # }
24024 # return resultBuilder.build();
24025 # }
24026 # // ...
24027 #
24028 # Example (iOS / Obj-C):
24029 #
24030 # // ...
24031 # static UIColor* fromProto(Color* protocolor) {
24032 # float red = [protocolor red];
24033 # float green = [protocolor green];
24034 # float blue = [protocolor blue];
24035 # FloatValue* alpha_wrapper = [protocolor alpha];
24036 # float alpha = 1.0;
24037 # if (alpha_wrapper != nil) {
24038 # alpha = [alpha_wrapper value];
24039 # }
24040 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24041 # }
24042 #
24043 # static Color* toProto(UIColor* color) {
24044 # CGFloat red, green, blue, alpha;
24045 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24046 # return nil;
24047 # }
24048 # Color* result = [Color alloc] init];
24049 # [result setRed:red];
24050 # [result setGreen:green];
24051 # [result setBlue:blue];
24052 # if (alpha <= 0.9999) {
24053 # [result setAlpha:floatWrapperWithValue(alpha)];
24054 # }
24055 # [result autorelease];
24056 # return result;
24057 # }
24058 # // ...
24059 #
24060 # Example (JavaScript):
24061 #
24062 # // ...
24063 #
24064 # var protoToCssColor = function(rgb_color) {
24065 # var redFrac = rgb_color.red || 0.0;
24066 # var greenFrac = rgb_color.green || 0.0;
24067 # var blueFrac = rgb_color.blue || 0.0;
24068 # var red = Math.floor(redFrac * 255);
24069 # var green = Math.floor(greenFrac * 255);
24070 # var blue = Math.floor(blueFrac * 255);
24071 #
24072 # if (!('alpha' in rgb_color)) {
24073 # return rgbToCssColor_(red, green, blue);
24074 # }
24075 #
24076 # var alphaFrac = rgb_color.alpha.value || 0.0;
24077 # var rgbParams = [red, green, blue].join(',');
24078 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24079 # };
24080 #
24081 # var rgbToCssColor_ = function(red, green, blue) {
24082 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24083 # var hexString = rgbNumber.toString(16);
24084 # var missingZeros = 6 - hexString.length;
24085 # var resultBuilder = ['#'];
24086 # for (var i = 0; i < missingZeros; i++) {
24087 # resultBuilder.push('0');
24088 # }
24089 # resultBuilder.push(hexString);
24090 # return resultBuilder.join('');
24091 # };
24092 #
24093 # // ...
24094 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24095 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24096 # the final pixel color is defined by the equation:
24097 #
24098 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24099 #
24100 # This means that a value of 1.0 corresponds to a solid color, whereas
24101 # a value of 0.0 corresponds to a completely transparent color. This
24102 # uses a wrapper message rather than a simple float scalar so that it is
24103 # possible to distinguish between a default value and the value being unset.
24104 # If omitted, this color object is to be rendered as a solid color
24105 # (as if the alpha value had been explicitly given with a value of 1.0).
24106 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24107 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24108 },
24109 "type": "A String", # How the value should be interpreted.
24110 "value": "A String", # The value this interpolation point uses. May be a formula.
24111 # Unused if type is MIN or
24112 # MAX.
24113 },
24114 },
24115 },
24116 "newRule": { # A rule describing a conditional format. # The new rule that replaced the old rule (if replacing),
24117 # or the rule that was moved (if moved)
24118 "ranges": [ # The ranges that will be formatted if the condition is true.
24119 # All the ranges must be on the same grid.
24120 { # A range on a sheet.
24121 # All indexes are zero-based.
24122 # Indexes are half open, e.g the start index is inclusive
24123 # and the end index is exclusive -- [start_index, end_index).
24124 # Missing indexes indicate the range is unbounded on that side.
24125 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024126 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024127 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024128 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024129 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024130 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024131 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024132 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024133 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024134 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024135 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024136 # `Sheet1!A:B == sheet_id: 0,
24137 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024138 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024139 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024140 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024141 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024142 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024143 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024144 #
24145 # The start index must always be less than or equal to the end index.
24146 # If the start index equals the end index, then the range is empty.
24147 # Empty ranges are typically not meaningful and are usually rendered in the
24148 # UI as `#REF!`.
24149 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
24150 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
24151 "sheetId": 42, # The sheet this range is on.
24152 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
24153 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
24154 },
24155 ],
24156 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
24157 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
24158 # the format will be applied.
24159 # BooleanConditions are used by conditional formatting,
24160 # data validation, and the criteria in filters.
24161 "type": "A String", # The type of condition.
24162 "values": [ # The values of the condition. The number of supported values depends
24163 # on the condition type. Some support zero values,
24164 # others one or two values,
24165 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
24166 { # The value of the condition.
24167 "relativeDate": "A String", # A relative date (based on the current date).
24168 # Valid only if the type is
24169 # DATE_BEFORE,
24170 # DATE_AFTER,
24171 # DATE_ON_OR_BEFORE or
24172 # DATE_ON_OR_AFTER.
24173 #
24174 # Relative dates are not supported in data validation.
24175 # They are supported only in conditional formatting and
24176 # conditional filters.
24177 "userEnteredValue": "A String", # A value the condition is based on.
24178 # The value will be parsed as if the user typed into a cell.
24179 # Formulas are supported (and must begin with an `=`).
24180 },
24181 ],
24182 },
24183 "format": { # The format of a cell. # The format to apply.
24184 # Conditional formatting can only apply a subset of formatting:
24185 # bold, italic,
24186 # strikethrough,
24187 # foreground color &
24188 # background color.
24189 "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 -070024190 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
24191 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070024192 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
24193 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024194 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024195 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024196 },
24197 "textDirection": "A String", # The direction of the text in the cell.
24198 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
24199 # When updating padding, every field must be specified.
24200 "top": 42, # The top padding of the cell.
24201 "right": 42, # The right padding of the cell.
24202 "bottom": 42, # The bottom padding of the cell.
24203 "left": 42, # The left padding of the cell.
24204 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024205 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024206 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
24207 # for simplicity of conversion to/from color representations in various
24208 # languages over compactness; for example, the fields of this representation
24209 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24210 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24211 # method in iOS; and, with just a little work, it can be easily formatted into
24212 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24213 #
24214 # Example (Java):
24215 #
24216 # import com.google.type.Color;
24217 #
24218 # // ...
24219 # public static java.awt.Color fromProto(Color protocolor) {
24220 # float alpha = protocolor.hasAlpha()
24221 # ? protocolor.getAlpha().getValue()
24222 # : 1.0;
24223 #
24224 # return new java.awt.Color(
24225 # protocolor.getRed(),
24226 # protocolor.getGreen(),
24227 # protocolor.getBlue(),
24228 # alpha);
24229 # }
24230 #
24231 # public static Color toProto(java.awt.Color color) {
24232 # float red = (float) color.getRed();
24233 # float green = (float) color.getGreen();
24234 # float blue = (float) color.getBlue();
24235 # float denominator = 255.0;
24236 # Color.Builder resultBuilder =
24237 # Color
24238 # .newBuilder()
24239 # .setRed(red / denominator)
24240 # .setGreen(green / denominator)
24241 # .setBlue(blue / denominator);
24242 # int alpha = color.getAlpha();
24243 # if (alpha != 255) {
24244 # result.setAlpha(
24245 # FloatValue
24246 # .newBuilder()
24247 # .setValue(((float) alpha) / denominator)
24248 # .build());
24249 # }
24250 # return resultBuilder.build();
24251 # }
24252 # // ...
24253 #
24254 # Example (iOS / Obj-C):
24255 #
24256 # // ...
24257 # static UIColor* fromProto(Color* protocolor) {
24258 # float red = [protocolor red];
24259 # float green = [protocolor green];
24260 # float blue = [protocolor blue];
24261 # FloatValue* alpha_wrapper = [protocolor alpha];
24262 # float alpha = 1.0;
24263 # if (alpha_wrapper != nil) {
24264 # alpha = [alpha_wrapper value];
24265 # }
24266 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24267 # }
24268 #
24269 # static Color* toProto(UIColor* color) {
24270 # CGFloat red, green, blue, alpha;
24271 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24272 # return nil;
24273 # }
24274 # Color* result = [Color alloc] init];
24275 # [result setRed:red];
24276 # [result setGreen:green];
24277 # [result setBlue:blue];
24278 # if (alpha <= 0.9999) {
24279 # [result setAlpha:floatWrapperWithValue(alpha)];
24280 # }
24281 # [result autorelease];
24282 # return result;
24283 # }
24284 # // ...
24285 #
24286 # Example (JavaScript):
24287 #
24288 # // ...
24289 #
24290 # var protoToCssColor = function(rgb_color) {
24291 # var redFrac = rgb_color.red || 0.0;
24292 # var greenFrac = rgb_color.green || 0.0;
24293 # var blueFrac = rgb_color.blue || 0.0;
24294 # var red = Math.floor(redFrac * 255);
24295 # var green = Math.floor(greenFrac * 255);
24296 # var blue = Math.floor(blueFrac * 255);
24297 #
24298 # if (!('alpha' in rgb_color)) {
24299 # return rgbToCssColor_(red, green, blue);
24300 # }
24301 #
24302 # var alphaFrac = rgb_color.alpha.value || 0.0;
24303 # var rgbParams = [red, green, blue].join(',');
24304 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24305 # };
24306 #
24307 # var rgbToCssColor_ = function(red, green, blue) {
24308 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24309 # var hexString = rgbNumber.toString(16);
24310 # var missingZeros = 6 - hexString.length;
24311 # var resultBuilder = ['#'];
24312 # for (var i = 0; i < missingZeros; i++) {
24313 # resultBuilder.push('0');
24314 # }
24315 # resultBuilder.push(hexString);
24316 # return resultBuilder.join('');
24317 # };
24318 #
24319 # // ...
24320 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24321 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24322 # the final pixel color is defined by the equation:
24323 #
24324 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24325 #
24326 # This means that a value of 1.0 corresponds to a solid color, whereas
24327 # a value of 0.0 corresponds to a completely transparent color. This
24328 # uses a wrapper message rather than a simple float scalar so that it is
24329 # possible to distinguish between a default value and the value being unset.
24330 # If omitted, this color object is to be rendered as a solid color
24331 # (as if the alpha value had been explicitly given with a value of 1.0).
24332 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24333 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24334 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024335 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024336 "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).
24337 # Absent values indicate that the field isn't specified.
24338 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
24339 # for simplicity of conversion to/from color representations in various
24340 # languages over compactness; for example, the fields of this representation
24341 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24342 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24343 # method in iOS; and, with just a little work, it can be easily formatted into
24344 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24345 #
24346 # Example (Java):
24347 #
24348 # import com.google.type.Color;
24349 #
24350 # // ...
24351 # public static java.awt.Color fromProto(Color protocolor) {
24352 # float alpha = protocolor.hasAlpha()
24353 # ? protocolor.getAlpha().getValue()
24354 # : 1.0;
24355 #
24356 # return new java.awt.Color(
24357 # protocolor.getRed(),
24358 # protocolor.getGreen(),
24359 # protocolor.getBlue(),
24360 # alpha);
24361 # }
24362 #
24363 # public static Color toProto(java.awt.Color color) {
24364 # float red = (float) color.getRed();
24365 # float green = (float) color.getGreen();
24366 # float blue = (float) color.getBlue();
24367 # float denominator = 255.0;
24368 # Color.Builder resultBuilder =
24369 # Color
24370 # .newBuilder()
24371 # .setRed(red / denominator)
24372 # .setGreen(green / denominator)
24373 # .setBlue(blue / denominator);
24374 # int alpha = color.getAlpha();
24375 # if (alpha != 255) {
24376 # result.setAlpha(
24377 # FloatValue
24378 # .newBuilder()
24379 # .setValue(((float) alpha) / denominator)
24380 # .build());
24381 # }
24382 # return resultBuilder.build();
24383 # }
24384 # // ...
24385 #
24386 # Example (iOS / Obj-C):
24387 #
24388 # // ...
24389 # static UIColor* fromProto(Color* protocolor) {
24390 # float red = [protocolor red];
24391 # float green = [protocolor green];
24392 # float blue = [protocolor blue];
24393 # FloatValue* alpha_wrapper = [protocolor alpha];
24394 # float alpha = 1.0;
24395 # if (alpha_wrapper != nil) {
24396 # alpha = [alpha_wrapper value];
24397 # }
24398 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24399 # }
24400 #
24401 # static Color* toProto(UIColor* color) {
24402 # CGFloat red, green, blue, alpha;
24403 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24404 # return nil;
24405 # }
24406 # Color* result = [Color alloc] init];
24407 # [result setRed:red];
24408 # [result setGreen:green];
24409 # [result setBlue:blue];
24410 # if (alpha <= 0.9999) {
24411 # [result setAlpha:floatWrapperWithValue(alpha)];
24412 # }
24413 # [result autorelease];
24414 # return result;
24415 # }
24416 # // ...
24417 #
24418 # Example (JavaScript):
24419 #
24420 # // ...
24421 #
24422 # var protoToCssColor = function(rgb_color) {
24423 # var redFrac = rgb_color.red || 0.0;
24424 # var greenFrac = rgb_color.green || 0.0;
24425 # var blueFrac = rgb_color.blue || 0.0;
24426 # var red = Math.floor(redFrac * 255);
24427 # var green = Math.floor(greenFrac * 255);
24428 # var blue = Math.floor(blueFrac * 255);
24429 #
24430 # if (!('alpha' in rgb_color)) {
24431 # return rgbToCssColor_(red, green, blue);
24432 # }
24433 #
24434 # var alphaFrac = rgb_color.alpha.value || 0.0;
24435 # var rgbParams = [red, green, blue].join(',');
24436 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24437 # };
24438 #
24439 # var rgbToCssColor_ = function(red, green, blue) {
24440 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24441 # var hexString = rgbNumber.toString(16);
24442 # var missingZeros = 6 - hexString.length;
24443 # var resultBuilder = ['#'];
24444 # for (var i = 0; i < missingZeros; i++) {
24445 # resultBuilder.push('0');
24446 # }
24447 # resultBuilder.push(hexString);
24448 # return resultBuilder.join('');
24449 # };
24450 #
24451 # // ...
24452 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24453 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24454 # the final pixel color is defined by the equation:
24455 #
24456 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24457 #
24458 # This means that a value of 1.0 corresponds to a solid color, whereas
24459 # a value of 0.0 corresponds to a completely transparent color. This
24460 # uses a wrapper message rather than a simple float scalar so that it is
24461 # possible to distinguish between a default value and the value being unset.
24462 # If omitted, this color object is to be rendered as a solid color
24463 # (as if the alpha value had been explicitly given with a value of 1.0).
24464 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24465 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24466 },
24467 "bold": True or False, # True if the text is bold.
24468 "strikethrough": True or False, # True if the text has a strikethrough.
24469 "fontFamily": "A String", # The font family.
24470 "fontSize": 42, # The size of the font.
24471 "italic": True or False, # True if the text is italicized.
24472 "underline": True or False, # True if the text is underlined.
24473 },
24474 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
24475 "borders": { # The borders of the cell. # The borders of the cell.
24476 "top": { # A border along a cell. # The top border of the cell.
24477 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
24478 # for simplicity of conversion to/from color representations in various
24479 # languages over compactness; for example, the fields of this representation
24480 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24481 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24482 # method in iOS; and, with just a little work, it can be easily formatted into
24483 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24484 #
24485 # Example (Java):
24486 #
24487 # import com.google.type.Color;
24488 #
24489 # // ...
24490 # public static java.awt.Color fromProto(Color protocolor) {
24491 # float alpha = protocolor.hasAlpha()
24492 # ? protocolor.getAlpha().getValue()
24493 # : 1.0;
24494 #
24495 # return new java.awt.Color(
24496 # protocolor.getRed(),
24497 # protocolor.getGreen(),
24498 # protocolor.getBlue(),
24499 # alpha);
24500 # }
24501 #
24502 # public static Color toProto(java.awt.Color color) {
24503 # float red = (float) color.getRed();
24504 # float green = (float) color.getGreen();
24505 # float blue = (float) color.getBlue();
24506 # float denominator = 255.0;
24507 # Color.Builder resultBuilder =
24508 # Color
24509 # .newBuilder()
24510 # .setRed(red / denominator)
24511 # .setGreen(green / denominator)
24512 # .setBlue(blue / denominator);
24513 # int alpha = color.getAlpha();
24514 # if (alpha != 255) {
24515 # result.setAlpha(
24516 # FloatValue
24517 # .newBuilder()
24518 # .setValue(((float) alpha) / denominator)
24519 # .build());
24520 # }
24521 # return resultBuilder.build();
24522 # }
24523 # // ...
24524 #
24525 # Example (iOS / Obj-C):
24526 #
24527 # // ...
24528 # static UIColor* fromProto(Color* protocolor) {
24529 # float red = [protocolor red];
24530 # float green = [protocolor green];
24531 # float blue = [protocolor blue];
24532 # FloatValue* alpha_wrapper = [protocolor alpha];
24533 # float alpha = 1.0;
24534 # if (alpha_wrapper != nil) {
24535 # alpha = [alpha_wrapper value];
24536 # }
24537 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24538 # }
24539 #
24540 # static Color* toProto(UIColor* color) {
24541 # CGFloat red, green, blue, alpha;
24542 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24543 # return nil;
24544 # }
24545 # Color* result = [Color alloc] init];
24546 # [result setRed:red];
24547 # [result setGreen:green];
24548 # [result setBlue:blue];
24549 # if (alpha <= 0.9999) {
24550 # [result setAlpha:floatWrapperWithValue(alpha)];
24551 # }
24552 # [result autorelease];
24553 # return result;
24554 # }
24555 # // ...
24556 #
24557 # Example (JavaScript):
24558 #
24559 # // ...
24560 #
24561 # var protoToCssColor = function(rgb_color) {
24562 # var redFrac = rgb_color.red || 0.0;
24563 # var greenFrac = rgb_color.green || 0.0;
24564 # var blueFrac = rgb_color.blue || 0.0;
24565 # var red = Math.floor(redFrac * 255);
24566 # var green = Math.floor(greenFrac * 255);
24567 # var blue = Math.floor(blueFrac * 255);
24568 #
24569 # if (!('alpha' in rgb_color)) {
24570 # return rgbToCssColor_(red, green, blue);
24571 # }
24572 #
24573 # var alphaFrac = rgb_color.alpha.value || 0.0;
24574 # var rgbParams = [red, green, blue].join(',');
24575 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24576 # };
24577 #
24578 # var rgbToCssColor_ = function(red, green, blue) {
24579 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24580 # var hexString = rgbNumber.toString(16);
24581 # var missingZeros = 6 - hexString.length;
24582 # var resultBuilder = ['#'];
24583 # for (var i = 0; i < missingZeros; i++) {
24584 # resultBuilder.push('0');
24585 # }
24586 # resultBuilder.push(hexString);
24587 # return resultBuilder.join('');
24588 # };
24589 #
24590 # // ...
24591 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24592 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24593 # the final pixel color is defined by the equation:
24594 #
24595 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24596 #
24597 # This means that a value of 1.0 corresponds to a solid color, whereas
24598 # a value of 0.0 corresponds to a completely transparent color. This
24599 # uses a wrapper message rather than a simple float scalar so that it is
24600 # possible to distinguish between a default value and the value being unset.
24601 # If omitted, this color object is to be rendered as a solid color
24602 # (as if the alpha value had been explicitly given with a value of 1.0).
24603 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24604 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24605 },
24606 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070024607 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024608 "style": "A String", # The style of the border.
24609 },
24610 "right": { # A border along a cell. # The right border of the cell.
24611 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
24612 # for simplicity of conversion to/from color representations in various
24613 # languages over compactness; for example, the fields of this representation
24614 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24615 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24616 # method in iOS; and, with just a little work, it can be easily formatted into
24617 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24618 #
24619 # Example (Java):
24620 #
24621 # import com.google.type.Color;
24622 #
24623 # // ...
24624 # public static java.awt.Color fromProto(Color protocolor) {
24625 # float alpha = protocolor.hasAlpha()
24626 # ? protocolor.getAlpha().getValue()
24627 # : 1.0;
24628 #
24629 # return new java.awt.Color(
24630 # protocolor.getRed(),
24631 # protocolor.getGreen(),
24632 # protocolor.getBlue(),
24633 # alpha);
24634 # }
24635 #
24636 # public static Color toProto(java.awt.Color color) {
24637 # float red = (float) color.getRed();
24638 # float green = (float) color.getGreen();
24639 # float blue = (float) color.getBlue();
24640 # float denominator = 255.0;
24641 # Color.Builder resultBuilder =
24642 # Color
24643 # .newBuilder()
24644 # .setRed(red / denominator)
24645 # .setGreen(green / denominator)
24646 # .setBlue(blue / denominator);
24647 # int alpha = color.getAlpha();
24648 # if (alpha != 255) {
24649 # result.setAlpha(
24650 # FloatValue
24651 # .newBuilder()
24652 # .setValue(((float) alpha) / denominator)
24653 # .build());
24654 # }
24655 # return resultBuilder.build();
24656 # }
24657 # // ...
24658 #
24659 # Example (iOS / Obj-C):
24660 #
24661 # // ...
24662 # static UIColor* fromProto(Color* protocolor) {
24663 # float red = [protocolor red];
24664 # float green = [protocolor green];
24665 # float blue = [protocolor blue];
24666 # FloatValue* alpha_wrapper = [protocolor alpha];
24667 # float alpha = 1.0;
24668 # if (alpha_wrapper != nil) {
24669 # alpha = [alpha_wrapper value];
24670 # }
24671 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24672 # }
24673 #
24674 # static Color* toProto(UIColor* color) {
24675 # CGFloat red, green, blue, alpha;
24676 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24677 # return nil;
24678 # }
24679 # Color* result = [Color alloc] init];
24680 # [result setRed:red];
24681 # [result setGreen:green];
24682 # [result setBlue:blue];
24683 # if (alpha <= 0.9999) {
24684 # [result setAlpha:floatWrapperWithValue(alpha)];
24685 # }
24686 # [result autorelease];
24687 # return result;
24688 # }
24689 # // ...
24690 #
24691 # Example (JavaScript):
24692 #
24693 # // ...
24694 #
24695 # var protoToCssColor = function(rgb_color) {
24696 # var redFrac = rgb_color.red || 0.0;
24697 # var greenFrac = rgb_color.green || 0.0;
24698 # var blueFrac = rgb_color.blue || 0.0;
24699 # var red = Math.floor(redFrac * 255);
24700 # var green = Math.floor(greenFrac * 255);
24701 # var blue = Math.floor(blueFrac * 255);
24702 #
24703 # if (!('alpha' in rgb_color)) {
24704 # return rgbToCssColor_(red, green, blue);
24705 # }
24706 #
24707 # var alphaFrac = rgb_color.alpha.value || 0.0;
24708 # var rgbParams = [red, green, blue].join(',');
24709 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24710 # };
24711 #
24712 # var rgbToCssColor_ = function(red, green, blue) {
24713 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24714 # var hexString = rgbNumber.toString(16);
24715 # var missingZeros = 6 - hexString.length;
24716 # var resultBuilder = ['#'];
24717 # for (var i = 0; i < missingZeros; i++) {
24718 # resultBuilder.push('0');
24719 # }
24720 # resultBuilder.push(hexString);
24721 # return resultBuilder.join('');
24722 # };
24723 #
24724 # // ...
24725 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24726 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24727 # the final pixel color is defined by the equation:
24728 #
24729 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24730 #
24731 # This means that a value of 1.0 corresponds to a solid color, whereas
24732 # a value of 0.0 corresponds to a completely transparent color. This
24733 # uses a wrapper message rather than a simple float scalar so that it is
24734 # possible to distinguish between a default value and the value being unset.
24735 # If omitted, this color object is to be rendered as a solid color
24736 # (as if the alpha value had been explicitly given with a value of 1.0).
24737 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24738 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24739 },
24740 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070024741 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024742 "style": "A String", # The style of the border.
24743 },
24744 "bottom": { # A border along a cell. # The bottom border of the cell.
24745 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
24746 # for simplicity of conversion to/from color representations in various
24747 # languages over compactness; for example, the fields of this representation
24748 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24749 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24750 # method in iOS; and, with just a little work, it can be easily formatted into
24751 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24752 #
24753 # Example (Java):
24754 #
24755 # import com.google.type.Color;
24756 #
24757 # // ...
24758 # public static java.awt.Color fromProto(Color protocolor) {
24759 # float alpha = protocolor.hasAlpha()
24760 # ? protocolor.getAlpha().getValue()
24761 # : 1.0;
24762 #
24763 # return new java.awt.Color(
24764 # protocolor.getRed(),
24765 # protocolor.getGreen(),
24766 # protocolor.getBlue(),
24767 # alpha);
24768 # }
24769 #
24770 # public static Color toProto(java.awt.Color color) {
24771 # float red = (float) color.getRed();
24772 # float green = (float) color.getGreen();
24773 # float blue = (float) color.getBlue();
24774 # float denominator = 255.0;
24775 # Color.Builder resultBuilder =
24776 # Color
24777 # .newBuilder()
24778 # .setRed(red / denominator)
24779 # .setGreen(green / denominator)
24780 # .setBlue(blue / denominator);
24781 # int alpha = color.getAlpha();
24782 # if (alpha != 255) {
24783 # result.setAlpha(
24784 # FloatValue
24785 # .newBuilder()
24786 # .setValue(((float) alpha) / denominator)
24787 # .build());
24788 # }
24789 # return resultBuilder.build();
24790 # }
24791 # // ...
24792 #
24793 # Example (iOS / Obj-C):
24794 #
24795 # // ...
24796 # static UIColor* fromProto(Color* protocolor) {
24797 # float red = [protocolor red];
24798 # float green = [protocolor green];
24799 # float blue = [protocolor blue];
24800 # FloatValue* alpha_wrapper = [protocolor alpha];
24801 # float alpha = 1.0;
24802 # if (alpha_wrapper != nil) {
24803 # alpha = [alpha_wrapper value];
24804 # }
24805 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24806 # }
24807 #
24808 # static Color* toProto(UIColor* color) {
24809 # CGFloat red, green, blue, alpha;
24810 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24811 # return nil;
24812 # }
24813 # Color* result = [Color alloc] init];
24814 # [result setRed:red];
24815 # [result setGreen:green];
24816 # [result setBlue:blue];
24817 # if (alpha <= 0.9999) {
24818 # [result setAlpha:floatWrapperWithValue(alpha)];
24819 # }
24820 # [result autorelease];
24821 # return result;
24822 # }
24823 # // ...
24824 #
24825 # Example (JavaScript):
24826 #
24827 # // ...
24828 #
24829 # var protoToCssColor = function(rgb_color) {
24830 # var redFrac = rgb_color.red || 0.0;
24831 # var greenFrac = rgb_color.green || 0.0;
24832 # var blueFrac = rgb_color.blue || 0.0;
24833 # var red = Math.floor(redFrac * 255);
24834 # var green = Math.floor(greenFrac * 255);
24835 # var blue = Math.floor(blueFrac * 255);
24836 #
24837 # if (!('alpha' in rgb_color)) {
24838 # return rgbToCssColor_(red, green, blue);
24839 # }
24840 #
24841 # var alphaFrac = rgb_color.alpha.value || 0.0;
24842 # var rgbParams = [red, green, blue].join(',');
24843 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24844 # };
24845 #
24846 # var rgbToCssColor_ = function(red, green, blue) {
24847 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24848 # var hexString = rgbNumber.toString(16);
24849 # var missingZeros = 6 - hexString.length;
24850 # var resultBuilder = ['#'];
24851 # for (var i = 0; i < missingZeros; i++) {
24852 # resultBuilder.push('0');
24853 # }
24854 # resultBuilder.push(hexString);
24855 # return resultBuilder.join('');
24856 # };
24857 #
24858 # // ...
24859 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24860 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24861 # the final pixel color is defined by the equation:
24862 #
24863 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24864 #
24865 # This means that a value of 1.0 corresponds to a solid color, whereas
24866 # a value of 0.0 corresponds to a completely transparent color. This
24867 # uses a wrapper message rather than a simple float scalar so that it is
24868 # possible to distinguish between a default value and the value being unset.
24869 # If omitted, this color object is to be rendered as a solid color
24870 # (as if the alpha value had been explicitly given with a value of 1.0).
24871 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24872 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24873 },
24874 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070024875 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024876 "style": "A String", # The style of the border.
24877 },
24878 "left": { # A border along a cell. # The left border of the cell.
24879 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
24880 # for simplicity of conversion to/from color representations in various
24881 # languages over compactness; for example, the fields of this representation
24882 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24883 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24884 # method in iOS; and, with just a little work, it can be easily formatted into
24885 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24886 #
24887 # Example (Java):
24888 #
24889 # import com.google.type.Color;
24890 #
24891 # // ...
24892 # public static java.awt.Color fromProto(Color protocolor) {
24893 # float alpha = protocolor.hasAlpha()
24894 # ? protocolor.getAlpha().getValue()
24895 # : 1.0;
24896 #
24897 # return new java.awt.Color(
24898 # protocolor.getRed(),
24899 # protocolor.getGreen(),
24900 # protocolor.getBlue(),
24901 # alpha);
24902 # }
24903 #
24904 # public static Color toProto(java.awt.Color color) {
24905 # float red = (float) color.getRed();
24906 # float green = (float) color.getGreen();
24907 # float blue = (float) color.getBlue();
24908 # float denominator = 255.0;
24909 # Color.Builder resultBuilder =
24910 # Color
24911 # .newBuilder()
24912 # .setRed(red / denominator)
24913 # .setGreen(green / denominator)
24914 # .setBlue(blue / denominator);
24915 # int alpha = color.getAlpha();
24916 # if (alpha != 255) {
24917 # result.setAlpha(
24918 # FloatValue
24919 # .newBuilder()
24920 # .setValue(((float) alpha) / denominator)
24921 # .build());
24922 # }
24923 # return resultBuilder.build();
24924 # }
24925 # // ...
24926 #
24927 # Example (iOS / Obj-C):
24928 #
24929 # // ...
24930 # static UIColor* fromProto(Color* protocolor) {
24931 # float red = [protocolor red];
24932 # float green = [protocolor green];
24933 # float blue = [protocolor blue];
24934 # FloatValue* alpha_wrapper = [protocolor alpha];
24935 # float alpha = 1.0;
24936 # if (alpha_wrapper != nil) {
24937 # alpha = [alpha_wrapper value];
24938 # }
24939 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24940 # }
24941 #
24942 # static Color* toProto(UIColor* color) {
24943 # CGFloat red, green, blue, alpha;
24944 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24945 # return nil;
24946 # }
24947 # Color* result = [Color alloc] init];
24948 # [result setRed:red];
24949 # [result setGreen:green];
24950 # [result setBlue:blue];
24951 # if (alpha <= 0.9999) {
24952 # [result setAlpha:floatWrapperWithValue(alpha)];
24953 # }
24954 # [result autorelease];
24955 # return result;
24956 # }
24957 # // ...
24958 #
24959 # Example (JavaScript):
24960 #
24961 # // ...
24962 #
24963 # var protoToCssColor = function(rgb_color) {
24964 # var redFrac = rgb_color.red || 0.0;
24965 # var greenFrac = rgb_color.green || 0.0;
24966 # var blueFrac = rgb_color.blue || 0.0;
24967 # var red = Math.floor(redFrac * 255);
24968 # var green = Math.floor(greenFrac * 255);
24969 # var blue = Math.floor(blueFrac * 255);
24970 #
24971 # if (!('alpha' in rgb_color)) {
24972 # return rgbToCssColor_(red, green, blue);
24973 # }
24974 #
24975 # var alphaFrac = rgb_color.alpha.value || 0.0;
24976 # var rgbParams = [red, green, blue].join(',');
24977 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24978 # };
24979 #
24980 # var rgbToCssColor_ = function(red, green, blue) {
24981 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24982 # var hexString = rgbNumber.toString(16);
24983 # var missingZeros = 6 - hexString.length;
24984 # var resultBuilder = ['#'];
24985 # for (var i = 0; i < missingZeros; i++) {
24986 # resultBuilder.push('0');
24987 # }
24988 # resultBuilder.push(hexString);
24989 # return resultBuilder.join('');
24990 # };
24991 #
24992 # // ...
24993 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24994 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24995 # the final pixel color is defined by the equation:
24996 #
24997 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24998 #
24999 # This means that a value of 1.0 corresponds to a solid color, whereas
25000 # a value of 0.0 corresponds to a completely transparent color. This
25001 # uses a wrapper message rather than a simple float scalar so that it is
25002 # possible to distinguish between a default value and the value being unset.
25003 # If omitted, this color object is to be rendered as a solid color
25004 # (as if the alpha value had been explicitly given with a value of 1.0).
25005 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25006 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25007 },
25008 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070025009 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025010 "style": "A String", # The style of the border.
25011 },
25012 },
25013 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
25014 },
25015 },
25016 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
25017 # the interpolation points listed. The format of a cell will vary
25018 # based on its contents as compared to the values of the interpolation
25019 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025020 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025021 # These pin the gradient color scale according to the color,
25022 # type and value chosen.
25023 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
25024 # for simplicity of conversion to/from color representations in various
25025 # languages over compactness; for example, the fields of this representation
25026 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25027 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25028 # method in iOS; and, with just a little work, it can be easily formatted into
25029 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25030 #
25031 # Example (Java):
25032 #
25033 # import com.google.type.Color;
25034 #
25035 # // ...
25036 # public static java.awt.Color fromProto(Color protocolor) {
25037 # float alpha = protocolor.hasAlpha()
25038 # ? protocolor.getAlpha().getValue()
25039 # : 1.0;
25040 #
25041 # return new java.awt.Color(
25042 # protocolor.getRed(),
25043 # protocolor.getGreen(),
25044 # protocolor.getBlue(),
25045 # alpha);
25046 # }
25047 #
25048 # public static Color toProto(java.awt.Color color) {
25049 # float red = (float) color.getRed();
25050 # float green = (float) color.getGreen();
25051 # float blue = (float) color.getBlue();
25052 # float denominator = 255.0;
25053 # Color.Builder resultBuilder =
25054 # Color
25055 # .newBuilder()
25056 # .setRed(red / denominator)
25057 # .setGreen(green / denominator)
25058 # .setBlue(blue / denominator);
25059 # int alpha = color.getAlpha();
25060 # if (alpha != 255) {
25061 # result.setAlpha(
25062 # FloatValue
25063 # .newBuilder()
25064 # .setValue(((float) alpha) / denominator)
25065 # .build());
25066 # }
25067 # return resultBuilder.build();
25068 # }
25069 # // ...
25070 #
25071 # Example (iOS / Obj-C):
25072 #
25073 # // ...
25074 # static UIColor* fromProto(Color* protocolor) {
25075 # float red = [protocolor red];
25076 # float green = [protocolor green];
25077 # float blue = [protocolor blue];
25078 # FloatValue* alpha_wrapper = [protocolor alpha];
25079 # float alpha = 1.0;
25080 # if (alpha_wrapper != nil) {
25081 # alpha = [alpha_wrapper value];
25082 # }
25083 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25084 # }
25085 #
25086 # static Color* toProto(UIColor* color) {
25087 # CGFloat red, green, blue, alpha;
25088 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25089 # return nil;
25090 # }
25091 # Color* result = [Color alloc] init];
25092 # [result setRed:red];
25093 # [result setGreen:green];
25094 # [result setBlue:blue];
25095 # if (alpha <= 0.9999) {
25096 # [result setAlpha:floatWrapperWithValue(alpha)];
25097 # }
25098 # [result autorelease];
25099 # return result;
25100 # }
25101 # // ...
25102 #
25103 # Example (JavaScript):
25104 #
25105 # // ...
25106 #
25107 # var protoToCssColor = function(rgb_color) {
25108 # var redFrac = rgb_color.red || 0.0;
25109 # var greenFrac = rgb_color.green || 0.0;
25110 # var blueFrac = rgb_color.blue || 0.0;
25111 # var red = Math.floor(redFrac * 255);
25112 # var green = Math.floor(greenFrac * 255);
25113 # var blue = Math.floor(blueFrac * 255);
25114 #
25115 # if (!('alpha' in rgb_color)) {
25116 # return rgbToCssColor_(red, green, blue);
25117 # }
25118 #
25119 # var alphaFrac = rgb_color.alpha.value || 0.0;
25120 # var rgbParams = [red, green, blue].join(',');
25121 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25122 # };
25123 #
25124 # var rgbToCssColor_ = function(red, green, blue) {
25125 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25126 # var hexString = rgbNumber.toString(16);
25127 # var missingZeros = 6 - hexString.length;
25128 # var resultBuilder = ['#'];
25129 # for (var i = 0; i < missingZeros; i++) {
25130 # resultBuilder.push('0');
25131 # }
25132 # resultBuilder.push(hexString);
25133 # return resultBuilder.join('');
25134 # };
25135 #
25136 # // ...
25137 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25138 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25139 # the final pixel color is defined by the equation:
25140 #
25141 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25142 #
25143 # This means that a value of 1.0 corresponds to a solid color, whereas
25144 # a value of 0.0 corresponds to a completely transparent color. This
25145 # uses a wrapper message rather than a simple float scalar so that it is
25146 # possible to distinguish between a default value and the value being unset.
25147 # If omitted, this color object is to be rendered as a solid color
25148 # (as if the alpha value had been explicitly given with a value of 1.0).
25149 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25150 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25151 },
25152 "type": "A String", # How the value should be interpreted.
25153 "value": "A String", # The value this interpolation point uses. May be a formula.
25154 # Unused if type is MIN or
25155 # MAX.
25156 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025157 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025158 # These pin the gradient color scale according to the color,
25159 # type and value chosen.
25160 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
25161 # for simplicity of conversion to/from color representations in various
25162 # languages over compactness; for example, the fields of this representation
25163 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25164 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25165 # method in iOS; and, with just a little work, it can be easily formatted into
25166 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25167 #
25168 # Example (Java):
25169 #
25170 # import com.google.type.Color;
25171 #
25172 # // ...
25173 # public static java.awt.Color fromProto(Color protocolor) {
25174 # float alpha = protocolor.hasAlpha()
25175 # ? protocolor.getAlpha().getValue()
25176 # : 1.0;
25177 #
25178 # return new java.awt.Color(
25179 # protocolor.getRed(),
25180 # protocolor.getGreen(),
25181 # protocolor.getBlue(),
25182 # alpha);
25183 # }
25184 #
25185 # public static Color toProto(java.awt.Color color) {
25186 # float red = (float) color.getRed();
25187 # float green = (float) color.getGreen();
25188 # float blue = (float) color.getBlue();
25189 # float denominator = 255.0;
25190 # Color.Builder resultBuilder =
25191 # Color
25192 # .newBuilder()
25193 # .setRed(red / denominator)
25194 # .setGreen(green / denominator)
25195 # .setBlue(blue / denominator);
25196 # int alpha = color.getAlpha();
25197 # if (alpha != 255) {
25198 # result.setAlpha(
25199 # FloatValue
25200 # .newBuilder()
25201 # .setValue(((float) alpha) / denominator)
25202 # .build());
25203 # }
25204 # return resultBuilder.build();
25205 # }
25206 # // ...
25207 #
25208 # Example (iOS / Obj-C):
25209 #
25210 # // ...
25211 # static UIColor* fromProto(Color* protocolor) {
25212 # float red = [protocolor red];
25213 # float green = [protocolor green];
25214 # float blue = [protocolor blue];
25215 # FloatValue* alpha_wrapper = [protocolor alpha];
25216 # float alpha = 1.0;
25217 # if (alpha_wrapper != nil) {
25218 # alpha = [alpha_wrapper value];
25219 # }
25220 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25221 # }
25222 #
25223 # static Color* toProto(UIColor* color) {
25224 # CGFloat red, green, blue, alpha;
25225 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25226 # return nil;
25227 # }
25228 # Color* result = [Color alloc] init];
25229 # [result setRed:red];
25230 # [result setGreen:green];
25231 # [result setBlue:blue];
25232 # if (alpha <= 0.9999) {
25233 # [result setAlpha:floatWrapperWithValue(alpha)];
25234 # }
25235 # [result autorelease];
25236 # return result;
25237 # }
25238 # // ...
25239 #
25240 # Example (JavaScript):
25241 #
25242 # // ...
25243 #
25244 # var protoToCssColor = function(rgb_color) {
25245 # var redFrac = rgb_color.red || 0.0;
25246 # var greenFrac = rgb_color.green || 0.0;
25247 # var blueFrac = rgb_color.blue || 0.0;
25248 # var red = Math.floor(redFrac * 255);
25249 # var green = Math.floor(greenFrac * 255);
25250 # var blue = Math.floor(blueFrac * 255);
25251 #
25252 # if (!('alpha' in rgb_color)) {
25253 # return rgbToCssColor_(red, green, blue);
25254 # }
25255 #
25256 # var alphaFrac = rgb_color.alpha.value || 0.0;
25257 # var rgbParams = [red, green, blue].join(',');
25258 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25259 # };
25260 #
25261 # var rgbToCssColor_ = function(red, green, blue) {
25262 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25263 # var hexString = rgbNumber.toString(16);
25264 # var missingZeros = 6 - hexString.length;
25265 # var resultBuilder = ['#'];
25266 # for (var i = 0; i < missingZeros; i++) {
25267 # resultBuilder.push('0');
25268 # }
25269 # resultBuilder.push(hexString);
25270 # return resultBuilder.join('');
25271 # };
25272 #
25273 # // ...
25274 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25275 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25276 # the final pixel color is defined by the equation:
25277 #
25278 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25279 #
25280 # This means that a value of 1.0 corresponds to a solid color, whereas
25281 # a value of 0.0 corresponds to a completely transparent color. This
25282 # uses a wrapper message rather than a simple float scalar so that it is
25283 # possible to distinguish between a default value and the value being unset.
25284 # If omitted, this color object is to be rendered as a solid color
25285 # (as if the alpha value had been explicitly given with a value of 1.0).
25286 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25287 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25288 },
25289 "type": "A String", # How the value should be interpreted.
25290 "value": "A String", # The value this interpolation point uses. May be a formula.
25291 # Unused if type is MIN or
25292 # MAX.
25293 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025294 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025295 # These pin the gradient color scale according to the color,
25296 # type and value chosen.
25297 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
25298 # for simplicity of conversion to/from color representations in various
25299 # languages over compactness; for example, the fields of this representation
25300 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25301 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25302 # method in iOS; and, with just a little work, it can be easily formatted into
25303 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25304 #
25305 # Example (Java):
25306 #
25307 # import com.google.type.Color;
25308 #
25309 # // ...
25310 # public static java.awt.Color fromProto(Color protocolor) {
25311 # float alpha = protocolor.hasAlpha()
25312 # ? protocolor.getAlpha().getValue()
25313 # : 1.0;
25314 #
25315 # return new java.awt.Color(
25316 # protocolor.getRed(),
25317 # protocolor.getGreen(),
25318 # protocolor.getBlue(),
25319 # alpha);
25320 # }
25321 #
25322 # public static Color toProto(java.awt.Color color) {
25323 # float red = (float) color.getRed();
25324 # float green = (float) color.getGreen();
25325 # float blue = (float) color.getBlue();
25326 # float denominator = 255.0;
25327 # Color.Builder resultBuilder =
25328 # Color
25329 # .newBuilder()
25330 # .setRed(red / denominator)
25331 # .setGreen(green / denominator)
25332 # .setBlue(blue / denominator);
25333 # int alpha = color.getAlpha();
25334 # if (alpha != 255) {
25335 # result.setAlpha(
25336 # FloatValue
25337 # .newBuilder()
25338 # .setValue(((float) alpha) / denominator)
25339 # .build());
25340 # }
25341 # return resultBuilder.build();
25342 # }
25343 # // ...
25344 #
25345 # Example (iOS / Obj-C):
25346 #
25347 # // ...
25348 # static UIColor* fromProto(Color* protocolor) {
25349 # float red = [protocolor red];
25350 # float green = [protocolor green];
25351 # float blue = [protocolor blue];
25352 # FloatValue* alpha_wrapper = [protocolor alpha];
25353 # float alpha = 1.0;
25354 # if (alpha_wrapper != nil) {
25355 # alpha = [alpha_wrapper value];
25356 # }
25357 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25358 # }
25359 #
25360 # static Color* toProto(UIColor* color) {
25361 # CGFloat red, green, blue, alpha;
25362 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25363 # return nil;
25364 # }
25365 # Color* result = [Color alloc] init];
25366 # [result setRed:red];
25367 # [result setGreen:green];
25368 # [result setBlue:blue];
25369 # if (alpha <= 0.9999) {
25370 # [result setAlpha:floatWrapperWithValue(alpha)];
25371 # }
25372 # [result autorelease];
25373 # return result;
25374 # }
25375 # // ...
25376 #
25377 # Example (JavaScript):
25378 #
25379 # // ...
25380 #
25381 # var protoToCssColor = function(rgb_color) {
25382 # var redFrac = rgb_color.red || 0.0;
25383 # var greenFrac = rgb_color.green || 0.0;
25384 # var blueFrac = rgb_color.blue || 0.0;
25385 # var red = Math.floor(redFrac * 255);
25386 # var green = Math.floor(greenFrac * 255);
25387 # var blue = Math.floor(blueFrac * 255);
25388 #
25389 # if (!('alpha' in rgb_color)) {
25390 # return rgbToCssColor_(red, green, blue);
25391 # }
25392 #
25393 # var alphaFrac = rgb_color.alpha.value || 0.0;
25394 # var rgbParams = [red, green, blue].join(',');
25395 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25396 # };
25397 #
25398 # var rgbToCssColor_ = function(red, green, blue) {
25399 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25400 # var hexString = rgbNumber.toString(16);
25401 # var missingZeros = 6 - hexString.length;
25402 # var resultBuilder = ['#'];
25403 # for (var i = 0; i < missingZeros; i++) {
25404 # resultBuilder.push('0');
25405 # }
25406 # resultBuilder.push(hexString);
25407 # return resultBuilder.join('');
25408 # };
25409 #
25410 # // ...
25411 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25412 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25413 # the final pixel color is defined by the equation:
25414 #
25415 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25416 #
25417 # This means that a value of 1.0 corresponds to a solid color, whereas
25418 # a value of 0.0 corresponds to a completely transparent color. This
25419 # uses a wrapper message rather than a simple float scalar so that it is
25420 # possible to distinguish between a default value and the value being unset.
25421 # If omitted, this color object is to be rendered as a solid color
25422 # (as if the alpha value had been explicitly given with a value of 1.0).
25423 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25424 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25425 },
25426 "type": "A String", # How the value should be interpreted.
25427 "value": "A String", # The value this interpolation point uses. May be a formula.
25428 # Unused if type is MIN or
25429 # MAX.
25430 },
25431 },
25432 },
25433 },
25434 "addSheet": { # The result of adding a sheet. # A reply from adding a sheet.
25435 "properties": { # Properties of a sheet. # The properties of the newly added sheet.
25436 "sheetType": "A String", # The type of sheet. Defaults to GRID.
25437 # This field cannot be changed once set.
25438 "index": 42, # The index of the sheet within the spreadsheet.
25439 # When adding or updating sheet properties, if this field
25440 # is excluded then the sheet will be added or moved to the end
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080025441 # of the sheet list. When updating sheet indices or inserting
25442 # sheets, movement is considered in "before the move" indexes.
25443 # For example, if there were 3 sheets (S1, S2, S3) in order to
25444 # move S1 ahead of S2 the index would have to be set to 2. A sheet
25445 # index update request will be ignored if the requested index is
25446 # identical to the sheets current index or if the requested new
25447 # index is equal to the current sheet index + 1.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025448 "title": "A String", # The name of the sheet.
25449 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
25450 # (If the sheet is an object sheet, containing a chart or image, then
25451 # this field will be absent.)
25452 # When writing it is an error to set any grid properties on non-grid sheets.
25453 "columnCount": 42, # The number of columns in the grid.
25454 "rowCount": 42, # The number of rows in the grid.
25455 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
25456 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
25457 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
25458 },
25459 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
25460 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
25461 # for simplicity of conversion to/from color representations in various
25462 # languages over compactness; for example, the fields of this representation
25463 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25464 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25465 # method in iOS; and, with just a little work, it can be easily formatted into
25466 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25467 #
25468 # Example (Java):
25469 #
25470 # import com.google.type.Color;
25471 #
25472 # // ...
25473 # public static java.awt.Color fromProto(Color protocolor) {
25474 # float alpha = protocolor.hasAlpha()
25475 # ? protocolor.getAlpha().getValue()
25476 # : 1.0;
25477 #
25478 # return new java.awt.Color(
25479 # protocolor.getRed(),
25480 # protocolor.getGreen(),
25481 # protocolor.getBlue(),
25482 # alpha);
25483 # }
25484 #
25485 # public static Color toProto(java.awt.Color color) {
25486 # float red = (float) color.getRed();
25487 # float green = (float) color.getGreen();
25488 # float blue = (float) color.getBlue();
25489 # float denominator = 255.0;
25490 # Color.Builder resultBuilder =
25491 # Color
25492 # .newBuilder()
25493 # .setRed(red / denominator)
25494 # .setGreen(green / denominator)
25495 # .setBlue(blue / denominator);
25496 # int alpha = color.getAlpha();
25497 # if (alpha != 255) {
25498 # result.setAlpha(
25499 # FloatValue
25500 # .newBuilder()
25501 # .setValue(((float) alpha) / denominator)
25502 # .build());
25503 # }
25504 # return resultBuilder.build();
25505 # }
25506 # // ...
25507 #
25508 # Example (iOS / Obj-C):
25509 #
25510 # // ...
25511 # static UIColor* fromProto(Color* protocolor) {
25512 # float red = [protocolor red];
25513 # float green = [protocolor green];
25514 # float blue = [protocolor blue];
25515 # FloatValue* alpha_wrapper = [protocolor alpha];
25516 # float alpha = 1.0;
25517 # if (alpha_wrapper != nil) {
25518 # alpha = [alpha_wrapper value];
25519 # }
25520 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25521 # }
25522 #
25523 # static Color* toProto(UIColor* color) {
25524 # CGFloat red, green, blue, alpha;
25525 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25526 # return nil;
25527 # }
25528 # Color* result = [Color alloc] init];
25529 # [result setRed:red];
25530 # [result setGreen:green];
25531 # [result setBlue:blue];
25532 # if (alpha <= 0.9999) {
25533 # [result setAlpha:floatWrapperWithValue(alpha)];
25534 # }
25535 # [result autorelease];
25536 # return result;
25537 # }
25538 # // ...
25539 #
25540 # Example (JavaScript):
25541 #
25542 # // ...
25543 #
25544 # var protoToCssColor = function(rgb_color) {
25545 # var redFrac = rgb_color.red || 0.0;
25546 # var greenFrac = rgb_color.green || 0.0;
25547 # var blueFrac = rgb_color.blue || 0.0;
25548 # var red = Math.floor(redFrac * 255);
25549 # var green = Math.floor(greenFrac * 255);
25550 # var blue = Math.floor(blueFrac * 255);
25551 #
25552 # if (!('alpha' in rgb_color)) {
25553 # return rgbToCssColor_(red, green, blue);
25554 # }
25555 #
25556 # var alphaFrac = rgb_color.alpha.value || 0.0;
25557 # var rgbParams = [red, green, blue].join(',');
25558 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25559 # };
25560 #
25561 # var rgbToCssColor_ = function(red, green, blue) {
25562 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25563 # var hexString = rgbNumber.toString(16);
25564 # var missingZeros = 6 - hexString.length;
25565 # var resultBuilder = ['#'];
25566 # for (var i = 0; i < missingZeros; i++) {
25567 # resultBuilder.push('0');
25568 # }
25569 # resultBuilder.push(hexString);
25570 # return resultBuilder.join('');
25571 # };
25572 #
25573 # // ...
25574 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25575 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25576 # the final pixel color is defined by the equation:
25577 #
25578 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25579 #
25580 # This means that a value of 1.0 corresponds to a solid color, whereas
25581 # a value of 0.0 corresponds to a completely transparent color. This
25582 # uses a wrapper message rather than a simple float scalar so that it is
25583 # possible to distinguish between a default value and the value being unset.
25584 # If omitted, this color object is to be rendered as a solid color
25585 # (as if the alpha value had been explicitly given with a value of 1.0).
25586 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25587 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25588 },
25589 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
25590 "sheetId": 42, # The ID of the sheet. Must be non-negative.
25591 # This field cannot be changed once set.
25592 },
25593 },
25594 "findReplace": { # The result of the find/replace. # A reply from doing a find/replace.
25595 "occurrencesChanged": 42, # The number of occurrences (possibly multiple within a cell) changed.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025596 # For example, if replacing `"e"` with `"o"` in `"Google Sheets"`, this would
25597 # be `"3"` because `"Google Sheets"` -> `"Googlo Shoots"`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025598 "sheetsChanged": 42, # The number of sheets changed.
25599 "rowsChanged": 42, # The number of rows changed.
25600 "valuesChanged": 42, # The number of non-formula cells changed.
25601 "formulasChanged": 42, # The number of formula cells changed.
25602 },
25603 "addNamedRange": { # The result of adding a named range. # A reply from adding a named range.
25604 "namedRange": { # A named range. # The named range to add.
25605 "namedRangeId": "A String", # The ID of the named range.
25606 "range": { # A range on a sheet. # The range this represents.
25607 # All indexes are zero-based.
25608 # Indexes are half open, e.g the start index is inclusive
25609 # and the end index is exclusive -- [start_index, end_index).
25610 # Missing indexes indicate the range is unbounded on that side.
25611 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025612 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025613 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025614 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025615 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025616 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025617 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025618 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025619 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025620 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025621 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025622 # `Sheet1!A:B == sheet_id: 0,
25623 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025624 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025625 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025626 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025627 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025628 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025629 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025630 #
25631 # The start index must always be less than or equal to the end index.
25632 # If the start index equals the end index, then the range is empty.
25633 # Empty ranges are typically not meaningful and are usually rendered in the
25634 # UI as `#REF!`.
25635 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
25636 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
25637 "sheetId": 42, # The sheet this range is on.
25638 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
25639 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
25640 },
25641 "name": "A String", # The name of the named range.
25642 },
25643 },
25644 "addProtectedRange": { # The result of adding a new protected range. # A reply from adding a protected range.
25645 "protectedRange": { # A protected range. # The newly added protected range.
25646 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
25647 # Unprotected ranges are only supported on protected sheets.
25648 { # A range on a sheet.
25649 # All indexes are zero-based.
25650 # Indexes are half open, e.g the start index is inclusive
25651 # and the end index is exclusive -- [start_index, end_index).
25652 # Missing indexes indicate the range is unbounded on that side.
25653 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025654 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025655 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025656 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025657 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025658 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025659 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025660 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025661 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025662 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025663 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025664 # `Sheet1!A:B == sheet_id: 0,
25665 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025666 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025667 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025668 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025669 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025670 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025671 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025672 #
25673 # The start index must always be less than or equal to the end index.
25674 # If the start index equals the end index, then the range is empty.
25675 # Empty ranges are typically not meaningful and are usually rendered in the
25676 # UI as `#REF!`.
25677 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
25678 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
25679 "sheetId": 42, # The sheet this range is on.
25680 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
25681 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
25682 },
25683 ],
25684 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
25685 # protected area.
25686 # This field is read-only.
25687 "description": "A String", # The description of this protected range.
25688 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
25689 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025690 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025691 # may be set.
25692 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
25693 # This field is only visible to users with edit access to the protected
25694 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025695 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025696 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
25697 # range. Domain protection is only supported on documents within a domain.
25698 "users": [ # The email addresses of users with edit access to the protected range.
25699 "A String",
25700 ],
25701 "groups": [ # The email addresses of groups with edit access to the protected range.
25702 "A String",
25703 ],
25704 },
25705 "protectedRangeId": 42, # The ID of the protected range.
25706 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025707 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025708 # Warning-based protection means that every user can edit data in the
25709 # protected range, except editing will prompt a warning asking the user
25710 # to confirm the edit.
25711 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025712 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025713 # Additionally, if this field is changed from true to false and the
25714 # `editors` field is not set (nor included in the field mask), then
25715 # the editors will be set to all the editors in the document.
25716 "range": { # A range on a sheet. # The range that is being protected.
25717 # The range may be fully unbounded, in which case this is considered
25718 # a protected sheet.
25719 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025720 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025721 # may be set.
25722 # All indexes are zero-based.
25723 # Indexes are half open, e.g the start index is inclusive
25724 # and the end index is exclusive -- [start_index, end_index).
25725 # Missing indexes indicate the range is unbounded on that side.
25726 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025727 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025728 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025729 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025730 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025731 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025732 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025733 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025734 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025735 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025736 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025737 # `Sheet1!A:B == sheet_id: 0,
25738 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025739 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025740 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025741 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025742 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025743 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025744 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025745 #
25746 # The start index must always be less than or equal to the end index.
25747 # If the start index equals the end index, then the range is empty.
25748 # Empty ranges are typically not meaningful and are usually rendered in the
25749 # UI as `#REF!`.
25750 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
25751 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
25752 "sheetId": 42, # The sheet this range is on.
25753 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
25754 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
25755 },
25756 },
25757 },
25758 "deleteConditionalFormatRule": { # The result of deleting a conditional format rule. # A reply from deleting a conditional format rule.
25759 "rule": { # A rule describing a conditional format. # The rule that was deleted.
25760 "ranges": [ # The ranges that will be formatted if the condition is true.
25761 # All the ranges must be on the same grid.
25762 { # A range on a sheet.
25763 # All indexes are zero-based.
25764 # Indexes are half open, e.g the start index is inclusive
25765 # and the end index is exclusive -- [start_index, end_index).
25766 # Missing indexes indicate the range is unbounded on that side.
25767 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025768 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025769 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025770 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025771 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025772 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025773 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025774 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025775 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025776 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025777 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025778 # `Sheet1!A:B == sheet_id: 0,
25779 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025780 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025781 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025782 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025783 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025784 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025785 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025786 #
25787 # The start index must always be less than or equal to the end index.
25788 # If the start index equals the end index, then the range is empty.
25789 # Empty ranges are typically not meaningful and are usually rendered in the
25790 # UI as `#REF!`.
25791 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
25792 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
25793 "sheetId": 42, # The sheet this range is on.
25794 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
25795 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
25796 },
25797 ],
25798 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
25799 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
25800 # the format will be applied.
25801 # BooleanConditions are used by conditional formatting,
25802 # data validation, and the criteria in filters.
25803 "type": "A String", # The type of condition.
25804 "values": [ # The values of the condition. The number of supported values depends
25805 # on the condition type. Some support zero values,
25806 # others one or two values,
25807 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
25808 { # The value of the condition.
25809 "relativeDate": "A String", # A relative date (based on the current date).
25810 # Valid only if the type is
25811 # DATE_BEFORE,
25812 # DATE_AFTER,
25813 # DATE_ON_OR_BEFORE or
25814 # DATE_ON_OR_AFTER.
25815 #
25816 # Relative dates are not supported in data validation.
25817 # They are supported only in conditional formatting and
25818 # conditional filters.
25819 "userEnteredValue": "A String", # A value the condition is based on.
25820 # The value will be parsed as if the user typed into a cell.
25821 # Formulas are supported (and must begin with an `=`).
25822 },
25823 ],
25824 },
25825 "format": { # The format of a cell. # The format to apply.
25826 # Conditional formatting can only apply a subset of formatting:
25827 # bold, italic,
25828 # strikethrough,
25829 # foreground color &
25830 # background color.
25831 "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 -070025832 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
25833 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070025834 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
25835 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025836 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025837 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025838 },
25839 "textDirection": "A String", # The direction of the text in the cell.
25840 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
25841 # When updating padding, every field must be specified.
25842 "top": 42, # The top padding of the cell.
25843 "right": 42, # The right padding of the cell.
25844 "bottom": 42, # The bottom padding of the cell.
25845 "left": 42, # The left padding of the cell.
25846 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025847 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025848 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
25849 # for simplicity of conversion to/from color representations in various
25850 # languages over compactness; for example, the fields of this representation
25851 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25852 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25853 # method in iOS; and, with just a little work, it can be easily formatted into
25854 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25855 #
25856 # Example (Java):
25857 #
25858 # import com.google.type.Color;
25859 #
25860 # // ...
25861 # public static java.awt.Color fromProto(Color protocolor) {
25862 # float alpha = protocolor.hasAlpha()
25863 # ? protocolor.getAlpha().getValue()
25864 # : 1.0;
25865 #
25866 # return new java.awt.Color(
25867 # protocolor.getRed(),
25868 # protocolor.getGreen(),
25869 # protocolor.getBlue(),
25870 # alpha);
25871 # }
25872 #
25873 # public static Color toProto(java.awt.Color color) {
25874 # float red = (float) color.getRed();
25875 # float green = (float) color.getGreen();
25876 # float blue = (float) color.getBlue();
25877 # float denominator = 255.0;
25878 # Color.Builder resultBuilder =
25879 # Color
25880 # .newBuilder()
25881 # .setRed(red / denominator)
25882 # .setGreen(green / denominator)
25883 # .setBlue(blue / denominator);
25884 # int alpha = color.getAlpha();
25885 # if (alpha != 255) {
25886 # result.setAlpha(
25887 # FloatValue
25888 # .newBuilder()
25889 # .setValue(((float) alpha) / denominator)
25890 # .build());
25891 # }
25892 # return resultBuilder.build();
25893 # }
25894 # // ...
25895 #
25896 # Example (iOS / Obj-C):
25897 #
25898 # // ...
25899 # static UIColor* fromProto(Color* protocolor) {
25900 # float red = [protocolor red];
25901 # float green = [protocolor green];
25902 # float blue = [protocolor blue];
25903 # FloatValue* alpha_wrapper = [protocolor alpha];
25904 # float alpha = 1.0;
25905 # if (alpha_wrapper != nil) {
25906 # alpha = [alpha_wrapper value];
25907 # }
25908 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25909 # }
25910 #
25911 # static Color* toProto(UIColor* color) {
25912 # CGFloat red, green, blue, alpha;
25913 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25914 # return nil;
25915 # }
25916 # Color* result = [Color alloc] init];
25917 # [result setRed:red];
25918 # [result setGreen:green];
25919 # [result setBlue:blue];
25920 # if (alpha <= 0.9999) {
25921 # [result setAlpha:floatWrapperWithValue(alpha)];
25922 # }
25923 # [result autorelease];
25924 # return result;
25925 # }
25926 # // ...
25927 #
25928 # Example (JavaScript):
25929 #
25930 # // ...
25931 #
25932 # var protoToCssColor = function(rgb_color) {
25933 # var redFrac = rgb_color.red || 0.0;
25934 # var greenFrac = rgb_color.green || 0.0;
25935 # var blueFrac = rgb_color.blue || 0.0;
25936 # var red = Math.floor(redFrac * 255);
25937 # var green = Math.floor(greenFrac * 255);
25938 # var blue = Math.floor(blueFrac * 255);
25939 #
25940 # if (!('alpha' in rgb_color)) {
25941 # return rgbToCssColor_(red, green, blue);
25942 # }
25943 #
25944 # var alphaFrac = rgb_color.alpha.value || 0.0;
25945 # var rgbParams = [red, green, blue].join(',');
25946 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25947 # };
25948 #
25949 # var rgbToCssColor_ = function(red, green, blue) {
25950 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25951 # var hexString = rgbNumber.toString(16);
25952 # var missingZeros = 6 - hexString.length;
25953 # var resultBuilder = ['#'];
25954 # for (var i = 0; i < missingZeros; i++) {
25955 # resultBuilder.push('0');
25956 # }
25957 # resultBuilder.push(hexString);
25958 # return resultBuilder.join('');
25959 # };
25960 #
25961 # // ...
25962 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25963 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25964 # the final pixel color is defined by the equation:
25965 #
25966 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25967 #
25968 # This means that a value of 1.0 corresponds to a solid color, whereas
25969 # a value of 0.0 corresponds to a completely transparent color. This
25970 # uses a wrapper message rather than a simple float scalar so that it is
25971 # possible to distinguish between a default value and the value being unset.
25972 # If omitted, this color object is to be rendered as a solid color
25973 # (as if the alpha value had been explicitly given with a value of 1.0).
25974 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25975 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25976 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025977 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025978 "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).
25979 # Absent values indicate that the field isn't specified.
25980 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
25981 # for simplicity of conversion to/from color representations in various
25982 # languages over compactness; for example, the fields of this representation
25983 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25984 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25985 # method in iOS; and, with just a little work, it can be easily formatted into
25986 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25987 #
25988 # Example (Java):
25989 #
25990 # import com.google.type.Color;
25991 #
25992 # // ...
25993 # public static java.awt.Color fromProto(Color protocolor) {
25994 # float alpha = protocolor.hasAlpha()
25995 # ? protocolor.getAlpha().getValue()
25996 # : 1.0;
25997 #
25998 # return new java.awt.Color(
25999 # protocolor.getRed(),
26000 # protocolor.getGreen(),
26001 # protocolor.getBlue(),
26002 # alpha);
26003 # }
26004 #
26005 # public static Color toProto(java.awt.Color color) {
26006 # float red = (float) color.getRed();
26007 # float green = (float) color.getGreen();
26008 # float blue = (float) color.getBlue();
26009 # float denominator = 255.0;
26010 # Color.Builder resultBuilder =
26011 # Color
26012 # .newBuilder()
26013 # .setRed(red / denominator)
26014 # .setGreen(green / denominator)
26015 # .setBlue(blue / denominator);
26016 # int alpha = color.getAlpha();
26017 # if (alpha != 255) {
26018 # result.setAlpha(
26019 # FloatValue
26020 # .newBuilder()
26021 # .setValue(((float) alpha) / denominator)
26022 # .build());
26023 # }
26024 # return resultBuilder.build();
26025 # }
26026 # // ...
26027 #
26028 # Example (iOS / Obj-C):
26029 #
26030 # // ...
26031 # static UIColor* fromProto(Color* protocolor) {
26032 # float red = [protocolor red];
26033 # float green = [protocolor green];
26034 # float blue = [protocolor blue];
26035 # FloatValue* alpha_wrapper = [protocolor alpha];
26036 # float alpha = 1.0;
26037 # if (alpha_wrapper != nil) {
26038 # alpha = [alpha_wrapper value];
26039 # }
26040 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26041 # }
26042 #
26043 # static Color* toProto(UIColor* color) {
26044 # CGFloat red, green, blue, alpha;
26045 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26046 # return nil;
26047 # }
26048 # Color* result = [Color alloc] init];
26049 # [result setRed:red];
26050 # [result setGreen:green];
26051 # [result setBlue:blue];
26052 # if (alpha <= 0.9999) {
26053 # [result setAlpha:floatWrapperWithValue(alpha)];
26054 # }
26055 # [result autorelease];
26056 # return result;
26057 # }
26058 # // ...
26059 #
26060 # Example (JavaScript):
26061 #
26062 # // ...
26063 #
26064 # var protoToCssColor = function(rgb_color) {
26065 # var redFrac = rgb_color.red || 0.0;
26066 # var greenFrac = rgb_color.green || 0.0;
26067 # var blueFrac = rgb_color.blue || 0.0;
26068 # var red = Math.floor(redFrac * 255);
26069 # var green = Math.floor(greenFrac * 255);
26070 # var blue = Math.floor(blueFrac * 255);
26071 #
26072 # if (!('alpha' in rgb_color)) {
26073 # return rgbToCssColor_(red, green, blue);
26074 # }
26075 #
26076 # var alphaFrac = rgb_color.alpha.value || 0.0;
26077 # var rgbParams = [red, green, blue].join(',');
26078 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
26079 # };
26080 #
26081 # var rgbToCssColor_ = function(red, green, blue) {
26082 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
26083 # var hexString = rgbNumber.toString(16);
26084 # var missingZeros = 6 - hexString.length;
26085 # var resultBuilder = ['#'];
26086 # for (var i = 0; i < missingZeros; i++) {
26087 # resultBuilder.push('0');
26088 # }
26089 # resultBuilder.push(hexString);
26090 # return resultBuilder.join('');
26091 # };
26092 #
26093 # // ...
26094 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
26095 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
26096 # the final pixel color is defined by the equation:
26097 #
26098 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
26099 #
26100 # This means that a value of 1.0 corresponds to a solid color, whereas
26101 # a value of 0.0 corresponds to a completely transparent color. This
26102 # uses a wrapper message rather than a simple float scalar so that it is
26103 # possible to distinguish between a default value and the value being unset.
26104 # If omitted, this color object is to be rendered as a solid color
26105 # (as if the alpha value had been explicitly given with a value of 1.0).
26106 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
26107 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
26108 },
26109 "bold": True or False, # True if the text is bold.
26110 "strikethrough": True or False, # True if the text has a strikethrough.
26111 "fontFamily": "A String", # The font family.
26112 "fontSize": 42, # The size of the font.
26113 "italic": True or False, # True if the text is italicized.
26114 "underline": True or False, # True if the text is underlined.
26115 },
26116 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
26117 "borders": { # The borders of the cell. # The borders of the cell.
26118 "top": { # A border along a cell. # The top border of the cell.
26119 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
26120 # for simplicity of conversion to/from color representations in various
26121 # languages over compactness; for example, the fields of this representation
26122 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26123 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26124 # method in iOS; and, with just a little work, it can be easily formatted into
26125 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26126 #
26127 # Example (Java):
26128 #
26129 # import com.google.type.Color;
26130 #
26131 # // ...
26132 # public static java.awt.Color fromProto(Color protocolor) {
26133 # float alpha = protocolor.hasAlpha()
26134 # ? protocolor.getAlpha().getValue()
26135 # : 1.0;
26136 #
26137 # return new java.awt.Color(
26138 # protocolor.getRed(),
26139 # protocolor.getGreen(),
26140 # protocolor.getBlue(),
26141 # alpha);
26142 # }
26143 #
26144 # public static Color toProto(java.awt.Color color) {
26145 # float red = (float) color.getRed();
26146 # float green = (float) color.getGreen();
26147 # float blue = (float) color.getBlue();
26148 # float denominator = 255.0;
26149 # Color.Builder resultBuilder =
26150 # Color
26151 # .newBuilder()
26152 # .setRed(red / denominator)
26153 # .setGreen(green / denominator)
26154 # .setBlue(blue / denominator);
26155 # int alpha = color.getAlpha();
26156 # if (alpha != 255) {
26157 # result.setAlpha(
26158 # FloatValue
26159 # .newBuilder()
26160 # .setValue(((float) alpha) / denominator)
26161 # .build());
26162 # }
26163 # return resultBuilder.build();
26164 # }
26165 # // ...
26166 #
26167 # Example (iOS / Obj-C):
26168 #
26169 # // ...
26170 # static UIColor* fromProto(Color* protocolor) {
26171 # float red = [protocolor red];
26172 # float green = [protocolor green];
26173 # float blue = [protocolor blue];
26174 # FloatValue* alpha_wrapper = [protocolor alpha];
26175 # float alpha = 1.0;
26176 # if (alpha_wrapper != nil) {
26177 # alpha = [alpha_wrapper value];
26178 # }
26179 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26180 # }
26181 #
26182 # static Color* toProto(UIColor* color) {
26183 # CGFloat red, green, blue, alpha;
26184 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26185 # return nil;
26186 # }
26187 # Color* result = [Color alloc] init];
26188 # [result setRed:red];
26189 # [result setGreen:green];
26190 # [result setBlue:blue];
26191 # if (alpha <= 0.9999) {
26192 # [result setAlpha:floatWrapperWithValue(alpha)];
26193 # }
26194 # [result autorelease];
26195 # return result;
26196 # }
26197 # // ...
26198 #
26199 # Example (JavaScript):
26200 #
26201 # // ...
26202 #
26203 # var protoToCssColor = function(rgb_color) {
26204 # var redFrac = rgb_color.red || 0.0;
26205 # var greenFrac = rgb_color.green || 0.0;
26206 # var blueFrac = rgb_color.blue || 0.0;
26207 # var red = Math.floor(redFrac * 255);
26208 # var green = Math.floor(greenFrac * 255);
26209 # var blue = Math.floor(blueFrac * 255);
26210 #
26211 # if (!('alpha' in rgb_color)) {
26212 # return rgbToCssColor_(red, green, blue);
26213 # }
26214 #
26215 # var alphaFrac = rgb_color.alpha.value || 0.0;
26216 # var rgbParams = [red, green, blue].join(',');
26217 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
26218 # };
26219 #
26220 # var rgbToCssColor_ = function(red, green, blue) {
26221 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
26222 # var hexString = rgbNumber.toString(16);
26223 # var missingZeros = 6 - hexString.length;
26224 # var resultBuilder = ['#'];
26225 # for (var i = 0; i < missingZeros; i++) {
26226 # resultBuilder.push('0');
26227 # }
26228 # resultBuilder.push(hexString);
26229 # return resultBuilder.join('');
26230 # };
26231 #
26232 # // ...
26233 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
26234 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
26235 # the final pixel color is defined by the equation:
26236 #
26237 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
26238 #
26239 # This means that a value of 1.0 corresponds to a solid color, whereas
26240 # a value of 0.0 corresponds to a completely transparent color. This
26241 # uses a wrapper message rather than a simple float scalar so that it is
26242 # possible to distinguish between a default value and the value being unset.
26243 # If omitted, this color object is to be rendered as a solid color
26244 # (as if the alpha value had been explicitly given with a value of 1.0).
26245 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
26246 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
26247 },
26248 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070026249 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026250 "style": "A String", # The style of the border.
26251 },
26252 "right": { # A border along a cell. # The right border of the cell.
26253 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
26254 # for simplicity of conversion to/from color representations in various
26255 # languages over compactness; for example, the fields of this representation
26256 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26257 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26258 # method in iOS; and, with just a little work, it can be easily formatted into
26259 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26260 #
26261 # Example (Java):
26262 #
26263 # import com.google.type.Color;
26264 #
26265 # // ...
26266 # public static java.awt.Color fromProto(Color protocolor) {
26267 # float alpha = protocolor.hasAlpha()
26268 # ? protocolor.getAlpha().getValue()
26269 # : 1.0;
26270 #
26271 # return new java.awt.Color(
26272 # protocolor.getRed(),
26273 # protocolor.getGreen(),
26274 # protocolor.getBlue(),
26275 # alpha);
26276 # }
26277 #
26278 # public static Color toProto(java.awt.Color color) {
26279 # float red = (float) color.getRed();
26280 # float green = (float) color.getGreen();
26281 # float blue = (float) color.getBlue();
26282 # float denominator = 255.0;
26283 # Color.Builder resultBuilder =
26284 # Color
26285 # .newBuilder()
26286 # .setRed(red / denominator)
26287 # .setGreen(green / denominator)
26288 # .setBlue(blue / denominator);
26289 # int alpha = color.getAlpha();
26290 # if (alpha != 255) {
26291 # result.setAlpha(
26292 # FloatValue
26293 # .newBuilder()
26294 # .setValue(((float) alpha) / denominator)
26295 # .build());
26296 # }
26297 # return resultBuilder.build();
26298 # }
26299 # // ...
26300 #
26301 # Example (iOS / Obj-C):
26302 #
26303 # // ...
26304 # static UIColor* fromProto(Color* protocolor) {
26305 # float red = [protocolor red];
26306 # float green = [protocolor green];
26307 # float blue = [protocolor blue];
26308 # FloatValue* alpha_wrapper = [protocolor alpha];
26309 # float alpha = 1.0;
26310 # if (alpha_wrapper != nil) {
26311 # alpha = [alpha_wrapper value];
26312 # }
26313 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26314 # }
26315 #
26316 # static Color* toProto(UIColor* color) {
26317 # CGFloat red, green, blue, alpha;
26318 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26319 # return nil;
26320 # }
26321 # Color* result = [Color alloc] init];
26322 # [result setRed:red];
26323 # [result setGreen:green];
26324 # [result setBlue:blue];
26325 # if (alpha <= 0.9999) {
26326 # [result setAlpha:floatWrapperWithValue(alpha)];
26327 # }
26328 # [result autorelease];
26329 # return result;
26330 # }
26331 # // ...
26332 #
26333 # Example (JavaScript):
26334 #
26335 # // ...
26336 #
26337 # var protoToCssColor = function(rgb_color) {
26338 # var redFrac = rgb_color.red || 0.0;
26339 # var greenFrac = rgb_color.green || 0.0;
26340 # var blueFrac = rgb_color.blue || 0.0;
26341 # var red = Math.floor(redFrac * 255);
26342 # var green = Math.floor(greenFrac * 255);
26343 # var blue = Math.floor(blueFrac * 255);
26344 #
26345 # if (!('alpha' in rgb_color)) {
26346 # return rgbToCssColor_(red, green, blue);
26347 # }
26348 #
26349 # var alphaFrac = rgb_color.alpha.value || 0.0;
26350 # var rgbParams = [red, green, blue].join(',');
26351 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
26352 # };
26353 #
26354 # var rgbToCssColor_ = function(red, green, blue) {
26355 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
26356 # var hexString = rgbNumber.toString(16);
26357 # var missingZeros = 6 - hexString.length;
26358 # var resultBuilder = ['#'];
26359 # for (var i = 0; i < missingZeros; i++) {
26360 # resultBuilder.push('0');
26361 # }
26362 # resultBuilder.push(hexString);
26363 # return resultBuilder.join('');
26364 # };
26365 #
26366 # // ...
26367 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
26368 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
26369 # the final pixel color is defined by the equation:
26370 #
26371 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
26372 #
26373 # This means that a value of 1.0 corresponds to a solid color, whereas
26374 # a value of 0.0 corresponds to a completely transparent color. This
26375 # uses a wrapper message rather than a simple float scalar so that it is
26376 # possible to distinguish between a default value and the value being unset.
26377 # If omitted, this color object is to be rendered as a solid color
26378 # (as if the alpha value had been explicitly given with a value of 1.0).
26379 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
26380 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
26381 },
26382 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070026383 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026384 "style": "A String", # The style of the border.
26385 },
26386 "bottom": { # A border along a cell. # The bottom border of the cell.
26387 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
26388 # for simplicity of conversion to/from color representations in various
26389 # languages over compactness; for example, the fields of this representation
26390 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26391 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26392 # method in iOS; and, with just a little work, it can be easily formatted into
26393 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26394 #
26395 # Example (Java):
26396 #
26397 # import com.google.type.Color;
26398 #
26399 # // ...
26400 # public static java.awt.Color fromProto(Color protocolor) {
26401 # float alpha = protocolor.hasAlpha()
26402 # ? protocolor.getAlpha().getValue()
26403 # : 1.0;
26404 #
26405 # return new java.awt.Color(
26406 # protocolor.getRed(),
26407 # protocolor.getGreen(),
26408 # protocolor.getBlue(),
26409 # alpha);
26410 # }
26411 #
26412 # public static Color toProto(java.awt.Color color) {
26413 # float red = (float) color.getRed();
26414 # float green = (float) color.getGreen();
26415 # float blue = (float) color.getBlue();
26416 # float denominator = 255.0;
26417 # Color.Builder resultBuilder =
26418 # Color
26419 # .newBuilder()
26420 # .setRed(red / denominator)
26421 # .setGreen(green / denominator)
26422 # .setBlue(blue / denominator);
26423 # int alpha = color.getAlpha();
26424 # if (alpha != 255) {
26425 # result.setAlpha(
26426 # FloatValue
26427 # .newBuilder()
26428 # .setValue(((float) alpha) / denominator)
26429 # .build());
26430 # }
26431 # return resultBuilder.build();
26432 # }
26433 # // ...
26434 #
26435 # Example (iOS / Obj-C):
26436 #
26437 # // ...
26438 # static UIColor* fromProto(Color* protocolor) {
26439 # float red = [protocolor red];
26440 # float green = [protocolor green];
26441 # float blue = [protocolor blue];
26442 # FloatValue* alpha_wrapper = [protocolor alpha];
26443 # float alpha = 1.0;
26444 # if (alpha_wrapper != nil) {
26445 # alpha = [alpha_wrapper value];
26446 # }
26447 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26448 # }
26449 #
26450 # static Color* toProto(UIColor* color) {
26451 # CGFloat red, green, blue, alpha;
26452 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26453 # return nil;
26454 # }
26455 # Color* result = [Color alloc] init];
26456 # [result setRed:red];
26457 # [result setGreen:green];
26458 # [result setBlue:blue];
26459 # if (alpha <= 0.9999) {
26460 # [result setAlpha:floatWrapperWithValue(alpha)];
26461 # }
26462 # [result autorelease];
26463 # return result;
26464 # }
26465 # // ...
26466 #
26467 # Example (JavaScript):
26468 #
26469 # // ...
26470 #
26471 # var protoToCssColor = function(rgb_color) {
26472 # var redFrac = rgb_color.red || 0.0;
26473 # var greenFrac = rgb_color.green || 0.0;
26474 # var blueFrac = rgb_color.blue || 0.0;
26475 # var red = Math.floor(redFrac * 255);
26476 # var green = Math.floor(greenFrac * 255);
26477 # var blue = Math.floor(blueFrac * 255);
26478 #
26479 # if (!('alpha' in rgb_color)) {
26480 # return rgbToCssColor_(red, green, blue);
26481 # }
26482 #
26483 # var alphaFrac = rgb_color.alpha.value || 0.0;
26484 # var rgbParams = [red, green, blue].join(',');
26485 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
26486 # };
26487 #
26488 # var rgbToCssColor_ = function(red, green, blue) {
26489 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
26490 # var hexString = rgbNumber.toString(16);
26491 # var missingZeros = 6 - hexString.length;
26492 # var resultBuilder = ['#'];
26493 # for (var i = 0; i < missingZeros; i++) {
26494 # resultBuilder.push('0');
26495 # }
26496 # resultBuilder.push(hexString);
26497 # return resultBuilder.join('');
26498 # };
26499 #
26500 # // ...
26501 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
26502 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
26503 # the final pixel color is defined by the equation:
26504 #
26505 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
26506 #
26507 # This means that a value of 1.0 corresponds to a solid color, whereas
26508 # a value of 0.0 corresponds to a completely transparent color. This
26509 # uses a wrapper message rather than a simple float scalar so that it is
26510 # possible to distinguish between a default value and the value being unset.
26511 # If omitted, this color object is to be rendered as a solid color
26512 # (as if the alpha value had been explicitly given with a value of 1.0).
26513 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
26514 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
26515 },
26516 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070026517 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026518 "style": "A String", # The style of the border.
26519 },
26520 "left": { # A border along a cell. # The left border of the cell.
26521 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
26522 # for simplicity of conversion to/from color representations in various
26523 # languages over compactness; for example, the fields of this representation
26524 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26525 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26526 # method in iOS; and, with just a little work, it can be easily formatted into
26527 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26528 #
26529 # Example (Java):
26530 #
26531 # import com.google.type.Color;
26532 #
26533 # // ...
26534 # public static java.awt.Color fromProto(Color protocolor) {
26535 # float alpha = protocolor.hasAlpha()
26536 # ? protocolor.getAlpha().getValue()
26537 # : 1.0;
26538 #
26539 # return new java.awt.Color(
26540 # protocolor.getRed(),
26541 # protocolor.getGreen(),
26542 # protocolor.getBlue(),
26543 # alpha);
26544 # }
26545 #
26546 # public static Color toProto(java.awt.Color color) {
26547 # float red = (float) color.getRed();
26548 # float green = (float) color.getGreen();
26549 # float blue = (float) color.getBlue();
26550 # float denominator = 255.0;
26551 # Color.Builder resultBuilder =
26552 # Color
26553 # .newBuilder()
26554 # .setRed(red / denominator)
26555 # .setGreen(green / denominator)
26556 # .setBlue(blue / denominator);
26557 # int alpha = color.getAlpha();
26558 # if (alpha != 255) {
26559 # result.setAlpha(
26560 # FloatValue
26561 # .newBuilder()
26562 # .setValue(((float) alpha) / denominator)
26563 # .build());
26564 # }
26565 # return resultBuilder.build();
26566 # }
26567 # // ...
26568 #
26569 # Example (iOS / Obj-C):
26570 #
26571 # // ...
26572 # static UIColor* fromProto(Color* protocolor) {
26573 # float red = [protocolor red];
26574 # float green = [protocolor green];
26575 # float blue = [protocolor blue];
26576 # FloatValue* alpha_wrapper = [protocolor alpha];
26577 # float alpha = 1.0;
26578 # if (alpha_wrapper != nil) {
26579 # alpha = [alpha_wrapper value];
26580 # }
26581 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26582 # }
26583 #
26584 # static Color* toProto(UIColor* color) {
26585 # CGFloat red, green, blue, alpha;
26586 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26587 # return nil;
26588 # }
26589 # Color* result = [Color alloc] init];
26590 # [result setRed:red];
26591 # [result setGreen:green];
26592 # [result setBlue:blue];
26593 # if (alpha <= 0.9999) {
26594 # [result setAlpha:floatWrapperWithValue(alpha)];
26595 # }
26596 # [result autorelease];
26597 # return result;
26598 # }
26599 # // ...
26600 #
26601 # Example (JavaScript):
26602 #
26603 # // ...
26604 #
26605 # var protoToCssColor = function(rgb_color) {
26606 # var redFrac = rgb_color.red || 0.0;
26607 # var greenFrac = rgb_color.green || 0.0;
26608 # var blueFrac = rgb_color.blue || 0.0;
26609 # var red = Math.floor(redFrac * 255);
26610 # var green = Math.floor(greenFrac * 255);
26611 # var blue = Math.floor(blueFrac * 255);
26612 #
26613 # if (!('alpha' in rgb_color)) {
26614 # return rgbToCssColor_(red, green, blue);
26615 # }
26616 #
26617 # var alphaFrac = rgb_color.alpha.value || 0.0;
26618 # var rgbParams = [red, green, blue].join(',');
26619 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
26620 # };
26621 #
26622 # var rgbToCssColor_ = function(red, green, blue) {
26623 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
26624 # var hexString = rgbNumber.toString(16);
26625 # var missingZeros = 6 - hexString.length;
26626 # var resultBuilder = ['#'];
26627 # for (var i = 0; i < missingZeros; i++) {
26628 # resultBuilder.push('0');
26629 # }
26630 # resultBuilder.push(hexString);
26631 # return resultBuilder.join('');
26632 # };
26633 #
26634 # // ...
26635 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
26636 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
26637 # the final pixel color is defined by the equation:
26638 #
26639 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
26640 #
26641 # This means that a value of 1.0 corresponds to a solid color, whereas
26642 # a value of 0.0 corresponds to a completely transparent color. This
26643 # uses a wrapper message rather than a simple float scalar so that it is
26644 # possible to distinguish between a default value and the value being unset.
26645 # If omitted, this color object is to be rendered as a solid color
26646 # (as if the alpha value had been explicitly given with a value of 1.0).
26647 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
26648 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
26649 },
26650 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070026651 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026652 "style": "A String", # The style of the border.
26653 },
26654 },
26655 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
26656 },
26657 },
26658 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
26659 # the interpolation points listed. The format of a cell will vary
26660 # based on its contents as compared to the values of the interpolation
26661 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026662 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026663 # These pin the gradient color scale according to the color,
26664 # type and value chosen.
26665 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
26666 # for simplicity of conversion to/from color representations in various
26667 # languages over compactness; for example, the fields of this representation
26668 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26669 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26670 # method in iOS; and, with just a little work, it can be easily formatted into
26671 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26672 #
26673 # Example (Java):
26674 #
26675 # import com.google.type.Color;
26676 #
26677 # // ...
26678 # public static java.awt.Color fromProto(Color protocolor) {
26679 # float alpha = protocolor.hasAlpha()
26680 # ? protocolor.getAlpha().getValue()
26681 # : 1.0;
26682 #
26683 # return new java.awt.Color(
26684 # protocolor.getRed(),
26685 # protocolor.getGreen(),
26686 # protocolor.getBlue(),
26687 # alpha);
26688 # }
26689 #
26690 # public static Color toProto(java.awt.Color color) {
26691 # float red = (float) color.getRed();
26692 # float green = (float) color.getGreen();
26693 # float blue = (float) color.getBlue();
26694 # float denominator = 255.0;
26695 # Color.Builder resultBuilder =
26696 # Color
26697 # .newBuilder()
26698 # .setRed(red / denominator)
26699 # .setGreen(green / denominator)
26700 # .setBlue(blue / denominator);
26701 # int alpha = color.getAlpha();
26702 # if (alpha != 255) {
26703 # result.setAlpha(
26704 # FloatValue
26705 # .newBuilder()
26706 # .setValue(((float) alpha) / denominator)
26707 # .build());
26708 # }
26709 # return resultBuilder.build();
26710 # }
26711 # // ...
26712 #
26713 # Example (iOS / Obj-C):
26714 #
26715 # // ...
26716 # static UIColor* fromProto(Color* protocolor) {
26717 # float red = [protocolor red];
26718 # float green = [protocolor green];
26719 # float blue = [protocolor blue];
26720 # FloatValue* alpha_wrapper = [protocolor alpha];
26721 # float alpha = 1.0;
26722 # if (alpha_wrapper != nil) {
26723 # alpha = [alpha_wrapper value];
26724 # }
26725 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26726 # }
26727 #
26728 # static Color* toProto(UIColor* color) {
26729 # CGFloat red, green, blue, alpha;
26730 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26731 # return nil;
26732 # }
26733 # Color* result = [Color alloc] init];
26734 # [result setRed:red];
26735 # [result setGreen:green];
26736 # [result setBlue:blue];
26737 # if (alpha <= 0.9999) {
26738 # [result setAlpha:floatWrapperWithValue(alpha)];
26739 # }
26740 # [result autorelease];
26741 # return result;
26742 # }
26743 # // ...
26744 #
26745 # Example (JavaScript):
26746 #
26747 # // ...
26748 #
26749 # var protoToCssColor = function(rgb_color) {
26750 # var redFrac = rgb_color.red || 0.0;
26751 # var greenFrac = rgb_color.green || 0.0;
26752 # var blueFrac = rgb_color.blue || 0.0;
26753 # var red = Math.floor(redFrac * 255);
26754 # var green = Math.floor(greenFrac * 255);
26755 # var blue = Math.floor(blueFrac * 255);
26756 #
26757 # if (!('alpha' in rgb_color)) {
26758 # return rgbToCssColor_(red, green, blue);
26759 # }
26760 #
26761 # var alphaFrac = rgb_color.alpha.value || 0.0;
26762 # var rgbParams = [red, green, blue].join(',');
26763 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
26764 # };
26765 #
26766 # var rgbToCssColor_ = function(red, green, blue) {
26767 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
26768 # var hexString = rgbNumber.toString(16);
26769 # var missingZeros = 6 - hexString.length;
26770 # var resultBuilder = ['#'];
26771 # for (var i = 0; i < missingZeros; i++) {
26772 # resultBuilder.push('0');
26773 # }
26774 # resultBuilder.push(hexString);
26775 # return resultBuilder.join('');
26776 # };
26777 #
26778 # // ...
26779 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
26780 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
26781 # the final pixel color is defined by the equation:
26782 #
26783 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
26784 #
26785 # This means that a value of 1.0 corresponds to a solid color, whereas
26786 # a value of 0.0 corresponds to a completely transparent color. This
26787 # uses a wrapper message rather than a simple float scalar so that it is
26788 # possible to distinguish between a default value and the value being unset.
26789 # If omitted, this color object is to be rendered as a solid color
26790 # (as if the alpha value had been explicitly given with a value of 1.0).
26791 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
26792 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
26793 },
26794 "type": "A String", # How the value should be interpreted.
26795 "value": "A String", # The value this interpolation point uses. May be a formula.
26796 # Unused if type is MIN or
26797 # MAX.
26798 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026799 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026800 # These pin the gradient color scale according to the color,
26801 # type and value chosen.
26802 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
26803 # for simplicity of conversion to/from color representations in various
26804 # languages over compactness; for example, the fields of this representation
26805 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26806 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26807 # method in iOS; and, with just a little work, it can be easily formatted into
26808 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26809 #
26810 # Example (Java):
26811 #
26812 # import com.google.type.Color;
26813 #
26814 # // ...
26815 # public static java.awt.Color fromProto(Color protocolor) {
26816 # float alpha = protocolor.hasAlpha()
26817 # ? protocolor.getAlpha().getValue()
26818 # : 1.0;
26819 #
26820 # return new java.awt.Color(
26821 # protocolor.getRed(),
26822 # protocolor.getGreen(),
26823 # protocolor.getBlue(),
26824 # alpha);
26825 # }
26826 #
26827 # public static Color toProto(java.awt.Color color) {
26828 # float red = (float) color.getRed();
26829 # float green = (float) color.getGreen();
26830 # float blue = (float) color.getBlue();
26831 # float denominator = 255.0;
26832 # Color.Builder resultBuilder =
26833 # Color
26834 # .newBuilder()
26835 # .setRed(red / denominator)
26836 # .setGreen(green / denominator)
26837 # .setBlue(blue / denominator);
26838 # int alpha = color.getAlpha();
26839 # if (alpha != 255) {
26840 # result.setAlpha(
26841 # FloatValue
26842 # .newBuilder()
26843 # .setValue(((float) alpha) / denominator)
26844 # .build());
26845 # }
26846 # return resultBuilder.build();
26847 # }
26848 # // ...
26849 #
26850 # Example (iOS / Obj-C):
26851 #
26852 # // ...
26853 # static UIColor* fromProto(Color* protocolor) {
26854 # float red = [protocolor red];
26855 # float green = [protocolor green];
26856 # float blue = [protocolor blue];
26857 # FloatValue* alpha_wrapper = [protocolor alpha];
26858 # float alpha = 1.0;
26859 # if (alpha_wrapper != nil) {
26860 # alpha = [alpha_wrapper value];
26861 # }
26862 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26863 # }
26864 #
26865 # static Color* toProto(UIColor* color) {
26866 # CGFloat red, green, blue, alpha;
26867 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26868 # return nil;
26869 # }
26870 # Color* result = [Color alloc] init];
26871 # [result setRed:red];
26872 # [result setGreen:green];
26873 # [result setBlue:blue];
26874 # if (alpha <= 0.9999) {
26875 # [result setAlpha:floatWrapperWithValue(alpha)];
26876 # }
26877 # [result autorelease];
26878 # return result;
26879 # }
26880 # // ...
26881 #
26882 # Example (JavaScript):
26883 #
26884 # // ...
26885 #
26886 # var protoToCssColor = function(rgb_color) {
26887 # var redFrac = rgb_color.red || 0.0;
26888 # var greenFrac = rgb_color.green || 0.0;
26889 # var blueFrac = rgb_color.blue || 0.0;
26890 # var red = Math.floor(redFrac * 255);
26891 # var green = Math.floor(greenFrac * 255);
26892 # var blue = Math.floor(blueFrac * 255);
26893 #
26894 # if (!('alpha' in rgb_color)) {
26895 # return rgbToCssColor_(red, green, blue);
26896 # }
26897 #
26898 # var alphaFrac = rgb_color.alpha.value || 0.0;
26899 # var rgbParams = [red, green, blue].join(',');
26900 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
26901 # };
26902 #
26903 # var rgbToCssColor_ = function(red, green, blue) {
26904 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
26905 # var hexString = rgbNumber.toString(16);
26906 # var missingZeros = 6 - hexString.length;
26907 # var resultBuilder = ['#'];
26908 # for (var i = 0; i < missingZeros; i++) {
26909 # resultBuilder.push('0');
26910 # }
26911 # resultBuilder.push(hexString);
26912 # return resultBuilder.join('');
26913 # };
26914 #
26915 # // ...
26916 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
26917 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
26918 # the final pixel color is defined by the equation:
26919 #
26920 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
26921 #
26922 # This means that a value of 1.0 corresponds to a solid color, whereas
26923 # a value of 0.0 corresponds to a completely transparent color. This
26924 # uses a wrapper message rather than a simple float scalar so that it is
26925 # possible to distinguish between a default value and the value being unset.
26926 # If omitted, this color object is to be rendered as a solid color
26927 # (as if the alpha value had been explicitly given with a value of 1.0).
26928 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
26929 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
26930 },
26931 "type": "A String", # How the value should be interpreted.
26932 "value": "A String", # The value this interpolation point uses. May be a formula.
26933 # Unused if type is MIN or
26934 # MAX.
26935 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026936 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026937 # These pin the gradient color scale according to the color,
26938 # type and value chosen.
26939 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
26940 # for simplicity of conversion to/from color representations in various
26941 # languages over compactness; for example, the fields of this representation
26942 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26943 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26944 # method in iOS; and, with just a little work, it can be easily formatted into
26945 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26946 #
26947 # Example (Java):
26948 #
26949 # import com.google.type.Color;
26950 #
26951 # // ...
26952 # public static java.awt.Color fromProto(Color protocolor) {
26953 # float alpha = protocolor.hasAlpha()
26954 # ? protocolor.getAlpha().getValue()
26955 # : 1.0;
26956 #
26957 # return new java.awt.Color(
26958 # protocolor.getRed(),
26959 # protocolor.getGreen(),
26960 # protocolor.getBlue(),
26961 # alpha);
26962 # }
26963 #
26964 # public static Color toProto(java.awt.Color color) {
26965 # float red = (float) color.getRed();
26966 # float green = (float) color.getGreen();
26967 # float blue = (float) color.getBlue();
26968 # float denominator = 255.0;
26969 # Color.Builder resultBuilder =
26970 # Color
26971 # .newBuilder()
26972 # .setRed(red / denominator)
26973 # .setGreen(green / denominator)
26974 # .setBlue(blue / denominator);
26975 # int alpha = color.getAlpha();
26976 # if (alpha != 255) {
26977 # result.setAlpha(
26978 # FloatValue
26979 # .newBuilder()
26980 # .setValue(((float) alpha) / denominator)
26981 # .build());
26982 # }
26983 # return resultBuilder.build();
26984 # }
26985 # // ...
26986 #
26987 # Example (iOS / Obj-C):
26988 #
26989 # // ...
26990 # static UIColor* fromProto(Color* protocolor) {
26991 # float red = [protocolor red];
26992 # float green = [protocolor green];
26993 # float blue = [protocolor blue];
26994 # FloatValue* alpha_wrapper = [protocolor alpha];
26995 # float alpha = 1.0;
26996 # if (alpha_wrapper != nil) {
26997 # alpha = [alpha_wrapper value];
26998 # }
26999 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27000 # }
27001 #
27002 # static Color* toProto(UIColor* color) {
27003 # CGFloat red, green, blue, alpha;
27004 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27005 # return nil;
27006 # }
27007 # Color* result = [Color alloc] init];
27008 # [result setRed:red];
27009 # [result setGreen:green];
27010 # [result setBlue:blue];
27011 # if (alpha <= 0.9999) {
27012 # [result setAlpha:floatWrapperWithValue(alpha)];
27013 # }
27014 # [result autorelease];
27015 # return result;
27016 # }
27017 # // ...
27018 #
27019 # Example (JavaScript):
27020 #
27021 # // ...
27022 #
27023 # var protoToCssColor = function(rgb_color) {
27024 # var redFrac = rgb_color.red || 0.0;
27025 # var greenFrac = rgb_color.green || 0.0;
27026 # var blueFrac = rgb_color.blue || 0.0;
27027 # var red = Math.floor(redFrac * 255);
27028 # var green = Math.floor(greenFrac * 255);
27029 # var blue = Math.floor(blueFrac * 255);
27030 #
27031 # if (!('alpha' in rgb_color)) {
27032 # return rgbToCssColor_(red, green, blue);
27033 # }
27034 #
27035 # var alphaFrac = rgb_color.alpha.value || 0.0;
27036 # var rgbParams = [red, green, blue].join(',');
27037 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27038 # };
27039 #
27040 # var rgbToCssColor_ = function(red, green, blue) {
27041 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27042 # var hexString = rgbNumber.toString(16);
27043 # var missingZeros = 6 - hexString.length;
27044 # var resultBuilder = ['#'];
27045 # for (var i = 0; i < missingZeros; i++) {
27046 # resultBuilder.push('0');
27047 # }
27048 # resultBuilder.push(hexString);
27049 # return resultBuilder.join('');
27050 # };
27051 #
27052 # // ...
27053 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27054 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27055 # the final pixel color is defined by the equation:
27056 #
27057 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27058 #
27059 # This means that a value of 1.0 corresponds to a solid color, whereas
27060 # a value of 0.0 corresponds to a completely transparent color. This
27061 # uses a wrapper message rather than a simple float scalar so that it is
27062 # possible to distinguish between a default value and the value being unset.
27063 # If omitted, this color object is to be rendered as a solid color
27064 # (as if the alpha value had been explicitly given with a value of 1.0).
27065 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27066 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27067 },
27068 "type": "A String", # How the value should be interpreted.
27069 "value": "A String", # The value this interpolation point uses. May be a formula.
27070 # Unused if type is MIN or
27071 # MAX.
27072 },
27073 },
27074 },
27075 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080027076 "addBanding": { # The result of adding a banded range. # A reply from adding a banded range.
27077 "bandedRange": { # A banded (alternating colors) range in a sheet. # The banded range that was added.
27078 "range": { # A range on a sheet. # The range over which these properties are applied.
27079 # All indexes are zero-based.
27080 # Indexes are half open, e.g the start index is inclusive
27081 # and the end index is exclusive -- [start_index, end_index).
27082 # Missing indexes indicate the range is unbounded on that side.
27083 #
27084 # For example, if `"Sheet1"` is sheet ID 0, then:
27085 #
27086 # `Sheet1!A1:A1 == sheet_id: 0,
27087 # start_row_index: 0, end_row_index: 1,
27088 # start_column_index: 0, end_column_index: 1`
27089 #
27090 # `Sheet1!A3:B4 == sheet_id: 0,
27091 # start_row_index: 2, end_row_index: 4,
27092 # start_column_index: 0, end_column_index: 2`
27093 #
27094 # `Sheet1!A:B == sheet_id: 0,
27095 # start_column_index: 0, end_column_index: 2`
27096 #
27097 # `Sheet1!A5:B == sheet_id: 0,
27098 # start_row_index: 4,
27099 # start_column_index: 0, end_column_index: 2`
27100 #
27101 # `Sheet1 == sheet_id:0`
27102 #
27103 # The start index must always be less than or equal to the end index.
27104 # If the start index equals the end index, then the range is empty.
27105 # Empty ranges are typically not meaningful and are usually rendered in the
27106 # UI as `#REF!`.
27107 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
27108 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
27109 "sheetId": 42, # The sheet this range is on.
27110 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
27111 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
27112 },
27113 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
27114 # by-column basis throughout all the columns in the range. At least one of
27115 # row_properties or column_properties must be specified.
27116 # BandedRange.row_properties and BandedRange.column_properties are
27117 # set, the fill colors are applied to cells according to the following rules:
27118 #
27119 # * header_color and footer_color take priority over band colors.
27120 # * first_band_color takes priority over second_band_color.
27121 # * row_properties takes priority over column_properties.
27122 #
27123 # For example, the first row color takes priority over the first column
27124 # color, but the first column color takes priority over the second row color.
27125 # Similarly, the row header takes priority over the column header in the
27126 # top left cell, but the column header takes priority over the first row
27127 # color if the row header is not set.
27128 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
27129 # for simplicity of conversion to/from color representations in various
27130 # languages over compactness; for example, the fields of this representation
27131 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27132 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27133 # method in iOS; and, with just a little work, it can be easily formatted into
27134 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27135 #
27136 # Example (Java):
27137 #
27138 # import com.google.type.Color;
27139 #
27140 # // ...
27141 # public static java.awt.Color fromProto(Color protocolor) {
27142 # float alpha = protocolor.hasAlpha()
27143 # ? protocolor.getAlpha().getValue()
27144 # : 1.0;
27145 #
27146 # return new java.awt.Color(
27147 # protocolor.getRed(),
27148 # protocolor.getGreen(),
27149 # protocolor.getBlue(),
27150 # alpha);
27151 # }
27152 #
27153 # public static Color toProto(java.awt.Color color) {
27154 # float red = (float) color.getRed();
27155 # float green = (float) color.getGreen();
27156 # float blue = (float) color.getBlue();
27157 # float denominator = 255.0;
27158 # Color.Builder resultBuilder =
27159 # Color
27160 # .newBuilder()
27161 # .setRed(red / denominator)
27162 # .setGreen(green / denominator)
27163 # .setBlue(blue / denominator);
27164 # int alpha = color.getAlpha();
27165 # if (alpha != 255) {
27166 # result.setAlpha(
27167 # FloatValue
27168 # .newBuilder()
27169 # .setValue(((float) alpha) / denominator)
27170 # .build());
27171 # }
27172 # return resultBuilder.build();
27173 # }
27174 # // ...
27175 #
27176 # Example (iOS / Obj-C):
27177 #
27178 # // ...
27179 # static UIColor* fromProto(Color* protocolor) {
27180 # float red = [protocolor red];
27181 # float green = [protocolor green];
27182 # float blue = [protocolor blue];
27183 # FloatValue* alpha_wrapper = [protocolor alpha];
27184 # float alpha = 1.0;
27185 # if (alpha_wrapper != nil) {
27186 # alpha = [alpha_wrapper value];
27187 # }
27188 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27189 # }
27190 #
27191 # static Color* toProto(UIColor* color) {
27192 # CGFloat red, green, blue, alpha;
27193 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27194 # return nil;
27195 # }
27196 # Color* result = [Color alloc] init];
27197 # [result setRed:red];
27198 # [result setGreen:green];
27199 # [result setBlue:blue];
27200 # if (alpha <= 0.9999) {
27201 # [result setAlpha:floatWrapperWithValue(alpha)];
27202 # }
27203 # [result autorelease];
27204 # return result;
27205 # }
27206 # // ...
27207 #
27208 # Example (JavaScript):
27209 #
27210 # // ...
27211 #
27212 # var protoToCssColor = function(rgb_color) {
27213 # var redFrac = rgb_color.red || 0.0;
27214 # var greenFrac = rgb_color.green || 0.0;
27215 # var blueFrac = rgb_color.blue || 0.0;
27216 # var red = Math.floor(redFrac * 255);
27217 # var green = Math.floor(greenFrac * 255);
27218 # var blue = Math.floor(blueFrac * 255);
27219 #
27220 # if (!('alpha' in rgb_color)) {
27221 # return rgbToCssColor_(red, green, blue);
27222 # }
27223 #
27224 # var alphaFrac = rgb_color.alpha.value || 0.0;
27225 # var rgbParams = [red, green, blue].join(',');
27226 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27227 # };
27228 #
27229 # var rgbToCssColor_ = function(red, green, blue) {
27230 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27231 # var hexString = rgbNumber.toString(16);
27232 # var missingZeros = 6 - hexString.length;
27233 # var resultBuilder = ['#'];
27234 # for (var i = 0; i < missingZeros; i++) {
27235 # resultBuilder.push('0');
27236 # }
27237 # resultBuilder.push(hexString);
27238 # return resultBuilder.join('');
27239 # };
27240 #
27241 # // ...
27242 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27243 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27244 # the final pixel color is defined by the equation:
27245 #
27246 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27247 #
27248 # This means that a value of 1.0 corresponds to a solid color, whereas
27249 # a value of 0.0 corresponds to a completely transparent color. This
27250 # uses a wrapper message rather than a simple float scalar so that it is
27251 # possible to distinguish between a default value and the value being unset.
27252 # If omitted, this color object is to be rendered as a solid color
27253 # (as if the alpha value had been explicitly given with a value of 1.0).
27254 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27255 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27256 },
27257 "headerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the first row or column. If this field is set, the first
27258 # row or column will be filled with this color and the colors will
27259 # alternate between first_band_color and second_band_color starting
27260 # from the second row or column. Otherwise, the first row or column will be
27261 # filled with first_band_color and the colors will proceed to alternate
27262 # as they normally would.
27263 # for simplicity of conversion to/from color representations in various
27264 # languages over compactness; for example, the fields of this representation
27265 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27266 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27267 # method in iOS; and, with just a little work, it can be easily formatted into
27268 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27269 #
27270 # Example (Java):
27271 #
27272 # import com.google.type.Color;
27273 #
27274 # // ...
27275 # public static java.awt.Color fromProto(Color protocolor) {
27276 # float alpha = protocolor.hasAlpha()
27277 # ? protocolor.getAlpha().getValue()
27278 # : 1.0;
27279 #
27280 # return new java.awt.Color(
27281 # protocolor.getRed(),
27282 # protocolor.getGreen(),
27283 # protocolor.getBlue(),
27284 # alpha);
27285 # }
27286 #
27287 # public static Color toProto(java.awt.Color color) {
27288 # float red = (float) color.getRed();
27289 # float green = (float) color.getGreen();
27290 # float blue = (float) color.getBlue();
27291 # float denominator = 255.0;
27292 # Color.Builder resultBuilder =
27293 # Color
27294 # .newBuilder()
27295 # .setRed(red / denominator)
27296 # .setGreen(green / denominator)
27297 # .setBlue(blue / denominator);
27298 # int alpha = color.getAlpha();
27299 # if (alpha != 255) {
27300 # result.setAlpha(
27301 # FloatValue
27302 # .newBuilder()
27303 # .setValue(((float) alpha) / denominator)
27304 # .build());
27305 # }
27306 # return resultBuilder.build();
27307 # }
27308 # // ...
27309 #
27310 # Example (iOS / Obj-C):
27311 #
27312 # // ...
27313 # static UIColor* fromProto(Color* protocolor) {
27314 # float red = [protocolor red];
27315 # float green = [protocolor green];
27316 # float blue = [protocolor blue];
27317 # FloatValue* alpha_wrapper = [protocolor alpha];
27318 # float alpha = 1.0;
27319 # if (alpha_wrapper != nil) {
27320 # alpha = [alpha_wrapper value];
27321 # }
27322 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27323 # }
27324 #
27325 # static Color* toProto(UIColor* color) {
27326 # CGFloat red, green, blue, alpha;
27327 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27328 # return nil;
27329 # }
27330 # Color* result = [Color alloc] init];
27331 # [result setRed:red];
27332 # [result setGreen:green];
27333 # [result setBlue:blue];
27334 # if (alpha <= 0.9999) {
27335 # [result setAlpha:floatWrapperWithValue(alpha)];
27336 # }
27337 # [result autorelease];
27338 # return result;
27339 # }
27340 # // ...
27341 #
27342 # Example (JavaScript):
27343 #
27344 # // ...
27345 #
27346 # var protoToCssColor = function(rgb_color) {
27347 # var redFrac = rgb_color.red || 0.0;
27348 # var greenFrac = rgb_color.green || 0.0;
27349 # var blueFrac = rgb_color.blue || 0.0;
27350 # var red = Math.floor(redFrac * 255);
27351 # var green = Math.floor(greenFrac * 255);
27352 # var blue = Math.floor(blueFrac * 255);
27353 #
27354 # if (!('alpha' in rgb_color)) {
27355 # return rgbToCssColor_(red, green, blue);
27356 # }
27357 #
27358 # var alphaFrac = rgb_color.alpha.value || 0.0;
27359 # var rgbParams = [red, green, blue].join(',');
27360 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27361 # };
27362 #
27363 # var rgbToCssColor_ = function(red, green, blue) {
27364 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27365 # var hexString = rgbNumber.toString(16);
27366 # var missingZeros = 6 - hexString.length;
27367 # var resultBuilder = ['#'];
27368 # for (var i = 0; i < missingZeros; i++) {
27369 # resultBuilder.push('0');
27370 # }
27371 # resultBuilder.push(hexString);
27372 # return resultBuilder.join('');
27373 # };
27374 #
27375 # // ...
27376 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27377 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27378 # the final pixel color is defined by the equation:
27379 #
27380 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27381 #
27382 # This means that a value of 1.0 corresponds to a solid color, whereas
27383 # a value of 0.0 corresponds to a completely transparent color. This
27384 # uses a wrapper message rather than a simple float scalar so that it is
27385 # possible to distinguish between a default value and the value being unset.
27386 # If omitted, this color object is to be rendered as a solid color
27387 # (as if the alpha value had been explicitly given with a value of 1.0).
27388 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27389 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27390 },
27391 "footerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the last row or column. If this field is not set, the last
27392 # row or column will be filled with either first_band_color or
27393 # second_band_color, depending on the color of the previous row or
27394 # column.
27395 # for simplicity of conversion to/from color representations in various
27396 # languages over compactness; for example, the fields of this representation
27397 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27398 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27399 # method in iOS; and, with just a little work, it can be easily formatted into
27400 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27401 #
27402 # Example (Java):
27403 #
27404 # import com.google.type.Color;
27405 #
27406 # // ...
27407 # public static java.awt.Color fromProto(Color protocolor) {
27408 # float alpha = protocolor.hasAlpha()
27409 # ? protocolor.getAlpha().getValue()
27410 # : 1.0;
27411 #
27412 # return new java.awt.Color(
27413 # protocolor.getRed(),
27414 # protocolor.getGreen(),
27415 # protocolor.getBlue(),
27416 # alpha);
27417 # }
27418 #
27419 # public static Color toProto(java.awt.Color color) {
27420 # float red = (float) color.getRed();
27421 # float green = (float) color.getGreen();
27422 # float blue = (float) color.getBlue();
27423 # float denominator = 255.0;
27424 # Color.Builder resultBuilder =
27425 # Color
27426 # .newBuilder()
27427 # .setRed(red / denominator)
27428 # .setGreen(green / denominator)
27429 # .setBlue(blue / denominator);
27430 # int alpha = color.getAlpha();
27431 # if (alpha != 255) {
27432 # result.setAlpha(
27433 # FloatValue
27434 # .newBuilder()
27435 # .setValue(((float) alpha) / denominator)
27436 # .build());
27437 # }
27438 # return resultBuilder.build();
27439 # }
27440 # // ...
27441 #
27442 # Example (iOS / Obj-C):
27443 #
27444 # // ...
27445 # static UIColor* fromProto(Color* protocolor) {
27446 # float red = [protocolor red];
27447 # float green = [protocolor green];
27448 # float blue = [protocolor blue];
27449 # FloatValue* alpha_wrapper = [protocolor alpha];
27450 # float alpha = 1.0;
27451 # if (alpha_wrapper != nil) {
27452 # alpha = [alpha_wrapper value];
27453 # }
27454 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27455 # }
27456 #
27457 # static Color* toProto(UIColor* color) {
27458 # CGFloat red, green, blue, alpha;
27459 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27460 # return nil;
27461 # }
27462 # Color* result = [Color alloc] init];
27463 # [result setRed:red];
27464 # [result setGreen:green];
27465 # [result setBlue:blue];
27466 # if (alpha <= 0.9999) {
27467 # [result setAlpha:floatWrapperWithValue(alpha)];
27468 # }
27469 # [result autorelease];
27470 # return result;
27471 # }
27472 # // ...
27473 #
27474 # Example (JavaScript):
27475 #
27476 # // ...
27477 #
27478 # var protoToCssColor = function(rgb_color) {
27479 # var redFrac = rgb_color.red || 0.0;
27480 # var greenFrac = rgb_color.green || 0.0;
27481 # var blueFrac = rgb_color.blue || 0.0;
27482 # var red = Math.floor(redFrac * 255);
27483 # var green = Math.floor(greenFrac * 255);
27484 # var blue = Math.floor(blueFrac * 255);
27485 #
27486 # if (!('alpha' in rgb_color)) {
27487 # return rgbToCssColor_(red, green, blue);
27488 # }
27489 #
27490 # var alphaFrac = rgb_color.alpha.value || 0.0;
27491 # var rgbParams = [red, green, blue].join(',');
27492 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27493 # };
27494 #
27495 # var rgbToCssColor_ = function(red, green, blue) {
27496 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27497 # var hexString = rgbNumber.toString(16);
27498 # var missingZeros = 6 - hexString.length;
27499 # var resultBuilder = ['#'];
27500 # for (var i = 0; i < missingZeros; i++) {
27501 # resultBuilder.push('0');
27502 # }
27503 # resultBuilder.push(hexString);
27504 # return resultBuilder.join('');
27505 # };
27506 #
27507 # // ...
27508 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27509 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27510 # the final pixel color is defined by the equation:
27511 #
27512 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27513 #
27514 # This means that a value of 1.0 corresponds to a solid color, whereas
27515 # a value of 0.0 corresponds to a completely transparent color. This
27516 # uses a wrapper message rather than a simple float scalar so that it is
27517 # possible to distinguish between a default value and the value being unset.
27518 # If omitted, this color object is to be rendered as a solid color
27519 # (as if the alpha value had been explicitly given with a value of 1.0).
27520 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27521 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27522 },
27523 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
27524 # for simplicity of conversion to/from color representations in various
27525 # languages over compactness; for example, the fields of this representation
27526 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27527 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27528 # method in iOS; and, with just a little work, it can be easily formatted into
27529 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27530 #
27531 # Example (Java):
27532 #
27533 # import com.google.type.Color;
27534 #
27535 # // ...
27536 # public static java.awt.Color fromProto(Color protocolor) {
27537 # float alpha = protocolor.hasAlpha()
27538 # ? protocolor.getAlpha().getValue()
27539 # : 1.0;
27540 #
27541 # return new java.awt.Color(
27542 # protocolor.getRed(),
27543 # protocolor.getGreen(),
27544 # protocolor.getBlue(),
27545 # alpha);
27546 # }
27547 #
27548 # public static Color toProto(java.awt.Color color) {
27549 # float red = (float) color.getRed();
27550 # float green = (float) color.getGreen();
27551 # float blue = (float) color.getBlue();
27552 # float denominator = 255.0;
27553 # Color.Builder resultBuilder =
27554 # Color
27555 # .newBuilder()
27556 # .setRed(red / denominator)
27557 # .setGreen(green / denominator)
27558 # .setBlue(blue / denominator);
27559 # int alpha = color.getAlpha();
27560 # if (alpha != 255) {
27561 # result.setAlpha(
27562 # FloatValue
27563 # .newBuilder()
27564 # .setValue(((float) alpha) / denominator)
27565 # .build());
27566 # }
27567 # return resultBuilder.build();
27568 # }
27569 # // ...
27570 #
27571 # Example (iOS / Obj-C):
27572 #
27573 # // ...
27574 # static UIColor* fromProto(Color* protocolor) {
27575 # float red = [protocolor red];
27576 # float green = [protocolor green];
27577 # float blue = [protocolor blue];
27578 # FloatValue* alpha_wrapper = [protocolor alpha];
27579 # float alpha = 1.0;
27580 # if (alpha_wrapper != nil) {
27581 # alpha = [alpha_wrapper value];
27582 # }
27583 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27584 # }
27585 #
27586 # static Color* toProto(UIColor* color) {
27587 # CGFloat red, green, blue, alpha;
27588 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27589 # return nil;
27590 # }
27591 # Color* result = [Color alloc] init];
27592 # [result setRed:red];
27593 # [result setGreen:green];
27594 # [result setBlue:blue];
27595 # if (alpha <= 0.9999) {
27596 # [result setAlpha:floatWrapperWithValue(alpha)];
27597 # }
27598 # [result autorelease];
27599 # return result;
27600 # }
27601 # // ...
27602 #
27603 # Example (JavaScript):
27604 #
27605 # // ...
27606 #
27607 # var protoToCssColor = function(rgb_color) {
27608 # var redFrac = rgb_color.red || 0.0;
27609 # var greenFrac = rgb_color.green || 0.0;
27610 # var blueFrac = rgb_color.blue || 0.0;
27611 # var red = Math.floor(redFrac * 255);
27612 # var green = Math.floor(greenFrac * 255);
27613 # var blue = Math.floor(blueFrac * 255);
27614 #
27615 # if (!('alpha' in rgb_color)) {
27616 # return rgbToCssColor_(red, green, blue);
27617 # }
27618 #
27619 # var alphaFrac = rgb_color.alpha.value || 0.0;
27620 # var rgbParams = [red, green, blue].join(',');
27621 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27622 # };
27623 #
27624 # var rgbToCssColor_ = function(red, green, blue) {
27625 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27626 # var hexString = rgbNumber.toString(16);
27627 # var missingZeros = 6 - hexString.length;
27628 # var resultBuilder = ['#'];
27629 # for (var i = 0; i < missingZeros; i++) {
27630 # resultBuilder.push('0');
27631 # }
27632 # resultBuilder.push(hexString);
27633 # return resultBuilder.join('');
27634 # };
27635 #
27636 # // ...
27637 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27638 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27639 # the final pixel color is defined by the equation:
27640 #
27641 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27642 #
27643 # This means that a value of 1.0 corresponds to a solid color, whereas
27644 # a value of 0.0 corresponds to a completely transparent color. This
27645 # uses a wrapper message rather than a simple float scalar so that it is
27646 # possible to distinguish between a default value and the value being unset.
27647 # If omitted, this color object is to be rendered as a solid color
27648 # (as if the alpha value had been explicitly given with a value of 1.0).
27649 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27650 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27651 },
27652 },
27653 "rowProperties": { # Properties referring a single dimension (either row or column). If both # Properties for row bands. These properties will be applied on a row-by-row
27654 # basis throughout all the rows in the range. At least one of
27655 # row_properties or column_properties must be specified.
27656 # BandedRange.row_properties and BandedRange.column_properties are
27657 # set, the fill colors are applied to cells according to the following rules:
27658 #
27659 # * header_color and footer_color take priority over band colors.
27660 # * first_band_color takes priority over second_band_color.
27661 # * row_properties takes priority over column_properties.
27662 #
27663 # For example, the first row color takes priority over the first column
27664 # color, but the first column color takes priority over the second row color.
27665 # Similarly, the row header takes priority over the column header in the
27666 # top left cell, but the column header takes priority over the first row
27667 # color if the row header is not set.
27668 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
27669 # for simplicity of conversion to/from color representations in various
27670 # languages over compactness; for example, the fields of this representation
27671 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27672 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27673 # method in iOS; and, with just a little work, it can be easily formatted into
27674 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27675 #
27676 # Example (Java):
27677 #
27678 # import com.google.type.Color;
27679 #
27680 # // ...
27681 # public static java.awt.Color fromProto(Color protocolor) {
27682 # float alpha = protocolor.hasAlpha()
27683 # ? protocolor.getAlpha().getValue()
27684 # : 1.0;
27685 #
27686 # return new java.awt.Color(
27687 # protocolor.getRed(),
27688 # protocolor.getGreen(),
27689 # protocolor.getBlue(),
27690 # alpha);
27691 # }
27692 #
27693 # public static Color toProto(java.awt.Color color) {
27694 # float red = (float) color.getRed();
27695 # float green = (float) color.getGreen();
27696 # float blue = (float) color.getBlue();
27697 # float denominator = 255.0;
27698 # Color.Builder resultBuilder =
27699 # Color
27700 # .newBuilder()
27701 # .setRed(red / denominator)
27702 # .setGreen(green / denominator)
27703 # .setBlue(blue / denominator);
27704 # int alpha = color.getAlpha();
27705 # if (alpha != 255) {
27706 # result.setAlpha(
27707 # FloatValue
27708 # .newBuilder()
27709 # .setValue(((float) alpha) / denominator)
27710 # .build());
27711 # }
27712 # return resultBuilder.build();
27713 # }
27714 # // ...
27715 #
27716 # Example (iOS / Obj-C):
27717 #
27718 # // ...
27719 # static UIColor* fromProto(Color* protocolor) {
27720 # float red = [protocolor red];
27721 # float green = [protocolor green];
27722 # float blue = [protocolor blue];
27723 # FloatValue* alpha_wrapper = [protocolor alpha];
27724 # float alpha = 1.0;
27725 # if (alpha_wrapper != nil) {
27726 # alpha = [alpha_wrapper value];
27727 # }
27728 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27729 # }
27730 #
27731 # static Color* toProto(UIColor* color) {
27732 # CGFloat red, green, blue, alpha;
27733 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27734 # return nil;
27735 # }
27736 # Color* result = [Color alloc] init];
27737 # [result setRed:red];
27738 # [result setGreen:green];
27739 # [result setBlue:blue];
27740 # if (alpha <= 0.9999) {
27741 # [result setAlpha:floatWrapperWithValue(alpha)];
27742 # }
27743 # [result autorelease];
27744 # return result;
27745 # }
27746 # // ...
27747 #
27748 # Example (JavaScript):
27749 #
27750 # // ...
27751 #
27752 # var protoToCssColor = function(rgb_color) {
27753 # var redFrac = rgb_color.red || 0.0;
27754 # var greenFrac = rgb_color.green || 0.0;
27755 # var blueFrac = rgb_color.blue || 0.0;
27756 # var red = Math.floor(redFrac * 255);
27757 # var green = Math.floor(greenFrac * 255);
27758 # var blue = Math.floor(blueFrac * 255);
27759 #
27760 # if (!('alpha' in rgb_color)) {
27761 # return rgbToCssColor_(red, green, blue);
27762 # }
27763 #
27764 # var alphaFrac = rgb_color.alpha.value || 0.0;
27765 # var rgbParams = [red, green, blue].join(',');
27766 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27767 # };
27768 #
27769 # var rgbToCssColor_ = function(red, green, blue) {
27770 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27771 # var hexString = rgbNumber.toString(16);
27772 # var missingZeros = 6 - hexString.length;
27773 # var resultBuilder = ['#'];
27774 # for (var i = 0; i < missingZeros; i++) {
27775 # resultBuilder.push('0');
27776 # }
27777 # resultBuilder.push(hexString);
27778 # return resultBuilder.join('');
27779 # };
27780 #
27781 # // ...
27782 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27783 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27784 # the final pixel color is defined by the equation:
27785 #
27786 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27787 #
27788 # This means that a value of 1.0 corresponds to a solid color, whereas
27789 # a value of 0.0 corresponds to a completely transparent color. This
27790 # uses a wrapper message rather than a simple float scalar so that it is
27791 # possible to distinguish between a default value and the value being unset.
27792 # If omitted, this color object is to be rendered as a solid color
27793 # (as if the alpha value had been explicitly given with a value of 1.0).
27794 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27795 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27796 },
27797 "headerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the first row or column. If this field is set, the first
27798 # row or column will be filled with this color and the colors will
27799 # alternate between first_band_color and second_band_color starting
27800 # from the second row or column. Otherwise, the first row or column will be
27801 # filled with first_band_color and the colors will proceed to alternate
27802 # as they normally would.
27803 # for simplicity of conversion to/from color representations in various
27804 # languages over compactness; for example, the fields of this representation
27805 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27806 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27807 # method in iOS; and, with just a little work, it can be easily formatted into
27808 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27809 #
27810 # Example (Java):
27811 #
27812 # import com.google.type.Color;
27813 #
27814 # // ...
27815 # public static java.awt.Color fromProto(Color protocolor) {
27816 # float alpha = protocolor.hasAlpha()
27817 # ? protocolor.getAlpha().getValue()
27818 # : 1.0;
27819 #
27820 # return new java.awt.Color(
27821 # protocolor.getRed(),
27822 # protocolor.getGreen(),
27823 # protocolor.getBlue(),
27824 # alpha);
27825 # }
27826 #
27827 # public static Color toProto(java.awt.Color color) {
27828 # float red = (float) color.getRed();
27829 # float green = (float) color.getGreen();
27830 # float blue = (float) color.getBlue();
27831 # float denominator = 255.0;
27832 # Color.Builder resultBuilder =
27833 # Color
27834 # .newBuilder()
27835 # .setRed(red / denominator)
27836 # .setGreen(green / denominator)
27837 # .setBlue(blue / denominator);
27838 # int alpha = color.getAlpha();
27839 # if (alpha != 255) {
27840 # result.setAlpha(
27841 # FloatValue
27842 # .newBuilder()
27843 # .setValue(((float) alpha) / denominator)
27844 # .build());
27845 # }
27846 # return resultBuilder.build();
27847 # }
27848 # // ...
27849 #
27850 # Example (iOS / Obj-C):
27851 #
27852 # // ...
27853 # static UIColor* fromProto(Color* protocolor) {
27854 # float red = [protocolor red];
27855 # float green = [protocolor green];
27856 # float blue = [protocolor blue];
27857 # FloatValue* alpha_wrapper = [protocolor alpha];
27858 # float alpha = 1.0;
27859 # if (alpha_wrapper != nil) {
27860 # alpha = [alpha_wrapper value];
27861 # }
27862 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27863 # }
27864 #
27865 # static Color* toProto(UIColor* color) {
27866 # CGFloat red, green, blue, alpha;
27867 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27868 # return nil;
27869 # }
27870 # Color* result = [Color alloc] init];
27871 # [result setRed:red];
27872 # [result setGreen:green];
27873 # [result setBlue:blue];
27874 # if (alpha <= 0.9999) {
27875 # [result setAlpha:floatWrapperWithValue(alpha)];
27876 # }
27877 # [result autorelease];
27878 # return result;
27879 # }
27880 # // ...
27881 #
27882 # Example (JavaScript):
27883 #
27884 # // ...
27885 #
27886 # var protoToCssColor = function(rgb_color) {
27887 # var redFrac = rgb_color.red || 0.0;
27888 # var greenFrac = rgb_color.green || 0.0;
27889 # var blueFrac = rgb_color.blue || 0.0;
27890 # var red = Math.floor(redFrac * 255);
27891 # var green = Math.floor(greenFrac * 255);
27892 # var blue = Math.floor(blueFrac * 255);
27893 #
27894 # if (!('alpha' in rgb_color)) {
27895 # return rgbToCssColor_(red, green, blue);
27896 # }
27897 #
27898 # var alphaFrac = rgb_color.alpha.value || 0.0;
27899 # var rgbParams = [red, green, blue].join(',');
27900 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27901 # };
27902 #
27903 # var rgbToCssColor_ = function(red, green, blue) {
27904 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27905 # var hexString = rgbNumber.toString(16);
27906 # var missingZeros = 6 - hexString.length;
27907 # var resultBuilder = ['#'];
27908 # for (var i = 0; i < missingZeros; i++) {
27909 # resultBuilder.push('0');
27910 # }
27911 # resultBuilder.push(hexString);
27912 # return resultBuilder.join('');
27913 # };
27914 #
27915 # // ...
27916 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27917 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27918 # the final pixel color is defined by the equation:
27919 #
27920 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27921 #
27922 # This means that a value of 1.0 corresponds to a solid color, whereas
27923 # a value of 0.0 corresponds to a completely transparent color. This
27924 # uses a wrapper message rather than a simple float scalar so that it is
27925 # possible to distinguish between a default value and the value being unset.
27926 # If omitted, this color object is to be rendered as a solid color
27927 # (as if the alpha value had been explicitly given with a value of 1.0).
27928 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27929 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27930 },
27931 "footerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the last row or column. If this field is not set, the last
27932 # row or column will be filled with either first_band_color or
27933 # second_band_color, depending on the color of the previous row or
27934 # column.
27935 # for simplicity of conversion to/from color representations in various
27936 # languages over compactness; for example, the fields of this representation
27937 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27938 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27939 # method in iOS; and, with just a little work, it can be easily formatted into
27940 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27941 #
27942 # Example (Java):
27943 #
27944 # import com.google.type.Color;
27945 #
27946 # // ...
27947 # public static java.awt.Color fromProto(Color protocolor) {
27948 # float alpha = protocolor.hasAlpha()
27949 # ? protocolor.getAlpha().getValue()
27950 # : 1.0;
27951 #
27952 # return new java.awt.Color(
27953 # protocolor.getRed(),
27954 # protocolor.getGreen(),
27955 # protocolor.getBlue(),
27956 # alpha);
27957 # }
27958 #
27959 # public static Color toProto(java.awt.Color color) {
27960 # float red = (float) color.getRed();
27961 # float green = (float) color.getGreen();
27962 # float blue = (float) color.getBlue();
27963 # float denominator = 255.0;
27964 # Color.Builder resultBuilder =
27965 # Color
27966 # .newBuilder()
27967 # .setRed(red / denominator)
27968 # .setGreen(green / denominator)
27969 # .setBlue(blue / denominator);
27970 # int alpha = color.getAlpha();
27971 # if (alpha != 255) {
27972 # result.setAlpha(
27973 # FloatValue
27974 # .newBuilder()
27975 # .setValue(((float) alpha) / denominator)
27976 # .build());
27977 # }
27978 # return resultBuilder.build();
27979 # }
27980 # // ...
27981 #
27982 # Example (iOS / Obj-C):
27983 #
27984 # // ...
27985 # static UIColor* fromProto(Color* protocolor) {
27986 # float red = [protocolor red];
27987 # float green = [protocolor green];
27988 # float blue = [protocolor blue];
27989 # FloatValue* alpha_wrapper = [protocolor alpha];
27990 # float alpha = 1.0;
27991 # if (alpha_wrapper != nil) {
27992 # alpha = [alpha_wrapper value];
27993 # }
27994 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27995 # }
27996 #
27997 # static Color* toProto(UIColor* color) {
27998 # CGFloat red, green, blue, alpha;
27999 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28000 # return nil;
28001 # }
28002 # Color* result = [Color alloc] init];
28003 # [result setRed:red];
28004 # [result setGreen:green];
28005 # [result setBlue:blue];
28006 # if (alpha <= 0.9999) {
28007 # [result setAlpha:floatWrapperWithValue(alpha)];
28008 # }
28009 # [result autorelease];
28010 # return result;
28011 # }
28012 # // ...
28013 #
28014 # Example (JavaScript):
28015 #
28016 # // ...
28017 #
28018 # var protoToCssColor = function(rgb_color) {
28019 # var redFrac = rgb_color.red || 0.0;
28020 # var greenFrac = rgb_color.green || 0.0;
28021 # var blueFrac = rgb_color.blue || 0.0;
28022 # var red = Math.floor(redFrac * 255);
28023 # var green = Math.floor(greenFrac * 255);
28024 # var blue = Math.floor(blueFrac * 255);
28025 #
28026 # if (!('alpha' in rgb_color)) {
28027 # return rgbToCssColor_(red, green, blue);
28028 # }
28029 #
28030 # var alphaFrac = rgb_color.alpha.value || 0.0;
28031 # var rgbParams = [red, green, blue].join(',');
28032 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28033 # };
28034 #
28035 # var rgbToCssColor_ = function(red, green, blue) {
28036 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28037 # var hexString = rgbNumber.toString(16);
28038 # var missingZeros = 6 - hexString.length;
28039 # var resultBuilder = ['#'];
28040 # for (var i = 0; i < missingZeros; i++) {
28041 # resultBuilder.push('0');
28042 # }
28043 # resultBuilder.push(hexString);
28044 # return resultBuilder.join('');
28045 # };
28046 #
28047 # // ...
28048 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28049 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28050 # the final pixel color is defined by the equation:
28051 #
28052 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28053 #
28054 # This means that a value of 1.0 corresponds to a solid color, whereas
28055 # a value of 0.0 corresponds to a completely transparent color. This
28056 # uses a wrapper message rather than a simple float scalar so that it is
28057 # possible to distinguish between a default value and the value being unset.
28058 # If omitted, this color object is to be rendered as a solid color
28059 # (as if the alpha value had been explicitly given with a value of 1.0).
28060 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28061 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28062 },
28063 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
28064 # for simplicity of conversion to/from color representations in various
28065 # languages over compactness; for example, the fields of this representation
28066 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28067 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28068 # method in iOS; and, with just a little work, it can be easily formatted into
28069 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28070 #
28071 # Example (Java):
28072 #
28073 # import com.google.type.Color;
28074 #
28075 # // ...
28076 # public static java.awt.Color fromProto(Color protocolor) {
28077 # float alpha = protocolor.hasAlpha()
28078 # ? protocolor.getAlpha().getValue()
28079 # : 1.0;
28080 #
28081 # return new java.awt.Color(
28082 # protocolor.getRed(),
28083 # protocolor.getGreen(),
28084 # protocolor.getBlue(),
28085 # alpha);
28086 # }
28087 #
28088 # public static Color toProto(java.awt.Color color) {
28089 # float red = (float) color.getRed();
28090 # float green = (float) color.getGreen();
28091 # float blue = (float) color.getBlue();
28092 # float denominator = 255.0;
28093 # Color.Builder resultBuilder =
28094 # Color
28095 # .newBuilder()
28096 # .setRed(red / denominator)
28097 # .setGreen(green / denominator)
28098 # .setBlue(blue / denominator);
28099 # int alpha = color.getAlpha();
28100 # if (alpha != 255) {
28101 # result.setAlpha(
28102 # FloatValue
28103 # .newBuilder()
28104 # .setValue(((float) alpha) / denominator)
28105 # .build());
28106 # }
28107 # return resultBuilder.build();
28108 # }
28109 # // ...
28110 #
28111 # Example (iOS / Obj-C):
28112 #
28113 # // ...
28114 # static UIColor* fromProto(Color* protocolor) {
28115 # float red = [protocolor red];
28116 # float green = [protocolor green];
28117 # float blue = [protocolor blue];
28118 # FloatValue* alpha_wrapper = [protocolor alpha];
28119 # float alpha = 1.0;
28120 # if (alpha_wrapper != nil) {
28121 # alpha = [alpha_wrapper value];
28122 # }
28123 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28124 # }
28125 #
28126 # static Color* toProto(UIColor* color) {
28127 # CGFloat red, green, blue, alpha;
28128 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28129 # return nil;
28130 # }
28131 # Color* result = [Color alloc] init];
28132 # [result setRed:red];
28133 # [result setGreen:green];
28134 # [result setBlue:blue];
28135 # if (alpha <= 0.9999) {
28136 # [result setAlpha:floatWrapperWithValue(alpha)];
28137 # }
28138 # [result autorelease];
28139 # return result;
28140 # }
28141 # // ...
28142 #
28143 # Example (JavaScript):
28144 #
28145 # // ...
28146 #
28147 # var protoToCssColor = function(rgb_color) {
28148 # var redFrac = rgb_color.red || 0.0;
28149 # var greenFrac = rgb_color.green || 0.0;
28150 # var blueFrac = rgb_color.blue || 0.0;
28151 # var red = Math.floor(redFrac * 255);
28152 # var green = Math.floor(greenFrac * 255);
28153 # var blue = Math.floor(blueFrac * 255);
28154 #
28155 # if (!('alpha' in rgb_color)) {
28156 # return rgbToCssColor_(red, green, blue);
28157 # }
28158 #
28159 # var alphaFrac = rgb_color.alpha.value || 0.0;
28160 # var rgbParams = [red, green, blue].join(',');
28161 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28162 # };
28163 #
28164 # var rgbToCssColor_ = function(red, green, blue) {
28165 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28166 # var hexString = rgbNumber.toString(16);
28167 # var missingZeros = 6 - hexString.length;
28168 # var resultBuilder = ['#'];
28169 # for (var i = 0; i < missingZeros; i++) {
28170 # resultBuilder.push('0');
28171 # }
28172 # resultBuilder.push(hexString);
28173 # return resultBuilder.join('');
28174 # };
28175 #
28176 # // ...
28177 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28178 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28179 # the final pixel color is defined by the equation:
28180 #
28181 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28182 #
28183 # This means that a value of 1.0 corresponds to a solid color, whereas
28184 # a value of 0.0 corresponds to a completely transparent color. This
28185 # uses a wrapper message rather than a simple float scalar so that it is
28186 # possible to distinguish between a default value and the value being unset.
28187 # If omitted, this color object is to be rendered as a solid color
28188 # (as if the alpha value had been explicitly given with a value of 1.0).
28189 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28190 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28191 },
28192 },
28193 "bandedRangeId": 42, # The id of the banded range.
28194 },
28195 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028196 "addFilterView": { # The result of adding a filter view. # A reply from adding a filter view.
28197 "filter": { # A filter view. # The newly added filter view.
28198 "title": "A String", # The name of the filter view.
28199 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
28200 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028201 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028202 # may be set.
28203 "filterViewId": 42, # The ID of the filter view.
28204 "range": { # A range on a sheet. # The range this filter view covers.
28205 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028206 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028207 # may be set.
28208 # All indexes are zero-based.
28209 # Indexes are half open, e.g the start index is inclusive
28210 # and the end index is exclusive -- [start_index, end_index).
28211 # Missing indexes indicate the range is unbounded on that side.
28212 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028213 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028214 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028215 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028216 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028217 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028218 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028219 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028220 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028221 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028222 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028223 # `Sheet1!A:B == sheet_id: 0,
28224 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028225 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028226 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028227 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028228 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028229 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028230 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028231 #
28232 # The start index must always be less than or equal to the end index.
28233 # If the start index equals the end index, then the range is empty.
28234 # Empty ranges are typically not meaningful and are usually rendered in the
28235 # UI as `#REF!`.
28236 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
28237 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
28238 "sheetId": 42, # The sheet this range is on.
28239 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
28240 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
28241 },
28242 "sortSpecs": [ # The sort order per column. Later specifications are used when values
28243 # are equal in the earlier specifications.
28244 { # A sort order associated with a specific column or row.
28245 "sortOrder": "A String", # The order data should be sorted.
28246 "dimensionIndex": 42, # The dimension the sort should be applied to.
28247 },
28248 ],
28249 "criteria": { # The criteria for showing/hiding values per column.
28250 # The map's key is the column index, and the value is the criteria for
28251 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028252 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028253 "hiddenValues": [ # Values that should be hidden.
28254 "A String",
28255 ],
28256 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
28257 # (This does not override hiddenValues -- if a value is listed there,
28258 # it will still be hidden.)
28259 # BooleanConditions are used by conditional formatting,
28260 # data validation, and the criteria in filters.
28261 "type": "A String", # The type of condition.
28262 "values": [ # The values of the condition. The number of supported values depends
28263 # on the condition type. Some support zero values,
28264 # others one or two values,
28265 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
28266 { # The value of the condition.
28267 "relativeDate": "A String", # A relative date (based on the current date).
28268 # Valid only if the type is
28269 # DATE_BEFORE,
28270 # DATE_AFTER,
28271 # DATE_ON_OR_BEFORE or
28272 # DATE_ON_OR_AFTER.
28273 #
28274 # Relative dates are not supported in data validation.
28275 # They are supported only in conditional formatting and
28276 # conditional filters.
28277 "userEnteredValue": "A String", # A value the condition is based on.
28278 # The value will be parsed as if the user typed into a cell.
28279 # Formulas are supported (and must begin with an `=`).
28280 },
28281 ],
28282 },
28283 },
28284 },
28285 },
28286 },
28287 },
28288 ],
28289 }</pre>
28290</div>
28291
28292<div class="method">
28293 <code class="details" id="create">create(body, x__xgafv=None)</code>
28294 <pre>Creates a spreadsheet, returning the newly created spreadsheet.
28295
28296Args:
28297 body: object, The request body. (required)
28298 The object takes the form of:
28299
28300{ # Resource that represents a spreadsheet.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028301 "spreadsheetId": "A String", # The ID of the spreadsheet.
28302 # This field is read-only.
28303 "namedRanges": [ # The named ranges defined in a spreadsheet.
28304 { # A named range.
28305 "namedRangeId": "A String", # The ID of the named range.
28306 "range": { # A range on a sheet. # The range this represents.
28307 # All indexes are zero-based.
28308 # Indexes are half open, e.g the start index is inclusive
28309 # and the end index is exclusive -- [start_index, end_index).
28310 # Missing indexes indicate the range is unbounded on that side.
28311 #
28312 # For example, if `"Sheet1"` is sheet ID 0, then:
28313 #
28314 # `Sheet1!A1:A1 == sheet_id: 0,
28315 # start_row_index: 0, end_row_index: 1,
28316 # start_column_index: 0, end_column_index: 1`
28317 #
28318 # `Sheet1!A3:B4 == sheet_id: 0,
28319 # start_row_index: 2, end_row_index: 4,
28320 # start_column_index: 0, end_column_index: 2`
28321 #
28322 # `Sheet1!A:B == sheet_id: 0,
28323 # start_column_index: 0, end_column_index: 2`
28324 #
28325 # `Sheet1!A5:B == sheet_id: 0,
28326 # start_row_index: 4,
28327 # start_column_index: 0, end_column_index: 2`
28328 #
28329 # `Sheet1 == sheet_id:0`
28330 #
28331 # The start index must always be less than or equal to the end index.
28332 # If the start index equals the end index, then the range is empty.
28333 # Empty ranges are typically not meaningful and are usually rendered in the
28334 # UI as `#REF!`.
28335 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
28336 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
28337 "sheetId": 42, # The sheet this range is on.
28338 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
28339 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
28340 },
28341 "name": "A String", # The name of the named range.
28342 },
28343 ],
28344 "properties": { # Properties of a spreadsheet. # Overall properties of a spreadsheet.
28345 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
28346 #
28347 # * an ISO 639-1 language code such as `en`
28348 #
28349 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
28350 #
28351 # * a combination of the ISO language code and country code, such as `en_US`
28352 #
28353 # Note: when updating this field, not all locales/languages are supported.
28354 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
28355 # `America/New_York`. If the time zone isn't recognized, this may
28356 # be a custom time zone such as `GMT-07:00`.
28357 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
28358 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
28359 # CellData.effectiveFormat will not be set if the
28360 # cell's format is equal to this default format.
28361 # This field is read-only.
28362 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
28363 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
28364 # the user's locale will be used if necessary for the given type.
28365 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
28366 # information about the supported patterns.
28367 "type": "A String", # The type of the number format.
28368 # When writing, this field must be set.
28369 },
28370 "textDirection": "A String", # The direction of the text in the cell.
28371 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
28372 # When updating padding, every field must be specified.
28373 "top": 42, # The top padding of the cell.
28374 "right": 42, # The right padding of the cell.
28375 "bottom": 42, # The bottom padding of the cell.
28376 "left": 42, # The left padding of the cell.
28377 },
28378 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
28379 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
28380 # for simplicity of conversion to/from color representations in various
28381 # languages over compactness; for example, the fields of this representation
28382 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28383 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28384 # method in iOS; and, with just a little work, it can be easily formatted into
28385 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28386 #
28387 # Example (Java):
28388 #
28389 # import com.google.type.Color;
28390 #
28391 # // ...
28392 # public static java.awt.Color fromProto(Color protocolor) {
28393 # float alpha = protocolor.hasAlpha()
28394 # ? protocolor.getAlpha().getValue()
28395 # : 1.0;
28396 #
28397 # return new java.awt.Color(
28398 # protocolor.getRed(),
28399 # protocolor.getGreen(),
28400 # protocolor.getBlue(),
28401 # alpha);
28402 # }
28403 #
28404 # public static Color toProto(java.awt.Color color) {
28405 # float red = (float) color.getRed();
28406 # float green = (float) color.getGreen();
28407 # float blue = (float) color.getBlue();
28408 # float denominator = 255.0;
28409 # Color.Builder resultBuilder =
28410 # Color
28411 # .newBuilder()
28412 # .setRed(red / denominator)
28413 # .setGreen(green / denominator)
28414 # .setBlue(blue / denominator);
28415 # int alpha = color.getAlpha();
28416 # if (alpha != 255) {
28417 # result.setAlpha(
28418 # FloatValue
28419 # .newBuilder()
28420 # .setValue(((float) alpha) / denominator)
28421 # .build());
28422 # }
28423 # return resultBuilder.build();
28424 # }
28425 # // ...
28426 #
28427 # Example (iOS / Obj-C):
28428 #
28429 # // ...
28430 # static UIColor* fromProto(Color* protocolor) {
28431 # float red = [protocolor red];
28432 # float green = [protocolor green];
28433 # float blue = [protocolor blue];
28434 # FloatValue* alpha_wrapper = [protocolor alpha];
28435 # float alpha = 1.0;
28436 # if (alpha_wrapper != nil) {
28437 # alpha = [alpha_wrapper value];
28438 # }
28439 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28440 # }
28441 #
28442 # static Color* toProto(UIColor* color) {
28443 # CGFloat red, green, blue, alpha;
28444 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28445 # return nil;
28446 # }
28447 # Color* result = [Color alloc] init];
28448 # [result setRed:red];
28449 # [result setGreen:green];
28450 # [result setBlue:blue];
28451 # if (alpha <= 0.9999) {
28452 # [result setAlpha:floatWrapperWithValue(alpha)];
28453 # }
28454 # [result autorelease];
28455 # return result;
28456 # }
28457 # // ...
28458 #
28459 # Example (JavaScript):
28460 #
28461 # // ...
28462 #
28463 # var protoToCssColor = function(rgb_color) {
28464 # var redFrac = rgb_color.red || 0.0;
28465 # var greenFrac = rgb_color.green || 0.0;
28466 # var blueFrac = rgb_color.blue || 0.0;
28467 # var red = Math.floor(redFrac * 255);
28468 # var green = Math.floor(greenFrac * 255);
28469 # var blue = Math.floor(blueFrac * 255);
28470 #
28471 # if (!('alpha' in rgb_color)) {
28472 # return rgbToCssColor_(red, green, blue);
28473 # }
28474 #
28475 # var alphaFrac = rgb_color.alpha.value || 0.0;
28476 # var rgbParams = [red, green, blue].join(',');
28477 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28478 # };
28479 #
28480 # var rgbToCssColor_ = function(red, green, blue) {
28481 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28482 # var hexString = rgbNumber.toString(16);
28483 # var missingZeros = 6 - hexString.length;
28484 # var resultBuilder = ['#'];
28485 # for (var i = 0; i < missingZeros; i++) {
28486 # resultBuilder.push('0');
28487 # }
28488 # resultBuilder.push(hexString);
28489 # return resultBuilder.join('');
28490 # };
28491 #
28492 # // ...
28493 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28494 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28495 # the final pixel color is defined by the equation:
28496 #
28497 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28498 #
28499 # This means that a value of 1.0 corresponds to a solid color, whereas
28500 # a value of 0.0 corresponds to a completely transparent color. This
28501 # uses a wrapper message rather than a simple float scalar so that it is
28502 # possible to distinguish between a default value and the value being unset.
28503 # If omitted, this color object is to be rendered as a solid color
28504 # (as if the alpha value had been explicitly given with a value of 1.0).
28505 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28506 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28507 },
28508 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
28509 "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).
28510 # Absent values indicate that the field isn't specified.
28511 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
28512 # for simplicity of conversion to/from color representations in various
28513 # languages over compactness; for example, the fields of this representation
28514 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28515 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28516 # method in iOS; and, with just a little work, it can be easily formatted into
28517 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28518 #
28519 # Example (Java):
28520 #
28521 # import com.google.type.Color;
28522 #
28523 # // ...
28524 # public static java.awt.Color fromProto(Color protocolor) {
28525 # float alpha = protocolor.hasAlpha()
28526 # ? protocolor.getAlpha().getValue()
28527 # : 1.0;
28528 #
28529 # return new java.awt.Color(
28530 # protocolor.getRed(),
28531 # protocolor.getGreen(),
28532 # protocolor.getBlue(),
28533 # alpha);
28534 # }
28535 #
28536 # public static Color toProto(java.awt.Color color) {
28537 # float red = (float) color.getRed();
28538 # float green = (float) color.getGreen();
28539 # float blue = (float) color.getBlue();
28540 # float denominator = 255.0;
28541 # Color.Builder resultBuilder =
28542 # Color
28543 # .newBuilder()
28544 # .setRed(red / denominator)
28545 # .setGreen(green / denominator)
28546 # .setBlue(blue / denominator);
28547 # int alpha = color.getAlpha();
28548 # if (alpha != 255) {
28549 # result.setAlpha(
28550 # FloatValue
28551 # .newBuilder()
28552 # .setValue(((float) alpha) / denominator)
28553 # .build());
28554 # }
28555 # return resultBuilder.build();
28556 # }
28557 # // ...
28558 #
28559 # Example (iOS / Obj-C):
28560 #
28561 # // ...
28562 # static UIColor* fromProto(Color* protocolor) {
28563 # float red = [protocolor red];
28564 # float green = [protocolor green];
28565 # float blue = [protocolor blue];
28566 # FloatValue* alpha_wrapper = [protocolor alpha];
28567 # float alpha = 1.0;
28568 # if (alpha_wrapper != nil) {
28569 # alpha = [alpha_wrapper value];
28570 # }
28571 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28572 # }
28573 #
28574 # static Color* toProto(UIColor* color) {
28575 # CGFloat red, green, blue, alpha;
28576 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28577 # return nil;
28578 # }
28579 # Color* result = [Color alloc] init];
28580 # [result setRed:red];
28581 # [result setGreen:green];
28582 # [result setBlue:blue];
28583 # if (alpha <= 0.9999) {
28584 # [result setAlpha:floatWrapperWithValue(alpha)];
28585 # }
28586 # [result autorelease];
28587 # return result;
28588 # }
28589 # // ...
28590 #
28591 # Example (JavaScript):
28592 #
28593 # // ...
28594 #
28595 # var protoToCssColor = function(rgb_color) {
28596 # var redFrac = rgb_color.red || 0.0;
28597 # var greenFrac = rgb_color.green || 0.0;
28598 # var blueFrac = rgb_color.blue || 0.0;
28599 # var red = Math.floor(redFrac * 255);
28600 # var green = Math.floor(greenFrac * 255);
28601 # var blue = Math.floor(blueFrac * 255);
28602 #
28603 # if (!('alpha' in rgb_color)) {
28604 # return rgbToCssColor_(red, green, blue);
28605 # }
28606 #
28607 # var alphaFrac = rgb_color.alpha.value || 0.0;
28608 # var rgbParams = [red, green, blue].join(',');
28609 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28610 # };
28611 #
28612 # var rgbToCssColor_ = function(red, green, blue) {
28613 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28614 # var hexString = rgbNumber.toString(16);
28615 # var missingZeros = 6 - hexString.length;
28616 # var resultBuilder = ['#'];
28617 # for (var i = 0; i < missingZeros; i++) {
28618 # resultBuilder.push('0');
28619 # }
28620 # resultBuilder.push(hexString);
28621 # return resultBuilder.join('');
28622 # };
28623 #
28624 # // ...
28625 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28626 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28627 # the final pixel color is defined by the equation:
28628 #
28629 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28630 #
28631 # This means that a value of 1.0 corresponds to a solid color, whereas
28632 # a value of 0.0 corresponds to a completely transparent color. This
28633 # uses a wrapper message rather than a simple float scalar so that it is
28634 # possible to distinguish between a default value and the value being unset.
28635 # If omitted, this color object is to be rendered as a solid color
28636 # (as if the alpha value had been explicitly given with a value of 1.0).
28637 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28638 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28639 },
28640 "bold": True or False, # True if the text is bold.
28641 "strikethrough": True or False, # True if the text has a strikethrough.
28642 "fontFamily": "A String", # The font family.
28643 "fontSize": 42, # The size of the font.
28644 "italic": True or False, # True if the text is italicized.
28645 "underline": True or False, # True if the text is underlined.
28646 },
28647 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
28648 "borders": { # The borders of the cell. # The borders of the cell.
28649 "top": { # A border along a cell. # The top border of the cell.
28650 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
28651 # for simplicity of conversion to/from color representations in various
28652 # languages over compactness; for example, the fields of this representation
28653 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28654 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28655 # method in iOS; and, with just a little work, it can be easily formatted into
28656 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28657 #
28658 # Example (Java):
28659 #
28660 # import com.google.type.Color;
28661 #
28662 # // ...
28663 # public static java.awt.Color fromProto(Color protocolor) {
28664 # float alpha = protocolor.hasAlpha()
28665 # ? protocolor.getAlpha().getValue()
28666 # : 1.0;
28667 #
28668 # return new java.awt.Color(
28669 # protocolor.getRed(),
28670 # protocolor.getGreen(),
28671 # protocolor.getBlue(),
28672 # alpha);
28673 # }
28674 #
28675 # public static Color toProto(java.awt.Color color) {
28676 # float red = (float) color.getRed();
28677 # float green = (float) color.getGreen();
28678 # float blue = (float) color.getBlue();
28679 # float denominator = 255.0;
28680 # Color.Builder resultBuilder =
28681 # Color
28682 # .newBuilder()
28683 # .setRed(red / denominator)
28684 # .setGreen(green / denominator)
28685 # .setBlue(blue / denominator);
28686 # int alpha = color.getAlpha();
28687 # if (alpha != 255) {
28688 # result.setAlpha(
28689 # FloatValue
28690 # .newBuilder()
28691 # .setValue(((float) alpha) / denominator)
28692 # .build());
28693 # }
28694 # return resultBuilder.build();
28695 # }
28696 # // ...
28697 #
28698 # Example (iOS / Obj-C):
28699 #
28700 # // ...
28701 # static UIColor* fromProto(Color* protocolor) {
28702 # float red = [protocolor red];
28703 # float green = [protocolor green];
28704 # float blue = [protocolor blue];
28705 # FloatValue* alpha_wrapper = [protocolor alpha];
28706 # float alpha = 1.0;
28707 # if (alpha_wrapper != nil) {
28708 # alpha = [alpha_wrapper value];
28709 # }
28710 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28711 # }
28712 #
28713 # static Color* toProto(UIColor* color) {
28714 # CGFloat red, green, blue, alpha;
28715 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28716 # return nil;
28717 # }
28718 # Color* result = [Color alloc] init];
28719 # [result setRed:red];
28720 # [result setGreen:green];
28721 # [result setBlue:blue];
28722 # if (alpha <= 0.9999) {
28723 # [result setAlpha:floatWrapperWithValue(alpha)];
28724 # }
28725 # [result autorelease];
28726 # return result;
28727 # }
28728 # // ...
28729 #
28730 # Example (JavaScript):
28731 #
28732 # // ...
28733 #
28734 # var protoToCssColor = function(rgb_color) {
28735 # var redFrac = rgb_color.red || 0.0;
28736 # var greenFrac = rgb_color.green || 0.0;
28737 # var blueFrac = rgb_color.blue || 0.0;
28738 # var red = Math.floor(redFrac * 255);
28739 # var green = Math.floor(greenFrac * 255);
28740 # var blue = Math.floor(blueFrac * 255);
28741 #
28742 # if (!('alpha' in rgb_color)) {
28743 # return rgbToCssColor_(red, green, blue);
28744 # }
28745 #
28746 # var alphaFrac = rgb_color.alpha.value || 0.0;
28747 # var rgbParams = [red, green, blue].join(',');
28748 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28749 # };
28750 #
28751 # var rgbToCssColor_ = function(red, green, blue) {
28752 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28753 # var hexString = rgbNumber.toString(16);
28754 # var missingZeros = 6 - hexString.length;
28755 # var resultBuilder = ['#'];
28756 # for (var i = 0; i < missingZeros; i++) {
28757 # resultBuilder.push('0');
28758 # }
28759 # resultBuilder.push(hexString);
28760 # return resultBuilder.join('');
28761 # };
28762 #
28763 # // ...
28764 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28765 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28766 # the final pixel color is defined by the equation:
28767 #
28768 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28769 #
28770 # This means that a value of 1.0 corresponds to a solid color, whereas
28771 # a value of 0.0 corresponds to a completely transparent color. This
28772 # uses a wrapper message rather than a simple float scalar so that it is
28773 # possible to distinguish between a default value and the value being unset.
28774 # If omitted, this color object is to be rendered as a solid color
28775 # (as if the alpha value had been explicitly given with a value of 1.0).
28776 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28777 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28778 },
28779 "width": 42, # The width of the border, in pixels.
28780 # Deprecated; the width is determined by the "style" field.
28781 "style": "A String", # The style of the border.
28782 },
28783 "right": { # A border along a cell. # The right border of the cell.
28784 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
28785 # for simplicity of conversion to/from color representations in various
28786 # languages over compactness; for example, the fields of this representation
28787 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28788 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28789 # method in iOS; and, with just a little work, it can be easily formatted into
28790 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28791 #
28792 # Example (Java):
28793 #
28794 # import com.google.type.Color;
28795 #
28796 # // ...
28797 # public static java.awt.Color fromProto(Color protocolor) {
28798 # float alpha = protocolor.hasAlpha()
28799 # ? protocolor.getAlpha().getValue()
28800 # : 1.0;
28801 #
28802 # return new java.awt.Color(
28803 # protocolor.getRed(),
28804 # protocolor.getGreen(),
28805 # protocolor.getBlue(),
28806 # alpha);
28807 # }
28808 #
28809 # public static Color toProto(java.awt.Color color) {
28810 # float red = (float) color.getRed();
28811 # float green = (float) color.getGreen();
28812 # float blue = (float) color.getBlue();
28813 # float denominator = 255.0;
28814 # Color.Builder resultBuilder =
28815 # Color
28816 # .newBuilder()
28817 # .setRed(red / denominator)
28818 # .setGreen(green / denominator)
28819 # .setBlue(blue / denominator);
28820 # int alpha = color.getAlpha();
28821 # if (alpha != 255) {
28822 # result.setAlpha(
28823 # FloatValue
28824 # .newBuilder()
28825 # .setValue(((float) alpha) / denominator)
28826 # .build());
28827 # }
28828 # return resultBuilder.build();
28829 # }
28830 # // ...
28831 #
28832 # Example (iOS / Obj-C):
28833 #
28834 # // ...
28835 # static UIColor* fromProto(Color* protocolor) {
28836 # float red = [protocolor red];
28837 # float green = [protocolor green];
28838 # float blue = [protocolor blue];
28839 # FloatValue* alpha_wrapper = [protocolor alpha];
28840 # float alpha = 1.0;
28841 # if (alpha_wrapper != nil) {
28842 # alpha = [alpha_wrapper value];
28843 # }
28844 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28845 # }
28846 #
28847 # static Color* toProto(UIColor* color) {
28848 # CGFloat red, green, blue, alpha;
28849 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28850 # return nil;
28851 # }
28852 # Color* result = [Color alloc] init];
28853 # [result setRed:red];
28854 # [result setGreen:green];
28855 # [result setBlue:blue];
28856 # if (alpha <= 0.9999) {
28857 # [result setAlpha:floatWrapperWithValue(alpha)];
28858 # }
28859 # [result autorelease];
28860 # return result;
28861 # }
28862 # // ...
28863 #
28864 # Example (JavaScript):
28865 #
28866 # // ...
28867 #
28868 # var protoToCssColor = function(rgb_color) {
28869 # var redFrac = rgb_color.red || 0.0;
28870 # var greenFrac = rgb_color.green || 0.0;
28871 # var blueFrac = rgb_color.blue || 0.0;
28872 # var red = Math.floor(redFrac * 255);
28873 # var green = Math.floor(greenFrac * 255);
28874 # var blue = Math.floor(blueFrac * 255);
28875 #
28876 # if (!('alpha' in rgb_color)) {
28877 # return rgbToCssColor_(red, green, blue);
28878 # }
28879 #
28880 # var alphaFrac = rgb_color.alpha.value || 0.0;
28881 # var rgbParams = [red, green, blue].join(',');
28882 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28883 # };
28884 #
28885 # var rgbToCssColor_ = function(red, green, blue) {
28886 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28887 # var hexString = rgbNumber.toString(16);
28888 # var missingZeros = 6 - hexString.length;
28889 # var resultBuilder = ['#'];
28890 # for (var i = 0; i < missingZeros; i++) {
28891 # resultBuilder.push('0');
28892 # }
28893 # resultBuilder.push(hexString);
28894 # return resultBuilder.join('');
28895 # };
28896 #
28897 # // ...
28898 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28899 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28900 # the final pixel color is defined by the equation:
28901 #
28902 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28903 #
28904 # This means that a value of 1.0 corresponds to a solid color, whereas
28905 # a value of 0.0 corresponds to a completely transparent color. This
28906 # uses a wrapper message rather than a simple float scalar so that it is
28907 # possible to distinguish between a default value and the value being unset.
28908 # If omitted, this color object is to be rendered as a solid color
28909 # (as if the alpha value had been explicitly given with a value of 1.0).
28910 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28911 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28912 },
28913 "width": 42, # The width of the border, in pixels.
28914 # Deprecated; the width is determined by the "style" field.
28915 "style": "A String", # The style of the border.
28916 },
28917 "bottom": { # A border along a cell. # The bottom border of the cell.
28918 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
28919 # for simplicity of conversion to/from color representations in various
28920 # languages over compactness; for example, the fields of this representation
28921 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28922 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28923 # method in iOS; and, with just a little work, it can be easily formatted into
28924 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28925 #
28926 # Example (Java):
28927 #
28928 # import com.google.type.Color;
28929 #
28930 # // ...
28931 # public static java.awt.Color fromProto(Color protocolor) {
28932 # float alpha = protocolor.hasAlpha()
28933 # ? protocolor.getAlpha().getValue()
28934 # : 1.0;
28935 #
28936 # return new java.awt.Color(
28937 # protocolor.getRed(),
28938 # protocolor.getGreen(),
28939 # protocolor.getBlue(),
28940 # alpha);
28941 # }
28942 #
28943 # public static Color toProto(java.awt.Color color) {
28944 # float red = (float) color.getRed();
28945 # float green = (float) color.getGreen();
28946 # float blue = (float) color.getBlue();
28947 # float denominator = 255.0;
28948 # Color.Builder resultBuilder =
28949 # Color
28950 # .newBuilder()
28951 # .setRed(red / denominator)
28952 # .setGreen(green / denominator)
28953 # .setBlue(blue / denominator);
28954 # int alpha = color.getAlpha();
28955 # if (alpha != 255) {
28956 # result.setAlpha(
28957 # FloatValue
28958 # .newBuilder()
28959 # .setValue(((float) alpha) / denominator)
28960 # .build());
28961 # }
28962 # return resultBuilder.build();
28963 # }
28964 # // ...
28965 #
28966 # Example (iOS / Obj-C):
28967 #
28968 # // ...
28969 # static UIColor* fromProto(Color* protocolor) {
28970 # float red = [protocolor red];
28971 # float green = [protocolor green];
28972 # float blue = [protocolor blue];
28973 # FloatValue* alpha_wrapper = [protocolor alpha];
28974 # float alpha = 1.0;
28975 # if (alpha_wrapper != nil) {
28976 # alpha = [alpha_wrapper value];
28977 # }
28978 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28979 # }
28980 #
28981 # static Color* toProto(UIColor* color) {
28982 # CGFloat red, green, blue, alpha;
28983 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28984 # return nil;
28985 # }
28986 # Color* result = [Color alloc] init];
28987 # [result setRed:red];
28988 # [result setGreen:green];
28989 # [result setBlue:blue];
28990 # if (alpha <= 0.9999) {
28991 # [result setAlpha:floatWrapperWithValue(alpha)];
28992 # }
28993 # [result autorelease];
28994 # return result;
28995 # }
28996 # // ...
28997 #
28998 # Example (JavaScript):
28999 #
29000 # // ...
29001 #
29002 # var protoToCssColor = function(rgb_color) {
29003 # var redFrac = rgb_color.red || 0.0;
29004 # var greenFrac = rgb_color.green || 0.0;
29005 # var blueFrac = rgb_color.blue || 0.0;
29006 # var red = Math.floor(redFrac * 255);
29007 # var green = Math.floor(greenFrac * 255);
29008 # var blue = Math.floor(blueFrac * 255);
29009 #
29010 # if (!('alpha' in rgb_color)) {
29011 # return rgbToCssColor_(red, green, blue);
29012 # }
29013 #
29014 # var alphaFrac = rgb_color.alpha.value || 0.0;
29015 # var rgbParams = [red, green, blue].join(',');
29016 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29017 # };
29018 #
29019 # var rgbToCssColor_ = function(red, green, blue) {
29020 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29021 # var hexString = rgbNumber.toString(16);
29022 # var missingZeros = 6 - hexString.length;
29023 # var resultBuilder = ['#'];
29024 # for (var i = 0; i < missingZeros; i++) {
29025 # resultBuilder.push('0');
29026 # }
29027 # resultBuilder.push(hexString);
29028 # return resultBuilder.join('');
29029 # };
29030 #
29031 # // ...
29032 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29033 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29034 # the final pixel color is defined by the equation:
29035 #
29036 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29037 #
29038 # This means that a value of 1.0 corresponds to a solid color, whereas
29039 # a value of 0.0 corresponds to a completely transparent color. This
29040 # uses a wrapper message rather than a simple float scalar so that it is
29041 # possible to distinguish between a default value and the value being unset.
29042 # If omitted, this color object is to be rendered as a solid color
29043 # (as if the alpha value had been explicitly given with a value of 1.0).
29044 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29045 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29046 },
29047 "width": 42, # The width of the border, in pixels.
29048 # Deprecated; the width is determined by the "style" field.
29049 "style": "A String", # The style of the border.
29050 },
29051 "left": { # A border along a cell. # The left border of the cell.
29052 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29053 # for simplicity of conversion to/from color representations in various
29054 # languages over compactness; for example, the fields of this representation
29055 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29056 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29057 # method in iOS; and, with just a little work, it can be easily formatted into
29058 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29059 #
29060 # Example (Java):
29061 #
29062 # import com.google.type.Color;
29063 #
29064 # // ...
29065 # public static java.awt.Color fromProto(Color protocolor) {
29066 # float alpha = protocolor.hasAlpha()
29067 # ? protocolor.getAlpha().getValue()
29068 # : 1.0;
29069 #
29070 # return new java.awt.Color(
29071 # protocolor.getRed(),
29072 # protocolor.getGreen(),
29073 # protocolor.getBlue(),
29074 # alpha);
29075 # }
29076 #
29077 # public static Color toProto(java.awt.Color color) {
29078 # float red = (float) color.getRed();
29079 # float green = (float) color.getGreen();
29080 # float blue = (float) color.getBlue();
29081 # float denominator = 255.0;
29082 # Color.Builder resultBuilder =
29083 # Color
29084 # .newBuilder()
29085 # .setRed(red / denominator)
29086 # .setGreen(green / denominator)
29087 # .setBlue(blue / denominator);
29088 # int alpha = color.getAlpha();
29089 # if (alpha != 255) {
29090 # result.setAlpha(
29091 # FloatValue
29092 # .newBuilder()
29093 # .setValue(((float) alpha) / denominator)
29094 # .build());
29095 # }
29096 # return resultBuilder.build();
29097 # }
29098 # // ...
29099 #
29100 # Example (iOS / Obj-C):
29101 #
29102 # // ...
29103 # static UIColor* fromProto(Color* protocolor) {
29104 # float red = [protocolor red];
29105 # float green = [protocolor green];
29106 # float blue = [protocolor blue];
29107 # FloatValue* alpha_wrapper = [protocolor alpha];
29108 # float alpha = 1.0;
29109 # if (alpha_wrapper != nil) {
29110 # alpha = [alpha_wrapper value];
29111 # }
29112 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29113 # }
29114 #
29115 # static Color* toProto(UIColor* color) {
29116 # CGFloat red, green, blue, alpha;
29117 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29118 # return nil;
29119 # }
29120 # Color* result = [Color alloc] init];
29121 # [result setRed:red];
29122 # [result setGreen:green];
29123 # [result setBlue:blue];
29124 # if (alpha <= 0.9999) {
29125 # [result setAlpha:floatWrapperWithValue(alpha)];
29126 # }
29127 # [result autorelease];
29128 # return result;
29129 # }
29130 # // ...
29131 #
29132 # Example (JavaScript):
29133 #
29134 # // ...
29135 #
29136 # var protoToCssColor = function(rgb_color) {
29137 # var redFrac = rgb_color.red || 0.0;
29138 # var greenFrac = rgb_color.green || 0.0;
29139 # var blueFrac = rgb_color.blue || 0.0;
29140 # var red = Math.floor(redFrac * 255);
29141 # var green = Math.floor(greenFrac * 255);
29142 # var blue = Math.floor(blueFrac * 255);
29143 #
29144 # if (!('alpha' in rgb_color)) {
29145 # return rgbToCssColor_(red, green, blue);
29146 # }
29147 #
29148 # var alphaFrac = rgb_color.alpha.value || 0.0;
29149 # var rgbParams = [red, green, blue].join(',');
29150 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29151 # };
29152 #
29153 # var rgbToCssColor_ = function(red, green, blue) {
29154 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29155 # var hexString = rgbNumber.toString(16);
29156 # var missingZeros = 6 - hexString.length;
29157 # var resultBuilder = ['#'];
29158 # for (var i = 0; i < missingZeros; i++) {
29159 # resultBuilder.push('0');
29160 # }
29161 # resultBuilder.push(hexString);
29162 # return resultBuilder.join('');
29163 # };
29164 #
29165 # // ...
29166 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29167 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29168 # the final pixel color is defined by the equation:
29169 #
29170 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29171 #
29172 # This means that a value of 1.0 corresponds to a solid color, whereas
29173 # a value of 0.0 corresponds to a completely transparent color. This
29174 # uses a wrapper message rather than a simple float scalar so that it is
29175 # possible to distinguish between a default value and the value being unset.
29176 # If omitted, this color object is to be rendered as a solid color
29177 # (as if the alpha value had been explicitly given with a value of 1.0).
29178 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29179 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29180 },
29181 "width": 42, # The width of the border, in pixels.
29182 # Deprecated; the width is determined by the "style" field.
29183 "style": "A String", # The style of the border.
29184 },
29185 },
29186 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
29187 },
29188 "title": "A String", # The title of the spreadsheet.
29189 },
29190 "sheets": [ # The sheets that are part of a spreadsheet.
29191 { # A sheet in a spreadsheet.
29192 "conditionalFormats": [ # The conditional format rules in this sheet.
29193 { # A rule describing a conditional format.
29194 "ranges": [ # The ranges that will be formatted if the condition is true.
29195 # All the ranges must be on the same grid.
29196 { # A range on a sheet.
29197 # All indexes are zero-based.
29198 # Indexes are half open, e.g the start index is inclusive
29199 # and the end index is exclusive -- [start_index, end_index).
29200 # Missing indexes indicate the range is unbounded on that side.
29201 #
29202 # For example, if `"Sheet1"` is sheet ID 0, then:
29203 #
29204 # `Sheet1!A1:A1 == sheet_id: 0,
29205 # start_row_index: 0, end_row_index: 1,
29206 # start_column_index: 0, end_column_index: 1`
29207 #
29208 # `Sheet1!A3:B4 == sheet_id: 0,
29209 # start_row_index: 2, end_row_index: 4,
29210 # start_column_index: 0, end_column_index: 2`
29211 #
29212 # `Sheet1!A:B == sheet_id: 0,
29213 # start_column_index: 0, end_column_index: 2`
29214 #
29215 # `Sheet1!A5:B == sheet_id: 0,
29216 # start_row_index: 4,
29217 # start_column_index: 0, end_column_index: 2`
29218 #
29219 # `Sheet1 == sheet_id:0`
29220 #
29221 # The start index must always be less than or equal to the end index.
29222 # If the start index equals the end index, then the range is empty.
29223 # Empty ranges are typically not meaningful and are usually rendered in the
29224 # UI as `#REF!`.
29225 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
29226 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
29227 "sheetId": 42, # The sheet this range is on.
29228 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
29229 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
29230 },
29231 ],
29232 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
29233 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
29234 # the format will be applied.
29235 # BooleanConditions are used by conditional formatting,
29236 # data validation, and the criteria in filters.
29237 "type": "A String", # The type of condition.
29238 "values": [ # The values of the condition. The number of supported values depends
29239 # on the condition type. Some support zero values,
29240 # others one or two values,
29241 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
29242 { # The value of the condition.
29243 "relativeDate": "A String", # A relative date (based on the current date).
29244 # Valid only if the type is
29245 # DATE_BEFORE,
29246 # DATE_AFTER,
29247 # DATE_ON_OR_BEFORE or
29248 # DATE_ON_OR_AFTER.
29249 #
29250 # Relative dates are not supported in data validation.
29251 # They are supported only in conditional formatting and
29252 # conditional filters.
29253 "userEnteredValue": "A String", # A value the condition is based on.
29254 # The value will be parsed as if the user typed into a cell.
29255 # Formulas are supported (and must begin with an `=`).
29256 },
29257 ],
29258 },
29259 "format": { # The format of a cell. # The format to apply.
29260 # Conditional formatting can only apply a subset of formatting:
29261 # bold, italic,
29262 # strikethrough,
29263 # foreground color &
29264 # background color.
29265 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
29266 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
29267 # the user's locale will be used if necessary for the given type.
29268 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
29269 # information about the supported patterns.
29270 "type": "A String", # The type of the number format.
29271 # When writing, this field must be set.
29272 },
29273 "textDirection": "A String", # The direction of the text in the cell.
29274 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
29275 # When updating padding, every field must be specified.
29276 "top": 42, # The top padding of the cell.
29277 "right": 42, # The right padding of the cell.
29278 "bottom": 42, # The bottom padding of the cell.
29279 "left": 42, # The left padding of the cell.
29280 },
29281 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
29282 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
29283 # for simplicity of conversion to/from color representations in various
29284 # languages over compactness; for example, the fields of this representation
29285 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29286 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29287 # method in iOS; and, with just a little work, it can be easily formatted into
29288 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29289 #
29290 # Example (Java):
29291 #
29292 # import com.google.type.Color;
29293 #
29294 # // ...
29295 # public static java.awt.Color fromProto(Color protocolor) {
29296 # float alpha = protocolor.hasAlpha()
29297 # ? protocolor.getAlpha().getValue()
29298 # : 1.0;
29299 #
29300 # return new java.awt.Color(
29301 # protocolor.getRed(),
29302 # protocolor.getGreen(),
29303 # protocolor.getBlue(),
29304 # alpha);
29305 # }
29306 #
29307 # public static Color toProto(java.awt.Color color) {
29308 # float red = (float) color.getRed();
29309 # float green = (float) color.getGreen();
29310 # float blue = (float) color.getBlue();
29311 # float denominator = 255.0;
29312 # Color.Builder resultBuilder =
29313 # Color
29314 # .newBuilder()
29315 # .setRed(red / denominator)
29316 # .setGreen(green / denominator)
29317 # .setBlue(blue / denominator);
29318 # int alpha = color.getAlpha();
29319 # if (alpha != 255) {
29320 # result.setAlpha(
29321 # FloatValue
29322 # .newBuilder()
29323 # .setValue(((float) alpha) / denominator)
29324 # .build());
29325 # }
29326 # return resultBuilder.build();
29327 # }
29328 # // ...
29329 #
29330 # Example (iOS / Obj-C):
29331 #
29332 # // ...
29333 # static UIColor* fromProto(Color* protocolor) {
29334 # float red = [protocolor red];
29335 # float green = [protocolor green];
29336 # float blue = [protocolor blue];
29337 # FloatValue* alpha_wrapper = [protocolor alpha];
29338 # float alpha = 1.0;
29339 # if (alpha_wrapper != nil) {
29340 # alpha = [alpha_wrapper value];
29341 # }
29342 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29343 # }
29344 #
29345 # static Color* toProto(UIColor* color) {
29346 # CGFloat red, green, blue, alpha;
29347 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29348 # return nil;
29349 # }
29350 # Color* result = [Color alloc] init];
29351 # [result setRed:red];
29352 # [result setGreen:green];
29353 # [result setBlue:blue];
29354 # if (alpha <= 0.9999) {
29355 # [result setAlpha:floatWrapperWithValue(alpha)];
29356 # }
29357 # [result autorelease];
29358 # return result;
29359 # }
29360 # // ...
29361 #
29362 # Example (JavaScript):
29363 #
29364 # // ...
29365 #
29366 # var protoToCssColor = function(rgb_color) {
29367 # var redFrac = rgb_color.red || 0.0;
29368 # var greenFrac = rgb_color.green || 0.0;
29369 # var blueFrac = rgb_color.blue || 0.0;
29370 # var red = Math.floor(redFrac * 255);
29371 # var green = Math.floor(greenFrac * 255);
29372 # var blue = Math.floor(blueFrac * 255);
29373 #
29374 # if (!('alpha' in rgb_color)) {
29375 # return rgbToCssColor_(red, green, blue);
29376 # }
29377 #
29378 # var alphaFrac = rgb_color.alpha.value || 0.0;
29379 # var rgbParams = [red, green, blue].join(',');
29380 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29381 # };
29382 #
29383 # var rgbToCssColor_ = function(red, green, blue) {
29384 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29385 # var hexString = rgbNumber.toString(16);
29386 # var missingZeros = 6 - hexString.length;
29387 # var resultBuilder = ['#'];
29388 # for (var i = 0; i < missingZeros; i++) {
29389 # resultBuilder.push('0');
29390 # }
29391 # resultBuilder.push(hexString);
29392 # return resultBuilder.join('');
29393 # };
29394 #
29395 # // ...
29396 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29397 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29398 # the final pixel color is defined by the equation:
29399 #
29400 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29401 #
29402 # This means that a value of 1.0 corresponds to a solid color, whereas
29403 # a value of 0.0 corresponds to a completely transparent color. This
29404 # uses a wrapper message rather than a simple float scalar so that it is
29405 # possible to distinguish between a default value and the value being unset.
29406 # If omitted, this color object is to be rendered as a solid color
29407 # (as if the alpha value had been explicitly given with a value of 1.0).
29408 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29409 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29410 },
29411 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
29412 "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).
29413 # Absent values indicate that the field isn't specified.
29414 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
29415 # for simplicity of conversion to/from color representations in various
29416 # languages over compactness; for example, the fields of this representation
29417 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29418 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29419 # method in iOS; and, with just a little work, it can be easily formatted into
29420 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29421 #
29422 # Example (Java):
29423 #
29424 # import com.google.type.Color;
29425 #
29426 # // ...
29427 # public static java.awt.Color fromProto(Color protocolor) {
29428 # float alpha = protocolor.hasAlpha()
29429 # ? protocolor.getAlpha().getValue()
29430 # : 1.0;
29431 #
29432 # return new java.awt.Color(
29433 # protocolor.getRed(),
29434 # protocolor.getGreen(),
29435 # protocolor.getBlue(),
29436 # alpha);
29437 # }
29438 #
29439 # public static Color toProto(java.awt.Color color) {
29440 # float red = (float) color.getRed();
29441 # float green = (float) color.getGreen();
29442 # float blue = (float) color.getBlue();
29443 # float denominator = 255.0;
29444 # Color.Builder resultBuilder =
29445 # Color
29446 # .newBuilder()
29447 # .setRed(red / denominator)
29448 # .setGreen(green / denominator)
29449 # .setBlue(blue / denominator);
29450 # int alpha = color.getAlpha();
29451 # if (alpha != 255) {
29452 # result.setAlpha(
29453 # FloatValue
29454 # .newBuilder()
29455 # .setValue(((float) alpha) / denominator)
29456 # .build());
29457 # }
29458 # return resultBuilder.build();
29459 # }
29460 # // ...
29461 #
29462 # Example (iOS / Obj-C):
29463 #
29464 # // ...
29465 # static UIColor* fromProto(Color* protocolor) {
29466 # float red = [protocolor red];
29467 # float green = [protocolor green];
29468 # float blue = [protocolor blue];
29469 # FloatValue* alpha_wrapper = [protocolor alpha];
29470 # float alpha = 1.0;
29471 # if (alpha_wrapper != nil) {
29472 # alpha = [alpha_wrapper value];
29473 # }
29474 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29475 # }
29476 #
29477 # static Color* toProto(UIColor* color) {
29478 # CGFloat red, green, blue, alpha;
29479 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29480 # return nil;
29481 # }
29482 # Color* result = [Color alloc] init];
29483 # [result setRed:red];
29484 # [result setGreen:green];
29485 # [result setBlue:blue];
29486 # if (alpha <= 0.9999) {
29487 # [result setAlpha:floatWrapperWithValue(alpha)];
29488 # }
29489 # [result autorelease];
29490 # return result;
29491 # }
29492 # // ...
29493 #
29494 # Example (JavaScript):
29495 #
29496 # // ...
29497 #
29498 # var protoToCssColor = function(rgb_color) {
29499 # var redFrac = rgb_color.red || 0.0;
29500 # var greenFrac = rgb_color.green || 0.0;
29501 # var blueFrac = rgb_color.blue || 0.0;
29502 # var red = Math.floor(redFrac * 255);
29503 # var green = Math.floor(greenFrac * 255);
29504 # var blue = Math.floor(blueFrac * 255);
29505 #
29506 # if (!('alpha' in rgb_color)) {
29507 # return rgbToCssColor_(red, green, blue);
29508 # }
29509 #
29510 # var alphaFrac = rgb_color.alpha.value || 0.0;
29511 # var rgbParams = [red, green, blue].join(',');
29512 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29513 # };
29514 #
29515 # var rgbToCssColor_ = function(red, green, blue) {
29516 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29517 # var hexString = rgbNumber.toString(16);
29518 # var missingZeros = 6 - hexString.length;
29519 # var resultBuilder = ['#'];
29520 # for (var i = 0; i < missingZeros; i++) {
29521 # resultBuilder.push('0');
29522 # }
29523 # resultBuilder.push(hexString);
29524 # return resultBuilder.join('');
29525 # };
29526 #
29527 # // ...
29528 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29529 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29530 # the final pixel color is defined by the equation:
29531 #
29532 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29533 #
29534 # This means that a value of 1.0 corresponds to a solid color, whereas
29535 # a value of 0.0 corresponds to a completely transparent color. This
29536 # uses a wrapper message rather than a simple float scalar so that it is
29537 # possible to distinguish between a default value and the value being unset.
29538 # If omitted, this color object is to be rendered as a solid color
29539 # (as if the alpha value had been explicitly given with a value of 1.0).
29540 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29541 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29542 },
29543 "bold": True or False, # True if the text is bold.
29544 "strikethrough": True or False, # True if the text has a strikethrough.
29545 "fontFamily": "A String", # The font family.
29546 "fontSize": 42, # The size of the font.
29547 "italic": True or False, # True if the text is italicized.
29548 "underline": True or False, # True if the text is underlined.
29549 },
29550 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
29551 "borders": { # The borders of the cell. # The borders of the cell.
29552 "top": { # A border along a cell. # The top border of the cell.
29553 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29554 # for simplicity of conversion to/from color representations in various
29555 # languages over compactness; for example, the fields of this representation
29556 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29557 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29558 # method in iOS; and, with just a little work, it can be easily formatted into
29559 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29560 #
29561 # Example (Java):
29562 #
29563 # import com.google.type.Color;
29564 #
29565 # // ...
29566 # public static java.awt.Color fromProto(Color protocolor) {
29567 # float alpha = protocolor.hasAlpha()
29568 # ? protocolor.getAlpha().getValue()
29569 # : 1.0;
29570 #
29571 # return new java.awt.Color(
29572 # protocolor.getRed(),
29573 # protocolor.getGreen(),
29574 # protocolor.getBlue(),
29575 # alpha);
29576 # }
29577 #
29578 # public static Color toProto(java.awt.Color color) {
29579 # float red = (float) color.getRed();
29580 # float green = (float) color.getGreen();
29581 # float blue = (float) color.getBlue();
29582 # float denominator = 255.0;
29583 # Color.Builder resultBuilder =
29584 # Color
29585 # .newBuilder()
29586 # .setRed(red / denominator)
29587 # .setGreen(green / denominator)
29588 # .setBlue(blue / denominator);
29589 # int alpha = color.getAlpha();
29590 # if (alpha != 255) {
29591 # result.setAlpha(
29592 # FloatValue
29593 # .newBuilder()
29594 # .setValue(((float) alpha) / denominator)
29595 # .build());
29596 # }
29597 # return resultBuilder.build();
29598 # }
29599 # // ...
29600 #
29601 # Example (iOS / Obj-C):
29602 #
29603 # // ...
29604 # static UIColor* fromProto(Color* protocolor) {
29605 # float red = [protocolor red];
29606 # float green = [protocolor green];
29607 # float blue = [protocolor blue];
29608 # FloatValue* alpha_wrapper = [protocolor alpha];
29609 # float alpha = 1.0;
29610 # if (alpha_wrapper != nil) {
29611 # alpha = [alpha_wrapper value];
29612 # }
29613 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29614 # }
29615 #
29616 # static Color* toProto(UIColor* color) {
29617 # CGFloat red, green, blue, alpha;
29618 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29619 # return nil;
29620 # }
29621 # Color* result = [Color alloc] init];
29622 # [result setRed:red];
29623 # [result setGreen:green];
29624 # [result setBlue:blue];
29625 # if (alpha <= 0.9999) {
29626 # [result setAlpha:floatWrapperWithValue(alpha)];
29627 # }
29628 # [result autorelease];
29629 # return result;
29630 # }
29631 # // ...
29632 #
29633 # Example (JavaScript):
29634 #
29635 # // ...
29636 #
29637 # var protoToCssColor = function(rgb_color) {
29638 # var redFrac = rgb_color.red || 0.0;
29639 # var greenFrac = rgb_color.green || 0.0;
29640 # var blueFrac = rgb_color.blue || 0.0;
29641 # var red = Math.floor(redFrac * 255);
29642 # var green = Math.floor(greenFrac * 255);
29643 # var blue = Math.floor(blueFrac * 255);
29644 #
29645 # if (!('alpha' in rgb_color)) {
29646 # return rgbToCssColor_(red, green, blue);
29647 # }
29648 #
29649 # var alphaFrac = rgb_color.alpha.value || 0.0;
29650 # var rgbParams = [red, green, blue].join(',');
29651 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29652 # };
29653 #
29654 # var rgbToCssColor_ = function(red, green, blue) {
29655 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29656 # var hexString = rgbNumber.toString(16);
29657 # var missingZeros = 6 - hexString.length;
29658 # var resultBuilder = ['#'];
29659 # for (var i = 0; i < missingZeros; i++) {
29660 # resultBuilder.push('0');
29661 # }
29662 # resultBuilder.push(hexString);
29663 # return resultBuilder.join('');
29664 # };
29665 #
29666 # // ...
29667 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29668 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29669 # the final pixel color is defined by the equation:
29670 #
29671 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29672 #
29673 # This means that a value of 1.0 corresponds to a solid color, whereas
29674 # a value of 0.0 corresponds to a completely transparent color. This
29675 # uses a wrapper message rather than a simple float scalar so that it is
29676 # possible to distinguish between a default value and the value being unset.
29677 # If omitted, this color object is to be rendered as a solid color
29678 # (as if the alpha value had been explicitly given with a value of 1.0).
29679 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29680 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29681 },
29682 "width": 42, # The width of the border, in pixels.
29683 # Deprecated; the width is determined by the "style" field.
29684 "style": "A String", # The style of the border.
29685 },
29686 "right": { # A border along a cell. # The right border of the cell.
29687 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29688 # for simplicity of conversion to/from color representations in various
29689 # languages over compactness; for example, the fields of this representation
29690 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29691 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29692 # method in iOS; and, with just a little work, it can be easily formatted into
29693 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29694 #
29695 # Example (Java):
29696 #
29697 # import com.google.type.Color;
29698 #
29699 # // ...
29700 # public static java.awt.Color fromProto(Color protocolor) {
29701 # float alpha = protocolor.hasAlpha()
29702 # ? protocolor.getAlpha().getValue()
29703 # : 1.0;
29704 #
29705 # return new java.awt.Color(
29706 # protocolor.getRed(),
29707 # protocolor.getGreen(),
29708 # protocolor.getBlue(),
29709 # alpha);
29710 # }
29711 #
29712 # public static Color toProto(java.awt.Color color) {
29713 # float red = (float) color.getRed();
29714 # float green = (float) color.getGreen();
29715 # float blue = (float) color.getBlue();
29716 # float denominator = 255.0;
29717 # Color.Builder resultBuilder =
29718 # Color
29719 # .newBuilder()
29720 # .setRed(red / denominator)
29721 # .setGreen(green / denominator)
29722 # .setBlue(blue / denominator);
29723 # int alpha = color.getAlpha();
29724 # if (alpha != 255) {
29725 # result.setAlpha(
29726 # FloatValue
29727 # .newBuilder()
29728 # .setValue(((float) alpha) / denominator)
29729 # .build());
29730 # }
29731 # return resultBuilder.build();
29732 # }
29733 # // ...
29734 #
29735 # Example (iOS / Obj-C):
29736 #
29737 # // ...
29738 # static UIColor* fromProto(Color* protocolor) {
29739 # float red = [protocolor red];
29740 # float green = [protocolor green];
29741 # float blue = [protocolor blue];
29742 # FloatValue* alpha_wrapper = [protocolor alpha];
29743 # float alpha = 1.0;
29744 # if (alpha_wrapper != nil) {
29745 # alpha = [alpha_wrapper value];
29746 # }
29747 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29748 # }
29749 #
29750 # static Color* toProto(UIColor* color) {
29751 # CGFloat red, green, blue, alpha;
29752 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29753 # return nil;
29754 # }
29755 # Color* result = [Color alloc] init];
29756 # [result setRed:red];
29757 # [result setGreen:green];
29758 # [result setBlue:blue];
29759 # if (alpha <= 0.9999) {
29760 # [result setAlpha:floatWrapperWithValue(alpha)];
29761 # }
29762 # [result autorelease];
29763 # return result;
29764 # }
29765 # // ...
29766 #
29767 # Example (JavaScript):
29768 #
29769 # // ...
29770 #
29771 # var protoToCssColor = function(rgb_color) {
29772 # var redFrac = rgb_color.red || 0.0;
29773 # var greenFrac = rgb_color.green || 0.0;
29774 # var blueFrac = rgb_color.blue || 0.0;
29775 # var red = Math.floor(redFrac * 255);
29776 # var green = Math.floor(greenFrac * 255);
29777 # var blue = Math.floor(blueFrac * 255);
29778 #
29779 # if (!('alpha' in rgb_color)) {
29780 # return rgbToCssColor_(red, green, blue);
29781 # }
29782 #
29783 # var alphaFrac = rgb_color.alpha.value || 0.0;
29784 # var rgbParams = [red, green, blue].join(',');
29785 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29786 # };
29787 #
29788 # var rgbToCssColor_ = function(red, green, blue) {
29789 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29790 # var hexString = rgbNumber.toString(16);
29791 # var missingZeros = 6 - hexString.length;
29792 # var resultBuilder = ['#'];
29793 # for (var i = 0; i < missingZeros; i++) {
29794 # resultBuilder.push('0');
29795 # }
29796 # resultBuilder.push(hexString);
29797 # return resultBuilder.join('');
29798 # };
29799 #
29800 # // ...
29801 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29802 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29803 # the final pixel color is defined by the equation:
29804 #
29805 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29806 #
29807 # This means that a value of 1.0 corresponds to a solid color, whereas
29808 # a value of 0.0 corresponds to a completely transparent color. This
29809 # uses a wrapper message rather than a simple float scalar so that it is
29810 # possible to distinguish between a default value and the value being unset.
29811 # If omitted, this color object is to be rendered as a solid color
29812 # (as if the alpha value had been explicitly given with a value of 1.0).
29813 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29814 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29815 },
29816 "width": 42, # The width of the border, in pixels.
29817 # Deprecated; the width is determined by the "style" field.
29818 "style": "A String", # The style of the border.
29819 },
29820 "bottom": { # A border along a cell. # The bottom border of the cell.
29821 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29822 # for simplicity of conversion to/from color representations in various
29823 # languages over compactness; for example, the fields of this representation
29824 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29825 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29826 # method in iOS; and, with just a little work, it can be easily formatted into
29827 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29828 #
29829 # Example (Java):
29830 #
29831 # import com.google.type.Color;
29832 #
29833 # // ...
29834 # public static java.awt.Color fromProto(Color protocolor) {
29835 # float alpha = protocolor.hasAlpha()
29836 # ? protocolor.getAlpha().getValue()
29837 # : 1.0;
29838 #
29839 # return new java.awt.Color(
29840 # protocolor.getRed(),
29841 # protocolor.getGreen(),
29842 # protocolor.getBlue(),
29843 # alpha);
29844 # }
29845 #
29846 # public static Color toProto(java.awt.Color color) {
29847 # float red = (float) color.getRed();
29848 # float green = (float) color.getGreen();
29849 # float blue = (float) color.getBlue();
29850 # float denominator = 255.0;
29851 # Color.Builder resultBuilder =
29852 # Color
29853 # .newBuilder()
29854 # .setRed(red / denominator)
29855 # .setGreen(green / denominator)
29856 # .setBlue(blue / denominator);
29857 # int alpha = color.getAlpha();
29858 # if (alpha != 255) {
29859 # result.setAlpha(
29860 # FloatValue
29861 # .newBuilder()
29862 # .setValue(((float) alpha) / denominator)
29863 # .build());
29864 # }
29865 # return resultBuilder.build();
29866 # }
29867 # // ...
29868 #
29869 # Example (iOS / Obj-C):
29870 #
29871 # // ...
29872 # static UIColor* fromProto(Color* protocolor) {
29873 # float red = [protocolor red];
29874 # float green = [protocolor green];
29875 # float blue = [protocolor blue];
29876 # FloatValue* alpha_wrapper = [protocolor alpha];
29877 # float alpha = 1.0;
29878 # if (alpha_wrapper != nil) {
29879 # alpha = [alpha_wrapper value];
29880 # }
29881 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29882 # }
29883 #
29884 # static Color* toProto(UIColor* color) {
29885 # CGFloat red, green, blue, alpha;
29886 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29887 # return nil;
29888 # }
29889 # Color* result = [Color alloc] init];
29890 # [result setRed:red];
29891 # [result setGreen:green];
29892 # [result setBlue:blue];
29893 # if (alpha <= 0.9999) {
29894 # [result setAlpha:floatWrapperWithValue(alpha)];
29895 # }
29896 # [result autorelease];
29897 # return result;
29898 # }
29899 # // ...
29900 #
29901 # Example (JavaScript):
29902 #
29903 # // ...
29904 #
29905 # var protoToCssColor = function(rgb_color) {
29906 # var redFrac = rgb_color.red || 0.0;
29907 # var greenFrac = rgb_color.green || 0.0;
29908 # var blueFrac = rgb_color.blue || 0.0;
29909 # var red = Math.floor(redFrac * 255);
29910 # var green = Math.floor(greenFrac * 255);
29911 # var blue = Math.floor(blueFrac * 255);
29912 #
29913 # if (!('alpha' in rgb_color)) {
29914 # return rgbToCssColor_(red, green, blue);
29915 # }
29916 #
29917 # var alphaFrac = rgb_color.alpha.value || 0.0;
29918 # var rgbParams = [red, green, blue].join(',');
29919 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29920 # };
29921 #
29922 # var rgbToCssColor_ = function(red, green, blue) {
29923 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29924 # var hexString = rgbNumber.toString(16);
29925 # var missingZeros = 6 - hexString.length;
29926 # var resultBuilder = ['#'];
29927 # for (var i = 0; i < missingZeros; i++) {
29928 # resultBuilder.push('0');
29929 # }
29930 # resultBuilder.push(hexString);
29931 # return resultBuilder.join('');
29932 # };
29933 #
29934 # // ...
29935 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29936 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29937 # the final pixel color is defined by the equation:
29938 #
29939 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29940 #
29941 # This means that a value of 1.0 corresponds to a solid color, whereas
29942 # a value of 0.0 corresponds to a completely transparent color. This
29943 # uses a wrapper message rather than a simple float scalar so that it is
29944 # possible to distinguish between a default value and the value being unset.
29945 # If omitted, this color object is to be rendered as a solid color
29946 # (as if the alpha value had been explicitly given with a value of 1.0).
29947 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29948 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29949 },
29950 "width": 42, # The width of the border, in pixels.
29951 # Deprecated; the width is determined by the "style" field.
29952 "style": "A String", # The style of the border.
29953 },
29954 "left": { # A border along a cell. # The left border of the cell.
29955 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29956 # for simplicity of conversion to/from color representations in various
29957 # languages over compactness; for example, the fields of this representation
29958 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29959 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29960 # method in iOS; and, with just a little work, it can be easily formatted into
29961 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29962 #
29963 # Example (Java):
29964 #
29965 # import com.google.type.Color;
29966 #
29967 # // ...
29968 # public static java.awt.Color fromProto(Color protocolor) {
29969 # float alpha = protocolor.hasAlpha()
29970 # ? protocolor.getAlpha().getValue()
29971 # : 1.0;
29972 #
29973 # return new java.awt.Color(
29974 # protocolor.getRed(),
29975 # protocolor.getGreen(),
29976 # protocolor.getBlue(),
29977 # alpha);
29978 # }
29979 #
29980 # public static Color toProto(java.awt.Color color) {
29981 # float red = (float) color.getRed();
29982 # float green = (float) color.getGreen();
29983 # float blue = (float) color.getBlue();
29984 # float denominator = 255.0;
29985 # Color.Builder resultBuilder =
29986 # Color
29987 # .newBuilder()
29988 # .setRed(red / denominator)
29989 # .setGreen(green / denominator)
29990 # .setBlue(blue / denominator);
29991 # int alpha = color.getAlpha();
29992 # if (alpha != 255) {
29993 # result.setAlpha(
29994 # FloatValue
29995 # .newBuilder()
29996 # .setValue(((float) alpha) / denominator)
29997 # .build());
29998 # }
29999 # return resultBuilder.build();
30000 # }
30001 # // ...
30002 #
30003 # Example (iOS / Obj-C):
30004 #
30005 # // ...
30006 # static UIColor* fromProto(Color* protocolor) {
30007 # float red = [protocolor red];
30008 # float green = [protocolor green];
30009 # float blue = [protocolor blue];
30010 # FloatValue* alpha_wrapper = [protocolor alpha];
30011 # float alpha = 1.0;
30012 # if (alpha_wrapper != nil) {
30013 # alpha = [alpha_wrapper value];
30014 # }
30015 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30016 # }
30017 #
30018 # static Color* toProto(UIColor* color) {
30019 # CGFloat red, green, blue, alpha;
30020 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30021 # return nil;
30022 # }
30023 # Color* result = [Color alloc] init];
30024 # [result setRed:red];
30025 # [result setGreen:green];
30026 # [result setBlue:blue];
30027 # if (alpha <= 0.9999) {
30028 # [result setAlpha:floatWrapperWithValue(alpha)];
30029 # }
30030 # [result autorelease];
30031 # return result;
30032 # }
30033 # // ...
30034 #
30035 # Example (JavaScript):
30036 #
30037 # // ...
30038 #
30039 # var protoToCssColor = function(rgb_color) {
30040 # var redFrac = rgb_color.red || 0.0;
30041 # var greenFrac = rgb_color.green || 0.0;
30042 # var blueFrac = rgb_color.blue || 0.0;
30043 # var red = Math.floor(redFrac * 255);
30044 # var green = Math.floor(greenFrac * 255);
30045 # var blue = Math.floor(blueFrac * 255);
30046 #
30047 # if (!('alpha' in rgb_color)) {
30048 # return rgbToCssColor_(red, green, blue);
30049 # }
30050 #
30051 # var alphaFrac = rgb_color.alpha.value || 0.0;
30052 # var rgbParams = [red, green, blue].join(',');
30053 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30054 # };
30055 #
30056 # var rgbToCssColor_ = function(red, green, blue) {
30057 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30058 # var hexString = rgbNumber.toString(16);
30059 # var missingZeros = 6 - hexString.length;
30060 # var resultBuilder = ['#'];
30061 # for (var i = 0; i < missingZeros; i++) {
30062 # resultBuilder.push('0');
30063 # }
30064 # resultBuilder.push(hexString);
30065 # return resultBuilder.join('');
30066 # };
30067 #
30068 # // ...
30069 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30070 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30071 # the final pixel color is defined by the equation:
30072 #
30073 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30074 #
30075 # This means that a value of 1.0 corresponds to a solid color, whereas
30076 # a value of 0.0 corresponds to a completely transparent color. This
30077 # uses a wrapper message rather than a simple float scalar so that it is
30078 # possible to distinguish between a default value and the value being unset.
30079 # If omitted, this color object is to be rendered as a solid color
30080 # (as if the alpha value had been explicitly given with a value of 1.0).
30081 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30082 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30083 },
30084 "width": 42, # The width of the border, in pixels.
30085 # Deprecated; the width is determined by the "style" field.
30086 "style": "A String", # The style of the border.
30087 },
30088 },
30089 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
30090 },
30091 },
30092 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
30093 # the interpolation points listed. The format of a cell will vary
30094 # based on its contents as compared to the values of the interpolation
30095 # points.
30096 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
30097 # These pin the gradient color scale according to the color,
30098 # type and value chosen.
30099 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
30100 # for simplicity of conversion to/from color representations in various
30101 # languages over compactness; for example, the fields of this representation
30102 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30103 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30104 # method in iOS; and, with just a little work, it can be easily formatted into
30105 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30106 #
30107 # Example (Java):
30108 #
30109 # import com.google.type.Color;
30110 #
30111 # // ...
30112 # public static java.awt.Color fromProto(Color protocolor) {
30113 # float alpha = protocolor.hasAlpha()
30114 # ? protocolor.getAlpha().getValue()
30115 # : 1.0;
30116 #
30117 # return new java.awt.Color(
30118 # protocolor.getRed(),
30119 # protocolor.getGreen(),
30120 # protocolor.getBlue(),
30121 # alpha);
30122 # }
30123 #
30124 # public static Color toProto(java.awt.Color color) {
30125 # float red = (float) color.getRed();
30126 # float green = (float) color.getGreen();
30127 # float blue = (float) color.getBlue();
30128 # float denominator = 255.0;
30129 # Color.Builder resultBuilder =
30130 # Color
30131 # .newBuilder()
30132 # .setRed(red / denominator)
30133 # .setGreen(green / denominator)
30134 # .setBlue(blue / denominator);
30135 # int alpha = color.getAlpha();
30136 # if (alpha != 255) {
30137 # result.setAlpha(
30138 # FloatValue
30139 # .newBuilder()
30140 # .setValue(((float) alpha) / denominator)
30141 # .build());
30142 # }
30143 # return resultBuilder.build();
30144 # }
30145 # // ...
30146 #
30147 # Example (iOS / Obj-C):
30148 #
30149 # // ...
30150 # static UIColor* fromProto(Color* protocolor) {
30151 # float red = [protocolor red];
30152 # float green = [protocolor green];
30153 # float blue = [protocolor blue];
30154 # FloatValue* alpha_wrapper = [protocolor alpha];
30155 # float alpha = 1.0;
30156 # if (alpha_wrapper != nil) {
30157 # alpha = [alpha_wrapper value];
30158 # }
30159 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30160 # }
30161 #
30162 # static Color* toProto(UIColor* color) {
30163 # CGFloat red, green, blue, alpha;
30164 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30165 # return nil;
30166 # }
30167 # Color* result = [Color alloc] init];
30168 # [result setRed:red];
30169 # [result setGreen:green];
30170 # [result setBlue:blue];
30171 # if (alpha <= 0.9999) {
30172 # [result setAlpha:floatWrapperWithValue(alpha)];
30173 # }
30174 # [result autorelease];
30175 # return result;
30176 # }
30177 # // ...
30178 #
30179 # Example (JavaScript):
30180 #
30181 # // ...
30182 #
30183 # var protoToCssColor = function(rgb_color) {
30184 # var redFrac = rgb_color.red || 0.0;
30185 # var greenFrac = rgb_color.green || 0.0;
30186 # var blueFrac = rgb_color.blue || 0.0;
30187 # var red = Math.floor(redFrac * 255);
30188 # var green = Math.floor(greenFrac * 255);
30189 # var blue = Math.floor(blueFrac * 255);
30190 #
30191 # if (!('alpha' in rgb_color)) {
30192 # return rgbToCssColor_(red, green, blue);
30193 # }
30194 #
30195 # var alphaFrac = rgb_color.alpha.value || 0.0;
30196 # var rgbParams = [red, green, blue].join(',');
30197 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30198 # };
30199 #
30200 # var rgbToCssColor_ = function(red, green, blue) {
30201 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30202 # var hexString = rgbNumber.toString(16);
30203 # var missingZeros = 6 - hexString.length;
30204 # var resultBuilder = ['#'];
30205 # for (var i = 0; i < missingZeros; i++) {
30206 # resultBuilder.push('0');
30207 # }
30208 # resultBuilder.push(hexString);
30209 # return resultBuilder.join('');
30210 # };
30211 #
30212 # // ...
30213 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30214 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30215 # the final pixel color is defined by the equation:
30216 #
30217 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30218 #
30219 # This means that a value of 1.0 corresponds to a solid color, whereas
30220 # a value of 0.0 corresponds to a completely transparent color. This
30221 # uses a wrapper message rather than a simple float scalar so that it is
30222 # possible to distinguish between a default value and the value being unset.
30223 # If omitted, this color object is to be rendered as a solid color
30224 # (as if the alpha value had been explicitly given with a value of 1.0).
30225 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30226 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30227 },
30228 "type": "A String", # How the value should be interpreted.
30229 "value": "A String", # The value this interpolation point uses. May be a formula.
30230 # Unused if type is MIN or
30231 # MAX.
30232 },
30233 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
30234 # These pin the gradient color scale according to the color,
30235 # type and value chosen.
30236 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
30237 # for simplicity of conversion to/from color representations in various
30238 # languages over compactness; for example, the fields of this representation
30239 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30240 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30241 # method in iOS; and, with just a little work, it can be easily formatted into
30242 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30243 #
30244 # Example (Java):
30245 #
30246 # import com.google.type.Color;
30247 #
30248 # // ...
30249 # public static java.awt.Color fromProto(Color protocolor) {
30250 # float alpha = protocolor.hasAlpha()
30251 # ? protocolor.getAlpha().getValue()
30252 # : 1.0;
30253 #
30254 # return new java.awt.Color(
30255 # protocolor.getRed(),
30256 # protocolor.getGreen(),
30257 # protocolor.getBlue(),
30258 # alpha);
30259 # }
30260 #
30261 # public static Color toProto(java.awt.Color color) {
30262 # float red = (float) color.getRed();
30263 # float green = (float) color.getGreen();
30264 # float blue = (float) color.getBlue();
30265 # float denominator = 255.0;
30266 # Color.Builder resultBuilder =
30267 # Color
30268 # .newBuilder()
30269 # .setRed(red / denominator)
30270 # .setGreen(green / denominator)
30271 # .setBlue(blue / denominator);
30272 # int alpha = color.getAlpha();
30273 # if (alpha != 255) {
30274 # result.setAlpha(
30275 # FloatValue
30276 # .newBuilder()
30277 # .setValue(((float) alpha) / denominator)
30278 # .build());
30279 # }
30280 # return resultBuilder.build();
30281 # }
30282 # // ...
30283 #
30284 # Example (iOS / Obj-C):
30285 #
30286 # // ...
30287 # static UIColor* fromProto(Color* protocolor) {
30288 # float red = [protocolor red];
30289 # float green = [protocolor green];
30290 # float blue = [protocolor blue];
30291 # FloatValue* alpha_wrapper = [protocolor alpha];
30292 # float alpha = 1.0;
30293 # if (alpha_wrapper != nil) {
30294 # alpha = [alpha_wrapper value];
30295 # }
30296 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30297 # }
30298 #
30299 # static Color* toProto(UIColor* color) {
30300 # CGFloat red, green, blue, alpha;
30301 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30302 # return nil;
30303 # }
30304 # Color* result = [Color alloc] init];
30305 # [result setRed:red];
30306 # [result setGreen:green];
30307 # [result setBlue:blue];
30308 # if (alpha <= 0.9999) {
30309 # [result setAlpha:floatWrapperWithValue(alpha)];
30310 # }
30311 # [result autorelease];
30312 # return result;
30313 # }
30314 # // ...
30315 #
30316 # Example (JavaScript):
30317 #
30318 # // ...
30319 #
30320 # var protoToCssColor = function(rgb_color) {
30321 # var redFrac = rgb_color.red || 0.0;
30322 # var greenFrac = rgb_color.green || 0.0;
30323 # var blueFrac = rgb_color.blue || 0.0;
30324 # var red = Math.floor(redFrac * 255);
30325 # var green = Math.floor(greenFrac * 255);
30326 # var blue = Math.floor(blueFrac * 255);
30327 #
30328 # if (!('alpha' in rgb_color)) {
30329 # return rgbToCssColor_(red, green, blue);
30330 # }
30331 #
30332 # var alphaFrac = rgb_color.alpha.value || 0.0;
30333 # var rgbParams = [red, green, blue].join(',');
30334 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30335 # };
30336 #
30337 # var rgbToCssColor_ = function(red, green, blue) {
30338 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30339 # var hexString = rgbNumber.toString(16);
30340 # var missingZeros = 6 - hexString.length;
30341 # var resultBuilder = ['#'];
30342 # for (var i = 0; i < missingZeros; i++) {
30343 # resultBuilder.push('0');
30344 # }
30345 # resultBuilder.push(hexString);
30346 # return resultBuilder.join('');
30347 # };
30348 #
30349 # // ...
30350 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30351 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30352 # the final pixel color is defined by the equation:
30353 #
30354 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30355 #
30356 # This means that a value of 1.0 corresponds to a solid color, whereas
30357 # a value of 0.0 corresponds to a completely transparent color. This
30358 # uses a wrapper message rather than a simple float scalar so that it is
30359 # possible to distinguish between a default value and the value being unset.
30360 # If omitted, this color object is to be rendered as a solid color
30361 # (as if the alpha value had been explicitly given with a value of 1.0).
30362 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30363 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30364 },
30365 "type": "A String", # How the value should be interpreted.
30366 "value": "A String", # The value this interpolation point uses. May be a formula.
30367 # Unused if type is MIN or
30368 # MAX.
30369 },
30370 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
30371 # These pin the gradient color scale according to the color,
30372 # type and value chosen.
30373 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
30374 # for simplicity of conversion to/from color representations in various
30375 # languages over compactness; for example, the fields of this representation
30376 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30377 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30378 # method in iOS; and, with just a little work, it can be easily formatted into
30379 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30380 #
30381 # Example (Java):
30382 #
30383 # import com.google.type.Color;
30384 #
30385 # // ...
30386 # public static java.awt.Color fromProto(Color protocolor) {
30387 # float alpha = protocolor.hasAlpha()
30388 # ? protocolor.getAlpha().getValue()
30389 # : 1.0;
30390 #
30391 # return new java.awt.Color(
30392 # protocolor.getRed(),
30393 # protocolor.getGreen(),
30394 # protocolor.getBlue(),
30395 # alpha);
30396 # }
30397 #
30398 # public static Color toProto(java.awt.Color color) {
30399 # float red = (float) color.getRed();
30400 # float green = (float) color.getGreen();
30401 # float blue = (float) color.getBlue();
30402 # float denominator = 255.0;
30403 # Color.Builder resultBuilder =
30404 # Color
30405 # .newBuilder()
30406 # .setRed(red / denominator)
30407 # .setGreen(green / denominator)
30408 # .setBlue(blue / denominator);
30409 # int alpha = color.getAlpha();
30410 # if (alpha != 255) {
30411 # result.setAlpha(
30412 # FloatValue
30413 # .newBuilder()
30414 # .setValue(((float) alpha) / denominator)
30415 # .build());
30416 # }
30417 # return resultBuilder.build();
30418 # }
30419 # // ...
30420 #
30421 # Example (iOS / Obj-C):
30422 #
30423 # // ...
30424 # static UIColor* fromProto(Color* protocolor) {
30425 # float red = [protocolor red];
30426 # float green = [protocolor green];
30427 # float blue = [protocolor blue];
30428 # FloatValue* alpha_wrapper = [protocolor alpha];
30429 # float alpha = 1.0;
30430 # if (alpha_wrapper != nil) {
30431 # alpha = [alpha_wrapper value];
30432 # }
30433 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30434 # }
30435 #
30436 # static Color* toProto(UIColor* color) {
30437 # CGFloat red, green, blue, alpha;
30438 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30439 # return nil;
30440 # }
30441 # Color* result = [Color alloc] init];
30442 # [result setRed:red];
30443 # [result setGreen:green];
30444 # [result setBlue:blue];
30445 # if (alpha <= 0.9999) {
30446 # [result setAlpha:floatWrapperWithValue(alpha)];
30447 # }
30448 # [result autorelease];
30449 # return result;
30450 # }
30451 # // ...
30452 #
30453 # Example (JavaScript):
30454 #
30455 # // ...
30456 #
30457 # var protoToCssColor = function(rgb_color) {
30458 # var redFrac = rgb_color.red || 0.0;
30459 # var greenFrac = rgb_color.green || 0.0;
30460 # var blueFrac = rgb_color.blue || 0.0;
30461 # var red = Math.floor(redFrac * 255);
30462 # var green = Math.floor(greenFrac * 255);
30463 # var blue = Math.floor(blueFrac * 255);
30464 #
30465 # if (!('alpha' in rgb_color)) {
30466 # return rgbToCssColor_(red, green, blue);
30467 # }
30468 #
30469 # var alphaFrac = rgb_color.alpha.value || 0.0;
30470 # var rgbParams = [red, green, blue].join(',');
30471 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30472 # };
30473 #
30474 # var rgbToCssColor_ = function(red, green, blue) {
30475 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30476 # var hexString = rgbNumber.toString(16);
30477 # var missingZeros = 6 - hexString.length;
30478 # var resultBuilder = ['#'];
30479 # for (var i = 0; i < missingZeros; i++) {
30480 # resultBuilder.push('0');
30481 # }
30482 # resultBuilder.push(hexString);
30483 # return resultBuilder.join('');
30484 # };
30485 #
30486 # // ...
30487 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30488 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30489 # the final pixel color is defined by the equation:
30490 #
30491 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30492 #
30493 # This means that a value of 1.0 corresponds to a solid color, whereas
30494 # a value of 0.0 corresponds to a completely transparent color. This
30495 # uses a wrapper message rather than a simple float scalar so that it is
30496 # possible to distinguish between a default value and the value being unset.
30497 # If omitted, this color object is to be rendered as a solid color
30498 # (as if the alpha value had been explicitly given with a value of 1.0).
30499 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30500 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30501 },
30502 "type": "A String", # How the value should be interpreted.
30503 "value": "A String", # The value this interpolation point uses. May be a formula.
30504 # Unused if type is MIN or
30505 # MAX.
30506 },
30507 },
30508 },
30509 ],
30510 "bandedRanges": [ # The banded (i.e. alternating colors) ranges on this sheet.
30511 { # A banded (alternating colors) range in a sheet.
30512 "range": { # A range on a sheet. # The range over which these properties are applied.
30513 # All indexes are zero-based.
30514 # Indexes are half open, e.g the start index is inclusive
30515 # and the end index is exclusive -- [start_index, end_index).
30516 # Missing indexes indicate the range is unbounded on that side.
30517 #
30518 # For example, if `"Sheet1"` is sheet ID 0, then:
30519 #
30520 # `Sheet1!A1:A1 == sheet_id: 0,
30521 # start_row_index: 0, end_row_index: 1,
30522 # start_column_index: 0, end_column_index: 1`
30523 #
30524 # `Sheet1!A3:B4 == sheet_id: 0,
30525 # start_row_index: 2, end_row_index: 4,
30526 # start_column_index: 0, end_column_index: 2`
30527 #
30528 # `Sheet1!A:B == sheet_id: 0,
30529 # start_column_index: 0, end_column_index: 2`
30530 #
30531 # `Sheet1!A5:B == sheet_id: 0,
30532 # start_row_index: 4,
30533 # start_column_index: 0, end_column_index: 2`
30534 #
30535 # `Sheet1 == sheet_id:0`
30536 #
30537 # The start index must always be less than or equal to the end index.
30538 # If the start index equals the end index, then the range is empty.
30539 # Empty ranges are typically not meaningful and are usually rendered in the
30540 # UI as `#REF!`.
30541 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
30542 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
30543 "sheetId": 42, # The sheet this range is on.
30544 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
30545 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
30546 },
30547 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
30548 # by-column basis throughout all the columns in the range. At least one of
30549 # row_properties or column_properties must be specified.
30550 # BandedRange.row_properties and BandedRange.column_properties are
30551 # set, the fill colors are applied to cells according to the following rules:
30552 #
30553 # * header_color and footer_color take priority over band colors.
30554 # * first_band_color takes priority over second_band_color.
30555 # * row_properties takes priority over column_properties.
30556 #
30557 # For example, the first row color takes priority over the first column
30558 # color, but the first column color takes priority over the second row color.
30559 # Similarly, the row header takes priority over the column header in the
30560 # top left cell, but the column header takes priority over the first row
30561 # color if the row header is not set.
30562 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
30563 # for simplicity of conversion to/from color representations in various
30564 # languages over compactness; for example, the fields of this representation
30565 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30566 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30567 # method in iOS; and, with just a little work, it can be easily formatted into
30568 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30569 #
30570 # Example (Java):
30571 #
30572 # import com.google.type.Color;
30573 #
30574 # // ...
30575 # public static java.awt.Color fromProto(Color protocolor) {
30576 # float alpha = protocolor.hasAlpha()
30577 # ? protocolor.getAlpha().getValue()
30578 # : 1.0;
30579 #
30580 # return new java.awt.Color(
30581 # protocolor.getRed(),
30582 # protocolor.getGreen(),
30583 # protocolor.getBlue(),
30584 # alpha);
30585 # }
30586 #
30587 # public static Color toProto(java.awt.Color color) {
30588 # float red = (float) color.getRed();
30589 # float green = (float) color.getGreen();
30590 # float blue = (float) color.getBlue();
30591 # float denominator = 255.0;
30592 # Color.Builder resultBuilder =
30593 # Color
30594 # .newBuilder()
30595 # .setRed(red / denominator)
30596 # .setGreen(green / denominator)
30597 # .setBlue(blue / denominator);
30598 # int alpha = color.getAlpha();
30599 # if (alpha != 255) {
30600 # result.setAlpha(
30601 # FloatValue
30602 # .newBuilder()
30603 # .setValue(((float) alpha) / denominator)
30604 # .build());
30605 # }
30606 # return resultBuilder.build();
30607 # }
30608 # // ...
30609 #
30610 # Example (iOS / Obj-C):
30611 #
30612 # // ...
30613 # static UIColor* fromProto(Color* protocolor) {
30614 # float red = [protocolor red];
30615 # float green = [protocolor green];
30616 # float blue = [protocolor blue];
30617 # FloatValue* alpha_wrapper = [protocolor alpha];
30618 # float alpha = 1.0;
30619 # if (alpha_wrapper != nil) {
30620 # alpha = [alpha_wrapper value];
30621 # }
30622 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30623 # }
30624 #
30625 # static Color* toProto(UIColor* color) {
30626 # CGFloat red, green, blue, alpha;
30627 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30628 # return nil;
30629 # }
30630 # Color* result = [Color alloc] init];
30631 # [result setRed:red];
30632 # [result setGreen:green];
30633 # [result setBlue:blue];
30634 # if (alpha <= 0.9999) {
30635 # [result setAlpha:floatWrapperWithValue(alpha)];
30636 # }
30637 # [result autorelease];
30638 # return result;
30639 # }
30640 # // ...
30641 #
30642 # Example (JavaScript):
30643 #
30644 # // ...
30645 #
30646 # var protoToCssColor = function(rgb_color) {
30647 # var redFrac = rgb_color.red || 0.0;
30648 # var greenFrac = rgb_color.green || 0.0;
30649 # var blueFrac = rgb_color.blue || 0.0;
30650 # var red = Math.floor(redFrac * 255);
30651 # var green = Math.floor(greenFrac * 255);
30652 # var blue = Math.floor(blueFrac * 255);
30653 #
30654 # if (!('alpha' in rgb_color)) {
30655 # return rgbToCssColor_(red, green, blue);
30656 # }
30657 #
30658 # var alphaFrac = rgb_color.alpha.value || 0.0;
30659 # var rgbParams = [red, green, blue].join(',');
30660 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30661 # };
30662 #
30663 # var rgbToCssColor_ = function(red, green, blue) {
30664 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30665 # var hexString = rgbNumber.toString(16);
30666 # var missingZeros = 6 - hexString.length;
30667 # var resultBuilder = ['#'];
30668 # for (var i = 0; i < missingZeros; i++) {
30669 # resultBuilder.push('0');
30670 # }
30671 # resultBuilder.push(hexString);
30672 # return resultBuilder.join('');
30673 # };
30674 #
30675 # // ...
30676 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30677 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30678 # the final pixel color is defined by the equation:
30679 #
30680 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30681 #
30682 # This means that a value of 1.0 corresponds to a solid color, whereas
30683 # a value of 0.0 corresponds to a completely transparent color. This
30684 # uses a wrapper message rather than a simple float scalar so that it is
30685 # possible to distinguish between a default value and the value being unset.
30686 # If omitted, this color object is to be rendered as a solid color
30687 # (as if the alpha value had been explicitly given with a value of 1.0).
30688 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30689 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30690 },
30691 "headerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the first row or column. If this field is set, the first
30692 # row or column will be filled with this color and the colors will
30693 # alternate between first_band_color and second_band_color starting
30694 # from the second row or column. Otherwise, the first row or column will be
30695 # filled with first_band_color and the colors will proceed to alternate
30696 # as they normally would.
30697 # for simplicity of conversion to/from color representations in various
30698 # languages over compactness; for example, the fields of this representation
30699 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30700 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30701 # method in iOS; and, with just a little work, it can be easily formatted into
30702 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30703 #
30704 # Example (Java):
30705 #
30706 # import com.google.type.Color;
30707 #
30708 # // ...
30709 # public static java.awt.Color fromProto(Color protocolor) {
30710 # float alpha = protocolor.hasAlpha()
30711 # ? protocolor.getAlpha().getValue()
30712 # : 1.0;
30713 #
30714 # return new java.awt.Color(
30715 # protocolor.getRed(),
30716 # protocolor.getGreen(),
30717 # protocolor.getBlue(),
30718 # alpha);
30719 # }
30720 #
30721 # public static Color toProto(java.awt.Color color) {
30722 # float red = (float) color.getRed();
30723 # float green = (float) color.getGreen();
30724 # float blue = (float) color.getBlue();
30725 # float denominator = 255.0;
30726 # Color.Builder resultBuilder =
30727 # Color
30728 # .newBuilder()
30729 # .setRed(red / denominator)
30730 # .setGreen(green / denominator)
30731 # .setBlue(blue / denominator);
30732 # int alpha = color.getAlpha();
30733 # if (alpha != 255) {
30734 # result.setAlpha(
30735 # FloatValue
30736 # .newBuilder()
30737 # .setValue(((float) alpha) / denominator)
30738 # .build());
30739 # }
30740 # return resultBuilder.build();
30741 # }
30742 # // ...
30743 #
30744 # Example (iOS / Obj-C):
30745 #
30746 # // ...
30747 # static UIColor* fromProto(Color* protocolor) {
30748 # float red = [protocolor red];
30749 # float green = [protocolor green];
30750 # float blue = [protocolor blue];
30751 # FloatValue* alpha_wrapper = [protocolor alpha];
30752 # float alpha = 1.0;
30753 # if (alpha_wrapper != nil) {
30754 # alpha = [alpha_wrapper value];
30755 # }
30756 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30757 # }
30758 #
30759 # static Color* toProto(UIColor* color) {
30760 # CGFloat red, green, blue, alpha;
30761 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30762 # return nil;
30763 # }
30764 # Color* result = [Color alloc] init];
30765 # [result setRed:red];
30766 # [result setGreen:green];
30767 # [result setBlue:blue];
30768 # if (alpha <= 0.9999) {
30769 # [result setAlpha:floatWrapperWithValue(alpha)];
30770 # }
30771 # [result autorelease];
30772 # return result;
30773 # }
30774 # // ...
30775 #
30776 # Example (JavaScript):
30777 #
30778 # // ...
30779 #
30780 # var protoToCssColor = function(rgb_color) {
30781 # var redFrac = rgb_color.red || 0.0;
30782 # var greenFrac = rgb_color.green || 0.0;
30783 # var blueFrac = rgb_color.blue || 0.0;
30784 # var red = Math.floor(redFrac * 255);
30785 # var green = Math.floor(greenFrac * 255);
30786 # var blue = Math.floor(blueFrac * 255);
30787 #
30788 # if (!('alpha' in rgb_color)) {
30789 # return rgbToCssColor_(red, green, blue);
30790 # }
30791 #
30792 # var alphaFrac = rgb_color.alpha.value || 0.0;
30793 # var rgbParams = [red, green, blue].join(',');
30794 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30795 # };
30796 #
30797 # var rgbToCssColor_ = function(red, green, blue) {
30798 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30799 # var hexString = rgbNumber.toString(16);
30800 # var missingZeros = 6 - hexString.length;
30801 # var resultBuilder = ['#'];
30802 # for (var i = 0; i < missingZeros; i++) {
30803 # resultBuilder.push('0');
30804 # }
30805 # resultBuilder.push(hexString);
30806 # return resultBuilder.join('');
30807 # };
30808 #
30809 # // ...
30810 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30811 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30812 # the final pixel color is defined by the equation:
30813 #
30814 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30815 #
30816 # This means that a value of 1.0 corresponds to a solid color, whereas
30817 # a value of 0.0 corresponds to a completely transparent color. This
30818 # uses a wrapper message rather than a simple float scalar so that it is
30819 # possible to distinguish between a default value and the value being unset.
30820 # If omitted, this color object is to be rendered as a solid color
30821 # (as if the alpha value had been explicitly given with a value of 1.0).
30822 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30823 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30824 },
30825 "footerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the last row or column. If this field is not set, the last
30826 # row or column will be filled with either first_band_color or
30827 # second_band_color, depending on the color of the previous row or
30828 # column.
30829 # for simplicity of conversion to/from color representations in various
30830 # languages over compactness; for example, the fields of this representation
30831 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30832 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30833 # method in iOS; and, with just a little work, it can be easily formatted into
30834 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30835 #
30836 # Example (Java):
30837 #
30838 # import com.google.type.Color;
30839 #
30840 # // ...
30841 # public static java.awt.Color fromProto(Color protocolor) {
30842 # float alpha = protocolor.hasAlpha()
30843 # ? protocolor.getAlpha().getValue()
30844 # : 1.0;
30845 #
30846 # return new java.awt.Color(
30847 # protocolor.getRed(),
30848 # protocolor.getGreen(),
30849 # protocolor.getBlue(),
30850 # alpha);
30851 # }
30852 #
30853 # public static Color toProto(java.awt.Color color) {
30854 # float red = (float) color.getRed();
30855 # float green = (float) color.getGreen();
30856 # float blue = (float) color.getBlue();
30857 # float denominator = 255.0;
30858 # Color.Builder resultBuilder =
30859 # Color
30860 # .newBuilder()
30861 # .setRed(red / denominator)
30862 # .setGreen(green / denominator)
30863 # .setBlue(blue / denominator);
30864 # int alpha = color.getAlpha();
30865 # if (alpha != 255) {
30866 # result.setAlpha(
30867 # FloatValue
30868 # .newBuilder()
30869 # .setValue(((float) alpha) / denominator)
30870 # .build());
30871 # }
30872 # return resultBuilder.build();
30873 # }
30874 # // ...
30875 #
30876 # Example (iOS / Obj-C):
30877 #
30878 # // ...
30879 # static UIColor* fromProto(Color* protocolor) {
30880 # float red = [protocolor red];
30881 # float green = [protocolor green];
30882 # float blue = [protocolor blue];
30883 # FloatValue* alpha_wrapper = [protocolor alpha];
30884 # float alpha = 1.0;
30885 # if (alpha_wrapper != nil) {
30886 # alpha = [alpha_wrapper value];
30887 # }
30888 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30889 # }
30890 #
30891 # static Color* toProto(UIColor* color) {
30892 # CGFloat red, green, blue, alpha;
30893 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30894 # return nil;
30895 # }
30896 # Color* result = [Color alloc] init];
30897 # [result setRed:red];
30898 # [result setGreen:green];
30899 # [result setBlue:blue];
30900 # if (alpha <= 0.9999) {
30901 # [result setAlpha:floatWrapperWithValue(alpha)];
30902 # }
30903 # [result autorelease];
30904 # return result;
30905 # }
30906 # // ...
30907 #
30908 # Example (JavaScript):
30909 #
30910 # // ...
30911 #
30912 # var protoToCssColor = function(rgb_color) {
30913 # var redFrac = rgb_color.red || 0.0;
30914 # var greenFrac = rgb_color.green || 0.0;
30915 # var blueFrac = rgb_color.blue || 0.0;
30916 # var red = Math.floor(redFrac * 255);
30917 # var green = Math.floor(greenFrac * 255);
30918 # var blue = Math.floor(blueFrac * 255);
30919 #
30920 # if (!('alpha' in rgb_color)) {
30921 # return rgbToCssColor_(red, green, blue);
30922 # }
30923 #
30924 # var alphaFrac = rgb_color.alpha.value || 0.0;
30925 # var rgbParams = [red, green, blue].join(',');
30926 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30927 # };
30928 #
30929 # var rgbToCssColor_ = function(red, green, blue) {
30930 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30931 # var hexString = rgbNumber.toString(16);
30932 # var missingZeros = 6 - hexString.length;
30933 # var resultBuilder = ['#'];
30934 # for (var i = 0; i < missingZeros; i++) {
30935 # resultBuilder.push('0');
30936 # }
30937 # resultBuilder.push(hexString);
30938 # return resultBuilder.join('');
30939 # };
30940 #
30941 # // ...
30942 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30943 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30944 # the final pixel color is defined by the equation:
30945 #
30946 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30947 #
30948 # This means that a value of 1.0 corresponds to a solid color, whereas
30949 # a value of 0.0 corresponds to a completely transparent color. This
30950 # uses a wrapper message rather than a simple float scalar so that it is
30951 # possible to distinguish between a default value and the value being unset.
30952 # If omitted, this color object is to be rendered as a solid color
30953 # (as if the alpha value had been explicitly given with a value of 1.0).
30954 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30955 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30956 },
30957 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
30958 # for simplicity of conversion to/from color representations in various
30959 # languages over compactness; for example, the fields of this representation
30960 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30961 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30962 # method in iOS; and, with just a little work, it can be easily formatted into
30963 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30964 #
30965 # Example (Java):
30966 #
30967 # import com.google.type.Color;
30968 #
30969 # // ...
30970 # public static java.awt.Color fromProto(Color protocolor) {
30971 # float alpha = protocolor.hasAlpha()
30972 # ? protocolor.getAlpha().getValue()
30973 # : 1.0;
30974 #
30975 # return new java.awt.Color(
30976 # protocolor.getRed(),
30977 # protocolor.getGreen(),
30978 # protocolor.getBlue(),
30979 # alpha);
30980 # }
30981 #
30982 # public static Color toProto(java.awt.Color color) {
30983 # float red = (float) color.getRed();
30984 # float green = (float) color.getGreen();
30985 # float blue = (float) color.getBlue();
30986 # float denominator = 255.0;
30987 # Color.Builder resultBuilder =
30988 # Color
30989 # .newBuilder()
30990 # .setRed(red / denominator)
30991 # .setGreen(green / denominator)
30992 # .setBlue(blue / denominator);
30993 # int alpha = color.getAlpha();
30994 # if (alpha != 255) {
30995 # result.setAlpha(
30996 # FloatValue
30997 # .newBuilder()
30998 # .setValue(((float) alpha) / denominator)
30999 # .build());
31000 # }
31001 # return resultBuilder.build();
31002 # }
31003 # // ...
31004 #
31005 # Example (iOS / Obj-C):
31006 #
31007 # // ...
31008 # static UIColor* fromProto(Color* protocolor) {
31009 # float red = [protocolor red];
31010 # float green = [protocolor green];
31011 # float blue = [protocolor blue];
31012 # FloatValue* alpha_wrapper = [protocolor alpha];
31013 # float alpha = 1.0;
31014 # if (alpha_wrapper != nil) {
31015 # alpha = [alpha_wrapper value];
31016 # }
31017 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31018 # }
31019 #
31020 # static Color* toProto(UIColor* color) {
31021 # CGFloat red, green, blue, alpha;
31022 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31023 # return nil;
31024 # }
31025 # Color* result = [Color alloc] init];
31026 # [result setRed:red];
31027 # [result setGreen:green];
31028 # [result setBlue:blue];
31029 # if (alpha <= 0.9999) {
31030 # [result setAlpha:floatWrapperWithValue(alpha)];
31031 # }
31032 # [result autorelease];
31033 # return result;
31034 # }
31035 # // ...
31036 #
31037 # Example (JavaScript):
31038 #
31039 # // ...
31040 #
31041 # var protoToCssColor = function(rgb_color) {
31042 # var redFrac = rgb_color.red || 0.0;
31043 # var greenFrac = rgb_color.green || 0.0;
31044 # var blueFrac = rgb_color.blue || 0.0;
31045 # var red = Math.floor(redFrac * 255);
31046 # var green = Math.floor(greenFrac * 255);
31047 # var blue = Math.floor(blueFrac * 255);
31048 #
31049 # if (!('alpha' in rgb_color)) {
31050 # return rgbToCssColor_(red, green, blue);
31051 # }
31052 #
31053 # var alphaFrac = rgb_color.alpha.value || 0.0;
31054 # var rgbParams = [red, green, blue].join(',');
31055 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31056 # };
31057 #
31058 # var rgbToCssColor_ = function(red, green, blue) {
31059 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31060 # var hexString = rgbNumber.toString(16);
31061 # var missingZeros = 6 - hexString.length;
31062 # var resultBuilder = ['#'];
31063 # for (var i = 0; i < missingZeros; i++) {
31064 # resultBuilder.push('0');
31065 # }
31066 # resultBuilder.push(hexString);
31067 # return resultBuilder.join('');
31068 # };
31069 #
31070 # // ...
31071 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31072 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31073 # the final pixel color is defined by the equation:
31074 #
31075 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31076 #
31077 # This means that a value of 1.0 corresponds to a solid color, whereas
31078 # a value of 0.0 corresponds to a completely transparent color. This
31079 # uses a wrapper message rather than a simple float scalar so that it is
31080 # possible to distinguish between a default value and the value being unset.
31081 # If omitted, this color object is to be rendered as a solid color
31082 # (as if the alpha value had been explicitly given with a value of 1.0).
31083 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31084 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31085 },
31086 },
31087 "rowProperties": { # Properties referring a single dimension (either row or column). If both # Properties for row bands. These properties will be applied on a row-by-row
31088 # basis throughout all the rows in the range. At least one of
31089 # row_properties or column_properties must be specified.
31090 # BandedRange.row_properties and BandedRange.column_properties are
31091 # set, the fill colors are applied to cells according to the following rules:
31092 #
31093 # * header_color and footer_color take priority over band colors.
31094 # * first_band_color takes priority over second_band_color.
31095 # * row_properties takes priority over column_properties.
31096 #
31097 # For example, the first row color takes priority over the first column
31098 # color, but the first column color takes priority over the second row color.
31099 # Similarly, the row header takes priority over the column header in the
31100 # top left cell, but the column header takes priority over the first row
31101 # color if the row header is not set.
31102 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
31103 # for simplicity of conversion to/from color representations in various
31104 # languages over compactness; for example, the fields of this representation
31105 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
31106 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
31107 # method in iOS; and, with just a little work, it can be easily formatted into
31108 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
31109 #
31110 # Example (Java):
31111 #
31112 # import com.google.type.Color;
31113 #
31114 # // ...
31115 # public static java.awt.Color fromProto(Color protocolor) {
31116 # float alpha = protocolor.hasAlpha()
31117 # ? protocolor.getAlpha().getValue()
31118 # : 1.0;
31119 #
31120 # return new java.awt.Color(
31121 # protocolor.getRed(),
31122 # protocolor.getGreen(),
31123 # protocolor.getBlue(),
31124 # alpha);
31125 # }
31126 #
31127 # public static Color toProto(java.awt.Color color) {
31128 # float red = (float) color.getRed();
31129 # float green = (float) color.getGreen();
31130 # float blue = (float) color.getBlue();
31131 # float denominator = 255.0;
31132 # Color.Builder resultBuilder =
31133 # Color
31134 # .newBuilder()
31135 # .setRed(red / denominator)
31136 # .setGreen(green / denominator)
31137 # .setBlue(blue / denominator);
31138 # int alpha = color.getAlpha();
31139 # if (alpha != 255) {
31140 # result.setAlpha(
31141 # FloatValue
31142 # .newBuilder()
31143 # .setValue(((float) alpha) / denominator)
31144 # .build());
31145 # }
31146 # return resultBuilder.build();
31147 # }
31148 # // ...
31149 #
31150 # Example (iOS / Obj-C):
31151 #
31152 # // ...
31153 # static UIColor* fromProto(Color* protocolor) {
31154 # float red = [protocolor red];
31155 # float green = [protocolor green];
31156 # float blue = [protocolor blue];
31157 # FloatValue* alpha_wrapper = [protocolor alpha];
31158 # float alpha = 1.0;
31159 # if (alpha_wrapper != nil) {
31160 # alpha = [alpha_wrapper value];
31161 # }
31162 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31163 # }
31164 #
31165 # static Color* toProto(UIColor* color) {
31166 # CGFloat red, green, blue, alpha;
31167 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31168 # return nil;
31169 # }
31170 # Color* result = [Color alloc] init];
31171 # [result setRed:red];
31172 # [result setGreen:green];
31173 # [result setBlue:blue];
31174 # if (alpha <= 0.9999) {
31175 # [result setAlpha:floatWrapperWithValue(alpha)];
31176 # }
31177 # [result autorelease];
31178 # return result;
31179 # }
31180 # // ...
31181 #
31182 # Example (JavaScript):
31183 #
31184 # // ...
31185 #
31186 # var protoToCssColor = function(rgb_color) {
31187 # var redFrac = rgb_color.red || 0.0;
31188 # var greenFrac = rgb_color.green || 0.0;
31189 # var blueFrac = rgb_color.blue || 0.0;
31190 # var red = Math.floor(redFrac * 255);
31191 # var green = Math.floor(greenFrac * 255);
31192 # var blue = Math.floor(blueFrac * 255);
31193 #
31194 # if (!('alpha' in rgb_color)) {
31195 # return rgbToCssColor_(red, green, blue);
31196 # }
31197 #
31198 # var alphaFrac = rgb_color.alpha.value || 0.0;
31199 # var rgbParams = [red, green, blue].join(',');
31200 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31201 # };
31202 #
31203 # var rgbToCssColor_ = function(red, green, blue) {
31204 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31205 # var hexString = rgbNumber.toString(16);
31206 # var missingZeros = 6 - hexString.length;
31207 # var resultBuilder = ['#'];
31208 # for (var i = 0; i < missingZeros; i++) {
31209 # resultBuilder.push('0');
31210 # }
31211 # resultBuilder.push(hexString);
31212 # return resultBuilder.join('');
31213 # };
31214 #
31215 # // ...
31216 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31217 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31218 # the final pixel color is defined by the equation:
31219 #
31220 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31221 #
31222 # This means that a value of 1.0 corresponds to a solid color, whereas
31223 # a value of 0.0 corresponds to a completely transparent color. This
31224 # uses a wrapper message rather than a simple float scalar so that it is
31225 # possible to distinguish between a default value and the value being unset.
31226 # If omitted, this color object is to be rendered as a solid color
31227 # (as if the alpha value had been explicitly given with a value of 1.0).
31228 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31229 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31230 },
31231 "headerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the first row or column. If this field is set, the first
31232 # row or column will be filled with this color and the colors will
31233 # alternate between first_band_color and second_band_color starting
31234 # from the second row or column. Otherwise, the first row or column will be
31235 # filled with first_band_color and the colors will proceed to alternate
31236 # as they normally would.
31237 # for simplicity of conversion to/from color representations in various
31238 # languages over compactness; for example, the fields of this representation
31239 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
31240 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
31241 # method in iOS; and, with just a little work, it can be easily formatted into
31242 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
31243 #
31244 # Example (Java):
31245 #
31246 # import com.google.type.Color;
31247 #
31248 # // ...
31249 # public static java.awt.Color fromProto(Color protocolor) {
31250 # float alpha = protocolor.hasAlpha()
31251 # ? protocolor.getAlpha().getValue()
31252 # : 1.0;
31253 #
31254 # return new java.awt.Color(
31255 # protocolor.getRed(),
31256 # protocolor.getGreen(),
31257 # protocolor.getBlue(),
31258 # alpha);
31259 # }
31260 #
31261 # public static Color toProto(java.awt.Color color) {
31262 # float red = (float) color.getRed();
31263 # float green = (float) color.getGreen();
31264 # float blue = (float) color.getBlue();
31265 # float denominator = 255.0;
31266 # Color.Builder resultBuilder =
31267 # Color
31268 # .newBuilder()
31269 # .setRed(red / denominator)
31270 # .setGreen(green / denominator)
31271 # .setBlue(blue / denominator);
31272 # int alpha = color.getAlpha();
31273 # if (alpha != 255) {
31274 # result.setAlpha(
31275 # FloatValue
31276 # .newBuilder()
31277 # .setValue(((float) alpha) / denominator)
31278 # .build());
31279 # }
31280 # return resultBuilder.build();
31281 # }
31282 # // ...
31283 #
31284 # Example (iOS / Obj-C):
31285 #
31286 # // ...
31287 # static UIColor* fromProto(Color* protocolor) {
31288 # float red = [protocolor red];
31289 # float green = [protocolor green];
31290 # float blue = [protocolor blue];
31291 # FloatValue* alpha_wrapper = [protocolor alpha];
31292 # float alpha = 1.0;
31293 # if (alpha_wrapper != nil) {
31294 # alpha = [alpha_wrapper value];
31295 # }
31296 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31297 # }
31298 #
31299 # static Color* toProto(UIColor* color) {
31300 # CGFloat red, green, blue, alpha;
31301 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31302 # return nil;
31303 # }
31304 # Color* result = [Color alloc] init];
31305 # [result setRed:red];
31306 # [result setGreen:green];
31307 # [result setBlue:blue];
31308 # if (alpha <= 0.9999) {
31309 # [result setAlpha:floatWrapperWithValue(alpha)];
31310 # }
31311 # [result autorelease];
31312 # return result;
31313 # }
31314 # // ...
31315 #
31316 # Example (JavaScript):
31317 #
31318 # // ...
31319 #
31320 # var protoToCssColor = function(rgb_color) {
31321 # var redFrac = rgb_color.red || 0.0;
31322 # var greenFrac = rgb_color.green || 0.0;
31323 # var blueFrac = rgb_color.blue || 0.0;
31324 # var red = Math.floor(redFrac * 255);
31325 # var green = Math.floor(greenFrac * 255);
31326 # var blue = Math.floor(blueFrac * 255);
31327 #
31328 # if (!('alpha' in rgb_color)) {
31329 # return rgbToCssColor_(red, green, blue);
31330 # }
31331 #
31332 # var alphaFrac = rgb_color.alpha.value || 0.0;
31333 # var rgbParams = [red, green, blue].join(',');
31334 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31335 # };
31336 #
31337 # var rgbToCssColor_ = function(red, green, blue) {
31338 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31339 # var hexString = rgbNumber.toString(16);
31340 # var missingZeros = 6 - hexString.length;
31341 # var resultBuilder = ['#'];
31342 # for (var i = 0; i < missingZeros; i++) {
31343 # resultBuilder.push('0');
31344 # }
31345 # resultBuilder.push(hexString);
31346 # return resultBuilder.join('');
31347 # };
31348 #
31349 # // ...
31350 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31351 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31352 # the final pixel color is defined by the equation:
31353 #
31354 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31355 #
31356 # This means that a value of 1.0 corresponds to a solid color, whereas
31357 # a value of 0.0 corresponds to a completely transparent color. This
31358 # uses a wrapper message rather than a simple float scalar so that it is
31359 # possible to distinguish between a default value and the value being unset.
31360 # If omitted, this color object is to be rendered as a solid color
31361 # (as if the alpha value had been explicitly given with a value of 1.0).
31362 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31363 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31364 },
31365 "footerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the last row or column. If this field is not set, the last
31366 # row or column will be filled with either first_band_color or
31367 # second_band_color, depending on the color of the previous row or
31368 # column.
31369 # for simplicity of conversion to/from color representations in various
31370 # languages over compactness; for example, the fields of this representation
31371 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
31372 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
31373 # method in iOS; and, with just a little work, it can be easily formatted into
31374 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
31375 #
31376 # Example (Java):
31377 #
31378 # import com.google.type.Color;
31379 #
31380 # // ...
31381 # public static java.awt.Color fromProto(Color protocolor) {
31382 # float alpha = protocolor.hasAlpha()
31383 # ? protocolor.getAlpha().getValue()
31384 # : 1.0;
31385 #
31386 # return new java.awt.Color(
31387 # protocolor.getRed(),
31388 # protocolor.getGreen(),
31389 # protocolor.getBlue(),
31390 # alpha);
31391 # }
31392 #
31393 # public static Color toProto(java.awt.Color color) {
31394 # float red = (float) color.getRed();
31395 # float green = (float) color.getGreen();
31396 # float blue = (float) color.getBlue();
31397 # float denominator = 255.0;
31398 # Color.Builder resultBuilder =
31399 # Color
31400 # .newBuilder()
31401 # .setRed(red / denominator)
31402 # .setGreen(green / denominator)
31403 # .setBlue(blue / denominator);
31404 # int alpha = color.getAlpha();
31405 # if (alpha != 255) {
31406 # result.setAlpha(
31407 # FloatValue
31408 # .newBuilder()
31409 # .setValue(((float) alpha) / denominator)
31410 # .build());
31411 # }
31412 # return resultBuilder.build();
31413 # }
31414 # // ...
31415 #
31416 # Example (iOS / Obj-C):
31417 #
31418 # // ...
31419 # static UIColor* fromProto(Color* protocolor) {
31420 # float red = [protocolor red];
31421 # float green = [protocolor green];
31422 # float blue = [protocolor blue];
31423 # FloatValue* alpha_wrapper = [protocolor alpha];
31424 # float alpha = 1.0;
31425 # if (alpha_wrapper != nil) {
31426 # alpha = [alpha_wrapper value];
31427 # }
31428 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31429 # }
31430 #
31431 # static Color* toProto(UIColor* color) {
31432 # CGFloat red, green, blue, alpha;
31433 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31434 # return nil;
31435 # }
31436 # Color* result = [Color alloc] init];
31437 # [result setRed:red];
31438 # [result setGreen:green];
31439 # [result setBlue:blue];
31440 # if (alpha <= 0.9999) {
31441 # [result setAlpha:floatWrapperWithValue(alpha)];
31442 # }
31443 # [result autorelease];
31444 # return result;
31445 # }
31446 # // ...
31447 #
31448 # Example (JavaScript):
31449 #
31450 # // ...
31451 #
31452 # var protoToCssColor = function(rgb_color) {
31453 # var redFrac = rgb_color.red || 0.0;
31454 # var greenFrac = rgb_color.green || 0.0;
31455 # var blueFrac = rgb_color.blue || 0.0;
31456 # var red = Math.floor(redFrac * 255);
31457 # var green = Math.floor(greenFrac * 255);
31458 # var blue = Math.floor(blueFrac * 255);
31459 #
31460 # if (!('alpha' in rgb_color)) {
31461 # return rgbToCssColor_(red, green, blue);
31462 # }
31463 #
31464 # var alphaFrac = rgb_color.alpha.value || 0.0;
31465 # var rgbParams = [red, green, blue].join(',');
31466 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31467 # };
31468 #
31469 # var rgbToCssColor_ = function(red, green, blue) {
31470 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31471 # var hexString = rgbNumber.toString(16);
31472 # var missingZeros = 6 - hexString.length;
31473 # var resultBuilder = ['#'];
31474 # for (var i = 0; i < missingZeros; i++) {
31475 # resultBuilder.push('0');
31476 # }
31477 # resultBuilder.push(hexString);
31478 # return resultBuilder.join('');
31479 # };
31480 #
31481 # // ...
31482 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31483 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31484 # the final pixel color is defined by the equation:
31485 #
31486 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31487 #
31488 # This means that a value of 1.0 corresponds to a solid color, whereas
31489 # a value of 0.0 corresponds to a completely transparent color. This
31490 # uses a wrapper message rather than a simple float scalar so that it is
31491 # possible to distinguish between a default value and the value being unset.
31492 # If omitted, this color object is to be rendered as a solid color
31493 # (as if the alpha value had been explicitly given with a value of 1.0).
31494 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31495 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31496 },
31497 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
31498 # for simplicity of conversion to/from color representations in various
31499 # languages over compactness; for example, the fields of this representation
31500 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
31501 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
31502 # method in iOS; and, with just a little work, it can be easily formatted into
31503 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
31504 #
31505 # Example (Java):
31506 #
31507 # import com.google.type.Color;
31508 #
31509 # // ...
31510 # public static java.awt.Color fromProto(Color protocolor) {
31511 # float alpha = protocolor.hasAlpha()
31512 # ? protocolor.getAlpha().getValue()
31513 # : 1.0;
31514 #
31515 # return new java.awt.Color(
31516 # protocolor.getRed(),
31517 # protocolor.getGreen(),
31518 # protocolor.getBlue(),
31519 # alpha);
31520 # }
31521 #
31522 # public static Color toProto(java.awt.Color color) {
31523 # float red = (float) color.getRed();
31524 # float green = (float) color.getGreen();
31525 # float blue = (float) color.getBlue();
31526 # float denominator = 255.0;
31527 # Color.Builder resultBuilder =
31528 # Color
31529 # .newBuilder()
31530 # .setRed(red / denominator)
31531 # .setGreen(green / denominator)
31532 # .setBlue(blue / denominator);
31533 # int alpha = color.getAlpha();
31534 # if (alpha != 255) {
31535 # result.setAlpha(
31536 # FloatValue
31537 # .newBuilder()
31538 # .setValue(((float) alpha) / denominator)
31539 # .build());
31540 # }
31541 # return resultBuilder.build();
31542 # }
31543 # // ...
31544 #
31545 # Example (iOS / Obj-C):
31546 #
31547 # // ...
31548 # static UIColor* fromProto(Color* protocolor) {
31549 # float red = [protocolor red];
31550 # float green = [protocolor green];
31551 # float blue = [protocolor blue];
31552 # FloatValue* alpha_wrapper = [protocolor alpha];
31553 # float alpha = 1.0;
31554 # if (alpha_wrapper != nil) {
31555 # alpha = [alpha_wrapper value];
31556 # }
31557 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31558 # }
31559 #
31560 # static Color* toProto(UIColor* color) {
31561 # CGFloat red, green, blue, alpha;
31562 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31563 # return nil;
31564 # }
31565 # Color* result = [Color alloc] init];
31566 # [result setRed:red];
31567 # [result setGreen:green];
31568 # [result setBlue:blue];
31569 # if (alpha <= 0.9999) {
31570 # [result setAlpha:floatWrapperWithValue(alpha)];
31571 # }
31572 # [result autorelease];
31573 # return result;
31574 # }
31575 # // ...
31576 #
31577 # Example (JavaScript):
31578 #
31579 # // ...
31580 #
31581 # var protoToCssColor = function(rgb_color) {
31582 # var redFrac = rgb_color.red || 0.0;
31583 # var greenFrac = rgb_color.green || 0.0;
31584 # var blueFrac = rgb_color.blue || 0.0;
31585 # var red = Math.floor(redFrac * 255);
31586 # var green = Math.floor(greenFrac * 255);
31587 # var blue = Math.floor(blueFrac * 255);
31588 #
31589 # if (!('alpha' in rgb_color)) {
31590 # return rgbToCssColor_(red, green, blue);
31591 # }
31592 #
31593 # var alphaFrac = rgb_color.alpha.value || 0.0;
31594 # var rgbParams = [red, green, blue].join(',');
31595 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31596 # };
31597 #
31598 # var rgbToCssColor_ = function(red, green, blue) {
31599 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31600 # var hexString = rgbNumber.toString(16);
31601 # var missingZeros = 6 - hexString.length;
31602 # var resultBuilder = ['#'];
31603 # for (var i = 0; i < missingZeros; i++) {
31604 # resultBuilder.push('0');
31605 # }
31606 # resultBuilder.push(hexString);
31607 # return resultBuilder.join('');
31608 # };
31609 #
31610 # // ...
31611 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31612 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31613 # the final pixel color is defined by the equation:
31614 #
31615 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31616 #
31617 # This means that a value of 1.0 corresponds to a solid color, whereas
31618 # a value of 0.0 corresponds to a completely transparent color. This
31619 # uses a wrapper message rather than a simple float scalar so that it is
31620 # possible to distinguish between a default value and the value being unset.
31621 # If omitted, this color object is to be rendered as a solid color
31622 # (as if the alpha value had been explicitly given with a value of 1.0).
31623 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31624 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31625 },
31626 },
31627 "bandedRangeId": 42, # The id of the banded range.
31628 },
31629 ],
31630 "merges": [ # The ranges that are merged together.
31631 { # A range on a sheet.
31632 # All indexes are zero-based.
31633 # Indexes are half open, e.g the start index is inclusive
31634 # and the end index is exclusive -- [start_index, end_index).
31635 # Missing indexes indicate the range is unbounded on that side.
31636 #
31637 # For example, if `"Sheet1"` is sheet ID 0, then:
31638 #
31639 # `Sheet1!A1:A1 == sheet_id: 0,
31640 # start_row_index: 0, end_row_index: 1,
31641 # start_column_index: 0, end_column_index: 1`
31642 #
31643 # `Sheet1!A3:B4 == sheet_id: 0,
31644 # start_row_index: 2, end_row_index: 4,
31645 # start_column_index: 0, end_column_index: 2`
31646 #
31647 # `Sheet1!A:B == sheet_id: 0,
31648 # start_column_index: 0, end_column_index: 2`
31649 #
31650 # `Sheet1!A5:B == sheet_id: 0,
31651 # start_row_index: 4,
31652 # start_column_index: 0, end_column_index: 2`
31653 #
31654 # `Sheet1 == sheet_id:0`
31655 #
31656 # The start index must always be less than or equal to the end index.
31657 # If the start index equals the end index, then the range is empty.
31658 # Empty ranges are typically not meaningful and are usually rendered in the
31659 # UI as `#REF!`.
31660 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31661 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31662 "sheetId": 42, # The sheet this range is on.
31663 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31664 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31665 },
31666 ],
31667 "basicFilter": { # The default filter associated with a sheet. # The filter on this sheet, if any.
31668 "range": { # A range on a sheet. # The range the filter covers.
31669 # All indexes are zero-based.
31670 # Indexes are half open, e.g the start index is inclusive
31671 # and the end index is exclusive -- [start_index, end_index).
31672 # Missing indexes indicate the range is unbounded on that side.
31673 #
31674 # For example, if `"Sheet1"` is sheet ID 0, then:
31675 #
31676 # `Sheet1!A1:A1 == sheet_id: 0,
31677 # start_row_index: 0, end_row_index: 1,
31678 # start_column_index: 0, end_column_index: 1`
31679 #
31680 # `Sheet1!A3:B4 == sheet_id: 0,
31681 # start_row_index: 2, end_row_index: 4,
31682 # start_column_index: 0, end_column_index: 2`
31683 #
31684 # `Sheet1!A:B == sheet_id: 0,
31685 # start_column_index: 0, end_column_index: 2`
31686 #
31687 # `Sheet1!A5:B == sheet_id: 0,
31688 # start_row_index: 4,
31689 # start_column_index: 0, end_column_index: 2`
31690 #
31691 # `Sheet1 == sheet_id:0`
31692 #
31693 # The start index must always be less than or equal to the end index.
31694 # If the start index equals the end index, then the range is empty.
31695 # Empty ranges are typically not meaningful and are usually rendered in the
31696 # UI as `#REF!`.
31697 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31698 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31699 "sheetId": 42, # The sheet this range is on.
31700 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31701 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31702 },
31703 "sortSpecs": [ # The sort order per column. Later specifications are used when values
31704 # are equal in the earlier specifications.
31705 { # A sort order associated with a specific column or row.
31706 "sortOrder": "A String", # The order data should be sorted.
31707 "dimensionIndex": 42, # The dimension the sort should be applied to.
31708 },
31709 ],
31710 "criteria": { # The criteria for showing/hiding values per column.
31711 # The map's key is the column index, and the value is the criteria for
31712 # that column.
31713 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
31714 "hiddenValues": [ # Values that should be hidden.
31715 "A String",
31716 ],
31717 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
31718 # (This does not override hiddenValues -- if a value is listed there,
31719 # it will still be hidden.)
31720 # BooleanConditions are used by conditional formatting,
31721 # data validation, and the criteria in filters.
31722 "type": "A String", # The type of condition.
31723 "values": [ # The values of the condition. The number of supported values depends
31724 # on the condition type. Some support zero values,
31725 # others one or two values,
31726 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
31727 { # The value of the condition.
31728 "relativeDate": "A String", # A relative date (based on the current date).
31729 # Valid only if the type is
31730 # DATE_BEFORE,
31731 # DATE_AFTER,
31732 # DATE_ON_OR_BEFORE or
31733 # DATE_ON_OR_AFTER.
31734 #
31735 # Relative dates are not supported in data validation.
31736 # They are supported only in conditional formatting and
31737 # conditional filters.
31738 "userEnteredValue": "A String", # A value the condition is based on.
31739 # The value will be parsed as if the user typed into a cell.
31740 # Formulas are supported (and must begin with an `=`).
31741 },
31742 ],
31743 },
31744 },
31745 },
31746 },
31747 "charts": [ # The specifications of every chart on this sheet.
31748 { # A chart embedded in a sheet.
31749 "chartId": 42, # The ID of the chart.
31750 "position": { # The position of an embedded object such as a chart. # The position of the chart.
31751 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
31752 # is chosen for you. Used only when writing.
31753 "sheetId": 42, # The sheet this is on. Set only if the embedded object
31754 # is on its own sheet. Must be non-negative.
31755 "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.
31756 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
31757 # All indexes are zero-based.
31758 "rowIndex": 42, # The row index of the coordinate.
31759 "columnIndex": 42, # The column index of the coordinate.
31760 "sheetId": 42, # The sheet this coordinate is on.
31761 },
31762 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
31763 # from the anchor cell.
31764 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
31765 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
31766 # from the anchor cell.
31767 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
31768 },
31769 },
31770 "spec": { # The specifications of a chart. # The specification of the chart.
31771 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
31772 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
31773 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
31774 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
31775 "sources": [ # The ranges of data for a series or domain.
31776 # Exactly one dimension must have a length of 1,
31777 # and all sources in the list must have the same dimension
31778 # with length 1.
31779 # The domain (if it exists) & all series must have the same number
31780 # of source ranges. If using more than one source range, then the source
31781 # range at a given offset must be contiguous across the domain and series.
31782 #
31783 # For example, these are valid configurations:
31784 #
31785 # domain sources: A1:A5
31786 # series1 sources: B1:B5
31787 # series2 sources: D6:D10
31788 #
31789 # domain sources: A1:A5, C10:C12
31790 # series1 sources: B1:B5, D10:D12
31791 # series2 sources: C1:C5, E10:E12
31792 { # A range on a sheet.
31793 # All indexes are zero-based.
31794 # Indexes are half open, e.g the start index is inclusive
31795 # and the end index is exclusive -- [start_index, end_index).
31796 # Missing indexes indicate the range is unbounded on that side.
31797 #
31798 # For example, if `"Sheet1"` is sheet ID 0, then:
31799 #
31800 # `Sheet1!A1:A1 == sheet_id: 0,
31801 # start_row_index: 0, end_row_index: 1,
31802 # start_column_index: 0, end_column_index: 1`
31803 #
31804 # `Sheet1!A3:B4 == sheet_id: 0,
31805 # start_row_index: 2, end_row_index: 4,
31806 # start_column_index: 0, end_column_index: 2`
31807 #
31808 # `Sheet1!A:B == sheet_id: 0,
31809 # start_column_index: 0, end_column_index: 2`
31810 #
31811 # `Sheet1!A5:B == sheet_id: 0,
31812 # start_row_index: 4,
31813 # start_column_index: 0, end_column_index: 2`
31814 #
31815 # `Sheet1 == sheet_id:0`
31816 #
31817 # The start index must always be less than or equal to the end index.
31818 # If the start index equals the end index, then the range is empty.
31819 # Empty ranges are typically not meaningful and are usually rendered in the
31820 # UI as `#REF!`.
31821 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31822 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31823 "sheetId": 42, # The sheet this range is on.
31824 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31825 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31826 },
31827 ],
31828 },
31829 },
31830 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
31831 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
31832 "sources": [ # The ranges of data for a series or domain.
31833 # Exactly one dimension must have a length of 1,
31834 # and all sources in the list must have the same dimension
31835 # with length 1.
31836 # The domain (if it exists) & all series must have the same number
31837 # of source ranges. If using more than one source range, then the source
31838 # range at a given offset must be contiguous across the domain and series.
31839 #
31840 # For example, these are valid configurations:
31841 #
31842 # domain sources: A1:A5
31843 # series1 sources: B1:B5
31844 # series2 sources: D6:D10
31845 #
31846 # domain sources: A1:A5, C10:C12
31847 # series1 sources: B1:B5, D10:D12
31848 # series2 sources: C1:C5, E10:E12
31849 { # A range on a sheet.
31850 # All indexes are zero-based.
31851 # Indexes are half open, e.g the start index is inclusive
31852 # and the end index is exclusive -- [start_index, end_index).
31853 # Missing indexes indicate the range is unbounded on that side.
31854 #
31855 # For example, if `"Sheet1"` is sheet ID 0, then:
31856 #
31857 # `Sheet1!A1:A1 == sheet_id: 0,
31858 # start_row_index: 0, end_row_index: 1,
31859 # start_column_index: 0, end_column_index: 1`
31860 #
31861 # `Sheet1!A3:B4 == sheet_id: 0,
31862 # start_row_index: 2, end_row_index: 4,
31863 # start_column_index: 0, end_column_index: 2`
31864 #
31865 # `Sheet1!A:B == sheet_id: 0,
31866 # start_column_index: 0, end_column_index: 2`
31867 #
31868 # `Sheet1!A5:B == sheet_id: 0,
31869 # start_row_index: 4,
31870 # start_column_index: 0, end_column_index: 2`
31871 #
31872 # `Sheet1 == sheet_id:0`
31873 #
31874 # The start index must always be less than or equal to the end index.
31875 # If the start index equals the end index, then the range is empty.
31876 # Empty ranges are typically not meaningful and are usually rendered in the
31877 # UI as `#REF!`.
31878 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31879 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31880 "sheetId": 42, # The sheet this range is on.
31881 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31882 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31883 },
31884 ],
31885 },
31886 },
31887 "threeDimensional": True or False, # True if the pie is three dimensional.
31888 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
31889 "pieHole": 3.14, # The size of the hole in the pie chart.
31890 },
31891 "basicChart": { # The specification for a basic chart. See BasicChartType for the list # A basic chart specification, can be one of many kinds of charts.
31892 # See BasicChartType for the list of all
31893 # charts this supports.
31894 # of charts this supports.
31895 "headerCount": 42, # The number of rows or columns in the data that are "headers".
31896 # If not set, Google Sheets will guess how many rows are headers based
31897 # on the data.
31898 #
31899 # (Note that BasicChartAxis.title may override the axis title
31900 # inferred from the header values.)
31901 "series": [ # The data this chart is visualizing.
31902 { # A single series of data in a chart.
31903 # For example, if charting stock prices over time, multiple series may exist,
31904 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
31905 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
31906 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
31907 "sources": [ # The ranges of data for a series or domain.
31908 # Exactly one dimension must have a length of 1,
31909 # and all sources in the list must have the same dimension
31910 # with length 1.
31911 # The domain (if it exists) & all series must have the same number
31912 # of source ranges. If using more than one source range, then the source
31913 # range at a given offset must be contiguous across the domain and series.
31914 #
31915 # For example, these are valid configurations:
31916 #
31917 # domain sources: A1:A5
31918 # series1 sources: B1:B5
31919 # series2 sources: D6:D10
31920 #
31921 # domain sources: A1:A5, C10:C12
31922 # series1 sources: B1:B5, D10:D12
31923 # series2 sources: C1:C5, E10:E12
31924 { # A range on a sheet.
31925 # All indexes are zero-based.
31926 # Indexes are half open, e.g the start index is inclusive
31927 # and the end index is exclusive -- [start_index, end_index).
31928 # Missing indexes indicate the range is unbounded on that side.
31929 #
31930 # For example, if `"Sheet1"` is sheet ID 0, then:
31931 #
31932 # `Sheet1!A1:A1 == sheet_id: 0,
31933 # start_row_index: 0, end_row_index: 1,
31934 # start_column_index: 0, end_column_index: 1`
31935 #
31936 # `Sheet1!A3:B4 == sheet_id: 0,
31937 # start_row_index: 2, end_row_index: 4,
31938 # start_column_index: 0, end_column_index: 2`
31939 #
31940 # `Sheet1!A:B == sheet_id: 0,
31941 # start_column_index: 0, end_column_index: 2`
31942 #
31943 # `Sheet1!A5:B == sheet_id: 0,
31944 # start_row_index: 4,
31945 # start_column_index: 0, end_column_index: 2`
31946 #
31947 # `Sheet1 == sheet_id:0`
31948 #
31949 # The start index must always be less than or equal to the end index.
31950 # If the start index equals the end index, then the range is empty.
31951 # Empty ranges are typically not meaningful and are usually rendered in the
31952 # UI as `#REF!`.
31953 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
31954 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
31955 "sheetId": 42, # The sheet this range is on.
31956 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
31957 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
31958 },
31959 ],
31960 },
31961 },
31962 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
31963 # For example, if charting stocks over time, the "Volume" series
31964 # may want to be pinned to the right with the prices pinned to the left,
31965 # because the scale of trading volume is different than the scale of
31966 # prices.
31967 # It is an error to specify an axis that isn't a valid minor axis
31968 # for the chart's type.
31969 "type": "A String", # The type of this series. Valid only if the
31970 # chartType is
31971 # COMBO.
31972 # Different types will change the way the series is visualized.
31973 # Only LINE, AREA,
31974 # and COLUMN are supported.
31975 },
31976 ],
31977 "legendPosition": "A String", # The position of the chart legend.
31978 "domains": [ # The domain of data this is charting.
31979 # Only a single domain is currently supported.
31980 { # The domain of a chart.
31981 # For example, if charting stock prices over time, this would be the date.
31982 "domain": { # The data included in a domain or series. # The data of the domain. For example, if charting stock prices over time,
31983 # this is the data representing the dates.
31984 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
31985 "sources": [ # The ranges of data for a series or domain.
31986 # Exactly one dimension must have a length of 1,
31987 # and all sources in the list must have the same dimension
31988 # with length 1.
31989 # The domain (if it exists) & all series must have the same number
31990 # of source ranges. If using more than one source range, then the source
31991 # range at a given offset must be contiguous across the domain and series.
31992 #
31993 # For example, these are valid configurations:
31994 #
31995 # domain sources: A1:A5
31996 # series1 sources: B1:B5
31997 # series2 sources: D6:D10
31998 #
31999 # domain sources: A1:A5, C10:C12
32000 # series1 sources: B1:B5, D10:D12
32001 # series2 sources: C1:C5, E10:E12
32002 { # A range on a sheet.
32003 # All indexes are zero-based.
32004 # Indexes are half open, e.g the start index is inclusive
32005 # and the end index is exclusive -- [start_index, end_index).
32006 # Missing indexes indicate the range is unbounded on that side.
32007 #
32008 # For example, if `"Sheet1"` is sheet ID 0, then:
32009 #
32010 # `Sheet1!A1:A1 == sheet_id: 0,
32011 # start_row_index: 0, end_row_index: 1,
32012 # start_column_index: 0, end_column_index: 1`
32013 #
32014 # `Sheet1!A3:B4 == sheet_id: 0,
32015 # start_row_index: 2, end_row_index: 4,
32016 # start_column_index: 0, end_column_index: 2`
32017 #
32018 # `Sheet1!A:B == sheet_id: 0,
32019 # start_column_index: 0, end_column_index: 2`
32020 #
32021 # `Sheet1!A5:B == sheet_id: 0,
32022 # start_row_index: 4,
32023 # start_column_index: 0, end_column_index: 2`
32024 #
32025 # `Sheet1 == sheet_id:0`
32026 #
32027 # The start index must always be less than or equal to the end index.
32028 # If the start index equals the end index, then the range is empty.
32029 # Empty ranges are typically not meaningful and are usually rendered in the
32030 # UI as `#REF!`.
32031 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
32032 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
32033 "sheetId": 42, # The sheet this range is on.
32034 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
32035 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
32036 },
32037 ],
32038 },
32039 },
32040 },
32041 ],
32042 "chartType": "A String", # The type of the chart.
32043 "axis": [ # The axis on the chart.
32044 { # An axis of the chart.
32045 # A chart may not have more than one axis per
32046 # axis position.
32047 "position": "A String", # The position of this axis.
32048 "format": { # The format of a run of text in a cell. # The format of the title.
32049 # Only valid if the axis is not associated with the domain.
32050 # Absent values indicate that the field isn't specified.
32051 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
32052 # for simplicity of conversion to/from color representations in various
32053 # languages over compactness; for example, the fields of this representation
32054 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
32055 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
32056 # method in iOS; and, with just a little work, it can be easily formatted into
32057 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32058 #
32059 # Example (Java):
32060 #
32061 # import com.google.type.Color;
32062 #
32063 # // ...
32064 # public static java.awt.Color fromProto(Color protocolor) {
32065 # float alpha = protocolor.hasAlpha()
32066 # ? protocolor.getAlpha().getValue()
32067 # : 1.0;
32068 #
32069 # return new java.awt.Color(
32070 # protocolor.getRed(),
32071 # protocolor.getGreen(),
32072 # protocolor.getBlue(),
32073 # alpha);
32074 # }
32075 #
32076 # public static Color toProto(java.awt.Color color) {
32077 # float red = (float) color.getRed();
32078 # float green = (float) color.getGreen();
32079 # float blue = (float) color.getBlue();
32080 # float denominator = 255.0;
32081 # Color.Builder resultBuilder =
32082 # Color
32083 # .newBuilder()
32084 # .setRed(red / denominator)
32085 # .setGreen(green / denominator)
32086 # .setBlue(blue / denominator);
32087 # int alpha = color.getAlpha();
32088 # if (alpha != 255) {
32089 # result.setAlpha(
32090 # FloatValue
32091 # .newBuilder()
32092 # .setValue(((float) alpha) / denominator)
32093 # .build());
32094 # }
32095 # return resultBuilder.build();
32096 # }
32097 # // ...
32098 #
32099 # Example (iOS / Obj-C):
32100 #
32101 # // ...
32102 # static UIColor* fromProto(Color* protocolor) {
32103 # float red = [protocolor red];
32104 # float green = [protocolor green];
32105 # float blue = [protocolor blue];
32106 # FloatValue* alpha_wrapper = [protocolor alpha];
32107 # float alpha = 1.0;
32108 # if (alpha_wrapper != nil) {
32109 # alpha = [alpha_wrapper value];
32110 # }
32111 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
32112 # }
32113 #
32114 # static Color* toProto(UIColor* color) {
32115 # CGFloat red, green, blue, alpha;
32116 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
32117 # return nil;
32118 # }
32119 # Color* result = [Color alloc] init];
32120 # [result setRed:red];
32121 # [result setGreen:green];
32122 # [result setBlue:blue];
32123 # if (alpha <= 0.9999) {
32124 # [result setAlpha:floatWrapperWithValue(alpha)];
32125 # }
32126 # [result autorelease];
32127 # return result;
32128 # }
32129 # // ...
32130 #
32131 # Example (JavaScript):
32132 #
32133 # // ...
32134 #
32135 # var protoToCssColor = function(rgb_color) {
32136 # var redFrac = rgb_color.red || 0.0;
32137 # var greenFrac = rgb_color.green || 0.0;
32138 # var blueFrac = rgb_color.blue || 0.0;
32139 # var red = Math.floor(redFrac * 255);
32140 # var green = Math.floor(greenFrac * 255);
32141 # var blue = Math.floor(blueFrac * 255);
32142 #
32143 # if (!('alpha' in rgb_color)) {
32144 # return rgbToCssColor_(red, green, blue);
32145 # }
32146 #
32147 # var alphaFrac = rgb_color.alpha.value || 0.0;
32148 # var rgbParams = [red, green, blue].join(',');
32149 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
32150 # };
32151 #
32152 # var rgbToCssColor_ = function(red, green, blue) {
32153 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
32154 # var hexString = rgbNumber.toString(16);
32155 # var missingZeros = 6 - hexString.length;
32156 # var resultBuilder = ['#'];
32157 # for (var i = 0; i < missingZeros; i++) {
32158 # resultBuilder.push('0');
32159 # }
32160 # resultBuilder.push(hexString);
32161 # return resultBuilder.join('');
32162 # };
32163 #
32164 # // ...
32165 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
32166 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
32167 # the final pixel color is defined by the equation:
32168 #
32169 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
32170 #
32171 # This means that a value of 1.0 corresponds to a solid color, whereas
32172 # a value of 0.0 corresponds to a completely transparent color. This
32173 # uses a wrapper message rather than a simple float scalar so that it is
32174 # possible to distinguish between a default value and the value being unset.
32175 # If omitted, this color object is to be rendered as a solid color
32176 # (as if the alpha value had been explicitly given with a value of 1.0).
32177 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
32178 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
32179 },
32180 "bold": True or False, # True if the text is bold.
32181 "strikethrough": True or False, # True if the text has a strikethrough.
32182 "fontFamily": "A String", # The font family.
32183 "fontSize": 42, # The size of the font.
32184 "italic": True or False, # True if the text is italicized.
32185 "underline": True or False, # True if the text is underlined.
32186 },
32187 "title": "A String", # The title of this axis. If set, this overrides any title inferred
32188 # from headers of the data.
32189 },
32190 ],
32191 },
32192 "title": "A String", # The title of the chart.
32193 },
32194 },
32195 ],
32196 "filterViews": [ # The filter views in this sheet.
32197 { # A filter view.
32198 "title": "A String", # The name of the filter view.
32199 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
32200 #
32201 # When writing, only one of range or named_range_id
32202 # may be set.
32203 "filterViewId": 42, # The ID of the filter view.
32204 "range": { # A range on a sheet. # The range this filter view covers.
32205 #
32206 # When writing, only one of range or named_range_id
32207 # may be set.
32208 # All indexes are zero-based.
32209 # Indexes are half open, e.g the start index is inclusive
32210 # and the end index is exclusive -- [start_index, end_index).
32211 # Missing indexes indicate the range is unbounded on that side.
32212 #
32213 # For example, if `"Sheet1"` is sheet ID 0, then:
32214 #
32215 # `Sheet1!A1:A1 == sheet_id: 0,
32216 # start_row_index: 0, end_row_index: 1,
32217 # start_column_index: 0, end_column_index: 1`
32218 #
32219 # `Sheet1!A3:B4 == sheet_id: 0,
32220 # start_row_index: 2, end_row_index: 4,
32221 # start_column_index: 0, end_column_index: 2`
32222 #
32223 # `Sheet1!A:B == sheet_id: 0,
32224 # start_column_index: 0, end_column_index: 2`
32225 #
32226 # `Sheet1!A5:B == sheet_id: 0,
32227 # start_row_index: 4,
32228 # start_column_index: 0, end_column_index: 2`
32229 #
32230 # `Sheet1 == sheet_id:0`
32231 #
32232 # The start index must always be less than or equal to the end index.
32233 # If the start index equals the end index, then the range is empty.
32234 # Empty ranges are typically not meaningful and are usually rendered in the
32235 # UI as `#REF!`.
32236 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
32237 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
32238 "sheetId": 42, # The sheet this range is on.
32239 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
32240 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
32241 },
32242 "sortSpecs": [ # The sort order per column. Later specifications are used when values
32243 # are equal in the earlier specifications.
32244 { # A sort order associated with a specific column or row.
32245 "sortOrder": "A String", # The order data should be sorted.
32246 "dimensionIndex": 42, # The dimension the sort should be applied to.
32247 },
32248 ],
32249 "criteria": { # The criteria for showing/hiding values per column.
32250 # The map's key is the column index, and the value is the criteria for
32251 # that column.
32252 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
32253 "hiddenValues": [ # Values that should be hidden.
32254 "A String",
32255 ],
32256 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
32257 # (This does not override hiddenValues -- if a value is listed there,
32258 # it will still be hidden.)
32259 # BooleanConditions are used by conditional formatting,
32260 # data validation, and the criteria in filters.
32261 "type": "A String", # The type of condition.
32262 "values": [ # The values of the condition. The number of supported values depends
32263 # on the condition type. Some support zero values,
32264 # others one or two values,
32265 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
32266 { # The value of the condition.
32267 "relativeDate": "A String", # A relative date (based on the current date).
32268 # Valid only if the type is
32269 # DATE_BEFORE,
32270 # DATE_AFTER,
32271 # DATE_ON_OR_BEFORE or
32272 # DATE_ON_OR_AFTER.
32273 #
32274 # Relative dates are not supported in data validation.
32275 # They are supported only in conditional formatting and
32276 # conditional filters.
32277 "userEnteredValue": "A String", # A value the condition is based on.
32278 # The value will be parsed as if the user typed into a cell.
32279 # Formulas are supported (and must begin with an `=`).
32280 },
32281 ],
32282 },
32283 },
32284 },
32285 },
32286 ],
32287 "protectedRanges": [ # The protected ranges in this sheet.
32288 { # A protected range.
32289 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
32290 # Unprotected ranges are only supported on protected sheets.
32291 { # A range on a sheet.
32292 # All indexes are zero-based.
32293 # Indexes are half open, e.g the start index is inclusive
32294 # and the end index is exclusive -- [start_index, end_index).
32295 # Missing indexes indicate the range is unbounded on that side.
32296 #
32297 # For example, if `"Sheet1"` is sheet ID 0, then:
32298 #
32299 # `Sheet1!A1:A1 == sheet_id: 0,
32300 # start_row_index: 0, end_row_index: 1,
32301 # start_column_index: 0, end_column_index: 1`
32302 #
32303 # `Sheet1!A3:B4 == sheet_id: 0,
32304 # start_row_index: 2, end_row_index: 4,
32305 # start_column_index: 0, end_column_index: 2`
32306 #
32307 # `Sheet1!A:B == sheet_id: 0,
32308 # start_column_index: 0, end_column_index: 2`
32309 #
32310 # `Sheet1!A5:B == sheet_id: 0,
32311 # start_row_index: 4,
32312 # start_column_index: 0, end_column_index: 2`
32313 #
32314 # `Sheet1 == sheet_id:0`
32315 #
32316 # The start index must always be less than or equal to the end index.
32317 # If the start index equals the end index, then the range is empty.
32318 # Empty ranges are typically not meaningful and are usually rendered in the
32319 # UI as `#REF!`.
32320 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
32321 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
32322 "sheetId": 42, # The sheet this range is on.
32323 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
32324 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
32325 },
32326 ],
32327 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
32328 # protected area.
32329 # This field is read-only.
32330 "description": "A String", # The description of this protected range.
32331 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
32332 #
32333 # When writing, only one of range or named_range_id
32334 # may be set.
32335 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
32336 # This field is only visible to users with edit access to the protected
32337 # range and the document.
32338 # Editors are not supported with warning_only protection.
32339 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
32340 # range. Domain protection is only supported on documents within a domain.
32341 "users": [ # The email addresses of users with edit access to the protected range.
32342 "A String",
32343 ],
32344 "groups": [ # The email addresses of groups with edit access to the protected range.
32345 "A String",
32346 ],
32347 },
32348 "protectedRangeId": 42, # The ID of the protected range.
32349 # This field is read-only.
32350 "warningOnly": True or False, # True if this protected range will show a warning when editing.
32351 # Warning-based protection means that every user can edit data in the
32352 # protected range, except editing will prompt a warning asking the user
32353 # to confirm the edit.
32354 #
32355 # When writing: if this field is true, then editors is ignored.
32356 # Additionally, if this field is changed from true to false and the
32357 # `editors` field is not set (nor included in the field mask), then
32358 # the editors will be set to all the editors in the document.
32359 "range": { # A range on a sheet. # The range that is being protected.
32360 # The range may be fully unbounded, in which case this is considered
32361 # a protected sheet.
32362 #
32363 # When writing, only one of range or named_range_id
32364 # may be set.
32365 # All indexes are zero-based.
32366 # Indexes are half open, e.g the start index is inclusive
32367 # and the end index is exclusive -- [start_index, end_index).
32368 # Missing indexes indicate the range is unbounded on that side.
32369 #
32370 # For example, if `"Sheet1"` is sheet ID 0, then:
32371 #
32372 # `Sheet1!A1:A1 == sheet_id: 0,
32373 # start_row_index: 0, end_row_index: 1,
32374 # start_column_index: 0, end_column_index: 1`
32375 #
32376 # `Sheet1!A3:B4 == sheet_id: 0,
32377 # start_row_index: 2, end_row_index: 4,
32378 # start_column_index: 0, end_column_index: 2`
32379 #
32380 # `Sheet1!A:B == sheet_id: 0,
32381 # start_column_index: 0, end_column_index: 2`
32382 #
32383 # `Sheet1!A5:B == sheet_id: 0,
32384 # start_row_index: 4,
32385 # start_column_index: 0, end_column_index: 2`
32386 #
32387 # `Sheet1 == sheet_id:0`
32388 #
32389 # The start index must always be less than or equal to the end index.
32390 # If the start index equals the end index, then the range is empty.
32391 # Empty ranges are typically not meaningful and are usually rendered in the
32392 # UI as `#REF!`.
32393 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
32394 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
32395 "sheetId": 42, # The sheet this range is on.
32396 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
32397 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
32398 },
32399 },
32400 ],
32401 "data": [ # Data in the grid, if this is a grid sheet.
32402 # The number of GridData objects returned is dependent on the number of
32403 # ranges requested on this sheet. For example, if this is representing
32404 # `Sheet1`, and the spreadsheet was requested with ranges
32405 # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a
32406 # startRow/startColumn of `0`,
32407 # while the second one will have `startRow 14` (zero-based row 15),
32408 # and `startColumn 3` (zero-based column D).
32409 { # Data in the grid, as well as metadata about the dimensions.
32410 "startRow": 42, # The first row this GridData refers to, zero-based.
32411 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
32412 # in start_row.
32413 { # Properties about a dimension.
32414 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
32415 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
32416 "hiddenByFilter": True or False, # True if this dimension is being filtered.
32417 # This field is read-only.
32418 },
32419 ],
32420 "startColumn": 42, # The first column this GridData refers to, zero-based.
32421 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
32422 # in start_column.
32423 { # Properties about a dimension.
32424 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
32425 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
32426 "hiddenByFilter": True or False, # True if this dimension is being filtered.
32427 # This field is read-only.
32428 },
32429 ],
32430 "rowData": [ # The data in the grid, one entry per row,
32431 # starting with the row in startRow.
32432 # The values in RowData will correspond to columns starting
32433 # at start_column.
32434 { # Data about each cell in a row.
32435 "values": [ # The values in the row, one per column.
32436 { # Data about a specific cell.
32437 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
32438 # is computed dynamically based on its data, grouping, filters, values,
32439 # etc. Only the top-left cell of the pivot table contains the pivot table
32440 # definition. The other cells will contain the calculated values of the
32441 # results of the pivot in their effective_value fields.
32442 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
32443 # or vertically (as rows).
32444 "rows": [ # Each row grouping in the pivot table.
32445 { # A single grouping (either row or column) in a pivot table.
32446 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
32447 "valueMetadata": [ # Metadata about values in the grouping.
32448 { # Metadata about a value in a pivot grouping.
32449 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
32450 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
32451 # (Note that formulaValue is not valid,
32452 # because the values will be calculated.)
32453 "numberValue": 3.14, # Represents a double value.
32454 # Note: Dates, Times and DateTimes are represented as doubles in
32455 # "serial number" format.
32456 "boolValue": True or False, # Represents a boolean value.
32457 "formulaValue": "A String", # Represents a formula.
32458 "stringValue": "A String", # Represents a string value.
32459 # Leading single quotes are not included. For example, if the user typed
32460 # `'123` into the UI, this would be represented as a `stringValue` of
32461 # `"123"`.
32462 "errorValue": { # An error in a cell. # Represents an error.
32463 # This field is read-only.
32464 "message": "A String", # A message with more information about the error
32465 # (in the spreadsheet's locale).
32466 "type": "A String", # The type of error.
32467 },
32468 },
32469 },
32470 ],
32471 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
32472 # If not specified, sorting is alphabetical by this group's values.
32473 "buckets": [ # Determines the bucket from which values are chosen to sort.
32474 #
32475 # For example, in a pivot table with one row group & two column groups,
32476 # the row group can list up to two values. The first value corresponds
32477 # to a value within the first column group, and the second value
32478 # corresponds to a value in the second column group. If no values
32479 # are listed, this would indicate that the row should be sorted according
32480 # to the "Grand Total" over the column groups. If a single value is listed,
32481 # this would correspond to using the "Total" of that bucket.
32482 { # The kinds of value that a cell in a spreadsheet can have.
32483 "numberValue": 3.14, # Represents a double value.
32484 # Note: Dates, Times and DateTimes are represented as doubles in
32485 # "serial number" format.
32486 "boolValue": True or False, # Represents a boolean value.
32487 "formulaValue": "A String", # Represents a formula.
32488 "stringValue": "A String", # Represents a string value.
32489 # Leading single quotes are not included. For example, if the user typed
32490 # `'123` into the UI, this would be represented as a `stringValue` of
32491 # `"123"`.
32492 "errorValue": { # An error in a cell. # Represents an error.
32493 # This field is read-only.
32494 "message": "A String", # A message with more information about the error
32495 # (in the spreadsheet's locale).
32496 "type": "A String", # The type of error.
32497 },
32498 },
32499 ],
32500 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
32501 # grouping should be sorted by.
32502 },
32503 "sortOrder": "A String", # The order the values in this group should be sorted.
32504 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
32505 #
32506 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
32507 # means this group refers to column `C`, whereas the offset `1` would refer
32508 # to column `D`.
32509 },
32510 ],
32511 "source": { # A range on a sheet. # The range the pivot table is reading data from.
32512 # All indexes are zero-based.
32513 # Indexes are half open, e.g the start index is inclusive
32514 # and the end index is exclusive -- [start_index, end_index).
32515 # Missing indexes indicate the range is unbounded on that side.
32516 #
32517 # For example, if `"Sheet1"` is sheet ID 0, then:
32518 #
32519 # `Sheet1!A1:A1 == sheet_id: 0,
32520 # start_row_index: 0, end_row_index: 1,
32521 # start_column_index: 0, end_column_index: 1`
32522 #
32523 # `Sheet1!A3:B4 == sheet_id: 0,
32524 # start_row_index: 2, end_row_index: 4,
32525 # start_column_index: 0, end_column_index: 2`
32526 #
32527 # `Sheet1!A:B == sheet_id: 0,
32528 # start_column_index: 0, end_column_index: 2`
32529 #
32530 # `Sheet1!A5:B == sheet_id: 0,
32531 # start_row_index: 4,
32532 # start_column_index: 0, end_column_index: 2`
32533 #
32534 # `Sheet1 == sheet_id:0`
32535 #
32536 # The start index must always be less than or equal to the end index.
32537 # If the start index equals the end index, then the range is empty.
32538 # Empty ranges are typically not meaningful and are usually rendered in the
32539 # UI as `#REF!`.
32540 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
32541 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
32542 "sheetId": 42, # The sheet this range is on.
32543 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
32544 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
32545 },
32546 "values": [ # A list of values to include in the pivot table.
32547 { # The definition of how a value in a pivot table should be calculated.
32548 "formula": "A String", # A custom formula to calculate the value. The formula must start
32549 # with an `=` character.
32550 "summarizeFunction": "A String", # A function to summarize the value.
32551 # If formula is set, the only supported values are
32552 # SUM and
32553 # CUSTOM.
32554 # If sourceColumnOffset is set, then `CUSTOM`
32555 # is not supported.
32556 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
32557 #
32558 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
32559 # means this value refers to column `C`, whereas the offset `1` would
32560 # refer to column `D`.
32561 "name": "A String", # A name to use for the value. This is only used if formula was set.
32562 # Otherwise, the column name is used.
32563 },
32564 ],
32565 "criteria": { # An optional mapping of filters per source column offset.
32566 #
32567 # The filters will be applied before aggregating data into the pivot table.
32568 # The map's key is the column offset of the source range that you want to
32569 # filter, and the value is the criteria for that column.
32570 #
32571 # For example, if the source was `C10:E15`, a key of `0` will have the filter
32572 # for column `C`, whereas the key `1` is for column `D`.
32573 "a_key": { # Criteria for showing/hiding rows in a pivot table.
32574 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
32575 "A String",
32576 ],
32577 },
32578 },
32579 "columns": [ # Each column grouping in the pivot table.
32580 { # A single grouping (either row or column) in a pivot table.
32581 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
32582 "valueMetadata": [ # Metadata about values in the grouping.
32583 { # Metadata about a value in a pivot grouping.
32584 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
32585 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
32586 # (Note that formulaValue is not valid,
32587 # because the values will be calculated.)
32588 "numberValue": 3.14, # Represents a double value.
32589 # Note: Dates, Times and DateTimes are represented as doubles in
32590 # "serial number" format.
32591 "boolValue": True or False, # Represents a boolean value.
32592 "formulaValue": "A String", # Represents a formula.
32593 "stringValue": "A String", # Represents a string value.
32594 # Leading single quotes are not included. For example, if the user typed
32595 # `'123` into the UI, this would be represented as a `stringValue` of
32596 # `"123"`.
32597 "errorValue": { # An error in a cell. # Represents an error.
32598 # This field is read-only.
32599 "message": "A String", # A message with more information about the error
32600 # (in the spreadsheet's locale).
32601 "type": "A String", # The type of error.
32602 },
32603 },
32604 },
32605 ],
32606 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
32607 # If not specified, sorting is alphabetical by this group's values.
32608 "buckets": [ # Determines the bucket from which values are chosen to sort.
32609 #
32610 # For example, in a pivot table with one row group & two column groups,
32611 # the row group can list up to two values. The first value corresponds
32612 # to a value within the first column group, and the second value
32613 # corresponds to a value in the second column group. If no values
32614 # are listed, this would indicate that the row should be sorted according
32615 # to the "Grand Total" over the column groups. If a single value is listed,
32616 # this would correspond to using the "Total" of that bucket.
32617 { # The kinds of value that a cell in a spreadsheet can have.
32618 "numberValue": 3.14, # Represents a double value.
32619 # Note: Dates, Times and DateTimes are represented as doubles in
32620 # "serial number" format.
32621 "boolValue": True or False, # Represents a boolean value.
32622 "formulaValue": "A String", # Represents a formula.
32623 "stringValue": "A String", # Represents a string value.
32624 # Leading single quotes are not included. For example, if the user typed
32625 # `'123` into the UI, this would be represented as a `stringValue` of
32626 # `"123"`.
32627 "errorValue": { # An error in a cell. # Represents an error.
32628 # This field is read-only.
32629 "message": "A String", # A message with more information about the error
32630 # (in the spreadsheet's locale).
32631 "type": "A String", # The type of error.
32632 },
32633 },
32634 ],
32635 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
32636 # grouping should be sorted by.
32637 },
32638 "sortOrder": "A String", # The order the values in this group should be sorted.
32639 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
32640 #
32641 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
32642 # means this group refers to column `C`, whereas the offset `1` would refer
32643 # to column `D`.
32644 },
32645 ],
32646 },
32647 "hyperlink": "A String", # A hyperlink this cell points to, if any.
32648 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
32649 "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
32650 # the calculated value. For cells with literals, this will be
32651 # the same as the user_entered_value.
32652 # This field is read-only.
32653 "numberValue": 3.14, # Represents a double value.
32654 # Note: Dates, Times and DateTimes are represented as doubles in
32655 # "serial number" format.
32656 "boolValue": True or False, # Represents a boolean value.
32657 "formulaValue": "A String", # Represents a formula.
32658 "stringValue": "A String", # Represents a string value.
32659 # Leading single quotes are not included. For example, if the user typed
32660 # `'123` into the UI, this would be represented as a `stringValue` of
32661 # `"123"`.
32662 "errorValue": { # An error in a cell. # Represents an error.
32663 # This field is read-only.
32664 "message": "A String", # A message with more information about the error
32665 # (in the spreadsheet's locale).
32666 "type": "A String", # The type of error.
32667 },
32668 },
32669 "formattedValue": "A String", # The formatted value of the cell.
32670 # This is the value as it's shown to the user.
32671 # This field is read-only.
32672 "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()`
32673 # Note: Dates, Times and DateTimes are represented as doubles in
32674 # serial number format.
32675 "numberValue": 3.14, # Represents a double value.
32676 # Note: Dates, Times and DateTimes are represented as doubles in
32677 # "serial number" format.
32678 "boolValue": True or False, # Represents a boolean value.
32679 "formulaValue": "A String", # Represents a formula.
32680 "stringValue": "A String", # Represents a string value.
32681 # Leading single quotes are not included. For example, if the user typed
32682 # `'123` into the UI, this would be represented as a `stringValue` of
32683 # `"123"`.
32684 "errorValue": { # An error in a cell. # Represents an error.
32685 # This field is read-only.
32686 "message": "A String", # A message with more information about the error
32687 # (in the spreadsheet's locale).
32688 "type": "A String", # The type of error.
32689 },
32690 },
32691 "note": "A String", # Any note on the cell.
32692 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
32693 # This includes the results of applying any conditional formatting and,
32694 # if the cell contains a formula, the computed number format.
32695 # If the effective format is the default format, effective format will
32696 # not be written.
32697 # This field is read-only.
32698 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
32699 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
32700 # the user's locale will be used if necessary for the given type.
32701 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
32702 # information about the supported patterns.
32703 "type": "A String", # The type of the number format.
32704 # When writing, this field must be set.
32705 },
32706 "textDirection": "A String", # The direction of the text in the cell.
32707 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
32708 # When updating padding, every field must be specified.
32709 "top": 42, # The top padding of the cell.
32710 "right": 42, # The right padding of the cell.
32711 "bottom": 42, # The bottom padding of the cell.
32712 "left": 42, # The left padding of the cell.
32713 },
32714 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
32715 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
32716 # for simplicity of conversion to/from color representations in various
32717 # languages over compactness; for example, the fields of this representation
32718 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
32719 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
32720 # method in iOS; and, with just a little work, it can be easily formatted into
32721 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32722 #
32723 # Example (Java):
32724 #
32725 # import com.google.type.Color;
32726 #
32727 # // ...
32728 # public static java.awt.Color fromProto(Color protocolor) {
32729 # float alpha = protocolor.hasAlpha()
32730 # ? protocolor.getAlpha().getValue()
32731 # : 1.0;
32732 #
32733 # return new java.awt.Color(
32734 # protocolor.getRed(),
32735 # protocolor.getGreen(),
32736 # protocolor.getBlue(),
32737 # alpha);
32738 # }
32739 #
32740 # public static Color toProto(java.awt.Color color) {
32741 # float red = (float) color.getRed();
32742 # float green = (float) color.getGreen();
32743 # float blue = (float) color.getBlue();
32744 # float denominator = 255.0;
32745 # Color.Builder resultBuilder =
32746 # Color
32747 # .newBuilder()
32748 # .setRed(red / denominator)
32749 # .setGreen(green / denominator)
32750 # .setBlue(blue / denominator);
32751 # int alpha = color.getAlpha();
32752 # if (alpha != 255) {
32753 # result.setAlpha(
32754 # FloatValue
32755 # .newBuilder()
32756 # .setValue(((float) alpha) / denominator)
32757 # .build());
32758 # }
32759 # return resultBuilder.build();
32760 # }
32761 # // ...
32762 #
32763 # Example (iOS / Obj-C):
32764 #
32765 # // ...
32766 # static UIColor* fromProto(Color* protocolor) {
32767 # float red = [protocolor red];
32768 # float green = [protocolor green];
32769 # float blue = [protocolor blue];
32770 # FloatValue* alpha_wrapper = [protocolor alpha];
32771 # float alpha = 1.0;
32772 # if (alpha_wrapper != nil) {
32773 # alpha = [alpha_wrapper value];
32774 # }
32775 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
32776 # }
32777 #
32778 # static Color* toProto(UIColor* color) {
32779 # CGFloat red, green, blue, alpha;
32780 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
32781 # return nil;
32782 # }
32783 # Color* result = [Color alloc] init];
32784 # [result setRed:red];
32785 # [result setGreen:green];
32786 # [result setBlue:blue];
32787 # if (alpha <= 0.9999) {
32788 # [result setAlpha:floatWrapperWithValue(alpha)];
32789 # }
32790 # [result autorelease];
32791 # return result;
32792 # }
32793 # // ...
32794 #
32795 # Example (JavaScript):
32796 #
32797 # // ...
32798 #
32799 # var protoToCssColor = function(rgb_color) {
32800 # var redFrac = rgb_color.red || 0.0;
32801 # var greenFrac = rgb_color.green || 0.0;
32802 # var blueFrac = rgb_color.blue || 0.0;
32803 # var red = Math.floor(redFrac * 255);
32804 # var green = Math.floor(greenFrac * 255);
32805 # var blue = Math.floor(blueFrac * 255);
32806 #
32807 # if (!('alpha' in rgb_color)) {
32808 # return rgbToCssColor_(red, green, blue);
32809 # }
32810 #
32811 # var alphaFrac = rgb_color.alpha.value || 0.0;
32812 # var rgbParams = [red, green, blue].join(',');
32813 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
32814 # };
32815 #
32816 # var rgbToCssColor_ = function(red, green, blue) {
32817 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
32818 # var hexString = rgbNumber.toString(16);
32819 # var missingZeros = 6 - hexString.length;
32820 # var resultBuilder = ['#'];
32821 # for (var i = 0; i < missingZeros; i++) {
32822 # resultBuilder.push('0');
32823 # }
32824 # resultBuilder.push(hexString);
32825 # return resultBuilder.join('');
32826 # };
32827 #
32828 # // ...
32829 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
32830 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
32831 # the final pixel color is defined by the equation:
32832 #
32833 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
32834 #
32835 # This means that a value of 1.0 corresponds to a solid color, whereas
32836 # a value of 0.0 corresponds to a completely transparent color. This
32837 # uses a wrapper message rather than a simple float scalar so that it is
32838 # possible to distinguish between a default value and the value being unset.
32839 # If omitted, this color object is to be rendered as a solid color
32840 # (as if the alpha value had been explicitly given with a value of 1.0).
32841 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
32842 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
32843 },
32844 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
32845 "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).
32846 # Absent values indicate that the field isn't specified.
32847 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
32848 # for simplicity of conversion to/from color representations in various
32849 # languages over compactness; for example, the fields of this representation
32850 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
32851 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
32852 # method in iOS; and, with just a little work, it can be easily formatted into
32853 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32854 #
32855 # Example (Java):
32856 #
32857 # import com.google.type.Color;
32858 #
32859 # // ...
32860 # public static java.awt.Color fromProto(Color protocolor) {
32861 # float alpha = protocolor.hasAlpha()
32862 # ? protocolor.getAlpha().getValue()
32863 # : 1.0;
32864 #
32865 # return new java.awt.Color(
32866 # protocolor.getRed(),
32867 # protocolor.getGreen(),
32868 # protocolor.getBlue(),
32869 # alpha);
32870 # }
32871 #
32872 # public static Color toProto(java.awt.Color color) {
32873 # float red = (float) color.getRed();
32874 # float green = (float) color.getGreen();
32875 # float blue = (float) color.getBlue();
32876 # float denominator = 255.0;
32877 # Color.Builder resultBuilder =
32878 # Color
32879 # .newBuilder()
32880 # .setRed(red / denominator)
32881 # .setGreen(green / denominator)
32882 # .setBlue(blue / denominator);
32883 # int alpha = color.getAlpha();
32884 # if (alpha != 255) {
32885 # result.setAlpha(
32886 # FloatValue
32887 # .newBuilder()
32888 # .setValue(((float) alpha) / denominator)
32889 # .build());
32890 # }
32891 # return resultBuilder.build();
32892 # }
32893 # // ...
32894 #
32895 # Example (iOS / Obj-C):
32896 #
32897 # // ...
32898 # static UIColor* fromProto(Color* protocolor) {
32899 # float red = [protocolor red];
32900 # float green = [protocolor green];
32901 # float blue = [protocolor blue];
32902 # FloatValue* alpha_wrapper = [protocolor alpha];
32903 # float alpha = 1.0;
32904 # if (alpha_wrapper != nil) {
32905 # alpha = [alpha_wrapper value];
32906 # }
32907 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
32908 # }
32909 #
32910 # static Color* toProto(UIColor* color) {
32911 # CGFloat red, green, blue, alpha;
32912 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
32913 # return nil;
32914 # }
32915 # Color* result = [Color alloc] init];
32916 # [result setRed:red];
32917 # [result setGreen:green];
32918 # [result setBlue:blue];
32919 # if (alpha <= 0.9999) {
32920 # [result setAlpha:floatWrapperWithValue(alpha)];
32921 # }
32922 # [result autorelease];
32923 # return result;
32924 # }
32925 # // ...
32926 #
32927 # Example (JavaScript):
32928 #
32929 # // ...
32930 #
32931 # var protoToCssColor = function(rgb_color) {
32932 # var redFrac = rgb_color.red || 0.0;
32933 # var greenFrac = rgb_color.green || 0.0;
32934 # var blueFrac = rgb_color.blue || 0.0;
32935 # var red = Math.floor(redFrac * 255);
32936 # var green = Math.floor(greenFrac * 255);
32937 # var blue = Math.floor(blueFrac * 255);
32938 #
32939 # if (!('alpha' in rgb_color)) {
32940 # return rgbToCssColor_(red, green, blue);
32941 # }
32942 #
32943 # var alphaFrac = rgb_color.alpha.value || 0.0;
32944 # var rgbParams = [red, green, blue].join(',');
32945 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
32946 # };
32947 #
32948 # var rgbToCssColor_ = function(red, green, blue) {
32949 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
32950 # var hexString = rgbNumber.toString(16);
32951 # var missingZeros = 6 - hexString.length;
32952 # var resultBuilder = ['#'];
32953 # for (var i = 0; i < missingZeros; i++) {
32954 # resultBuilder.push('0');
32955 # }
32956 # resultBuilder.push(hexString);
32957 # return resultBuilder.join('');
32958 # };
32959 #
32960 # // ...
32961 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
32962 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
32963 # the final pixel color is defined by the equation:
32964 #
32965 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
32966 #
32967 # This means that a value of 1.0 corresponds to a solid color, whereas
32968 # a value of 0.0 corresponds to a completely transparent color. This
32969 # uses a wrapper message rather than a simple float scalar so that it is
32970 # possible to distinguish between a default value and the value being unset.
32971 # If omitted, this color object is to be rendered as a solid color
32972 # (as if the alpha value had been explicitly given with a value of 1.0).
32973 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
32974 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
32975 },
32976 "bold": True or False, # True if the text is bold.
32977 "strikethrough": True or False, # True if the text has a strikethrough.
32978 "fontFamily": "A String", # The font family.
32979 "fontSize": 42, # The size of the font.
32980 "italic": True or False, # True if the text is italicized.
32981 "underline": True or False, # True if the text is underlined.
32982 },
32983 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
32984 "borders": { # The borders of the cell. # The borders of the cell.
32985 "top": { # A border along a cell. # The top border of the cell.
32986 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
32987 # for simplicity of conversion to/from color representations in various
32988 # languages over compactness; for example, the fields of this representation
32989 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
32990 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
32991 # method in iOS; and, with just a little work, it can be easily formatted into
32992 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32993 #
32994 # Example (Java):
32995 #
32996 # import com.google.type.Color;
32997 #
32998 # // ...
32999 # public static java.awt.Color fromProto(Color protocolor) {
33000 # float alpha = protocolor.hasAlpha()
33001 # ? protocolor.getAlpha().getValue()
33002 # : 1.0;
33003 #
33004 # return new java.awt.Color(
33005 # protocolor.getRed(),
33006 # protocolor.getGreen(),
33007 # protocolor.getBlue(),
33008 # alpha);
33009 # }
33010 #
33011 # public static Color toProto(java.awt.Color color) {
33012 # float red = (float) color.getRed();
33013 # float green = (float) color.getGreen();
33014 # float blue = (float) color.getBlue();
33015 # float denominator = 255.0;
33016 # Color.Builder resultBuilder =
33017 # Color
33018 # .newBuilder()
33019 # .setRed(red / denominator)
33020 # .setGreen(green / denominator)
33021 # .setBlue(blue / denominator);
33022 # int alpha = color.getAlpha();
33023 # if (alpha != 255) {
33024 # result.setAlpha(
33025 # FloatValue
33026 # .newBuilder()
33027 # .setValue(((float) alpha) / denominator)
33028 # .build());
33029 # }
33030 # return resultBuilder.build();
33031 # }
33032 # // ...
33033 #
33034 # Example (iOS / Obj-C):
33035 #
33036 # // ...
33037 # static UIColor* fromProto(Color* protocolor) {
33038 # float red = [protocolor red];
33039 # float green = [protocolor green];
33040 # float blue = [protocolor blue];
33041 # FloatValue* alpha_wrapper = [protocolor alpha];
33042 # float alpha = 1.0;
33043 # if (alpha_wrapper != nil) {
33044 # alpha = [alpha_wrapper value];
33045 # }
33046 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33047 # }
33048 #
33049 # static Color* toProto(UIColor* color) {
33050 # CGFloat red, green, blue, alpha;
33051 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33052 # return nil;
33053 # }
33054 # Color* result = [Color alloc] init];
33055 # [result setRed:red];
33056 # [result setGreen:green];
33057 # [result setBlue:blue];
33058 # if (alpha <= 0.9999) {
33059 # [result setAlpha:floatWrapperWithValue(alpha)];
33060 # }
33061 # [result autorelease];
33062 # return result;
33063 # }
33064 # // ...
33065 #
33066 # Example (JavaScript):
33067 #
33068 # // ...
33069 #
33070 # var protoToCssColor = function(rgb_color) {
33071 # var redFrac = rgb_color.red || 0.0;
33072 # var greenFrac = rgb_color.green || 0.0;
33073 # var blueFrac = rgb_color.blue || 0.0;
33074 # var red = Math.floor(redFrac * 255);
33075 # var green = Math.floor(greenFrac * 255);
33076 # var blue = Math.floor(blueFrac * 255);
33077 #
33078 # if (!('alpha' in rgb_color)) {
33079 # return rgbToCssColor_(red, green, blue);
33080 # }
33081 #
33082 # var alphaFrac = rgb_color.alpha.value || 0.0;
33083 # var rgbParams = [red, green, blue].join(',');
33084 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33085 # };
33086 #
33087 # var rgbToCssColor_ = function(red, green, blue) {
33088 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33089 # var hexString = rgbNumber.toString(16);
33090 # var missingZeros = 6 - hexString.length;
33091 # var resultBuilder = ['#'];
33092 # for (var i = 0; i < missingZeros; i++) {
33093 # resultBuilder.push('0');
33094 # }
33095 # resultBuilder.push(hexString);
33096 # return resultBuilder.join('');
33097 # };
33098 #
33099 # // ...
33100 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33101 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33102 # the final pixel color is defined by the equation:
33103 #
33104 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33105 #
33106 # This means that a value of 1.0 corresponds to a solid color, whereas
33107 # a value of 0.0 corresponds to a completely transparent color. This
33108 # uses a wrapper message rather than a simple float scalar so that it is
33109 # possible to distinguish between a default value and the value being unset.
33110 # If omitted, this color object is to be rendered as a solid color
33111 # (as if the alpha value had been explicitly given with a value of 1.0).
33112 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33113 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33114 },
33115 "width": 42, # The width of the border, in pixels.
33116 # Deprecated; the width is determined by the "style" field.
33117 "style": "A String", # The style of the border.
33118 },
33119 "right": { # A border along a cell. # The right border of the cell.
33120 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33121 # for simplicity of conversion to/from color representations in various
33122 # languages over compactness; for example, the fields of this representation
33123 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33124 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33125 # method in iOS; and, with just a little work, it can be easily formatted into
33126 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33127 #
33128 # Example (Java):
33129 #
33130 # import com.google.type.Color;
33131 #
33132 # // ...
33133 # public static java.awt.Color fromProto(Color protocolor) {
33134 # float alpha = protocolor.hasAlpha()
33135 # ? protocolor.getAlpha().getValue()
33136 # : 1.0;
33137 #
33138 # return new java.awt.Color(
33139 # protocolor.getRed(),
33140 # protocolor.getGreen(),
33141 # protocolor.getBlue(),
33142 # alpha);
33143 # }
33144 #
33145 # public static Color toProto(java.awt.Color color) {
33146 # float red = (float) color.getRed();
33147 # float green = (float) color.getGreen();
33148 # float blue = (float) color.getBlue();
33149 # float denominator = 255.0;
33150 # Color.Builder resultBuilder =
33151 # Color
33152 # .newBuilder()
33153 # .setRed(red / denominator)
33154 # .setGreen(green / denominator)
33155 # .setBlue(blue / denominator);
33156 # int alpha = color.getAlpha();
33157 # if (alpha != 255) {
33158 # result.setAlpha(
33159 # FloatValue
33160 # .newBuilder()
33161 # .setValue(((float) alpha) / denominator)
33162 # .build());
33163 # }
33164 # return resultBuilder.build();
33165 # }
33166 # // ...
33167 #
33168 # Example (iOS / Obj-C):
33169 #
33170 # // ...
33171 # static UIColor* fromProto(Color* protocolor) {
33172 # float red = [protocolor red];
33173 # float green = [protocolor green];
33174 # float blue = [protocolor blue];
33175 # FloatValue* alpha_wrapper = [protocolor alpha];
33176 # float alpha = 1.0;
33177 # if (alpha_wrapper != nil) {
33178 # alpha = [alpha_wrapper value];
33179 # }
33180 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33181 # }
33182 #
33183 # static Color* toProto(UIColor* color) {
33184 # CGFloat red, green, blue, alpha;
33185 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33186 # return nil;
33187 # }
33188 # Color* result = [Color alloc] init];
33189 # [result setRed:red];
33190 # [result setGreen:green];
33191 # [result setBlue:blue];
33192 # if (alpha <= 0.9999) {
33193 # [result setAlpha:floatWrapperWithValue(alpha)];
33194 # }
33195 # [result autorelease];
33196 # return result;
33197 # }
33198 # // ...
33199 #
33200 # Example (JavaScript):
33201 #
33202 # // ...
33203 #
33204 # var protoToCssColor = function(rgb_color) {
33205 # var redFrac = rgb_color.red || 0.0;
33206 # var greenFrac = rgb_color.green || 0.0;
33207 # var blueFrac = rgb_color.blue || 0.0;
33208 # var red = Math.floor(redFrac * 255);
33209 # var green = Math.floor(greenFrac * 255);
33210 # var blue = Math.floor(blueFrac * 255);
33211 #
33212 # if (!('alpha' in rgb_color)) {
33213 # return rgbToCssColor_(red, green, blue);
33214 # }
33215 #
33216 # var alphaFrac = rgb_color.alpha.value || 0.0;
33217 # var rgbParams = [red, green, blue].join(',');
33218 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33219 # };
33220 #
33221 # var rgbToCssColor_ = function(red, green, blue) {
33222 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33223 # var hexString = rgbNumber.toString(16);
33224 # var missingZeros = 6 - hexString.length;
33225 # var resultBuilder = ['#'];
33226 # for (var i = 0; i < missingZeros; i++) {
33227 # resultBuilder.push('0');
33228 # }
33229 # resultBuilder.push(hexString);
33230 # return resultBuilder.join('');
33231 # };
33232 #
33233 # // ...
33234 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33235 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33236 # the final pixel color is defined by the equation:
33237 #
33238 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33239 #
33240 # This means that a value of 1.0 corresponds to a solid color, whereas
33241 # a value of 0.0 corresponds to a completely transparent color. This
33242 # uses a wrapper message rather than a simple float scalar so that it is
33243 # possible to distinguish between a default value and the value being unset.
33244 # If omitted, this color object is to be rendered as a solid color
33245 # (as if the alpha value had been explicitly given with a value of 1.0).
33246 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33247 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33248 },
33249 "width": 42, # The width of the border, in pixels.
33250 # Deprecated; the width is determined by the "style" field.
33251 "style": "A String", # The style of the border.
33252 },
33253 "bottom": { # A border along a cell. # The bottom border of the cell.
33254 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33255 # for simplicity of conversion to/from color representations in various
33256 # languages over compactness; for example, the fields of this representation
33257 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33258 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33259 # method in iOS; and, with just a little work, it can be easily formatted into
33260 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33261 #
33262 # Example (Java):
33263 #
33264 # import com.google.type.Color;
33265 #
33266 # // ...
33267 # public static java.awt.Color fromProto(Color protocolor) {
33268 # float alpha = protocolor.hasAlpha()
33269 # ? protocolor.getAlpha().getValue()
33270 # : 1.0;
33271 #
33272 # return new java.awt.Color(
33273 # protocolor.getRed(),
33274 # protocolor.getGreen(),
33275 # protocolor.getBlue(),
33276 # alpha);
33277 # }
33278 #
33279 # public static Color toProto(java.awt.Color color) {
33280 # float red = (float) color.getRed();
33281 # float green = (float) color.getGreen();
33282 # float blue = (float) color.getBlue();
33283 # float denominator = 255.0;
33284 # Color.Builder resultBuilder =
33285 # Color
33286 # .newBuilder()
33287 # .setRed(red / denominator)
33288 # .setGreen(green / denominator)
33289 # .setBlue(blue / denominator);
33290 # int alpha = color.getAlpha();
33291 # if (alpha != 255) {
33292 # result.setAlpha(
33293 # FloatValue
33294 # .newBuilder()
33295 # .setValue(((float) alpha) / denominator)
33296 # .build());
33297 # }
33298 # return resultBuilder.build();
33299 # }
33300 # // ...
33301 #
33302 # Example (iOS / Obj-C):
33303 #
33304 # // ...
33305 # static UIColor* fromProto(Color* protocolor) {
33306 # float red = [protocolor red];
33307 # float green = [protocolor green];
33308 # float blue = [protocolor blue];
33309 # FloatValue* alpha_wrapper = [protocolor alpha];
33310 # float alpha = 1.0;
33311 # if (alpha_wrapper != nil) {
33312 # alpha = [alpha_wrapper value];
33313 # }
33314 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33315 # }
33316 #
33317 # static Color* toProto(UIColor* color) {
33318 # CGFloat red, green, blue, alpha;
33319 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33320 # return nil;
33321 # }
33322 # Color* result = [Color alloc] init];
33323 # [result setRed:red];
33324 # [result setGreen:green];
33325 # [result setBlue:blue];
33326 # if (alpha <= 0.9999) {
33327 # [result setAlpha:floatWrapperWithValue(alpha)];
33328 # }
33329 # [result autorelease];
33330 # return result;
33331 # }
33332 # // ...
33333 #
33334 # Example (JavaScript):
33335 #
33336 # // ...
33337 #
33338 # var protoToCssColor = function(rgb_color) {
33339 # var redFrac = rgb_color.red || 0.0;
33340 # var greenFrac = rgb_color.green || 0.0;
33341 # var blueFrac = rgb_color.blue || 0.0;
33342 # var red = Math.floor(redFrac * 255);
33343 # var green = Math.floor(greenFrac * 255);
33344 # var blue = Math.floor(blueFrac * 255);
33345 #
33346 # if (!('alpha' in rgb_color)) {
33347 # return rgbToCssColor_(red, green, blue);
33348 # }
33349 #
33350 # var alphaFrac = rgb_color.alpha.value || 0.0;
33351 # var rgbParams = [red, green, blue].join(',');
33352 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33353 # };
33354 #
33355 # var rgbToCssColor_ = function(red, green, blue) {
33356 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33357 # var hexString = rgbNumber.toString(16);
33358 # var missingZeros = 6 - hexString.length;
33359 # var resultBuilder = ['#'];
33360 # for (var i = 0; i < missingZeros; i++) {
33361 # resultBuilder.push('0');
33362 # }
33363 # resultBuilder.push(hexString);
33364 # return resultBuilder.join('');
33365 # };
33366 #
33367 # // ...
33368 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33369 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33370 # the final pixel color is defined by the equation:
33371 #
33372 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33373 #
33374 # This means that a value of 1.0 corresponds to a solid color, whereas
33375 # a value of 0.0 corresponds to a completely transparent color. This
33376 # uses a wrapper message rather than a simple float scalar so that it is
33377 # possible to distinguish between a default value and the value being unset.
33378 # If omitted, this color object is to be rendered as a solid color
33379 # (as if the alpha value had been explicitly given with a value of 1.0).
33380 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33381 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33382 },
33383 "width": 42, # The width of the border, in pixels.
33384 # Deprecated; the width is determined by the "style" field.
33385 "style": "A String", # The style of the border.
33386 },
33387 "left": { # A border along a cell. # The left border of the cell.
33388 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33389 # for simplicity of conversion to/from color representations in various
33390 # languages over compactness; for example, the fields of this representation
33391 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33392 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33393 # method in iOS; and, with just a little work, it can be easily formatted into
33394 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33395 #
33396 # Example (Java):
33397 #
33398 # import com.google.type.Color;
33399 #
33400 # // ...
33401 # public static java.awt.Color fromProto(Color protocolor) {
33402 # float alpha = protocolor.hasAlpha()
33403 # ? protocolor.getAlpha().getValue()
33404 # : 1.0;
33405 #
33406 # return new java.awt.Color(
33407 # protocolor.getRed(),
33408 # protocolor.getGreen(),
33409 # protocolor.getBlue(),
33410 # alpha);
33411 # }
33412 #
33413 # public static Color toProto(java.awt.Color color) {
33414 # float red = (float) color.getRed();
33415 # float green = (float) color.getGreen();
33416 # float blue = (float) color.getBlue();
33417 # float denominator = 255.0;
33418 # Color.Builder resultBuilder =
33419 # Color
33420 # .newBuilder()
33421 # .setRed(red / denominator)
33422 # .setGreen(green / denominator)
33423 # .setBlue(blue / denominator);
33424 # int alpha = color.getAlpha();
33425 # if (alpha != 255) {
33426 # result.setAlpha(
33427 # FloatValue
33428 # .newBuilder()
33429 # .setValue(((float) alpha) / denominator)
33430 # .build());
33431 # }
33432 # return resultBuilder.build();
33433 # }
33434 # // ...
33435 #
33436 # Example (iOS / Obj-C):
33437 #
33438 # // ...
33439 # static UIColor* fromProto(Color* protocolor) {
33440 # float red = [protocolor red];
33441 # float green = [protocolor green];
33442 # float blue = [protocolor blue];
33443 # FloatValue* alpha_wrapper = [protocolor alpha];
33444 # float alpha = 1.0;
33445 # if (alpha_wrapper != nil) {
33446 # alpha = [alpha_wrapper value];
33447 # }
33448 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33449 # }
33450 #
33451 # static Color* toProto(UIColor* color) {
33452 # CGFloat red, green, blue, alpha;
33453 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33454 # return nil;
33455 # }
33456 # Color* result = [Color alloc] init];
33457 # [result setRed:red];
33458 # [result setGreen:green];
33459 # [result setBlue:blue];
33460 # if (alpha <= 0.9999) {
33461 # [result setAlpha:floatWrapperWithValue(alpha)];
33462 # }
33463 # [result autorelease];
33464 # return result;
33465 # }
33466 # // ...
33467 #
33468 # Example (JavaScript):
33469 #
33470 # // ...
33471 #
33472 # var protoToCssColor = function(rgb_color) {
33473 # var redFrac = rgb_color.red || 0.0;
33474 # var greenFrac = rgb_color.green || 0.0;
33475 # var blueFrac = rgb_color.blue || 0.0;
33476 # var red = Math.floor(redFrac * 255);
33477 # var green = Math.floor(greenFrac * 255);
33478 # var blue = Math.floor(blueFrac * 255);
33479 #
33480 # if (!('alpha' in rgb_color)) {
33481 # return rgbToCssColor_(red, green, blue);
33482 # }
33483 #
33484 # var alphaFrac = rgb_color.alpha.value || 0.0;
33485 # var rgbParams = [red, green, blue].join(',');
33486 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33487 # };
33488 #
33489 # var rgbToCssColor_ = function(red, green, blue) {
33490 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33491 # var hexString = rgbNumber.toString(16);
33492 # var missingZeros = 6 - hexString.length;
33493 # var resultBuilder = ['#'];
33494 # for (var i = 0; i < missingZeros; i++) {
33495 # resultBuilder.push('0');
33496 # }
33497 # resultBuilder.push(hexString);
33498 # return resultBuilder.join('');
33499 # };
33500 #
33501 # // ...
33502 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33503 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33504 # the final pixel color is defined by the equation:
33505 #
33506 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33507 #
33508 # This means that a value of 1.0 corresponds to a solid color, whereas
33509 # a value of 0.0 corresponds to a completely transparent color. This
33510 # uses a wrapper message rather than a simple float scalar so that it is
33511 # possible to distinguish between a default value and the value being unset.
33512 # If omitted, this color object is to be rendered as a solid color
33513 # (as if the alpha value had been explicitly given with a value of 1.0).
33514 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33515 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33516 },
33517 "width": 42, # The width of the border, in pixels.
33518 # Deprecated; the width is determined by the "style" field.
33519 "style": "A String", # The style of the border.
33520 },
33521 },
33522 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
33523 },
33524 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
33525 #
33526 # When writing, the new format will be merged with the existing format.
33527 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
33528 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
33529 # the user's locale will be used if necessary for the given type.
33530 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
33531 # information about the supported patterns.
33532 "type": "A String", # The type of the number format.
33533 # When writing, this field must be set.
33534 },
33535 "textDirection": "A String", # The direction of the text in the cell.
33536 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
33537 # When updating padding, every field must be specified.
33538 "top": 42, # The top padding of the cell.
33539 "right": 42, # The right padding of the cell.
33540 "bottom": 42, # The bottom padding of the cell.
33541 "left": 42, # The left padding of the cell.
33542 },
33543 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
33544 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
33545 # for simplicity of conversion to/from color representations in various
33546 # languages over compactness; for example, the fields of this representation
33547 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33548 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33549 # method in iOS; and, with just a little work, it can be easily formatted into
33550 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33551 #
33552 # Example (Java):
33553 #
33554 # import com.google.type.Color;
33555 #
33556 # // ...
33557 # public static java.awt.Color fromProto(Color protocolor) {
33558 # float alpha = protocolor.hasAlpha()
33559 # ? protocolor.getAlpha().getValue()
33560 # : 1.0;
33561 #
33562 # return new java.awt.Color(
33563 # protocolor.getRed(),
33564 # protocolor.getGreen(),
33565 # protocolor.getBlue(),
33566 # alpha);
33567 # }
33568 #
33569 # public static Color toProto(java.awt.Color color) {
33570 # float red = (float) color.getRed();
33571 # float green = (float) color.getGreen();
33572 # float blue = (float) color.getBlue();
33573 # float denominator = 255.0;
33574 # Color.Builder resultBuilder =
33575 # Color
33576 # .newBuilder()
33577 # .setRed(red / denominator)
33578 # .setGreen(green / denominator)
33579 # .setBlue(blue / denominator);
33580 # int alpha = color.getAlpha();
33581 # if (alpha != 255) {
33582 # result.setAlpha(
33583 # FloatValue
33584 # .newBuilder()
33585 # .setValue(((float) alpha) / denominator)
33586 # .build());
33587 # }
33588 # return resultBuilder.build();
33589 # }
33590 # // ...
33591 #
33592 # Example (iOS / Obj-C):
33593 #
33594 # // ...
33595 # static UIColor* fromProto(Color* protocolor) {
33596 # float red = [protocolor red];
33597 # float green = [protocolor green];
33598 # float blue = [protocolor blue];
33599 # FloatValue* alpha_wrapper = [protocolor alpha];
33600 # float alpha = 1.0;
33601 # if (alpha_wrapper != nil) {
33602 # alpha = [alpha_wrapper value];
33603 # }
33604 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33605 # }
33606 #
33607 # static Color* toProto(UIColor* color) {
33608 # CGFloat red, green, blue, alpha;
33609 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33610 # return nil;
33611 # }
33612 # Color* result = [Color alloc] init];
33613 # [result setRed:red];
33614 # [result setGreen:green];
33615 # [result setBlue:blue];
33616 # if (alpha <= 0.9999) {
33617 # [result setAlpha:floatWrapperWithValue(alpha)];
33618 # }
33619 # [result autorelease];
33620 # return result;
33621 # }
33622 # // ...
33623 #
33624 # Example (JavaScript):
33625 #
33626 # // ...
33627 #
33628 # var protoToCssColor = function(rgb_color) {
33629 # var redFrac = rgb_color.red || 0.0;
33630 # var greenFrac = rgb_color.green || 0.0;
33631 # var blueFrac = rgb_color.blue || 0.0;
33632 # var red = Math.floor(redFrac * 255);
33633 # var green = Math.floor(greenFrac * 255);
33634 # var blue = Math.floor(blueFrac * 255);
33635 #
33636 # if (!('alpha' in rgb_color)) {
33637 # return rgbToCssColor_(red, green, blue);
33638 # }
33639 #
33640 # var alphaFrac = rgb_color.alpha.value || 0.0;
33641 # var rgbParams = [red, green, blue].join(',');
33642 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33643 # };
33644 #
33645 # var rgbToCssColor_ = function(red, green, blue) {
33646 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33647 # var hexString = rgbNumber.toString(16);
33648 # var missingZeros = 6 - hexString.length;
33649 # var resultBuilder = ['#'];
33650 # for (var i = 0; i < missingZeros; i++) {
33651 # resultBuilder.push('0');
33652 # }
33653 # resultBuilder.push(hexString);
33654 # return resultBuilder.join('');
33655 # };
33656 #
33657 # // ...
33658 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33659 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33660 # the final pixel color is defined by the equation:
33661 #
33662 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33663 #
33664 # This means that a value of 1.0 corresponds to a solid color, whereas
33665 # a value of 0.0 corresponds to a completely transparent color. This
33666 # uses a wrapper message rather than a simple float scalar so that it is
33667 # possible to distinguish between a default value and the value being unset.
33668 # If omitted, this color object is to be rendered as a solid color
33669 # (as if the alpha value had been explicitly given with a value of 1.0).
33670 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33671 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33672 },
33673 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
33674 "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).
33675 # Absent values indicate that the field isn't specified.
33676 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
33677 # for simplicity of conversion to/from color representations in various
33678 # languages over compactness; for example, the fields of this representation
33679 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33680 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33681 # method in iOS; and, with just a little work, it can be easily formatted into
33682 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33683 #
33684 # Example (Java):
33685 #
33686 # import com.google.type.Color;
33687 #
33688 # // ...
33689 # public static java.awt.Color fromProto(Color protocolor) {
33690 # float alpha = protocolor.hasAlpha()
33691 # ? protocolor.getAlpha().getValue()
33692 # : 1.0;
33693 #
33694 # return new java.awt.Color(
33695 # protocolor.getRed(),
33696 # protocolor.getGreen(),
33697 # protocolor.getBlue(),
33698 # alpha);
33699 # }
33700 #
33701 # public static Color toProto(java.awt.Color color) {
33702 # float red = (float) color.getRed();
33703 # float green = (float) color.getGreen();
33704 # float blue = (float) color.getBlue();
33705 # float denominator = 255.0;
33706 # Color.Builder resultBuilder =
33707 # Color
33708 # .newBuilder()
33709 # .setRed(red / denominator)
33710 # .setGreen(green / denominator)
33711 # .setBlue(blue / denominator);
33712 # int alpha = color.getAlpha();
33713 # if (alpha != 255) {
33714 # result.setAlpha(
33715 # FloatValue
33716 # .newBuilder()
33717 # .setValue(((float) alpha) / denominator)
33718 # .build());
33719 # }
33720 # return resultBuilder.build();
33721 # }
33722 # // ...
33723 #
33724 # Example (iOS / Obj-C):
33725 #
33726 # // ...
33727 # static UIColor* fromProto(Color* protocolor) {
33728 # float red = [protocolor red];
33729 # float green = [protocolor green];
33730 # float blue = [protocolor blue];
33731 # FloatValue* alpha_wrapper = [protocolor alpha];
33732 # float alpha = 1.0;
33733 # if (alpha_wrapper != nil) {
33734 # alpha = [alpha_wrapper value];
33735 # }
33736 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33737 # }
33738 #
33739 # static Color* toProto(UIColor* color) {
33740 # CGFloat red, green, blue, alpha;
33741 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33742 # return nil;
33743 # }
33744 # Color* result = [Color alloc] init];
33745 # [result setRed:red];
33746 # [result setGreen:green];
33747 # [result setBlue:blue];
33748 # if (alpha <= 0.9999) {
33749 # [result setAlpha:floatWrapperWithValue(alpha)];
33750 # }
33751 # [result autorelease];
33752 # return result;
33753 # }
33754 # // ...
33755 #
33756 # Example (JavaScript):
33757 #
33758 # // ...
33759 #
33760 # var protoToCssColor = function(rgb_color) {
33761 # var redFrac = rgb_color.red || 0.0;
33762 # var greenFrac = rgb_color.green || 0.0;
33763 # var blueFrac = rgb_color.blue || 0.0;
33764 # var red = Math.floor(redFrac * 255);
33765 # var green = Math.floor(greenFrac * 255);
33766 # var blue = Math.floor(blueFrac * 255);
33767 #
33768 # if (!('alpha' in rgb_color)) {
33769 # return rgbToCssColor_(red, green, blue);
33770 # }
33771 #
33772 # var alphaFrac = rgb_color.alpha.value || 0.0;
33773 # var rgbParams = [red, green, blue].join(',');
33774 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33775 # };
33776 #
33777 # var rgbToCssColor_ = function(red, green, blue) {
33778 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33779 # var hexString = rgbNumber.toString(16);
33780 # var missingZeros = 6 - hexString.length;
33781 # var resultBuilder = ['#'];
33782 # for (var i = 0; i < missingZeros; i++) {
33783 # resultBuilder.push('0');
33784 # }
33785 # resultBuilder.push(hexString);
33786 # return resultBuilder.join('');
33787 # };
33788 #
33789 # // ...
33790 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33791 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33792 # the final pixel color is defined by the equation:
33793 #
33794 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33795 #
33796 # This means that a value of 1.0 corresponds to a solid color, whereas
33797 # a value of 0.0 corresponds to a completely transparent color. This
33798 # uses a wrapper message rather than a simple float scalar so that it is
33799 # possible to distinguish between a default value and the value being unset.
33800 # If omitted, this color object is to be rendered as a solid color
33801 # (as if the alpha value had been explicitly given with a value of 1.0).
33802 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33803 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33804 },
33805 "bold": True or False, # True if the text is bold.
33806 "strikethrough": True or False, # True if the text has a strikethrough.
33807 "fontFamily": "A String", # The font family.
33808 "fontSize": 42, # The size of the font.
33809 "italic": True or False, # True if the text is italicized.
33810 "underline": True or False, # True if the text is underlined.
33811 },
33812 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
33813 "borders": { # The borders of the cell. # The borders of the cell.
33814 "top": { # A border along a cell. # The top border of the cell.
33815 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33816 # for simplicity of conversion to/from color representations in various
33817 # languages over compactness; for example, the fields of this representation
33818 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33819 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33820 # method in iOS; and, with just a little work, it can be easily formatted into
33821 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33822 #
33823 # Example (Java):
33824 #
33825 # import com.google.type.Color;
33826 #
33827 # // ...
33828 # public static java.awt.Color fromProto(Color protocolor) {
33829 # float alpha = protocolor.hasAlpha()
33830 # ? protocolor.getAlpha().getValue()
33831 # : 1.0;
33832 #
33833 # return new java.awt.Color(
33834 # protocolor.getRed(),
33835 # protocolor.getGreen(),
33836 # protocolor.getBlue(),
33837 # alpha);
33838 # }
33839 #
33840 # public static Color toProto(java.awt.Color color) {
33841 # float red = (float) color.getRed();
33842 # float green = (float) color.getGreen();
33843 # float blue = (float) color.getBlue();
33844 # float denominator = 255.0;
33845 # Color.Builder resultBuilder =
33846 # Color
33847 # .newBuilder()
33848 # .setRed(red / denominator)
33849 # .setGreen(green / denominator)
33850 # .setBlue(blue / denominator);
33851 # int alpha = color.getAlpha();
33852 # if (alpha != 255) {
33853 # result.setAlpha(
33854 # FloatValue
33855 # .newBuilder()
33856 # .setValue(((float) alpha) / denominator)
33857 # .build());
33858 # }
33859 # return resultBuilder.build();
33860 # }
33861 # // ...
33862 #
33863 # Example (iOS / Obj-C):
33864 #
33865 # // ...
33866 # static UIColor* fromProto(Color* protocolor) {
33867 # float red = [protocolor red];
33868 # float green = [protocolor green];
33869 # float blue = [protocolor blue];
33870 # FloatValue* alpha_wrapper = [protocolor alpha];
33871 # float alpha = 1.0;
33872 # if (alpha_wrapper != nil) {
33873 # alpha = [alpha_wrapper value];
33874 # }
33875 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33876 # }
33877 #
33878 # static Color* toProto(UIColor* color) {
33879 # CGFloat red, green, blue, alpha;
33880 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33881 # return nil;
33882 # }
33883 # Color* result = [Color alloc] init];
33884 # [result setRed:red];
33885 # [result setGreen:green];
33886 # [result setBlue:blue];
33887 # if (alpha <= 0.9999) {
33888 # [result setAlpha:floatWrapperWithValue(alpha)];
33889 # }
33890 # [result autorelease];
33891 # return result;
33892 # }
33893 # // ...
33894 #
33895 # Example (JavaScript):
33896 #
33897 # // ...
33898 #
33899 # var protoToCssColor = function(rgb_color) {
33900 # var redFrac = rgb_color.red || 0.0;
33901 # var greenFrac = rgb_color.green || 0.0;
33902 # var blueFrac = rgb_color.blue || 0.0;
33903 # var red = Math.floor(redFrac * 255);
33904 # var green = Math.floor(greenFrac * 255);
33905 # var blue = Math.floor(blueFrac * 255);
33906 #
33907 # if (!('alpha' in rgb_color)) {
33908 # return rgbToCssColor_(red, green, blue);
33909 # }
33910 #
33911 # var alphaFrac = rgb_color.alpha.value || 0.0;
33912 # var rgbParams = [red, green, blue].join(',');
33913 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33914 # };
33915 #
33916 # var rgbToCssColor_ = function(red, green, blue) {
33917 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33918 # var hexString = rgbNumber.toString(16);
33919 # var missingZeros = 6 - hexString.length;
33920 # var resultBuilder = ['#'];
33921 # for (var i = 0; i < missingZeros; i++) {
33922 # resultBuilder.push('0');
33923 # }
33924 # resultBuilder.push(hexString);
33925 # return resultBuilder.join('');
33926 # };
33927 #
33928 # // ...
33929 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33930 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33931 # the final pixel color is defined by the equation:
33932 #
33933 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33934 #
33935 # This means that a value of 1.0 corresponds to a solid color, whereas
33936 # a value of 0.0 corresponds to a completely transparent color. This
33937 # uses a wrapper message rather than a simple float scalar so that it is
33938 # possible to distinguish between a default value and the value being unset.
33939 # If omitted, this color object is to be rendered as a solid color
33940 # (as if the alpha value had been explicitly given with a value of 1.0).
33941 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33942 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33943 },
33944 "width": 42, # The width of the border, in pixels.
33945 # Deprecated; the width is determined by the "style" field.
33946 "style": "A String", # The style of the border.
33947 },
33948 "right": { # A border along a cell. # The right border of the cell.
33949 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33950 # for simplicity of conversion to/from color representations in various
33951 # languages over compactness; for example, the fields of this representation
33952 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33953 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33954 # method in iOS; and, with just a little work, it can be easily formatted into
33955 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33956 #
33957 # Example (Java):
33958 #
33959 # import com.google.type.Color;
33960 #
33961 # // ...
33962 # public static java.awt.Color fromProto(Color protocolor) {
33963 # float alpha = protocolor.hasAlpha()
33964 # ? protocolor.getAlpha().getValue()
33965 # : 1.0;
33966 #
33967 # return new java.awt.Color(
33968 # protocolor.getRed(),
33969 # protocolor.getGreen(),
33970 # protocolor.getBlue(),
33971 # alpha);
33972 # }
33973 #
33974 # public static Color toProto(java.awt.Color color) {
33975 # float red = (float) color.getRed();
33976 # float green = (float) color.getGreen();
33977 # float blue = (float) color.getBlue();
33978 # float denominator = 255.0;
33979 # Color.Builder resultBuilder =
33980 # Color
33981 # .newBuilder()
33982 # .setRed(red / denominator)
33983 # .setGreen(green / denominator)
33984 # .setBlue(blue / denominator);
33985 # int alpha = color.getAlpha();
33986 # if (alpha != 255) {
33987 # result.setAlpha(
33988 # FloatValue
33989 # .newBuilder()
33990 # .setValue(((float) alpha) / denominator)
33991 # .build());
33992 # }
33993 # return resultBuilder.build();
33994 # }
33995 # // ...
33996 #
33997 # Example (iOS / Obj-C):
33998 #
33999 # // ...
34000 # static UIColor* fromProto(Color* protocolor) {
34001 # float red = [protocolor red];
34002 # float green = [protocolor green];
34003 # float blue = [protocolor blue];
34004 # FloatValue* alpha_wrapper = [protocolor alpha];
34005 # float alpha = 1.0;
34006 # if (alpha_wrapper != nil) {
34007 # alpha = [alpha_wrapper value];
34008 # }
34009 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34010 # }
34011 #
34012 # static Color* toProto(UIColor* color) {
34013 # CGFloat red, green, blue, alpha;
34014 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34015 # return nil;
34016 # }
34017 # Color* result = [Color alloc] init];
34018 # [result setRed:red];
34019 # [result setGreen:green];
34020 # [result setBlue:blue];
34021 # if (alpha <= 0.9999) {
34022 # [result setAlpha:floatWrapperWithValue(alpha)];
34023 # }
34024 # [result autorelease];
34025 # return result;
34026 # }
34027 # // ...
34028 #
34029 # Example (JavaScript):
34030 #
34031 # // ...
34032 #
34033 # var protoToCssColor = function(rgb_color) {
34034 # var redFrac = rgb_color.red || 0.0;
34035 # var greenFrac = rgb_color.green || 0.0;
34036 # var blueFrac = rgb_color.blue || 0.0;
34037 # var red = Math.floor(redFrac * 255);
34038 # var green = Math.floor(greenFrac * 255);
34039 # var blue = Math.floor(blueFrac * 255);
34040 #
34041 # if (!('alpha' in rgb_color)) {
34042 # return rgbToCssColor_(red, green, blue);
34043 # }
34044 #
34045 # var alphaFrac = rgb_color.alpha.value || 0.0;
34046 # var rgbParams = [red, green, blue].join(',');
34047 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34048 # };
34049 #
34050 # var rgbToCssColor_ = function(red, green, blue) {
34051 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34052 # var hexString = rgbNumber.toString(16);
34053 # var missingZeros = 6 - hexString.length;
34054 # var resultBuilder = ['#'];
34055 # for (var i = 0; i < missingZeros; i++) {
34056 # resultBuilder.push('0');
34057 # }
34058 # resultBuilder.push(hexString);
34059 # return resultBuilder.join('');
34060 # };
34061 #
34062 # // ...
34063 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34064 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34065 # the final pixel color is defined by the equation:
34066 #
34067 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34068 #
34069 # This means that a value of 1.0 corresponds to a solid color, whereas
34070 # a value of 0.0 corresponds to a completely transparent color. This
34071 # uses a wrapper message rather than a simple float scalar so that it is
34072 # possible to distinguish between a default value and the value being unset.
34073 # If omitted, this color object is to be rendered as a solid color
34074 # (as if the alpha value had been explicitly given with a value of 1.0).
34075 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34076 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34077 },
34078 "width": 42, # The width of the border, in pixels.
34079 # Deprecated; the width is determined by the "style" field.
34080 "style": "A String", # The style of the border.
34081 },
34082 "bottom": { # A border along a cell. # The bottom border of the cell.
34083 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
34084 # for simplicity of conversion to/from color representations in various
34085 # languages over compactness; for example, the fields of this representation
34086 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34087 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34088 # method in iOS; and, with just a little work, it can be easily formatted into
34089 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34090 #
34091 # Example (Java):
34092 #
34093 # import com.google.type.Color;
34094 #
34095 # // ...
34096 # public static java.awt.Color fromProto(Color protocolor) {
34097 # float alpha = protocolor.hasAlpha()
34098 # ? protocolor.getAlpha().getValue()
34099 # : 1.0;
34100 #
34101 # return new java.awt.Color(
34102 # protocolor.getRed(),
34103 # protocolor.getGreen(),
34104 # protocolor.getBlue(),
34105 # alpha);
34106 # }
34107 #
34108 # public static Color toProto(java.awt.Color color) {
34109 # float red = (float) color.getRed();
34110 # float green = (float) color.getGreen();
34111 # float blue = (float) color.getBlue();
34112 # float denominator = 255.0;
34113 # Color.Builder resultBuilder =
34114 # Color
34115 # .newBuilder()
34116 # .setRed(red / denominator)
34117 # .setGreen(green / denominator)
34118 # .setBlue(blue / denominator);
34119 # int alpha = color.getAlpha();
34120 # if (alpha != 255) {
34121 # result.setAlpha(
34122 # FloatValue
34123 # .newBuilder()
34124 # .setValue(((float) alpha) / denominator)
34125 # .build());
34126 # }
34127 # return resultBuilder.build();
34128 # }
34129 # // ...
34130 #
34131 # Example (iOS / Obj-C):
34132 #
34133 # // ...
34134 # static UIColor* fromProto(Color* protocolor) {
34135 # float red = [protocolor red];
34136 # float green = [protocolor green];
34137 # float blue = [protocolor blue];
34138 # FloatValue* alpha_wrapper = [protocolor alpha];
34139 # float alpha = 1.0;
34140 # if (alpha_wrapper != nil) {
34141 # alpha = [alpha_wrapper value];
34142 # }
34143 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34144 # }
34145 #
34146 # static Color* toProto(UIColor* color) {
34147 # CGFloat red, green, blue, alpha;
34148 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34149 # return nil;
34150 # }
34151 # Color* result = [Color alloc] init];
34152 # [result setRed:red];
34153 # [result setGreen:green];
34154 # [result setBlue:blue];
34155 # if (alpha <= 0.9999) {
34156 # [result setAlpha:floatWrapperWithValue(alpha)];
34157 # }
34158 # [result autorelease];
34159 # return result;
34160 # }
34161 # // ...
34162 #
34163 # Example (JavaScript):
34164 #
34165 # // ...
34166 #
34167 # var protoToCssColor = function(rgb_color) {
34168 # var redFrac = rgb_color.red || 0.0;
34169 # var greenFrac = rgb_color.green || 0.0;
34170 # var blueFrac = rgb_color.blue || 0.0;
34171 # var red = Math.floor(redFrac * 255);
34172 # var green = Math.floor(greenFrac * 255);
34173 # var blue = Math.floor(blueFrac * 255);
34174 #
34175 # if (!('alpha' in rgb_color)) {
34176 # return rgbToCssColor_(red, green, blue);
34177 # }
34178 #
34179 # var alphaFrac = rgb_color.alpha.value || 0.0;
34180 # var rgbParams = [red, green, blue].join(',');
34181 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34182 # };
34183 #
34184 # var rgbToCssColor_ = function(red, green, blue) {
34185 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34186 # var hexString = rgbNumber.toString(16);
34187 # var missingZeros = 6 - hexString.length;
34188 # var resultBuilder = ['#'];
34189 # for (var i = 0; i < missingZeros; i++) {
34190 # resultBuilder.push('0');
34191 # }
34192 # resultBuilder.push(hexString);
34193 # return resultBuilder.join('');
34194 # };
34195 #
34196 # // ...
34197 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34198 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34199 # the final pixel color is defined by the equation:
34200 #
34201 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34202 #
34203 # This means that a value of 1.0 corresponds to a solid color, whereas
34204 # a value of 0.0 corresponds to a completely transparent color. This
34205 # uses a wrapper message rather than a simple float scalar so that it is
34206 # possible to distinguish between a default value and the value being unset.
34207 # If omitted, this color object is to be rendered as a solid color
34208 # (as if the alpha value had been explicitly given with a value of 1.0).
34209 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34210 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34211 },
34212 "width": 42, # The width of the border, in pixels.
34213 # Deprecated; the width is determined by the "style" field.
34214 "style": "A String", # The style of the border.
34215 },
34216 "left": { # A border along a cell. # The left border of the cell.
34217 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
34218 # for simplicity of conversion to/from color representations in various
34219 # languages over compactness; for example, the fields of this representation
34220 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34221 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34222 # method in iOS; and, with just a little work, it can be easily formatted into
34223 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34224 #
34225 # Example (Java):
34226 #
34227 # import com.google.type.Color;
34228 #
34229 # // ...
34230 # public static java.awt.Color fromProto(Color protocolor) {
34231 # float alpha = protocolor.hasAlpha()
34232 # ? protocolor.getAlpha().getValue()
34233 # : 1.0;
34234 #
34235 # return new java.awt.Color(
34236 # protocolor.getRed(),
34237 # protocolor.getGreen(),
34238 # protocolor.getBlue(),
34239 # alpha);
34240 # }
34241 #
34242 # public static Color toProto(java.awt.Color color) {
34243 # float red = (float) color.getRed();
34244 # float green = (float) color.getGreen();
34245 # float blue = (float) color.getBlue();
34246 # float denominator = 255.0;
34247 # Color.Builder resultBuilder =
34248 # Color
34249 # .newBuilder()
34250 # .setRed(red / denominator)
34251 # .setGreen(green / denominator)
34252 # .setBlue(blue / denominator);
34253 # int alpha = color.getAlpha();
34254 # if (alpha != 255) {
34255 # result.setAlpha(
34256 # FloatValue
34257 # .newBuilder()
34258 # .setValue(((float) alpha) / denominator)
34259 # .build());
34260 # }
34261 # return resultBuilder.build();
34262 # }
34263 # // ...
34264 #
34265 # Example (iOS / Obj-C):
34266 #
34267 # // ...
34268 # static UIColor* fromProto(Color* protocolor) {
34269 # float red = [protocolor red];
34270 # float green = [protocolor green];
34271 # float blue = [protocolor blue];
34272 # FloatValue* alpha_wrapper = [protocolor alpha];
34273 # float alpha = 1.0;
34274 # if (alpha_wrapper != nil) {
34275 # alpha = [alpha_wrapper value];
34276 # }
34277 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34278 # }
34279 #
34280 # static Color* toProto(UIColor* color) {
34281 # CGFloat red, green, blue, alpha;
34282 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34283 # return nil;
34284 # }
34285 # Color* result = [Color alloc] init];
34286 # [result setRed:red];
34287 # [result setGreen:green];
34288 # [result setBlue:blue];
34289 # if (alpha <= 0.9999) {
34290 # [result setAlpha:floatWrapperWithValue(alpha)];
34291 # }
34292 # [result autorelease];
34293 # return result;
34294 # }
34295 # // ...
34296 #
34297 # Example (JavaScript):
34298 #
34299 # // ...
34300 #
34301 # var protoToCssColor = function(rgb_color) {
34302 # var redFrac = rgb_color.red || 0.0;
34303 # var greenFrac = rgb_color.green || 0.0;
34304 # var blueFrac = rgb_color.blue || 0.0;
34305 # var red = Math.floor(redFrac * 255);
34306 # var green = Math.floor(greenFrac * 255);
34307 # var blue = Math.floor(blueFrac * 255);
34308 #
34309 # if (!('alpha' in rgb_color)) {
34310 # return rgbToCssColor_(red, green, blue);
34311 # }
34312 #
34313 # var alphaFrac = rgb_color.alpha.value || 0.0;
34314 # var rgbParams = [red, green, blue].join(',');
34315 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34316 # };
34317 #
34318 # var rgbToCssColor_ = function(red, green, blue) {
34319 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34320 # var hexString = rgbNumber.toString(16);
34321 # var missingZeros = 6 - hexString.length;
34322 # var resultBuilder = ['#'];
34323 # for (var i = 0; i < missingZeros; i++) {
34324 # resultBuilder.push('0');
34325 # }
34326 # resultBuilder.push(hexString);
34327 # return resultBuilder.join('');
34328 # };
34329 #
34330 # // ...
34331 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34332 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34333 # the final pixel color is defined by the equation:
34334 #
34335 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34336 #
34337 # This means that a value of 1.0 corresponds to a solid color, whereas
34338 # a value of 0.0 corresponds to a completely transparent color. This
34339 # uses a wrapper message rather than a simple float scalar so that it is
34340 # possible to distinguish between a default value and the value being unset.
34341 # If omitted, this color object is to be rendered as a solid color
34342 # (as if the alpha value had been explicitly given with a value of 1.0).
34343 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34344 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34345 },
34346 "width": 42, # The width of the border, in pixels.
34347 # Deprecated; the width is determined by the "style" field.
34348 "style": "A String", # The style of the border.
34349 },
34350 },
34351 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
34352 },
34353 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
34354 #
34355 # When writing, the new data validation rule will overwrite any prior rule.
34356 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
34357 # If true, "List" conditions will show a dropdown.
34358 "strict": True or False, # True if invalid data should be rejected.
34359 "inputMessage": "A String", # A message to show the user when adding data to the cell.
34360 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
34361 # BooleanConditions are used by conditional formatting,
34362 # data validation, and the criteria in filters.
34363 "type": "A String", # The type of condition.
34364 "values": [ # The values of the condition. The number of supported values depends
34365 # on the condition type. Some support zero values,
34366 # others one or two values,
34367 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
34368 { # The value of the condition.
34369 "relativeDate": "A String", # A relative date (based on the current date).
34370 # Valid only if the type is
34371 # DATE_BEFORE,
34372 # DATE_AFTER,
34373 # DATE_ON_OR_BEFORE or
34374 # DATE_ON_OR_AFTER.
34375 #
34376 # Relative dates are not supported in data validation.
34377 # They are supported only in conditional formatting and
34378 # conditional filters.
34379 "userEnteredValue": "A String", # A value the condition is based on.
34380 # The value will be parsed as if the user typed into a cell.
34381 # Formulas are supported (and must begin with an `=`).
34382 },
34383 ],
34384 },
34385 },
34386 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
34387 # on user entered strings, not formulas, bools, or numbers.
34388 # Runs start at specific indexes in the text and continue until the next
34389 # run. Properties of a run will continue unless explicitly changed
34390 # in a subsequent run (and properties of the first run will continue
34391 # the properties of the cell unless explicitly changed).
34392 #
34393 # When writing, the new runs will overwrite any prior runs. When writing a
34394 # new user_entered_value, previous runs will be erased.
34395 { # A run of a text format. The format of this run continues until the start
34396 # index of the next run.
34397 # When updating, all fields must be set.
34398 "startIndex": 42, # The character index where this run starts.
34399 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
34400 # Absent values indicate that the field isn't specified.
34401 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
34402 # for simplicity of conversion to/from color representations in various
34403 # languages over compactness; for example, the fields of this representation
34404 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34405 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34406 # method in iOS; and, with just a little work, it can be easily formatted into
34407 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34408 #
34409 # Example (Java):
34410 #
34411 # import com.google.type.Color;
34412 #
34413 # // ...
34414 # public static java.awt.Color fromProto(Color protocolor) {
34415 # float alpha = protocolor.hasAlpha()
34416 # ? protocolor.getAlpha().getValue()
34417 # : 1.0;
34418 #
34419 # return new java.awt.Color(
34420 # protocolor.getRed(),
34421 # protocolor.getGreen(),
34422 # protocolor.getBlue(),
34423 # alpha);
34424 # }
34425 #
34426 # public static Color toProto(java.awt.Color color) {
34427 # float red = (float) color.getRed();
34428 # float green = (float) color.getGreen();
34429 # float blue = (float) color.getBlue();
34430 # float denominator = 255.0;
34431 # Color.Builder resultBuilder =
34432 # Color
34433 # .newBuilder()
34434 # .setRed(red / denominator)
34435 # .setGreen(green / denominator)
34436 # .setBlue(blue / denominator);
34437 # int alpha = color.getAlpha();
34438 # if (alpha != 255) {
34439 # result.setAlpha(
34440 # FloatValue
34441 # .newBuilder()
34442 # .setValue(((float) alpha) / denominator)
34443 # .build());
34444 # }
34445 # return resultBuilder.build();
34446 # }
34447 # // ...
34448 #
34449 # Example (iOS / Obj-C):
34450 #
34451 # // ...
34452 # static UIColor* fromProto(Color* protocolor) {
34453 # float red = [protocolor red];
34454 # float green = [protocolor green];
34455 # float blue = [protocolor blue];
34456 # FloatValue* alpha_wrapper = [protocolor alpha];
34457 # float alpha = 1.0;
34458 # if (alpha_wrapper != nil) {
34459 # alpha = [alpha_wrapper value];
34460 # }
34461 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34462 # }
34463 #
34464 # static Color* toProto(UIColor* color) {
34465 # CGFloat red, green, blue, alpha;
34466 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34467 # return nil;
34468 # }
34469 # Color* result = [Color alloc] init];
34470 # [result setRed:red];
34471 # [result setGreen:green];
34472 # [result setBlue:blue];
34473 # if (alpha <= 0.9999) {
34474 # [result setAlpha:floatWrapperWithValue(alpha)];
34475 # }
34476 # [result autorelease];
34477 # return result;
34478 # }
34479 # // ...
34480 #
34481 # Example (JavaScript):
34482 #
34483 # // ...
34484 #
34485 # var protoToCssColor = function(rgb_color) {
34486 # var redFrac = rgb_color.red || 0.0;
34487 # var greenFrac = rgb_color.green || 0.0;
34488 # var blueFrac = rgb_color.blue || 0.0;
34489 # var red = Math.floor(redFrac * 255);
34490 # var green = Math.floor(greenFrac * 255);
34491 # var blue = Math.floor(blueFrac * 255);
34492 #
34493 # if (!('alpha' in rgb_color)) {
34494 # return rgbToCssColor_(red, green, blue);
34495 # }
34496 #
34497 # var alphaFrac = rgb_color.alpha.value || 0.0;
34498 # var rgbParams = [red, green, blue].join(',');
34499 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34500 # };
34501 #
34502 # var rgbToCssColor_ = function(red, green, blue) {
34503 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34504 # var hexString = rgbNumber.toString(16);
34505 # var missingZeros = 6 - hexString.length;
34506 # var resultBuilder = ['#'];
34507 # for (var i = 0; i < missingZeros; i++) {
34508 # resultBuilder.push('0');
34509 # }
34510 # resultBuilder.push(hexString);
34511 # return resultBuilder.join('');
34512 # };
34513 #
34514 # // ...
34515 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34516 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34517 # the final pixel color is defined by the equation:
34518 #
34519 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34520 #
34521 # This means that a value of 1.0 corresponds to a solid color, whereas
34522 # a value of 0.0 corresponds to a completely transparent color. This
34523 # uses a wrapper message rather than a simple float scalar so that it is
34524 # possible to distinguish between a default value and the value being unset.
34525 # If omitted, this color object is to be rendered as a solid color
34526 # (as if the alpha value had been explicitly given with a value of 1.0).
34527 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34528 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34529 },
34530 "bold": True or False, # True if the text is bold.
34531 "strikethrough": True or False, # True if the text has a strikethrough.
34532 "fontFamily": "A String", # The font family.
34533 "fontSize": 42, # The size of the font.
34534 "italic": True or False, # True if the text is italicized.
34535 "underline": True or False, # True if the text is underlined.
34536 },
34537 },
34538 ],
34539 },
34540 ],
34541 },
34542 ],
34543 },
34544 ],
34545 "properties": { # Properties of a sheet. # The properties of the sheet.
34546 "sheetType": "A String", # The type of sheet. Defaults to GRID.
34547 # This field cannot be changed once set.
34548 "index": 42, # The index of the sheet within the spreadsheet.
34549 # When adding or updating sheet properties, if this field
34550 # is excluded then the sheet will be added or moved to the end
34551 # of the sheet list. When updating sheet indices or inserting
34552 # sheets, movement is considered in "before the move" indexes.
34553 # For example, if there were 3 sheets (S1, S2, S3) in order to
34554 # move S1 ahead of S2 the index would have to be set to 2. A sheet
34555 # index update request will be ignored if the requested index is
34556 # identical to the sheets current index or if the requested new
34557 # index is equal to the current sheet index + 1.
34558 "title": "A String", # The name of the sheet.
34559 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
34560 # (If the sheet is an object sheet, containing a chart or image, then
34561 # this field will be absent.)
34562 # When writing it is an error to set any grid properties on non-grid sheets.
34563 "columnCount": 42, # The number of columns in the grid.
34564 "rowCount": 42, # The number of rows in the grid.
34565 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
34566 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
34567 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
34568 },
34569 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
34570 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
34571 # for simplicity of conversion to/from color representations in various
34572 # languages over compactness; for example, the fields of this representation
34573 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34574 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34575 # method in iOS; and, with just a little work, it can be easily formatted into
34576 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34577 #
34578 # Example (Java):
34579 #
34580 # import com.google.type.Color;
34581 #
34582 # // ...
34583 # public static java.awt.Color fromProto(Color protocolor) {
34584 # float alpha = protocolor.hasAlpha()
34585 # ? protocolor.getAlpha().getValue()
34586 # : 1.0;
34587 #
34588 # return new java.awt.Color(
34589 # protocolor.getRed(),
34590 # protocolor.getGreen(),
34591 # protocolor.getBlue(),
34592 # alpha);
34593 # }
34594 #
34595 # public static Color toProto(java.awt.Color color) {
34596 # float red = (float) color.getRed();
34597 # float green = (float) color.getGreen();
34598 # float blue = (float) color.getBlue();
34599 # float denominator = 255.0;
34600 # Color.Builder resultBuilder =
34601 # Color
34602 # .newBuilder()
34603 # .setRed(red / denominator)
34604 # .setGreen(green / denominator)
34605 # .setBlue(blue / denominator);
34606 # int alpha = color.getAlpha();
34607 # if (alpha != 255) {
34608 # result.setAlpha(
34609 # FloatValue
34610 # .newBuilder()
34611 # .setValue(((float) alpha) / denominator)
34612 # .build());
34613 # }
34614 # return resultBuilder.build();
34615 # }
34616 # // ...
34617 #
34618 # Example (iOS / Obj-C):
34619 #
34620 # // ...
34621 # static UIColor* fromProto(Color* protocolor) {
34622 # float red = [protocolor red];
34623 # float green = [protocolor green];
34624 # float blue = [protocolor blue];
34625 # FloatValue* alpha_wrapper = [protocolor alpha];
34626 # float alpha = 1.0;
34627 # if (alpha_wrapper != nil) {
34628 # alpha = [alpha_wrapper value];
34629 # }
34630 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34631 # }
34632 #
34633 # static Color* toProto(UIColor* color) {
34634 # CGFloat red, green, blue, alpha;
34635 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34636 # return nil;
34637 # }
34638 # Color* result = [Color alloc] init];
34639 # [result setRed:red];
34640 # [result setGreen:green];
34641 # [result setBlue:blue];
34642 # if (alpha <= 0.9999) {
34643 # [result setAlpha:floatWrapperWithValue(alpha)];
34644 # }
34645 # [result autorelease];
34646 # return result;
34647 # }
34648 # // ...
34649 #
34650 # Example (JavaScript):
34651 #
34652 # // ...
34653 #
34654 # var protoToCssColor = function(rgb_color) {
34655 # var redFrac = rgb_color.red || 0.0;
34656 # var greenFrac = rgb_color.green || 0.0;
34657 # var blueFrac = rgb_color.blue || 0.0;
34658 # var red = Math.floor(redFrac * 255);
34659 # var green = Math.floor(greenFrac * 255);
34660 # var blue = Math.floor(blueFrac * 255);
34661 #
34662 # if (!('alpha' in rgb_color)) {
34663 # return rgbToCssColor_(red, green, blue);
34664 # }
34665 #
34666 # var alphaFrac = rgb_color.alpha.value || 0.0;
34667 # var rgbParams = [red, green, blue].join(',');
34668 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34669 # };
34670 #
34671 # var rgbToCssColor_ = function(red, green, blue) {
34672 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34673 # var hexString = rgbNumber.toString(16);
34674 # var missingZeros = 6 - hexString.length;
34675 # var resultBuilder = ['#'];
34676 # for (var i = 0; i < missingZeros; i++) {
34677 # resultBuilder.push('0');
34678 # }
34679 # resultBuilder.push(hexString);
34680 # return resultBuilder.join('');
34681 # };
34682 #
34683 # // ...
34684 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34685 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34686 # the final pixel color is defined by the equation:
34687 #
34688 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34689 #
34690 # This means that a value of 1.0 corresponds to a solid color, whereas
34691 # a value of 0.0 corresponds to a completely transparent color. This
34692 # uses a wrapper message rather than a simple float scalar so that it is
34693 # possible to distinguish between a default value and the value being unset.
34694 # If omitted, this color object is to be rendered as a solid color
34695 # (as if the alpha value had been explicitly given with a value of 1.0).
34696 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34697 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34698 },
34699 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
34700 "sheetId": 42, # The ID of the sheet. Must be non-negative.
34701 # This field cannot be changed once set.
34702 },
34703 },
34704 ],
34705 "spreadsheetUrl": "A String", # The url of the spreadsheet.
34706 # This field is read-only.
34707}
34708
34709 x__xgafv: string, V1 error format.
34710 Allowed values
34711 1 - v1 error format
34712 2 - v2 error format
34713
34714Returns:
34715 An object of the form:
34716
34717 { # Resource that represents a spreadsheet.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034718 "spreadsheetId": "A String", # The ID of the spreadsheet.
34719 # This field is read-only.
34720 "namedRanges": [ # The named ranges defined in a spreadsheet.
34721 { # A named range.
34722 "namedRangeId": "A String", # The ID of the named range.
34723 "range": { # A range on a sheet. # The range this represents.
34724 # All indexes are zero-based.
34725 # Indexes are half open, e.g the start index is inclusive
34726 # and the end index is exclusive -- [start_index, end_index).
34727 # Missing indexes indicate the range is unbounded on that side.
34728 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034729 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034730 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034731 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034732 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034733 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034734 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034735 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034736 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034737 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034738 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034739 # `Sheet1!A:B == sheet_id: 0,
34740 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034741 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034742 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034743 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034744 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034745 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034746 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034747 #
34748 # The start index must always be less than or equal to the end index.
34749 # If the start index equals the end index, then the range is empty.
34750 # Empty ranges are typically not meaningful and are usually rendered in the
34751 # UI as `#REF!`.
34752 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
34753 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
34754 "sheetId": 42, # The sheet this range is on.
34755 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
34756 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
34757 },
34758 "name": "A String", # The name of the named range.
34759 },
34760 ],
34761 "properties": { # Properties of a spreadsheet. # Overall properties of a spreadsheet.
34762 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034763 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034764 # * an ISO 639-1 language code such as `en`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034765 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034766 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034767 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034768 # * a combination of the ISO language code and country code, such as `en_US`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034769 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034770 # Note: when updating this field, not all locales/languages are supported.
34771 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
34772 # `America/New_York`. If the time zone isn't recognized, this may
34773 # be a custom time zone such as `GMT-07:00`.
34774 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
34775 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034776 # CellData.effectiveFormat will not be set if the
34777 # cell's format is equal to this default format.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034778 # This field is read-only.
34779 "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 -070034780 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
34781 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070034782 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
34783 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034784 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034785 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034786 },
34787 "textDirection": "A String", # The direction of the text in the cell.
34788 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
34789 # When updating padding, every field must be specified.
34790 "top": 42, # The top padding of the cell.
34791 "right": 42, # The right padding of the cell.
34792 "bottom": 42, # The bottom padding of the cell.
34793 "left": 42, # The left padding of the cell.
34794 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034795 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034796 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
34797 # for simplicity of conversion to/from color representations in various
34798 # languages over compactness; for example, the fields of this representation
34799 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34800 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34801 # method in iOS; and, with just a little work, it can be easily formatted into
34802 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34803 #
34804 # Example (Java):
34805 #
34806 # import com.google.type.Color;
34807 #
34808 # // ...
34809 # public static java.awt.Color fromProto(Color protocolor) {
34810 # float alpha = protocolor.hasAlpha()
34811 # ? protocolor.getAlpha().getValue()
34812 # : 1.0;
34813 #
34814 # return new java.awt.Color(
34815 # protocolor.getRed(),
34816 # protocolor.getGreen(),
34817 # protocolor.getBlue(),
34818 # alpha);
34819 # }
34820 #
34821 # public static Color toProto(java.awt.Color color) {
34822 # float red = (float) color.getRed();
34823 # float green = (float) color.getGreen();
34824 # float blue = (float) color.getBlue();
34825 # float denominator = 255.0;
34826 # Color.Builder resultBuilder =
34827 # Color
34828 # .newBuilder()
34829 # .setRed(red / denominator)
34830 # .setGreen(green / denominator)
34831 # .setBlue(blue / denominator);
34832 # int alpha = color.getAlpha();
34833 # if (alpha != 255) {
34834 # result.setAlpha(
34835 # FloatValue
34836 # .newBuilder()
34837 # .setValue(((float) alpha) / denominator)
34838 # .build());
34839 # }
34840 # return resultBuilder.build();
34841 # }
34842 # // ...
34843 #
34844 # Example (iOS / Obj-C):
34845 #
34846 # // ...
34847 # static UIColor* fromProto(Color* protocolor) {
34848 # float red = [protocolor red];
34849 # float green = [protocolor green];
34850 # float blue = [protocolor blue];
34851 # FloatValue* alpha_wrapper = [protocolor alpha];
34852 # float alpha = 1.0;
34853 # if (alpha_wrapper != nil) {
34854 # alpha = [alpha_wrapper value];
34855 # }
34856 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34857 # }
34858 #
34859 # static Color* toProto(UIColor* color) {
34860 # CGFloat red, green, blue, alpha;
34861 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34862 # return nil;
34863 # }
34864 # Color* result = [Color alloc] init];
34865 # [result setRed:red];
34866 # [result setGreen:green];
34867 # [result setBlue:blue];
34868 # if (alpha <= 0.9999) {
34869 # [result setAlpha:floatWrapperWithValue(alpha)];
34870 # }
34871 # [result autorelease];
34872 # return result;
34873 # }
34874 # // ...
34875 #
34876 # Example (JavaScript):
34877 #
34878 # // ...
34879 #
34880 # var protoToCssColor = function(rgb_color) {
34881 # var redFrac = rgb_color.red || 0.0;
34882 # var greenFrac = rgb_color.green || 0.0;
34883 # var blueFrac = rgb_color.blue || 0.0;
34884 # var red = Math.floor(redFrac * 255);
34885 # var green = Math.floor(greenFrac * 255);
34886 # var blue = Math.floor(blueFrac * 255);
34887 #
34888 # if (!('alpha' in rgb_color)) {
34889 # return rgbToCssColor_(red, green, blue);
34890 # }
34891 #
34892 # var alphaFrac = rgb_color.alpha.value || 0.0;
34893 # var rgbParams = [red, green, blue].join(',');
34894 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34895 # };
34896 #
34897 # var rgbToCssColor_ = function(red, green, blue) {
34898 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34899 # var hexString = rgbNumber.toString(16);
34900 # var missingZeros = 6 - hexString.length;
34901 # var resultBuilder = ['#'];
34902 # for (var i = 0; i < missingZeros; i++) {
34903 # resultBuilder.push('0');
34904 # }
34905 # resultBuilder.push(hexString);
34906 # return resultBuilder.join('');
34907 # };
34908 #
34909 # // ...
34910 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34911 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34912 # the final pixel color is defined by the equation:
34913 #
34914 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34915 #
34916 # This means that a value of 1.0 corresponds to a solid color, whereas
34917 # a value of 0.0 corresponds to a completely transparent color. This
34918 # uses a wrapper message rather than a simple float scalar so that it is
34919 # possible to distinguish between a default value and the value being unset.
34920 # If omitted, this color object is to be rendered as a solid color
34921 # (as if the alpha value had been explicitly given with a value of 1.0).
34922 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34923 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34924 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070034925 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070034926 "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).
34927 # Absent values indicate that the field isn't specified.
34928 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
34929 # for simplicity of conversion to/from color representations in various
34930 # languages over compactness; for example, the fields of this representation
34931 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34932 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34933 # method in iOS; and, with just a little work, it can be easily formatted into
34934 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34935 #
34936 # Example (Java):
34937 #
34938 # import com.google.type.Color;
34939 #
34940 # // ...
34941 # public static java.awt.Color fromProto(Color protocolor) {
34942 # float alpha = protocolor.hasAlpha()
34943 # ? protocolor.getAlpha().getValue()
34944 # : 1.0;
34945 #
34946 # return new java.awt.Color(
34947 # protocolor.getRed(),
34948 # protocolor.getGreen(),
34949 # protocolor.getBlue(),
34950 # alpha);
34951 # }
34952 #
34953 # public static Color toProto(java.awt.Color color) {
34954 # float red = (float) color.getRed();
34955 # float green = (float) color.getGreen();
34956 # float blue = (float) color.getBlue();
34957 # float denominator = 255.0;
34958 # Color.Builder resultBuilder =
34959 # Color
34960 # .newBuilder()
34961 # .setRed(red / denominator)
34962 # .setGreen(green / denominator)
34963 # .setBlue(blue / denominator);
34964 # int alpha = color.getAlpha();
34965 # if (alpha != 255) {
34966 # result.setAlpha(
34967 # FloatValue
34968 # .newBuilder()
34969 # .setValue(((float) alpha) / denominator)
34970 # .build());
34971 # }
34972 # return resultBuilder.build();
34973 # }
34974 # // ...
34975 #
34976 # Example (iOS / Obj-C):
34977 #
34978 # // ...
34979 # static UIColor* fromProto(Color* protocolor) {
34980 # float red = [protocolor red];
34981 # float green = [protocolor green];
34982 # float blue = [protocolor blue];
34983 # FloatValue* alpha_wrapper = [protocolor alpha];
34984 # float alpha = 1.0;
34985 # if (alpha_wrapper != nil) {
34986 # alpha = [alpha_wrapper value];
34987 # }
34988 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34989 # }
34990 #
34991 # static Color* toProto(UIColor* color) {
34992 # CGFloat red, green, blue, alpha;
34993 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34994 # return nil;
34995 # }
34996 # Color* result = [Color alloc] init];
34997 # [result setRed:red];
34998 # [result setGreen:green];
34999 # [result setBlue:blue];
35000 # if (alpha <= 0.9999) {
35001 # [result setAlpha:floatWrapperWithValue(alpha)];
35002 # }
35003 # [result autorelease];
35004 # return result;
35005 # }
35006 # // ...
35007 #
35008 # Example (JavaScript):
35009 #
35010 # // ...
35011 #
35012 # var protoToCssColor = function(rgb_color) {
35013 # var redFrac = rgb_color.red || 0.0;
35014 # var greenFrac = rgb_color.green || 0.0;
35015 # var blueFrac = rgb_color.blue || 0.0;
35016 # var red = Math.floor(redFrac * 255);
35017 # var green = Math.floor(greenFrac * 255);
35018 # var blue = Math.floor(blueFrac * 255);
35019 #
35020 # if (!('alpha' in rgb_color)) {
35021 # return rgbToCssColor_(red, green, blue);
35022 # }
35023 #
35024 # var alphaFrac = rgb_color.alpha.value || 0.0;
35025 # var rgbParams = [red, green, blue].join(',');
35026 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35027 # };
35028 #
35029 # var rgbToCssColor_ = function(red, green, blue) {
35030 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35031 # var hexString = rgbNumber.toString(16);
35032 # var missingZeros = 6 - hexString.length;
35033 # var resultBuilder = ['#'];
35034 # for (var i = 0; i < missingZeros; i++) {
35035 # resultBuilder.push('0');
35036 # }
35037 # resultBuilder.push(hexString);
35038 # return resultBuilder.join('');
35039 # };
35040 #
35041 # // ...
35042 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35043 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35044 # the final pixel color is defined by the equation:
35045 #
35046 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35047 #
35048 # This means that a value of 1.0 corresponds to a solid color, whereas
35049 # a value of 0.0 corresponds to a completely transparent color. This
35050 # uses a wrapper message rather than a simple float scalar so that it is
35051 # possible to distinguish between a default value and the value being unset.
35052 # If omitted, this color object is to be rendered as a solid color
35053 # (as if the alpha value had been explicitly given with a value of 1.0).
35054 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35055 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35056 },
35057 "bold": True or False, # True if the text is bold.
35058 "strikethrough": True or False, # True if the text has a strikethrough.
35059 "fontFamily": "A String", # The font family.
35060 "fontSize": 42, # The size of the font.
35061 "italic": True or False, # True if the text is italicized.
35062 "underline": True or False, # True if the text is underlined.
35063 },
35064 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
35065 "borders": { # The borders of the cell. # The borders of the cell.
35066 "top": { # A border along a cell. # The top border of the cell.
35067 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
35068 # for simplicity of conversion to/from color representations in various
35069 # languages over compactness; for example, the fields of this representation
35070 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35071 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35072 # method in iOS; and, with just a little work, it can be easily formatted into
35073 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35074 #
35075 # Example (Java):
35076 #
35077 # import com.google.type.Color;
35078 #
35079 # // ...
35080 # public static java.awt.Color fromProto(Color protocolor) {
35081 # float alpha = protocolor.hasAlpha()
35082 # ? protocolor.getAlpha().getValue()
35083 # : 1.0;
35084 #
35085 # return new java.awt.Color(
35086 # protocolor.getRed(),
35087 # protocolor.getGreen(),
35088 # protocolor.getBlue(),
35089 # alpha);
35090 # }
35091 #
35092 # public static Color toProto(java.awt.Color color) {
35093 # float red = (float) color.getRed();
35094 # float green = (float) color.getGreen();
35095 # float blue = (float) color.getBlue();
35096 # float denominator = 255.0;
35097 # Color.Builder resultBuilder =
35098 # Color
35099 # .newBuilder()
35100 # .setRed(red / denominator)
35101 # .setGreen(green / denominator)
35102 # .setBlue(blue / denominator);
35103 # int alpha = color.getAlpha();
35104 # if (alpha != 255) {
35105 # result.setAlpha(
35106 # FloatValue
35107 # .newBuilder()
35108 # .setValue(((float) alpha) / denominator)
35109 # .build());
35110 # }
35111 # return resultBuilder.build();
35112 # }
35113 # // ...
35114 #
35115 # Example (iOS / Obj-C):
35116 #
35117 # // ...
35118 # static UIColor* fromProto(Color* protocolor) {
35119 # float red = [protocolor red];
35120 # float green = [protocolor green];
35121 # float blue = [protocolor blue];
35122 # FloatValue* alpha_wrapper = [protocolor alpha];
35123 # float alpha = 1.0;
35124 # if (alpha_wrapper != nil) {
35125 # alpha = [alpha_wrapper value];
35126 # }
35127 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35128 # }
35129 #
35130 # static Color* toProto(UIColor* color) {
35131 # CGFloat red, green, blue, alpha;
35132 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35133 # return nil;
35134 # }
35135 # Color* result = [Color alloc] init];
35136 # [result setRed:red];
35137 # [result setGreen:green];
35138 # [result setBlue:blue];
35139 # if (alpha <= 0.9999) {
35140 # [result setAlpha:floatWrapperWithValue(alpha)];
35141 # }
35142 # [result autorelease];
35143 # return result;
35144 # }
35145 # // ...
35146 #
35147 # Example (JavaScript):
35148 #
35149 # // ...
35150 #
35151 # var protoToCssColor = function(rgb_color) {
35152 # var redFrac = rgb_color.red || 0.0;
35153 # var greenFrac = rgb_color.green || 0.0;
35154 # var blueFrac = rgb_color.blue || 0.0;
35155 # var red = Math.floor(redFrac * 255);
35156 # var green = Math.floor(greenFrac * 255);
35157 # var blue = Math.floor(blueFrac * 255);
35158 #
35159 # if (!('alpha' in rgb_color)) {
35160 # return rgbToCssColor_(red, green, blue);
35161 # }
35162 #
35163 # var alphaFrac = rgb_color.alpha.value || 0.0;
35164 # var rgbParams = [red, green, blue].join(',');
35165 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35166 # };
35167 #
35168 # var rgbToCssColor_ = function(red, green, blue) {
35169 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35170 # var hexString = rgbNumber.toString(16);
35171 # var missingZeros = 6 - hexString.length;
35172 # var resultBuilder = ['#'];
35173 # for (var i = 0; i < missingZeros; i++) {
35174 # resultBuilder.push('0');
35175 # }
35176 # resultBuilder.push(hexString);
35177 # return resultBuilder.join('');
35178 # };
35179 #
35180 # // ...
35181 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35182 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35183 # the final pixel color is defined by the equation:
35184 #
35185 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35186 #
35187 # This means that a value of 1.0 corresponds to a solid color, whereas
35188 # a value of 0.0 corresponds to a completely transparent color. This
35189 # uses a wrapper message rather than a simple float scalar so that it is
35190 # possible to distinguish between a default value and the value being unset.
35191 # If omitted, this color object is to be rendered as a solid color
35192 # (as if the alpha value had been explicitly given with a value of 1.0).
35193 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35194 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35195 },
35196 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070035197 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035198 "style": "A String", # The style of the border.
35199 },
35200 "right": { # A border along a cell. # The right border of the cell.
35201 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
35202 # for simplicity of conversion to/from color representations in various
35203 # languages over compactness; for example, the fields of this representation
35204 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35205 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35206 # method in iOS; and, with just a little work, it can be easily formatted into
35207 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35208 #
35209 # Example (Java):
35210 #
35211 # import com.google.type.Color;
35212 #
35213 # // ...
35214 # public static java.awt.Color fromProto(Color protocolor) {
35215 # float alpha = protocolor.hasAlpha()
35216 # ? protocolor.getAlpha().getValue()
35217 # : 1.0;
35218 #
35219 # return new java.awt.Color(
35220 # protocolor.getRed(),
35221 # protocolor.getGreen(),
35222 # protocolor.getBlue(),
35223 # alpha);
35224 # }
35225 #
35226 # public static Color toProto(java.awt.Color color) {
35227 # float red = (float) color.getRed();
35228 # float green = (float) color.getGreen();
35229 # float blue = (float) color.getBlue();
35230 # float denominator = 255.0;
35231 # Color.Builder resultBuilder =
35232 # Color
35233 # .newBuilder()
35234 # .setRed(red / denominator)
35235 # .setGreen(green / denominator)
35236 # .setBlue(blue / denominator);
35237 # int alpha = color.getAlpha();
35238 # if (alpha != 255) {
35239 # result.setAlpha(
35240 # FloatValue
35241 # .newBuilder()
35242 # .setValue(((float) alpha) / denominator)
35243 # .build());
35244 # }
35245 # return resultBuilder.build();
35246 # }
35247 # // ...
35248 #
35249 # Example (iOS / Obj-C):
35250 #
35251 # // ...
35252 # static UIColor* fromProto(Color* protocolor) {
35253 # float red = [protocolor red];
35254 # float green = [protocolor green];
35255 # float blue = [protocolor blue];
35256 # FloatValue* alpha_wrapper = [protocolor alpha];
35257 # float alpha = 1.0;
35258 # if (alpha_wrapper != nil) {
35259 # alpha = [alpha_wrapper value];
35260 # }
35261 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35262 # }
35263 #
35264 # static Color* toProto(UIColor* color) {
35265 # CGFloat red, green, blue, alpha;
35266 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35267 # return nil;
35268 # }
35269 # Color* result = [Color alloc] init];
35270 # [result setRed:red];
35271 # [result setGreen:green];
35272 # [result setBlue:blue];
35273 # if (alpha <= 0.9999) {
35274 # [result setAlpha:floatWrapperWithValue(alpha)];
35275 # }
35276 # [result autorelease];
35277 # return result;
35278 # }
35279 # // ...
35280 #
35281 # Example (JavaScript):
35282 #
35283 # // ...
35284 #
35285 # var protoToCssColor = function(rgb_color) {
35286 # var redFrac = rgb_color.red || 0.0;
35287 # var greenFrac = rgb_color.green || 0.0;
35288 # var blueFrac = rgb_color.blue || 0.0;
35289 # var red = Math.floor(redFrac * 255);
35290 # var green = Math.floor(greenFrac * 255);
35291 # var blue = Math.floor(blueFrac * 255);
35292 #
35293 # if (!('alpha' in rgb_color)) {
35294 # return rgbToCssColor_(red, green, blue);
35295 # }
35296 #
35297 # var alphaFrac = rgb_color.alpha.value || 0.0;
35298 # var rgbParams = [red, green, blue].join(',');
35299 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35300 # };
35301 #
35302 # var rgbToCssColor_ = function(red, green, blue) {
35303 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35304 # var hexString = rgbNumber.toString(16);
35305 # var missingZeros = 6 - hexString.length;
35306 # var resultBuilder = ['#'];
35307 # for (var i = 0; i < missingZeros; i++) {
35308 # resultBuilder.push('0');
35309 # }
35310 # resultBuilder.push(hexString);
35311 # return resultBuilder.join('');
35312 # };
35313 #
35314 # // ...
35315 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35316 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35317 # the final pixel color is defined by the equation:
35318 #
35319 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35320 #
35321 # This means that a value of 1.0 corresponds to a solid color, whereas
35322 # a value of 0.0 corresponds to a completely transparent color. This
35323 # uses a wrapper message rather than a simple float scalar so that it is
35324 # possible to distinguish between a default value and the value being unset.
35325 # If omitted, this color object is to be rendered as a solid color
35326 # (as if the alpha value had been explicitly given with a value of 1.0).
35327 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35328 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35329 },
35330 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070035331 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035332 "style": "A String", # The style of the border.
35333 },
35334 "bottom": { # A border along a cell. # The bottom border of the cell.
35335 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
35336 # for simplicity of conversion to/from color representations in various
35337 # languages over compactness; for example, the fields of this representation
35338 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35339 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35340 # method in iOS; and, with just a little work, it can be easily formatted into
35341 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35342 #
35343 # Example (Java):
35344 #
35345 # import com.google.type.Color;
35346 #
35347 # // ...
35348 # public static java.awt.Color fromProto(Color protocolor) {
35349 # float alpha = protocolor.hasAlpha()
35350 # ? protocolor.getAlpha().getValue()
35351 # : 1.0;
35352 #
35353 # return new java.awt.Color(
35354 # protocolor.getRed(),
35355 # protocolor.getGreen(),
35356 # protocolor.getBlue(),
35357 # alpha);
35358 # }
35359 #
35360 # public static Color toProto(java.awt.Color color) {
35361 # float red = (float) color.getRed();
35362 # float green = (float) color.getGreen();
35363 # float blue = (float) color.getBlue();
35364 # float denominator = 255.0;
35365 # Color.Builder resultBuilder =
35366 # Color
35367 # .newBuilder()
35368 # .setRed(red / denominator)
35369 # .setGreen(green / denominator)
35370 # .setBlue(blue / denominator);
35371 # int alpha = color.getAlpha();
35372 # if (alpha != 255) {
35373 # result.setAlpha(
35374 # FloatValue
35375 # .newBuilder()
35376 # .setValue(((float) alpha) / denominator)
35377 # .build());
35378 # }
35379 # return resultBuilder.build();
35380 # }
35381 # // ...
35382 #
35383 # Example (iOS / Obj-C):
35384 #
35385 # // ...
35386 # static UIColor* fromProto(Color* protocolor) {
35387 # float red = [protocolor red];
35388 # float green = [protocolor green];
35389 # float blue = [protocolor blue];
35390 # FloatValue* alpha_wrapper = [protocolor alpha];
35391 # float alpha = 1.0;
35392 # if (alpha_wrapper != nil) {
35393 # alpha = [alpha_wrapper value];
35394 # }
35395 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35396 # }
35397 #
35398 # static Color* toProto(UIColor* color) {
35399 # CGFloat red, green, blue, alpha;
35400 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35401 # return nil;
35402 # }
35403 # Color* result = [Color alloc] init];
35404 # [result setRed:red];
35405 # [result setGreen:green];
35406 # [result setBlue:blue];
35407 # if (alpha <= 0.9999) {
35408 # [result setAlpha:floatWrapperWithValue(alpha)];
35409 # }
35410 # [result autorelease];
35411 # return result;
35412 # }
35413 # // ...
35414 #
35415 # Example (JavaScript):
35416 #
35417 # // ...
35418 #
35419 # var protoToCssColor = function(rgb_color) {
35420 # var redFrac = rgb_color.red || 0.0;
35421 # var greenFrac = rgb_color.green || 0.0;
35422 # var blueFrac = rgb_color.blue || 0.0;
35423 # var red = Math.floor(redFrac * 255);
35424 # var green = Math.floor(greenFrac * 255);
35425 # var blue = Math.floor(blueFrac * 255);
35426 #
35427 # if (!('alpha' in rgb_color)) {
35428 # return rgbToCssColor_(red, green, blue);
35429 # }
35430 #
35431 # var alphaFrac = rgb_color.alpha.value || 0.0;
35432 # var rgbParams = [red, green, blue].join(',');
35433 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35434 # };
35435 #
35436 # var rgbToCssColor_ = function(red, green, blue) {
35437 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35438 # var hexString = rgbNumber.toString(16);
35439 # var missingZeros = 6 - hexString.length;
35440 # var resultBuilder = ['#'];
35441 # for (var i = 0; i < missingZeros; i++) {
35442 # resultBuilder.push('0');
35443 # }
35444 # resultBuilder.push(hexString);
35445 # return resultBuilder.join('');
35446 # };
35447 #
35448 # // ...
35449 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35450 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35451 # the final pixel color is defined by the equation:
35452 #
35453 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35454 #
35455 # This means that a value of 1.0 corresponds to a solid color, whereas
35456 # a value of 0.0 corresponds to a completely transparent color. This
35457 # uses a wrapper message rather than a simple float scalar so that it is
35458 # possible to distinguish between a default value and the value being unset.
35459 # If omitted, this color object is to be rendered as a solid color
35460 # (as if the alpha value had been explicitly given with a value of 1.0).
35461 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35462 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35463 },
35464 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070035465 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035466 "style": "A String", # The style of the border.
35467 },
35468 "left": { # A border along a cell. # The left border of the cell.
35469 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
35470 # for simplicity of conversion to/from color representations in various
35471 # languages over compactness; for example, the fields of this representation
35472 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35473 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35474 # method in iOS; and, with just a little work, it can be easily formatted into
35475 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35476 #
35477 # Example (Java):
35478 #
35479 # import com.google.type.Color;
35480 #
35481 # // ...
35482 # public static java.awt.Color fromProto(Color protocolor) {
35483 # float alpha = protocolor.hasAlpha()
35484 # ? protocolor.getAlpha().getValue()
35485 # : 1.0;
35486 #
35487 # return new java.awt.Color(
35488 # protocolor.getRed(),
35489 # protocolor.getGreen(),
35490 # protocolor.getBlue(),
35491 # alpha);
35492 # }
35493 #
35494 # public static Color toProto(java.awt.Color color) {
35495 # float red = (float) color.getRed();
35496 # float green = (float) color.getGreen();
35497 # float blue = (float) color.getBlue();
35498 # float denominator = 255.0;
35499 # Color.Builder resultBuilder =
35500 # Color
35501 # .newBuilder()
35502 # .setRed(red / denominator)
35503 # .setGreen(green / denominator)
35504 # .setBlue(blue / denominator);
35505 # int alpha = color.getAlpha();
35506 # if (alpha != 255) {
35507 # result.setAlpha(
35508 # FloatValue
35509 # .newBuilder()
35510 # .setValue(((float) alpha) / denominator)
35511 # .build());
35512 # }
35513 # return resultBuilder.build();
35514 # }
35515 # // ...
35516 #
35517 # Example (iOS / Obj-C):
35518 #
35519 # // ...
35520 # static UIColor* fromProto(Color* protocolor) {
35521 # float red = [protocolor red];
35522 # float green = [protocolor green];
35523 # float blue = [protocolor blue];
35524 # FloatValue* alpha_wrapper = [protocolor alpha];
35525 # float alpha = 1.0;
35526 # if (alpha_wrapper != nil) {
35527 # alpha = [alpha_wrapper value];
35528 # }
35529 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35530 # }
35531 #
35532 # static Color* toProto(UIColor* color) {
35533 # CGFloat red, green, blue, alpha;
35534 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35535 # return nil;
35536 # }
35537 # Color* result = [Color alloc] init];
35538 # [result setRed:red];
35539 # [result setGreen:green];
35540 # [result setBlue:blue];
35541 # if (alpha <= 0.9999) {
35542 # [result setAlpha:floatWrapperWithValue(alpha)];
35543 # }
35544 # [result autorelease];
35545 # return result;
35546 # }
35547 # // ...
35548 #
35549 # Example (JavaScript):
35550 #
35551 # // ...
35552 #
35553 # var protoToCssColor = function(rgb_color) {
35554 # var redFrac = rgb_color.red || 0.0;
35555 # var greenFrac = rgb_color.green || 0.0;
35556 # var blueFrac = rgb_color.blue || 0.0;
35557 # var red = Math.floor(redFrac * 255);
35558 # var green = Math.floor(greenFrac * 255);
35559 # var blue = Math.floor(blueFrac * 255);
35560 #
35561 # if (!('alpha' in rgb_color)) {
35562 # return rgbToCssColor_(red, green, blue);
35563 # }
35564 #
35565 # var alphaFrac = rgb_color.alpha.value || 0.0;
35566 # var rgbParams = [red, green, blue].join(',');
35567 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35568 # };
35569 #
35570 # var rgbToCssColor_ = function(red, green, blue) {
35571 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35572 # var hexString = rgbNumber.toString(16);
35573 # var missingZeros = 6 - hexString.length;
35574 # var resultBuilder = ['#'];
35575 # for (var i = 0; i < missingZeros; i++) {
35576 # resultBuilder.push('0');
35577 # }
35578 # resultBuilder.push(hexString);
35579 # return resultBuilder.join('');
35580 # };
35581 #
35582 # // ...
35583 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35584 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35585 # the final pixel color is defined by the equation:
35586 #
35587 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35588 #
35589 # This means that a value of 1.0 corresponds to a solid color, whereas
35590 # a value of 0.0 corresponds to a completely transparent color. This
35591 # uses a wrapper message rather than a simple float scalar so that it is
35592 # possible to distinguish between a default value and the value being unset.
35593 # If omitted, this color object is to be rendered as a solid color
35594 # (as if the alpha value had been explicitly given with a value of 1.0).
35595 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35596 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35597 },
35598 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070035599 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035600 "style": "A String", # The style of the border.
35601 },
35602 },
35603 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
35604 },
35605 "title": "A String", # The title of the spreadsheet.
35606 },
35607 "sheets": [ # The sheets that are part of a spreadsheet.
35608 { # A sheet in a spreadsheet.
35609 "conditionalFormats": [ # The conditional format rules in this sheet.
35610 { # A rule describing a conditional format.
35611 "ranges": [ # The ranges that will be formatted if the condition is true.
35612 # All the ranges must be on the same grid.
35613 { # A range on a sheet.
35614 # All indexes are zero-based.
35615 # Indexes are half open, e.g the start index is inclusive
35616 # and the end index is exclusive -- [start_index, end_index).
35617 # Missing indexes indicate the range is unbounded on that side.
35618 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035619 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035620 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035621 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035622 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035623 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035624 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035625 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035626 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035627 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035628 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035629 # `Sheet1!A:B == sheet_id: 0,
35630 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035631 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035632 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035633 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035634 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035635 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035636 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035637 #
35638 # The start index must always be less than or equal to the end index.
35639 # If the start index equals the end index, then the range is empty.
35640 # Empty ranges are typically not meaningful and are usually rendered in the
35641 # UI as `#REF!`.
35642 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
35643 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
35644 "sheetId": 42, # The sheet this range is on.
35645 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
35646 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
35647 },
35648 ],
35649 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
35650 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
35651 # the format will be applied.
35652 # BooleanConditions are used by conditional formatting,
35653 # data validation, and the criteria in filters.
35654 "type": "A String", # The type of condition.
35655 "values": [ # The values of the condition. The number of supported values depends
35656 # on the condition type. Some support zero values,
35657 # others one or two values,
35658 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
35659 { # The value of the condition.
35660 "relativeDate": "A String", # A relative date (based on the current date).
35661 # Valid only if the type is
35662 # DATE_BEFORE,
35663 # DATE_AFTER,
35664 # DATE_ON_OR_BEFORE or
35665 # DATE_ON_OR_AFTER.
35666 #
35667 # Relative dates are not supported in data validation.
35668 # They are supported only in conditional formatting and
35669 # conditional filters.
35670 "userEnteredValue": "A String", # A value the condition is based on.
35671 # The value will be parsed as if the user typed into a cell.
35672 # Formulas are supported (and must begin with an `=`).
35673 },
35674 ],
35675 },
35676 "format": { # The format of a cell. # The format to apply.
35677 # Conditional formatting can only apply a subset of formatting:
35678 # bold, italic,
35679 # strikethrough,
35680 # foreground color &
35681 # background color.
35682 "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 -070035683 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
35684 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070035685 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
35686 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035687 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035688 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035689 },
35690 "textDirection": "A String", # The direction of the text in the cell.
35691 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
35692 # When updating padding, every field must be specified.
35693 "top": 42, # The top padding of the cell.
35694 "right": 42, # The right padding of the cell.
35695 "bottom": 42, # The bottom padding of the cell.
35696 "left": 42, # The left padding of the cell.
35697 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035698 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035699 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
35700 # for simplicity of conversion to/from color representations in various
35701 # languages over compactness; for example, the fields of this representation
35702 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35703 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35704 # method in iOS; and, with just a little work, it can be easily formatted into
35705 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35706 #
35707 # Example (Java):
35708 #
35709 # import com.google.type.Color;
35710 #
35711 # // ...
35712 # public static java.awt.Color fromProto(Color protocolor) {
35713 # float alpha = protocolor.hasAlpha()
35714 # ? protocolor.getAlpha().getValue()
35715 # : 1.0;
35716 #
35717 # return new java.awt.Color(
35718 # protocolor.getRed(),
35719 # protocolor.getGreen(),
35720 # protocolor.getBlue(),
35721 # alpha);
35722 # }
35723 #
35724 # public static Color toProto(java.awt.Color color) {
35725 # float red = (float) color.getRed();
35726 # float green = (float) color.getGreen();
35727 # float blue = (float) color.getBlue();
35728 # float denominator = 255.0;
35729 # Color.Builder resultBuilder =
35730 # Color
35731 # .newBuilder()
35732 # .setRed(red / denominator)
35733 # .setGreen(green / denominator)
35734 # .setBlue(blue / denominator);
35735 # int alpha = color.getAlpha();
35736 # if (alpha != 255) {
35737 # result.setAlpha(
35738 # FloatValue
35739 # .newBuilder()
35740 # .setValue(((float) alpha) / denominator)
35741 # .build());
35742 # }
35743 # return resultBuilder.build();
35744 # }
35745 # // ...
35746 #
35747 # Example (iOS / Obj-C):
35748 #
35749 # // ...
35750 # static UIColor* fromProto(Color* protocolor) {
35751 # float red = [protocolor red];
35752 # float green = [protocolor green];
35753 # float blue = [protocolor blue];
35754 # FloatValue* alpha_wrapper = [protocolor alpha];
35755 # float alpha = 1.0;
35756 # if (alpha_wrapper != nil) {
35757 # alpha = [alpha_wrapper value];
35758 # }
35759 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35760 # }
35761 #
35762 # static Color* toProto(UIColor* color) {
35763 # CGFloat red, green, blue, alpha;
35764 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35765 # return nil;
35766 # }
35767 # Color* result = [Color alloc] init];
35768 # [result setRed:red];
35769 # [result setGreen:green];
35770 # [result setBlue:blue];
35771 # if (alpha <= 0.9999) {
35772 # [result setAlpha:floatWrapperWithValue(alpha)];
35773 # }
35774 # [result autorelease];
35775 # return result;
35776 # }
35777 # // ...
35778 #
35779 # Example (JavaScript):
35780 #
35781 # // ...
35782 #
35783 # var protoToCssColor = function(rgb_color) {
35784 # var redFrac = rgb_color.red || 0.0;
35785 # var greenFrac = rgb_color.green || 0.0;
35786 # var blueFrac = rgb_color.blue || 0.0;
35787 # var red = Math.floor(redFrac * 255);
35788 # var green = Math.floor(greenFrac * 255);
35789 # var blue = Math.floor(blueFrac * 255);
35790 #
35791 # if (!('alpha' in rgb_color)) {
35792 # return rgbToCssColor_(red, green, blue);
35793 # }
35794 #
35795 # var alphaFrac = rgb_color.alpha.value || 0.0;
35796 # var rgbParams = [red, green, blue].join(',');
35797 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35798 # };
35799 #
35800 # var rgbToCssColor_ = function(red, green, blue) {
35801 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35802 # var hexString = rgbNumber.toString(16);
35803 # var missingZeros = 6 - hexString.length;
35804 # var resultBuilder = ['#'];
35805 # for (var i = 0; i < missingZeros; i++) {
35806 # resultBuilder.push('0');
35807 # }
35808 # resultBuilder.push(hexString);
35809 # return resultBuilder.join('');
35810 # };
35811 #
35812 # // ...
35813 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35814 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35815 # the final pixel color is defined by the equation:
35816 #
35817 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35818 #
35819 # This means that a value of 1.0 corresponds to a solid color, whereas
35820 # a value of 0.0 corresponds to a completely transparent color. This
35821 # uses a wrapper message rather than a simple float scalar so that it is
35822 # possible to distinguish between a default value and the value being unset.
35823 # If omitted, this color object is to be rendered as a solid color
35824 # (as if the alpha value had been explicitly given with a value of 1.0).
35825 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35826 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35827 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035828 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035829 "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).
35830 # Absent values indicate that the field isn't specified.
35831 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
35832 # for simplicity of conversion to/from color representations in various
35833 # languages over compactness; for example, the fields of this representation
35834 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35835 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35836 # method in iOS; and, with just a little work, it can be easily formatted into
35837 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35838 #
35839 # Example (Java):
35840 #
35841 # import com.google.type.Color;
35842 #
35843 # // ...
35844 # public static java.awt.Color fromProto(Color protocolor) {
35845 # float alpha = protocolor.hasAlpha()
35846 # ? protocolor.getAlpha().getValue()
35847 # : 1.0;
35848 #
35849 # return new java.awt.Color(
35850 # protocolor.getRed(),
35851 # protocolor.getGreen(),
35852 # protocolor.getBlue(),
35853 # alpha);
35854 # }
35855 #
35856 # public static Color toProto(java.awt.Color color) {
35857 # float red = (float) color.getRed();
35858 # float green = (float) color.getGreen();
35859 # float blue = (float) color.getBlue();
35860 # float denominator = 255.0;
35861 # Color.Builder resultBuilder =
35862 # Color
35863 # .newBuilder()
35864 # .setRed(red / denominator)
35865 # .setGreen(green / denominator)
35866 # .setBlue(blue / denominator);
35867 # int alpha = color.getAlpha();
35868 # if (alpha != 255) {
35869 # result.setAlpha(
35870 # FloatValue
35871 # .newBuilder()
35872 # .setValue(((float) alpha) / denominator)
35873 # .build());
35874 # }
35875 # return resultBuilder.build();
35876 # }
35877 # // ...
35878 #
35879 # Example (iOS / Obj-C):
35880 #
35881 # // ...
35882 # static UIColor* fromProto(Color* protocolor) {
35883 # float red = [protocolor red];
35884 # float green = [protocolor green];
35885 # float blue = [protocolor blue];
35886 # FloatValue* alpha_wrapper = [protocolor alpha];
35887 # float alpha = 1.0;
35888 # if (alpha_wrapper != nil) {
35889 # alpha = [alpha_wrapper value];
35890 # }
35891 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35892 # }
35893 #
35894 # static Color* toProto(UIColor* color) {
35895 # CGFloat red, green, blue, alpha;
35896 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35897 # return nil;
35898 # }
35899 # Color* result = [Color alloc] init];
35900 # [result setRed:red];
35901 # [result setGreen:green];
35902 # [result setBlue:blue];
35903 # if (alpha <= 0.9999) {
35904 # [result setAlpha:floatWrapperWithValue(alpha)];
35905 # }
35906 # [result autorelease];
35907 # return result;
35908 # }
35909 # // ...
35910 #
35911 # Example (JavaScript):
35912 #
35913 # // ...
35914 #
35915 # var protoToCssColor = function(rgb_color) {
35916 # var redFrac = rgb_color.red || 0.0;
35917 # var greenFrac = rgb_color.green || 0.0;
35918 # var blueFrac = rgb_color.blue || 0.0;
35919 # var red = Math.floor(redFrac * 255);
35920 # var green = Math.floor(greenFrac * 255);
35921 # var blue = Math.floor(blueFrac * 255);
35922 #
35923 # if (!('alpha' in rgb_color)) {
35924 # return rgbToCssColor_(red, green, blue);
35925 # }
35926 #
35927 # var alphaFrac = rgb_color.alpha.value || 0.0;
35928 # var rgbParams = [red, green, blue].join(',');
35929 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35930 # };
35931 #
35932 # var rgbToCssColor_ = function(red, green, blue) {
35933 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35934 # var hexString = rgbNumber.toString(16);
35935 # var missingZeros = 6 - hexString.length;
35936 # var resultBuilder = ['#'];
35937 # for (var i = 0; i < missingZeros; i++) {
35938 # resultBuilder.push('0');
35939 # }
35940 # resultBuilder.push(hexString);
35941 # return resultBuilder.join('');
35942 # };
35943 #
35944 # // ...
35945 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35946 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35947 # the final pixel color is defined by the equation:
35948 #
35949 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35950 #
35951 # This means that a value of 1.0 corresponds to a solid color, whereas
35952 # a value of 0.0 corresponds to a completely transparent color. This
35953 # uses a wrapper message rather than a simple float scalar so that it is
35954 # possible to distinguish between a default value and the value being unset.
35955 # If omitted, this color object is to be rendered as a solid color
35956 # (as if the alpha value had been explicitly given with a value of 1.0).
35957 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35958 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35959 },
35960 "bold": True or False, # True if the text is bold.
35961 "strikethrough": True or False, # True if the text has a strikethrough.
35962 "fontFamily": "A String", # The font family.
35963 "fontSize": 42, # The size of the font.
35964 "italic": True or False, # True if the text is italicized.
35965 "underline": True or False, # True if the text is underlined.
35966 },
35967 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
35968 "borders": { # The borders of the cell. # The borders of the cell.
35969 "top": { # A border along a cell. # The top border of the cell.
35970 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
35971 # for simplicity of conversion to/from color representations in various
35972 # languages over compactness; for example, the fields of this representation
35973 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35974 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35975 # method in iOS; and, with just a little work, it can be easily formatted into
35976 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35977 #
35978 # Example (Java):
35979 #
35980 # import com.google.type.Color;
35981 #
35982 # // ...
35983 # public static java.awt.Color fromProto(Color protocolor) {
35984 # float alpha = protocolor.hasAlpha()
35985 # ? protocolor.getAlpha().getValue()
35986 # : 1.0;
35987 #
35988 # return new java.awt.Color(
35989 # protocolor.getRed(),
35990 # protocolor.getGreen(),
35991 # protocolor.getBlue(),
35992 # alpha);
35993 # }
35994 #
35995 # public static Color toProto(java.awt.Color color) {
35996 # float red = (float) color.getRed();
35997 # float green = (float) color.getGreen();
35998 # float blue = (float) color.getBlue();
35999 # float denominator = 255.0;
36000 # Color.Builder resultBuilder =
36001 # Color
36002 # .newBuilder()
36003 # .setRed(red / denominator)
36004 # .setGreen(green / denominator)
36005 # .setBlue(blue / denominator);
36006 # int alpha = color.getAlpha();
36007 # if (alpha != 255) {
36008 # result.setAlpha(
36009 # FloatValue
36010 # .newBuilder()
36011 # .setValue(((float) alpha) / denominator)
36012 # .build());
36013 # }
36014 # return resultBuilder.build();
36015 # }
36016 # // ...
36017 #
36018 # Example (iOS / Obj-C):
36019 #
36020 # // ...
36021 # static UIColor* fromProto(Color* protocolor) {
36022 # float red = [protocolor red];
36023 # float green = [protocolor green];
36024 # float blue = [protocolor blue];
36025 # FloatValue* alpha_wrapper = [protocolor alpha];
36026 # float alpha = 1.0;
36027 # if (alpha_wrapper != nil) {
36028 # alpha = [alpha_wrapper value];
36029 # }
36030 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36031 # }
36032 #
36033 # static Color* toProto(UIColor* color) {
36034 # CGFloat red, green, blue, alpha;
36035 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36036 # return nil;
36037 # }
36038 # Color* result = [Color alloc] init];
36039 # [result setRed:red];
36040 # [result setGreen:green];
36041 # [result setBlue:blue];
36042 # if (alpha <= 0.9999) {
36043 # [result setAlpha:floatWrapperWithValue(alpha)];
36044 # }
36045 # [result autorelease];
36046 # return result;
36047 # }
36048 # // ...
36049 #
36050 # Example (JavaScript):
36051 #
36052 # // ...
36053 #
36054 # var protoToCssColor = function(rgb_color) {
36055 # var redFrac = rgb_color.red || 0.0;
36056 # var greenFrac = rgb_color.green || 0.0;
36057 # var blueFrac = rgb_color.blue || 0.0;
36058 # var red = Math.floor(redFrac * 255);
36059 # var green = Math.floor(greenFrac * 255);
36060 # var blue = Math.floor(blueFrac * 255);
36061 #
36062 # if (!('alpha' in rgb_color)) {
36063 # return rgbToCssColor_(red, green, blue);
36064 # }
36065 #
36066 # var alphaFrac = rgb_color.alpha.value || 0.0;
36067 # var rgbParams = [red, green, blue].join(',');
36068 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36069 # };
36070 #
36071 # var rgbToCssColor_ = function(red, green, blue) {
36072 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36073 # var hexString = rgbNumber.toString(16);
36074 # var missingZeros = 6 - hexString.length;
36075 # var resultBuilder = ['#'];
36076 # for (var i = 0; i < missingZeros; i++) {
36077 # resultBuilder.push('0');
36078 # }
36079 # resultBuilder.push(hexString);
36080 # return resultBuilder.join('');
36081 # };
36082 #
36083 # // ...
36084 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36085 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36086 # the final pixel color is defined by the equation:
36087 #
36088 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36089 #
36090 # This means that a value of 1.0 corresponds to a solid color, whereas
36091 # a value of 0.0 corresponds to a completely transparent color. This
36092 # uses a wrapper message rather than a simple float scalar so that it is
36093 # possible to distinguish between a default value and the value being unset.
36094 # If omitted, this color object is to be rendered as a solid color
36095 # (as if the alpha value had been explicitly given with a value of 1.0).
36096 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36097 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36098 },
36099 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070036100 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036101 "style": "A String", # The style of the border.
36102 },
36103 "right": { # A border along a cell. # The right border of the cell.
36104 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
36105 # for simplicity of conversion to/from color representations in various
36106 # languages over compactness; for example, the fields of this representation
36107 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
36108 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36109 # method in iOS; and, with just a little work, it can be easily formatted into
36110 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36111 #
36112 # Example (Java):
36113 #
36114 # import com.google.type.Color;
36115 #
36116 # // ...
36117 # public static java.awt.Color fromProto(Color protocolor) {
36118 # float alpha = protocolor.hasAlpha()
36119 # ? protocolor.getAlpha().getValue()
36120 # : 1.0;
36121 #
36122 # return new java.awt.Color(
36123 # protocolor.getRed(),
36124 # protocolor.getGreen(),
36125 # protocolor.getBlue(),
36126 # alpha);
36127 # }
36128 #
36129 # public static Color toProto(java.awt.Color color) {
36130 # float red = (float) color.getRed();
36131 # float green = (float) color.getGreen();
36132 # float blue = (float) color.getBlue();
36133 # float denominator = 255.0;
36134 # Color.Builder resultBuilder =
36135 # Color
36136 # .newBuilder()
36137 # .setRed(red / denominator)
36138 # .setGreen(green / denominator)
36139 # .setBlue(blue / denominator);
36140 # int alpha = color.getAlpha();
36141 # if (alpha != 255) {
36142 # result.setAlpha(
36143 # FloatValue
36144 # .newBuilder()
36145 # .setValue(((float) alpha) / denominator)
36146 # .build());
36147 # }
36148 # return resultBuilder.build();
36149 # }
36150 # // ...
36151 #
36152 # Example (iOS / Obj-C):
36153 #
36154 # // ...
36155 # static UIColor* fromProto(Color* protocolor) {
36156 # float red = [protocolor red];
36157 # float green = [protocolor green];
36158 # float blue = [protocolor blue];
36159 # FloatValue* alpha_wrapper = [protocolor alpha];
36160 # float alpha = 1.0;
36161 # if (alpha_wrapper != nil) {
36162 # alpha = [alpha_wrapper value];
36163 # }
36164 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36165 # }
36166 #
36167 # static Color* toProto(UIColor* color) {
36168 # CGFloat red, green, blue, alpha;
36169 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36170 # return nil;
36171 # }
36172 # Color* result = [Color alloc] init];
36173 # [result setRed:red];
36174 # [result setGreen:green];
36175 # [result setBlue:blue];
36176 # if (alpha <= 0.9999) {
36177 # [result setAlpha:floatWrapperWithValue(alpha)];
36178 # }
36179 # [result autorelease];
36180 # return result;
36181 # }
36182 # // ...
36183 #
36184 # Example (JavaScript):
36185 #
36186 # // ...
36187 #
36188 # var protoToCssColor = function(rgb_color) {
36189 # var redFrac = rgb_color.red || 0.0;
36190 # var greenFrac = rgb_color.green || 0.0;
36191 # var blueFrac = rgb_color.blue || 0.0;
36192 # var red = Math.floor(redFrac * 255);
36193 # var green = Math.floor(greenFrac * 255);
36194 # var blue = Math.floor(blueFrac * 255);
36195 #
36196 # if (!('alpha' in rgb_color)) {
36197 # return rgbToCssColor_(red, green, blue);
36198 # }
36199 #
36200 # var alphaFrac = rgb_color.alpha.value || 0.0;
36201 # var rgbParams = [red, green, blue].join(',');
36202 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36203 # };
36204 #
36205 # var rgbToCssColor_ = function(red, green, blue) {
36206 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36207 # var hexString = rgbNumber.toString(16);
36208 # var missingZeros = 6 - hexString.length;
36209 # var resultBuilder = ['#'];
36210 # for (var i = 0; i < missingZeros; i++) {
36211 # resultBuilder.push('0');
36212 # }
36213 # resultBuilder.push(hexString);
36214 # return resultBuilder.join('');
36215 # };
36216 #
36217 # // ...
36218 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36219 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36220 # the final pixel color is defined by the equation:
36221 #
36222 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36223 #
36224 # This means that a value of 1.0 corresponds to a solid color, whereas
36225 # a value of 0.0 corresponds to a completely transparent color. This
36226 # uses a wrapper message rather than a simple float scalar so that it is
36227 # possible to distinguish between a default value and the value being unset.
36228 # If omitted, this color object is to be rendered as a solid color
36229 # (as if the alpha value had been explicitly given with a value of 1.0).
36230 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36231 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36232 },
36233 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070036234 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036235 "style": "A String", # The style of the border.
36236 },
36237 "bottom": { # A border along a cell. # The bottom border of the cell.
36238 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
36239 # for simplicity of conversion to/from color representations in various
36240 # languages over compactness; for example, the fields of this representation
36241 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
36242 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36243 # method in iOS; and, with just a little work, it can be easily formatted into
36244 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36245 #
36246 # Example (Java):
36247 #
36248 # import com.google.type.Color;
36249 #
36250 # // ...
36251 # public static java.awt.Color fromProto(Color protocolor) {
36252 # float alpha = protocolor.hasAlpha()
36253 # ? protocolor.getAlpha().getValue()
36254 # : 1.0;
36255 #
36256 # return new java.awt.Color(
36257 # protocolor.getRed(),
36258 # protocolor.getGreen(),
36259 # protocolor.getBlue(),
36260 # alpha);
36261 # }
36262 #
36263 # public static Color toProto(java.awt.Color color) {
36264 # float red = (float) color.getRed();
36265 # float green = (float) color.getGreen();
36266 # float blue = (float) color.getBlue();
36267 # float denominator = 255.0;
36268 # Color.Builder resultBuilder =
36269 # Color
36270 # .newBuilder()
36271 # .setRed(red / denominator)
36272 # .setGreen(green / denominator)
36273 # .setBlue(blue / denominator);
36274 # int alpha = color.getAlpha();
36275 # if (alpha != 255) {
36276 # result.setAlpha(
36277 # FloatValue
36278 # .newBuilder()
36279 # .setValue(((float) alpha) / denominator)
36280 # .build());
36281 # }
36282 # return resultBuilder.build();
36283 # }
36284 # // ...
36285 #
36286 # Example (iOS / Obj-C):
36287 #
36288 # // ...
36289 # static UIColor* fromProto(Color* protocolor) {
36290 # float red = [protocolor red];
36291 # float green = [protocolor green];
36292 # float blue = [protocolor blue];
36293 # FloatValue* alpha_wrapper = [protocolor alpha];
36294 # float alpha = 1.0;
36295 # if (alpha_wrapper != nil) {
36296 # alpha = [alpha_wrapper value];
36297 # }
36298 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36299 # }
36300 #
36301 # static Color* toProto(UIColor* color) {
36302 # CGFloat red, green, blue, alpha;
36303 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36304 # return nil;
36305 # }
36306 # Color* result = [Color alloc] init];
36307 # [result setRed:red];
36308 # [result setGreen:green];
36309 # [result setBlue:blue];
36310 # if (alpha <= 0.9999) {
36311 # [result setAlpha:floatWrapperWithValue(alpha)];
36312 # }
36313 # [result autorelease];
36314 # return result;
36315 # }
36316 # // ...
36317 #
36318 # Example (JavaScript):
36319 #
36320 # // ...
36321 #
36322 # var protoToCssColor = function(rgb_color) {
36323 # var redFrac = rgb_color.red || 0.0;
36324 # var greenFrac = rgb_color.green || 0.0;
36325 # var blueFrac = rgb_color.blue || 0.0;
36326 # var red = Math.floor(redFrac * 255);
36327 # var green = Math.floor(greenFrac * 255);
36328 # var blue = Math.floor(blueFrac * 255);
36329 #
36330 # if (!('alpha' in rgb_color)) {
36331 # return rgbToCssColor_(red, green, blue);
36332 # }
36333 #
36334 # var alphaFrac = rgb_color.alpha.value || 0.0;
36335 # var rgbParams = [red, green, blue].join(',');
36336 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36337 # };
36338 #
36339 # var rgbToCssColor_ = function(red, green, blue) {
36340 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36341 # var hexString = rgbNumber.toString(16);
36342 # var missingZeros = 6 - hexString.length;
36343 # var resultBuilder = ['#'];
36344 # for (var i = 0; i < missingZeros; i++) {
36345 # resultBuilder.push('0');
36346 # }
36347 # resultBuilder.push(hexString);
36348 # return resultBuilder.join('');
36349 # };
36350 #
36351 # // ...
36352 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36353 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36354 # the final pixel color is defined by the equation:
36355 #
36356 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36357 #
36358 # This means that a value of 1.0 corresponds to a solid color, whereas
36359 # a value of 0.0 corresponds to a completely transparent color. This
36360 # uses a wrapper message rather than a simple float scalar so that it is
36361 # possible to distinguish between a default value and the value being unset.
36362 # If omitted, this color object is to be rendered as a solid color
36363 # (as if the alpha value had been explicitly given with a value of 1.0).
36364 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36365 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36366 },
36367 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070036368 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036369 "style": "A String", # The style of the border.
36370 },
36371 "left": { # A border along a cell. # The left border of the cell.
36372 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
36373 # for simplicity of conversion to/from color representations in various
36374 # languages over compactness; for example, the fields of this representation
36375 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
36376 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36377 # method in iOS; and, with just a little work, it can be easily formatted into
36378 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36379 #
36380 # Example (Java):
36381 #
36382 # import com.google.type.Color;
36383 #
36384 # // ...
36385 # public static java.awt.Color fromProto(Color protocolor) {
36386 # float alpha = protocolor.hasAlpha()
36387 # ? protocolor.getAlpha().getValue()
36388 # : 1.0;
36389 #
36390 # return new java.awt.Color(
36391 # protocolor.getRed(),
36392 # protocolor.getGreen(),
36393 # protocolor.getBlue(),
36394 # alpha);
36395 # }
36396 #
36397 # public static Color toProto(java.awt.Color color) {
36398 # float red = (float) color.getRed();
36399 # float green = (float) color.getGreen();
36400 # float blue = (float) color.getBlue();
36401 # float denominator = 255.0;
36402 # Color.Builder resultBuilder =
36403 # Color
36404 # .newBuilder()
36405 # .setRed(red / denominator)
36406 # .setGreen(green / denominator)
36407 # .setBlue(blue / denominator);
36408 # int alpha = color.getAlpha();
36409 # if (alpha != 255) {
36410 # result.setAlpha(
36411 # FloatValue
36412 # .newBuilder()
36413 # .setValue(((float) alpha) / denominator)
36414 # .build());
36415 # }
36416 # return resultBuilder.build();
36417 # }
36418 # // ...
36419 #
36420 # Example (iOS / Obj-C):
36421 #
36422 # // ...
36423 # static UIColor* fromProto(Color* protocolor) {
36424 # float red = [protocolor red];
36425 # float green = [protocolor green];
36426 # float blue = [protocolor blue];
36427 # FloatValue* alpha_wrapper = [protocolor alpha];
36428 # float alpha = 1.0;
36429 # if (alpha_wrapper != nil) {
36430 # alpha = [alpha_wrapper value];
36431 # }
36432 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36433 # }
36434 #
36435 # static Color* toProto(UIColor* color) {
36436 # CGFloat red, green, blue, alpha;
36437 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36438 # return nil;
36439 # }
36440 # Color* result = [Color alloc] init];
36441 # [result setRed:red];
36442 # [result setGreen:green];
36443 # [result setBlue:blue];
36444 # if (alpha <= 0.9999) {
36445 # [result setAlpha:floatWrapperWithValue(alpha)];
36446 # }
36447 # [result autorelease];
36448 # return result;
36449 # }
36450 # // ...
36451 #
36452 # Example (JavaScript):
36453 #
36454 # // ...
36455 #
36456 # var protoToCssColor = function(rgb_color) {
36457 # var redFrac = rgb_color.red || 0.0;
36458 # var greenFrac = rgb_color.green || 0.0;
36459 # var blueFrac = rgb_color.blue || 0.0;
36460 # var red = Math.floor(redFrac * 255);
36461 # var green = Math.floor(greenFrac * 255);
36462 # var blue = Math.floor(blueFrac * 255);
36463 #
36464 # if (!('alpha' in rgb_color)) {
36465 # return rgbToCssColor_(red, green, blue);
36466 # }
36467 #
36468 # var alphaFrac = rgb_color.alpha.value || 0.0;
36469 # var rgbParams = [red, green, blue].join(',');
36470 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36471 # };
36472 #
36473 # var rgbToCssColor_ = function(red, green, blue) {
36474 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36475 # var hexString = rgbNumber.toString(16);
36476 # var missingZeros = 6 - hexString.length;
36477 # var resultBuilder = ['#'];
36478 # for (var i = 0; i < missingZeros; i++) {
36479 # resultBuilder.push('0');
36480 # }
36481 # resultBuilder.push(hexString);
36482 # return resultBuilder.join('');
36483 # };
36484 #
36485 # // ...
36486 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36487 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36488 # the final pixel color is defined by the equation:
36489 #
36490 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36491 #
36492 # This means that a value of 1.0 corresponds to a solid color, whereas
36493 # a value of 0.0 corresponds to a completely transparent color. This
36494 # uses a wrapper message rather than a simple float scalar so that it is
36495 # possible to distinguish between a default value and the value being unset.
36496 # If omitted, this color object is to be rendered as a solid color
36497 # (as if the alpha value had been explicitly given with a value of 1.0).
36498 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36499 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36500 },
36501 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070036502 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036503 "style": "A String", # The style of the border.
36504 },
36505 },
36506 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
36507 },
36508 },
36509 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
36510 # the interpolation points listed. The format of a cell will vary
36511 # based on its contents as compared to the values of the interpolation
36512 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036513 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036514 # These pin the gradient color scale according to the color,
36515 # type and value chosen.
36516 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
36517 # for simplicity of conversion to/from color representations in various
36518 # languages over compactness; for example, the fields of this representation
36519 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
36520 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36521 # method in iOS; and, with just a little work, it can be easily formatted into
36522 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36523 #
36524 # Example (Java):
36525 #
36526 # import com.google.type.Color;
36527 #
36528 # // ...
36529 # public static java.awt.Color fromProto(Color protocolor) {
36530 # float alpha = protocolor.hasAlpha()
36531 # ? protocolor.getAlpha().getValue()
36532 # : 1.0;
36533 #
36534 # return new java.awt.Color(
36535 # protocolor.getRed(),
36536 # protocolor.getGreen(),
36537 # protocolor.getBlue(),
36538 # alpha);
36539 # }
36540 #
36541 # public static Color toProto(java.awt.Color color) {
36542 # float red = (float) color.getRed();
36543 # float green = (float) color.getGreen();
36544 # float blue = (float) color.getBlue();
36545 # float denominator = 255.0;
36546 # Color.Builder resultBuilder =
36547 # Color
36548 # .newBuilder()
36549 # .setRed(red / denominator)
36550 # .setGreen(green / denominator)
36551 # .setBlue(blue / denominator);
36552 # int alpha = color.getAlpha();
36553 # if (alpha != 255) {
36554 # result.setAlpha(
36555 # FloatValue
36556 # .newBuilder()
36557 # .setValue(((float) alpha) / denominator)
36558 # .build());
36559 # }
36560 # return resultBuilder.build();
36561 # }
36562 # // ...
36563 #
36564 # Example (iOS / Obj-C):
36565 #
36566 # // ...
36567 # static UIColor* fromProto(Color* protocolor) {
36568 # float red = [protocolor red];
36569 # float green = [protocolor green];
36570 # float blue = [protocolor blue];
36571 # FloatValue* alpha_wrapper = [protocolor alpha];
36572 # float alpha = 1.0;
36573 # if (alpha_wrapper != nil) {
36574 # alpha = [alpha_wrapper value];
36575 # }
36576 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36577 # }
36578 #
36579 # static Color* toProto(UIColor* color) {
36580 # CGFloat red, green, blue, alpha;
36581 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36582 # return nil;
36583 # }
36584 # Color* result = [Color alloc] init];
36585 # [result setRed:red];
36586 # [result setGreen:green];
36587 # [result setBlue:blue];
36588 # if (alpha <= 0.9999) {
36589 # [result setAlpha:floatWrapperWithValue(alpha)];
36590 # }
36591 # [result autorelease];
36592 # return result;
36593 # }
36594 # // ...
36595 #
36596 # Example (JavaScript):
36597 #
36598 # // ...
36599 #
36600 # var protoToCssColor = function(rgb_color) {
36601 # var redFrac = rgb_color.red || 0.0;
36602 # var greenFrac = rgb_color.green || 0.0;
36603 # var blueFrac = rgb_color.blue || 0.0;
36604 # var red = Math.floor(redFrac * 255);
36605 # var green = Math.floor(greenFrac * 255);
36606 # var blue = Math.floor(blueFrac * 255);
36607 #
36608 # if (!('alpha' in rgb_color)) {
36609 # return rgbToCssColor_(red, green, blue);
36610 # }
36611 #
36612 # var alphaFrac = rgb_color.alpha.value || 0.0;
36613 # var rgbParams = [red, green, blue].join(',');
36614 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36615 # };
36616 #
36617 # var rgbToCssColor_ = function(red, green, blue) {
36618 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36619 # var hexString = rgbNumber.toString(16);
36620 # var missingZeros = 6 - hexString.length;
36621 # var resultBuilder = ['#'];
36622 # for (var i = 0; i < missingZeros; i++) {
36623 # resultBuilder.push('0');
36624 # }
36625 # resultBuilder.push(hexString);
36626 # return resultBuilder.join('');
36627 # };
36628 #
36629 # // ...
36630 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36631 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36632 # the final pixel color is defined by the equation:
36633 #
36634 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36635 #
36636 # This means that a value of 1.0 corresponds to a solid color, whereas
36637 # a value of 0.0 corresponds to a completely transparent color. This
36638 # uses a wrapper message rather than a simple float scalar so that it is
36639 # possible to distinguish between a default value and the value being unset.
36640 # If omitted, this color object is to be rendered as a solid color
36641 # (as if the alpha value had been explicitly given with a value of 1.0).
36642 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36643 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36644 },
36645 "type": "A String", # How the value should be interpreted.
36646 "value": "A String", # The value this interpolation point uses. May be a formula.
36647 # Unused if type is MIN or
36648 # MAX.
36649 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036650 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036651 # These pin the gradient color scale according to the color,
36652 # type and value chosen.
36653 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
36654 # for simplicity of conversion to/from color representations in various
36655 # languages over compactness; for example, the fields of this representation
36656 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
36657 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36658 # method in iOS; and, with just a little work, it can be easily formatted into
36659 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36660 #
36661 # Example (Java):
36662 #
36663 # import com.google.type.Color;
36664 #
36665 # // ...
36666 # public static java.awt.Color fromProto(Color protocolor) {
36667 # float alpha = protocolor.hasAlpha()
36668 # ? protocolor.getAlpha().getValue()
36669 # : 1.0;
36670 #
36671 # return new java.awt.Color(
36672 # protocolor.getRed(),
36673 # protocolor.getGreen(),
36674 # protocolor.getBlue(),
36675 # alpha);
36676 # }
36677 #
36678 # public static Color toProto(java.awt.Color color) {
36679 # float red = (float) color.getRed();
36680 # float green = (float) color.getGreen();
36681 # float blue = (float) color.getBlue();
36682 # float denominator = 255.0;
36683 # Color.Builder resultBuilder =
36684 # Color
36685 # .newBuilder()
36686 # .setRed(red / denominator)
36687 # .setGreen(green / denominator)
36688 # .setBlue(blue / denominator);
36689 # int alpha = color.getAlpha();
36690 # if (alpha != 255) {
36691 # result.setAlpha(
36692 # FloatValue
36693 # .newBuilder()
36694 # .setValue(((float) alpha) / denominator)
36695 # .build());
36696 # }
36697 # return resultBuilder.build();
36698 # }
36699 # // ...
36700 #
36701 # Example (iOS / Obj-C):
36702 #
36703 # // ...
36704 # static UIColor* fromProto(Color* protocolor) {
36705 # float red = [protocolor red];
36706 # float green = [protocolor green];
36707 # float blue = [protocolor blue];
36708 # FloatValue* alpha_wrapper = [protocolor alpha];
36709 # float alpha = 1.0;
36710 # if (alpha_wrapper != nil) {
36711 # alpha = [alpha_wrapper value];
36712 # }
36713 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36714 # }
36715 #
36716 # static Color* toProto(UIColor* color) {
36717 # CGFloat red, green, blue, alpha;
36718 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36719 # return nil;
36720 # }
36721 # Color* result = [Color alloc] init];
36722 # [result setRed:red];
36723 # [result setGreen:green];
36724 # [result setBlue:blue];
36725 # if (alpha <= 0.9999) {
36726 # [result setAlpha:floatWrapperWithValue(alpha)];
36727 # }
36728 # [result autorelease];
36729 # return result;
36730 # }
36731 # // ...
36732 #
36733 # Example (JavaScript):
36734 #
36735 # // ...
36736 #
36737 # var protoToCssColor = function(rgb_color) {
36738 # var redFrac = rgb_color.red || 0.0;
36739 # var greenFrac = rgb_color.green || 0.0;
36740 # var blueFrac = rgb_color.blue || 0.0;
36741 # var red = Math.floor(redFrac * 255);
36742 # var green = Math.floor(greenFrac * 255);
36743 # var blue = Math.floor(blueFrac * 255);
36744 #
36745 # if (!('alpha' in rgb_color)) {
36746 # return rgbToCssColor_(red, green, blue);
36747 # }
36748 #
36749 # var alphaFrac = rgb_color.alpha.value || 0.0;
36750 # var rgbParams = [red, green, blue].join(',');
36751 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36752 # };
36753 #
36754 # var rgbToCssColor_ = function(red, green, blue) {
36755 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36756 # var hexString = rgbNumber.toString(16);
36757 # var missingZeros = 6 - hexString.length;
36758 # var resultBuilder = ['#'];
36759 # for (var i = 0; i < missingZeros; i++) {
36760 # resultBuilder.push('0');
36761 # }
36762 # resultBuilder.push(hexString);
36763 # return resultBuilder.join('');
36764 # };
36765 #
36766 # // ...
36767 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36768 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36769 # the final pixel color is defined by the equation:
36770 #
36771 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36772 #
36773 # This means that a value of 1.0 corresponds to a solid color, whereas
36774 # a value of 0.0 corresponds to a completely transparent color. This
36775 # uses a wrapper message rather than a simple float scalar so that it is
36776 # possible to distinguish between a default value and the value being unset.
36777 # If omitted, this color object is to be rendered as a solid color
36778 # (as if the alpha value had been explicitly given with a value of 1.0).
36779 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36780 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36781 },
36782 "type": "A String", # How the value should be interpreted.
36783 "value": "A String", # The value this interpolation point uses. May be a formula.
36784 # Unused if type is MIN or
36785 # MAX.
36786 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036787 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036788 # These pin the gradient color scale according to the color,
36789 # type and value chosen.
36790 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
36791 # for simplicity of conversion to/from color representations in various
36792 # languages over compactness; for example, the fields of this representation
36793 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
36794 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36795 # method in iOS; and, with just a little work, it can be easily formatted into
36796 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36797 #
36798 # Example (Java):
36799 #
36800 # import com.google.type.Color;
36801 #
36802 # // ...
36803 # public static java.awt.Color fromProto(Color protocolor) {
36804 # float alpha = protocolor.hasAlpha()
36805 # ? protocolor.getAlpha().getValue()
36806 # : 1.0;
36807 #
36808 # return new java.awt.Color(
36809 # protocolor.getRed(),
36810 # protocolor.getGreen(),
36811 # protocolor.getBlue(),
36812 # alpha);
36813 # }
36814 #
36815 # public static Color toProto(java.awt.Color color) {
36816 # float red = (float) color.getRed();
36817 # float green = (float) color.getGreen();
36818 # float blue = (float) color.getBlue();
36819 # float denominator = 255.0;
36820 # Color.Builder resultBuilder =
36821 # Color
36822 # .newBuilder()
36823 # .setRed(red / denominator)
36824 # .setGreen(green / denominator)
36825 # .setBlue(blue / denominator);
36826 # int alpha = color.getAlpha();
36827 # if (alpha != 255) {
36828 # result.setAlpha(
36829 # FloatValue
36830 # .newBuilder()
36831 # .setValue(((float) alpha) / denominator)
36832 # .build());
36833 # }
36834 # return resultBuilder.build();
36835 # }
36836 # // ...
36837 #
36838 # Example (iOS / Obj-C):
36839 #
36840 # // ...
36841 # static UIColor* fromProto(Color* protocolor) {
36842 # float red = [protocolor red];
36843 # float green = [protocolor green];
36844 # float blue = [protocolor blue];
36845 # FloatValue* alpha_wrapper = [protocolor alpha];
36846 # float alpha = 1.0;
36847 # if (alpha_wrapper != nil) {
36848 # alpha = [alpha_wrapper value];
36849 # }
36850 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36851 # }
36852 #
36853 # static Color* toProto(UIColor* color) {
36854 # CGFloat red, green, blue, alpha;
36855 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36856 # return nil;
36857 # }
36858 # Color* result = [Color alloc] init];
36859 # [result setRed:red];
36860 # [result setGreen:green];
36861 # [result setBlue:blue];
36862 # if (alpha <= 0.9999) {
36863 # [result setAlpha:floatWrapperWithValue(alpha)];
36864 # }
36865 # [result autorelease];
36866 # return result;
36867 # }
36868 # // ...
36869 #
36870 # Example (JavaScript):
36871 #
36872 # // ...
36873 #
36874 # var protoToCssColor = function(rgb_color) {
36875 # var redFrac = rgb_color.red || 0.0;
36876 # var greenFrac = rgb_color.green || 0.0;
36877 # var blueFrac = rgb_color.blue || 0.0;
36878 # var red = Math.floor(redFrac * 255);
36879 # var green = Math.floor(greenFrac * 255);
36880 # var blue = Math.floor(blueFrac * 255);
36881 #
36882 # if (!('alpha' in rgb_color)) {
36883 # return rgbToCssColor_(red, green, blue);
36884 # }
36885 #
36886 # var alphaFrac = rgb_color.alpha.value || 0.0;
36887 # var rgbParams = [red, green, blue].join(',');
36888 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36889 # };
36890 #
36891 # var rgbToCssColor_ = function(red, green, blue) {
36892 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36893 # var hexString = rgbNumber.toString(16);
36894 # var missingZeros = 6 - hexString.length;
36895 # var resultBuilder = ['#'];
36896 # for (var i = 0; i < missingZeros; i++) {
36897 # resultBuilder.push('0');
36898 # }
36899 # resultBuilder.push(hexString);
36900 # return resultBuilder.join('');
36901 # };
36902 #
36903 # // ...
36904 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36905 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36906 # the final pixel color is defined by the equation:
36907 #
36908 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36909 #
36910 # This means that a value of 1.0 corresponds to a solid color, whereas
36911 # a value of 0.0 corresponds to a completely transparent color. This
36912 # uses a wrapper message rather than a simple float scalar so that it is
36913 # possible to distinguish between a default value and the value being unset.
36914 # If omitted, this color object is to be rendered as a solid color
36915 # (as if the alpha value had been explicitly given with a value of 1.0).
36916 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36917 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36918 },
36919 "type": "A String", # How the value should be interpreted.
36920 "value": "A String", # The value this interpolation point uses. May be a formula.
36921 # Unused if type is MIN or
36922 # MAX.
36923 },
36924 },
36925 },
36926 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080036927 "bandedRanges": [ # The banded (i.e. alternating colors) ranges on this sheet.
36928 { # A banded (alternating colors) range in a sheet.
36929 "range": { # A range on a sheet. # The range over which these properties are applied.
36930 # All indexes are zero-based.
36931 # Indexes are half open, e.g the start index is inclusive
36932 # and the end index is exclusive -- [start_index, end_index).
36933 # Missing indexes indicate the range is unbounded on that side.
36934 #
36935 # For example, if `"Sheet1"` is sheet ID 0, then:
36936 #
36937 # `Sheet1!A1:A1 == sheet_id: 0,
36938 # start_row_index: 0, end_row_index: 1,
36939 # start_column_index: 0, end_column_index: 1`
36940 #
36941 # `Sheet1!A3:B4 == sheet_id: 0,
36942 # start_row_index: 2, end_row_index: 4,
36943 # start_column_index: 0, end_column_index: 2`
36944 #
36945 # `Sheet1!A:B == sheet_id: 0,
36946 # start_column_index: 0, end_column_index: 2`
36947 #
36948 # `Sheet1!A5:B == sheet_id: 0,
36949 # start_row_index: 4,
36950 # start_column_index: 0, end_column_index: 2`
36951 #
36952 # `Sheet1 == sheet_id:0`
36953 #
36954 # The start index must always be less than or equal to the end index.
36955 # If the start index equals the end index, then the range is empty.
36956 # Empty ranges are typically not meaningful and are usually rendered in the
36957 # UI as `#REF!`.
36958 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
36959 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
36960 "sheetId": 42, # The sheet this range is on.
36961 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
36962 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
36963 },
36964 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
36965 # by-column basis throughout all the columns in the range. At least one of
36966 # row_properties or column_properties must be specified.
36967 # BandedRange.row_properties and BandedRange.column_properties are
36968 # set, the fill colors are applied to cells according to the following rules:
36969 #
36970 # * header_color and footer_color take priority over band colors.
36971 # * first_band_color takes priority over second_band_color.
36972 # * row_properties takes priority over column_properties.
36973 #
36974 # For example, the first row color takes priority over the first column
36975 # color, but the first column color takes priority over the second row color.
36976 # Similarly, the row header takes priority over the column header in the
36977 # top left cell, but the column header takes priority over the first row
36978 # color if the row header is not set.
36979 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
36980 # for simplicity of conversion to/from color representations in various
36981 # languages over compactness; for example, the fields of this representation
36982 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
36983 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36984 # method in iOS; and, with just a little work, it can be easily formatted into
36985 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36986 #
36987 # Example (Java):
36988 #
36989 # import com.google.type.Color;
36990 #
36991 # // ...
36992 # public static java.awt.Color fromProto(Color protocolor) {
36993 # float alpha = protocolor.hasAlpha()
36994 # ? protocolor.getAlpha().getValue()
36995 # : 1.0;
36996 #
36997 # return new java.awt.Color(
36998 # protocolor.getRed(),
36999 # protocolor.getGreen(),
37000 # protocolor.getBlue(),
37001 # alpha);
37002 # }
37003 #
37004 # public static Color toProto(java.awt.Color color) {
37005 # float red = (float) color.getRed();
37006 # float green = (float) color.getGreen();
37007 # float blue = (float) color.getBlue();
37008 # float denominator = 255.0;
37009 # Color.Builder resultBuilder =
37010 # Color
37011 # .newBuilder()
37012 # .setRed(red / denominator)
37013 # .setGreen(green / denominator)
37014 # .setBlue(blue / denominator);
37015 # int alpha = color.getAlpha();
37016 # if (alpha != 255) {
37017 # result.setAlpha(
37018 # FloatValue
37019 # .newBuilder()
37020 # .setValue(((float) alpha) / denominator)
37021 # .build());
37022 # }
37023 # return resultBuilder.build();
37024 # }
37025 # // ...
37026 #
37027 # Example (iOS / Obj-C):
37028 #
37029 # // ...
37030 # static UIColor* fromProto(Color* protocolor) {
37031 # float red = [protocolor red];
37032 # float green = [protocolor green];
37033 # float blue = [protocolor blue];
37034 # FloatValue* alpha_wrapper = [protocolor alpha];
37035 # float alpha = 1.0;
37036 # if (alpha_wrapper != nil) {
37037 # alpha = [alpha_wrapper value];
37038 # }
37039 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
37040 # }
37041 #
37042 # static Color* toProto(UIColor* color) {
37043 # CGFloat red, green, blue, alpha;
37044 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
37045 # return nil;
37046 # }
37047 # Color* result = [Color alloc] init];
37048 # [result setRed:red];
37049 # [result setGreen:green];
37050 # [result setBlue:blue];
37051 # if (alpha <= 0.9999) {
37052 # [result setAlpha:floatWrapperWithValue(alpha)];
37053 # }
37054 # [result autorelease];
37055 # return result;
37056 # }
37057 # // ...
37058 #
37059 # Example (JavaScript):
37060 #
37061 # // ...
37062 #
37063 # var protoToCssColor = function(rgb_color) {
37064 # var redFrac = rgb_color.red || 0.0;
37065 # var greenFrac = rgb_color.green || 0.0;
37066 # var blueFrac = rgb_color.blue || 0.0;
37067 # var red = Math.floor(redFrac * 255);
37068 # var green = Math.floor(greenFrac * 255);
37069 # var blue = Math.floor(blueFrac * 255);
37070 #
37071 # if (!('alpha' in rgb_color)) {
37072 # return rgbToCssColor_(red, green, blue);
37073 # }
37074 #
37075 # var alphaFrac = rgb_color.alpha.value || 0.0;
37076 # var rgbParams = [red, green, blue].join(',');
37077 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
37078 # };
37079 #
37080 # var rgbToCssColor_ = function(red, green, blue) {
37081 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
37082 # var hexString = rgbNumber.toString(16);
37083 # var missingZeros = 6 - hexString.length;
37084 # var resultBuilder = ['#'];
37085 # for (var i = 0; i < missingZeros; i++) {
37086 # resultBuilder.push('0');
37087 # }
37088 # resultBuilder.push(hexString);
37089 # return resultBuilder.join('');
37090 # };
37091 #
37092 # // ...
37093 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
37094 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
37095 # the final pixel color is defined by the equation:
37096 #
37097 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
37098 #
37099 # This means that a value of 1.0 corresponds to a solid color, whereas
37100 # a value of 0.0 corresponds to a completely transparent color. This
37101 # uses a wrapper message rather than a simple float scalar so that it is
37102 # possible to distinguish between a default value and the value being unset.
37103 # If omitted, this color object is to be rendered as a solid color
37104 # (as if the alpha value had been explicitly given with a value of 1.0).
37105 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
37106 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
37107 },
37108 "headerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the first row or column. If this field is set, the first
37109 # row or column will be filled with this color and the colors will
37110 # alternate between first_band_color and second_band_color starting
37111 # from the second row or column. Otherwise, the first row or column will be
37112 # filled with first_band_color and the colors will proceed to alternate
37113 # as they normally would.
37114 # for simplicity of conversion to/from color representations in various
37115 # languages over compactness; for example, the fields of this representation
37116 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
37117 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
37118 # method in iOS; and, with just a little work, it can be easily formatted into
37119 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
37120 #
37121 # Example (Java):
37122 #
37123 # import com.google.type.Color;
37124 #
37125 # // ...
37126 # public static java.awt.Color fromProto(Color protocolor) {
37127 # float alpha = protocolor.hasAlpha()
37128 # ? protocolor.getAlpha().getValue()
37129 # : 1.0;
37130 #
37131 # return new java.awt.Color(
37132 # protocolor.getRed(),
37133 # protocolor.getGreen(),
37134 # protocolor.getBlue(),
37135 # alpha);
37136 # }
37137 #
37138 # public static Color toProto(java.awt.Color color) {
37139 # float red = (float) color.getRed();
37140 # float green = (float) color.getGreen();
37141 # float blue = (float) color.getBlue();
37142 # float denominator = 255.0;
37143 # Color.Builder resultBuilder =
37144 # Color
37145 # .newBuilder()
37146 # .setRed(red / denominator)
37147 # .setGreen(green / denominator)
37148 # .setBlue(blue / denominator);
37149 # int alpha = color.getAlpha();
37150 # if (alpha != 255) {
37151 # result.setAlpha(
37152 # FloatValue
37153 # .newBuilder()
37154 # .setValue(((float) alpha) / denominator)
37155 # .build());
37156 # }
37157 # return resultBuilder.build();
37158 # }
37159 # // ...
37160 #
37161 # Example (iOS / Obj-C):
37162 #
37163 # // ...
37164 # static UIColor* fromProto(Color* protocolor) {
37165 # float red = [protocolor red];
37166 # float green = [protocolor green];
37167 # float blue = [protocolor blue];
37168 # FloatValue* alpha_wrapper = [protocolor alpha];
37169 # float alpha = 1.0;
37170 # if (alpha_wrapper != nil) {
37171 # alpha = [alpha_wrapper value];
37172 # }
37173 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
37174 # }
37175 #
37176 # static Color* toProto(UIColor* color) {
37177 # CGFloat red, green, blue, alpha;
37178 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
37179 # return nil;
37180 # }
37181 # Color* result = [Color alloc] init];
37182 # [result setRed:red];
37183 # [result setGreen:green];
37184 # [result setBlue:blue];
37185 # if (alpha <= 0.9999) {
37186 # [result setAlpha:floatWrapperWithValue(alpha)];
37187 # }
37188 # [result autorelease];
37189 # return result;
37190 # }
37191 # // ...
37192 #
37193 # Example (JavaScript):
37194 #
37195 # // ...
37196 #
37197 # var protoToCssColor = function(rgb_color) {
37198 # var redFrac = rgb_color.red || 0.0;
37199 # var greenFrac = rgb_color.green || 0.0;
37200 # var blueFrac = rgb_color.blue || 0.0;
37201 # var red = Math.floor(redFrac * 255);
37202 # var green = Math.floor(greenFrac * 255);
37203 # var blue = Math.floor(blueFrac * 255);
37204 #
37205 # if (!('alpha' in rgb_color)) {
37206 # return rgbToCssColor_(red, green, blue);
37207 # }
37208 #
37209 # var alphaFrac = rgb_color.alpha.value || 0.0;
37210 # var rgbParams = [red, green, blue].join(',');
37211 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
37212 # };
37213 #
37214 # var rgbToCssColor_ = function(red, green, blue) {
37215 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
37216 # var hexString = rgbNumber.toString(16);
37217 # var missingZeros = 6 - hexString.length;
37218 # var resultBuilder = ['#'];
37219 # for (var i = 0; i < missingZeros; i++) {
37220 # resultBuilder.push('0');
37221 # }
37222 # resultBuilder.push(hexString);
37223 # return resultBuilder.join('');
37224 # };
37225 #
37226 # // ...
37227 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
37228 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
37229 # the final pixel color is defined by the equation:
37230 #
37231 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
37232 #
37233 # This means that a value of 1.0 corresponds to a solid color, whereas
37234 # a value of 0.0 corresponds to a completely transparent color. This
37235 # uses a wrapper message rather than a simple float scalar so that it is
37236 # possible to distinguish between a default value and the value being unset.
37237 # If omitted, this color object is to be rendered as a solid color
37238 # (as if the alpha value had been explicitly given with a value of 1.0).
37239 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
37240 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
37241 },
37242 "footerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the last row or column. If this field is not set, the last
37243 # row or column will be filled with either first_band_color or
37244 # second_band_color, depending on the color of the previous row or
37245 # column.
37246 # for simplicity of conversion to/from color representations in various
37247 # languages over compactness; for example, the fields of this representation
37248 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
37249 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
37250 # method in iOS; and, with just a little work, it can be easily formatted into
37251 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
37252 #
37253 # Example (Java):
37254 #
37255 # import com.google.type.Color;
37256 #
37257 # // ...
37258 # public static java.awt.Color fromProto(Color protocolor) {
37259 # float alpha = protocolor.hasAlpha()
37260 # ? protocolor.getAlpha().getValue()
37261 # : 1.0;
37262 #
37263 # return new java.awt.Color(
37264 # protocolor.getRed(),
37265 # protocolor.getGreen(),
37266 # protocolor.getBlue(),
37267 # alpha);
37268 # }
37269 #
37270 # public static Color toProto(java.awt.Color color) {
37271 # float red = (float) color.getRed();
37272 # float green = (float) color.getGreen();
37273 # float blue = (float) color.getBlue();
37274 # float denominator = 255.0;
37275 # Color.Builder resultBuilder =
37276 # Color
37277 # .newBuilder()
37278 # .setRed(red / denominator)
37279 # .setGreen(green / denominator)
37280 # .setBlue(blue / denominator);
37281 # int alpha = color.getAlpha();
37282 # if (alpha != 255) {
37283 # result.setAlpha(
37284 # FloatValue
37285 # .newBuilder()
37286 # .setValue(((float) alpha) / denominator)
37287 # .build());
37288 # }
37289 # return resultBuilder.build();
37290 # }
37291 # // ...
37292 #
37293 # Example (iOS / Obj-C):
37294 #
37295 # // ...
37296 # static UIColor* fromProto(Color* protocolor) {
37297 # float red = [protocolor red];
37298 # float green = [protocolor green];
37299 # float blue = [protocolor blue];
37300 # FloatValue* alpha_wrapper = [protocolor alpha];
37301 # float alpha = 1.0;
37302 # if (alpha_wrapper != nil) {
37303 # alpha = [alpha_wrapper value];
37304 # }
37305 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
37306 # }
37307 #
37308 # static Color* toProto(UIColor* color) {
37309 # CGFloat red, green, blue, alpha;
37310 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
37311 # return nil;
37312 # }
37313 # Color* result = [Color alloc] init];
37314 # [result setRed:red];
37315 # [result setGreen:green];
37316 # [result setBlue:blue];
37317 # if (alpha <= 0.9999) {
37318 # [result setAlpha:floatWrapperWithValue(alpha)];
37319 # }
37320 # [result autorelease];
37321 # return result;
37322 # }
37323 # // ...
37324 #
37325 # Example (JavaScript):
37326 #
37327 # // ...
37328 #
37329 # var protoToCssColor = function(rgb_color) {
37330 # var redFrac = rgb_color.red || 0.0;
37331 # var greenFrac = rgb_color.green || 0.0;
37332 # var blueFrac = rgb_color.blue || 0.0;
37333 # var red = Math.floor(redFrac * 255);
37334 # var green = Math.floor(greenFrac * 255);
37335 # var blue = Math.floor(blueFrac * 255);
37336 #
37337 # if (!('alpha' in rgb_color)) {
37338 # return rgbToCssColor_(red, green, blue);
37339 # }
37340 #
37341 # var alphaFrac = rgb_color.alpha.value || 0.0;
37342 # var rgbParams = [red, green, blue].join(',');
37343 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
37344 # };
37345 #
37346 # var rgbToCssColor_ = function(red, green, blue) {
37347 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
37348 # var hexString = rgbNumber.toString(16);
37349 # var missingZeros = 6 - hexString.length;
37350 # var resultBuilder = ['#'];
37351 # for (var i = 0; i < missingZeros; i++) {
37352 # resultBuilder.push('0');
37353 # }
37354 # resultBuilder.push(hexString);
37355 # return resultBuilder.join('');
37356 # };
37357 #
37358 # // ...
37359 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
37360 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
37361 # the final pixel color is defined by the equation:
37362 #
37363 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
37364 #
37365 # This means that a value of 1.0 corresponds to a solid color, whereas
37366 # a value of 0.0 corresponds to a completely transparent color. This
37367 # uses a wrapper message rather than a simple float scalar so that it is
37368 # possible to distinguish between a default value and the value being unset.
37369 # If omitted, this color object is to be rendered as a solid color
37370 # (as if the alpha value had been explicitly given with a value of 1.0).
37371 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
37372 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
37373 },
37374 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
37375 # for simplicity of conversion to/from color representations in various
37376 # languages over compactness; for example, the fields of this representation
37377 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
37378 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
37379 # method in iOS; and, with just a little work, it can be easily formatted into
37380 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
37381 #
37382 # Example (Java):
37383 #
37384 # import com.google.type.Color;
37385 #
37386 # // ...
37387 # public static java.awt.Color fromProto(Color protocolor) {
37388 # float alpha = protocolor.hasAlpha()
37389 # ? protocolor.getAlpha().getValue()
37390 # : 1.0;
37391 #
37392 # return new java.awt.Color(
37393 # protocolor.getRed(),
37394 # protocolor.getGreen(),
37395 # protocolor.getBlue(),
37396 # alpha);
37397 # }
37398 #
37399 # public static Color toProto(java.awt.Color color) {
37400 # float red = (float) color.getRed();
37401 # float green = (float) color.getGreen();
37402 # float blue = (float) color.getBlue();
37403 # float denominator = 255.0;
37404 # Color.Builder resultBuilder =
37405 # Color
37406 # .newBuilder()
37407 # .setRed(red / denominator)
37408 # .setGreen(green / denominator)
37409 # .setBlue(blue / denominator);
37410 # int alpha = color.getAlpha();
37411 # if (alpha != 255) {
37412 # result.setAlpha(
37413 # FloatValue
37414 # .newBuilder()
37415 # .setValue(((float) alpha) / denominator)
37416 # .build());
37417 # }
37418 # return resultBuilder.build();
37419 # }
37420 # // ...
37421 #
37422 # Example (iOS / Obj-C):
37423 #
37424 # // ...
37425 # static UIColor* fromProto(Color* protocolor) {
37426 # float red = [protocolor red];
37427 # float green = [protocolor green];
37428 # float blue = [protocolor blue];
37429 # FloatValue* alpha_wrapper = [protocolor alpha];
37430 # float alpha = 1.0;
37431 # if (alpha_wrapper != nil) {
37432 # alpha = [alpha_wrapper value];
37433 # }
37434 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
37435 # }
37436 #
37437 # static Color* toProto(UIColor* color) {
37438 # CGFloat red, green, blue, alpha;
37439 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
37440 # return nil;
37441 # }
37442 # Color* result = [Color alloc] init];
37443 # [result setRed:red];
37444 # [result setGreen:green];
37445 # [result setBlue:blue];
37446 # if (alpha <= 0.9999) {
37447 # [result setAlpha:floatWrapperWithValue(alpha)];
37448 # }
37449 # [result autorelease];
37450 # return result;
37451 # }
37452 # // ...
37453 #
37454 # Example (JavaScript):
37455 #
37456 # // ...
37457 #
37458 # var protoToCssColor = function(rgb_color) {
37459 # var redFrac = rgb_color.red || 0.0;
37460 # var greenFrac = rgb_color.green || 0.0;
37461 # var blueFrac = rgb_color.blue || 0.0;
37462 # var red = Math.floor(redFrac * 255);
37463 # var green = Math.floor(greenFrac * 255);
37464 # var blue = Math.floor(blueFrac * 255);
37465 #
37466 # if (!('alpha' in rgb_color)) {
37467 # return rgbToCssColor_(red, green, blue);
37468 # }
37469 #
37470 # var alphaFrac = rgb_color.alpha.value || 0.0;
37471 # var rgbParams = [red, green, blue].join(',');
37472 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
37473 # };
37474 #
37475 # var rgbToCssColor_ = function(red, green, blue) {
37476 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
37477 # var hexString = rgbNumber.toString(16);
37478 # var missingZeros = 6 - hexString.length;
37479 # var resultBuilder = ['#'];
37480 # for (var i = 0; i < missingZeros; i++) {
37481 # resultBuilder.push('0');
37482 # }
37483 # resultBuilder.push(hexString);
37484 # return resultBuilder.join('');
37485 # };
37486 #
37487 # // ...
37488 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
37489 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
37490 # the final pixel color is defined by the equation:
37491 #
37492 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
37493 #
37494 # This means that a value of 1.0 corresponds to a solid color, whereas
37495 # a value of 0.0 corresponds to a completely transparent color. This
37496 # uses a wrapper message rather than a simple float scalar so that it is
37497 # possible to distinguish between a default value and the value being unset.
37498 # If omitted, this color object is to be rendered as a solid color
37499 # (as if the alpha value had been explicitly given with a value of 1.0).
37500 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
37501 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
37502 },
37503 },
37504 "rowProperties": { # Properties referring a single dimension (either row or column). If both # Properties for row bands. These properties will be applied on a row-by-row
37505 # basis throughout all the rows in the range. At least one of
37506 # row_properties or column_properties must be specified.
37507 # BandedRange.row_properties and BandedRange.column_properties are
37508 # set, the fill colors are applied to cells according to the following rules:
37509 #
37510 # * header_color and footer_color take priority over band colors.
37511 # * first_band_color takes priority over second_band_color.
37512 # * row_properties takes priority over column_properties.
37513 #
37514 # For example, the first row color takes priority over the first column
37515 # color, but the first column color takes priority over the second row color.
37516 # Similarly, the row header takes priority over the column header in the
37517 # top left cell, but the column header takes priority over the first row
37518 # color if the row header is not set.
37519 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
37520 # for simplicity of conversion to/from color representations in various
37521 # languages over compactness; for example, the fields of this representation
37522 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
37523 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
37524 # method in iOS; and, with just a little work, it can be easily formatted into
37525 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
37526 #
37527 # Example (Java):
37528 #
37529 # import com.google.type.Color;
37530 #
37531 # // ...
37532 # public static java.awt.Color fromProto(Color protocolor) {
37533 # float alpha = protocolor.hasAlpha()
37534 # ? protocolor.getAlpha().getValue()
37535 # : 1.0;
37536 #
37537 # return new java.awt.Color(
37538 # protocolor.getRed(),
37539 # protocolor.getGreen(),
37540 # protocolor.getBlue(),
37541 # alpha);
37542 # }
37543 #
37544 # public static Color toProto(java.awt.Color color) {
37545 # float red = (float) color.getRed();
37546 # float green = (float) color.getGreen();
37547 # float blue = (float) color.getBlue();
37548 # float denominator = 255.0;
37549 # Color.Builder resultBuilder =
37550 # Color
37551 # .newBuilder()
37552 # .setRed(red / denominator)
37553 # .setGreen(green / denominator)
37554 # .setBlue(blue / denominator);
37555 # int alpha = color.getAlpha();
37556 # if (alpha != 255) {
37557 # result.setAlpha(
37558 # FloatValue
37559 # .newBuilder()
37560 # .setValue(((float) alpha) / denominator)
37561 # .build());
37562 # }
37563 # return resultBuilder.build();
37564 # }
37565 # // ...
37566 #
37567 # Example (iOS / Obj-C):
37568 #
37569 # // ...
37570 # static UIColor* fromProto(Color* protocolor) {
37571 # float red = [protocolor red];
37572 # float green = [protocolor green];
37573 # float blue = [protocolor blue];
37574 # FloatValue* alpha_wrapper = [protocolor alpha];
37575 # float alpha = 1.0;
37576 # if (alpha_wrapper != nil) {
37577 # alpha = [alpha_wrapper value];
37578 # }
37579 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
37580 # }
37581 #
37582 # static Color* toProto(UIColor* color) {
37583 # CGFloat red, green, blue, alpha;
37584 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
37585 # return nil;
37586 # }
37587 # Color* result = [Color alloc] init];
37588 # [result setRed:red];
37589 # [result setGreen:green];
37590 # [result setBlue:blue];
37591 # if (alpha <= 0.9999) {
37592 # [result setAlpha:floatWrapperWithValue(alpha)];
37593 # }
37594 # [result autorelease];
37595 # return result;
37596 # }
37597 # // ...
37598 #
37599 # Example (JavaScript):
37600 #
37601 # // ...
37602 #
37603 # var protoToCssColor = function(rgb_color) {
37604 # var redFrac = rgb_color.red || 0.0;
37605 # var greenFrac = rgb_color.green || 0.0;
37606 # var blueFrac = rgb_color.blue || 0.0;
37607 # var red = Math.floor(redFrac * 255);
37608 # var green = Math.floor(greenFrac * 255);
37609 # var blue = Math.floor(blueFrac * 255);
37610 #
37611 # if (!('alpha' in rgb_color)) {
37612 # return rgbToCssColor_(red, green, blue);
37613 # }
37614 #
37615 # var alphaFrac = rgb_color.alpha.value || 0.0;
37616 # var rgbParams = [red, green, blue].join(',');
37617 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
37618 # };
37619 #
37620 # var rgbToCssColor_ = function(red, green, blue) {
37621 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
37622 # var hexString = rgbNumber.toString(16);
37623 # var missingZeros = 6 - hexString.length;
37624 # var resultBuilder = ['#'];
37625 # for (var i = 0; i < missingZeros; i++) {
37626 # resultBuilder.push('0');
37627 # }
37628 # resultBuilder.push(hexString);
37629 # return resultBuilder.join('');
37630 # };
37631 #
37632 # // ...
37633 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
37634 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
37635 # the final pixel color is defined by the equation:
37636 #
37637 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
37638 #
37639 # This means that a value of 1.0 corresponds to a solid color, whereas
37640 # a value of 0.0 corresponds to a completely transparent color. This
37641 # uses a wrapper message rather than a simple float scalar so that it is
37642 # possible to distinguish between a default value and the value being unset.
37643 # If omitted, this color object is to be rendered as a solid color
37644 # (as if the alpha value had been explicitly given with a value of 1.0).
37645 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
37646 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
37647 },
37648 "headerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the first row or column. If this field is set, the first
37649 # row or column will be filled with this color and the colors will
37650 # alternate between first_band_color and second_band_color starting
37651 # from the second row or column. Otherwise, the first row or column will be
37652 # filled with first_band_color and the colors will proceed to alternate
37653 # as they normally would.
37654 # for simplicity of conversion to/from color representations in various
37655 # languages over compactness; for example, the fields of this representation
37656 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
37657 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
37658 # method in iOS; and, with just a little work, it can be easily formatted into
37659 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
37660 #
37661 # Example (Java):
37662 #
37663 # import com.google.type.Color;
37664 #
37665 # // ...
37666 # public static java.awt.Color fromProto(Color protocolor) {
37667 # float alpha = protocolor.hasAlpha()
37668 # ? protocolor.getAlpha().getValue()
37669 # : 1.0;
37670 #
37671 # return new java.awt.Color(
37672 # protocolor.getRed(),
37673 # protocolor.getGreen(),
37674 # protocolor.getBlue(),
37675 # alpha);
37676 # }
37677 #
37678 # public static Color toProto(java.awt.Color color) {
37679 # float red = (float) color.getRed();
37680 # float green = (float) color.getGreen();
37681 # float blue = (float) color.getBlue();
37682 # float denominator = 255.0;
37683 # Color.Builder resultBuilder =
37684 # Color
37685 # .newBuilder()
37686 # .setRed(red / denominator)
37687 # .setGreen(green / denominator)
37688 # .setBlue(blue / denominator);
37689 # int alpha = color.getAlpha();
37690 # if (alpha != 255) {
37691 # result.setAlpha(
37692 # FloatValue
37693 # .newBuilder()
37694 # .setValue(((float) alpha) / denominator)
37695 # .build());
37696 # }
37697 # return resultBuilder.build();
37698 # }
37699 # // ...
37700 #
37701 # Example (iOS / Obj-C):
37702 #
37703 # // ...
37704 # static UIColor* fromProto(Color* protocolor) {
37705 # float red = [protocolor red];
37706 # float green = [protocolor green];
37707 # float blue = [protocolor blue];
37708 # FloatValue* alpha_wrapper = [protocolor alpha];
37709 # float alpha = 1.0;
37710 # if (alpha_wrapper != nil) {
37711 # alpha = [alpha_wrapper value];
37712 # }
37713 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
37714 # }
37715 #
37716 # static Color* toProto(UIColor* color) {
37717 # CGFloat red, green, blue, alpha;
37718 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
37719 # return nil;
37720 # }
37721 # Color* result = [Color alloc] init];
37722 # [result setRed:red];
37723 # [result setGreen:green];
37724 # [result setBlue:blue];
37725 # if (alpha <= 0.9999) {
37726 # [result setAlpha:floatWrapperWithValue(alpha)];
37727 # }
37728 # [result autorelease];
37729 # return result;
37730 # }
37731 # // ...
37732 #
37733 # Example (JavaScript):
37734 #
37735 # // ...
37736 #
37737 # var protoToCssColor = function(rgb_color) {
37738 # var redFrac = rgb_color.red || 0.0;
37739 # var greenFrac = rgb_color.green || 0.0;
37740 # var blueFrac = rgb_color.blue || 0.0;
37741 # var red = Math.floor(redFrac * 255);
37742 # var green = Math.floor(greenFrac * 255);
37743 # var blue = Math.floor(blueFrac * 255);
37744 #
37745 # if (!('alpha' in rgb_color)) {
37746 # return rgbToCssColor_(red, green, blue);
37747 # }
37748 #
37749 # var alphaFrac = rgb_color.alpha.value || 0.0;
37750 # var rgbParams = [red, green, blue].join(',');
37751 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
37752 # };
37753 #
37754 # var rgbToCssColor_ = function(red, green, blue) {
37755 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
37756 # var hexString = rgbNumber.toString(16);
37757 # var missingZeros = 6 - hexString.length;
37758 # var resultBuilder = ['#'];
37759 # for (var i = 0; i < missingZeros; i++) {
37760 # resultBuilder.push('0');
37761 # }
37762 # resultBuilder.push(hexString);
37763 # return resultBuilder.join('');
37764 # };
37765 #
37766 # // ...
37767 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
37768 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
37769 # the final pixel color is defined by the equation:
37770 #
37771 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
37772 #
37773 # This means that a value of 1.0 corresponds to a solid color, whereas
37774 # a value of 0.0 corresponds to a completely transparent color. This
37775 # uses a wrapper message rather than a simple float scalar so that it is
37776 # possible to distinguish between a default value and the value being unset.
37777 # If omitted, this color object is to be rendered as a solid color
37778 # (as if the alpha value had been explicitly given with a value of 1.0).
37779 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
37780 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
37781 },
37782 "footerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the last row or column. If this field is not set, the last
37783 # row or column will be filled with either first_band_color or
37784 # second_band_color, depending on the color of the previous row or
37785 # column.
37786 # for simplicity of conversion to/from color representations in various
37787 # languages over compactness; for example, the fields of this representation
37788 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
37789 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
37790 # method in iOS; and, with just a little work, it can be easily formatted into
37791 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
37792 #
37793 # Example (Java):
37794 #
37795 # import com.google.type.Color;
37796 #
37797 # // ...
37798 # public static java.awt.Color fromProto(Color protocolor) {
37799 # float alpha = protocolor.hasAlpha()
37800 # ? protocolor.getAlpha().getValue()
37801 # : 1.0;
37802 #
37803 # return new java.awt.Color(
37804 # protocolor.getRed(),
37805 # protocolor.getGreen(),
37806 # protocolor.getBlue(),
37807 # alpha);
37808 # }
37809 #
37810 # public static Color toProto(java.awt.Color color) {
37811 # float red = (float) color.getRed();
37812 # float green = (float) color.getGreen();
37813 # float blue = (float) color.getBlue();
37814 # float denominator = 255.0;
37815 # Color.Builder resultBuilder =
37816 # Color
37817 # .newBuilder()
37818 # .setRed(red / denominator)
37819 # .setGreen(green / denominator)
37820 # .setBlue(blue / denominator);
37821 # int alpha = color.getAlpha();
37822 # if (alpha != 255) {
37823 # result.setAlpha(
37824 # FloatValue
37825 # .newBuilder()
37826 # .setValue(((float) alpha) / denominator)
37827 # .build());
37828 # }
37829 # return resultBuilder.build();
37830 # }
37831 # // ...
37832 #
37833 # Example (iOS / Obj-C):
37834 #
37835 # // ...
37836 # static UIColor* fromProto(Color* protocolor) {
37837 # float red = [protocolor red];
37838 # float green = [protocolor green];
37839 # float blue = [protocolor blue];
37840 # FloatValue* alpha_wrapper = [protocolor alpha];
37841 # float alpha = 1.0;
37842 # if (alpha_wrapper != nil) {
37843 # alpha = [alpha_wrapper value];
37844 # }
37845 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
37846 # }
37847 #
37848 # static Color* toProto(UIColor* color) {
37849 # CGFloat red, green, blue, alpha;
37850 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
37851 # return nil;
37852 # }
37853 # Color* result = [Color alloc] init];
37854 # [result setRed:red];
37855 # [result setGreen:green];
37856 # [result setBlue:blue];
37857 # if (alpha <= 0.9999) {
37858 # [result setAlpha:floatWrapperWithValue(alpha)];
37859 # }
37860 # [result autorelease];
37861 # return result;
37862 # }
37863 # // ...
37864 #
37865 # Example (JavaScript):
37866 #
37867 # // ...
37868 #
37869 # var protoToCssColor = function(rgb_color) {
37870 # var redFrac = rgb_color.red || 0.0;
37871 # var greenFrac = rgb_color.green || 0.0;
37872 # var blueFrac = rgb_color.blue || 0.0;
37873 # var red = Math.floor(redFrac * 255);
37874 # var green = Math.floor(greenFrac * 255);
37875 # var blue = Math.floor(blueFrac * 255);
37876 #
37877 # if (!('alpha' in rgb_color)) {
37878 # return rgbToCssColor_(red, green, blue);
37879 # }
37880 #
37881 # var alphaFrac = rgb_color.alpha.value || 0.0;
37882 # var rgbParams = [red, green, blue].join(',');
37883 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
37884 # };
37885 #
37886 # var rgbToCssColor_ = function(red, green, blue) {
37887 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
37888 # var hexString = rgbNumber.toString(16);
37889 # var missingZeros = 6 - hexString.length;
37890 # var resultBuilder = ['#'];
37891 # for (var i = 0; i < missingZeros; i++) {
37892 # resultBuilder.push('0');
37893 # }
37894 # resultBuilder.push(hexString);
37895 # return resultBuilder.join('');
37896 # };
37897 #
37898 # // ...
37899 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
37900 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
37901 # the final pixel color is defined by the equation:
37902 #
37903 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
37904 #
37905 # This means that a value of 1.0 corresponds to a solid color, whereas
37906 # a value of 0.0 corresponds to a completely transparent color. This
37907 # uses a wrapper message rather than a simple float scalar so that it is
37908 # possible to distinguish between a default value and the value being unset.
37909 # If omitted, this color object is to be rendered as a solid color
37910 # (as if the alpha value had been explicitly given with a value of 1.0).
37911 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
37912 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
37913 },
37914 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
37915 # for simplicity of conversion to/from color representations in various
37916 # languages over compactness; for example, the fields of this representation
37917 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
37918 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
37919 # method in iOS; and, with just a little work, it can be easily formatted into
37920 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
37921 #
37922 # Example (Java):
37923 #
37924 # import com.google.type.Color;
37925 #
37926 # // ...
37927 # public static java.awt.Color fromProto(Color protocolor) {
37928 # float alpha = protocolor.hasAlpha()
37929 # ? protocolor.getAlpha().getValue()
37930 # : 1.0;
37931 #
37932 # return new java.awt.Color(
37933 # protocolor.getRed(),
37934 # protocolor.getGreen(),
37935 # protocolor.getBlue(),
37936 # alpha);
37937 # }
37938 #
37939 # public static Color toProto(java.awt.Color color) {
37940 # float red = (float) color.getRed();
37941 # float green = (float) color.getGreen();
37942 # float blue = (float) color.getBlue();
37943 # float denominator = 255.0;
37944 # Color.Builder resultBuilder =
37945 # Color
37946 # .newBuilder()
37947 # .setRed(red / denominator)
37948 # .setGreen(green / denominator)
37949 # .setBlue(blue / denominator);
37950 # int alpha = color.getAlpha();
37951 # if (alpha != 255) {
37952 # result.setAlpha(
37953 # FloatValue
37954 # .newBuilder()
37955 # .setValue(((float) alpha) / denominator)
37956 # .build());
37957 # }
37958 # return resultBuilder.build();
37959 # }
37960 # // ...
37961 #
37962 # Example (iOS / Obj-C):
37963 #
37964 # // ...
37965 # static UIColor* fromProto(Color* protocolor) {
37966 # float red = [protocolor red];
37967 # float green = [protocolor green];
37968 # float blue = [protocolor blue];
37969 # FloatValue* alpha_wrapper = [protocolor alpha];
37970 # float alpha = 1.0;
37971 # if (alpha_wrapper != nil) {
37972 # alpha = [alpha_wrapper value];
37973 # }
37974 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
37975 # }
37976 #
37977 # static Color* toProto(UIColor* color) {
37978 # CGFloat red, green, blue, alpha;
37979 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
37980 # return nil;
37981 # }
37982 # Color* result = [Color alloc] init];
37983 # [result setRed:red];
37984 # [result setGreen:green];
37985 # [result setBlue:blue];
37986 # if (alpha <= 0.9999) {
37987 # [result setAlpha:floatWrapperWithValue(alpha)];
37988 # }
37989 # [result autorelease];
37990 # return result;
37991 # }
37992 # // ...
37993 #
37994 # Example (JavaScript):
37995 #
37996 # // ...
37997 #
37998 # var protoToCssColor = function(rgb_color) {
37999 # var redFrac = rgb_color.red || 0.0;
38000 # var greenFrac = rgb_color.green || 0.0;
38001 # var blueFrac = rgb_color.blue || 0.0;
38002 # var red = Math.floor(redFrac * 255);
38003 # var green = Math.floor(greenFrac * 255);
38004 # var blue = Math.floor(blueFrac * 255);
38005 #
38006 # if (!('alpha' in rgb_color)) {
38007 # return rgbToCssColor_(red, green, blue);
38008 # }
38009 #
38010 # var alphaFrac = rgb_color.alpha.value || 0.0;
38011 # var rgbParams = [red, green, blue].join(',');
38012 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
38013 # };
38014 #
38015 # var rgbToCssColor_ = function(red, green, blue) {
38016 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
38017 # var hexString = rgbNumber.toString(16);
38018 # var missingZeros = 6 - hexString.length;
38019 # var resultBuilder = ['#'];
38020 # for (var i = 0; i < missingZeros; i++) {
38021 # resultBuilder.push('0');
38022 # }
38023 # resultBuilder.push(hexString);
38024 # return resultBuilder.join('');
38025 # };
38026 #
38027 # // ...
38028 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
38029 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
38030 # the final pixel color is defined by the equation:
38031 #
38032 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
38033 #
38034 # This means that a value of 1.0 corresponds to a solid color, whereas
38035 # a value of 0.0 corresponds to a completely transparent color. This
38036 # uses a wrapper message rather than a simple float scalar so that it is
38037 # possible to distinguish between a default value and the value being unset.
38038 # If omitted, this color object is to be rendered as a solid color
38039 # (as if the alpha value had been explicitly given with a value of 1.0).
38040 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
38041 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
38042 },
38043 },
38044 "bandedRangeId": 42, # The id of the banded range.
38045 },
38046 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038047 "merges": [ # The ranges that are merged together.
38048 { # A range on a sheet.
38049 # All indexes are zero-based.
38050 # Indexes are half open, e.g the start index is inclusive
38051 # and the end index is exclusive -- [start_index, end_index).
38052 # Missing indexes indicate the range is unbounded on that side.
38053 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038054 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038055 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038056 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038057 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038058 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038059 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038060 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038061 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038062 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038063 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038064 # `Sheet1!A:B == sheet_id: 0,
38065 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038066 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038067 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038068 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038069 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038070 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038071 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038072 #
38073 # The start index must always be less than or equal to the end index.
38074 # If the start index equals the end index, then the range is empty.
38075 # Empty ranges are typically not meaningful and are usually rendered in the
38076 # UI as `#REF!`.
38077 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
38078 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
38079 "sheetId": 42, # The sheet this range is on.
38080 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
38081 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
38082 },
38083 ],
38084 "basicFilter": { # The default filter associated with a sheet. # The filter on this sheet, if any.
38085 "range": { # A range on a sheet. # The range the filter covers.
38086 # All indexes are zero-based.
38087 # Indexes are half open, e.g the start index is inclusive
38088 # and the end index is exclusive -- [start_index, end_index).
38089 # Missing indexes indicate the range is unbounded on that side.
38090 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038091 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038092 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038093 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038094 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038095 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038096 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038097 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038098 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038099 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038100 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038101 # `Sheet1!A:B == sheet_id: 0,
38102 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038103 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038104 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038105 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038106 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038107 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038108 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038109 #
38110 # The start index must always be less than or equal to the end index.
38111 # If the start index equals the end index, then the range is empty.
38112 # Empty ranges are typically not meaningful and are usually rendered in the
38113 # UI as `#REF!`.
38114 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
38115 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
38116 "sheetId": 42, # The sheet this range is on.
38117 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
38118 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
38119 },
38120 "sortSpecs": [ # The sort order per column. Later specifications are used when values
38121 # are equal in the earlier specifications.
38122 { # A sort order associated with a specific column or row.
38123 "sortOrder": "A String", # The order data should be sorted.
38124 "dimensionIndex": 42, # The dimension the sort should be applied to.
38125 },
38126 ],
38127 "criteria": { # The criteria for showing/hiding values per column.
38128 # The map's key is the column index, and the value is the criteria for
38129 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038130 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038131 "hiddenValues": [ # Values that should be hidden.
38132 "A String",
38133 ],
38134 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
38135 # (This does not override hiddenValues -- if a value is listed there,
38136 # it will still be hidden.)
38137 # BooleanConditions are used by conditional formatting,
38138 # data validation, and the criteria in filters.
38139 "type": "A String", # The type of condition.
38140 "values": [ # The values of the condition. The number of supported values depends
38141 # on the condition type. Some support zero values,
38142 # others one or two values,
38143 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
38144 { # The value of the condition.
38145 "relativeDate": "A String", # A relative date (based on the current date).
38146 # Valid only if the type is
38147 # DATE_BEFORE,
38148 # DATE_AFTER,
38149 # DATE_ON_OR_BEFORE or
38150 # DATE_ON_OR_AFTER.
38151 #
38152 # Relative dates are not supported in data validation.
38153 # They are supported only in conditional formatting and
38154 # conditional filters.
38155 "userEnteredValue": "A String", # A value the condition is based on.
38156 # The value will be parsed as if the user typed into a cell.
38157 # Formulas are supported (and must begin with an `=`).
38158 },
38159 ],
38160 },
38161 },
38162 },
38163 },
38164 "charts": [ # The specifications of every chart on this sheet.
38165 { # A chart embedded in a sheet.
38166 "chartId": 42, # The ID of the chart.
38167 "position": { # The position of an embedded object such as a chart. # The position of the chart.
38168 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
38169 # is chosen for you. Used only when writing.
38170 "sheetId": 42, # The sheet this is on. Set only if the embedded object
38171 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038172 "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 -070038173 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
38174 # All indexes are zero-based.
38175 "rowIndex": 42, # The row index of the coordinate.
38176 "columnIndex": 42, # The column index of the coordinate.
38177 "sheetId": 42, # The sheet this coordinate is on.
38178 },
38179 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
38180 # from the anchor cell.
38181 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
38182 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
38183 # from the anchor cell.
38184 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
38185 },
38186 },
38187 "spec": { # The specifications of a chart. # The specification of the chart.
38188 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038189 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
38190 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
38191 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
38192 "sources": [ # The ranges of data for a series or domain.
38193 # Exactly one dimension must have a length of 1,
38194 # and all sources in the list must have the same dimension
38195 # with length 1.
38196 # The domain (if it exists) & all series must have the same number
38197 # of source ranges. If using more than one source range, then the source
38198 # range at a given offset must be contiguous across the domain and series.
38199 #
38200 # For example, these are valid configurations:
38201 #
38202 # domain sources: A1:A5
38203 # series1 sources: B1:B5
38204 # series2 sources: D6:D10
38205 #
38206 # domain sources: A1:A5, C10:C12
38207 # series1 sources: B1:B5, D10:D12
38208 # series2 sources: C1:C5, E10:E12
38209 { # A range on a sheet.
38210 # All indexes are zero-based.
38211 # Indexes are half open, e.g the start index is inclusive
38212 # and the end index is exclusive -- [start_index, end_index).
38213 # Missing indexes indicate the range is unbounded on that side.
38214 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038215 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038216 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038217 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038218 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038219 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038220 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038221 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038222 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038223 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038224 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038225 # `Sheet1!A:B == sheet_id: 0,
38226 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038227 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038228 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038229 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038230 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038231 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038232 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038233 #
38234 # The start index must always be less than or equal to the end index.
38235 # If the start index equals the end index, then the range is empty.
38236 # Empty ranges are typically not meaningful and are usually rendered in the
38237 # UI as `#REF!`.
38238 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
38239 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
38240 "sheetId": 42, # The sheet this range is on.
38241 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
38242 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
38243 },
38244 ],
38245 },
38246 },
38247 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
38248 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
38249 "sources": [ # The ranges of data for a series or domain.
38250 # Exactly one dimension must have a length of 1,
38251 # and all sources in the list must have the same dimension
38252 # with length 1.
38253 # The domain (if it exists) & all series must have the same number
38254 # of source ranges. If using more than one source range, then the source
38255 # range at a given offset must be contiguous across the domain and series.
38256 #
38257 # For example, these are valid configurations:
38258 #
38259 # domain sources: A1:A5
38260 # series1 sources: B1:B5
38261 # series2 sources: D6:D10
38262 #
38263 # domain sources: A1:A5, C10:C12
38264 # series1 sources: B1:B5, D10:D12
38265 # series2 sources: C1:C5, E10:E12
38266 { # A range on a sheet.
38267 # All indexes are zero-based.
38268 # Indexes are half open, e.g the start index is inclusive
38269 # and the end index is exclusive -- [start_index, end_index).
38270 # Missing indexes indicate the range is unbounded on that side.
38271 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038272 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038273 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038274 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038275 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038276 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038277 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038278 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038279 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038280 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038281 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038282 # `Sheet1!A:B == sheet_id: 0,
38283 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038284 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038285 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038286 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038287 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038288 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038289 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038290 #
38291 # The start index must always be less than or equal to the end index.
38292 # If the start index equals the end index, then the range is empty.
38293 # Empty ranges are typically not meaningful and are usually rendered in the
38294 # UI as `#REF!`.
38295 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
38296 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
38297 "sheetId": 42, # The sheet this range is on.
38298 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
38299 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
38300 },
38301 ],
38302 },
38303 },
38304 "threeDimensional": True or False, # True if the pie is three dimensional.
38305 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
38306 "pieHole": 3.14, # The size of the hole in the pie chart.
38307 },
38308 "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 -070038309 # See BasicChartType for the list of all
38310 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038311 # of charts this supports.
38312 "headerCount": 42, # The number of rows or columns in the data that are "headers".
38313 # If not set, Google Sheets will guess how many rows are headers based
38314 # on the data.
38315 #
38316 # (Note that BasicChartAxis.title may override the axis title
38317 # inferred from the header values.)
38318 "series": [ # The data this chart is visualizing.
38319 { # A single series of data in a chart.
38320 # For example, if charting stock prices over time, multiple series may exist,
38321 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
38322 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
38323 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
38324 "sources": [ # The ranges of data for a series or domain.
38325 # Exactly one dimension must have a length of 1,
38326 # and all sources in the list must have the same dimension
38327 # with length 1.
38328 # The domain (if it exists) & all series must have the same number
38329 # of source ranges. If using more than one source range, then the source
38330 # range at a given offset must be contiguous across the domain and series.
38331 #
38332 # For example, these are valid configurations:
38333 #
38334 # domain sources: A1:A5
38335 # series1 sources: B1:B5
38336 # series2 sources: D6:D10
38337 #
38338 # domain sources: A1:A5, C10:C12
38339 # series1 sources: B1:B5, D10:D12
38340 # series2 sources: C1:C5, E10:E12
38341 { # A range on a sheet.
38342 # All indexes are zero-based.
38343 # Indexes are half open, e.g the start index is inclusive
38344 # and the end index is exclusive -- [start_index, end_index).
38345 # Missing indexes indicate the range is unbounded on that side.
38346 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038347 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038348 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038349 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038350 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038351 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038352 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038353 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038354 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038355 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038356 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038357 # `Sheet1!A:B == sheet_id: 0,
38358 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038359 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038360 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038361 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038362 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038363 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038364 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038365 #
38366 # The start index must always be less than or equal to the end index.
38367 # If the start index equals the end index, then the range is empty.
38368 # Empty ranges are typically not meaningful and are usually rendered in the
38369 # UI as `#REF!`.
38370 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
38371 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
38372 "sheetId": 42, # The sheet this range is on.
38373 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
38374 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
38375 },
38376 ],
38377 },
38378 },
38379 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
38380 # For example, if charting stocks over time, the "Volume" series
38381 # may want to be pinned to the right with the prices pinned to the left,
38382 # because the scale of trading volume is different than the scale of
38383 # prices.
38384 # It is an error to specify an axis that isn't a valid minor axis
38385 # for the chart's type.
38386 "type": "A String", # The type of this series. Valid only if the
38387 # chartType is
38388 # COMBO.
38389 # Different types will change the way the series is visualized.
38390 # Only LINE, AREA,
38391 # and COLUMN are supported.
38392 },
38393 ],
38394 "legendPosition": "A String", # The position of the chart legend.
38395 "domains": [ # The domain of data this is charting.
38396 # Only a single domain is currently supported.
38397 { # The domain of a chart.
38398 # For example, if charting stock prices over time, this would be the date.
38399 "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 -070038400 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038401 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
38402 "sources": [ # The ranges of data for a series or domain.
38403 # Exactly one dimension must have a length of 1,
38404 # and all sources in the list must have the same dimension
38405 # with length 1.
38406 # The domain (if it exists) & all series must have the same number
38407 # of source ranges. If using more than one source range, then the source
38408 # range at a given offset must be contiguous across the domain and series.
38409 #
38410 # For example, these are valid configurations:
38411 #
38412 # domain sources: A1:A5
38413 # series1 sources: B1:B5
38414 # series2 sources: D6:D10
38415 #
38416 # domain sources: A1:A5, C10:C12
38417 # series1 sources: B1:B5, D10:D12
38418 # series2 sources: C1:C5, E10:E12
38419 { # A range on a sheet.
38420 # All indexes are zero-based.
38421 # Indexes are half open, e.g the start index is inclusive
38422 # and the end index is exclusive -- [start_index, end_index).
38423 # Missing indexes indicate the range is unbounded on that side.
38424 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038425 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038426 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038427 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038428 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038429 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038430 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038431 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038432 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038433 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038434 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038435 # `Sheet1!A:B == sheet_id: 0,
38436 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038437 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038438 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038439 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038440 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038441 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038442 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038443 #
38444 # The start index must always be less than or equal to the end index.
38445 # If the start index equals the end index, then the range is empty.
38446 # Empty ranges are typically not meaningful and are usually rendered in the
38447 # UI as `#REF!`.
38448 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
38449 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
38450 "sheetId": 42, # The sheet this range is on.
38451 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
38452 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
38453 },
38454 ],
38455 },
38456 },
38457 },
38458 ],
38459 "chartType": "A String", # The type of the chart.
38460 "axis": [ # The axis on the chart.
38461 { # An axis of the chart.
38462 # A chart may not have more than one axis per
38463 # axis position.
38464 "position": "A String", # The position of this axis.
38465 "format": { # The format of a run of text in a cell. # The format of the title.
38466 # Only valid if the axis is not associated with the domain.
38467 # Absent values indicate that the field isn't specified.
38468 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
38469 # for simplicity of conversion to/from color representations in various
38470 # languages over compactness; for example, the fields of this representation
38471 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
38472 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
38473 # method in iOS; and, with just a little work, it can be easily formatted into
38474 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
38475 #
38476 # Example (Java):
38477 #
38478 # import com.google.type.Color;
38479 #
38480 # // ...
38481 # public static java.awt.Color fromProto(Color protocolor) {
38482 # float alpha = protocolor.hasAlpha()
38483 # ? protocolor.getAlpha().getValue()
38484 # : 1.0;
38485 #
38486 # return new java.awt.Color(
38487 # protocolor.getRed(),
38488 # protocolor.getGreen(),
38489 # protocolor.getBlue(),
38490 # alpha);
38491 # }
38492 #
38493 # public static Color toProto(java.awt.Color color) {
38494 # float red = (float) color.getRed();
38495 # float green = (float) color.getGreen();
38496 # float blue = (float) color.getBlue();
38497 # float denominator = 255.0;
38498 # Color.Builder resultBuilder =
38499 # Color
38500 # .newBuilder()
38501 # .setRed(red / denominator)
38502 # .setGreen(green / denominator)
38503 # .setBlue(blue / denominator);
38504 # int alpha = color.getAlpha();
38505 # if (alpha != 255) {
38506 # result.setAlpha(
38507 # FloatValue
38508 # .newBuilder()
38509 # .setValue(((float) alpha) / denominator)
38510 # .build());
38511 # }
38512 # return resultBuilder.build();
38513 # }
38514 # // ...
38515 #
38516 # Example (iOS / Obj-C):
38517 #
38518 # // ...
38519 # static UIColor* fromProto(Color* protocolor) {
38520 # float red = [protocolor red];
38521 # float green = [protocolor green];
38522 # float blue = [protocolor blue];
38523 # FloatValue* alpha_wrapper = [protocolor alpha];
38524 # float alpha = 1.0;
38525 # if (alpha_wrapper != nil) {
38526 # alpha = [alpha_wrapper value];
38527 # }
38528 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
38529 # }
38530 #
38531 # static Color* toProto(UIColor* color) {
38532 # CGFloat red, green, blue, alpha;
38533 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
38534 # return nil;
38535 # }
38536 # Color* result = [Color alloc] init];
38537 # [result setRed:red];
38538 # [result setGreen:green];
38539 # [result setBlue:blue];
38540 # if (alpha <= 0.9999) {
38541 # [result setAlpha:floatWrapperWithValue(alpha)];
38542 # }
38543 # [result autorelease];
38544 # return result;
38545 # }
38546 # // ...
38547 #
38548 # Example (JavaScript):
38549 #
38550 # // ...
38551 #
38552 # var protoToCssColor = function(rgb_color) {
38553 # var redFrac = rgb_color.red || 0.0;
38554 # var greenFrac = rgb_color.green || 0.0;
38555 # var blueFrac = rgb_color.blue || 0.0;
38556 # var red = Math.floor(redFrac * 255);
38557 # var green = Math.floor(greenFrac * 255);
38558 # var blue = Math.floor(blueFrac * 255);
38559 #
38560 # if (!('alpha' in rgb_color)) {
38561 # return rgbToCssColor_(red, green, blue);
38562 # }
38563 #
38564 # var alphaFrac = rgb_color.alpha.value || 0.0;
38565 # var rgbParams = [red, green, blue].join(',');
38566 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
38567 # };
38568 #
38569 # var rgbToCssColor_ = function(red, green, blue) {
38570 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
38571 # var hexString = rgbNumber.toString(16);
38572 # var missingZeros = 6 - hexString.length;
38573 # var resultBuilder = ['#'];
38574 # for (var i = 0; i < missingZeros; i++) {
38575 # resultBuilder.push('0');
38576 # }
38577 # resultBuilder.push(hexString);
38578 # return resultBuilder.join('');
38579 # };
38580 #
38581 # // ...
38582 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
38583 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
38584 # the final pixel color is defined by the equation:
38585 #
38586 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
38587 #
38588 # This means that a value of 1.0 corresponds to a solid color, whereas
38589 # a value of 0.0 corresponds to a completely transparent color. This
38590 # uses a wrapper message rather than a simple float scalar so that it is
38591 # possible to distinguish between a default value and the value being unset.
38592 # If omitted, this color object is to be rendered as a solid color
38593 # (as if the alpha value had been explicitly given with a value of 1.0).
38594 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
38595 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
38596 },
38597 "bold": True or False, # True if the text is bold.
38598 "strikethrough": True or False, # True if the text has a strikethrough.
38599 "fontFamily": "A String", # The font family.
38600 "fontSize": 42, # The size of the font.
38601 "italic": True or False, # True if the text is italicized.
38602 "underline": True or False, # True if the text is underlined.
38603 },
38604 "title": "A String", # The title of this axis. If set, this overrides any title inferred
38605 # from headers of the data.
38606 },
38607 ],
38608 },
38609 "title": "A String", # The title of the chart.
38610 },
38611 },
38612 ],
38613 "filterViews": [ # The filter views in this sheet.
38614 { # A filter view.
38615 "title": "A String", # The name of the filter view.
38616 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
38617 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038618 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038619 # may be set.
38620 "filterViewId": 42, # The ID of the filter view.
38621 "range": { # A range on a sheet. # The range this filter view covers.
38622 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038623 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038624 # may be set.
38625 # All indexes are zero-based.
38626 # Indexes are half open, e.g the start index is inclusive
38627 # and the end index is exclusive -- [start_index, end_index).
38628 # Missing indexes indicate the range is unbounded on that side.
38629 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038630 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038631 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038632 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038633 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038634 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038635 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038636 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038637 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038638 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038639 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038640 # `Sheet1!A:B == sheet_id: 0,
38641 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038642 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038643 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038644 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038645 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038646 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038647 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038648 #
38649 # The start index must always be less than or equal to the end index.
38650 # If the start index equals the end index, then the range is empty.
38651 # Empty ranges are typically not meaningful and are usually rendered in the
38652 # UI as `#REF!`.
38653 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
38654 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
38655 "sheetId": 42, # The sheet this range is on.
38656 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
38657 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
38658 },
38659 "sortSpecs": [ # The sort order per column. Later specifications are used when values
38660 # are equal in the earlier specifications.
38661 { # A sort order associated with a specific column or row.
38662 "sortOrder": "A String", # The order data should be sorted.
38663 "dimensionIndex": 42, # The dimension the sort should be applied to.
38664 },
38665 ],
38666 "criteria": { # The criteria for showing/hiding values per column.
38667 # The map's key is the column index, and the value is the criteria for
38668 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038669 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038670 "hiddenValues": [ # Values that should be hidden.
38671 "A String",
38672 ],
38673 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
38674 # (This does not override hiddenValues -- if a value is listed there,
38675 # it will still be hidden.)
38676 # BooleanConditions are used by conditional formatting,
38677 # data validation, and the criteria in filters.
38678 "type": "A String", # The type of condition.
38679 "values": [ # The values of the condition. The number of supported values depends
38680 # on the condition type. Some support zero values,
38681 # others one or two values,
38682 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
38683 { # The value of the condition.
38684 "relativeDate": "A String", # A relative date (based on the current date).
38685 # Valid only if the type is
38686 # DATE_BEFORE,
38687 # DATE_AFTER,
38688 # DATE_ON_OR_BEFORE or
38689 # DATE_ON_OR_AFTER.
38690 #
38691 # Relative dates are not supported in data validation.
38692 # They are supported only in conditional formatting and
38693 # conditional filters.
38694 "userEnteredValue": "A String", # A value the condition is based on.
38695 # The value will be parsed as if the user typed into a cell.
38696 # Formulas are supported (and must begin with an `=`).
38697 },
38698 ],
38699 },
38700 },
38701 },
38702 },
38703 ],
38704 "protectedRanges": [ # The protected ranges in this sheet.
38705 { # A protected range.
38706 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
38707 # Unprotected ranges are only supported on protected sheets.
38708 { # A range on a sheet.
38709 # All indexes are zero-based.
38710 # Indexes are half open, e.g the start index is inclusive
38711 # and the end index is exclusive -- [start_index, end_index).
38712 # Missing indexes indicate the range is unbounded on that side.
38713 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038714 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038715 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038716 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038717 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038718 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038719 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038720 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038721 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038722 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038723 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038724 # `Sheet1!A:B == sheet_id: 0,
38725 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038726 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038727 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038728 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038729 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038730 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038731 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038732 #
38733 # The start index must always be less than or equal to the end index.
38734 # If the start index equals the end index, then the range is empty.
38735 # Empty ranges are typically not meaningful and are usually rendered in the
38736 # UI as `#REF!`.
38737 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
38738 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
38739 "sheetId": 42, # The sheet this range is on.
38740 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
38741 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
38742 },
38743 ],
38744 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
38745 # protected area.
38746 # This field is read-only.
38747 "description": "A String", # The description of this protected range.
38748 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
38749 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038750 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038751 # may be set.
38752 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
38753 # This field is only visible to users with edit access to the protected
38754 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038755 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038756 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
38757 # range. Domain protection is only supported on documents within a domain.
38758 "users": [ # The email addresses of users with edit access to the protected range.
38759 "A String",
38760 ],
38761 "groups": [ # The email addresses of groups with edit access to the protected range.
38762 "A String",
38763 ],
38764 },
38765 "protectedRangeId": 42, # The ID of the protected range.
38766 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038767 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038768 # Warning-based protection means that every user can edit data in the
38769 # protected range, except editing will prompt a warning asking the user
38770 # to confirm the edit.
38771 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038772 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038773 # Additionally, if this field is changed from true to false and the
38774 # `editors` field is not set (nor included in the field mask), then
38775 # the editors will be set to all the editors in the document.
38776 "range": { # A range on a sheet. # The range that is being protected.
38777 # The range may be fully unbounded, in which case this is considered
38778 # a protected sheet.
38779 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038780 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038781 # may be set.
38782 # All indexes are zero-based.
38783 # Indexes are half open, e.g the start index is inclusive
38784 # and the end index is exclusive -- [start_index, end_index).
38785 # Missing indexes indicate the range is unbounded on that side.
38786 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038787 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038788 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038789 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038790 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038791 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038792 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038793 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038794 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038795 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038796 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038797 # `Sheet1!A:B == sheet_id: 0,
38798 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038799 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038800 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038801 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038802 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038803 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038804 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038805 #
38806 # The start index must always be less than or equal to the end index.
38807 # If the start index equals the end index, then the range is empty.
38808 # Empty ranges are typically not meaningful and are usually rendered in the
38809 # UI as `#REF!`.
38810 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
38811 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
38812 "sheetId": 42, # The sheet this range is on.
38813 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
38814 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
38815 },
38816 },
38817 ],
38818 "data": [ # Data in the grid, if this is a grid sheet.
38819 # The number of GridData objects returned is dependent on the number of
38820 # ranges requested on this sheet. For example, if this is representing
38821 # `Sheet1`, and the spreadsheet was requested with ranges
38822 # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a
38823 # startRow/startColumn of `0`,
38824 # while the second one will have `startRow 14` (zero-based row 15),
38825 # and `startColumn 3` (zero-based column D).
38826 { # Data in the grid, as well as metadata about the dimensions.
38827 "startRow": 42, # The first row this GridData refers to, zero-based.
38828 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038829 # in start_row.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038830 { # Properties about a dimension.
38831 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
38832 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
38833 "hiddenByFilter": True or False, # True if this dimension is being filtered.
38834 # This field is read-only.
38835 },
38836 ],
38837 "startColumn": 42, # The first column this GridData refers to, zero-based.
38838 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038839 # in start_column.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038840 { # Properties about a dimension.
38841 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
38842 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
38843 "hiddenByFilter": True or False, # True if this dimension is being filtered.
38844 # This field is read-only.
38845 },
38846 ],
38847 "rowData": [ # The data in the grid, one entry per row,
38848 # starting with the row in startRow.
38849 # The values in RowData will correspond to columns starting
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038850 # at start_column.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038851 { # Data about each cell in a row.
38852 "values": [ # The values in the row, one per column.
38853 { # Data about a specific cell.
38854 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
38855 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038856 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038857 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038858 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038859 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
38860 # or vertically (as rows).
38861 "rows": [ # Each row grouping in the pivot table.
38862 { # A single grouping (either row or column) in a pivot table.
38863 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
38864 "valueMetadata": [ # Metadata about values in the grouping.
38865 { # Metadata about a value in a pivot grouping.
38866 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
38867 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
38868 # (Note that formulaValue is not valid,
38869 # because the values will be calculated.)
38870 "numberValue": 3.14, # Represents a double value.
38871 # Note: Dates, Times and DateTimes are represented as doubles in
38872 # "serial number" format.
38873 "boolValue": True or False, # Represents a boolean value.
38874 "formulaValue": "A String", # Represents a formula.
38875 "stringValue": "A String", # Represents a string value.
38876 # Leading single quotes are not included. For example, if the user typed
38877 # `'123` into the UI, this would be represented as a `stringValue` of
38878 # `"123"`.
38879 "errorValue": { # An error in a cell. # Represents an error.
38880 # This field is read-only.
38881 "message": "A String", # A message with more information about the error
38882 # (in the spreadsheet's locale).
38883 "type": "A String", # The type of error.
38884 },
38885 },
38886 },
38887 ],
38888 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
38889 # If not specified, sorting is alphabetical by this group's values.
38890 "buckets": [ # Determines the bucket from which values are chosen to sort.
38891 #
38892 # For example, in a pivot table with one row group & two column groups,
38893 # the row group can list up to two values. The first value corresponds
38894 # to a value within the first column group, and the second value
38895 # corresponds to a value in the second column group. If no values
38896 # are listed, this would indicate that the row should be sorted according
38897 # to the "Grand Total" over the column groups. If a single value is listed,
38898 # this would correspond to using the "Total" of that bucket.
38899 { # The kinds of value that a cell in a spreadsheet can have.
38900 "numberValue": 3.14, # Represents a double value.
38901 # Note: Dates, Times and DateTimes are represented as doubles in
38902 # "serial number" format.
38903 "boolValue": True or False, # Represents a boolean value.
38904 "formulaValue": "A String", # Represents a formula.
38905 "stringValue": "A String", # Represents a string value.
38906 # Leading single quotes are not included. For example, if the user typed
38907 # `'123` into the UI, this would be represented as a `stringValue` of
38908 # `"123"`.
38909 "errorValue": { # An error in a cell. # Represents an error.
38910 # This field is read-only.
38911 "message": "A String", # A message with more information about the error
38912 # (in the spreadsheet's locale).
38913 "type": "A String", # The type of error.
38914 },
38915 },
38916 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038917 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038918 # grouping should be sorted by.
38919 },
38920 "sortOrder": "A String", # The order the values in this group should be sorted.
38921 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
38922 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038923 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038924 # means this group refers to column `C`, whereas the offset `1` would refer
38925 # to column `D`.
38926 },
38927 ],
38928 "source": { # A range on a sheet. # The range the pivot table is reading data from.
38929 # All indexes are zero-based.
38930 # Indexes are half open, e.g the start index is inclusive
38931 # and the end index is exclusive -- [start_index, end_index).
38932 # Missing indexes indicate the range is unbounded on that side.
38933 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038934 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038935 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038936 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038937 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038938 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038939 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038940 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038941 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038942 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038943 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038944 # `Sheet1!A:B == sheet_id: 0,
38945 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038946 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038947 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038948 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038949 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038950 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038951 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038952 #
38953 # The start index must always be less than or equal to the end index.
38954 # If the start index equals the end index, then the range is empty.
38955 # Empty ranges are typically not meaningful and are usually rendered in the
38956 # UI as `#REF!`.
38957 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
38958 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
38959 "sheetId": 42, # The sheet this range is on.
38960 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
38961 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
38962 },
38963 "values": [ # A list of values to include in the pivot table.
38964 { # The definition of how a value in a pivot table should be calculated.
38965 "formula": "A String", # A custom formula to calculate the value. The formula must start
38966 # with an `=` character.
38967 "summarizeFunction": "A String", # A function to summarize the value.
38968 # If formula is set, the only supported values are
38969 # SUM and
38970 # CUSTOM.
38971 # If sourceColumnOffset is set, then `CUSTOM`
38972 # is not supported.
38973 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
38974 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038975 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038976 # means this value refers to column `C`, whereas the offset `1` would
38977 # refer to column `D`.
38978 "name": "A String", # A name to use for the value. This is only used if formula was set.
38979 # Otherwise, the column name is used.
38980 },
38981 ],
38982 "criteria": { # An optional mapping of filters per source column offset.
38983 #
38984 # The filters will be applied before aggregating data into the pivot table.
38985 # The map's key is the column offset of the source range that you want to
38986 # filter, and the value is the criteria for that column.
38987 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038988 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038989 # for column `C`, whereas the key `1` is for column `D`.
38990 "a_key": { # Criteria for showing/hiding rows in a pivot table.
38991 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
38992 "A String",
38993 ],
38994 },
38995 },
38996 "columns": [ # Each column grouping in the pivot table.
38997 { # A single grouping (either row or column) in a pivot table.
38998 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
38999 "valueMetadata": [ # Metadata about values in the grouping.
39000 { # Metadata about a value in a pivot grouping.
39001 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
39002 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
39003 # (Note that formulaValue is not valid,
39004 # because the values will be calculated.)
39005 "numberValue": 3.14, # Represents a double value.
39006 # Note: Dates, Times and DateTimes are represented as doubles in
39007 # "serial number" format.
39008 "boolValue": True or False, # Represents a boolean value.
39009 "formulaValue": "A String", # Represents a formula.
39010 "stringValue": "A String", # Represents a string value.
39011 # Leading single quotes are not included. For example, if the user typed
39012 # `'123` into the UI, this would be represented as a `stringValue` of
39013 # `"123"`.
39014 "errorValue": { # An error in a cell. # Represents an error.
39015 # This field is read-only.
39016 "message": "A String", # A message with more information about the error
39017 # (in the spreadsheet's locale).
39018 "type": "A String", # The type of error.
39019 },
39020 },
39021 },
39022 ],
39023 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
39024 # If not specified, sorting is alphabetical by this group's values.
39025 "buckets": [ # Determines the bucket from which values are chosen to sort.
39026 #
39027 # For example, in a pivot table with one row group & two column groups,
39028 # the row group can list up to two values. The first value corresponds
39029 # to a value within the first column group, and the second value
39030 # corresponds to a value in the second column group. If no values
39031 # are listed, this would indicate that the row should be sorted according
39032 # to the "Grand Total" over the column groups. If a single value is listed,
39033 # this would correspond to using the "Total" of that bucket.
39034 { # The kinds of value that a cell in a spreadsheet can have.
39035 "numberValue": 3.14, # Represents a double value.
39036 # Note: Dates, Times and DateTimes are represented as doubles in
39037 # "serial number" format.
39038 "boolValue": True or False, # Represents a boolean value.
39039 "formulaValue": "A String", # Represents a formula.
39040 "stringValue": "A String", # Represents a string value.
39041 # Leading single quotes are not included. For example, if the user typed
39042 # `'123` into the UI, this would be represented as a `stringValue` of
39043 # `"123"`.
39044 "errorValue": { # An error in a cell. # Represents an error.
39045 # This field is read-only.
39046 "message": "A String", # A message with more information about the error
39047 # (in the spreadsheet's locale).
39048 "type": "A String", # The type of error.
39049 },
39050 },
39051 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039052 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039053 # grouping should be sorted by.
39054 },
39055 "sortOrder": "A String", # The order the values in this group should be sorted.
39056 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
39057 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039058 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039059 # means this group refers to column `C`, whereas the offset `1` would refer
39060 # to column `D`.
39061 },
39062 ],
39063 },
39064 "hyperlink": "A String", # A hyperlink this cell points to, if any.
39065 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
39066 "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
39067 # the calculated value. For cells with literals, this will be
39068 # the same as the user_entered_value.
39069 # This field is read-only.
39070 "numberValue": 3.14, # Represents a double value.
39071 # Note: Dates, Times and DateTimes are represented as doubles in
39072 # "serial number" format.
39073 "boolValue": True or False, # Represents a boolean value.
39074 "formulaValue": "A String", # Represents a formula.
39075 "stringValue": "A String", # Represents a string value.
39076 # Leading single quotes are not included. For example, if the user typed
39077 # `'123` into the UI, this would be represented as a `stringValue` of
39078 # `"123"`.
39079 "errorValue": { # An error in a cell. # Represents an error.
39080 # This field is read-only.
39081 "message": "A String", # A message with more information about the error
39082 # (in the spreadsheet's locale).
39083 "type": "A String", # The type of error.
39084 },
39085 },
39086 "formattedValue": "A String", # The formatted value of the cell.
39087 # This is the value as it's shown to the user.
39088 # This field is read-only.
39089 "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()`
39090 # Note: Dates, Times and DateTimes are represented as doubles in
39091 # serial number format.
39092 "numberValue": 3.14, # Represents a double value.
39093 # Note: Dates, Times and DateTimes are represented as doubles in
39094 # "serial number" format.
39095 "boolValue": True or False, # Represents a boolean value.
39096 "formulaValue": "A String", # Represents a formula.
39097 "stringValue": "A String", # Represents a string value.
39098 # Leading single quotes are not included. For example, if the user typed
39099 # `'123` into the UI, this would be represented as a `stringValue` of
39100 # `"123"`.
39101 "errorValue": { # An error in a cell. # Represents an error.
39102 # This field is read-only.
39103 "message": "A String", # A message with more information about the error
39104 # (in the spreadsheet's locale).
39105 "type": "A String", # The type of error.
39106 },
39107 },
39108 "note": "A String", # Any note on the cell.
39109 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
39110 # This includes the results of applying any conditional formatting and,
39111 # if the cell contains a formula, the computed number format.
39112 # If the effective format is the default format, effective format will
39113 # not be written.
39114 # This field is read-only.
39115 "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 -070039116 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
39117 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070039118 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
39119 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039120 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039121 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039122 },
39123 "textDirection": "A String", # The direction of the text in the cell.
39124 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
39125 # When updating padding, every field must be specified.
39126 "top": 42, # The top padding of the cell.
39127 "right": 42, # The right padding of the cell.
39128 "bottom": 42, # The bottom padding of the cell.
39129 "left": 42, # The left padding of the cell.
39130 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039131 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039132 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
39133 # for simplicity of conversion to/from color representations in various
39134 # languages over compactness; for example, the fields of this representation
39135 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
39136 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
39137 # method in iOS; and, with just a little work, it can be easily formatted into
39138 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
39139 #
39140 # Example (Java):
39141 #
39142 # import com.google.type.Color;
39143 #
39144 # // ...
39145 # public static java.awt.Color fromProto(Color protocolor) {
39146 # float alpha = protocolor.hasAlpha()
39147 # ? protocolor.getAlpha().getValue()
39148 # : 1.0;
39149 #
39150 # return new java.awt.Color(
39151 # protocolor.getRed(),
39152 # protocolor.getGreen(),
39153 # protocolor.getBlue(),
39154 # alpha);
39155 # }
39156 #
39157 # public static Color toProto(java.awt.Color color) {
39158 # float red = (float) color.getRed();
39159 # float green = (float) color.getGreen();
39160 # float blue = (float) color.getBlue();
39161 # float denominator = 255.0;
39162 # Color.Builder resultBuilder =
39163 # Color
39164 # .newBuilder()
39165 # .setRed(red / denominator)
39166 # .setGreen(green / denominator)
39167 # .setBlue(blue / denominator);
39168 # int alpha = color.getAlpha();
39169 # if (alpha != 255) {
39170 # result.setAlpha(
39171 # FloatValue
39172 # .newBuilder()
39173 # .setValue(((float) alpha) / denominator)
39174 # .build());
39175 # }
39176 # return resultBuilder.build();
39177 # }
39178 # // ...
39179 #
39180 # Example (iOS / Obj-C):
39181 #
39182 # // ...
39183 # static UIColor* fromProto(Color* protocolor) {
39184 # float red = [protocolor red];
39185 # float green = [protocolor green];
39186 # float blue = [protocolor blue];
39187 # FloatValue* alpha_wrapper = [protocolor alpha];
39188 # float alpha = 1.0;
39189 # if (alpha_wrapper != nil) {
39190 # alpha = [alpha_wrapper value];
39191 # }
39192 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
39193 # }
39194 #
39195 # static Color* toProto(UIColor* color) {
39196 # CGFloat red, green, blue, alpha;
39197 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
39198 # return nil;
39199 # }
39200 # Color* result = [Color alloc] init];
39201 # [result setRed:red];
39202 # [result setGreen:green];
39203 # [result setBlue:blue];
39204 # if (alpha <= 0.9999) {
39205 # [result setAlpha:floatWrapperWithValue(alpha)];
39206 # }
39207 # [result autorelease];
39208 # return result;
39209 # }
39210 # // ...
39211 #
39212 # Example (JavaScript):
39213 #
39214 # // ...
39215 #
39216 # var protoToCssColor = function(rgb_color) {
39217 # var redFrac = rgb_color.red || 0.0;
39218 # var greenFrac = rgb_color.green || 0.0;
39219 # var blueFrac = rgb_color.blue || 0.0;
39220 # var red = Math.floor(redFrac * 255);
39221 # var green = Math.floor(greenFrac * 255);
39222 # var blue = Math.floor(blueFrac * 255);
39223 #
39224 # if (!('alpha' in rgb_color)) {
39225 # return rgbToCssColor_(red, green, blue);
39226 # }
39227 #
39228 # var alphaFrac = rgb_color.alpha.value || 0.0;
39229 # var rgbParams = [red, green, blue].join(',');
39230 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
39231 # };
39232 #
39233 # var rgbToCssColor_ = function(red, green, blue) {
39234 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
39235 # var hexString = rgbNumber.toString(16);
39236 # var missingZeros = 6 - hexString.length;
39237 # var resultBuilder = ['#'];
39238 # for (var i = 0; i < missingZeros; i++) {
39239 # resultBuilder.push('0');
39240 # }
39241 # resultBuilder.push(hexString);
39242 # return resultBuilder.join('');
39243 # };
39244 #
39245 # // ...
39246 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
39247 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
39248 # the final pixel color is defined by the equation:
39249 #
39250 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
39251 #
39252 # This means that a value of 1.0 corresponds to a solid color, whereas
39253 # a value of 0.0 corresponds to a completely transparent color. This
39254 # uses a wrapper message rather than a simple float scalar so that it is
39255 # possible to distinguish between a default value and the value being unset.
39256 # If omitted, this color object is to be rendered as a solid color
39257 # (as if the alpha value had been explicitly given with a value of 1.0).
39258 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
39259 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
39260 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039261 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039262 "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).
39263 # Absent values indicate that the field isn't specified.
39264 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
39265 # for simplicity of conversion to/from color representations in various
39266 # languages over compactness; for example, the fields of this representation
39267 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
39268 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
39269 # method in iOS; and, with just a little work, it can be easily formatted into
39270 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
39271 #
39272 # Example (Java):
39273 #
39274 # import com.google.type.Color;
39275 #
39276 # // ...
39277 # public static java.awt.Color fromProto(Color protocolor) {
39278 # float alpha = protocolor.hasAlpha()
39279 # ? protocolor.getAlpha().getValue()
39280 # : 1.0;
39281 #
39282 # return new java.awt.Color(
39283 # protocolor.getRed(),
39284 # protocolor.getGreen(),
39285 # protocolor.getBlue(),
39286 # alpha);
39287 # }
39288 #
39289 # public static Color toProto(java.awt.Color color) {
39290 # float red = (float) color.getRed();
39291 # float green = (float) color.getGreen();
39292 # float blue = (float) color.getBlue();
39293 # float denominator = 255.0;
39294 # Color.Builder resultBuilder =
39295 # Color
39296 # .newBuilder()
39297 # .setRed(red / denominator)
39298 # .setGreen(green / denominator)
39299 # .setBlue(blue / denominator);
39300 # int alpha = color.getAlpha();
39301 # if (alpha != 255) {
39302 # result.setAlpha(
39303 # FloatValue
39304 # .newBuilder()
39305 # .setValue(((float) alpha) / denominator)
39306 # .build());
39307 # }
39308 # return resultBuilder.build();
39309 # }
39310 # // ...
39311 #
39312 # Example (iOS / Obj-C):
39313 #
39314 # // ...
39315 # static UIColor* fromProto(Color* protocolor) {
39316 # float red = [protocolor red];
39317 # float green = [protocolor green];
39318 # float blue = [protocolor blue];
39319 # FloatValue* alpha_wrapper = [protocolor alpha];
39320 # float alpha = 1.0;
39321 # if (alpha_wrapper != nil) {
39322 # alpha = [alpha_wrapper value];
39323 # }
39324 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
39325 # }
39326 #
39327 # static Color* toProto(UIColor* color) {
39328 # CGFloat red, green, blue, alpha;
39329 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
39330 # return nil;
39331 # }
39332 # Color* result = [Color alloc] init];
39333 # [result setRed:red];
39334 # [result setGreen:green];
39335 # [result setBlue:blue];
39336 # if (alpha <= 0.9999) {
39337 # [result setAlpha:floatWrapperWithValue(alpha)];
39338 # }
39339 # [result autorelease];
39340 # return result;
39341 # }
39342 # // ...
39343 #
39344 # Example (JavaScript):
39345 #
39346 # // ...
39347 #
39348 # var protoToCssColor = function(rgb_color) {
39349 # var redFrac = rgb_color.red || 0.0;
39350 # var greenFrac = rgb_color.green || 0.0;
39351 # var blueFrac = rgb_color.blue || 0.0;
39352 # var red = Math.floor(redFrac * 255);
39353 # var green = Math.floor(greenFrac * 255);
39354 # var blue = Math.floor(blueFrac * 255);
39355 #
39356 # if (!('alpha' in rgb_color)) {
39357 # return rgbToCssColor_(red, green, blue);
39358 # }
39359 #
39360 # var alphaFrac = rgb_color.alpha.value || 0.0;
39361 # var rgbParams = [red, green, blue].join(',');
39362 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
39363 # };
39364 #
39365 # var rgbToCssColor_ = function(red, green, blue) {
39366 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
39367 # var hexString = rgbNumber.toString(16);
39368 # var missingZeros = 6 - hexString.length;
39369 # var resultBuilder = ['#'];
39370 # for (var i = 0; i < missingZeros; i++) {
39371 # resultBuilder.push('0');
39372 # }
39373 # resultBuilder.push(hexString);
39374 # return resultBuilder.join('');
39375 # };
39376 #
39377 # // ...
39378 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
39379 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
39380 # the final pixel color is defined by the equation:
39381 #
39382 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
39383 #
39384 # This means that a value of 1.0 corresponds to a solid color, whereas
39385 # a value of 0.0 corresponds to a completely transparent color. This
39386 # uses a wrapper message rather than a simple float scalar so that it is
39387 # possible to distinguish between a default value and the value being unset.
39388 # If omitted, this color object is to be rendered as a solid color
39389 # (as if the alpha value had been explicitly given with a value of 1.0).
39390 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
39391 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
39392 },
39393 "bold": True or False, # True if the text is bold.
39394 "strikethrough": True or False, # True if the text has a strikethrough.
39395 "fontFamily": "A String", # The font family.
39396 "fontSize": 42, # The size of the font.
39397 "italic": True or False, # True if the text is italicized.
39398 "underline": True or False, # True if the text is underlined.
39399 },
39400 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
39401 "borders": { # The borders of the cell. # The borders of the cell.
39402 "top": { # A border along a cell. # The top border of the cell.
39403 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
39404 # for simplicity of conversion to/from color representations in various
39405 # languages over compactness; for example, the fields of this representation
39406 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
39407 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
39408 # method in iOS; and, with just a little work, it can be easily formatted into
39409 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
39410 #
39411 # Example (Java):
39412 #
39413 # import com.google.type.Color;
39414 #
39415 # // ...
39416 # public static java.awt.Color fromProto(Color protocolor) {
39417 # float alpha = protocolor.hasAlpha()
39418 # ? protocolor.getAlpha().getValue()
39419 # : 1.0;
39420 #
39421 # return new java.awt.Color(
39422 # protocolor.getRed(),
39423 # protocolor.getGreen(),
39424 # protocolor.getBlue(),
39425 # alpha);
39426 # }
39427 #
39428 # public static Color toProto(java.awt.Color color) {
39429 # float red = (float) color.getRed();
39430 # float green = (float) color.getGreen();
39431 # float blue = (float) color.getBlue();
39432 # float denominator = 255.0;
39433 # Color.Builder resultBuilder =
39434 # Color
39435 # .newBuilder()
39436 # .setRed(red / denominator)
39437 # .setGreen(green / denominator)
39438 # .setBlue(blue / denominator);
39439 # int alpha = color.getAlpha();
39440 # if (alpha != 255) {
39441 # result.setAlpha(
39442 # FloatValue
39443 # .newBuilder()
39444 # .setValue(((float) alpha) / denominator)
39445 # .build());
39446 # }
39447 # return resultBuilder.build();
39448 # }
39449 # // ...
39450 #
39451 # Example (iOS / Obj-C):
39452 #
39453 # // ...
39454 # static UIColor* fromProto(Color* protocolor) {
39455 # float red = [protocolor red];
39456 # float green = [protocolor green];
39457 # float blue = [protocolor blue];
39458 # FloatValue* alpha_wrapper = [protocolor alpha];
39459 # float alpha = 1.0;
39460 # if (alpha_wrapper != nil) {
39461 # alpha = [alpha_wrapper value];
39462 # }
39463 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
39464 # }
39465 #
39466 # static Color* toProto(UIColor* color) {
39467 # CGFloat red, green, blue, alpha;
39468 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
39469 # return nil;
39470 # }
39471 # Color* result = [Color alloc] init];
39472 # [result setRed:red];
39473 # [result setGreen:green];
39474 # [result setBlue:blue];
39475 # if (alpha <= 0.9999) {
39476 # [result setAlpha:floatWrapperWithValue(alpha)];
39477 # }
39478 # [result autorelease];
39479 # return result;
39480 # }
39481 # // ...
39482 #
39483 # Example (JavaScript):
39484 #
39485 # // ...
39486 #
39487 # var protoToCssColor = function(rgb_color) {
39488 # var redFrac = rgb_color.red || 0.0;
39489 # var greenFrac = rgb_color.green || 0.0;
39490 # var blueFrac = rgb_color.blue || 0.0;
39491 # var red = Math.floor(redFrac * 255);
39492 # var green = Math.floor(greenFrac * 255);
39493 # var blue = Math.floor(blueFrac * 255);
39494 #
39495 # if (!('alpha' in rgb_color)) {
39496 # return rgbToCssColor_(red, green, blue);
39497 # }
39498 #
39499 # var alphaFrac = rgb_color.alpha.value || 0.0;
39500 # var rgbParams = [red, green, blue].join(',');
39501 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
39502 # };
39503 #
39504 # var rgbToCssColor_ = function(red, green, blue) {
39505 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
39506 # var hexString = rgbNumber.toString(16);
39507 # var missingZeros = 6 - hexString.length;
39508 # var resultBuilder = ['#'];
39509 # for (var i = 0; i < missingZeros; i++) {
39510 # resultBuilder.push('0');
39511 # }
39512 # resultBuilder.push(hexString);
39513 # return resultBuilder.join('');
39514 # };
39515 #
39516 # // ...
39517 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
39518 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
39519 # the final pixel color is defined by the equation:
39520 #
39521 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
39522 #
39523 # This means that a value of 1.0 corresponds to a solid color, whereas
39524 # a value of 0.0 corresponds to a completely transparent color. This
39525 # uses a wrapper message rather than a simple float scalar so that it is
39526 # possible to distinguish between a default value and the value being unset.
39527 # If omitted, this color object is to be rendered as a solid color
39528 # (as if the alpha value had been explicitly given with a value of 1.0).
39529 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
39530 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
39531 },
39532 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070039533 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039534 "style": "A String", # The style of the border.
39535 },
39536 "right": { # A border along a cell. # The right border of the cell.
39537 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
39538 # for simplicity of conversion to/from color representations in various
39539 # languages over compactness; for example, the fields of this representation
39540 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
39541 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
39542 # method in iOS; and, with just a little work, it can be easily formatted into
39543 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
39544 #
39545 # Example (Java):
39546 #
39547 # import com.google.type.Color;
39548 #
39549 # // ...
39550 # public static java.awt.Color fromProto(Color protocolor) {
39551 # float alpha = protocolor.hasAlpha()
39552 # ? protocolor.getAlpha().getValue()
39553 # : 1.0;
39554 #
39555 # return new java.awt.Color(
39556 # protocolor.getRed(),
39557 # protocolor.getGreen(),
39558 # protocolor.getBlue(),
39559 # alpha);
39560 # }
39561 #
39562 # public static Color toProto(java.awt.Color color) {
39563 # float red = (float) color.getRed();
39564 # float green = (float) color.getGreen();
39565 # float blue = (float) color.getBlue();
39566 # float denominator = 255.0;
39567 # Color.Builder resultBuilder =
39568 # Color
39569 # .newBuilder()
39570 # .setRed(red / denominator)
39571 # .setGreen(green / denominator)
39572 # .setBlue(blue / denominator);
39573 # int alpha = color.getAlpha();
39574 # if (alpha != 255) {
39575 # result.setAlpha(
39576 # FloatValue
39577 # .newBuilder()
39578 # .setValue(((float) alpha) / denominator)
39579 # .build());
39580 # }
39581 # return resultBuilder.build();
39582 # }
39583 # // ...
39584 #
39585 # Example (iOS / Obj-C):
39586 #
39587 # // ...
39588 # static UIColor* fromProto(Color* protocolor) {
39589 # float red = [protocolor red];
39590 # float green = [protocolor green];
39591 # float blue = [protocolor blue];
39592 # FloatValue* alpha_wrapper = [protocolor alpha];
39593 # float alpha = 1.0;
39594 # if (alpha_wrapper != nil) {
39595 # alpha = [alpha_wrapper value];
39596 # }
39597 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
39598 # }
39599 #
39600 # static Color* toProto(UIColor* color) {
39601 # CGFloat red, green, blue, alpha;
39602 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
39603 # return nil;
39604 # }
39605 # Color* result = [Color alloc] init];
39606 # [result setRed:red];
39607 # [result setGreen:green];
39608 # [result setBlue:blue];
39609 # if (alpha <= 0.9999) {
39610 # [result setAlpha:floatWrapperWithValue(alpha)];
39611 # }
39612 # [result autorelease];
39613 # return result;
39614 # }
39615 # // ...
39616 #
39617 # Example (JavaScript):
39618 #
39619 # // ...
39620 #
39621 # var protoToCssColor = function(rgb_color) {
39622 # var redFrac = rgb_color.red || 0.0;
39623 # var greenFrac = rgb_color.green || 0.0;
39624 # var blueFrac = rgb_color.blue || 0.0;
39625 # var red = Math.floor(redFrac * 255);
39626 # var green = Math.floor(greenFrac * 255);
39627 # var blue = Math.floor(blueFrac * 255);
39628 #
39629 # if (!('alpha' in rgb_color)) {
39630 # return rgbToCssColor_(red, green, blue);
39631 # }
39632 #
39633 # var alphaFrac = rgb_color.alpha.value || 0.0;
39634 # var rgbParams = [red, green, blue].join(',');
39635 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
39636 # };
39637 #
39638 # var rgbToCssColor_ = function(red, green, blue) {
39639 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
39640 # var hexString = rgbNumber.toString(16);
39641 # var missingZeros = 6 - hexString.length;
39642 # var resultBuilder = ['#'];
39643 # for (var i = 0; i < missingZeros; i++) {
39644 # resultBuilder.push('0');
39645 # }
39646 # resultBuilder.push(hexString);
39647 # return resultBuilder.join('');
39648 # };
39649 #
39650 # // ...
39651 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
39652 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
39653 # the final pixel color is defined by the equation:
39654 #
39655 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
39656 #
39657 # This means that a value of 1.0 corresponds to a solid color, whereas
39658 # a value of 0.0 corresponds to a completely transparent color. This
39659 # uses a wrapper message rather than a simple float scalar so that it is
39660 # possible to distinguish between a default value and the value being unset.
39661 # If omitted, this color object is to be rendered as a solid color
39662 # (as if the alpha value had been explicitly given with a value of 1.0).
39663 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
39664 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
39665 },
39666 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070039667 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039668 "style": "A String", # The style of the border.
39669 },
39670 "bottom": { # A border along a cell. # The bottom border of the cell.
39671 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
39672 # for simplicity of conversion to/from color representations in various
39673 # languages over compactness; for example, the fields of this representation
39674 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
39675 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
39676 # method in iOS; and, with just a little work, it can be easily formatted into
39677 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
39678 #
39679 # Example (Java):
39680 #
39681 # import com.google.type.Color;
39682 #
39683 # // ...
39684 # public static java.awt.Color fromProto(Color protocolor) {
39685 # float alpha = protocolor.hasAlpha()
39686 # ? protocolor.getAlpha().getValue()
39687 # : 1.0;
39688 #
39689 # return new java.awt.Color(
39690 # protocolor.getRed(),
39691 # protocolor.getGreen(),
39692 # protocolor.getBlue(),
39693 # alpha);
39694 # }
39695 #
39696 # public static Color toProto(java.awt.Color color) {
39697 # float red = (float) color.getRed();
39698 # float green = (float) color.getGreen();
39699 # float blue = (float) color.getBlue();
39700 # float denominator = 255.0;
39701 # Color.Builder resultBuilder =
39702 # Color
39703 # .newBuilder()
39704 # .setRed(red / denominator)
39705 # .setGreen(green / denominator)
39706 # .setBlue(blue / denominator);
39707 # int alpha = color.getAlpha();
39708 # if (alpha != 255) {
39709 # result.setAlpha(
39710 # FloatValue
39711 # .newBuilder()
39712 # .setValue(((float) alpha) / denominator)
39713 # .build());
39714 # }
39715 # return resultBuilder.build();
39716 # }
39717 # // ...
39718 #
39719 # Example (iOS / Obj-C):
39720 #
39721 # // ...
39722 # static UIColor* fromProto(Color* protocolor) {
39723 # float red = [protocolor red];
39724 # float green = [protocolor green];
39725 # float blue = [protocolor blue];
39726 # FloatValue* alpha_wrapper = [protocolor alpha];
39727 # float alpha = 1.0;
39728 # if (alpha_wrapper != nil) {
39729 # alpha = [alpha_wrapper value];
39730 # }
39731 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
39732 # }
39733 #
39734 # static Color* toProto(UIColor* color) {
39735 # CGFloat red, green, blue, alpha;
39736 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
39737 # return nil;
39738 # }
39739 # Color* result = [Color alloc] init];
39740 # [result setRed:red];
39741 # [result setGreen:green];
39742 # [result setBlue:blue];
39743 # if (alpha <= 0.9999) {
39744 # [result setAlpha:floatWrapperWithValue(alpha)];
39745 # }
39746 # [result autorelease];
39747 # return result;
39748 # }
39749 # // ...
39750 #
39751 # Example (JavaScript):
39752 #
39753 # // ...
39754 #
39755 # var protoToCssColor = function(rgb_color) {
39756 # var redFrac = rgb_color.red || 0.0;
39757 # var greenFrac = rgb_color.green || 0.0;
39758 # var blueFrac = rgb_color.blue || 0.0;
39759 # var red = Math.floor(redFrac * 255);
39760 # var green = Math.floor(greenFrac * 255);
39761 # var blue = Math.floor(blueFrac * 255);
39762 #
39763 # if (!('alpha' in rgb_color)) {
39764 # return rgbToCssColor_(red, green, blue);
39765 # }
39766 #
39767 # var alphaFrac = rgb_color.alpha.value || 0.0;
39768 # var rgbParams = [red, green, blue].join(',');
39769 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
39770 # };
39771 #
39772 # var rgbToCssColor_ = function(red, green, blue) {
39773 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
39774 # var hexString = rgbNumber.toString(16);
39775 # var missingZeros = 6 - hexString.length;
39776 # var resultBuilder = ['#'];
39777 # for (var i = 0; i < missingZeros; i++) {
39778 # resultBuilder.push('0');
39779 # }
39780 # resultBuilder.push(hexString);
39781 # return resultBuilder.join('');
39782 # };
39783 #
39784 # // ...
39785 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
39786 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
39787 # the final pixel color is defined by the equation:
39788 #
39789 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
39790 #
39791 # This means that a value of 1.0 corresponds to a solid color, whereas
39792 # a value of 0.0 corresponds to a completely transparent color. This
39793 # uses a wrapper message rather than a simple float scalar so that it is
39794 # possible to distinguish between a default value and the value being unset.
39795 # If omitted, this color object is to be rendered as a solid color
39796 # (as if the alpha value had been explicitly given with a value of 1.0).
39797 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
39798 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
39799 },
39800 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070039801 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039802 "style": "A String", # The style of the border.
39803 },
39804 "left": { # A border along a cell. # The left border of the cell.
39805 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
39806 # for simplicity of conversion to/from color representations in various
39807 # languages over compactness; for example, the fields of this representation
39808 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
39809 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
39810 # method in iOS; and, with just a little work, it can be easily formatted into
39811 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
39812 #
39813 # Example (Java):
39814 #
39815 # import com.google.type.Color;
39816 #
39817 # // ...
39818 # public static java.awt.Color fromProto(Color protocolor) {
39819 # float alpha = protocolor.hasAlpha()
39820 # ? protocolor.getAlpha().getValue()
39821 # : 1.0;
39822 #
39823 # return new java.awt.Color(
39824 # protocolor.getRed(),
39825 # protocolor.getGreen(),
39826 # protocolor.getBlue(),
39827 # alpha);
39828 # }
39829 #
39830 # public static Color toProto(java.awt.Color color) {
39831 # float red = (float) color.getRed();
39832 # float green = (float) color.getGreen();
39833 # float blue = (float) color.getBlue();
39834 # float denominator = 255.0;
39835 # Color.Builder resultBuilder =
39836 # Color
39837 # .newBuilder()
39838 # .setRed(red / denominator)
39839 # .setGreen(green / denominator)
39840 # .setBlue(blue / denominator);
39841 # int alpha = color.getAlpha();
39842 # if (alpha != 255) {
39843 # result.setAlpha(
39844 # FloatValue
39845 # .newBuilder()
39846 # .setValue(((float) alpha) / denominator)
39847 # .build());
39848 # }
39849 # return resultBuilder.build();
39850 # }
39851 # // ...
39852 #
39853 # Example (iOS / Obj-C):
39854 #
39855 # // ...
39856 # static UIColor* fromProto(Color* protocolor) {
39857 # float red = [protocolor red];
39858 # float green = [protocolor green];
39859 # float blue = [protocolor blue];
39860 # FloatValue* alpha_wrapper = [protocolor alpha];
39861 # float alpha = 1.0;
39862 # if (alpha_wrapper != nil) {
39863 # alpha = [alpha_wrapper value];
39864 # }
39865 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
39866 # }
39867 #
39868 # static Color* toProto(UIColor* color) {
39869 # CGFloat red, green, blue, alpha;
39870 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
39871 # return nil;
39872 # }
39873 # Color* result = [Color alloc] init];
39874 # [result setRed:red];
39875 # [result setGreen:green];
39876 # [result setBlue:blue];
39877 # if (alpha <= 0.9999) {
39878 # [result setAlpha:floatWrapperWithValue(alpha)];
39879 # }
39880 # [result autorelease];
39881 # return result;
39882 # }
39883 # // ...
39884 #
39885 # Example (JavaScript):
39886 #
39887 # // ...
39888 #
39889 # var protoToCssColor = function(rgb_color) {
39890 # var redFrac = rgb_color.red || 0.0;
39891 # var greenFrac = rgb_color.green || 0.0;
39892 # var blueFrac = rgb_color.blue || 0.0;
39893 # var red = Math.floor(redFrac * 255);
39894 # var green = Math.floor(greenFrac * 255);
39895 # var blue = Math.floor(blueFrac * 255);
39896 #
39897 # if (!('alpha' in rgb_color)) {
39898 # return rgbToCssColor_(red, green, blue);
39899 # }
39900 #
39901 # var alphaFrac = rgb_color.alpha.value || 0.0;
39902 # var rgbParams = [red, green, blue].join(',');
39903 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
39904 # };
39905 #
39906 # var rgbToCssColor_ = function(red, green, blue) {
39907 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
39908 # var hexString = rgbNumber.toString(16);
39909 # var missingZeros = 6 - hexString.length;
39910 # var resultBuilder = ['#'];
39911 # for (var i = 0; i < missingZeros; i++) {
39912 # resultBuilder.push('0');
39913 # }
39914 # resultBuilder.push(hexString);
39915 # return resultBuilder.join('');
39916 # };
39917 #
39918 # // ...
39919 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
39920 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
39921 # the final pixel color is defined by the equation:
39922 #
39923 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
39924 #
39925 # This means that a value of 1.0 corresponds to a solid color, whereas
39926 # a value of 0.0 corresponds to a completely transparent color. This
39927 # uses a wrapper message rather than a simple float scalar so that it is
39928 # possible to distinguish between a default value and the value being unset.
39929 # If omitted, this color object is to be rendered as a solid color
39930 # (as if the alpha value had been explicitly given with a value of 1.0).
39931 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
39932 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
39933 },
39934 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070039935 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039936 "style": "A String", # The style of the border.
39937 },
39938 },
39939 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
39940 },
39941 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
39942 #
39943 # When writing, the new format will be merged with the existing format.
39944 "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 -070039945 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
39946 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070039947 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
39948 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039949 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039950 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039951 },
39952 "textDirection": "A String", # The direction of the text in the cell.
39953 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
39954 # When updating padding, every field must be specified.
39955 "top": 42, # The top padding of the cell.
39956 "right": 42, # The right padding of the cell.
39957 "bottom": 42, # The bottom padding of the cell.
39958 "left": 42, # The left padding of the cell.
39959 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039960 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039961 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
39962 # for simplicity of conversion to/from color representations in various
39963 # languages over compactness; for example, the fields of this representation
39964 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
39965 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
39966 # method in iOS; and, with just a little work, it can be easily formatted into
39967 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
39968 #
39969 # Example (Java):
39970 #
39971 # import com.google.type.Color;
39972 #
39973 # // ...
39974 # public static java.awt.Color fromProto(Color protocolor) {
39975 # float alpha = protocolor.hasAlpha()
39976 # ? protocolor.getAlpha().getValue()
39977 # : 1.0;
39978 #
39979 # return new java.awt.Color(
39980 # protocolor.getRed(),
39981 # protocolor.getGreen(),
39982 # protocolor.getBlue(),
39983 # alpha);
39984 # }
39985 #
39986 # public static Color toProto(java.awt.Color color) {
39987 # float red = (float) color.getRed();
39988 # float green = (float) color.getGreen();
39989 # float blue = (float) color.getBlue();
39990 # float denominator = 255.0;
39991 # Color.Builder resultBuilder =
39992 # Color
39993 # .newBuilder()
39994 # .setRed(red / denominator)
39995 # .setGreen(green / denominator)
39996 # .setBlue(blue / denominator);
39997 # int alpha = color.getAlpha();
39998 # if (alpha != 255) {
39999 # result.setAlpha(
40000 # FloatValue
40001 # .newBuilder()
40002 # .setValue(((float) alpha) / denominator)
40003 # .build());
40004 # }
40005 # return resultBuilder.build();
40006 # }
40007 # // ...
40008 #
40009 # Example (iOS / Obj-C):
40010 #
40011 # // ...
40012 # static UIColor* fromProto(Color* protocolor) {
40013 # float red = [protocolor red];
40014 # float green = [protocolor green];
40015 # float blue = [protocolor blue];
40016 # FloatValue* alpha_wrapper = [protocolor alpha];
40017 # float alpha = 1.0;
40018 # if (alpha_wrapper != nil) {
40019 # alpha = [alpha_wrapper value];
40020 # }
40021 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40022 # }
40023 #
40024 # static Color* toProto(UIColor* color) {
40025 # CGFloat red, green, blue, alpha;
40026 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40027 # return nil;
40028 # }
40029 # Color* result = [Color alloc] init];
40030 # [result setRed:red];
40031 # [result setGreen:green];
40032 # [result setBlue:blue];
40033 # if (alpha <= 0.9999) {
40034 # [result setAlpha:floatWrapperWithValue(alpha)];
40035 # }
40036 # [result autorelease];
40037 # return result;
40038 # }
40039 # // ...
40040 #
40041 # Example (JavaScript):
40042 #
40043 # // ...
40044 #
40045 # var protoToCssColor = function(rgb_color) {
40046 # var redFrac = rgb_color.red || 0.0;
40047 # var greenFrac = rgb_color.green || 0.0;
40048 # var blueFrac = rgb_color.blue || 0.0;
40049 # var red = Math.floor(redFrac * 255);
40050 # var green = Math.floor(greenFrac * 255);
40051 # var blue = Math.floor(blueFrac * 255);
40052 #
40053 # if (!('alpha' in rgb_color)) {
40054 # return rgbToCssColor_(red, green, blue);
40055 # }
40056 #
40057 # var alphaFrac = rgb_color.alpha.value || 0.0;
40058 # var rgbParams = [red, green, blue].join(',');
40059 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40060 # };
40061 #
40062 # var rgbToCssColor_ = function(red, green, blue) {
40063 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40064 # var hexString = rgbNumber.toString(16);
40065 # var missingZeros = 6 - hexString.length;
40066 # var resultBuilder = ['#'];
40067 # for (var i = 0; i < missingZeros; i++) {
40068 # resultBuilder.push('0');
40069 # }
40070 # resultBuilder.push(hexString);
40071 # return resultBuilder.join('');
40072 # };
40073 #
40074 # // ...
40075 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40076 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40077 # the final pixel color is defined by the equation:
40078 #
40079 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40080 #
40081 # This means that a value of 1.0 corresponds to a solid color, whereas
40082 # a value of 0.0 corresponds to a completely transparent color. This
40083 # uses a wrapper message rather than a simple float scalar so that it is
40084 # possible to distinguish between a default value and the value being unset.
40085 # If omitted, this color object is to be rendered as a solid color
40086 # (as if the alpha value had been explicitly given with a value of 1.0).
40087 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40088 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40089 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070040090 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040091 "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).
40092 # Absent values indicate that the field isn't specified.
40093 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
40094 # for simplicity of conversion to/from color representations in various
40095 # languages over compactness; for example, the fields of this representation
40096 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40097 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40098 # method in iOS; and, with just a little work, it can be easily formatted into
40099 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40100 #
40101 # Example (Java):
40102 #
40103 # import com.google.type.Color;
40104 #
40105 # // ...
40106 # public static java.awt.Color fromProto(Color protocolor) {
40107 # float alpha = protocolor.hasAlpha()
40108 # ? protocolor.getAlpha().getValue()
40109 # : 1.0;
40110 #
40111 # return new java.awt.Color(
40112 # protocolor.getRed(),
40113 # protocolor.getGreen(),
40114 # protocolor.getBlue(),
40115 # alpha);
40116 # }
40117 #
40118 # public static Color toProto(java.awt.Color color) {
40119 # float red = (float) color.getRed();
40120 # float green = (float) color.getGreen();
40121 # float blue = (float) color.getBlue();
40122 # float denominator = 255.0;
40123 # Color.Builder resultBuilder =
40124 # Color
40125 # .newBuilder()
40126 # .setRed(red / denominator)
40127 # .setGreen(green / denominator)
40128 # .setBlue(blue / denominator);
40129 # int alpha = color.getAlpha();
40130 # if (alpha != 255) {
40131 # result.setAlpha(
40132 # FloatValue
40133 # .newBuilder()
40134 # .setValue(((float) alpha) / denominator)
40135 # .build());
40136 # }
40137 # return resultBuilder.build();
40138 # }
40139 # // ...
40140 #
40141 # Example (iOS / Obj-C):
40142 #
40143 # // ...
40144 # static UIColor* fromProto(Color* protocolor) {
40145 # float red = [protocolor red];
40146 # float green = [protocolor green];
40147 # float blue = [protocolor blue];
40148 # FloatValue* alpha_wrapper = [protocolor alpha];
40149 # float alpha = 1.0;
40150 # if (alpha_wrapper != nil) {
40151 # alpha = [alpha_wrapper value];
40152 # }
40153 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40154 # }
40155 #
40156 # static Color* toProto(UIColor* color) {
40157 # CGFloat red, green, blue, alpha;
40158 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40159 # return nil;
40160 # }
40161 # Color* result = [Color alloc] init];
40162 # [result setRed:red];
40163 # [result setGreen:green];
40164 # [result setBlue:blue];
40165 # if (alpha <= 0.9999) {
40166 # [result setAlpha:floatWrapperWithValue(alpha)];
40167 # }
40168 # [result autorelease];
40169 # return result;
40170 # }
40171 # // ...
40172 #
40173 # Example (JavaScript):
40174 #
40175 # // ...
40176 #
40177 # var protoToCssColor = function(rgb_color) {
40178 # var redFrac = rgb_color.red || 0.0;
40179 # var greenFrac = rgb_color.green || 0.0;
40180 # var blueFrac = rgb_color.blue || 0.0;
40181 # var red = Math.floor(redFrac * 255);
40182 # var green = Math.floor(greenFrac * 255);
40183 # var blue = Math.floor(blueFrac * 255);
40184 #
40185 # if (!('alpha' in rgb_color)) {
40186 # return rgbToCssColor_(red, green, blue);
40187 # }
40188 #
40189 # var alphaFrac = rgb_color.alpha.value || 0.0;
40190 # var rgbParams = [red, green, blue].join(',');
40191 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40192 # };
40193 #
40194 # var rgbToCssColor_ = function(red, green, blue) {
40195 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40196 # var hexString = rgbNumber.toString(16);
40197 # var missingZeros = 6 - hexString.length;
40198 # var resultBuilder = ['#'];
40199 # for (var i = 0; i < missingZeros; i++) {
40200 # resultBuilder.push('0');
40201 # }
40202 # resultBuilder.push(hexString);
40203 # return resultBuilder.join('');
40204 # };
40205 #
40206 # // ...
40207 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40208 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40209 # the final pixel color is defined by the equation:
40210 #
40211 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40212 #
40213 # This means that a value of 1.0 corresponds to a solid color, whereas
40214 # a value of 0.0 corresponds to a completely transparent color. This
40215 # uses a wrapper message rather than a simple float scalar so that it is
40216 # possible to distinguish between a default value and the value being unset.
40217 # If omitted, this color object is to be rendered as a solid color
40218 # (as if the alpha value had been explicitly given with a value of 1.0).
40219 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40220 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40221 },
40222 "bold": True or False, # True if the text is bold.
40223 "strikethrough": True or False, # True if the text has a strikethrough.
40224 "fontFamily": "A String", # The font family.
40225 "fontSize": 42, # The size of the font.
40226 "italic": True or False, # True if the text is italicized.
40227 "underline": True or False, # True if the text is underlined.
40228 },
40229 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
40230 "borders": { # The borders of the cell. # The borders of the cell.
40231 "top": { # A border along a cell. # The top border of the cell.
40232 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
40233 # for simplicity of conversion to/from color representations in various
40234 # languages over compactness; for example, the fields of this representation
40235 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40236 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40237 # method in iOS; and, with just a little work, it can be easily formatted into
40238 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40239 #
40240 # Example (Java):
40241 #
40242 # import com.google.type.Color;
40243 #
40244 # // ...
40245 # public static java.awt.Color fromProto(Color protocolor) {
40246 # float alpha = protocolor.hasAlpha()
40247 # ? protocolor.getAlpha().getValue()
40248 # : 1.0;
40249 #
40250 # return new java.awt.Color(
40251 # protocolor.getRed(),
40252 # protocolor.getGreen(),
40253 # protocolor.getBlue(),
40254 # alpha);
40255 # }
40256 #
40257 # public static Color toProto(java.awt.Color color) {
40258 # float red = (float) color.getRed();
40259 # float green = (float) color.getGreen();
40260 # float blue = (float) color.getBlue();
40261 # float denominator = 255.0;
40262 # Color.Builder resultBuilder =
40263 # Color
40264 # .newBuilder()
40265 # .setRed(red / denominator)
40266 # .setGreen(green / denominator)
40267 # .setBlue(blue / denominator);
40268 # int alpha = color.getAlpha();
40269 # if (alpha != 255) {
40270 # result.setAlpha(
40271 # FloatValue
40272 # .newBuilder()
40273 # .setValue(((float) alpha) / denominator)
40274 # .build());
40275 # }
40276 # return resultBuilder.build();
40277 # }
40278 # // ...
40279 #
40280 # Example (iOS / Obj-C):
40281 #
40282 # // ...
40283 # static UIColor* fromProto(Color* protocolor) {
40284 # float red = [protocolor red];
40285 # float green = [protocolor green];
40286 # float blue = [protocolor blue];
40287 # FloatValue* alpha_wrapper = [protocolor alpha];
40288 # float alpha = 1.0;
40289 # if (alpha_wrapper != nil) {
40290 # alpha = [alpha_wrapper value];
40291 # }
40292 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40293 # }
40294 #
40295 # static Color* toProto(UIColor* color) {
40296 # CGFloat red, green, blue, alpha;
40297 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40298 # return nil;
40299 # }
40300 # Color* result = [Color alloc] init];
40301 # [result setRed:red];
40302 # [result setGreen:green];
40303 # [result setBlue:blue];
40304 # if (alpha <= 0.9999) {
40305 # [result setAlpha:floatWrapperWithValue(alpha)];
40306 # }
40307 # [result autorelease];
40308 # return result;
40309 # }
40310 # // ...
40311 #
40312 # Example (JavaScript):
40313 #
40314 # // ...
40315 #
40316 # var protoToCssColor = function(rgb_color) {
40317 # var redFrac = rgb_color.red || 0.0;
40318 # var greenFrac = rgb_color.green || 0.0;
40319 # var blueFrac = rgb_color.blue || 0.0;
40320 # var red = Math.floor(redFrac * 255);
40321 # var green = Math.floor(greenFrac * 255);
40322 # var blue = Math.floor(blueFrac * 255);
40323 #
40324 # if (!('alpha' in rgb_color)) {
40325 # return rgbToCssColor_(red, green, blue);
40326 # }
40327 #
40328 # var alphaFrac = rgb_color.alpha.value || 0.0;
40329 # var rgbParams = [red, green, blue].join(',');
40330 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40331 # };
40332 #
40333 # var rgbToCssColor_ = function(red, green, blue) {
40334 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40335 # var hexString = rgbNumber.toString(16);
40336 # var missingZeros = 6 - hexString.length;
40337 # var resultBuilder = ['#'];
40338 # for (var i = 0; i < missingZeros; i++) {
40339 # resultBuilder.push('0');
40340 # }
40341 # resultBuilder.push(hexString);
40342 # return resultBuilder.join('');
40343 # };
40344 #
40345 # // ...
40346 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40347 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40348 # the final pixel color is defined by the equation:
40349 #
40350 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40351 #
40352 # This means that a value of 1.0 corresponds to a solid color, whereas
40353 # a value of 0.0 corresponds to a completely transparent color. This
40354 # uses a wrapper message rather than a simple float scalar so that it is
40355 # possible to distinguish between a default value and the value being unset.
40356 # If omitted, this color object is to be rendered as a solid color
40357 # (as if the alpha value had been explicitly given with a value of 1.0).
40358 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40359 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40360 },
40361 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070040362 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040363 "style": "A String", # The style of the border.
40364 },
40365 "right": { # A border along a cell. # The right border of the cell.
40366 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
40367 # for simplicity of conversion to/from color representations in various
40368 # languages over compactness; for example, the fields of this representation
40369 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40370 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40371 # method in iOS; and, with just a little work, it can be easily formatted into
40372 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40373 #
40374 # Example (Java):
40375 #
40376 # import com.google.type.Color;
40377 #
40378 # // ...
40379 # public static java.awt.Color fromProto(Color protocolor) {
40380 # float alpha = protocolor.hasAlpha()
40381 # ? protocolor.getAlpha().getValue()
40382 # : 1.0;
40383 #
40384 # return new java.awt.Color(
40385 # protocolor.getRed(),
40386 # protocolor.getGreen(),
40387 # protocolor.getBlue(),
40388 # alpha);
40389 # }
40390 #
40391 # public static Color toProto(java.awt.Color color) {
40392 # float red = (float) color.getRed();
40393 # float green = (float) color.getGreen();
40394 # float blue = (float) color.getBlue();
40395 # float denominator = 255.0;
40396 # Color.Builder resultBuilder =
40397 # Color
40398 # .newBuilder()
40399 # .setRed(red / denominator)
40400 # .setGreen(green / denominator)
40401 # .setBlue(blue / denominator);
40402 # int alpha = color.getAlpha();
40403 # if (alpha != 255) {
40404 # result.setAlpha(
40405 # FloatValue
40406 # .newBuilder()
40407 # .setValue(((float) alpha) / denominator)
40408 # .build());
40409 # }
40410 # return resultBuilder.build();
40411 # }
40412 # // ...
40413 #
40414 # Example (iOS / Obj-C):
40415 #
40416 # // ...
40417 # static UIColor* fromProto(Color* protocolor) {
40418 # float red = [protocolor red];
40419 # float green = [protocolor green];
40420 # float blue = [protocolor blue];
40421 # FloatValue* alpha_wrapper = [protocolor alpha];
40422 # float alpha = 1.0;
40423 # if (alpha_wrapper != nil) {
40424 # alpha = [alpha_wrapper value];
40425 # }
40426 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40427 # }
40428 #
40429 # static Color* toProto(UIColor* color) {
40430 # CGFloat red, green, blue, alpha;
40431 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40432 # return nil;
40433 # }
40434 # Color* result = [Color alloc] init];
40435 # [result setRed:red];
40436 # [result setGreen:green];
40437 # [result setBlue:blue];
40438 # if (alpha <= 0.9999) {
40439 # [result setAlpha:floatWrapperWithValue(alpha)];
40440 # }
40441 # [result autorelease];
40442 # return result;
40443 # }
40444 # // ...
40445 #
40446 # Example (JavaScript):
40447 #
40448 # // ...
40449 #
40450 # var protoToCssColor = function(rgb_color) {
40451 # var redFrac = rgb_color.red || 0.0;
40452 # var greenFrac = rgb_color.green || 0.0;
40453 # var blueFrac = rgb_color.blue || 0.0;
40454 # var red = Math.floor(redFrac * 255);
40455 # var green = Math.floor(greenFrac * 255);
40456 # var blue = Math.floor(blueFrac * 255);
40457 #
40458 # if (!('alpha' in rgb_color)) {
40459 # return rgbToCssColor_(red, green, blue);
40460 # }
40461 #
40462 # var alphaFrac = rgb_color.alpha.value || 0.0;
40463 # var rgbParams = [red, green, blue].join(',');
40464 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40465 # };
40466 #
40467 # var rgbToCssColor_ = function(red, green, blue) {
40468 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40469 # var hexString = rgbNumber.toString(16);
40470 # var missingZeros = 6 - hexString.length;
40471 # var resultBuilder = ['#'];
40472 # for (var i = 0; i < missingZeros; i++) {
40473 # resultBuilder.push('0');
40474 # }
40475 # resultBuilder.push(hexString);
40476 # return resultBuilder.join('');
40477 # };
40478 #
40479 # // ...
40480 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40481 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40482 # the final pixel color is defined by the equation:
40483 #
40484 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40485 #
40486 # This means that a value of 1.0 corresponds to a solid color, whereas
40487 # a value of 0.0 corresponds to a completely transparent color. This
40488 # uses a wrapper message rather than a simple float scalar so that it is
40489 # possible to distinguish between a default value and the value being unset.
40490 # If omitted, this color object is to be rendered as a solid color
40491 # (as if the alpha value had been explicitly given with a value of 1.0).
40492 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40493 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40494 },
40495 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070040496 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040497 "style": "A String", # The style of the border.
40498 },
40499 "bottom": { # A border along a cell. # The bottom border of the cell.
40500 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
40501 # for simplicity of conversion to/from color representations in various
40502 # languages over compactness; for example, the fields of this representation
40503 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40504 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40505 # method in iOS; and, with just a little work, it can be easily formatted into
40506 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40507 #
40508 # Example (Java):
40509 #
40510 # import com.google.type.Color;
40511 #
40512 # // ...
40513 # public static java.awt.Color fromProto(Color protocolor) {
40514 # float alpha = protocolor.hasAlpha()
40515 # ? protocolor.getAlpha().getValue()
40516 # : 1.0;
40517 #
40518 # return new java.awt.Color(
40519 # protocolor.getRed(),
40520 # protocolor.getGreen(),
40521 # protocolor.getBlue(),
40522 # alpha);
40523 # }
40524 #
40525 # public static Color toProto(java.awt.Color color) {
40526 # float red = (float) color.getRed();
40527 # float green = (float) color.getGreen();
40528 # float blue = (float) color.getBlue();
40529 # float denominator = 255.0;
40530 # Color.Builder resultBuilder =
40531 # Color
40532 # .newBuilder()
40533 # .setRed(red / denominator)
40534 # .setGreen(green / denominator)
40535 # .setBlue(blue / denominator);
40536 # int alpha = color.getAlpha();
40537 # if (alpha != 255) {
40538 # result.setAlpha(
40539 # FloatValue
40540 # .newBuilder()
40541 # .setValue(((float) alpha) / denominator)
40542 # .build());
40543 # }
40544 # return resultBuilder.build();
40545 # }
40546 # // ...
40547 #
40548 # Example (iOS / Obj-C):
40549 #
40550 # // ...
40551 # static UIColor* fromProto(Color* protocolor) {
40552 # float red = [protocolor red];
40553 # float green = [protocolor green];
40554 # float blue = [protocolor blue];
40555 # FloatValue* alpha_wrapper = [protocolor alpha];
40556 # float alpha = 1.0;
40557 # if (alpha_wrapper != nil) {
40558 # alpha = [alpha_wrapper value];
40559 # }
40560 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40561 # }
40562 #
40563 # static Color* toProto(UIColor* color) {
40564 # CGFloat red, green, blue, alpha;
40565 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40566 # return nil;
40567 # }
40568 # Color* result = [Color alloc] init];
40569 # [result setRed:red];
40570 # [result setGreen:green];
40571 # [result setBlue:blue];
40572 # if (alpha <= 0.9999) {
40573 # [result setAlpha:floatWrapperWithValue(alpha)];
40574 # }
40575 # [result autorelease];
40576 # return result;
40577 # }
40578 # // ...
40579 #
40580 # Example (JavaScript):
40581 #
40582 # // ...
40583 #
40584 # var protoToCssColor = function(rgb_color) {
40585 # var redFrac = rgb_color.red || 0.0;
40586 # var greenFrac = rgb_color.green || 0.0;
40587 # var blueFrac = rgb_color.blue || 0.0;
40588 # var red = Math.floor(redFrac * 255);
40589 # var green = Math.floor(greenFrac * 255);
40590 # var blue = Math.floor(blueFrac * 255);
40591 #
40592 # if (!('alpha' in rgb_color)) {
40593 # return rgbToCssColor_(red, green, blue);
40594 # }
40595 #
40596 # var alphaFrac = rgb_color.alpha.value || 0.0;
40597 # var rgbParams = [red, green, blue].join(',');
40598 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40599 # };
40600 #
40601 # var rgbToCssColor_ = function(red, green, blue) {
40602 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40603 # var hexString = rgbNumber.toString(16);
40604 # var missingZeros = 6 - hexString.length;
40605 # var resultBuilder = ['#'];
40606 # for (var i = 0; i < missingZeros; i++) {
40607 # resultBuilder.push('0');
40608 # }
40609 # resultBuilder.push(hexString);
40610 # return resultBuilder.join('');
40611 # };
40612 #
40613 # // ...
40614 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40615 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40616 # the final pixel color is defined by the equation:
40617 #
40618 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40619 #
40620 # This means that a value of 1.0 corresponds to a solid color, whereas
40621 # a value of 0.0 corresponds to a completely transparent color. This
40622 # uses a wrapper message rather than a simple float scalar so that it is
40623 # possible to distinguish between a default value and the value being unset.
40624 # If omitted, this color object is to be rendered as a solid color
40625 # (as if the alpha value had been explicitly given with a value of 1.0).
40626 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40627 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40628 },
40629 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070040630 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040631 "style": "A String", # The style of the border.
40632 },
40633 "left": { # A border along a cell. # The left border of the cell.
40634 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
40635 # for simplicity of conversion to/from color representations in various
40636 # languages over compactness; for example, the fields of this representation
40637 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40638 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40639 # method in iOS; and, with just a little work, it can be easily formatted into
40640 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40641 #
40642 # Example (Java):
40643 #
40644 # import com.google.type.Color;
40645 #
40646 # // ...
40647 # public static java.awt.Color fromProto(Color protocolor) {
40648 # float alpha = protocolor.hasAlpha()
40649 # ? protocolor.getAlpha().getValue()
40650 # : 1.0;
40651 #
40652 # return new java.awt.Color(
40653 # protocolor.getRed(),
40654 # protocolor.getGreen(),
40655 # protocolor.getBlue(),
40656 # alpha);
40657 # }
40658 #
40659 # public static Color toProto(java.awt.Color color) {
40660 # float red = (float) color.getRed();
40661 # float green = (float) color.getGreen();
40662 # float blue = (float) color.getBlue();
40663 # float denominator = 255.0;
40664 # Color.Builder resultBuilder =
40665 # Color
40666 # .newBuilder()
40667 # .setRed(red / denominator)
40668 # .setGreen(green / denominator)
40669 # .setBlue(blue / denominator);
40670 # int alpha = color.getAlpha();
40671 # if (alpha != 255) {
40672 # result.setAlpha(
40673 # FloatValue
40674 # .newBuilder()
40675 # .setValue(((float) alpha) / denominator)
40676 # .build());
40677 # }
40678 # return resultBuilder.build();
40679 # }
40680 # // ...
40681 #
40682 # Example (iOS / Obj-C):
40683 #
40684 # // ...
40685 # static UIColor* fromProto(Color* protocolor) {
40686 # float red = [protocolor red];
40687 # float green = [protocolor green];
40688 # float blue = [protocolor blue];
40689 # FloatValue* alpha_wrapper = [protocolor alpha];
40690 # float alpha = 1.0;
40691 # if (alpha_wrapper != nil) {
40692 # alpha = [alpha_wrapper value];
40693 # }
40694 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40695 # }
40696 #
40697 # static Color* toProto(UIColor* color) {
40698 # CGFloat red, green, blue, alpha;
40699 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40700 # return nil;
40701 # }
40702 # Color* result = [Color alloc] init];
40703 # [result setRed:red];
40704 # [result setGreen:green];
40705 # [result setBlue:blue];
40706 # if (alpha <= 0.9999) {
40707 # [result setAlpha:floatWrapperWithValue(alpha)];
40708 # }
40709 # [result autorelease];
40710 # return result;
40711 # }
40712 # // ...
40713 #
40714 # Example (JavaScript):
40715 #
40716 # // ...
40717 #
40718 # var protoToCssColor = function(rgb_color) {
40719 # var redFrac = rgb_color.red || 0.0;
40720 # var greenFrac = rgb_color.green || 0.0;
40721 # var blueFrac = rgb_color.blue || 0.0;
40722 # var red = Math.floor(redFrac * 255);
40723 # var green = Math.floor(greenFrac * 255);
40724 # var blue = Math.floor(blueFrac * 255);
40725 #
40726 # if (!('alpha' in rgb_color)) {
40727 # return rgbToCssColor_(red, green, blue);
40728 # }
40729 #
40730 # var alphaFrac = rgb_color.alpha.value || 0.0;
40731 # var rgbParams = [red, green, blue].join(',');
40732 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40733 # };
40734 #
40735 # var rgbToCssColor_ = function(red, green, blue) {
40736 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40737 # var hexString = rgbNumber.toString(16);
40738 # var missingZeros = 6 - hexString.length;
40739 # var resultBuilder = ['#'];
40740 # for (var i = 0; i < missingZeros; i++) {
40741 # resultBuilder.push('0');
40742 # }
40743 # resultBuilder.push(hexString);
40744 # return resultBuilder.join('');
40745 # };
40746 #
40747 # // ...
40748 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40749 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40750 # the final pixel color is defined by the equation:
40751 #
40752 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40753 #
40754 # This means that a value of 1.0 corresponds to a solid color, whereas
40755 # a value of 0.0 corresponds to a completely transparent color. This
40756 # uses a wrapper message rather than a simple float scalar so that it is
40757 # possible to distinguish between a default value and the value being unset.
40758 # If omitted, this color object is to be rendered as a solid color
40759 # (as if the alpha value had been explicitly given with a value of 1.0).
40760 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40761 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40762 },
40763 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070040764 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040765 "style": "A String", # The style of the border.
40766 },
40767 },
40768 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
40769 },
40770 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
40771 #
40772 # When writing, the new data validation rule will overwrite any prior rule.
40773 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
40774 # If true, "List" conditions will show a dropdown.
40775 "strict": True or False, # True if invalid data should be rejected.
40776 "inputMessage": "A String", # A message to show the user when adding data to the cell.
40777 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
40778 # BooleanConditions are used by conditional formatting,
40779 # data validation, and the criteria in filters.
40780 "type": "A String", # The type of condition.
40781 "values": [ # The values of the condition. The number of supported values depends
40782 # on the condition type. Some support zero values,
40783 # others one or two values,
40784 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
40785 { # The value of the condition.
40786 "relativeDate": "A String", # A relative date (based on the current date).
40787 # Valid only if the type is
40788 # DATE_BEFORE,
40789 # DATE_AFTER,
40790 # DATE_ON_OR_BEFORE or
40791 # DATE_ON_OR_AFTER.
40792 #
40793 # Relative dates are not supported in data validation.
40794 # They are supported only in conditional formatting and
40795 # conditional filters.
40796 "userEnteredValue": "A String", # A value the condition is based on.
40797 # The value will be parsed as if the user typed into a cell.
40798 # Formulas are supported (and must begin with an `=`).
40799 },
40800 ],
40801 },
40802 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070040803 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
40804 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040805 # Runs start at specific indexes in the text and continue until the next
40806 # run. Properties of a run will continue unless explicitly changed
40807 # in a subsequent run (and properties of the first run will continue
40808 # the properties of the cell unless explicitly changed).
40809 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070040810 # When writing, the new runs will overwrite any prior runs. When writing a
40811 # new user_entered_value, previous runs will be erased.
40812 { # A run of a text format. The format of this run continues until the start
40813 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040814 # When updating, all fields must be set.
40815 "startIndex": 42, # The character index where this run starts.
40816 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
40817 # Absent values indicate that the field isn't specified.
40818 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
40819 # for simplicity of conversion to/from color representations in various
40820 # languages over compactness; for example, the fields of this representation
40821 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40822 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40823 # method in iOS; and, with just a little work, it can be easily formatted into
40824 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40825 #
40826 # Example (Java):
40827 #
40828 # import com.google.type.Color;
40829 #
40830 # // ...
40831 # public static java.awt.Color fromProto(Color protocolor) {
40832 # float alpha = protocolor.hasAlpha()
40833 # ? protocolor.getAlpha().getValue()
40834 # : 1.0;
40835 #
40836 # return new java.awt.Color(
40837 # protocolor.getRed(),
40838 # protocolor.getGreen(),
40839 # protocolor.getBlue(),
40840 # alpha);
40841 # }
40842 #
40843 # public static Color toProto(java.awt.Color color) {
40844 # float red = (float) color.getRed();
40845 # float green = (float) color.getGreen();
40846 # float blue = (float) color.getBlue();
40847 # float denominator = 255.0;
40848 # Color.Builder resultBuilder =
40849 # Color
40850 # .newBuilder()
40851 # .setRed(red / denominator)
40852 # .setGreen(green / denominator)
40853 # .setBlue(blue / denominator);
40854 # int alpha = color.getAlpha();
40855 # if (alpha != 255) {
40856 # result.setAlpha(
40857 # FloatValue
40858 # .newBuilder()
40859 # .setValue(((float) alpha) / denominator)
40860 # .build());
40861 # }
40862 # return resultBuilder.build();
40863 # }
40864 # // ...
40865 #
40866 # Example (iOS / Obj-C):
40867 #
40868 # // ...
40869 # static UIColor* fromProto(Color* protocolor) {
40870 # float red = [protocolor red];
40871 # float green = [protocolor green];
40872 # float blue = [protocolor blue];
40873 # FloatValue* alpha_wrapper = [protocolor alpha];
40874 # float alpha = 1.0;
40875 # if (alpha_wrapper != nil) {
40876 # alpha = [alpha_wrapper value];
40877 # }
40878 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40879 # }
40880 #
40881 # static Color* toProto(UIColor* color) {
40882 # CGFloat red, green, blue, alpha;
40883 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40884 # return nil;
40885 # }
40886 # Color* result = [Color alloc] init];
40887 # [result setRed:red];
40888 # [result setGreen:green];
40889 # [result setBlue:blue];
40890 # if (alpha <= 0.9999) {
40891 # [result setAlpha:floatWrapperWithValue(alpha)];
40892 # }
40893 # [result autorelease];
40894 # return result;
40895 # }
40896 # // ...
40897 #
40898 # Example (JavaScript):
40899 #
40900 # // ...
40901 #
40902 # var protoToCssColor = function(rgb_color) {
40903 # var redFrac = rgb_color.red || 0.0;
40904 # var greenFrac = rgb_color.green || 0.0;
40905 # var blueFrac = rgb_color.blue || 0.0;
40906 # var red = Math.floor(redFrac * 255);
40907 # var green = Math.floor(greenFrac * 255);
40908 # var blue = Math.floor(blueFrac * 255);
40909 #
40910 # if (!('alpha' in rgb_color)) {
40911 # return rgbToCssColor_(red, green, blue);
40912 # }
40913 #
40914 # var alphaFrac = rgb_color.alpha.value || 0.0;
40915 # var rgbParams = [red, green, blue].join(',');
40916 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40917 # };
40918 #
40919 # var rgbToCssColor_ = function(red, green, blue) {
40920 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40921 # var hexString = rgbNumber.toString(16);
40922 # var missingZeros = 6 - hexString.length;
40923 # var resultBuilder = ['#'];
40924 # for (var i = 0; i < missingZeros; i++) {
40925 # resultBuilder.push('0');
40926 # }
40927 # resultBuilder.push(hexString);
40928 # return resultBuilder.join('');
40929 # };
40930 #
40931 # // ...
40932 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40933 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40934 # the final pixel color is defined by the equation:
40935 #
40936 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40937 #
40938 # This means that a value of 1.0 corresponds to a solid color, whereas
40939 # a value of 0.0 corresponds to a completely transparent color. This
40940 # uses a wrapper message rather than a simple float scalar so that it is
40941 # possible to distinguish between a default value and the value being unset.
40942 # If omitted, this color object is to be rendered as a solid color
40943 # (as if the alpha value had been explicitly given with a value of 1.0).
40944 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40945 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40946 },
40947 "bold": True or False, # True if the text is bold.
40948 "strikethrough": True or False, # True if the text has a strikethrough.
40949 "fontFamily": "A String", # The font family.
40950 "fontSize": 42, # The size of the font.
40951 "italic": True or False, # True if the text is italicized.
40952 "underline": True or False, # True if the text is underlined.
40953 },
40954 },
40955 ],
40956 },
40957 ],
40958 },
40959 ],
40960 },
40961 ],
40962 "properties": { # Properties of a sheet. # The properties of the sheet.
40963 "sheetType": "A String", # The type of sheet. Defaults to GRID.
40964 # This field cannot be changed once set.
40965 "index": 42, # The index of the sheet within the spreadsheet.
40966 # When adding or updating sheet properties, if this field
40967 # is excluded then the sheet will be added or moved to the end
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080040968 # of the sheet list. When updating sheet indices or inserting
40969 # sheets, movement is considered in "before the move" indexes.
40970 # For example, if there were 3 sheets (S1, S2, S3) in order to
40971 # move S1 ahead of S2 the index would have to be set to 2. A sheet
40972 # index update request will be ignored if the requested index is
40973 # identical to the sheets current index or if the requested new
40974 # index is equal to the current sheet index + 1.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040975 "title": "A String", # The name of the sheet.
40976 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
40977 # (If the sheet is an object sheet, containing a chart or image, then
40978 # this field will be absent.)
40979 # When writing it is an error to set any grid properties on non-grid sheets.
40980 "columnCount": 42, # The number of columns in the grid.
40981 "rowCount": 42, # The number of rows in the grid.
40982 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
40983 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
40984 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
40985 },
40986 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
40987 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
40988 # for simplicity of conversion to/from color representations in various
40989 # languages over compactness; for example, the fields of this representation
40990 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40991 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40992 # method in iOS; and, with just a little work, it can be easily formatted into
40993 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40994 #
40995 # Example (Java):
40996 #
40997 # import com.google.type.Color;
40998 #
40999 # // ...
41000 # public static java.awt.Color fromProto(Color protocolor) {
41001 # float alpha = protocolor.hasAlpha()
41002 # ? protocolor.getAlpha().getValue()
41003 # : 1.0;
41004 #
41005 # return new java.awt.Color(
41006 # protocolor.getRed(),
41007 # protocolor.getGreen(),
41008 # protocolor.getBlue(),
41009 # alpha);
41010 # }
41011 #
41012 # public static Color toProto(java.awt.Color color) {
41013 # float red = (float) color.getRed();
41014 # float green = (float) color.getGreen();
41015 # float blue = (float) color.getBlue();
41016 # float denominator = 255.0;
41017 # Color.Builder resultBuilder =
41018 # Color
41019 # .newBuilder()
41020 # .setRed(red / denominator)
41021 # .setGreen(green / denominator)
41022 # .setBlue(blue / denominator);
41023 # int alpha = color.getAlpha();
41024 # if (alpha != 255) {
41025 # result.setAlpha(
41026 # FloatValue
41027 # .newBuilder()
41028 # .setValue(((float) alpha) / denominator)
41029 # .build());
41030 # }
41031 # return resultBuilder.build();
41032 # }
41033 # // ...
41034 #
41035 # Example (iOS / Obj-C):
41036 #
41037 # // ...
41038 # static UIColor* fromProto(Color* protocolor) {
41039 # float red = [protocolor red];
41040 # float green = [protocolor green];
41041 # float blue = [protocolor blue];
41042 # FloatValue* alpha_wrapper = [protocolor alpha];
41043 # float alpha = 1.0;
41044 # if (alpha_wrapper != nil) {
41045 # alpha = [alpha_wrapper value];
41046 # }
41047 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41048 # }
41049 #
41050 # static Color* toProto(UIColor* color) {
41051 # CGFloat red, green, blue, alpha;
41052 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41053 # return nil;
41054 # }
41055 # Color* result = [Color alloc] init];
41056 # [result setRed:red];
41057 # [result setGreen:green];
41058 # [result setBlue:blue];
41059 # if (alpha <= 0.9999) {
41060 # [result setAlpha:floatWrapperWithValue(alpha)];
41061 # }
41062 # [result autorelease];
41063 # return result;
41064 # }
41065 # // ...
41066 #
41067 # Example (JavaScript):
41068 #
41069 # // ...
41070 #
41071 # var protoToCssColor = function(rgb_color) {
41072 # var redFrac = rgb_color.red || 0.0;
41073 # var greenFrac = rgb_color.green || 0.0;
41074 # var blueFrac = rgb_color.blue || 0.0;
41075 # var red = Math.floor(redFrac * 255);
41076 # var green = Math.floor(greenFrac * 255);
41077 # var blue = Math.floor(blueFrac * 255);
41078 #
41079 # if (!('alpha' in rgb_color)) {
41080 # return rgbToCssColor_(red, green, blue);
41081 # }
41082 #
41083 # var alphaFrac = rgb_color.alpha.value || 0.0;
41084 # var rgbParams = [red, green, blue].join(',');
41085 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41086 # };
41087 #
41088 # var rgbToCssColor_ = function(red, green, blue) {
41089 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41090 # var hexString = rgbNumber.toString(16);
41091 # var missingZeros = 6 - hexString.length;
41092 # var resultBuilder = ['#'];
41093 # for (var i = 0; i < missingZeros; i++) {
41094 # resultBuilder.push('0');
41095 # }
41096 # resultBuilder.push(hexString);
41097 # return resultBuilder.join('');
41098 # };
41099 #
41100 # // ...
41101 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41102 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41103 # the final pixel color is defined by the equation:
41104 #
41105 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
41106 #
41107 # This means that a value of 1.0 corresponds to a solid color, whereas
41108 # a value of 0.0 corresponds to a completely transparent color. This
41109 # uses a wrapper message rather than a simple float scalar so that it is
41110 # possible to distinguish between a default value and the value being unset.
41111 # If omitted, this color object is to be rendered as a solid color
41112 # (as if the alpha value had been explicitly given with a value of 1.0).
41113 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41114 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
41115 },
41116 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
41117 "sheetId": 42, # The ID of the sheet. Must be non-negative.
41118 # This field cannot be changed once set.
41119 },
41120 },
41121 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041122 "spreadsheetUrl": "A String", # The url of the spreadsheet.
41123 # This field is read-only.
41124 }</pre>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041125</div>
41126
41127<div class="method">
41128 <code class="details" id="get">get(spreadsheetId, ranges=None, x__xgafv=None, includeGridData=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041129 <pre>Returns the spreadsheet at the given ID.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041130The caller must specify the spreadsheet ID.
41131
41132By default, data within grids will not be returned.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041133You can include grid data one of two ways:
41134
41135* Specify a field mask listing your desired fields using the `fields` URL
41136parameter in HTTP
41137
41138* Set the includeGridData
41139URL parameter to true. If a field mask is set, the `includeGridData`
41140parameter is ignored
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041141
41142For large spreadsheets, it is recommended to retrieve only the specific
41143fields of the spreadsheet that you want.
41144
41145To retrieve only subsets of the spreadsheet, use the
41146ranges URL parameter.
41147Multiple ranges can be specified. Limiting the range will
41148return only the portions of the spreadsheet that intersect the requested
41149ranges. Ranges are specified using A1 notation.
41150
41151Args:
41152 spreadsheetId: string, The spreadsheet to request. (required)
41153 ranges: string, The ranges to retrieve from the spreadsheet. (repeated)
41154 x__xgafv: string, V1 error format.
41155 Allowed values
41156 1 - v1 error format
41157 2 - v2 error format
41158 includeGridData: boolean, True if grid data should be returned.
41159This parameter is ignored if a field mask was set in the request.
41160
41161Returns:
41162 An object of the form:
41163
41164 { # Resource that represents a spreadsheet.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041165 "spreadsheetId": "A String", # The ID of the spreadsheet.
41166 # This field is read-only.
41167 "namedRanges": [ # The named ranges defined in a spreadsheet.
41168 { # A named range.
41169 "namedRangeId": "A String", # The ID of the named range.
41170 "range": { # A range on a sheet. # The range this represents.
41171 # All indexes are zero-based.
41172 # Indexes are half open, e.g the start index is inclusive
41173 # and the end index is exclusive -- [start_index, end_index).
41174 # Missing indexes indicate the range is unbounded on that side.
41175 #
41176 # For example, if `"Sheet1"` is sheet ID 0, then:
41177 #
41178 # `Sheet1!A1:A1 == sheet_id: 0,
41179 # start_row_index: 0, end_row_index: 1,
41180 # start_column_index: 0, end_column_index: 1`
41181 #
41182 # `Sheet1!A3:B4 == sheet_id: 0,
41183 # start_row_index: 2, end_row_index: 4,
41184 # start_column_index: 0, end_column_index: 2`
41185 #
41186 # `Sheet1!A:B == sheet_id: 0,
41187 # start_column_index: 0, end_column_index: 2`
41188 #
41189 # `Sheet1!A5:B == sheet_id: 0,
41190 # start_row_index: 4,
41191 # start_column_index: 0, end_column_index: 2`
41192 #
41193 # `Sheet1 == sheet_id:0`
41194 #
41195 # The start index must always be less than or equal to the end index.
41196 # If the start index equals the end index, then the range is empty.
41197 # Empty ranges are typically not meaningful and are usually rendered in the
41198 # UI as `#REF!`.
41199 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
41200 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
41201 "sheetId": 42, # The sheet this range is on.
41202 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
41203 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041204 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041205 "name": "A String", # The name of the named range.
41206 },
41207 ],
41208 "properties": { # Properties of a spreadsheet. # Overall properties of a spreadsheet.
41209 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
41210 #
41211 # * an ISO 639-1 language code such as `en`
41212 #
41213 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
41214 #
41215 # * a combination of the ISO language code and country code, such as `en_US`
41216 #
41217 # Note: when updating this field, not all locales/languages are supported.
41218 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
41219 # `America/New_York`. If the time zone isn't recognized, this may
41220 # be a custom time zone such as `GMT-07:00`.
41221 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
41222 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
41223 # CellData.effectiveFormat will not be set if the
41224 # cell's format is equal to this default format.
41225 # This field is read-only.
41226 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
41227 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
41228 # the user's locale will be used if necessary for the given type.
41229 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
41230 # information about the supported patterns.
41231 "type": "A String", # The type of the number format.
41232 # When writing, this field must be set.
41233 },
41234 "textDirection": "A String", # The direction of the text in the cell.
41235 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
41236 # When updating padding, every field must be specified.
41237 "top": 42, # The top padding of the cell.
41238 "right": 42, # The right padding of the cell.
41239 "bottom": 42, # The bottom padding of the cell.
41240 "left": 42, # The left padding of the cell.
41241 },
41242 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
41243 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
41244 # for simplicity of conversion to/from color representations in various
41245 # languages over compactness; for example, the fields of this representation
41246 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41247 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41248 # method in iOS; and, with just a little work, it can be easily formatted into
41249 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041250 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041251 # Example (Java):
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041252 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041253 # import com.google.type.Color;
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041254 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041255 # // ...
41256 # public static java.awt.Color fromProto(Color protocolor) {
41257 # float alpha = protocolor.hasAlpha()
41258 # ? protocolor.getAlpha().getValue()
41259 # : 1.0;
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041260 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041261 # return new java.awt.Color(
41262 # protocolor.getRed(),
41263 # protocolor.getGreen(),
41264 # protocolor.getBlue(),
41265 # alpha);
41266 # }
41267 #
41268 # public static Color toProto(java.awt.Color color) {
41269 # float red = (float) color.getRed();
41270 # float green = (float) color.getGreen();
41271 # float blue = (float) color.getBlue();
41272 # float denominator = 255.0;
41273 # Color.Builder resultBuilder =
41274 # Color
41275 # .newBuilder()
41276 # .setRed(red / denominator)
41277 # .setGreen(green / denominator)
41278 # .setBlue(blue / denominator);
41279 # int alpha = color.getAlpha();
41280 # if (alpha != 255) {
41281 # result.setAlpha(
41282 # FloatValue
41283 # .newBuilder()
41284 # .setValue(((float) alpha) / denominator)
41285 # .build());
41286 # }
41287 # return resultBuilder.build();
41288 # }
41289 # // ...
41290 #
41291 # Example (iOS / Obj-C):
41292 #
41293 # // ...
41294 # static UIColor* fromProto(Color* protocolor) {
41295 # float red = [protocolor red];
41296 # float green = [protocolor green];
41297 # float blue = [protocolor blue];
41298 # FloatValue* alpha_wrapper = [protocolor alpha];
41299 # float alpha = 1.0;
41300 # if (alpha_wrapper != nil) {
41301 # alpha = [alpha_wrapper value];
41302 # }
41303 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41304 # }
41305 #
41306 # static Color* toProto(UIColor* color) {
41307 # CGFloat red, green, blue, alpha;
41308 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41309 # return nil;
41310 # }
41311 # Color* result = [Color alloc] init];
41312 # [result setRed:red];
41313 # [result setGreen:green];
41314 # [result setBlue:blue];
41315 # if (alpha <= 0.9999) {
41316 # [result setAlpha:floatWrapperWithValue(alpha)];
41317 # }
41318 # [result autorelease];
41319 # return result;
41320 # }
41321 # // ...
41322 #
41323 # Example (JavaScript):
41324 #
41325 # // ...
41326 #
41327 # var protoToCssColor = function(rgb_color) {
41328 # var redFrac = rgb_color.red || 0.0;
41329 # var greenFrac = rgb_color.green || 0.0;
41330 # var blueFrac = rgb_color.blue || 0.0;
41331 # var red = Math.floor(redFrac * 255);
41332 # var green = Math.floor(greenFrac * 255);
41333 # var blue = Math.floor(blueFrac * 255);
41334 #
41335 # if (!('alpha' in rgb_color)) {
41336 # return rgbToCssColor_(red, green, blue);
41337 # }
41338 #
41339 # var alphaFrac = rgb_color.alpha.value || 0.0;
41340 # var rgbParams = [red, green, blue].join(',');
41341 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41342 # };
41343 #
41344 # var rgbToCssColor_ = function(red, green, blue) {
41345 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41346 # var hexString = rgbNumber.toString(16);
41347 # var missingZeros = 6 - hexString.length;
41348 # var resultBuilder = ['#'];
41349 # for (var i = 0; i < missingZeros; i++) {
41350 # resultBuilder.push('0');
41351 # }
41352 # resultBuilder.push(hexString);
41353 # return resultBuilder.join('');
41354 # };
41355 #
41356 # // ...
41357 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41358 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41359 # the final pixel color is defined by the equation:
41360 #
41361 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
41362 #
41363 # This means that a value of 1.0 corresponds to a solid color, whereas
41364 # a value of 0.0 corresponds to a completely transparent color. This
41365 # uses a wrapper message rather than a simple float scalar so that it is
41366 # possible to distinguish between a default value and the value being unset.
41367 # If omitted, this color object is to be rendered as a solid color
41368 # (as if the alpha value had been explicitly given with a value of 1.0).
41369 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41370 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
41371 },
41372 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
41373 "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).
41374 # Absent values indicate that the field isn't specified.
41375 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041376 # for simplicity of conversion to/from color representations in various
41377 # languages over compactness; for example, the fields of this representation
41378 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41379 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41380 # method in iOS; and, with just a little work, it can be easily formatted into
41381 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
41382 #
41383 # Example (Java):
41384 #
41385 # import com.google.type.Color;
41386 #
41387 # // ...
41388 # public static java.awt.Color fromProto(Color protocolor) {
41389 # float alpha = protocolor.hasAlpha()
41390 # ? protocolor.getAlpha().getValue()
41391 # : 1.0;
41392 #
41393 # return new java.awt.Color(
41394 # protocolor.getRed(),
41395 # protocolor.getGreen(),
41396 # protocolor.getBlue(),
41397 # alpha);
41398 # }
41399 #
41400 # public static Color toProto(java.awt.Color color) {
41401 # float red = (float) color.getRed();
41402 # float green = (float) color.getGreen();
41403 # float blue = (float) color.getBlue();
41404 # float denominator = 255.0;
41405 # Color.Builder resultBuilder =
41406 # Color
41407 # .newBuilder()
41408 # .setRed(red / denominator)
41409 # .setGreen(green / denominator)
41410 # .setBlue(blue / denominator);
41411 # int alpha = color.getAlpha();
41412 # if (alpha != 255) {
41413 # result.setAlpha(
41414 # FloatValue
41415 # .newBuilder()
41416 # .setValue(((float) alpha) / denominator)
41417 # .build());
41418 # }
41419 # return resultBuilder.build();
41420 # }
41421 # // ...
41422 #
41423 # Example (iOS / Obj-C):
41424 #
41425 # // ...
41426 # static UIColor* fromProto(Color* protocolor) {
41427 # float red = [protocolor red];
41428 # float green = [protocolor green];
41429 # float blue = [protocolor blue];
41430 # FloatValue* alpha_wrapper = [protocolor alpha];
41431 # float alpha = 1.0;
41432 # if (alpha_wrapper != nil) {
41433 # alpha = [alpha_wrapper value];
41434 # }
41435 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41436 # }
41437 #
41438 # static Color* toProto(UIColor* color) {
41439 # CGFloat red, green, blue, alpha;
41440 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41441 # return nil;
41442 # }
41443 # Color* result = [Color alloc] init];
41444 # [result setRed:red];
41445 # [result setGreen:green];
41446 # [result setBlue:blue];
41447 # if (alpha <= 0.9999) {
41448 # [result setAlpha:floatWrapperWithValue(alpha)];
41449 # }
41450 # [result autorelease];
41451 # return result;
41452 # }
41453 # // ...
41454 #
41455 # Example (JavaScript):
41456 #
41457 # // ...
41458 #
41459 # var protoToCssColor = function(rgb_color) {
41460 # var redFrac = rgb_color.red || 0.0;
41461 # var greenFrac = rgb_color.green || 0.0;
41462 # var blueFrac = rgb_color.blue || 0.0;
41463 # var red = Math.floor(redFrac * 255);
41464 # var green = Math.floor(greenFrac * 255);
41465 # var blue = Math.floor(blueFrac * 255);
41466 #
41467 # if (!('alpha' in rgb_color)) {
41468 # return rgbToCssColor_(red, green, blue);
41469 # }
41470 #
41471 # var alphaFrac = rgb_color.alpha.value || 0.0;
41472 # var rgbParams = [red, green, blue].join(',');
41473 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41474 # };
41475 #
41476 # var rgbToCssColor_ = function(red, green, blue) {
41477 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41478 # var hexString = rgbNumber.toString(16);
41479 # var missingZeros = 6 - hexString.length;
41480 # var resultBuilder = ['#'];
41481 # for (var i = 0; i < missingZeros; i++) {
41482 # resultBuilder.push('0');
41483 # }
41484 # resultBuilder.push(hexString);
41485 # return resultBuilder.join('');
41486 # };
41487 #
41488 # // ...
41489 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41490 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41491 # the final pixel color is defined by the equation:
41492 #
41493 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
41494 #
41495 # This means that a value of 1.0 corresponds to a solid color, whereas
41496 # a value of 0.0 corresponds to a completely transparent color. This
41497 # uses a wrapper message rather than a simple float scalar so that it is
41498 # possible to distinguish between a default value and the value being unset.
41499 # If omitted, this color object is to be rendered as a solid color
41500 # (as if the alpha value had been explicitly given with a value of 1.0).
41501 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41502 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
41503 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041504 "bold": True or False, # True if the text is bold.
41505 "strikethrough": True or False, # True if the text has a strikethrough.
41506 "fontFamily": "A String", # The font family.
41507 "fontSize": 42, # The size of the font.
41508 "italic": True or False, # True if the text is italicized.
41509 "underline": True or False, # True if the text is underlined.
41510 },
41511 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
41512 "borders": { # The borders of the cell. # The borders of the cell.
41513 "top": { # A border along a cell. # The top border of the cell.
41514 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041515 # for simplicity of conversion to/from color representations in various
41516 # languages over compactness; for example, the fields of this representation
41517 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41518 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41519 # method in iOS; and, with just a little work, it can be easily formatted into
41520 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
41521 #
41522 # Example (Java):
41523 #
41524 # import com.google.type.Color;
41525 #
41526 # // ...
41527 # public static java.awt.Color fromProto(Color protocolor) {
41528 # float alpha = protocolor.hasAlpha()
41529 # ? protocolor.getAlpha().getValue()
41530 # : 1.0;
41531 #
41532 # return new java.awt.Color(
41533 # protocolor.getRed(),
41534 # protocolor.getGreen(),
41535 # protocolor.getBlue(),
41536 # alpha);
41537 # }
41538 #
41539 # public static Color toProto(java.awt.Color color) {
41540 # float red = (float) color.getRed();
41541 # float green = (float) color.getGreen();
41542 # float blue = (float) color.getBlue();
41543 # float denominator = 255.0;
41544 # Color.Builder resultBuilder =
41545 # Color
41546 # .newBuilder()
41547 # .setRed(red / denominator)
41548 # .setGreen(green / denominator)
41549 # .setBlue(blue / denominator);
41550 # int alpha = color.getAlpha();
41551 # if (alpha != 255) {
41552 # result.setAlpha(
41553 # FloatValue
41554 # .newBuilder()
41555 # .setValue(((float) alpha) / denominator)
41556 # .build());
41557 # }
41558 # return resultBuilder.build();
41559 # }
41560 # // ...
41561 #
41562 # Example (iOS / Obj-C):
41563 #
41564 # // ...
41565 # static UIColor* fromProto(Color* protocolor) {
41566 # float red = [protocolor red];
41567 # float green = [protocolor green];
41568 # float blue = [protocolor blue];
41569 # FloatValue* alpha_wrapper = [protocolor alpha];
41570 # float alpha = 1.0;
41571 # if (alpha_wrapper != nil) {
41572 # alpha = [alpha_wrapper value];
41573 # }
41574 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41575 # }
41576 #
41577 # static Color* toProto(UIColor* color) {
41578 # CGFloat red, green, blue, alpha;
41579 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41580 # return nil;
41581 # }
41582 # Color* result = [Color alloc] init];
41583 # [result setRed:red];
41584 # [result setGreen:green];
41585 # [result setBlue:blue];
41586 # if (alpha <= 0.9999) {
41587 # [result setAlpha:floatWrapperWithValue(alpha)];
41588 # }
41589 # [result autorelease];
41590 # return result;
41591 # }
41592 # // ...
41593 #
41594 # Example (JavaScript):
41595 #
41596 # // ...
41597 #
41598 # var protoToCssColor = function(rgb_color) {
41599 # var redFrac = rgb_color.red || 0.0;
41600 # var greenFrac = rgb_color.green || 0.0;
41601 # var blueFrac = rgb_color.blue || 0.0;
41602 # var red = Math.floor(redFrac * 255);
41603 # var green = Math.floor(greenFrac * 255);
41604 # var blue = Math.floor(blueFrac * 255);
41605 #
41606 # if (!('alpha' in rgb_color)) {
41607 # return rgbToCssColor_(red, green, blue);
41608 # }
41609 #
41610 # var alphaFrac = rgb_color.alpha.value || 0.0;
41611 # var rgbParams = [red, green, blue].join(',');
41612 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41613 # };
41614 #
41615 # var rgbToCssColor_ = function(red, green, blue) {
41616 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41617 # var hexString = rgbNumber.toString(16);
41618 # var missingZeros = 6 - hexString.length;
41619 # var resultBuilder = ['#'];
41620 # for (var i = 0; i < missingZeros; i++) {
41621 # resultBuilder.push('0');
41622 # }
41623 # resultBuilder.push(hexString);
41624 # return resultBuilder.join('');
41625 # };
41626 #
41627 # // ...
41628 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41629 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41630 # the final pixel color is defined by the equation:
41631 #
41632 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
41633 #
41634 # This means that a value of 1.0 corresponds to a solid color, whereas
41635 # a value of 0.0 corresponds to a completely transparent color. This
41636 # uses a wrapper message rather than a simple float scalar so that it is
41637 # possible to distinguish between a default value and the value being unset.
41638 # If omitted, this color object is to be rendered as a solid color
41639 # (as if the alpha value had been explicitly given with a value of 1.0).
41640 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41641 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
41642 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041643 "width": 42, # The width of the border, in pixels.
41644 # Deprecated; the width is determined by the "style" field.
41645 "style": "A String", # The style of the border.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041646 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041647 "right": { # A border along a cell. # The right border of the cell.
41648 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
41649 # for simplicity of conversion to/from color representations in various
41650 # languages over compactness; for example, the fields of this representation
41651 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41652 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41653 # method in iOS; and, with just a little work, it can be easily formatted into
41654 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
41655 #
41656 # Example (Java):
41657 #
41658 # import com.google.type.Color;
41659 #
41660 # // ...
41661 # public static java.awt.Color fromProto(Color protocolor) {
41662 # float alpha = protocolor.hasAlpha()
41663 # ? protocolor.getAlpha().getValue()
41664 # : 1.0;
41665 #
41666 # return new java.awt.Color(
41667 # protocolor.getRed(),
41668 # protocolor.getGreen(),
41669 # protocolor.getBlue(),
41670 # alpha);
41671 # }
41672 #
41673 # public static Color toProto(java.awt.Color color) {
41674 # float red = (float) color.getRed();
41675 # float green = (float) color.getGreen();
41676 # float blue = (float) color.getBlue();
41677 # float denominator = 255.0;
41678 # Color.Builder resultBuilder =
41679 # Color
41680 # .newBuilder()
41681 # .setRed(red / denominator)
41682 # .setGreen(green / denominator)
41683 # .setBlue(blue / denominator);
41684 # int alpha = color.getAlpha();
41685 # if (alpha != 255) {
41686 # result.setAlpha(
41687 # FloatValue
41688 # .newBuilder()
41689 # .setValue(((float) alpha) / denominator)
41690 # .build());
41691 # }
41692 # return resultBuilder.build();
41693 # }
41694 # // ...
41695 #
41696 # Example (iOS / Obj-C):
41697 #
41698 # // ...
41699 # static UIColor* fromProto(Color* protocolor) {
41700 # float red = [protocolor red];
41701 # float green = [protocolor green];
41702 # float blue = [protocolor blue];
41703 # FloatValue* alpha_wrapper = [protocolor alpha];
41704 # float alpha = 1.0;
41705 # if (alpha_wrapper != nil) {
41706 # alpha = [alpha_wrapper value];
41707 # }
41708 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41709 # }
41710 #
41711 # static Color* toProto(UIColor* color) {
41712 # CGFloat red, green, blue, alpha;
41713 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41714 # return nil;
41715 # }
41716 # Color* result = [Color alloc] init];
41717 # [result setRed:red];
41718 # [result setGreen:green];
41719 # [result setBlue:blue];
41720 # if (alpha <= 0.9999) {
41721 # [result setAlpha:floatWrapperWithValue(alpha)];
41722 # }
41723 # [result autorelease];
41724 # return result;
41725 # }
41726 # // ...
41727 #
41728 # Example (JavaScript):
41729 #
41730 # // ...
41731 #
41732 # var protoToCssColor = function(rgb_color) {
41733 # var redFrac = rgb_color.red || 0.0;
41734 # var greenFrac = rgb_color.green || 0.0;
41735 # var blueFrac = rgb_color.blue || 0.0;
41736 # var red = Math.floor(redFrac * 255);
41737 # var green = Math.floor(greenFrac * 255);
41738 # var blue = Math.floor(blueFrac * 255);
41739 #
41740 # if (!('alpha' in rgb_color)) {
41741 # return rgbToCssColor_(red, green, blue);
41742 # }
41743 #
41744 # var alphaFrac = rgb_color.alpha.value || 0.0;
41745 # var rgbParams = [red, green, blue].join(',');
41746 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41747 # };
41748 #
41749 # var rgbToCssColor_ = function(red, green, blue) {
41750 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41751 # var hexString = rgbNumber.toString(16);
41752 # var missingZeros = 6 - hexString.length;
41753 # var resultBuilder = ['#'];
41754 # for (var i = 0; i < missingZeros; i++) {
41755 # resultBuilder.push('0');
41756 # }
41757 # resultBuilder.push(hexString);
41758 # return resultBuilder.join('');
41759 # };
41760 #
41761 # // ...
41762 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41763 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41764 # the final pixel color is defined by the equation:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041765 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041766 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041767 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041768 # This means that a value of 1.0 corresponds to a solid color, whereas
41769 # a value of 0.0 corresponds to a completely transparent color. This
41770 # uses a wrapper message rather than a simple float scalar so that it is
41771 # possible to distinguish between a default value and the value being unset.
41772 # If omitted, this color object is to be rendered as a solid color
41773 # (as if the alpha value had been explicitly given with a value of 1.0).
41774 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41775 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041776 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041777 "width": 42, # The width of the border, in pixels.
41778 # Deprecated; the width is determined by the "style" field.
41779 "style": "A String", # The style of the border.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041780 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041781 "bottom": { # A border along a cell. # The bottom border of the cell.
41782 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
41783 # for simplicity of conversion to/from color representations in various
41784 # languages over compactness; for example, the fields of this representation
41785 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41786 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41787 # method in iOS; and, with just a little work, it can be easily formatted into
41788 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
41789 #
41790 # Example (Java):
41791 #
41792 # import com.google.type.Color;
41793 #
41794 # // ...
41795 # public static java.awt.Color fromProto(Color protocolor) {
41796 # float alpha = protocolor.hasAlpha()
41797 # ? protocolor.getAlpha().getValue()
41798 # : 1.0;
41799 #
41800 # return new java.awt.Color(
41801 # protocolor.getRed(),
41802 # protocolor.getGreen(),
41803 # protocolor.getBlue(),
41804 # alpha);
41805 # }
41806 #
41807 # public static Color toProto(java.awt.Color color) {
41808 # float red = (float) color.getRed();
41809 # float green = (float) color.getGreen();
41810 # float blue = (float) color.getBlue();
41811 # float denominator = 255.0;
41812 # Color.Builder resultBuilder =
41813 # Color
41814 # .newBuilder()
41815 # .setRed(red / denominator)
41816 # .setGreen(green / denominator)
41817 # .setBlue(blue / denominator);
41818 # int alpha = color.getAlpha();
41819 # if (alpha != 255) {
41820 # result.setAlpha(
41821 # FloatValue
41822 # .newBuilder()
41823 # .setValue(((float) alpha) / denominator)
41824 # .build());
41825 # }
41826 # return resultBuilder.build();
41827 # }
41828 # // ...
41829 #
41830 # Example (iOS / Obj-C):
41831 #
41832 # // ...
41833 # static UIColor* fromProto(Color* protocolor) {
41834 # float red = [protocolor red];
41835 # float green = [protocolor green];
41836 # float blue = [protocolor blue];
41837 # FloatValue* alpha_wrapper = [protocolor alpha];
41838 # float alpha = 1.0;
41839 # if (alpha_wrapper != nil) {
41840 # alpha = [alpha_wrapper value];
41841 # }
41842 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41843 # }
41844 #
41845 # static Color* toProto(UIColor* color) {
41846 # CGFloat red, green, blue, alpha;
41847 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41848 # return nil;
41849 # }
41850 # Color* result = [Color alloc] init];
41851 # [result setRed:red];
41852 # [result setGreen:green];
41853 # [result setBlue:blue];
41854 # if (alpha <= 0.9999) {
41855 # [result setAlpha:floatWrapperWithValue(alpha)];
41856 # }
41857 # [result autorelease];
41858 # return result;
41859 # }
41860 # // ...
41861 #
41862 # Example (JavaScript):
41863 #
41864 # // ...
41865 #
41866 # var protoToCssColor = function(rgb_color) {
41867 # var redFrac = rgb_color.red || 0.0;
41868 # var greenFrac = rgb_color.green || 0.0;
41869 # var blueFrac = rgb_color.blue || 0.0;
41870 # var red = Math.floor(redFrac * 255);
41871 # var green = Math.floor(greenFrac * 255);
41872 # var blue = Math.floor(blueFrac * 255);
41873 #
41874 # if (!('alpha' in rgb_color)) {
41875 # return rgbToCssColor_(red, green, blue);
41876 # }
41877 #
41878 # var alphaFrac = rgb_color.alpha.value || 0.0;
41879 # var rgbParams = [red, green, blue].join(',');
41880 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41881 # };
41882 #
41883 # var rgbToCssColor_ = function(red, green, blue) {
41884 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41885 # var hexString = rgbNumber.toString(16);
41886 # var missingZeros = 6 - hexString.length;
41887 # var resultBuilder = ['#'];
41888 # for (var i = 0; i < missingZeros; i++) {
41889 # resultBuilder.push('0');
41890 # }
41891 # resultBuilder.push(hexString);
41892 # return resultBuilder.join('');
41893 # };
41894 #
41895 # // ...
41896 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41897 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41898 # the final pixel color is defined by the equation:
41899 #
41900 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
41901 #
41902 # This means that a value of 1.0 corresponds to a solid color, whereas
41903 # a value of 0.0 corresponds to a completely transparent color. This
41904 # uses a wrapper message rather than a simple float scalar so that it is
41905 # possible to distinguish between a default value and the value being unset.
41906 # If omitted, this color object is to be rendered as a solid color
41907 # (as if the alpha value had been explicitly given with a value of 1.0).
41908 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41909 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
41910 },
41911 "width": 42, # The width of the border, in pixels.
41912 # Deprecated; the width is determined by the "style" field.
41913 "style": "A String", # The style of the border.
41914 },
41915 "left": { # A border along a cell. # The left border of the cell.
41916 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
41917 # for simplicity of conversion to/from color representations in various
41918 # languages over compactness; for example, the fields of this representation
41919 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41920 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41921 # method in iOS; and, with just a little work, it can be easily formatted into
41922 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
41923 #
41924 # Example (Java):
41925 #
41926 # import com.google.type.Color;
41927 #
41928 # // ...
41929 # public static java.awt.Color fromProto(Color protocolor) {
41930 # float alpha = protocolor.hasAlpha()
41931 # ? protocolor.getAlpha().getValue()
41932 # : 1.0;
41933 #
41934 # return new java.awt.Color(
41935 # protocolor.getRed(),
41936 # protocolor.getGreen(),
41937 # protocolor.getBlue(),
41938 # alpha);
41939 # }
41940 #
41941 # public static Color toProto(java.awt.Color color) {
41942 # float red = (float) color.getRed();
41943 # float green = (float) color.getGreen();
41944 # float blue = (float) color.getBlue();
41945 # float denominator = 255.0;
41946 # Color.Builder resultBuilder =
41947 # Color
41948 # .newBuilder()
41949 # .setRed(red / denominator)
41950 # .setGreen(green / denominator)
41951 # .setBlue(blue / denominator);
41952 # int alpha = color.getAlpha();
41953 # if (alpha != 255) {
41954 # result.setAlpha(
41955 # FloatValue
41956 # .newBuilder()
41957 # .setValue(((float) alpha) / denominator)
41958 # .build());
41959 # }
41960 # return resultBuilder.build();
41961 # }
41962 # // ...
41963 #
41964 # Example (iOS / Obj-C):
41965 #
41966 # // ...
41967 # static UIColor* fromProto(Color* protocolor) {
41968 # float red = [protocolor red];
41969 # float green = [protocolor green];
41970 # float blue = [protocolor blue];
41971 # FloatValue* alpha_wrapper = [protocolor alpha];
41972 # float alpha = 1.0;
41973 # if (alpha_wrapper != nil) {
41974 # alpha = [alpha_wrapper value];
41975 # }
41976 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41977 # }
41978 #
41979 # static Color* toProto(UIColor* color) {
41980 # CGFloat red, green, blue, alpha;
41981 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41982 # return nil;
41983 # }
41984 # Color* result = [Color alloc] init];
41985 # [result setRed:red];
41986 # [result setGreen:green];
41987 # [result setBlue:blue];
41988 # if (alpha <= 0.9999) {
41989 # [result setAlpha:floatWrapperWithValue(alpha)];
41990 # }
41991 # [result autorelease];
41992 # return result;
41993 # }
41994 # // ...
41995 #
41996 # Example (JavaScript):
41997 #
41998 # // ...
41999 #
42000 # var protoToCssColor = function(rgb_color) {
42001 # var redFrac = rgb_color.red || 0.0;
42002 # var greenFrac = rgb_color.green || 0.0;
42003 # var blueFrac = rgb_color.blue || 0.0;
42004 # var red = Math.floor(redFrac * 255);
42005 # var green = Math.floor(greenFrac * 255);
42006 # var blue = Math.floor(blueFrac * 255);
42007 #
42008 # if (!('alpha' in rgb_color)) {
42009 # return rgbToCssColor_(red, green, blue);
42010 # }
42011 #
42012 # var alphaFrac = rgb_color.alpha.value || 0.0;
42013 # var rgbParams = [red, green, blue].join(',');
42014 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42015 # };
42016 #
42017 # var rgbToCssColor_ = function(red, green, blue) {
42018 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42019 # var hexString = rgbNumber.toString(16);
42020 # var missingZeros = 6 - hexString.length;
42021 # var resultBuilder = ['#'];
42022 # for (var i = 0; i < missingZeros; i++) {
42023 # resultBuilder.push('0');
42024 # }
42025 # resultBuilder.push(hexString);
42026 # return resultBuilder.join('');
42027 # };
42028 #
42029 # // ...
42030 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42031 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42032 # the final pixel color is defined by the equation:
42033 #
42034 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
42035 #
42036 # This means that a value of 1.0 corresponds to a solid color, whereas
42037 # a value of 0.0 corresponds to a completely transparent color. This
42038 # uses a wrapper message rather than a simple float scalar so that it is
42039 # possible to distinguish between a default value and the value being unset.
42040 # If omitted, this color object is to be rendered as a solid color
42041 # (as if the alpha value had been explicitly given with a value of 1.0).
42042 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42043 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
42044 },
42045 "width": 42, # The width of the border, in pixels.
42046 # Deprecated; the width is determined by the "style" field.
42047 "style": "A String", # The style of the border.
42048 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042049 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042050 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042051 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042052 "title": "A String", # The title of the spreadsheet.
42053 },
42054 "sheets": [ # The sheets that are part of a spreadsheet.
42055 { # A sheet in a spreadsheet.
42056 "conditionalFormats": [ # The conditional format rules in this sheet.
42057 { # A rule describing a conditional format.
42058 "ranges": [ # The ranges that will be formatted if the condition is true.
42059 # All the ranges must be on the same grid.
42060 { # A range on a sheet.
42061 # All indexes are zero-based.
42062 # Indexes are half open, e.g the start index is inclusive
42063 # and the end index is exclusive -- [start_index, end_index).
42064 # Missing indexes indicate the range is unbounded on that side.
42065 #
42066 # For example, if `"Sheet1"` is sheet ID 0, then:
42067 #
42068 # `Sheet1!A1:A1 == sheet_id: 0,
42069 # start_row_index: 0, end_row_index: 1,
42070 # start_column_index: 0, end_column_index: 1`
42071 #
42072 # `Sheet1!A3:B4 == sheet_id: 0,
42073 # start_row_index: 2, end_row_index: 4,
42074 # start_column_index: 0, end_column_index: 2`
42075 #
42076 # `Sheet1!A:B == sheet_id: 0,
42077 # start_column_index: 0, end_column_index: 2`
42078 #
42079 # `Sheet1!A5:B == sheet_id: 0,
42080 # start_row_index: 4,
42081 # start_column_index: 0, end_column_index: 2`
42082 #
42083 # `Sheet1 == sheet_id:0`
42084 #
42085 # The start index must always be less than or equal to the end index.
42086 # If the start index equals the end index, then the range is empty.
42087 # Empty ranges are typically not meaningful and are usually rendered in the
42088 # UI as `#REF!`.
42089 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
42090 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
42091 "sheetId": 42, # The sheet this range is on.
42092 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
42093 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
42094 },
42095 ],
42096 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
42097 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
42098 # the format will be applied.
42099 # BooleanConditions are used by conditional formatting,
42100 # data validation, and the criteria in filters.
42101 "type": "A String", # The type of condition.
42102 "values": [ # The values of the condition. The number of supported values depends
42103 # on the condition type. Some support zero values,
42104 # others one or two values,
42105 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
42106 { # The value of the condition.
42107 "relativeDate": "A String", # A relative date (based on the current date).
42108 # Valid only if the type is
42109 # DATE_BEFORE,
42110 # DATE_AFTER,
42111 # DATE_ON_OR_BEFORE or
42112 # DATE_ON_OR_AFTER.
42113 #
42114 # Relative dates are not supported in data validation.
42115 # They are supported only in conditional formatting and
42116 # conditional filters.
42117 "userEnteredValue": "A String", # A value the condition is based on.
42118 # The value will be parsed as if the user typed into a cell.
42119 # Formulas are supported (and must begin with an `=`).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042120 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042121 ],
42122 },
42123 "format": { # The format of a cell. # The format to apply.
42124 # Conditional formatting can only apply a subset of formatting:
42125 # bold, italic,
42126 # strikethrough,
42127 # foreground color &
42128 # background color.
42129 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
42130 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
42131 # the user's locale will be used if necessary for the given type.
42132 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
42133 # information about the supported patterns.
42134 "type": "A String", # The type of the number format.
42135 # When writing, this field must be set.
42136 },
42137 "textDirection": "A String", # The direction of the text in the cell.
42138 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
42139 # When updating padding, every field must be specified.
42140 "top": 42, # The top padding of the cell.
42141 "right": 42, # The right padding of the cell.
42142 "bottom": 42, # The bottom padding of the cell.
42143 "left": 42, # The left padding of the cell.
42144 },
42145 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
42146 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
42147 # for simplicity of conversion to/from color representations in various
42148 # languages over compactness; for example, the fields of this representation
42149 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42150 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42151 # method in iOS; and, with just a little work, it can be easily formatted into
42152 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42153 #
42154 # Example (Java):
42155 #
42156 # import com.google.type.Color;
42157 #
42158 # // ...
42159 # public static java.awt.Color fromProto(Color protocolor) {
42160 # float alpha = protocolor.hasAlpha()
42161 # ? protocolor.getAlpha().getValue()
42162 # : 1.0;
42163 #
42164 # return new java.awt.Color(
42165 # protocolor.getRed(),
42166 # protocolor.getGreen(),
42167 # protocolor.getBlue(),
42168 # alpha);
42169 # }
42170 #
42171 # public static Color toProto(java.awt.Color color) {
42172 # float red = (float) color.getRed();
42173 # float green = (float) color.getGreen();
42174 # float blue = (float) color.getBlue();
42175 # float denominator = 255.0;
42176 # Color.Builder resultBuilder =
42177 # Color
42178 # .newBuilder()
42179 # .setRed(red / denominator)
42180 # .setGreen(green / denominator)
42181 # .setBlue(blue / denominator);
42182 # int alpha = color.getAlpha();
42183 # if (alpha != 255) {
42184 # result.setAlpha(
42185 # FloatValue
42186 # .newBuilder()
42187 # .setValue(((float) alpha) / denominator)
42188 # .build());
42189 # }
42190 # return resultBuilder.build();
42191 # }
42192 # // ...
42193 #
42194 # Example (iOS / Obj-C):
42195 #
42196 # // ...
42197 # static UIColor* fromProto(Color* protocolor) {
42198 # float red = [protocolor red];
42199 # float green = [protocolor green];
42200 # float blue = [protocolor blue];
42201 # FloatValue* alpha_wrapper = [protocolor alpha];
42202 # float alpha = 1.0;
42203 # if (alpha_wrapper != nil) {
42204 # alpha = [alpha_wrapper value];
42205 # }
42206 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42207 # }
42208 #
42209 # static Color* toProto(UIColor* color) {
42210 # CGFloat red, green, blue, alpha;
42211 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42212 # return nil;
42213 # }
42214 # Color* result = [Color alloc] init];
42215 # [result setRed:red];
42216 # [result setGreen:green];
42217 # [result setBlue:blue];
42218 # if (alpha <= 0.9999) {
42219 # [result setAlpha:floatWrapperWithValue(alpha)];
42220 # }
42221 # [result autorelease];
42222 # return result;
42223 # }
42224 # // ...
42225 #
42226 # Example (JavaScript):
42227 #
42228 # // ...
42229 #
42230 # var protoToCssColor = function(rgb_color) {
42231 # var redFrac = rgb_color.red || 0.0;
42232 # var greenFrac = rgb_color.green || 0.0;
42233 # var blueFrac = rgb_color.blue || 0.0;
42234 # var red = Math.floor(redFrac * 255);
42235 # var green = Math.floor(greenFrac * 255);
42236 # var blue = Math.floor(blueFrac * 255);
42237 #
42238 # if (!('alpha' in rgb_color)) {
42239 # return rgbToCssColor_(red, green, blue);
42240 # }
42241 #
42242 # var alphaFrac = rgb_color.alpha.value || 0.0;
42243 # var rgbParams = [red, green, blue].join(',');
42244 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42245 # };
42246 #
42247 # var rgbToCssColor_ = function(red, green, blue) {
42248 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42249 # var hexString = rgbNumber.toString(16);
42250 # var missingZeros = 6 - hexString.length;
42251 # var resultBuilder = ['#'];
42252 # for (var i = 0; i < missingZeros; i++) {
42253 # resultBuilder.push('0');
42254 # }
42255 # resultBuilder.push(hexString);
42256 # return resultBuilder.join('');
42257 # };
42258 #
42259 # // ...
42260 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42261 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42262 # the final pixel color is defined by the equation:
42263 #
42264 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
42265 #
42266 # This means that a value of 1.0 corresponds to a solid color, whereas
42267 # a value of 0.0 corresponds to a completely transparent color. This
42268 # uses a wrapper message rather than a simple float scalar so that it is
42269 # possible to distinguish between a default value and the value being unset.
42270 # If omitted, this color object is to be rendered as a solid color
42271 # (as if the alpha value had been explicitly given with a value of 1.0).
42272 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42273 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
42274 },
42275 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
42276 "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).
42277 # Absent values indicate that the field isn't specified.
42278 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042279 # for simplicity of conversion to/from color representations in various
42280 # languages over compactness; for example, the fields of this representation
42281 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42282 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42283 # method in iOS; and, with just a little work, it can be easily formatted into
42284 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42285 #
42286 # Example (Java):
42287 #
42288 # import com.google.type.Color;
42289 #
42290 # // ...
42291 # public static java.awt.Color fromProto(Color protocolor) {
42292 # float alpha = protocolor.hasAlpha()
42293 # ? protocolor.getAlpha().getValue()
42294 # : 1.0;
42295 #
42296 # return new java.awt.Color(
42297 # protocolor.getRed(),
42298 # protocolor.getGreen(),
42299 # protocolor.getBlue(),
42300 # alpha);
42301 # }
42302 #
42303 # public static Color toProto(java.awt.Color color) {
42304 # float red = (float) color.getRed();
42305 # float green = (float) color.getGreen();
42306 # float blue = (float) color.getBlue();
42307 # float denominator = 255.0;
42308 # Color.Builder resultBuilder =
42309 # Color
42310 # .newBuilder()
42311 # .setRed(red / denominator)
42312 # .setGreen(green / denominator)
42313 # .setBlue(blue / denominator);
42314 # int alpha = color.getAlpha();
42315 # if (alpha != 255) {
42316 # result.setAlpha(
42317 # FloatValue
42318 # .newBuilder()
42319 # .setValue(((float) alpha) / denominator)
42320 # .build());
42321 # }
42322 # return resultBuilder.build();
42323 # }
42324 # // ...
42325 #
42326 # Example (iOS / Obj-C):
42327 #
42328 # // ...
42329 # static UIColor* fromProto(Color* protocolor) {
42330 # float red = [protocolor red];
42331 # float green = [protocolor green];
42332 # float blue = [protocolor blue];
42333 # FloatValue* alpha_wrapper = [protocolor alpha];
42334 # float alpha = 1.0;
42335 # if (alpha_wrapper != nil) {
42336 # alpha = [alpha_wrapper value];
42337 # }
42338 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42339 # }
42340 #
42341 # static Color* toProto(UIColor* color) {
42342 # CGFloat red, green, blue, alpha;
42343 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42344 # return nil;
42345 # }
42346 # Color* result = [Color alloc] init];
42347 # [result setRed:red];
42348 # [result setGreen:green];
42349 # [result setBlue:blue];
42350 # if (alpha <= 0.9999) {
42351 # [result setAlpha:floatWrapperWithValue(alpha)];
42352 # }
42353 # [result autorelease];
42354 # return result;
42355 # }
42356 # // ...
42357 #
42358 # Example (JavaScript):
42359 #
42360 # // ...
42361 #
42362 # var protoToCssColor = function(rgb_color) {
42363 # var redFrac = rgb_color.red || 0.0;
42364 # var greenFrac = rgb_color.green || 0.0;
42365 # var blueFrac = rgb_color.blue || 0.0;
42366 # var red = Math.floor(redFrac * 255);
42367 # var green = Math.floor(greenFrac * 255);
42368 # var blue = Math.floor(blueFrac * 255);
42369 #
42370 # if (!('alpha' in rgb_color)) {
42371 # return rgbToCssColor_(red, green, blue);
42372 # }
42373 #
42374 # var alphaFrac = rgb_color.alpha.value || 0.0;
42375 # var rgbParams = [red, green, blue].join(',');
42376 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42377 # };
42378 #
42379 # var rgbToCssColor_ = function(red, green, blue) {
42380 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42381 # var hexString = rgbNumber.toString(16);
42382 # var missingZeros = 6 - hexString.length;
42383 # var resultBuilder = ['#'];
42384 # for (var i = 0; i < missingZeros; i++) {
42385 # resultBuilder.push('0');
42386 # }
42387 # resultBuilder.push(hexString);
42388 # return resultBuilder.join('');
42389 # };
42390 #
42391 # // ...
42392 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42393 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42394 # the final pixel color is defined by the equation:
42395 #
42396 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
42397 #
42398 # This means that a value of 1.0 corresponds to a solid color, whereas
42399 # a value of 0.0 corresponds to a completely transparent color. This
42400 # uses a wrapper message rather than a simple float scalar so that it is
42401 # possible to distinguish between a default value and the value being unset.
42402 # If omitted, this color object is to be rendered as a solid color
42403 # (as if the alpha value had been explicitly given with a value of 1.0).
42404 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42405 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
42406 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042407 "bold": True or False, # True if the text is bold.
42408 "strikethrough": True or False, # True if the text has a strikethrough.
42409 "fontFamily": "A String", # The font family.
42410 "fontSize": 42, # The size of the font.
42411 "italic": True or False, # True if the text is italicized.
42412 "underline": True or False, # True if the text is underlined.
42413 },
42414 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
42415 "borders": { # The borders of the cell. # The borders of the cell.
42416 "top": { # A border along a cell. # The top border of the cell.
42417 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042418 # for simplicity of conversion to/from color representations in various
42419 # languages over compactness; for example, the fields of this representation
42420 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42421 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42422 # method in iOS; and, with just a little work, it can be easily formatted into
42423 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42424 #
42425 # Example (Java):
42426 #
42427 # import com.google.type.Color;
42428 #
42429 # // ...
42430 # public static java.awt.Color fromProto(Color protocolor) {
42431 # float alpha = protocolor.hasAlpha()
42432 # ? protocolor.getAlpha().getValue()
42433 # : 1.0;
42434 #
42435 # return new java.awt.Color(
42436 # protocolor.getRed(),
42437 # protocolor.getGreen(),
42438 # protocolor.getBlue(),
42439 # alpha);
42440 # }
42441 #
42442 # public static Color toProto(java.awt.Color color) {
42443 # float red = (float) color.getRed();
42444 # float green = (float) color.getGreen();
42445 # float blue = (float) color.getBlue();
42446 # float denominator = 255.0;
42447 # Color.Builder resultBuilder =
42448 # Color
42449 # .newBuilder()
42450 # .setRed(red / denominator)
42451 # .setGreen(green / denominator)
42452 # .setBlue(blue / denominator);
42453 # int alpha = color.getAlpha();
42454 # if (alpha != 255) {
42455 # result.setAlpha(
42456 # FloatValue
42457 # .newBuilder()
42458 # .setValue(((float) alpha) / denominator)
42459 # .build());
42460 # }
42461 # return resultBuilder.build();
42462 # }
42463 # // ...
42464 #
42465 # Example (iOS / Obj-C):
42466 #
42467 # // ...
42468 # static UIColor* fromProto(Color* protocolor) {
42469 # float red = [protocolor red];
42470 # float green = [protocolor green];
42471 # float blue = [protocolor blue];
42472 # FloatValue* alpha_wrapper = [protocolor alpha];
42473 # float alpha = 1.0;
42474 # if (alpha_wrapper != nil) {
42475 # alpha = [alpha_wrapper value];
42476 # }
42477 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42478 # }
42479 #
42480 # static Color* toProto(UIColor* color) {
42481 # CGFloat red, green, blue, alpha;
42482 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42483 # return nil;
42484 # }
42485 # Color* result = [Color alloc] init];
42486 # [result setRed:red];
42487 # [result setGreen:green];
42488 # [result setBlue:blue];
42489 # if (alpha <= 0.9999) {
42490 # [result setAlpha:floatWrapperWithValue(alpha)];
42491 # }
42492 # [result autorelease];
42493 # return result;
42494 # }
42495 # // ...
42496 #
42497 # Example (JavaScript):
42498 #
42499 # // ...
42500 #
42501 # var protoToCssColor = function(rgb_color) {
42502 # var redFrac = rgb_color.red || 0.0;
42503 # var greenFrac = rgb_color.green || 0.0;
42504 # var blueFrac = rgb_color.blue || 0.0;
42505 # var red = Math.floor(redFrac * 255);
42506 # var green = Math.floor(greenFrac * 255);
42507 # var blue = Math.floor(blueFrac * 255);
42508 #
42509 # if (!('alpha' in rgb_color)) {
42510 # return rgbToCssColor_(red, green, blue);
42511 # }
42512 #
42513 # var alphaFrac = rgb_color.alpha.value || 0.0;
42514 # var rgbParams = [red, green, blue].join(',');
42515 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42516 # };
42517 #
42518 # var rgbToCssColor_ = function(red, green, blue) {
42519 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42520 # var hexString = rgbNumber.toString(16);
42521 # var missingZeros = 6 - hexString.length;
42522 # var resultBuilder = ['#'];
42523 # for (var i = 0; i < missingZeros; i++) {
42524 # resultBuilder.push('0');
42525 # }
42526 # resultBuilder.push(hexString);
42527 # return resultBuilder.join('');
42528 # };
42529 #
42530 # // ...
42531 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42532 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42533 # the final pixel color is defined by the equation:
42534 #
42535 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
42536 #
42537 # This means that a value of 1.0 corresponds to a solid color, whereas
42538 # a value of 0.0 corresponds to a completely transparent color. This
42539 # uses a wrapper message rather than a simple float scalar so that it is
42540 # possible to distinguish between a default value and the value being unset.
42541 # If omitted, this color object is to be rendered as a solid color
42542 # (as if the alpha value had been explicitly given with a value of 1.0).
42543 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42544 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
42545 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042546 "width": 42, # The width of the border, in pixels.
42547 # Deprecated; the width is determined by the "style" field.
42548 "style": "A String", # The style of the border.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042549 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042550 "right": { # A border along a cell. # The right border of the cell.
42551 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
42552 # for simplicity of conversion to/from color representations in various
42553 # languages over compactness; for example, the fields of this representation
42554 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42555 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42556 # method in iOS; and, with just a little work, it can be easily formatted into
42557 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42558 #
42559 # Example (Java):
42560 #
42561 # import com.google.type.Color;
42562 #
42563 # // ...
42564 # public static java.awt.Color fromProto(Color protocolor) {
42565 # float alpha = protocolor.hasAlpha()
42566 # ? protocolor.getAlpha().getValue()
42567 # : 1.0;
42568 #
42569 # return new java.awt.Color(
42570 # protocolor.getRed(),
42571 # protocolor.getGreen(),
42572 # protocolor.getBlue(),
42573 # alpha);
42574 # }
42575 #
42576 # public static Color toProto(java.awt.Color color) {
42577 # float red = (float) color.getRed();
42578 # float green = (float) color.getGreen();
42579 # float blue = (float) color.getBlue();
42580 # float denominator = 255.0;
42581 # Color.Builder resultBuilder =
42582 # Color
42583 # .newBuilder()
42584 # .setRed(red / denominator)
42585 # .setGreen(green / denominator)
42586 # .setBlue(blue / denominator);
42587 # int alpha = color.getAlpha();
42588 # if (alpha != 255) {
42589 # result.setAlpha(
42590 # FloatValue
42591 # .newBuilder()
42592 # .setValue(((float) alpha) / denominator)
42593 # .build());
42594 # }
42595 # return resultBuilder.build();
42596 # }
42597 # // ...
42598 #
42599 # Example (iOS / Obj-C):
42600 #
42601 # // ...
42602 # static UIColor* fromProto(Color* protocolor) {
42603 # float red = [protocolor red];
42604 # float green = [protocolor green];
42605 # float blue = [protocolor blue];
42606 # FloatValue* alpha_wrapper = [protocolor alpha];
42607 # float alpha = 1.0;
42608 # if (alpha_wrapper != nil) {
42609 # alpha = [alpha_wrapper value];
42610 # }
42611 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42612 # }
42613 #
42614 # static Color* toProto(UIColor* color) {
42615 # CGFloat red, green, blue, alpha;
42616 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42617 # return nil;
42618 # }
42619 # Color* result = [Color alloc] init];
42620 # [result setRed:red];
42621 # [result setGreen:green];
42622 # [result setBlue:blue];
42623 # if (alpha <= 0.9999) {
42624 # [result setAlpha:floatWrapperWithValue(alpha)];
42625 # }
42626 # [result autorelease];
42627 # return result;
42628 # }
42629 # // ...
42630 #
42631 # Example (JavaScript):
42632 #
42633 # // ...
42634 #
42635 # var protoToCssColor = function(rgb_color) {
42636 # var redFrac = rgb_color.red || 0.0;
42637 # var greenFrac = rgb_color.green || 0.0;
42638 # var blueFrac = rgb_color.blue || 0.0;
42639 # var red = Math.floor(redFrac * 255);
42640 # var green = Math.floor(greenFrac * 255);
42641 # var blue = Math.floor(blueFrac * 255);
42642 #
42643 # if (!('alpha' in rgb_color)) {
42644 # return rgbToCssColor_(red, green, blue);
42645 # }
42646 #
42647 # var alphaFrac = rgb_color.alpha.value || 0.0;
42648 # var rgbParams = [red, green, blue].join(',');
42649 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42650 # };
42651 #
42652 # var rgbToCssColor_ = function(red, green, blue) {
42653 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42654 # var hexString = rgbNumber.toString(16);
42655 # var missingZeros = 6 - hexString.length;
42656 # var resultBuilder = ['#'];
42657 # for (var i = 0; i < missingZeros; i++) {
42658 # resultBuilder.push('0');
42659 # }
42660 # resultBuilder.push(hexString);
42661 # return resultBuilder.join('');
42662 # };
42663 #
42664 # // ...
42665 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42666 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42667 # the final pixel color is defined by the equation:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042668 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042669 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042670 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042671 # This means that a value of 1.0 corresponds to a solid color, whereas
42672 # a value of 0.0 corresponds to a completely transparent color. This
42673 # uses a wrapper message rather than a simple float scalar so that it is
42674 # possible to distinguish between a default value and the value being unset.
42675 # If omitted, this color object is to be rendered as a solid color
42676 # (as if the alpha value had been explicitly given with a value of 1.0).
42677 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42678 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042679 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042680 "width": 42, # The width of the border, in pixels.
42681 # Deprecated; the width is determined by the "style" field.
42682 "style": "A String", # The style of the border.
42683 },
42684 "bottom": { # A border along a cell. # The bottom border of the cell.
42685 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
42686 # for simplicity of conversion to/from color representations in various
42687 # languages over compactness; for example, the fields of this representation
42688 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42689 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42690 # method in iOS; and, with just a little work, it can be easily formatted into
42691 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42692 #
42693 # Example (Java):
42694 #
42695 # import com.google.type.Color;
42696 #
42697 # // ...
42698 # public static java.awt.Color fromProto(Color protocolor) {
42699 # float alpha = protocolor.hasAlpha()
42700 # ? protocolor.getAlpha().getValue()
42701 # : 1.0;
42702 #
42703 # return new java.awt.Color(
42704 # protocolor.getRed(),
42705 # protocolor.getGreen(),
42706 # protocolor.getBlue(),
42707 # alpha);
42708 # }
42709 #
42710 # public static Color toProto(java.awt.Color color) {
42711 # float red = (float) color.getRed();
42712 # float green = (float) color.getGreen();
42713 # float blue = (float) color.getBlue();
42714 # float denominator = 255.0;
42715 # Color.Builder resultBuilder =
42716 # Color
42717 # .newBuilder()
42718 # .setRed(red / denominator)
42719 # .setGreen(green / denominator)
42720 # .setBlue(blue / denominator);
42721 # int alpha = color.getAlpha();
42722 # if (alpha != 255) {
42723 # result.setAlpha(
42724 # FloatValue
42725 # .newBuilder()
42726 # .setValue(((float) alpha) / denominator)
42727 # .build());
42728 # }
42729 # return resultBuilder.build();
42730 # }
42731 # // ...
42732 #
42733 # Example (iOS / Obj-C):
42734 #
42735 # // ...
42736 # static UIColor* fromProto(Color* protocolor) {
42737 # float red = [protocolor red];
42738 # float green = [protocolor green];
42739 # float blue = [protocolor blue];
42740 # FloatValue* alpha_wrapper = [protocolor alpha];
42741 # float alpha = 1.0;
42742 # if (alpha_wrapper != nil) {
42743 # alpha = [alpha_wrapper value];
42744 # }
42745 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42746 # }
42747 #
42748 # static Color* toProto(UIColor* color) {
42749 # CGFloat red, green, blue, alpha;
42750 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42751 # return nil;
42752 # }
42753 # Color* result = [Color alloc] init];
42754 # [result setRed:red];
42755 # [result setGreen:green];
42756 # [result setBlue:blue];
42757 # if (alpha <= 0.9999) {
42758 # [result setAlpha:floatWrapperWithValue(alpha)];
42759 # }
42760 # [result autorelease];
42761 # return result;
42762 # }
42763 # // ...
42764 #
42765 # Example (JavaScript):
42766 #
42767 # // ...
42768 #
42769 # var protoToCssColor = function(rgb_color) {
42770 # var redFrac = rgb_color.red || 0.0;
42771 # var greenFrac = rgb_color.green || 0.0;
42772 # var blueFrac = rgb_color.blue || 0.0;
42773 # var red = Math.floor(redFrac * 255);
42774 # var green = Math.floor(greenFrac * 255);
42775 # var blue = Math.floor(blueFrac * 255);
42776 #
42777 # if (!('alpha' in rgb_color)) {
42778 # return rgbToCssColor_(red, green, blue);
42779 # }
42780 #
42781 # var alphaFrac = rgb_color.alpha.value || 0.0;
42782 # var rgbParams = [red, green, blue].join(',');
42783 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42784 # };
42785 #
42786 # var rgbToCssColor_ = function(red, green, blue) {
42787 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42788 # var hexString = rgbNumber.toString(16);
42789 # var missingZeros = 6 - hexString.length;
42790 # var resultBuilder = ['#'];
42791 # for (var i = 0; i < missingZeros; i++) {
42792 # resultBuilder.push('0');
42793 # }
42794 # resultBuilder.push(hexString);
42795 # return resultBuilder.join('');
42796 # };
42797 #
42798 # // ...
42799 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42800 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42801 # the final pixel color is defined by the equation:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042802 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042803 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042804 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042805 # This means that a value of 1.0 corresponds to a solid color, whereas
42806 # a value of 0.0 corresponds to a completely transparent color. This
42807 # uses a wrapper message rather than a simple float scalar so that it is
42808 # possible to distinguish between a default value and the value being unset.
42809 # If omitted, this color object is to be rendered as a solid color
42810 # (as if the alpha value had been explicitly given with a value of 1.0).
42811 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42812 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042813 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042814 "width": 42, # The width of the border, in pixels.
42815 # Deprecated; the width is determined by the "style" field.
42816 "style": "A String", # The style of the border.
42817 },
42818 "left": { # A border along a cell. # The left border of the cell.
42819 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
42820 # for simplicity of conversion to/from color representations in various
42821 # languages over compactness; for example, the fields of this representation
42822 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42823 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42824 # method in iOS; and, with just a little work, it can be easily formatted into
42825 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42826 #
42827 # Example (Java):
42828 #
42829 # import com.google.type.Color;
42830 #
42831 # // ...
42832 # public static java.awt.Color fromProto(Color protocolor) {
42833 # float alpha = protocolor.hasAlpha()
42834 # ? protocolor.getAlpha().getValue()
42835 # : 1.0;
42836 #
42837 # return new java.awt.Color(
42838 # protocolor.getRed(),
42839 # protocolor.getGreen(),
42840 # protocolor.getBlue(),
42841 # alpha);
42842 # }
42843 #
42844 # public static Color toProto(java.awt.Color color) {
42845 # float red = (float) color.getRed();
42846 # float green = (float) color.getGreen();
42847 # float blue = (float) color.getBlue();
42848 # float denominator = 255.0;
42849 # Color.Builder resultBuilder =
42850 # Color
42851 # .newBuilder()
42852 # .setRed(red / denominator)
42853 # .setGreen(green / denominator)
42854 # .setBlue(blue / denominator);
42855 # int alpha = color.getAlpha();
42856 # if (alpha != 255) {
42857 # result.setAlpha(
42858 # FloatValue
42859 # .newBuilder()
42860 # .setValue(((float) alpha) / denominator)
42861 # .build());
42862 # }
42863 # return resultBuilder.build();
42864 # }
42865 # // ...
42866 #
42867 # Example (iOS / Obj-C):
42868 #
42869 # // ...
42870 # static UIColor* fromProto(Color* protocolor) {
42871 # float red = [protocolor red];
42872 # float green = [protocolor green];
42873 # float blue = [protocolor blue];
42874 # FloatValue* alpha_wrapper = [protocolor alpha];
42875 # float alpha = 1.0;
42876 # if (alpha_wrapper != nil) {
42877 # alpha = [alpha_wrapper value];
42878 # }
42879 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42880 # }
42881 #
42882 # static Color* toProto(UIColor* color) {
42883 # CGFloat red, green, blue, alpha;
42884 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42885 # return nil;
42886 # }
42887 # Color* result = [Color alloc] init];
42888 # [result setRed:red];
42889 # [result setGreen:green];
42890 # [result setBlue:blue];
42891 # if (alpha <= 0.9999) {
42892 # [result setAlpha:floatWrapperWithValue(alpha)];
42893 # }
42894 # [result autorelease];
42895 # return result;
42896 # }
42897 # // ...
42898 #
42899 # Example (JavaScript):
42900 #
42901 # // ...
42902 #
42903 # var protoToCssColor = function(rgb_color) {
42904 # var redFrac = rgb_color.red || 0.0;
42905 # var greenFrac = rgb_color.green || 0.0;
42906 # var blueFrac = rgb_color.blue || 0.0;
42907 # var red = Math.floor(redFrac * 255);
42908 # var green = Math.floor(greenFrac * 255);
42909 # var blue = Math.floor(blueFrac * 255);
42910 #
42911 # if (!('alpha' in rgb_color)) {
42912 # return rgbToCssColor_(red, green, blue);
42913 # }
42914 #
42915 # var alphaFrac = rgb_color.alpha.value || 0.0;
42916 # var rgbParams = [red, green, blue].join(',');
42917 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42918 # };
42919 #
42920 # var rgbToCssColor_ = function(red, green, blue) {
42921 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42922 # var hexString = rgbNumber.toString(16);
42923 # var missingZeros = 6 - hexString.length;
42924 # var resultBuilder = ['#'];
42925 # for (var i = 0; i < missingZeros; i++) {
42926 # resultBuilder.push('0');
42927 # }
42928 # resultBuilder.push(hexString);
42929 # return resultBuilder.join('');
42930 # };
42931 #
42932 # // ...
42933 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42934 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42935 # the final pixel color is defined by the equation:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042936 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042937 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042938 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042939 # This means that a value of 1.0 corresponds to a solid color, whereas
42940 # a value of 0.0 corresponds to a completely transparent color. This
42941 # uses a wrapper message rather than a simple float scalar so that it is
42942 # possible to distinguish between a default value and the value being unset.
42943 # If omitted, this color object is to be rendered as a solid color
42944 # (as if the alpha value had been explicitly given with a value of 1.0).
42945 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42946 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042947 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042948 "width": 42, # The width of the border, in pixels.
42949 # Deprecated; the width is determined by the "style" field.
42950 "style": "A String", # The style of the border.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042951 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042952 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042953 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042954 },
42955 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042956 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
42957 # the interpolation points listed. The format of a cell will vary
42958 # based on its contents as compared to the values of the interpolation
42959 # points.
42960 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
42961 # These pin the gradient color scale according to the color,
42962 # type and value chosen.
42963 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
42964 # for simplicity of conversion to/from color representations in various
42965 # languages over compactness; for example, the fields of this representation
42966 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42967 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42968 # method in iOS; and, with just a little work, it can be easily formatted into
42969 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42970 #
42971 # Example (Java):
42972 #
42973 # import com.google.type.Color;
42974 #
42975 # // ...
42976 # public static java.awt.Color fromProto(Color protocolor) {
42977 # float alpha = protocolor.hasAlpha()
42978 # ? protocolor.getAlpha().getValue()
42979 # : 1.0;
42980 #
42981 # return new java.awt.Color(
42982 # protocolor.getRed(),
42983 # protocolor.getGreen(),
42984 # protocolor.getBlue(),
42985 # alpha);
42986 # }
42987 #
42988 # public static Color toProto(java.awt.Color color) {
42989 # float red = (float) color.getRed();
42990 # float green = (float) color.getGreen();
42991 # float blue = (float) color.getBlue();
42992 # float denominator = 255.0;
42993 # Color.Builder resultBuilder =
42994 # Color
42995 # .newBuilder()
42996 # .setRed(red / denominator)
42997 # .setGreen(green / denominator)
42998 # .setBlue(blue / denominator);
42999 # int alpha = color.getAlpha();
43000 # if (alpha != 255) {
43001 # result.setAlpha(
43002 # FloatValue
43003 # .newBuilder()
43004 # .setValue(((float) alpha) / denominator)
43005 # .build());
43006 # }
43007 # return resultBuilder.build();
43008 # }
43009 # // ...
43010 #
43011 # Example (iOS / Obj-C):
43012 #
43013 # // ...
43014 # static UIColor* fromProto(Color* protocolor) {
43015 # float red = [protocolor red];
43016 # float green = [protocolor green];
43017 # float blue = [protocolor blue];
43018 # FloatValue* alpha_wrapper = [protocolor alpha];
43019 # float alpha = 1.0;
43020 # if (alpha_wrapper != nil) {
43021 # alpha = [alpha_wrapper value];
43022 # }
43023 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43024 # }
43025 #
43026 # static Color* toProto(UIColor* color) {
43027 # CGFloat red, green, blue, alpha;
43028 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43029 # return nil;
43030 # }
43031 # Color* result = [Color alloc] init];
43032 # [result setRed:red];
43033 # [result setGreen:green];
43034 # [result setBlue:blue];
43035 # if (alpha <= 0.9999) {
43036 # [result setAlpha:floatWrapperWithValue(alpha)];
43037 # }
43038 # [result autorelease];
43039 # return result;
43040 # }
43041 # // ...
43042 #
43043 # Example (JavaScript):
43044 #
43045 # // ...
43046 #
43047 # var protoToCssColor = function(rgb_color) {
43048 # var redFrac = rgb_color.red || 0.0;
43049 # var greenFrac = rgb_color.green || 0.0;
43050 # var blueFrac = rgb_color.blue || 0.0;
43051 # var red = Math.floor(redFrac * 255);
43052 # var green = Math.floor(greenFrac * 255);
43053 # var blue = Math.floor(blueFrac * 255);
43054 #
43055 # if (!('alpha' in rgb_color)) {
43056 # return rgbToCssColor_(red, green, blue);
43057 # }
43058 #
43059 # var alphaFrac = rgb_color.alpha.value || 0.0;
43060 # var rgbParams = [red, green, blue].join(',');
43061 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43062 # };
43063 #
43064 # var rgbToCssColor_ = function(red, green, blue) {
43065 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43066 # var hexString = rgbNumber.toString(16);
43067 # var missingZeros = 6 - hexString.length;
43068 # var resultBuilder = ['#'];
43069 # for (var i = 0; i < missingZeros; i++) {
43070 # resultBuilder.push('0');
43071 # }
43072 # resultBuilder.push(hexString);
43073 # return resultBuilder.join('');
43074 # };
43075 #
43076 # // ...
43077 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43078 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43079 # the final pixel color is defined by the equation:
43080 #
43081 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
43082 #
43083 # This means that a value of 1.0 corresponds to a solid color, whereas
43084 # a value of 0.0 corresponds to a completely transparent color. This
43085 # uses a wrapper message rather than a simple float scalar so that it is
43086 # possible to distinguish between a default value and the value being unset.
43087 # If omitted, this color object is to be rendered as a solid color
43088 # (as if the alpha value had been explicitly given with a value of 1.0).
43089 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43090 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
43091 },
43092 "type": "A String", # How the value should be interpreted.
43093 "value": "A String", # The value this interpolation point uses. May be a formula.
43094 # Unused if type is MIN or
43095 # MAX.
43096 },
43097 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
43098 # These pin the gradient color scale according to the color,
43099 # type and value chosen.
43100 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
43101 # for simplicity of conversion to/from color representations in various
43102 # languages over compactness; for example, the fields of this representation
43103 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43104 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43105 # method in iOS; and, with just a little work, it can be easily formatted into
43106 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43107 #
43108 # Example (Java):
43109 #
43110 # import com.google.type.Color;
43111 #
43112 # // ...
43113 # public static java.awt.Color fromProto(Color protocolor) {
43114 # float alpha = protocolor.hasAlpha()
43115 # ? protocolor.getAlpha().getValue()
43116 # : 1.0;
43117 #
43118 # return new java.awt.Color(
43119 # protocolor.getRed(),
43120 # protocolor.getGreen(),
43121 # protocolor.getBlue(),
43122 # alpha);
43123 # }
43124 #
43125 # public static Color toProto(java.awt.Color color) {
43126 # float red = (float) color.getRed();
43127 # float green = (float) color.getGreen();
43128 # float blue = (float) color.getBlue();
43129 # float denominator = 255.0;
43130 # Color.Builder resultBuilder =
43131 # Color
43132 # .newBuilder()
43133 # .setRed(red / denominator)
43134 # .setGreen(green / denominator)
43135 # .setBlue(blue / denominator);
43136 # int alpha = color.getAlpha();
43137 # if (alpha != 255) {
43138 # result.setAlpha(
43139 # FloatValue
43140 # .newBuilder()
43141 # .setValue(((float) alpha) / denominator)
43142 # .build());
43143 # }
43144 # return resultBuilder.build();
43145 # }
43146 # // ...
43147 #
43148 # Example (iOS / Obj-C):
43149 #
43150 # // ...
43151 # static UIColor* fromProto(Color* protocolor) {
43152 # float red = [protocolor red];
43153 # float green = [protocolor green];
43154 # float blue = [protocolor blue];
43155 # FloatValue* alpha_wrapper = [protocolor alpha];
43156 # float alpha = 1.0;
43157 # if (alpha_wrapper != nil) {
43158 # alpha = [alpha_wrapper value];
43159 # }
43160 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43161 # }
43162 #
43163 # static Color* toProto(UIColor* color) {
43164 # CGFloat red, green, blue, alpha;
43165 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43166 # return nil;
43167 # }
43168 # Color* result = [Color alloc] init];
43169 # [result setRed:red];
43170 # [result setGreen:green];
43171 # [result setBlue:blue];
43172 # if (alpha <= 0.9999) {
43173 # [result setAlpha:floatWrapperWithValue(alpha)];
43174 # }
43175 # [result autorelease];
43176 # return result;
43177 # }
43178 # // ...
43179 #
43180 # Example (JavaScript):
43181 #
43182 # // ...
43183 #
43184 # var protoToCssColor = function(rgb_color) {
43185 # var redFrac = rgb_color.red || 0.0;
43186 # var greenFrac = rgb_color.green || 0.0;
43187 # var blueFrac = rgb_color.blue || 0.0;
43188 # var red = Math.floor(redFrac * 255);
43189 # var green = Math.floor(greenFrac * 255);
43190 # var blue = Math.floor(blueFrac * 255);
43191 #
43192 # if (!('alpha' in rgb_color)) {
43193 # return rgbToCssColor_(red, green, blue);
43194 # }
43195 #
43196 # var alphaFrac = rgb_color.alpha.value || 0.0;
43197 # var rgbParams = [red, green, blue].join(',');
43198 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43199 # };
43200 #
43201 # var rgbToCssColor_ = function(red, green, blue) {
43202 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43203 # var hexString = rgbNumber.toString(16);
43204 # var missingZeros = 6 - hexString.length;
43205 # var resultBuilder = ['#'];
43206 # for (var i = 0; i < missingZeros; i++) {
43207 # resultBuilder.push('0');
43208 # }
43209 # resultBuilder.push(hexString);
43210 # return resultBuilder.join('');
43211 # };
43212 #
43213 # // ...
43214 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43215 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43216 # the final pixel color is defined by the equation:
43217 #
43218 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
43219 #
43220 # This means that a value of 1.0 corresponds to a solid color, whereas
43221 # a value of 0.0 corresponds to a completely transparent color. This
43222 # uses a wrapper message rather than a simple float scalar so that it is
43223 # possible to distinguish between a default value and the value being unset.
43224 # If omitted, this color object is to be rendered as a solid color
43225 # (as if the alpha value had been explicitly given with a value of 1.0).
43226 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43227 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
43228 },
43229 "type": "A String", # How the value should be interpreted.
43230 "value": "A String", # The value this interpolation point uses. May be a formula.
43231 # Unused if type is MIN or
43232 # MAX.
43233 },
43234 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
43235 # These pin the gradient color scale according to the color,
43236 # type and value chosen.
43237 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
43238 # for simplicity of conversion to/from color representations in various
43239 # languages over compactness; for example, the fields of this representation
43240 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43241 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43242 # method in iOS; and, with just a little work, it can be easily formatted into
43243 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43244 #
43245 # Example (Java):
43246 #
43247 # import com.google.type.Color;
43248 #
43249 # // ...
43250 # public static java.awt.Color fromProto(Color protocolor) {
43251 # float alpha = protocolor.hasAlpha()
43252 # ? protocolor.getAlpha().getValue()
43253 # : 1.0;
43254 #
43255 # return new java.awt.Color(
43256 # protocolor.getRed(),
43257 # protocolor.getGreen(),
43258 # protocolor.getBlue(),
43259 # alpha);
43260 # }
43261 #
43262 # public static Color toProto(java.awt.Color color) {
43263 # float red = (float) color.getRed();
43264 # float green = (float) color.getGreen();
43265 # float blue = (float) color.getBlue();
43266 # float denominator = 255.0;
43267 # Color.Builder resultBuilder =
43268 # Color
43269 # .newBuilder()
43270 # .setRed(red / denominator)
43271 # .setGreen(green / denominator)
43272 # .setBlue(blue / denominator);
43273 # int alpha = color.getAlpha();
43274 # if (alpha != 255) {
43275 # result.setAlpha(
43276 # FloatValue
43277 # .newBuilder()
43278 # .setValue(((float) alpha) / denominator)
43279 # .build());
43280 # }
43281 # return resultBuilder.build();
43282 # }
43283 # // ...
43284 #
43285 # Example (iOS / Obj-C):
43286 #
43287 # // ...
43288 # static UIColor* fromProto(Color* protocolor) {
43289 # float red = [protocolor red];
43290 # float green = [protocolor green];
43291 # float blue = [protocolor blue];
43292 # FloatValue* alpha_wrapper = [protocolor alpha];
43293 # float alpha = 1.0;
43294 # if (alpha_wrapper != nil) {
43295 # alpha = [alpha_wrapper value];
43296 # }
43297 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43298 # }
43299 #
43300 # static Color* toProto(UIColor* color) {
43301 # CGFloat red, green, blue, alpha;
43302 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43303 # return nil;
43304 # }
43305 # Color* result = [Color alloc] init];
43306 # [result setRed:red];
43307 # [result setGreen:green];
43308 # [result setBlue:blue];
43309 # if (alpha <= 0.9999) {
43310 # [result setAlpha:floatWrapperWithValue(alpha)];
43311 # }
43312 # [result autorelease];
43313 # return result;
43314 # }
43315 # // ...
43316 #
43317 # Example (JavaScript):
43318 #
43319 # // ...
43320 #
43321 # var protoToCssColor = function(rgb_color) {
43322 # var redFrac = rgb_color.red || 0.0;
43323 # var greenFrac = rgb_color.green || 0.0;
43324 # var blueFrac = rgb_color.blue || 0.0;
43325 # var red = Math.floor(redFrac * 255);
43326 # var green = Math.floor(greenFrac * 255);
43327 # var blue = Math.floor(blueFrac * 255);
43328 #
43329 # if (!('alpha' in rgb_color)) {
43330 # return rgbToCssColor_(red, green, blue);
43331 # }
43332 #
43333 # var alphaFrac = rgb_color.alpha.value || 0.0;
43334 # var rgbParams = [red, green, blue].join(',');
43335 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43336 # };
43337 #
43338 # var rgbToCssColor_ = function(red, green, blue) {
43339 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43340 # var hexString = rgbNumber.toString(16);
43341 # var missingZeros = 6 - hexString.length;
43342 # var resultBuilder = ['#'];
43343 # for (var i = 0; i < missingZeros; i++) {
43344 # resultBuilder.push('0');
43345 # }
43346 # resultBuilder.push(hexString);
43347 # return resultBuilder.join('');
43348 # };
43349 #
43350 # // ...
43351 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43352 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43353 # the final pixel color is defined by the equation:
43354 #
43355 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
43356 #
43357 # This means that a value of 1.0 corresponds to a solid color, whereas
43358 # a value of 0.0 corresponds to a completely transparent color. This
43359 # uses a wrapper message rather than a simple float scalar so that it is
43360 # possible to distinguish between a default value and the value being unset.
43361 # If omitted, this color object is to be rendered as a solid color
43362 # (as if the alpha value had been explicitly given with a value of 1.0).
43363 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43364 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
43365 },
43366 "type": "A String", # How the value should be interpreted.
43367 "value": "A String", # The value this interpolation point uses. May be a formula.
43368 # Unused if type is MIN or
43369 # MAX.
43370 },
43371 },
43372 },
43373 ],
43374 "bandedRanges": [ # The banded (i.e. alternating colors) ranges on this sheet.
43375 { # A banded (alternating colors) range in a sheet.
43376 "range": { # A range on a sheet. # The range over which these properties are applied.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043377 # All indexes are zero-based.
43378 # Indexes are half open, e.g the start index is inclusive
43379 # and the end index is exclusive -- [start_index, end_index).
43380 # Missing indexes indicate the range is unbounded on that side.
43381 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070043382 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043383 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070043384 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043385 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070043386 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043387 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070043388 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043389 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070043390 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043391 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070043392 # `Sheet1!A:B == sheet_id: 0,
43393 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043394 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070043395 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043396 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070043397 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043398 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070043399 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043400 #
43401 # The start index must always be less than or equal to the end index.
43402 # If the start index equals the end index, then the range is empty.
43403 # Empty ranges are typically not meaningful and are usually rendered in the
43404 # UI as `#REF!`.
43405 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
43406 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
43407 "sheetId": 42, # The sheet this range is on.
43408 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
43409 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
43410 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043411 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
43412 # by-column basis throughout all the columns in the range. At least one of
43413 # row_properties or column_properties must be specified.
43414 # BandedRange.row_properties and BandedRange.column_properties are
43415 # set, the fill colors are applied to cells according to the following rules:
43416 #
43417 # * header_color and footer_color take priority over band colors.
43418 # * first_band_color takes priority over second_band_color.
43419 # * row_properties takes priority over column_properties.
43420 #
43421 # For example, the first row color takes priority over the first column
43422 # color, but the first column color takes priority over the second row color.
43423 # Similarly, the row header takes priority over the column header in the
43424 # top left cell, but the column header takes priority over the first row
43425 # color if the row header is not set.
43426 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
43427 # for simplicity of conversion to/from color representations in various
43428 # languages over compactness; for example, the fields of this representation
43429 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43430 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43431 # method in iOS; and, with just a little work, it can be easily formatted into
43432 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43433 #
43434 # Example (Java):
43435 #
43436 # import com.google.type.Color;
43437 #
43438 # // ...
43439 # public static java.awt.Color fromProto(Color protocolor) {
43440 # float alpha = protocolor.hasAlpha()
43441 # ? protocolor.getAlpha().getValue()
43442 # : 1.0;
43443 #
43444 # return new java.awt.Color(
43445 # protocolor.getRed(),
43446 # protocolor.getGreen(),
43447 # protocolor.getBlue(),
43448 # alpha);
43449 # }
43450 #
43451 # public static Color toProto(java.awt.Color color) {
43452 # float red = (float) color.getRed();
43453 # float green = (float) color.getGreen();
43454 # float blue = (float) color.getBlue();
43455 # float denominator = 255.0;
43456 # Color.Builder resultBuilder =
43457 # Color
43458 # .newBuilder()
43459 # .setRed(red / denominator)
43460 # .setGreen(green / denominator)
43461 # .setBlue(blue / denominator);
43462 # int alpha = color.getAlpha();
43463 # if (alpha != 255) {
43464 # result.setAlpha(
43465 # FloatValue
43466 # .newBuilder()
43467 # .setValue(((float) alpha) / denominator)
43468 # .build());
43469 # }
43470 # return resultBuilder.build();
43471 # }
43472 # // ...
43473 #
43474 # Example (iOS / Obj-C):
43475 #
43476 # // ...
43477 # static UIColor* fromProto(Color* protocolor) {
43478 # float red = [protocolor red];
43479 # float green = [protocolor green];
43480 # float blue = [protocolor blue];
43481 # FloatValue* alpha_wrapper = [protocolor alpha];
43482 # float alpha = 1.0;
43483 # if (alpha_wrapper != nil) {
43484 # alpha = [alpha_wrapper value];
43485 # }
43486 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43487 # }
43488 #
43489 # static Color* toProto(UIColor* color) {
43490 # CGFloat red, green, blue, alpha;
43491 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43492 # return nil;
43493 # }
43494 # Color* result = [Color alloc] init];
43495 # [result setRed:red];
43496 # [result setGreen:green];
43497 # [result setBlue:blue];
43498 # if (alpha <= 0.9999) {
43499 # [result setAlpha:floatWrapperWithValue(alpha)];
43500 # }
43501 # [result autorelease];
43502 # return result;
43503 # }
43504 # // ...
43505 #
43506 # Example (JavaScript):
43507 #
43508 # // ...
43509 #
43510 # var protoToCssColor = function(rgb_color) {
43511 # var redFrac = rgb_color.red || 0.0;
43512 # var greenFrac = rgb_color.green || 0.0;
43513 # var blueFrac = rgb_color.blue || 0.0;
43514 # var red = Math.floor(redFrac * 255);
43515 # var green = Math.floor(greenFrac * 255);
43516 # var blue = Math.floor(blueFrac * 255);
43517 #
43518 # if (!('alpha' in rgb_color)) {
43519 # return rgbToCssColor_(red, green, blue);
43520 # }
43521 #
43522 # var alphaFrac = rgb_color.alpha.value || 0.0;
43523 # var rgbParams = [red, green, blue].join(',');
43524 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43525 # };
43526 #
43527 # var rgbToCssColor_ = function(red, green, blue) {
43528 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43529 # var hexString = rgbNumber.toString(16);
43530 # var missingZeros = 6 - hexString.length;
43531 # var resultBuilder = ['#'];
43532 # for (var i = 0; i < missingZeros; i++) {
43533 # resultBuilder.push('0');
43534 # }
43535 # resultBuilder.push(hexString);
43536 # return resultBuilder.join('');
43537 # };
43538 #
43539 # // ...
43540 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43541 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43542 # the final pixel color is defined by the equation:
43543 #
43544 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
43545 #
43546 # This means that a value of 1.0 corresponds to a solid color, whereas
43547 # a value of 0.0 corresponds to a completely transparent color. This
43548 # uses a wrapper message rather than a simple float scalar so that it is
43549 # possible to distinguish between a default value and the value being unset.
43550 # If omitted, this color object is to be rendered as a solid color
43551 # (as if the alpha value had been explicitly given with a value of 1.0).
43552 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43553 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
43554 },
43555 "headerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the first row or column. If this field is set, the first
43556 # row or column will be filled with this color and the colors will
43557 # alternate between first_band_color and second_band_color starting
43558 # from the second row or column. Otherwise, the first row or column will be
43559 # filled with first_band_color and the colors will proceed to alternate
43560 # as they normally would.
43561 # for simplicity of conversion to/from color representations in various
43562 # languages over compactness; for example, the fields of this representation
43563 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43564 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43565 # method in iOS; and, with just a little work, it can be easily formatted into
43566 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43567 #
43568 # Example (Java):
43569 #
43570 # import com.google.type.Color;
43571 #
43572 # // ...
43573 # public static java.awt.Color fromProto(Color protocolor) {
43574 # float alpha = protocolor.hasAlpha()
43575 # ? protocolor.getAlpha().getValue()
43576 # : 1.0;
43577 #
43578 # return new java.awt.Color(
43579 # protocolor.getRed(),
43580 # protocolor.getGreen(),
43581 # protocolor.getBlue(),
43582 # alpha);
43583 # }
43584 #
43585 # public static Color toProto(java.awt.Color color) {
43586 # float red = (float) color.getRed();
43587 # float green = (float) color.getGreen();
43588 # float blue = (float) color.getBlue();
43589 # float denominator = 255.0;
43590 # Color.Builder resultBuilder =
43591 # Color
43592 # .newBuilder()
43593 # .setRed(red / denominator)
43594 # .setGreen(green / denominator)
43595 # .setBlue(blue / denominator);
43596 # int alpha = color.getAlpha();
43597 # if (alpha != 255) {
43598 # result.setAlpha(
43599 # FloatValue
43600 # .newBuilder()
43601 # .setValue(((float) alpha) / denominator)
43602 # .build());
43603 # }
43604 # return resultBuilder.build();
43605 # }
43606 # // ...
43607 #
43608 # Example (iOS / Obj-C):
43609 #
43610 # // ...
43611 # static UIColor* fromProto(Color* protocolor) {
43612 # float red = [protocolor red];
43613 # float green = [protocolor green];
43614 # float blue = [protocolor blue];
43615 # FloatValue* alpha_wrapper = [protocolor alpha];
43616 # float alpha = 1.0;
43617 # if (alpha_wrapper != nil) {
43618 # alpha = [alpha_wrapper value];
43619 # }
43620 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43621 # }
43622 #
43623 # static Color* toProto(UIColor* color) {
43624 # CGFloat red, green, blue, alpha;
43625 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43626 # return nil;
43627 # }
43628 # Color* result = [Color alloc] init];
43629 # [result setRed:red];
43630 # [result setGreen:green];
43631 # [result setBlue:blue];
43632 # if (alpha <= 0.9999) {
43633 # [result setAlpha:floatWrapperWithValue(alpha)];
43634 # }
43635 # [result autorelease];
43636 # return result;
43637 # }
43638 # // ...
43639 #
43640 # Example (JavaScript):
43641 #
43642 # // ...
43643 #
43644 # var protoToCssColor = function(rgb_color) {
43645 # var redFrac = rgb_color.red || 0.0;
43646 # var greenFrac = rgb_color.green || 0.0;
43647 # var blueFrac = rgb_color.blue || 0.0;
43648 # var red = Math.floor(redFrac * 255);
43649 # var green = Math.floor(greenFrac * 255);
43650 # var blue = Math.floor(blueFrac * 255);
43651 #
43652 # if (!('alpha' in rgb_color)) {
43653 # return rgbToCssColor_(red, green, blue);
43654 # }
43655 #
43656 # var alphaFrac = rgb_color.alpha.value || 0.0;
43657 # var rgbParams = [red, green, blue].join(',');
43658 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43659 # };
43660 #
43661 # var rgbToCssColor_ = function(red, green, blue) {
43662 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43663 # var hexString = rgbNumber.toString(16);
43664 # var missingZeros = 6 - hexString.length;
43665 # var resultBuilder = ['#'];
43666 # for (var i = 0; i < missingZeros; i++) {
43667 # resultBuilder.push('0');
43668 # }
43669 # resultBuilder.push(hexString);
43670 # return resultBuilder.join('');
43671 # };
43672 #
43673 # // ...
43674 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43675 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43676 # the final pixel color is defined by the equation:
43677 #
43678 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
43679 #
43680 # This means that a value of 1.0 corresponds to a solid color, whereas
43681 # a value of 0.0 corresponds to a completely transparent color. This
43682 # uses a wrapper message rather than a simple float scalar so that it is
43683 # possible to distinguish between a default value and the value being unset.
43684 # If omitted, this color object is to be rendered as a solid color
43685 # (as if the alpha value had been explicitly given with a value of 1.0).
43686 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43687 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
43688 },
43689 "footerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the last row or column. If this field is not set, the last
43690 # row or column will be filled with either first_band_color or
43691 # second_band_color, depending on the color of the previous row or
43692 # column.
43693 # for simplicity of conversion to/from color representations in various
43694 # languages over compactness; for example, the fields of this representation
43695 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43696 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43697 # method in iOS; and, with just a little work, it can be easily formatted into
43698 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43699 #
43700 # Example (Java):
43701 #
43702 # import com.google.type.Color;
43703 #
43704 # // ...
43705 # public static java.awt.Color fromProto(Color protocolor) {
43706 # float alpha = protocolor.hasAlpha()
43707 # ? protocolor.getAlpha().getValue()
43708 # : 1.0;
43709 #
43710 # return new java.awt.Color(
43711 # protocolor.getRed(),
43712 # protocolor.getGreen(),
43713 # protocolor.getBlue(),
43714 # alpha);
43715 # }
43716 #
43717 # public static Color toProto(java.awt.Color color) {
43718 # float red = (float) color.getRed();
43719 # float green = (float) color.getGreen();
43720 # float blue = (float) color.getBlue();
43721 # float denominator = 255.0;
43722 # Color.Builder resultBuilder =
43723 # Color
43724 # .newBuilder()
43725 # .setRed(red / denominator)
43726 # .setGreen(green / denominator)
43727 # .setBlue(blue / denominator);
43728 # int alpha = color.getAlpha();
43729 # if (alpha != 255) {
43730 # result.setAlpha(
43731 # FloatValue
43732 # .newBuilder()
43733 # .setValue(((float) alpha) / denominator)
43734 # .build());
43735 # }
43736 # return resultBuilder.build();
43737 # }
43738 # // ...
43739 #
43740 # Example (iOS / Obj-C):
43741 #
43742 # // ...
43743 # static UIColor* fromProto(Color* protocolor) {
43744 # float red = [protocolor red];
43745 # float green = [protocolor green];
43746 # float blue = [protocolor blue];
43747 # FloatValue* alpha_wrapper = [protocolor alpha];
43748 # float alpha = 1.0;
43749 # if (alpha_wrapper != nil) {
43750 # alpha = [alpha_wrapper value];
43751 # }
43752 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43753 # }
43754 #
43755 # static Color* toProto(UIColor* color) {
43756 # CGFloat red, green, blue, alpha;
43757 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43758 # return nil;
43759 # }
43760 # Color* result = [Color alloc] init];
43761 # [result setRed:red];
43762 # [result setGreen:green];
43763 # [result setBlue:blue];
43764 # if (alpha <= 0.9999) {
43765 # [result setAlpha:floatWrapperWithValue(alpha)];
43766 # }
43767 # [result autorelease];
43768 # return result;
43769 # }
43770 # // ...
43771 #
43772 # Example (JavaScript):
43773 #
43774 # // ...
43775 #
43776 # var protoToCssColor = function(rgb_color) {
43777 # var redFrac = rgb_color.red || 0.0;
43778 # var greenFrac = rgb_color.green || 0.0;
43779 # var blueFrac = rgb_color.blue || 0.0;
43780 # var red = Math.floor(redFrac * 255);
43781 # var green = Math.floor(greenFrac * 255);
43782 # var blue = Math.floor(blueFrac * 255);
43783 #
43784 # if (!('alpha' in rgb_color)) {
43785 # return rgbToCssColor_(red, green, blue);
43786 # }
43787 #
43788 # var alphaFrac = rgb_color.alpha.value || 0.0;
43789 # var rgbParams = [red, green, blue].join(',');
43790 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43791 # };
43792 #
43793 # var rgbToCssColor_ = function(red, green, blue) {
43794 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43795 # var hexString = rgbNumber.toString(16);
43796 # var missingZeros = 6 - hexString.length;
43797 # var resultBuilder = ['#'];
43798 # for (var i = 0; i < missingZeros; i++) {
43799 # resultBuilder.push('0');
43800 # }
43801 # resultBuilder.push(hexString);
43802 # return resultBuilder.join('');
43803 # };
43804 #
43805 # // ...
43806 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43807 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43808 # the final pixel color is defined by the equation:
43809 #
43810 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
43811 #
43812 # This means that a value of 1.0 corresponds to a solid color, whereas
43813 # a value of 0.0 corresponds to a completely transparent color. This
43814 # uses a wrapper message rather than a simple float scalar so that it is
43815 # possible to distinguish between a default value and the value being unset.
43816 # If omitted, this color object is to be rendered as a solid color
43817 # (as if the alpha value had been explicitly given with a value of 1.0).
43818 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43819 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
43820 },
43821 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
43822 # for simplicity of conversion to/from color representations in various
43823 # languages over compactness; for example, the fields of this representation
43824 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43825 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43826 # method in iOS; and, with just a little work, it can be easily formatted into
43827 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43828 #
43829 # Example (Java):
43830 #
43831 # import com.google.type.Color;
43832 #
43833 # // ...
43834 # public static java.awt.Color fromProto(Color protocolor) {
43835 # float alpha = protocolor.hasAlpha()
43836 # ? protocolor.getAlpha().getValue()
43837 # : 1.0;
43838 #
43839 # return new java.awt.Color(
43840 # protocolor.getRed(),
43841 # protocolor.getGreen(),
43842 # protocolor.getBlue(),
43843 # alpha);
43844 # }
43845 #
43846 # public static Color toProto(java.awt.Color color) {
43847 # float red = (float) color.getRed();
43848 # float green = (float) color.getGreen();
43849 # float blue = (float) color.getBlue();
43850 # float denominator = 255.0;
43851 # Color.Builder resultBuilder =
43852 # Color
43853 # .newBuilder()
43854 # .setRed(red / denominator)
43855 # .setGreen(green / denominator)
43856 # .setBlue(blue / denominator);
43857 # int alpha = color.getAlpha();
43858 # if (alpha != 255) {
43859 # result.setAlpha(
43860 # FloatValue
43861 # .newBuilder()
43862 # .setValue(((float) alpha) / denominator)
43863 # .build());
43864 # }
43865 # return resultBuilder.build();
43866 # }
43867 # // ...
43868 #
43869 # Example (iOS / Obj-C):
43870 #
43871 # // ...
43872 # static UIColor* fromProto(Color* protocolor) {
43873 # float red = [protocolor red];
43874 # float green = [protocolor green];
43875 # float blue = [protocolor blue];
43876 # FloatValue* alpha_wrapper = [protocolor alpha];
43877 # float alpha = 1.0;
43878 # if (alpha_wrapper != nil) {
43879 # alpha = [alpha_wrapper value];
43880 # }
43881 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43882 # }
43883 #
43884 # static Color* toProto(UIColor* color) {
43885 # CGFloat red, green, blue, alpha;
43886 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43887 # return nil;
43888 # }
43889 # Color* result = [Color alloc] init];
43890 # [result setRed:red];
43891 # [result setGreen:green];
43892 # [result setBlue:blue];
43893 # if (alpha <= 0.9999) {
43894 # [result setAlpha:floatWrapperWithValue(alpha)];
43895 # }
43896 # [result autorelease];
43897 # return result;
43898 # }
43899 # // ...
43900 #
43901 # Example (JavaScript):
43902 #
43903 # // ...
43904 #
43905 # var protoToCssColor = function(rgb_color) {
43906 # var redFrac = rgb_color.red || 0.0;
43907 # var greenFrac = rgb_color.green || 0.0;
43908 # var blueFrac = rgb_color.blue || 0.0;
43909 # var red = Math.floor(redFrac * 255);
43910 # var green = Math.floor(greenFrac * 255);
43911 # var blue = Math.floor(blueFrac * 255);
43912 #
43913 # if (!('alpha' in rgb_color)) {
43914 # return rgbToCssColor_(red, green, blue);
43915 # }
43916 #
43917 # var alphaFrac = rgb_color.alpha.value || 0.0;
43918 # var rgbParams = [red, green, blue].join(',');
43919 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43920 # };
43921 #
43922 # var rgbToCssColor_ = function(red, green, blue) {
43923 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43924 # var hexString = rgbNumber.toString(16);
43925 # var missingZeros = 6 - hexString.length;
43926 # var resultBuilder = ['#'];
43927 # for (var i = 0; i < missingZeros; i++) {
43928 # resultBuilder.push('0');
43929 # }
43930 # resultBuilder.push(hexString);
43931 # return resultBuilder.join('');
43932 # };
43933 #
43934 # // ...
43935 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43936 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43937 # the final pixel color is defined by the equation:
43938 #
43939 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
43940 #
43941 # This means that a value of 1.0 corresponds to a solid color, whereas
43942 # a value of 0.0 corresponds to a completely transparent color. This
43943 # uses a wrapper message rather than a simple float scalar so that it is
43944 # possible to distinguish between a default value and the value being unset.
43945 # If omitted, this color object is to be rendered as a solid color
43946 # (as if the alpha value had been explicitly given with a value of 1.0).
43947 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43948 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
43949 },
43950 },
43951 "rowProperties": { # Properties referring a single dimension (either row or column). If both # Properties for row bands. These properties will be applied on a row-by-row
43952 # basis throughout all the rows in the range. At least one of
43953 # row_properties or column_properties must be specified.
43954 # BandedRange.row_properties and BandedRange.column_properties are
43955 # set, the fill colors are applied to cells according to the following rules:
43956 #
43957 # * header_color and footer_color take priority over band colors.
43958 # * first_band_color takes priority over second_band_color.
43959 # * row_properties takes priority over column_properties.
43960 #
43961 # For example, the first row color takes priority over the first column
43962 # color, but the first column color takes priority over the second row color.
43963 # Similarly, the row header takes priority over the column header in the
43964 # top left cell, but the column header takes priority over the first row
43965 # color if the row header is not set.
43966 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
43967 # for simplicity of conversion to/from color representations in various
43968 # languages over compactness; for example, the fields of this representation
43969 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43970 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43971 # method in iOS; and, with just a little work, it can be easily formatted into
43972 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43973 #
43974 # Example (Java):
43975 #
43976 # import com.google.type.Color;
43977 #
43978 # // ...
43979 # public static java.awt.Color fromProto(Color protocolor) {
43980 # float alpha = protocolor.hasAlpha()
43981 # ? protocolor.getAlpha().getValue()
43982 # : 1.0;
43983 #
43984 # return new java.awt.Color(
43985 # protocolor.getRed(),
43986 # protocolor.getGreen(),
43987 # protocolor.getBlue(),
43988 # alpha);
43989 # }
43990 #
43991 # public static Color toProto(java.awt.Color color) {
43992 # float red = (float) color.getRed();
43993 # float green = (float) color.getGreen();
43994 # float blue = (float) color.getBlue();
43995 # float denominator = 255.0;
43996 # Color.Builder resultBuilder =
43997 # Color
43998 # .newBuilder()
43999 # .setRed(red / denominator)
44000 # .setGreen(green / denominator)
44001 # .setBlue(blue / denominator);
44002 # int alpha = color.getAlpha();
44003 # if (alpha != 255) {
44004 # result.setAlpha(
44005 # FloatValue
44006 # .newBuilder()
44007 # .setValue(((float) alpha) / denominator)
44008 # .build());
44009 # }
44010 # return resultBuilder.build();
44011 # }
44012 # // ...
44013 #
44014 # Example (iOS / Obj-C):
44015 #
44016 # // ...
44017 # static UIColor* fromProto(Color* protocolor) {
44018 # float red = [protocolor red];
44019 # float green = [protocolor green];
44020 # float blue = [protocolor blue];
44021 # FloatValue* alpha_wrapper = [protocolor alpha];
44022 # float alpha = 1.0;
44023 # if (alpha_wrapper != nil) {
44024 # alpha = [alpha_wrapper value];
44025 # }
44026 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
44027 # }
44028 #
44029 # static Color* toProto(UIColor* color) {
44030 # CGFloat red, green, blue, alpha;
44031 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
44032 # return nil;
44033 # }
44034 # Color* result = [Color alloc] init];
44035 # [result setRed:red];
44036 # [result setGreen:green];
44037 # [result setBlue:blue];
44038 # if (alpha <= 0.9999) {
44039 # [result setAlpha:floatWrapperWithValue(alpha)];
44040 # }
44041 # [result autorelease];
44042 # return result;
44043 # }
44044 # // ...
44045 #
44046 # Example (JavaScript):
44047 #
44048 # // ...
44049 #
44050 # var protoToCssColor = function(rgb_color) {
44051 # var redFrac = rgb_color.red || 0.0;
44052 # var greenFrac = rgb_color.green || 0.0;
44053 # var blueFrac = rgb_color.blue || 0.0;
44054 # var red = Math.floor(redFrac * 255);
44055 # var green = Math.floor(greenFrac * 255);
44056 # var blue = Math.floor(blueFrac * 255);
44057 #
44058 # if (!('alpha' in rgb_color)) {
44059 # return rgbToCssColor_(red, green, blue);
44060 # }
44061 #
44062 # var alphaFrac = rgb_color.alpha.value || 0.0;
44063 # var rgbParams = [red, green, blue].join(',');
44064 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
44065 # };
44066 #
44067 # var rgbToCssColor_ = function(red, green, blue) {
44068 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
44069 # var hexString = rgbNumber.toString(16);
44070 # var missingZeros = 6 - hexString.length;
44071 # var resultBuilder = ['#'];
44072 # for (var i = 0; i < missingZeros; i++) {
44073 # resultBuilder.push('0');
44074 # }
44075 # resultBuilder.push(hexString);
44076 # return resultBuilder.join('');
44077 # };
44078 #
44079 # // ...
44080 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
44081 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
44082 # the final pixel color is defined by the equation:
44083 #
44084 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
44085 #
44086 # This means that a value of 1.0 corresponds to a solid color, whereas
44087 # a value of 0.0 corresponds to a completely transparent color. This
44088 # uses a wrapper message rather than a simple float scalar so that it is
44089 # possible to distinguish between a default value and the value being unset.
44090 # If omitted, this color object is to be rendered as a solid color
44091 # (as if the alpha value had been explicitly given with a value of 1.0).
44092 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
44093 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
44094 },
44095 "headerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the first row or column. If this field is set, the first
44096 # row or column will be filled with this color and the colors will
44097 # alternate between first_band_color and second_band_color starting
44098 # from the second row or column. Otherwise, the first row or column will be
44099 # filled with first_band_color and the colors will proceed to alternate
44100 # as they normally would.
44101 # for simplicity of conversion to/from color representations in various
44102 # languages over compactness; for example, the fields of this representation
44103 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
44104 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
44105 # method in iOS; and, with just a little work, it can be easily formatted into
44106 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
44107 #
44108 # Example (Java):
44109 #
44110 # import com.google.type.Color;
44111 #
44112 # // ...
44113 # public static java.awt.Color fromProto(Color protocolor) {
44114 # float alpha = protocolor.hasAlpha()
44115 # ? protocolor.getAlpha().getValue()
44116 # : 1.0;
44117 #
44118 # return new java.awt.Color(
44119 # protocolor.getRed(),
44120 # protocolor.getGreen(),
44121 # protocolor.getBlue(),
44122 # alpha);
44123 # }
44124 #
44125 # public static Color toProto(java.awt.Color color) {
44126 # float red = (float) color.getRed();
44127 # float green = (float) color.getGreen();
44128 # float blue = (float) color.getBlue();
44129 # float denominator = 255.0;
44130 # Color.Builder resultBuilder =
44131 # Color
44132 # .newBuilder()
44133 # .setRed(red / denominator)
44134 # .setGreen(green / denominator)
44135 # .setBlue(blue / denominator);
44136 # int alpha = color.getAlpha();
44137 # if (alpha != 255) {
44138 # result.setAlpha(
44139 # FloatValue
44140 # .newBuilder()
44141 # .setValue(((float) alpha) / denominator)
44142 # .build());
44143 # }
44144 # return resultBuilder.build();
44145 # }
44146 # // ...
44147 #
44148 # Example (iOS / Obj-C):
44149 #
44150 # // ...
44151 # static UIColor* fromProto(Color* protocolor) {
44152 # float red = [protocolor red];
44153 # float green = [protocolor green];
44154 # float blue = [protocolor blue];
44155 # FloatValue* alpha_wrapper = [protocolor alpha];
44156 # float alpha = 1.0;
44157 # if (alpha_wrapper != nil) {
44158 # alpha = [alpha_wrapper value];
44159 # }
44160 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
44161 # }
44162 #
44163 # static Color* toProto(UIColor* color) {
44164 # CGFloat red, green, blue, alpha;
44165 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
44166 # return nil;
44167 # }
44168 # Color* result = [Color alloc] init];
44169 # [result setRed:red];
44170 # [result setGreen:green];
44171 # [result setBlue:blue];
44172 # if (alpha <= 0.9999) {
44173 # [result setAlpha:floatWrapperWithValue(alpha)];
44174 # }
44175 # [result autorelease];
44176 # return result;
44177 # }
44178 # // ...
44179 #
44180 # Example (JavaScript):
44181 #
44182 # // ...
44183 #
44184 # var protoToCssColor = function(rgb_color) {
44185 # var redFrac = rgb_color.red || 0.0;
44186 # var greenFrac = rgb_color.green || 0.0;
44187 # var blueFrac = rgb_color.blue || 0.0;
44188 # var red = Math.floor(redFrac * 255);
44189 # var green = Math.floor(greenFrac * 255);
44190 # var blue = Math.floor(blueFrac * 255);
44191 #
44192 # if (!('alpha' in rgb_color)) {
44193 # return rgbToCssColor_(red, green, blue);
44194 # }
44195 #
44196 # var alphaFrac = rgb_color.alpha.value || 0.0;
44197 # var rgbParams = [red, green, blue].join(',');
44198 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
44199 # };
44200 #
44201 # var rgbToCssColor_ = function(red, green, blue) {
44202 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
44203 # var hexString = rgbNumber.toString(16);
44204 # var missingZeros = 6 - hexString.length;
44205 # var resultBuilder = ['#'];
44206 # for (var i = 0; i < missingZeros; i++) {
44207 # resultBuilder.push('0');
44208 # }
44209 # resultBuilder.push(hexString);
44210 # return resultBuilder.join('');
44211 # };
44212 #
44213 # // ...
44214 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
44215 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
44216 # the final pixel color is defined by the equation:
44217 #
44218 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
44219 #
44220 # This means that a value of 1.0 corresponds to a solid color, whereas
44221 # a value of 0.0 corresponds to a completely transparent color. This
44222 # uses a wrapper message rather than a simple float scalar so that it is
44223 # possible to distinguish between a default value and the value being unset.
44224 # If omitted, this color object is to be rendered as a solid color
44225 # (as if the alpha value had been explicitly given with a value of 1.0).
44226 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
44227 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
44228 },
44229 "footerColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the last row or column. If this field is not set, the last
44230 # row or column will be filled with either first_band_color or
44231 # second_band_color, depending on the color of the previous row or
44232 # column.
44233 # for simplicity of conversion to/from color representations in various
44234 # languages over compactness; for example, the fields of this representation
44235 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
44236 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
44237 # method in iOS; and, with just a little work, it can be easily formatted into
44238 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
44239 #
44240 # Example (Java):
44241 #
44242 # import com.google.type.Color;
44243 #
44244 # // ...
44245 # public static java.awt.Color fromProto(Color protocolor) {
44246 # float alpha = protocolor.hasAlpha()
44247 # ? protocolor.getAlpha().getValue()
44248 # : 1.0;
44249 #
44250 # return new java.awt.Color(
44251 # protocolor.getRed(),
44252 # protocolor.getGreen(),
44253 # protocolor.getBlue(),
44254 # alpha);
44255 # }
44256 #
44257 # public static Color toProto(java.awt.Color color) {
44258 # float red = (float) color.getRed();
44259 # float green = (float) color.getGreen();
44260 # float blue = (float) color.getBlue();
44261 # float denominator = 255.0;
44262 # Color.Builder resultBuilder =
44263 # Color
44264 # .newBuilder()
44265 # .setRed(red / denominator)
44266 # .setGreen(green / denominator)
44267 # .setBlue(blue / denominator);
44268 # int alpha = color.getAlpha();
44269 # if (alpha != 255) {
44270 # result.setAlpha(
44271 # FloatValue
44272 # .newBuilder()
44273 # .setValue(((float) alpha) / denominator)
44274 # .build());
44275 # }
44276 # return resultBuilder.build();
44277 # }
44278 # // ...
44279 #
44280 # Example (iOS / Obj-C):
44281 #
44282 # // ...
44283 # static UIColor* fromProto(Color* protocolor) {
44284 # float red = [protocolor red];
44285 # float green = [protocolor green];
44286 # float blue = [protocolor blue];
44287 # FloatValue* alpha_wrapper = [protocolor alpha];
44288 # float alpha = 1.0;
44289 # if (alpha_wrapper != nil) {
44290 # alpha = [alpha_wrapper value];
44291 # }
44292 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
44293 # }
44294 #
44295 # static Color* toProto(UIColor* color) {
44296 # CGFloat red, green, blue, alpha;
44297 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
44298 # return nil;
44299 # }
44300 # Color* result = [Color alloc] init];
44301 # [result setRed:red];
44302 # [result setGreen:green];
44303 # [result setBlue:blue];
44304 # if (alpha <= 0.9999) {
44305 # [result setAlpha:floatWrapperWithValue(alpha)];
44306 # }
44307 # [result autorelease];
44308 # return result;
44309 # }
44310 # // ...
44311 #
44312 # Example (JavaScript):
44313 #
44314 # // ...
44315 #
44316 # var protoToCssColor = function(rgb_color) {
44317 # var redFrac = rgb_color.red || 0.0;
44318 # var greenFrac = rgb_color.green || 0.0;
44319 # var blueFrac = rgb_color.blue || 0.0;
44320 # var red = Math.floor(redFrac * 255);
44321 # var green = Math.floor(greenFrac * 255);
44322 # var blue = Math.floor(blueFrac * 255);
44323 #
44324 # if (!('alpha' in rgb_color)) {
44325 # return rgbToCssColor_(red, green, blue);
44326 # }
44327 #
44328 # var alphaFrac = rgb_color.alpha.value || 0.0;
44329 # var rgbParams = [red, green, blue].join(',');
44330 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
44331 # };
44332 #
44333 # var rgbToCssColor_ = function(red, green, blue) {
44334 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
44335 # var hexString = rgbNumber.toString(16);
44336 # var missingZeros = 6 - hexString.length;
44337 # var resultBuilder = ['#'];
44338 # for (var i = 0; i < missingZeros; i++) {
44339 # resultBuilder.push('0');
44340 # }
44341 # resultBuilder.push(hexString);
44342 # return resultBuilder.join('');
44343 # };
44344 #
44345 # // ...
44346 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
44347 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
44348 # the final pixel color is defined by the equation:
44349 #
44350 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
44351 #
44352 # This means that a value of 1.0 corresponds to a solid color, whereas
44353 # a value of 0.0 corresponds to a completely transparent color. This
44354 # uses a wrapper message rather than a simple float scalar so that it is
44355 # possible to distinguish between a default value and the value being unset.
44356 # If omitted, this color object is to be rendered as a solid color
44357 # (as if the alpha value had been explicitly given with a value of 1.0).
44358 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
44359 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
44360 },
44361 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
44362 # for simplicity of conversion to/from color representations in various
44363 # languages over compactness; for example, the fields of this representation
44364 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
44365 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
44366 # method in iOS; and, with just a little work, it can be easily formatted into
44367 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
44368 #
44369 # Example (Java):
44370 #
44371 # import com.google.type.Color;
44372 #
44373 # // ...
44374 # public static java.awt.Color fromProto(Color protocolor) {
44375 # float alpha = protocolor.hasAlpha()
44376 # ? protocolor.getAlpha().getValue()
44377 # : 1.0;
44378 #
44379 # return new java.awt.Color(
44380 # protocolor.getRed(),
44381 # protocolor.getGreen(),
44382 # protocolor.getBlue(),
44383 # alpha);
44384 # }
44385 #
44386 # public static Color toProto(java.awt.Color color) {
44387 # float red = (float) color.getRed();
44388 # float green = (float) color.getGreen();
44389 # float blue = (float) color.getBlue();
44390 # float denominator = 255.0;
44391 # Color.Builder resultBuilder =
44392 # Color
44393 # .newBuilder()
44394 # .setRed(red / denominator)
44395 # .setGreen(green / denominator)
44396 # .setBlue(blue / denominator);
44397 # int alpha = color.getAlpha();
44398 # if (alpha != 255) {
44399 # result.setAlpha(
44400 # FloatValue
44401 # .newBuilder()
44402 # .setValue(((float) alpha) / denominator)
44403 # .build());
44404 # }
44405 # return resultBuilder.build();
44406 # }
44407 # // ...
44408 #
44409 # Example (iOS / Obj-C):
44410 #
44411 # // ...
44412 # static UIColor* fromProto(Color* protocolor) {
44413 # float red = [protocolor red];
44414 # float green = [protocolor green];
44415 # float blue = [protocolor blue];
44416 # FloatValue* alpha_wrapper = [protocolor alpha];
44417 # float alpha = 1.0;
44418 # if (alpha_wrapper != nil) {
44419 # alpha = [alpha_wrapper value];
44420 # }
44421 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
44422 # }
44423 #
44424 # static Color* toProto(UIColor* color) {
44425 # CGFloat red, green, blue, alpha;
44426 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
44427 # return nil;
44428 # }
44429 # Color* result = [Color alloc] init];
44430 # [result setRed:red];
44431 # [result setGreen:green];
44432 # [result setBlue:blue];
44433 # if (alpha <= 0.9999) {
44434 # [result setAlpha:floatWrapperWithValue(alpha)];
44435 # }
44436 # [result autorelease];
44437 # return result;
44438 # }
44439 # // ...
44440 #
44441 # Example (JavaScript):
44442 #
44443 # // ...
44444 #
44445 # var protoToCssColor = function(rgb_color) {
44446 # var redFrac = rgb_color.red || 0.0;
44447 # var greenFrac = rgb_color.green || 0.0;
44448 # var blueFrac = rgb_color.blue || 0.0;
44449 # var red = Math.floor(redFrac * 255);
44450 # var green = Math.floor(greenFrac * 255);
44451 # var blue = Math.floor(blueFrac * 255);
44452 #
44453 # if (!('alpha' in rgb_color)) {
44454 # return rgbToCssColor_(red, green, blue);
44455 # }
44456 #
44457 # var alphaFrac = rgb_color.alpha.value || 0.0;
44458 # var rgbParams = [red, green, blue].join(',');
44459 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
44460 # };
44461 #
44462 # var rgbToCssColor_ = function(red, green, blue) {
44463 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
44464 # var hexString = rgbNumber.toString(16);
44465 # var missingZeros = 6 - hexString.length;
44466 # var resultBuilder = ['#'];
44467 # for (var i = 0; i < missingZeros; i++) {
44468 # resultBuilder.push('0');
44469 # }
44470 # resultBuilder.push(hexString);
44471 # return resultBuilder.join('');
44472 # };
44473 #
44474 # // ...
44475 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
44476 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
44477 # the final pixel color is defined by the equation:
44478 #
44479 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
44480 #
44481 # This means that a value of 1.0 corresponds to a solid color, whereas
44482 # a value of 0.0 corresponds to a completely transparent color. This
44483 # uses a wrapper message rather than a simple float scalar so that it is
44484 # possible to distinguish between a default value and the value being unset.
44485 # If omitted, this color object is to be rendered as a solid color
44486 # (as if the alpha value had been explicitly given with a value of 1.0).
44487 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
44488 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
44489 },
44490 },
44491 "bandedRangeId": 42, # The id of the banded range.
44492 },
44493 ],
44494 "merges": [ # The ranges that are merged together.
44495 { # A range on a sheet.
44496 # All indexes are zero-based.
44497 # Indexes are half open, e.g the start index is inclusive
44498 # and the end index is exclusive -- [start_index, end_index).
44499 # Missing indexes indicate the range is unbounded on that side.
44500 #
44501 # For example, if `"Sheet1"` is sheet ID 0, then:
44502 #
44503 # `Sheet1!A1:A1 == sheet_id: 0,
44504 # start_row_index: 0, end_row_index: 1,
44505 # start_column_index: 0, end_column_index: 1`
44506 #
44507 # `Sheet1!A3:B4 == sheet_id: 0,
44508 # start_row_index: 2, end_row_index: 4,
44509 # start_column_index: 0, end_column_index: 2`
44510 #
44511 # `Sheet1!A:B == sheet_id: 0,
44512 # start_column_index: 0, end_column_index: 2`
44513 #
44514 # `Sheet1!A5:B == sheet_id: 0,
44515 # start_row_index: 4,
44516 # start_column_index: 0, end_column_index: 2`
44517 #
44518 # `Sheet1 == sheet_id:0`
44519 #
44520 # The start index must always be less than or equal to the end index.
44521 # If the start index equals the end index, then the range is empty.
44522 # Empty ranges are typically not meaningful and are usually rendered in the
44523 # UI as `#REF!`.
44524 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
44525 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
44526 "sheetId": 42, # The sheet this range is on.
44527 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
44528 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
44529 },
44530 ],
44531 "basicFilter": { # The default filter associated with a sheet. # The filter on this sheet, if any.
44532 "range": { # A range on a sheet. # The range the filter covers.
44533 # All indexes are zero-based.
44534 # Indexes are half open, e.g the start index is inclusive
44535 # and the end index is exclusive -- [start_index, end_index).
44536 # Missing indexes indicate the range is unbounded on that side.
44537 #
44538 # For example, if `"Sheet1"` is sheet ID 0, then:
44539 #
44540 # `Sheet1!A1:A1 == sheet_id: 0,
44541 # start_row_index: 0, end_row_index: 1,
44542 # start_column_index: 0, end_column_index: 1`
44543 #
44544 # `Sheet1!A3:B4 == sheet_id: 0,
44545 # start_row_index: 2, end_row_index: 4,
44546 # start_column_index: 0, end_column_index: 2`
44547 #
44548 # `Sheet1!A:B == sheet_id: 0,
44549 # start_column_index: 0, end_column_index: 2`
44550 #
44551 # `Sheet1!A5:B == sheet_id: 0,
44552 # start_row_index: 4,
44553 # start_column_index: 0, end_column_index: 2`
44554 #
44555 # `Sheet1 == sheet_id:0`
44556 #
44557 # The start index must always be less than or equal to the end index.
44558 # If the start index equals the end index, then the range is empty.
44559 # Empty ranges are typically not meaningful and are usually rendered in the
44560 # UI as `#REF!`.
44561 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
44562 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
44563 "sheetId": 42, # The sheet this range is on.
44564 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
44565 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
44566 },
44567 "sortSpecs": [ # The sort order per column. Later specifications are used when values
44568 # are equal in the earlier specifications.
44569 { # A sort order associated with a specific column or row.
44570 "sortOrder": "A String", # The order data should be sorted.
44571 "dimensionIndex": 42, # The dimension the sort should be applied to.
44572 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070044573 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080044574 "criteria": { # The criteria for showing/hiding values per column.
44575 # The map's key is the column index, and the value is the criteria for
44576 # that column.
44577 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
44578 "hiddenValues": [ # Values that should be hidden.
44579 "A String",
44580 ],
44581 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
44582 # (This does not override hiddenValues -- if a value is listed there,
44583 # it will still be hidden.)
44584 # BooleanConditions are used by conditional formatting,
44585 # data validation, and the criteria in filters.
44586 "type": "A String", # The type of condition.
44587 "values": [ # The values of the condition. The number of supported values depends
44588 # on the condition type. Some support zero values,
44589 # others one or two values,
44590 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
44591 { # The value of the condition.
44592 "relativeDate": "A String", # A relative date (based on the current date).
44593 # Valid only if the type is
44594 # DATE_BEFORE,
44595 # DATE_AFTER,
44596 # DATE_ON_OR_BEFORE or
44597 # DATE_ON_OR_AFTER.
44598 #
44599 # Relative dates are not supported in data validation.
44600 # They are supported only in conditional formatting and
44601 # conditional filters.
44602 "userEnteredValue": "A String", # A value the condition is based on.
44603 # The value will be parsed as if the user typed into a cell.
44604 # Formulas are supported (and must begin with an `=`).
44605 },
44606 ],
44607 },
44608 },
44609 },
44610 },
44611 "charts": [ # The specifications of every chart on this sheet.
44612 { # A chart embedded in a sheet.
44613 "chartId": 42, # The ID of the chart.
44614 "position": { # The position of an embedded object such as a chart. # The position of the chart.
44615 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
44616 # is chosen for you. Used only when writing.
44617 "sheetId": 42, # The sheet this is on. Set only if the embedded object
44618 # is on its own sheet. Must be non-negative.
44619 "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.
44620 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
44621 # All indexes are zero-based.
44622 "rowIndex": 42, # The row index of the coordinate.
44623 "columnIndex": 42, # The column index of the coordinate.
44624 "sheetId": 42, # The sheet this coordinate is on.
44625 },
44626 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
44627 # from the anchor cell.
44628 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
44629 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
44630 # from the anchor cell.
44631 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
44632 },
44633 },
44634 "spec": { # The specifications of a chart. # The specification of the chart.
44635 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
44636 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
44637 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
44638 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
44639 "sources": [ # The ranges of data for a series or domain.
44640 # Exactly one dimension must have a length of 1,
44641 # and all sources in the list must have the same dimension
44642 # with length 1.
44643 # The domain (if it exists) & all series must have the same number
44644 # of source ranges. If using more than one source range, then the source
44645 # range at a given offset must be contiguous across the domain and series.
44646 #
44647 # For example, these are valid configurations:
44648 #
44649 # domain sources: A1:A5
44650 # series1 sources: B1:B5
44651 # series2 sources: D6:D10
44652 #
44653 # domain sources: A1:A5, C10:C12
44654 # series1 sources: B1:B5, D10:D12
44655 # series2 sources: C1:C5, E10:E12
44656 { # A range on a sheet.
44657 # All indexes are zero-based.
44658 # Indexes are half open, e.g the start index is inclusive
44659 # and the end index is exclusive -- [start_index, end_index).
44660 # Missing indexes indicate the range is unbounded on that side.
44661 #
44662 # For example, if `"Sheet1"` is sheet ID 0, then:
44663 #
44664 # `Sheet1!A1:A1 == sheet_id: 0,
44665 # start_row_index: 0, end_row_index: 1,
44666 # start_column_index: 0, end_column_index: 1`
44667 #
44668 # `Sheet1!A3:B4 == sheet_id: 0,
44669 # start_row_index: 2, end_row_index: 4,
44670 # start_column_index: 0, end_column_index: 2`
44671 #
44672 # `Sheet1!A:B == sheet_id: 0,
44673 # start_column_index: 0, end_column_index: 2`
44674 #
44675 # `Sheet1!A5:B == sheet_id: 0,
44676 # start_row_index: 4,
44677 # start_column_index: 0, end_column_index: 2`
44678 #
44679 # `Sheet1 == sheet_id:0`
44680 #
44681 # The start index must always be less than or equal to the end index.
44682 # If the start index equals the end index, then the range is empty.
44683 # Empty ranges are typically not meaningful and are usually rendered in the
44684 # UI as `#REF!`.
44685 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
44686 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
44687 "sheetId": 42, # The sheet this range is on.
44688 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
44689 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
44690 },
44691 ],
44692 },
44693 },
44694 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
44695 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
44696 "sources": [ # The ranges of data for a series or domain.
44697 # Exactly one dimension must have a length of 1,
44698 # and all sources in the list must have the same dimension
44699 # with length 1.
44700 # The domain (if it exists) & all series must have the same number
44701 # of source ranges. If using more than one source range, then the source
44702 # range at a given offset must be contiguous across the domain and series.
44703 #
44704 # For example, these are valid configurations:
44705 #
44706 # domain sources: A1:A5
44707 # series1 sources: B1:B5
44708 # series2 sources: D6:D10
44709 #
44710 # domain sources: A1:A5, C10:C12
44711 # series1 sources: B1:B5, D10:D12
44712 # series2 sources: C1:C5, E10:E12
44713 { # A range on a sheet.
44714 # All indexes are zero-based.
44715 # Indexes are half open, e.g the start index is inclusive
44716 # and the end index is exclusive -- [start_index, end_index).
44717 # Missing indexes indicate the range is unbounded on that side.
44718 #
44719 # For example, if `"Sheet1"` is sheet ID 0, then:
44720 #
44721 # `Sheet1!A1:A1 == sheet_id: 0,
44722 # start_row_index: 0, end_row_index: 1,
44723 # start_column_index: 0, end_column_index: 1`
44724 #
44725 # `Sheet1!A3:B4 == sheet_id: 0,
44726 # start_row_index: 2, end_row_index: 4,
44727 # start_column_index: 0, end_column_index: 2`
44728 #
44729 # `Sheet1!A:B == sheet_id: 0,
44730 # start_column_index: 0, end_column_index: 2`
44731 #
44732 # `Sheet1!A5:B == sheet_id: 0,
44733 # start_row_index: 4,
44734 # start_column_index: 0, end_column_index: 2`
44735 #
44736 # `Sheet1 == sheet_id:0`
44737 #
44738 # The start index must always be less than or equal to the end index.
44739 # If the start index equals the end index, then the range is empty.
44740 # Empty ranges are typically not meaningful and are usually rendered in the
44741 # UI as `#REF!`.
44742 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
44743 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
44744 "sheetId": 42, # The sheet this range is on.
44745 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
44746 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
44747 },
44748 ],
44749 },
44750 },
44751 "threeDimensional": True or False, # True if the pie is three dimensional.
44752 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
44753 "pieHole": 3.14, # The size of the hole in the pie chart.
44754 },
44755 "basicChart": { # The specification for a basic chart. See BasicChartType for the list # A basic chart specification, can be one of many kinds of charts.
44756 # See BasicChartType for the list of all
44757 # charts this supports.
44758 # of charts this supports.
44759 "headerCount": 42, # The number of rows or columns in the data that are "headers".
44760 # If not set, Google Sheets will guess how many rows are headers based
44761 # on the data.
44762 #
44763 # (Note that BasicChartAxis.title may override the axis title
44764 # inferred from the header values.)
44765 "series": [ # The data this chart is visualizing.
44766 { # A single series of data in a chart.
44767 # For example, if charting stock prices over time, multiple series may exist,
44768 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
44769 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
44770 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
44771 "sources": [ # The ranges of data for a series or domain.
44772 # Exactly one dimension must have a length of 1,
44773 # and all sources in the list must have the same dimension
44774 # with length 1.
44775 # The domain (if it exists) & all series must have the same number
44776 # of source ranges. If using more than one source range, then the source
44777 # range at a given offset must be contiguous across the domain and series.
44778 #
44779 # For example, these are valid configurations:
44780 #
44781 # domain sources: A1:A5
44782 # series1 sources: B1:B5
44783 # series2 sources: D6:D10
44784 #
44785 # domain sources: A1:A5, C10:C12
44786 # series1 sources: B1:B5, D10:D12
44787 # series2 sources: C1:C5, E10:E12
44788 { # A range on a sheet.
44789 # All indexes are zero-based.
44790 # Indexes are half open, e.g the start index is inclusive
44791 # and the end index is exclusive -- [start_index, end_index).
44792 # Missing indexes indicate the range is unbounded on that side.
44793 #
44794 # For example, if `"Sheet1"` is sheet ID 0, then:
44795 #
44796 # `Sheet1!A1:A1 == sheet_id: 0,
44797 # start_row_index: 0, end_row_index: 1,
44798 # start_column_index: 0, end_column_index: 1`
44799 #
44800 # `Sheet1!A3:B4 == sheet_id: 0,
44801 # start_row_index: 2, end_row_index: 4,
44802 # start_column_index: 0, end_column_index: 2`
44803 #
44804 # `Sheet1!A:B == sheet_id: 0,
44805 # start_column_index: 0, end_column_index: 2`
44806 #
44807 # `Sheet1!A5:B == sheet_id: 0,
44808 # start_row_index: 4,
44809 # start_column_index: 0, end_column_index: 2`
44810 #
44811 # `Sheet1 == sheet_id:0`
44812 #
44813 # The start index must always be less than or equal to the end index.
44814 # If the start index equals the end index, then the range is empty.
44815 # Empty ranges are typically not meaningful and are usually rendered in the
44816 # UI as `#REF!`.
44817 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
44818 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
44819 "sheetId": 42, # The sheet this range is on.
44820 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
44821 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
44822 },
44823 ],
44824 },
44825 },
44826 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
44827 # For example, if charting stocks over time, the "Volume" series
44828 # may want to be pinned to the right with the prices pinned to the left,
44829 # because the scale of trading volume is different than the scale of
44830 # prices.
44831 # It is an error to specify an axis that isn't a valid minor axis
44832 # for the chart's type.
44833 "type": "A String", # The type of this series. Valid only if the
44834 # chartType is
44835 # COMBO.
44836 # Different types will change the way the series is visualized.
44837 # Only LINE, AREA,
44838 # and COLUMN are supported.
44839 },
44840 ],
44841 "legendPosition": "A String", # The position of the chart legend.
44842 "domains": [ # The domain of data this is charting.
44843 # Only a single domain is currently supported.
44844 { # The domain of a chart.
44845 # For example, if charting stock prices over time, this would be the date.
44846 "domain": { # The data included in a domain or series. # The data of the domain. For example, if charting stock prices over time,
44847 # this is the data representing the dates.
44848 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
44849 "sources": [ # The ranges of data for a series or domain.
44850 # Exactly one dimension must have a length of 1,
44851 # and all sources in the list must have the same dimension
44852 # with length 1.
44853 # The domain (if it exists) & all series must have the same number
44854 # of source ranges. If using more than one source range, then the source
44855 # range at a given offset must be contiguous across the domain and series.
44856 #
44857 # For example, these are valid configurations:
44858 #
44859 # domain sources: A1:A5
44860 # series1 sources: B1:B5
44861 # series2 sources: D6:D10
44862 #
44863 # domain sources: A1:A5, C10:C12
44864 # series1 sources: B1:B5, D10:D12
44865 # series2 sources: C1:C5, E10:E12
44866 { # A range on a sheet.
44867 # All indexes are zero-based.
44868 # Indexes are half open, e.g the start index is inclusive
44869 # and the end index is exclusive -- [start_index, end_index).
44870 # Missing indexes indicate the range is unbounded on that side.
44871 #
44872 # For example, if `"Sheet1"` is sheet ID 0, then:
44873 #
44874 # `Sheet1!A1:A1 == sheet_id: 0,
44875 # start_row_index: 0, end_row_index: 1,
44876 # start_column_index: 0, end_column_index: 1`
44877 #
44878 # `Sheet1!A3:B4 == sheet_id: 0,
44879 # start_row_index: 2, end_row_index: 4,
44880 # start_column_index: 0, end_column_index: 2`
44881 #
44882 # `Sheet1!A:B == sheet_id: 0,
44883 # start_column_index: 0, end_column_index: 2`
44884 #
44885 # `Sheet1!A5:B == sheet_id: 0,
44886 # start_row_index: 4,
44887 # start_column_index: 0, end_column_index: 2`
44888 #
44889 # `Sheet1 == sheet_id:0`
44890 #
44891 # The start index must always be less than or equal to the end index.
44892 # If the start index equals the end index, then the range is empty.
44893 # Empty ranges are typically not meaningful and are usually rendered in the
44894 # UI as `#REF!`.
44895 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
44896 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
44897 "sheetId": 42, # The sheet this range is on.
44898 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
44899 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
44900 },
44901 ],
44902 },
44903 },
44904 },
44905 ],
44906 "chartType": "A String", # The type of the chart.
44907 "axis": [ # The axis on the chart.
44908 { # An axis of the chart.
44909 # A chart may not have more than one axis per
44910 # axis position.
44911 "position": "A String", # The position of this axis.
44912 "format": { # The format of a run of text in a cell. # The format of the title.
44913 # Only valid if the axis is not associated with the domain.
44914 # Absent values indicate that the field isn't specified.
44915 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
44916 # for simplicity of conversion to/from color representations in various
44917 # languages over compactness; for example, the fields of this representation
44918 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
44919 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
44920 # method in iOS; and, with just a little work, it can be easily formatted into
44921 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
44922 #
44923 # Example (Java):
44924 #
44925 # import com.google.type.Color;
44926 #
44927 # // ...
44928 # public static java.awt.Color fromProto(Color protocolor) {
44929 # float alpha = protocolor.hasAlpha()
44930 # ? protocolor.getAlpha().getValue()
44931 # : 1.0;
44932 #
44933 # return new java.awt.Color(
44934 # protocolor.getRed(),
44935 # protocolor.getGreen(),
44936 # protocolor.getBlue(),
44937 # alpha);
44938 # }
44939 #
44940 # public static Color toProto(java.awt.Color color) {
44941 # float red = (float) color.getRed();
44942 # float green = (float) color.getGreen();
44943 # float blue = (float) color.getBlue();
44944 # float denominator = 255.0;
44945 # Color.Builder resultBuilder =
44946 # Color
44947 # .newBuilder()
44948 # .setRed(red / denominator)
44949 # .setGreen(green / denominator)
44950 # .setBlue(blue / denominator);
44951 # int alpha = color.getAlpha();
44952 # if (alpha != 255) {
44953 # result.setAlpha(
44954 # FloatValue
44955 # .newBuilder()
44956 # .setValue(((float) alpha) / denominator)
44957 # .build());
44958 # }
44959 # return resultBuilder.build();
44960 # }
44961 # // ...
44962 #
44963 # Example (iOS / Obj-C):
44964 #
44965 # // ...
44966 # static UIColor* fromProto(Color* protocolor) {
44967 # float red = [protocolor red];
44968 # float green = [protocolor green];
44969 # float blue = [protocolor blue];
44970 # FloatValue* alpha_wrapper = [protocolor alpha];
44971 # float alpha = 1.0;
44972 # if (alpha_wrapper != nil) {
44973 # alpha = [alpha_wrapper value];
44974 # }
44975 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
44976 # }
44977 #
44978 # static Color* toProto(UIColor* color) {
44979 # CGFloat red, green, blue, alpha;
44980 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
44981 # return nil;
44982 # }
44983 # Color* result = [Color alloc] init];
44984 # [result setRed:red];
44985 # [result setGreen:green];
44986 # [result setBlue:blue];
44987 # if (alpha <= 0.9999) {
44988 # [result setAlpha:floatWrapperWithValue(alpha)];
44989 # }
44990 # [result autorelease];
44991 # return result;
44992 # }
44993 # // ...
44994 #
44995 # Example (JavaScript):
44996 #
44997 # // ...
44998 #
44999 # var protoToCssColor = function(rgb_color) {
45000 # var redFrac = rgb_color.red || 0.0;
45001 # var greenFrac = rgb_color.green || 0.0;
45002 # var blueFrac = rgb_color.blue || 0.0;
45003 # var red = Math.floor(redFrac * 255);
45004 # var green = Math.floor(greenFrac * 255);
45005 # var blue = Math.floor(blueFrac * 255);
45006 #
45007 # if (!('alpha' in rgb_color)) {
45008 # return rgbToCssColor_(red, green, blue);
45009 # }
45010 #
45011 # var alphaFrac = rgb_color.alpha.value || 0.0;
45012 # var rgbParams = [red, green, blue].join(',');
45013 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
45014 # };
45015 #
45016 # var rgbToCssColor_ = function(red, green, blue) {
45017 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
45018 # var hexString = rgbNumber.toString(16);
45019 # var missingZeros = 6 - hexString.length;
45020 # var resultBuilder = ['#'];
45021 # for (var i = 0; i < missingZeros; i++) {
45022 # resultBuilder.push('0');
45023 # }
45024 # resultBuilder.push(hexString);
45025 # return resultBuilder.join('');
45026 # };
45027 #
45028 # // ...
45029 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
45030 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
45031 # the final pixel color is defined by the equation:
45032 #
45033 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
45034 #
45035 # This means that a value of 1.0 corresponds to a solid color, whereas
45036 # a value of 0.0 corresponds to a completely transparent color. This
45037 # uses a wrapper message rather than a simple float scalar so that it is
45038 # possible to distinguish between a default value and the value being unset.
45039 # If omitted, this color object is to be rendered as a solid color
45040 # (as if the alpha value had been explicitly given with a value of 1.0).
45041 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
45042 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
45043 },
45044 "bold": True or False, # True if the text is bold.
45045 "strikethrough": True or False, # True if the text has a strikethrough.
45046 "fontFamily": "A String", # The font family.
45047 "fontSize": 42, # The size of the font.
45048 "italic": True or False, # True if the text is italicized.
45049 "underline": True or False, # True if the text is underlined.
45050 },
45051 "title": "A String", # The title of this axis. If set, this overrides any title inferred
45052 # from headers of the data.
45053 },
45054 ],
45055 },
45056 "title": "A String", # The title of the chart.
45057 },
45058 },
45059 ],
45060 "filterViews": [ # The filter views in this sheet.
45061 { # A filter view.
45062 "title": "A String", # The name of the filter view.
45063 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
45064 #
45065 # When writing, only one of range or named_range_id
45066 # may be set.
45067 "filterViewId": 42, # The ID of the filter view.
45068 "range": { # A range on a sheet. # The range this filter view covers.
45069 #
45070 # When writing, only one of range or named_range_id
45071 # may be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045072 # All indexes are zero-based.
45073 # Indexes are half open, e.g the start index is inclusive
45074 # and the end index is exclusive -- [start_index, end_index).
45075 # Missing indexes indicate the range is unbounded on that side.
45076 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045077 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045078 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045079 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045080 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045081 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045082 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045083 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045084 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045085 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045086 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045087 # `Sheet1!A:B == sheet_id: 0,
45088 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045089 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045090 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045091 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045092 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045093 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045094 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045095 #
45096 # The start index must always be less than or equal to the end index.
45097 # If the start index equals the end index, then the range is empty.
45098 # Empty ranges are typically not meaningful and are usually rendered in the
45099 # UI as `#REF!`.
45100 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
45101 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
45102 "sheetId": 42, # The sheet this range is on.
45103 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
45104 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
45105 },
45106 "sortSpecs": [ # The sort order per column. Later specifications are used when values
45107 # are equal in the earlier specifications.
45108 { # A sort order associated with a specific column or row.
45109 "sortOrder": "A String", # The order data should be sorted.
45110 "dimensionIndex": 42, # The dimension the sort should be applied to.
45111 },
45112 ],
45113 "criteria": { # The criteria for showing/hiding values per column.
45114 # The map's key is the column index, and the value is the criteria for
45115 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045116 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045117 "hiddenValues": [ # Values that should be hidden.
45118 "A String",
45119 ],
45120 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
45121 # (This does not override hiddenValues -- if a value is listed there,
45122 # it will still be hidden.)
45123 # BooleanConditions are used by conditional formatting,
45124 # data validation, and the criteria in filters.
45125 "type": "A String", # The type of condition.
45126 "values": [ # The values of the condition. The number of supported values depends
45127 # on the condition type. Some support zero values,
45128 # others one or two values,
45129 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
45130 { # The value of the condition.
45131 "relativeDate": "A String", # A relative date (based on the current date).
45132 # Valid only if the type is
45133 # DATE_BEFORE,
45134 # DATE_AFTER,
45135 # DATE_ON_OR_BEFORE or
45136 # DATE_ON_OR_AFTER.
45137 #
45138 # Relative dates are not supported in data validation.
45139 # They are supported only in conditional formatting and
45140 # conditional filters.
45141 "userEnteredValue": "A String", # A value the condition is based on.
45142 # The value will be parsed as if the user typed into a cell.
45143 # Formulas are supported (and must begin with an `=`).
45144 },
45145 ],
45146 },
45147 },
45148 },
45149 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045150 ],
45151 "protectedRanges": [ # The protected ranges in this sheet.
45152 { # A protected range.
45153 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
45154 # Unprotected ranges are only supported on protected sheets.
45155 { # A range on a sheet.
45156 # All indexes are zero-based.
45157 # Indexes are half open, e.g the start index is inclusive
45158 # and the end index is exclusive -- [start_index, end_index).
45159 # Missing indexes indicate the range is unbounded on that side.
45160 #
45161 # For example, if `"Sheet1"` is sheet ID 0, then:
45162 #
45163 # `Sheet1!A1:A1 == sheet_id: 0,
45164 # start_row_index: 0, end_row_index: 1,
45165 # start_column_index: 0, end_column_index: 1`
45166 #
45167 # `Sheet1!A3:B4 == sheet_id: 0,
45168 # start_row_index: 2, end_row_index: 4,
45169 # start_column_index: 0, end_column_index: 2`
45170 #
45171 # `Sheet1!A:B == sheet_id: 0,
45172 # start_column_index: 0, end_column_index: 2`
45173 #
45174 # `Sheet1!A5:B == sheet_id: 0,
45175 # start_row_index: 4,
45176 # start_column_index: 0, end_column_index: 2`
45177 #
45178 # `Sheet1 == sheet_id:0`
45179 #
45180 # The start index must always be less than or equal to the end index.
45181 # If the start index equals the end index, then the range is empty.
45182 # Empty ranges are typically not meaningful and are usually rendered in the
45183 # UI as `#REF!`.
45184 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
45185 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
45186 "sheetId": 42, # The sheet this range is on.
45187 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
45188 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045189 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045190 ],
45191 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
45192 # protected area.
45193 # This field is read-only.
45194 "description": "A String", # The description of this protected range.
45195 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
45196 #
45197 # When writing, only one of range or named_range_id
45198 # may be set.
45199 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
45200 # This field is only visible to users with edit access to the protected
45201 # range and the document.
45202 # Editors are not supported with warning_only protection.
45203 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
45204 # range. Domain protection is only supported on documents within a domain.
45205 "users": [ # The email addresses of users with edit access to the protected range.
45206 "A String",
45207 ],
45208 "groups": [ # The email addresses of groups with edit access to the protected range.
45209 "A String",
45210 ],
45211 },
45212 "protectedRangeId": 42, # The ID of the protected range.
45213 # This field is read-only.
45214 "warningOnly": True or False, # True if this protected range will show a warning when editing.
45215 # Warning-based protection means that every user can edit data in the
45216 # protected range, except editing will prompt a warning asking the user
45217 # to confirm the edit.
45218 #
45219 # When writing: if this field is true, then editors is ignored.
45220 # Additionally, if this field is changed from true to false and the
45221 # `editors` field is not set (nor included in the field mask), then
45222 # the editors will be set to all the editors in the document.
45223 "range": { # A range on a sheet. # The range that is being protected.
45224 # The range may be fully unbounded, in which case this is considered
45225 # a protected sheet.
45226 #
45227 # When writing, only one of range or named_range_id
45228 # may be set.
45229 # All indexes are zero-based.
45230 # Indexes are half open, e.g the start index is inclusive
45231 # and the end index is exclusive -- [start_index, end_index).
45232 # Missing indexes indicate the range is unbounded on that side.
45233 #
45234 # For example, if `"Sheet1"` is sheet ID 0, then:
45235 #
45236 # `Sheet1!A1:A1 == sheet_id: 0,
45237 # start_row_index: 0, end_row_index: 1,
45238 # start_column_index: 0, end_column_index: 1`
45239 #
45240 # `Sheet1!A3:B4 == sheet_id: 0,
45241 # start_row_index: 2, end_row_index: 4,
45242 # start_column_index: 0, end_column_index: 2`
45243 #
45244 # `Sheet1!A:B == sheet_id: 0,
45245 # start_column_index: 0, end_column_index: 2`
45246 #
45247 # `Sheet1!A5:B == sheet_id: 0,
45248 # start_row_index: 4,
45249 # start_column_index: 0, end_column_index: 2`
45250 #
45251 # `Sheet1 == sheet_id:0`
45252 #
45253 # The start index must always be less than or equal to the end index.
45254 # If the start index equals the end index, then the range is empty.
45255 # Empty ranges are typically not meaningful and are usually rendered in the
45256 # UI as `#REF!`.
45257 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
45258 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
45259 "sheetId": 42, # The sheet this range is on.
45260 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
45261 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
45262 },
45263 },
45264 ],
45265 "data": [ # Data in the grid, if this is a grid sheet.
45266 # The number of GridData objects returned is dependent on the number of
45267 # ranges requested on this sheet. For example, if this is representing
45268 # `Sheet1`, and the spreadsheet was requested with ranges
45269 # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a
45270 # startRow/startColumn of `0`,
45271 # while the second one will have `startRow 14` (zero-based row 15),
45272 # and `startColumn 3` (zero-based column D).
45273 { # Data in the grid, as well as metadata about the dimensions.
45274 "startRow": 42, # The first row this GridData refers to, zero-based.
45275 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
45276 # in start_row.
45277 { # Properties about a dimension.
45278 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
45279 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
45280 "hiddenByFilter": True or False, # True if this dimension is being filtered.
45281 # This field is read-only.
45282 },
45283 ],
45284 "startColumn": 42, # The first column this GridData refers to, zero-based.
45285 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
45286 # in start_column.
45287 { # Properties about a dimension.
45288 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
45289 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
45290 "hiddenByFilter": True or False, # True if this dimension is being filtered.
45291 # This field is read-only.
45292 },
45293 ],
45294 "rowData": [ # The data in the grid, one entry per row,
45295 # starting with the row in startRow.
45296 # The values in RowData will correspond to columns starting
45297 # at start_column.
45298 { # Data about each cell in a row.
45299 "values": [ # The values in the row, one per column.
45300 { # Data about a specific cell.
45301 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
45302 # is computed dynamically based on its data, grouping, filters, values,
45303 # etc. Only the top-left cell of the pivot table contains the pivot table
45304 # definition. The other cells will contain the calculated values of the
45305 # results of the pivot in their effective_value fields.
45306 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
45307 # or vertically (as rows).
45308 "rows": [ # Each row grouping in the pivot table.
45309 { # A single grouping (either row or column) in a pivot table.
45310 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
45311 "valueMetadata": [ # Metadata about values in the grouping.
45312 { # Metadata about a value in a pivot grouping.
45313 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
45314 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
45315 # (Note that formulaValue is not valid,
45316 # because the values will be calculated.)
45317 "numberValue": 3.14, # Represents a double value.
45318 # Note: Dates, Times and DateTimes are represented as doubles in
45319 # "serial number" format.
45320 "boolValue": True or False, # Represents a boolean value.
45321 "formulaValue": "A String", # Represents a formula.
45322 "stringValue": "A String", # Represents a string value.
45323 # Leading single quotes are not included. For example, if the user typed
45324 # `'123` into the UI, this would be represented as a `stringValue` of
45325 # `"123"`.
45326 "errorValue": { # An error in a cell. # Represents an error.
45327 # This field is read-only.
45328 "message": "A String", # A message with more information about the error
45329 # (in the spreadsheet's locale).
45330 "type": "A String", # The type of error.
45331 },
45332 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045333 },
45334 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045335 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
45336 # If not specified, sorting is alphabetical by this group's values.
45337 "buckets": [ # Determines the bucket from which values are chosen to sort.
45338 #
45339 # For example, in a pivot table with one row group & two column groups,
45340 # the row group can list up to two values. The first value corresponds
45341 # to a value within the first column group, and the second value
45342 # corresponds to a value in the second column group. If no values
45343 # are listed, this would indicate that the row should be sorted according
45344 # to the "Grand Total" over the column groups. If a single value is listed,
45345 # this would correspond to using the "Total" of that bucket.
45346 { # The kinds of value that a cell in a spreadsheet can have.
45347 "numberValue": 3.14, # Represents a double value.
45348 # Note: Dates, Times and DateTimes are represented as doubles in
45349 # "serial number" format.
45350 "boolValue": True or False, # Represents a boolean value.
45351 "formulaValue": "A String", # Represents a formula.
45352 "stringValue": "A String", # Represents a string value.
45353 # Leading single quotes are not included. For example, if the user typed
45354 # `'123` into the UI, this would be represented as a `stringValue` of
45355 # `"123"`.
45356 "errorValue": { # An error in a cell. # Represents an error.
45357 # This field is read-only.
45358 "message": "A String", # A message with more information about the error
45359 # (in the spreadsheet's locale).
45360 "type": "A String", # The type of error.
45361 },
45362 },
45363 ],
45364 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
45365 # grouping should be sorted by.
45366 },
45367 "sortOrder": "A String", # The order the values in this group should be sorted.
45368 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
45369 #
45370 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
45371 # means this group refers to column `C`, whereas the offset `1` would refer
45372 # to column `D`.
45373 },
45374 ],
45375 "source": { # A range on a sheet. # The range the pivot table is reading data from.
45376 # All indexes are zero-based.
45377 # Indexes are half open, e.g the start index is inclusive
45378 # and the end index is exclusive -- [start_index, end_index).
45379 # Missing indexes indicate the range is unbounded on that side.
45380 #
45381 # For example, if `"Sheet1"` is sheet ID 0, then:
45382 #
45383 # `Sheet1!A1:A1 == sheet_id: 0,
45384 # start_row_index: 0, end_row_index: 1,
45385 # start_column_index: 0, end_column_index: 1`
45386 #
45387 # `Sheet1!A3:B4 == sheet_id: 0,
45388 # start_row_index: 2, end_row_index: 4,
45389 # start_column_index: 0, end_column_index: 2`
45390 #
45391 # `Sheet1!A:B == sheet_id: 0,
45392 # start_column_index: 0, end_column_index: 2`
45393 #
45394 # `Sheet1!A5:B == sheet_id: 0,
45395 # start_row_index: 4,
45396 # start_column_index: 0, end_column_index: 2`
45397 #
45398 # `Sheet1 == sheet_id:0`
45399 #
45400 # The start index must always be less than or equal to the end index.
45401 # If the start index equals the end index, then the range is empty.
45402 # Empty ranges are typically not meaningful and are usually rendered in the
45403 # UI as `#REF!`.
45404 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
45405 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
45406 "sheetId": 42, # The sheet this range is on.
45407 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
45408 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
45409 },
45410 "values": [ # A list of values to include in the pivot table.
45411 { # The definition of how a value in a pivot table should be calculated.
45412 "formula": "A String", # A custom formula to calculate the value. The formula must start
45413 # with an `=` character.
45414 "summarizeFunction": "A String", # A function to summarize the value.
45415 # If formula is set, the only supported values are
45416 # SUM and
45417 # CUSTOM.
45418 # If sourceColumnOffset is set, then `CUSTOM`
45419 # is not supported.
45420 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
45421 #
45422 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
45423 # means this value refers to column `C`, whereas the offset `1` would
45424 # refer to column `D`.
45425 "name": "A String", # A name to use for the value. This is only used if formula was set.
45426 # Otherwise, the column name is used.
45427 },
45428 ],
45429 "criteria": { # An optional mapping of filters per source column offset.
45430 #
45431 # The filters will be applied before aggregating data into the pivot table.
45432 # The map's key is the column offset of the source range that you want to
45433 # filter, and the value is the criteria for that column.
45434 #
45435 # For example, if the source was `C10:E15`, a key of `0` will have the filter
45436 # for column `C`, whereas the key `1` is for column `D`.
45437 "a_key": { # Criteria for showing/hiding rows in a pivot table.
45438 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
45439 "A String",
45440 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045441 },
45442 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045443 "columns": [ # Each column grouping in the pivot table.
45444 { # A single grouping (either row or column) in a pivot table.
45445 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
45446 "valueMetadata": [ # Metadata about values in the grouping.
45447 { # Metadata about a value in a pivot grouping.
45448 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
45449 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
45450 # (Note that formulaValue is not valid,
45451 # because the values will be calculated.)
45452 "numberValue": 3.14, # Represents a double value.
45453 # Note: Dates, Times and DateTimes are represented as doubles in
45454 # "serial number" format.
45455 "boolValue": True or False, # Represents a boolean value.
45456 "formulaValue": "A String", # Represents a formula.
45457 "stringValue": "A String", # Represents a string value.
45458 # Leading single quotes are not included. For example, if the user typed
45459 # `'123` into the UI, this would be represented as a `stringValue` of
45460 # `"123"`.
45461 "errorValue": { # An error in a cell. # Represents an error.
45462 # This field is read-only.
45463 "message": "A String", # A message with more information about the error
45464 # (in the spreadsheet's locale).
45465 "type": "A String", # The type of error.
45466 },
45467 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045468 },
45469 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045470 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
45471 # If not specified, sorting is alphabetical by this group's values.
45472 "buckets": [ # Determines the bucket from which values are chosen to sort.
45473 #
45474 # For example, in a pivot table with one row group & two column groups,
45475 # the row group can list up to two values. The first value corresponds
45476 # to a value within the first column group, and the second value
45477 # corresponds to a value in the second column group. If no values
45478 # are listed, this would indicate that the row should be sorted according
45479 # to the "Grand Total" over the column groups. If a single value is listed,
45480 # this would correspond to using the "Total" of that bucket.
45481 { # The kinds of value that a cell in a spreadsheet can have.
45482 "numberValue": 3.14, # Represents a double value.
45483 # Note: Dates, Times and DateTimes are represented as doubles in
45484 # "serial number" format.
45485 "boolValue": True or False, # Represents a boolean value.
45486 "formulaValue": "A String", # Represents a formula.
45487 "stringValue": "A String", # Represents a string value.
45488 # Leading single quotes are not included. For example, if the user typed
45489 # `'123` into the UI, this would be represented as a `stringValue` of
45490 # `"123"`.
45491 "errorValue": { # An error in a cell. # Represents an error.
45492 # This field is read-only.
45493 "message": "A String", # A message with more information about the error
45494 # (in the spreadsheet's locale).
45495 "type": "A String", # The type of error.
45496 },
45497 },
45498 ],
45499 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
45500 # grouping should be sorted by.
45501 },
45502 "sortOrder": "A String", # The order the values in this group should be sorted.
45503 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
45504 #
45505 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
45506 # means this group refers to column `C`, whereas the offset `1` would refer
45507 # to column `D`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045508 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045509 ],
45510 },
45511 "hyperlink": "A String", # A hyperlink this cell points to, if any.
45512 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
45513 "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
45514 # the calculated value. For cells with literals, this will be
45515 # the same as the user_entered_value.
45516 # This field is read-only.
45517 "numberValue": 3.14, # Represents a double value.
45518 # Note: Dates, Times and DateTimes are represented as doubles in
45519 # "serial number" format.
45520 "boolValue": True or False, # Represents a boolean value.
45521 "formulaValue": "A String", # Represents a formula.
45522 "stringValue": "A String", # Represents a string value.
45523 # Leading single quotes are not included. For example, if the user typed
45524 # `'123` into the UI, this would be represented as a `stringValue` of
45525 # `"123"`.
45526 "errorValue": { # An error in a cell. # Represents an error.
45527 # This field is read-only.
45528 "message": "A String", # A message with more information about the error
45529 # (in the spreadsheet's locale).
45530 "type": "A String", # The type of error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045531 },
45532 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045533 "formattedValue": "A String", # The formatted value of the cell.
45534 # This is the value as it's shown to the user.
45535 # This field is read-only.
45536 "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()`
45537 # Note: Dates, Times and DateTimes are represented as doubles in
45538 # serial number format.
45539 "numberValue": 3.14, # Represents a double value.
45540 # Note: Dates, Times and DateTimes are represented as doubles in
45541 # "serial number" format.
45542 "boolValue": True or False, # Represents a boolean value.
45543 "formulaValue": "A String", # Represents a formula.
45544 "stringValue": "A String", # Represents a string value.
45545 # Leading single quotes are not included. For example, if the user typed
45546 # `'123` into the UI, this would be represented as a `stringValue` of
45547 # `"123"`.
45548 "errorValue": { # An error in a cell. # Represents an error.
45549 # This field is read-only.
45550 "message": "A String", # A message with more information about the error
45551 # (in the spreadsheet's locale).
45552 "type": "A String", # The type of error.
45553 },
45554 },
45555 "note": "A String", # Any note on the cell.
45556 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
45557 # This includes the results of applying any conditional formatting and,
45558 # if the cell contains a formula, the computed number format.
45559 # If the effective format is the default format, effective format will
45560 # not be written.
45561 # This field is read-only.
45562 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
45563 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
45564 # the user's locale will be used if necessary for the given type.
45565 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
45566 # information about the supported patterns.
45567 "type": "A String", # The type of the number format.
45568 # When writing, this field must be set.
45569 },
45570 "textDirection": "A String", # The direction of the text in the cell.
45571 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
45572 # When updating padding, every field must be specified.
45573 "top": 42, # The top padding of the cell.
45574 "right": 42, # The right padding of the cell.
45575 "bottom": 42, # The bottom padding of the cell.
45576 "left": 42, # The left padding of the cell.
45577 },
45578 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
45579 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
45580 # for simplicity of conversion to/from color representations in various
45581 # languages over compactness; for example, the fields of this representation
45582 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
45583 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
45584 # method in iOS; and, with just a little work, it can be easily formatted into
45585 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
45586 #
45587 # Example (Java):
45588 #
45589 # import com.google.type.Color;
45590 #
45591 # // ...
45592 # public static java.awt.Color fromProto(Color protocolor) {
45593 # float alpha = protocolor.hasAlpha()
45594 # ? protocolor.getAlpha().getValue()
45595 # : 1.0;
45596 #
45597 # return new java.awt.Color(
45598 # protocolor.getRed(),
45599 # protocolor.getGreen(),
45600 # protocolor.getBlue(),
45601 # alpha);
45602 # }
45603 #
45604 # public static Color toProto(java.awt.Color color) {
45605 # float red = (float) color.getRed();
45606 # float green = (float) color.getGreen();
45607 # float blue = (float) color.getBlue();
45608 # float denominator = 255.0;
45609 # Color.Builder resultBuilder =
45610 # Color
45611 # .newBuilder()
45612 # .setRed(red / denominator)
45613 # .setGreen(green / denominator)
45614 # .setBlue(blue / denominator);
45615 # int alpha = color.getAlpha();
45616 # if (alpha != 255) {
45617 # result.setAlpha(
45618 # FloatValue
45619 # .newBuilder()
45620 # .setValue(((float) alpha) / denominator)
45621 # .build());
45622 # }
45623 # return resultBuilder.build();
45624 # }
45625 # // ...
45626 #
45627 # Example (iOS / Obj-C):
45628 #
45629 # // ...
45630 # static UIColor* fromProto(Color* protocolor) {
45631 # float red = [protocolor red];
45632 # float green = [protocolor green];
45633 # float blue = [protocolor blue];
45634 # FloatValue* alpha_wrapper = [protocolor alpha];
45635 # float alpha = 1.0;
45636 # if (alpha_wrapper != nil) {
45637 # alpha = [alpha_wrapper value];
45638 # }
45639 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
45640 # }
45641 #
45642 # static Color* toProto(UIColor* color) {
45643 # CGFloat red, green, blue, alpha;
45644 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
45645 # return nil;
45646 # }
45647 # Color* result = [Color alloc] init];
45648 # [result setRed:red];
45649 # [result setGreen:green];
45650 # [result setBlue:blue];
45651 # if (alpha <= 0.9999) {
45652 # [result setAlpha:floatWrapperWithValue(alpha)];
45653 # }
45654 # [result autorelease];
45655 # return result;
45656 # }
45657 # // ...
45658 #
45659 # Example (JavaScript):
45660 #
45661 # // ...
45662 #
45663 # var protoToCssColor = function(rgb_color) {
45664 # var redFrac = rgb_color.red || 0.0;
45665 # var greenFrac = rgb_color.green || 0.0;
45666 # var blueFrac = rgb_color.blue || 0.0;
45667 # var red = Math.floor(redFrac * 255);
45668 # var green = Math.floor(greenFrac * 255);
45669 # var blue = Math.floor(blueFrac * 255);
45670 #
45671 # if (!('alpha' in rgb_color)) {
45672 # return rgbToCssColor_(red, green, blue);
45673 # }
45674 #
45675 # var alphaFrac = rgb_color.alpha.value || 0.0;
45676 # var rgbParams = [red, green, blue].join(',');
45677 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
45678 # };
45679 #
45680 # var rgbToCssColor_ = function(red, green, blue) {
45681 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
45682 # var hexString = rgbNumber.toString(16);
45683 # var missingZeros = 6 - hexString.length;
45684 # var resultBuilder = ['#'];
45685 # for (var i = 0; i < missingZeros; i++) {
45686 # resultBuilder.push('0');
45687 # }
45688 # resultBuilder.push(hexString);
45689 # return resultBuilder.join('');
45690 # };
45691 #
45692 # // ...
45693 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
45694 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
45695 # the final pixel color is defined by the equation:
45696 #
45697 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
45698 #
45699 # This means that a value of 1.0 corresponds to a solid color, whereas
45700 # a value of 0.0 corresponds to a completely transparent color. This
45701 # uses a wrapper message rather than a simple float scalar so that it is
45702 # possible to distinguish between a default value and the value being unset.
45703 # If omitted, this color object is to be rendered as a solid color
45704 # (as if the alpha value had been explicitly given with a value of 1.0).
45705 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
45706 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
45707 },
45708 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
45709 "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).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045710 # Absent values indicate that the field isn't specified.
45711 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
45712 # for simplicity of conversion to/from color representations in various
45713 # languages over compactness; for example, the fields of this representation
45714 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
45715 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
45716 # method in iOS; and, with just a little work, it can be easily formatted into
45717 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
45718 #
45719 # Example (Java):
45720 #
45721 # import com.google.type.Color;
45722 #
45723 # // ...
45724 # public static java.awt.Color fromProto(Color protocolor) {
45725 # float alpha = protocolor.hasAlpha()
45726 # ? protocolor.getAlpha().getValue()
45727 # : 1.0;
45728 #
45729 # return new java.awt.Color(
45730 # protocolor.getRed(),
45731 # protocolor.getGreen(),
45732 # protocolor.getBlue(),
45733 # alpha);
45734 # }
45735 #
45736 # public static Color toProto(java.awt.Color color) {
45737 # float red = (float) color.getRed();
45738 # float green = (float) color.getGreen();
45739 # float blue = (float) color.getBlue();
45740 # float denominator = 255.0;
45741 # Color.Builder resultBuilder =
45742 # Color
45743 # .newBuilder()
45744 # .setRed(red / denominator)
45745 # .setGreen(green / denominator)
45746 # .setBlue(blue / denominator);
45747 # int alpha = color.getAlpha();
45748 # if (alpha != 255) {
45749 # result.setAlpha(
45750 # FloatValue
45751 # .newBuilder()
45752 # .setValue(((float) alpha) / denominator)
45753 # .build());
45754 # }
45755 # return resultBuilder.build();
45756 # }
45757 # // ...
45758 #
45759 # Example (iOS / Obj-C):
45760 #
45761 # // ...
45762 # static UIColor* fromProto(Color* protocolor) {
45763 # float red = [protocolor red];
45764 # float green = [protocolor green];
45765 # float blue = [protocolor blue];
45766 # FloatValue* alpha_wrapper = [protocolor alpha];
45767 # float alpha = 1.0;
45768 # if (alpha_wrapper != nil) {
45769 # alpha = [alpha_wrapper value];
45770 # }
45771 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
45772 # }
45773 #
45774 # static Color* toProto(UIColor* color) {
45775 # CGFloat red, green, blue, alpha;
45776 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
45777 # return nil;
45778 # }
45779 # Color* result = [Color alloc] init];
45780 # [result setRed:red];
45781 # [result setGreen:green];
45782 # [result setBlue:blue];
45783 # if (alpha <= 0.9999) {
45784 # [result setAlpha:floatWrapperWithValue(alpha)];
45785 # }
45786 # [result autorelease];
45787 # return result;
45788 # }
45789 # // ...
45790 #
45791 # Example (JavaScript):
45792 #
45793 # // ...
45794 #
45795 # var protoToCssColor = function(rgb_color) {
45796 # var redFrac = rgb_color.red || 0.0;
45797 # var greenFrac = rgb_color.green || 0.0;
45798 # var blueFrac = rgb_color.blue || 0.0;
45799 # var red = Math.floor(redFrac * 255);
45800 # var green = Math.floor(greenFrac * 255);
45801 # var blue = Math.floor(blueFrac * 255);
45802 #
45803 # if (!('alpha' in rgb_color)) {
45804 # return rgbToCssColor_(red, green, blue);
45805 # }
45806 #
45807 # var alphaFrac = rgb_color.alpha.value || 0.0;
45808 # var rgbParams = [red, green, blue].join(',');
45809 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
45810 # };
45811 #
45812 # var rgbToCssColor_ = function(red, green, blue) {
45813 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
45814 # var hexString = rgbNumber.toString(16);
45815 # var missingZeros = 6 - hexString.length;
45816 # var resultBuilder = ['#'];
45817 # for (var i = 0; i < missingZeros; i++) {
45818 # resultBuilder.push('0');
45819 # }
45820 # resultBuilder.push(hexString);
45821 # return resultBuilder.join('');
45822 # };
45823 #
45824 # // ...
45825 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
45826 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
45827 # the final pixel color is defined by the equation:
45828 #
45829 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
45830 #
45831 # This means that a value of 1.0 corresponds to a solid color, whereas
45832 # a value of 0.0 corresponds to a completely transparent color. This
45833 # uses a wrapper message rather than a simple float scalar so that it is
45834 # possible to distinguish between a default value and the value being unset.
45835 # If omitted, this color object is to be rendered as a solid color
45836 # (as if the alpha value had been explicitly given with a value of 1.0).
45837 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
45838 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
45839 },
45840 "bold": True or False, # True if the text is bold.
45841 "strikethrough": True or False, # True if the text has a strikethrough.
45842 "fontFamily": "A String", # The font family.
45843 "fontSize": 42, # The size of the font.
45844 "italic": True or False, # True if the text is italicized.
45845 "underline": True or False, # True if the text is underlined.
45846 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045847 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
45848 "borders": { # The borders of the cell. # The borders of the cell.
45849 "top": { # A border along a cell. # The top border of the cell.
45850 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
45851 # for simplicity of conversion to/from color representations in various
45852 # languages over compactness; for example, the fields of this representation
45853 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
45854 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
45855 # method in iOS; and, with just a little work, it can be easily formatted into
45856 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
45857 #
45858 # Example (Java):
45859 #
45860 # import com.google.type.Color;
45861 #
45862 # // ...
45863 # public static java.awt.Color fromProto(Color protocolor) {
45864 # float alpha = protocolor.hasAlpha()
45865 # ? protocolor.getAlpha().getValue()
45866 # : 1.0;
45867 #
45868 # return new java.awt.Color(
45869 # protocolor.getRed(),
45870 # protocolor.getGreen(),
45871 # protocolor.getBlue(),
45872 # alpha);
45873 # }
45874 #
45875 # public static Color toProto(java.awt.Color color) {
45876 # float red = (float) color.getRed();
45877 # float green = (float) color.getGreen();
45878 # float blue = (float) color.getBlue();
45879 # float denominator = 255.0;
45880 # Color.Builder resultBuilder =
45881 # Color
45882 # .newBuilder()
45883 # .setRed(red / denominator)
45884 # .setGreen(green / denominator)
45885 # .setBlue(blue / denominator);
45886 # int alpha = color.getAlpha();
45887 # if (alpha != 255) {
45888 # result.setAlpha(
45889 # FloatValue
45890 # .newBuilder()
45891 # .setValue(((float) alpha) / denominator)
45892 # .build());
45893 # }
45894 # return resultBuilder.build();
45895 # }
45896 # // ...
45897 #
45898 # Example (iOS / Obj-C):
45899 #
45900 # // ...
45901 # static UIColor* fromProto(Color* protocolor) {
45902 # float red = [protocolor red];
45903 # float green = [protocolor green];
45904 # float blue = [protocolor blue];
45905 # FloatValue* alpha_wrapper = [protocolor alpha];
45906 # float alpha = 1.0;
45907 # if (alpha_wrapper != nil) {
45908 # alpha = [alpha_wrapper value];
45909 # }
45910 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
45911 # }
45912 #
45913 # static Color* toProto(UIColor* color) {
45914 # CGFloat red, green, blue, alpha;
45915 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
45916 # return nil;
45917 # }
45918 # Color* result = [Color alloc] init];
45919 # [result setRed:red];
45920 # [result setGreen:green];
45921 # [result setBlue:blue];
45922 # if (alpha <= 0.9999) {
45923 # [result setAlpha:floatWrapperWithValue(alpha)];
45924 # }
45925 # [result autorelease];
45926 # return result;
45927 # }
45928 # // ...
45929 #
45930 # Example (JavaScript):
45931 #
45932 # // ...
45933 #
45934 # var protoToCssColor = function(rgb_color) {
45935 # var redFrac = rgb_color.red || 0.0;
45936 # var greenFrac = rgb_color.green || 0.0;
45937 # var blueFrac = rgb_color.blue || 0.0;
45938 # var red = Math.floor(redFrac * 255);
45939 # var green = Math.floor(greenFrac * 255);
45940 # var blue = Math.floor(blueFrac * 255);
45941 #
45942 # if (!('alpha' in rgb_color)) {
45943 # return rgbToCssColor_(red, green, blue);
45944 # }
45945 #
45946 # var alphaFrac = rgb_color.alpha.value || 0.0;
45947 # var rgbParams = [red, green, blue].join(',');
45948 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
45949 # };
45950 #
45951 # var rgbToCssColor_ = function(red, green, blue) {
45952 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
45953 # var hexString = rgbNumber.toString(16);
45954 # var missingZeros = 6 - hexString.length;
45955 # var resultBuilder = ['#'];
45956 # for (var i = 0; i < missingZeros; i++) {
45957 # resultBuilder.push('0');
45958 # }
45959 # resultBuilder.push(hexString);
45960 # return resultBuilder.join('');
45961 # };
45962 #
45963 # // ...
45964 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
45965 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
45966 # the final pixel color is defined by the equation:
45967 #
45968 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
45969 #
45970 # This means that a value of 1.0 corresponds to a solid color, whereas
45971 # a value of 0.0 corresponds to a completely transparent color. This
45972 # uses a wrapper message rather than a simple float scalar so that it is
45973 # possible to distinguish between a default value and the value being unset.
45974 # If omitted, this color object is to be rendered as a solid color
45975 # (as if the alpha value had been explicitly given with a value of 1.0).
45976 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
45977 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
45978 },
45979 "width": 42, # The width of the border, in pixels.
45980 # Deprecated; the width is determined by the "style" field.
45981 "style": "A String", # The style of the border.
45982 },
45983 "right": { # A border along a cell. # The right border of the cell.
45984 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
45985 # for simplicity of conversion to/from color representations in various
45986 # languages over compactness; for example, the fields of this representation
45987 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
45988 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
45989 # method in iOS; and, with just a little work, it can be easily formatted into
45990 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
45991 #
45992 # Example (Java):
45993 #
45994 # import com.google.type.Color;
45995 #
45996 # // ...
45997 # public static java.awt.Color fromProto(Color protocolor) {
45998 # float alpha = protocolor.hasAlpha()
45999 # ? protocolor.getAlpha().getValue()
46000 # : 1.0;
46001 #
46002 # return new java.awt.Color(
46003 # protocolor.getRed(),
46004 # protocolor.getGreen(),
46005 # protocolor.getBlue(),
46006 # alpha);
46007 # }
46008 #
46009 # public static Color toProto(java.awt.Color color) {
46010 # float red = (float) color.getRed();
46011 # float green = (float) color.getGreen();
46012 # float blue = (float) color.getBlue();
46013 # float denominator = 255.0;
46014 # Color.Builder resultBuilder =
46015 # Color
46016 # .newBuilder()
46017 # .setRed(red / denominator)
46018 # .setGreen(green / denominator)
46019 # .setBlue(blue / denominator);
46020 # int alpha = color.getAlpha();
46021 # if (alpha != 255) {
46022 # result.setAlpha(
46023 # FloatValue
46024 # .newBuilder()
46025 # .setValue(((float) alpha) / denominator)
46026 # .build());
46027 # }
46028 # return resultBuilder.build();
46029 # }
46030 # // ...
46031 #
46032 # Example (iOS / Obj-C):
46033 #
46034 # // ...
46035 # static UIColor* fromProto(Color* protocolor) {
46036 # float red = [protocolor red];
46037 # float green = [protocolor green];
46038 # float blue = [protocolor blue];
46039 # FloatValue* alpha_wrapper = [protocolor alpha];
46040 # float alpha = 1.0;
46041 # if (alpha_wrapper != nil) {
46042 # alpha = [alpha_wrapper value];
46043 # }
46044 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46045 # }
46046 #
46047 # static Color* toProto(UIColor* color) {
46048 # CGFloat red, green, blue, alpha;
46049 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46050 # return nil;
46051 # }
46052 # Color* result = [Color alloc] init];
46053 # [result setRed:red];
46054 # [result setGreen:green];
46055 # [result setBlue:blue];
46056 # if (alpha <= 0.9999) {
46057 # [result setAlpha:floatWrapperWithValue(alpha)];
46058 # }
46059 # [result autorelease];
46060 # return result;
46061 # }
46062 # // ...
46063 #
46064 # Example (JavaScript):
46065 #
46066 # // ...
46067 #
46068 # var protoToCssColor = function(rgb_color) {
46069 # var redFrac = rgb_color.red || 0.0;
46070 # var greenFrac = rgb_color.green || 0.0;
46071 # var blueFrac = rgb_color.blue || 0.0;
46072 # var red = Math.floor(redFrac * 255);
46073 # var green = Math.floor(greenFrac * 255);
46074 # var blue = Math.floor(blueFrac * 255);
46075 #
46076 # if (!('alpha' in rgb_color)) {
46077 # return rgbToCssColor_(red, green, blue);
46078 # }
46079 #
46080 # var alphaFrac = rgb_color.alpha.value || 0.0;
46081 # var rgbParams = [red, green, blue].join(',');
46082 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46083 # };
46084 #
46085 # var rgbToCssColor_ = function(red, green, blue) {
46086 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46087 # var hexString = rgbNumber.toString(16);
46088 # var missingZeros = 6 - hexString.length;
46089 # var resultBuilder = ['#'];
46090 # for (var i = 0; i < missingZeros; i++) {
46091 # resultBuilder.push('0');
46092 # }
46093 # resultBuilder.push(hexString);
46094 # return resultBuilder.join('');
46095 # };
46096 #
46097 # // ...
46098 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
46099 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
46100 # the final pixel color is defined by the equation:
46101 #
46102 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
46103 #
46104 # This means that a value of 1.0 corresponds to a solid color, whereas
46105 # a value of 0.0 corresponds to a completely transparent color. This
46106 # uses a wrapper message rather than a simple float scalar so that it is
46107 # possible to distinguish between a default value and the value being unset.
46108 # If omitted, this color object is to be rendered as a solid color
46109 # (as if the alpha value had been explicitly given with a value of 1.0).
46110 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
46111 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
46112 },
46113 "width": 42, # The width of the border, in pixels.
46114 # Deprecated; the width is determined by the "style" field.
46115 "style": "A String", # The style of the border.
46116 },
46117 "bottom": { # A border along a cell. # The bottom border of the cell.
46118 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
46119 # for simplicity of conversion to/from color representations in various
46120 # languages over compactness; for example, the fields of this representation
46121 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46122 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46123 # method in iOS; and, with just a little work, it can be easily formatted into
46124 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46125 #
46126 # Example (Java):
46127 #
46128 # import com.google.type.Color;
46129 #
46130 # // ...
46131 # public static java.awt.Color fromProto(Color protocolor) {
46132 # float alpha = protocolor.hasAlpha()
46133 # ? protocolor.getAlpha().getValue()
46134 # : 1.0;
46135 #
46136 # return new java.awt.Color(
46137 # protocolor.getRed(),
46138 # protocolor.getGreen(),
46139 # protocolor.getBlue(),
46140 # alpha);
46141 # }
46142 #
46143 # public static Color toProto(java.awt.Color color) {
46144 # float red = (float) color.getRed();
46145 # float green = (float) color.getGreen();
46146 # float blue = (float) color.getBlue();
46147 # float denominator = 255.0;
46148 # Color.Builder resultBuilder =
46149 # Color
46150 # .newBuilder()
46151 # .setRed(red / denominator)
46152 # .setGreen(green / denominator)
46153 # .setBlue(blue / denominator);
46154 # int alpha = color.getAlpha();
46155 # if (alpha != 255) {
46156 # result.setAlpha(
46157 # FloatValue
46158 # .newBuilder()
46159 # .setValue(((float) alpha) / denominator)
46160 # .build());
46161 # }
46162 # return resultBuilder.build();
46163 # }
46164 # // ...
46165 #
46166 # Example (iOS / Obj-C):
46167 #
46168 # // ...
46169 # static UIColor* fromProto(Color* protocolor) {
46170 # float red = [protocolor red];
46171 # float green = [protocolor green];
46172 # float blue = [protocolor blue];
46173 # FloatValue* alpha_wrapper = [protocolor alpha];
46174 # float alpha = 1.0;
46175 # if (alpha_wrapper != nil) {
46176 # alpha = [alpha_wrapper value];
46177 # }
46178 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46179 # }
46180 #
46181 # static Color* toProto(UIColor* color) {
46182 # CGFloat red, green, blue, alpha;
46183 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46184 # return nil;
46185 # }
46186 # Color* result = [Color alloc] init];
46187 # [result setRed:red];
46188 # [result setGreen:green];
46189 # [result setBlue:blue];
46190 # if (alpha <= 0.9999) {
46191 # [result setAlpha:floatWrapperWithValue(alpha)];
46192 # }
46193 # [result autorelease];
46194 # return result;
46195 # }
46196 # // ...
46197 #
46198 # Example (JavaScript):
46199 #
46200 # // ...
46201 #
46202 # var protoToCssColor = function(rgb_color) {
46203 # var redFrac = rgb_color.red || 0.0;
46204 # var greenFrac = rgb_color.green || 0.0;
46205 # var blueFrac = rgb_color.blue || 0.0;
46206 # var red = Math.floor(redFrac * 255);
46207 # var green = Math.floor(greenFrac * 255);
46208 # var blue = Math.floor(blueFrac * 255);
46209 #
46210 # if (!('alpha' in rgb_color)) {
46211 # return rgbToCssColor_(red, green, blue);
46212 # }
46213 #
46214 # var alphaFrac = rgb_color.alpha.value || 0.0;
46215 # var rgbParams = [red, green, blue].join(',');
46216 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46217 # };
46218 #
46219 # var rgbToCssColor_ = function(red, green, blue) {
46220 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46221 # var hexString = rgbNumber.toString(16);
46222 # var missingZeros = 6 - hexString.length;
46223 # var resultBuilder = ['#'];
46224 # for (var i = 0; i < missingZeros; i++) {
46225 # resultBuilder.push('0');
46226 # }
46227 # resultBuilder.push(hexString);
46228 # return resultBuilder.join('');
46229 # };
46230 #
46231 # // ...
46232 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
46233 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
46234 # the final pixel color is defined by the equation:
46235 #
46236 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
46237 #
46238 # This means that a value of 1.0 corresponds to a solid color, whereas
46239 # a value of 0.0 corresponds to a completely transparent color. This
46240 # uses a wrapper message rather than a simple float scalar so that it is
46241 # possible to distinguish between a default value and the value being unset.
46242 # If omitted, this color object is to be rendered as a solid color
46243 # (as if the alpha value had been explicitly given with a value of 1.0).
46244 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
46245 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
46246 },
46247 "width": 42, # The width of the border, in pixels.
46248 # Deprecated; the width is determined by the "style" field.
46249 "style": "A String", # The style of the border.
46250 },
46251 "left": { # A border along a cell. # The left border of the cell.
46252 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
46253 # for simplicity of conversion to/from color representations in various
46254 # languages over compactness; for example, the fields of this representation
46255 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46256 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46257 # method in iOS; and, with just a little work, it can be easily formatted into
46258 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46259 #
46260 # Example (Java):
46261 #
46262 # import com.google.type.Color;
46263 #
46264 # // ...
46265 # public static java.awt.Color fromProto(Color protocolor) {
46266 # float alpha = protocolor.hasAlpha()
46267 # ? protocolor.getAlpha().getValue()
46268 # : 1.0;
46269 #
46270 # return new java.awt.Color(
46271 # protocolor.getRed(),
46272 # protocolor.getGreen(),
46273 # protocolor.getBlue(),
46274 # alpha);
46275 # }
46276 #
46277 # public static Color toProto(java.awt.Color color) {
46278 # float red = (float) color.getRed();
46279 # float green = (float) color.getGreen();
46280 # float blue = (float) color.getBlue();
46281 # float denominator = 255.0;
46282 # Color.Builder resultBuilder =
46283 # Color
46284 # .newBuilder()
46285 # .setRed(red / denominator)
46286 # .setGreen(green / denominator)
46287 # .setBlue(blue / denominator);
46288 # int alpha = color.getAlpha();
46289 # if (alpha != 255) {
46290 # result.setAlpha(
46291 # FloatValue
46292 # .newBuilder()
46293 # .setValue(((float) alpha) / denominator)
46294 # .build());
46295 # }
46296 # return resultBuilder.build();
46297 # }
46298 # // ...
46299 #
46300 # Example (iOS / Obj-C):
46301 #
46302 # // ...
46303 # static UIColor* fromProto(Color* protocolor) {
46304 # float red = [protocolor red];
46305 # float green = [protocolor green];
46306 # float blue = [protocolor blue];
46307 # FloatValue* alpha_wrapper = [protocolor alpha];
46308 # float alpha = 1.0;
46309 # if (alpha_wrapper != nil) {
46310 # alpha = [alpha_wrapper value];
46311 # }
46312 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46313 # }
46314 #
46315 # static Color* toProto(UIColor* color) {
46316 # CGFloat red, green, blue, alpha;
46317 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46318 # return nil;
46319 # }
46320 # Color* result = [Color alloc] init];
46321 # [result setRed:red];
46322 # [result setGreen:green];
46323 # [result setBlue:blue];
46324 # if (alpha <= 0.9999) {
46325 # [result setAlpha:floatWrapperWithValue(alpha)];
46326 # }
46327 # [result autorelease];
46328 # return result;
46329 # }
46330 # // ...
46331 #
46332 # Example (JavaScript):
46333 #
46334 # // ...
46335 #
46336 # var protoToCssColor = function(rgb_color) {
46337 # var redFrac = rgb_color.red || 0.0;
46338 # var greenFrac = rgb_color.green || 0.0;
46339 # var blueFrac = rgb_color.blue || 0.0;
46340 # var red = Math.floor(redFrac * 255);
46341 # var green = Math.floor(greenFrac * 255);
46342 # var blue = Math.floor(blueFrac * 255);
46343 #
46344 # if (!('alpha' in rgb_color)) {
46345 # return rgbToCssColor_(red, green, blue);
46346 # }
46347 #
46348 # var alphaFrac = rgb_color.alpha.value || 0.0;
46349 # var rgbParams = [red, green, blue].join(',');
46350 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46351 # };
46352 #
46353 # var rgbToCssColor_ = function(red, green, blue) {
46354 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46355 # var hexString = rgbNumber.toString(16);
46356 # var missingZeros = 6 - hexString.length;
46357 # var resultBuilder = ['#'];
46358 # for (var i = 0; i < missingZeros; i++) {
46359 # resultBuilder.push('0');
46360 # }
46361 # resultBuilder.push(hexString);
46362 # return resultBuilder.join('');
46363 # };
46364 #
46365 # // ...
46366 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
46367 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
46368 # the final pixel color is defined by the equation:
46369 #
46370 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
46371 #
46372 # This means that a value of 1.0 corresponds to a solid color, whereas
46373 # a value of 0.0 corresponds to a completely transparent color. This
46374 # uses a wrapper message rather than a simple float scalar so that it is
46375 # possible to distinguish between a default value and the value being unset.
46376 # If omitted, this color object is to be rendered as a solid color
46377 # (as if the alpha value had been explicitly given with a value of 1.0).
46378 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
46379 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
46380 },
46381 "width": 42, # The width of the border, in pixels.
46382 # Deprecated; the width is determined by the "style" field.
46383 "style": "A String", # The style of the border.
46384 },
46385 },
46386 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070046387 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046388 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
46389 #
46390 # When writing, the new format will be merged with the existing format.
46391 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
46392 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
46393 # the user's locale will be used if necessary for the given type.
46394 # See the [Date and Number Formats guide](/sheets/guides/formats) for more
46395 # information about the supported patterns.
46396 "type": "A String", # The type of the number format.
46397 # When writing, this field must be set.
46398 },
46399 "textDirection": "A String", # The direction of the text in the cell.
46400 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
46401 # When updating padding, every field must be specified.
46402 "top": 42, # The top padding of the cell.
46403 "right": 42, # The right padding of the cell.
46404 "bottom": 42, # The bottom padding of the cell.
46405 "left": 42, # The left padding of the cell.
46406 },
46407 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
46408 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
46409 # for simplicity of conversion to/from color representations in various
46410 # languages over compactness; for example, the fields of this representation
46411 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46412 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46413 # method in iOS; and, with just a little work, it can be easily formatted into
46414 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46415 #
46416 # Example (Java):
46417 #
46418 # import com.google.type.Color;
46419 #
46420 # // ...
46421 # public static java.awt.Color fromProto(Color protocolor) {
46422 # float alpha = protocolor.hasAlpha()
46423 # ? protocolor.getAlpha().getValue()
46424 # : 1.0;
46425 #
46426 # return new java.awt.Color(
46427 # protocolor.getRed(),
46428 # protocolor.getGreen(),
46429 # protocolor.getBlue(),
46430 # alpha);
46431 # }
46432 #
46433 # public static Color toProto(java.awt.Color color) {
46434 # float red = (float) color.getRed();
46435 # float green = (float) color.getGreen();
46436 # float blue = (float) color.getBlue();
46437 # float denominator = 255.0;
46438 # Color.Builder resultBuilder =
46439 # Color
46440 # .newBuilder()
46441 # .setRed(red / denominator)
46442 # .setGreen(green / denominator)
46443 # .setBlue(blue / denominator);
46444 # int alpha = color.getAlpha();
46445 # if (alpha != 255) {
46446 # result.setAlpha(
46447 # FloatValue
46448 # .newBuilder()
46449 # .setValue(((float) alpha) / denominator)
46450 # .build());
46451 # }
46452 # return resultBuilder.build();
46453 # }
46454 # // ...
46455 #
46456 # Example (iOS / Obj-C):
46457 #
46458 # // ...
46459 # static UIColor* fromProto(Color* protocolor) {
46460 # float red = [protocolor red];
46461 # float green = [protocolor green];
46462 # float blue = [protocolor blue];
46463 # FloatValue* alpha_wrapper = [protocolor alpha];
46464 # float alpha = 1.0;
46465 # if (alpha_wrapper != nil) {
46466 # alpha = [alpha_wrapper value];
46467 # }
46468 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46469 # }
46470 #
46471 # static Color* toProto(UIColor* color) {
46472 # CGFloat red, green, blue, alpha;
46473 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46474 # return nil;
46475 # }
46476 # Color* result = [Color alloc] init];
46477 # [result setRed:red];
46478 # [result setGreen:green];
46479 # [result setBlue:blue];
46480 # if (alpha <= 0.9999) {
46481 # [result setAlpha:floatWrapperWithValue(alpha)];
46482 # }
46483 # [result autorelease];
46484 # return result;
46485 # }
46486 # // ...
46487 #
46488 # Example (JavaScript):
46489 #
46490 # // ...
46491 #
46492 # var protoToCssColor = function(rgb_color) {
46493 # var redFrac = rgb_color.red || 0.0;
46494 # var greenFrac = rgb_color.green || 0.0;
46495 # var blueFrac = rgb_color.blue || 0.0;
46496 # var red = Math.floor(redFrac * 255);
46497 # var green = Math.floor(greenFrac * 255);
46498 # var blue = Math.floor(blueFrac * 255);
46499 #
46500 # if (!('alpha' in rgb_color)) {
46501 # return rgbToCssColor_(red, green, blue);
46502 # }
46503 #
46504 # var alphaFrac = rgb_color.alpha.value || 0.0;
46505 # var rgbParams = [red, green, blue].join(',');
46506 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46507 # };
46508 #
46509 # var rgbToCssColor_ = function(red, green, blue) {
46510 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46511 # var hexString = rgbNumber.toString(16);
46512 # var missingZeros = 6 - hexString.length;
46513 # var resultBuilder = ['#'];
46514 # for (var i = 0; i < missingZeros; i++) {
46515 # resultBuilder.push('0');
46516 # }
46517 # resultBuilder.push(hexString);
46518 # return resultBuilder.join('');
46519 # };
46520 #
46521 # // ...
46522 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
46523 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
46524 # the final pixel color is defined by the equation:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070046525 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046526 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
46527 #
46528 # This means that a value of 1.0 corresponds to a solid color, whereas
46529 # a value of 0.0 corresponds to a completely transparent color. This
46530 # uses a wrapper message rather than a simple float scalar so that it is
46531 # possible to distinguish between a default value and the value being unset.
46532 # If omitted, this color object is to be rendered as a solid color
46533 # (as if the alpha value had been explicitly given with a value of 1.0).
46534 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
46535 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
46536 },
46537 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
46538 "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).
46539 # Absent values indicate that the field isn't specified.
46540 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
46541 # for simplicity of conversion to/from color representations in various
46542 # languages over compactness; for example, the fields of this representation
46543 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46544 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46545 # method in iOS; and, with just a little work, it can be easily formatted into
46546 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46547 #
46548 # Example (Java):
46549 #
46550 # import com.google.type.Color;
46551 #
46552 # // ...
46553 # public static java.awt.Color fromProto(Color protocolor) {
46554 # float alpha = protocolor.hasAlpha()
46555 # ? protocolor.getAlpha().getValue()
46556 # : 1.0;
46557 #
46558 # return new java.awt.Color(
46559 # protocolor.getRed(),
46560 # protocolor.getGreen(),
46561 # protocolor.getBlue(),
46562 # alpha);
46563 # }
46564 #
46565 # public static Color toProto(java.awt.Color color) {
46566 # float red = (float) color.getRed();
46567 # float green = (float) color.getGreen();
46568 # float blue = (float) color.getBlue();
46569 # float denominator = 255.0;
46570 # Color.Builder resultBuilder =
46571 # Color
46572 # .newBuilder()
46573 # .setRed(red / denominator)
46574 # .setGreen(green / denominator)
46575 # .setBlue(blue / denominator);
46576 # int alpha = color.getAlpha();
46577 # if (alpha != 255) {
46578 # result.setAlpha(
46579 # FloatValue
46580 # .newBuilder()
46581 # .setValue(((float) alpha) / denominator)
46582 # .build());
46583 # }
46584 # return resultBuilder.build();
46585 # }
46586 # // ...
46587 #
46588 # Example (iOS / Obj-C):
46589 #
46590 # // ...
46591 # static UIColor* fromProto(Color* protocolor) {
46592 # float red = [protocolor red];
46593 # float green = [protocolor green];
46594 # float blue = [protocolor blue];
46595 # FloatValue* alpha_wrapper = [protocolor alpha];
46596 # float alpha = 1.0;
46597 # if (alpha_wrapper != nil) {
46598 # alpha = [alpha_wrapper value];
46599 # }
46600 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46601 # }
46602 #
46603 # static Color* toProto(UIColor* color) {
46604 # CGFloat red, green, blue, alpha;
46605 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46606 # return nil;
46607 # }
46608 # Color* result = [Color alloc] init];
46609 # [result setRed:red];
46610 # [result setGreen:green];
46611 # [result setBlue:blue];
46612 # if (alpha <= 0.9999) {
46613 # [result setAlpha:floatWrapperWithValue(alpha)];
46614 # }
46615 # [result autorelease];
46616 # return result;
46617 # }
46618 # // ...
46619 #
46620 # Example (JavaScript):
46621 #
46622 # // ...
46623 #
46624 # var protoToCssColor = function(rgb_color) {
46625 # var redFrac = rgb_color.red || 0.0;
46626 # var greenFrac = rgb_color.green || 0.0;
46627 # var blueFrac = rgb_color.blue || 0.0;
46628 # var red = Math.floor(redFrac * 255);
46629 # var green = Math.floor(greenFrac * 255);
46630 # var blue = Math.floor(blueFrac * 255);
46631 #
46632 # if (!('alpha' in rgb_color)) {
46633 # return rgbToCssColor_(red, green, blue);
46634 # }
46635 #
46636 # var alphaFrac = rgb_color.alpha.value || 0.0;
46637 # var rgbParams = [red, green, blue].join(',');
46638 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46639 # };
46640 #
46641 # var rgbToCssColor_ = function(red, green, blue) {
46642 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46643 # var hexString = rgbNumber.toString(16);
46644 # var missingZeros = 6 - hexString.length;
46645 # var resultBuilder = ['#'];
46646 # for (var i = 0; i < missingZeros; i++) {
46647 # resultBuilder.push('0');
46648 # }
46649 # resultBuilder.push(hexString);
46650 # return resultBuilder.join('');
46651 # };
46652 #
46653 # // ...
46654 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
46655 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
46656 # the final pixel color is defined by the equation:
46657 #
46658 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
46659 #
46660 # This means that a value of 1.0 corresponds to a solid color, whereas
46661 # a value of 0.0 corresponds to a completely transparent color. This
46662 # uses a wrapper message rather than a simple float scalar so that it is
46663 # possible to distinguish between a default value and the value being unset.
46664 # If omitted, this color object is to be rendered as a solid color
46665 # (as if the alpha value had been explicitly given with a value of 1.0).
46666 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
46667 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
46668 },
46669 "bold": True or False, # True if the text is bold.
46670 "strikethrough": True or False, # True if the text has a strikethrough.
46671 "fontFamily": "A String", # The font family.
46672 "fontSize": 42, # The size of the font.
46673 "italic": True or False, # True if the text is italicized.
46674 "underline": True or False, # True if the text is underlined.
46675 },
46676 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
46677 "borders": { # The borders of the cell. # The borders of the cell.
46678 "top": { # A border along a cell. # The top border of the cell.
46679 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
46680 # for simplicity of conversion to/from color representations in various
46681 # languages over compactness; for example, the fields of this representation
46682 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46683 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46684 # method in iOS; and, with just a little work, it can be easily formatted into
46685 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46686 #
46687 # Example (Java):
46688 #
46689 # import com.google.type.Color;
46690 #
46691 # // ...
46692 # public static java.awt.Color fromProto(Color protocolor) {
46693 # float alpha = protocolor.hasAlpha()
46694 # ? protocolor.getAlpha().getValue()
46695 # : 1.0;
46696 #
46697 # return new java.awt.Color(
46698 # protocolor.getRed(),
46699 # protocolor.getGreen(),
46700 # protocolor.getBlue(),
46701 # alpha);
46702 # }
46703 #
46704 # public static Color toProto(java.awt.Color color) {
46705 # float red = (float) color.getRed();
46706 # float green = (float) color.getGreen();
46707 # float blue = (float) color.getBlue();
46708 # float denominator = 255.0;
46709 # Color.Builder resultBuilder =
46710 # Color
46711 # .newBuilder()
46712 # .setRed(red / denominator)
46713 # .setGreen(green / denominator)
46714 # .setBlue(blue / denominator);
46715 # int alpha = color.getAlpha();
46716 # if (alpha != 255) {
46717 # result.setAlpha(
46718 # FloatValue
46719 # .newBuilder()
46720 # .setValue(((float) alpha) / denominator)
46721 # .build());
46722 # }
46723 # return resultBuilder.build();
46724 # }
46725 # // ...
46726 #
46727 # Example (iOS / Obj-C):
46728 #
46729 # // ...
46730 # static UIColor* fromProto(Color* protocolor) {
46731 # float red = [protocolor red];
46732 # float green = [protocolor green];
46733 # float blue = [protocolor blue];
46734 # FloatValue* alpha_wrapper = [protocolor alpha];
46735 # float alpha = 1.0;
46736 # if (alpha_wrapper != nil) {
46737 # alpha = [alpha_wrapper value];
46738 # }
46739 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46740 # }
46741 #
46742 # static Color* toProto(UIColor* color) {
46743 # CGFloat red, green, blue, alpha;
46744 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46745 # return nil;
46746 # }
46747 # Color* result = [Color alloc] init];
46748 # [result setRed:red];
46749 # [result setGreen:green];
46750 # [result setBlue:blue];
46751 # if (alpha <= 0.9999) {
46752 # [result setAlpha:floatWrapperWithValue(alpha)];
46753 # }
46754 # [result autorelease];
46755 # return result;
46756 # }
46757 # // ...
46758 #
46759 # Example (JavaScript):
46760 #
46761 # // ...
46762 #
46763 # var protoToCssColor = function(rgb_color) {
46764 # var redFrac = rgb_color.red || 0.0;
46765 # var greenFrac = rgb_color.green || 0.0;
46766 # var blueFrac = rgb_color.blue || 0.0;
46767 # var red = Math.floor(redFrac * 255);
46768 # var green = Math.floor(greenFrac * 255);
46769 # var blue = Math.floor(blueFrac * 255);
46770 #
46771 # if (!('alpha' in rgb_color)) {
46772 # return rgbToCssColor_(red, green, blue);
46773 # }
46774 #
46775 # var alphaFrac = rgb_color.alpha.value || 0.0;
46776 # var rgbParams = [red, green, blue].join(',');
46777 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46778 # };
46779 #
46780 # var rgbToCssColor_ = function(red, green, blue) {
46781 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46782 # var hexString = rgbNumber.toString(16);
46783 # var missingZeros = 6 - hexString.length;
46784 # var resultBuilder = ['#'];
46785 # for (var i = 0; i < missingZeros; i++) {
46786 # resultBuilder.push('0');
46787 # }
46788 # resultBuilder.push(hexString);
46789 # return resultBuilder.join('');
46790 # };
46791 #
46792 # // ...
46793 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
46794 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
46795 # the final pixel color is defined by the equation:
46796 #
46797 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
46798 #
46799 # This means that a value of 1.0 corresponds to a solid color, whereas
46800 # a value of 0.0 corresponds to a completely transparent color. This
46801 # uses a wrapper message rather than a simple float scalar so that it is
46802 # possible to distinguish between a default value and the value being unset.
46803 # If omitted, this color object is to be rendered as a solid color
46804 # (as if the alpha value had been explicitly given with a value of 1.0).
46805 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
46806 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
46807 },
46808 "width": 42, # The width of the border, in pixels.
46809 # Deprecated; the width is determined by the "style" field.
46810 "style": "A String", # The style of the border.
46811 },
46812 "right": { # A border along a cell. # The right border of the cell.
46813 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
46814 # for simplicity of conversion to/from color representations in various
46815 # languages over compactness; for example, the fields of this representation
46816 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46817 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46818 # method in iOS; and, with just a little work, it can be easily formatted into
46819 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46820 #
46821 # Example (Java):
46822 #
46823 # import com.google.type.Color;
46824 #
46825 # // ...
46826 # public static java.awt.Color fromProto(Color protocolor) {
46827 # float alpha = protocolor.hasAlpha()
46828 # ? protocolor.getAlpha().getValue()
46829 # : 1.0;
46830 #
46831 # return new java.awt.Color(
46832 # protocolor.getRed(),
46833 # protocolor.getGreen(),
46834 # protocolor.getBlue(),
46835 # alpha);
46836 # }
46837 #
46838 # public static Color toProto(java.awt.Color color) {
46839 # float red = (float) color.getRed();
46840 # float green = (float) color.getGreen();
46841 # float blue = (float) color.getBlue();
46842 # float denominator = 255.0;
46843 # Color.Builder resultBuilder =
46844 # Color
46845 # .newBuilder()
46846 # .setRed(red / denominator)
46847 # .setGreen(green / denominator)
46848 # .setBlue(blue / denominator);
46849 # int alpha = color.getAlpha();
46850 # if (alpha != 255) {
46851 # result.setAlpha(
46852 # FloatValue
46853 # .newBuilder()
46854 # .setValue(((float) alpha) / denominator)
46855 # .build());
46856 # }
46857 # return resultBuilder.build();
46858 # }
46859 # // ...
46860 #
46861 # Example (iOS / Obj-C):
46862 #
46863 # // ...
46864 # static UIColor* fromProto(Color* protocolor) {
46865 # float red = [protocolor red];
46866 # float green = [protocolor green];
46867 # float blue = [protocolor blue];
46868 # FloatValue* alpha_wrapper = [protocolor alpha];
46869 # float alpha = 1.0;
46870 # if (alpha_wrapper != nil) {
46871 # alpha = [alpha_wrapper value];
46872 # }
46873 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46874 # }
46875 #
46876 # static Color* toProto(UIColor* color) {
46877 # CGFloat red, green, blue, alpha;
46878 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46879 # return nil;
46880 # }
46881 # Color* result = [Color alloc] init];
46882 # [result setRed:red];
46883 # [result setGreen:green];
46884 # [result setBlue:blue];
46885 # if (alpha <= 0.9999) {
46886 # [result setAlpha:floatWrapperWithValue(alpha)];
46887 # }
46888 # [result autorelease];
46889 # return result;
46890 # }
46891 # // ...
46892 #
46893 # Example (JavaScript):
46894 #
46895 # // ...
46896 #
46897 # var protoToCssColor = function(rgb_color) {
46898 # var redFrac = rgb_color.red || 0.0;
46899 # var greenFrac = rgb_color.green || 0.0;
46900 # var blueFrac = rgb_color.blue || 0.0;
46901 # var red = Math.floor(redFrac * 255);
46902 # var green = Math.floor(greenFrac * 255);
46903 # var blue = Math.floor(blueFrac * 255);
46904 #
46905 # if (!('alpha' in rgb_color)) {
46906 # return rgbToCssColor_(red, green, blue);
46907 # }
46908 #
46909 # var alphaFrac = rgb_color.alpha.value || 0.0;
46910 # var rgbParams = [red, green, blue].join(',');
46911 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46912 # };
46913 #
46914 # var rgbToCssColor_ = function(red, green, blue) {
46915 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46916 # var hexString = rgbNumber.toString(16);
46917 # var missingZeros = 6 - hexString.length;
46918 # var resultBuilder = ['#'];
46919 # for (var i = 0; i < missingZeros; i++) {
46920 # resultBuilder.push('0');
46921 # }
46922 # resultBuilder.push(hexString);
46923 # return resultBuilder.join('');
46924 # };
46925 #
46926 # // ...
46927 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
46928 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
46929 # the final pixel color is defined by the equation:
46930 #
46931 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
46932 #
46933 # This means that a value of 1.0 corresponds to a solid color, whereas
46934 # a value of 0.0 corresponds to a completely transparent color. This
46935 # uses a wrapper message rather than a simple float scalar so that it is
46936 # possible to distinguish between a default value and the value being unset.
46937 # If omitted, this color object is to be rendered as a solid color
46938 # (as if the alpha value had been explicitly given with a value of 1.0).
46939 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
46940 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
46941 },
46942 "width": 42, # The width of the border, in pixels.
46943 # Deprecated; the width is determined by the "style" field.
46944 "style": "A String", # The style of the border.
46945 },
46946 "bottom": { # A border along a cell. # The bottom border of the cell.
46947 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
46948 # for simplicity of conversion to/from color representations in various
46949 # languages over compactness; for example, the fields of this representation
46950 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46951 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46952 # method in iOS; and, with just a little work, it can be easily formatted into
46953 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46954 #
46955 # Example (Java):
46956 #
46957 # import com.google.type.Color;
46958 #
46959 # // ...
46960 # public static java.awt.Color fromProto(Color protocolor) {
46961 # float alpha = protocolor.hasAlpha()
46962 # ? protocolor.getAlpha().getValue()
46963 # : 1.0;
46964 #
46965 # return new java.awt.Color(
46966 # protocolor.getRed(),
46967 # protocolor.getGreen(),
46968 # protocolor.getBlue(),
46969 # alpha);
46970 # }
46971 #
46972 # public static Color toProto(java.awt.Color color) {
46973 # float red = (float) color.getRed();
46974 # float green = (float) color.getGreen();
46975 # float blue = (float) color.getBlue();
46976 # float denominator = 255.0;
46977 # Color.Builder resultBuilder =
46978 # Color
46979 # .newBuilder()
46980 # .setRed(red / denominator)
46981 # .setGreen(green / denominator)
46982 # .setBlue(blue / denominator);
46983 # int alpha = color.getAlpha();
46984 # if (alpha != 255) {
46985 # result.setAlpha(
46986 # FloatValue
46987 # .newBuilder()
46988 # .setValue(((float) alpha) / denominator)
46989 # .build());
46990 # }
46991 # return resultBuilder.build();
46992 # }
46993 # // ...
46994 #
46995 # Example (iOS / Obj-C):
46996 #
46997 # // ...
46998 # static UIColor* fromProto(Color* protocolor) {
46999 # float red = [protocolor red];
47000 # float green = [protocolor green];
47001 # float blue = [protocolor blue];
47002 # FloatValue* alpha_wrapper = [protocolor alpha];
47003 # float alpha = 1.0;
47004 # if (alpha_wrapper != nil) {
47005 # alpha = [alpha_wrapper value];
47006 # }
47007 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
47008 # }
47009 #
47010 # static Color* toProto(UIColor* color) {
47011 # CGFloat red, green, blue, alpha;
47012 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
47013 # return nil;
47014 # }
47015 # Color* result = [Color alloc] init];
47016 # [result setRed:red];
47017 # [result setGreen:green];
47018 # [result setBlue:blue];
47019 # if (alpha <= 0.9999) {
47020 # [result setAlpha:floatWrapperWithValue(alpha)];
47021 # }
47022 # [result autorelease];
47023 # return result;
47024 # }
47025 # // ...
47026 #
47027 # Example (JavaScript):
47028 #
47029 # // ...
47030 #
47031 # var protoToCssColor = function(rgb_color) {
47032 # var redFrac = rgb_color.red || 0.0;
47033 # var greenFrac = rgb_color.green || 0.0;
47034 # var blueFrac = rgb_color.blue || 0.0;
47035 # var red = Math.floor(redFrac * 255);
47036 # var green = Math.floor(greenFrac * 255);
47037 # var blue = Math.floor(blueFrac * 255);
47038 #
47039 # if (!('alpha' in rgb_color)) {
47040 # return rgbToCssColor_(red, green, blue);
47041 # }
47042 #
47043 # var alphaFrac = rgb_color.alpha.value || 0.0;
47044 # var rgbParams = [red, green, blue].join(',');
47045 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
47046 # };
47047 #
47048 # var rgbToCssColor_ = function(red, green, blue) {
47049 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
47050 # var hexString = rgbNumber.toString(16);
47051 # var missingZeros = 6 - hexString.length;
47052 # var resultBuilder = ['#'];
47053 # for (var i = 0; i < missingZeros; i++) {
47054 # resultBuilder.push('0');
47055 # }
47056 # resultBuilder.push(hexString);
47057 # return resultBuilder.join('');
47058 # };
47059 #
47060 # // ...
47061 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47062 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47063 # the final pixel color is defined by the equation:
47064 #
47065 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47066 #
47067 # This means that a value of 1.0 corresponds to a solid color, whereas
47068 # a value of 0.0 corresponds to a completely transparent color. This
47069 # uses a wrapper message rather than a simple float scalar so that it is
47070 # possible to distinguish between a default value and the value being unset.
47071 # If omitted, this color object is to be rendered as a solid color
47072 # (as if the alpha value had been explicitly given with a value of 1.0).
47073 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47074 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47075 },
47076 "width": 42, # The width of the border, in pixels.
47077 # Deprecated; the width is determined by the "style" field.
47078 "style": "A String", # The style of the border.
47079 },
47080 "left": { # A border along a cell. # The left border of the cell.
47081 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
47082 # for simplicity of conversion to/from color representations in various
47083 # languages over compactness; for example, the fields of this representation
47084 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
47085 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
47086 # method in iOS; and, with just a little work, it can be easily formatted into
47087 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
47088 #
47089 # Example (Java):
47090 #
47091 # import com.google.type.Color;
47092 #
47093 # // ...
47094 # public static java.awt.Color fromProto(Color protocolor) {
47095 # float alpha = protocolor.hasAlpha()
47096 # ? protocolor.getAlpha().getValue()
47097 # : 1.0;
47098 #
47099 # return new java.awt.Color(
47100 # protocolor.getRed(),
47101 # protocolor.getGreen(),
47102 # protocolor.getBlue(),
47103 # alpha);
47104 # }
47105 #
47106 # public static Color toProto(java.awt.Color color) {
47107 # float red = (float) color.getRed();
47108 # float green = (float) color.getGreen();
47109 # float blue = (float) color.getBlue();
47110 # float denominator = 255.0;
47111 # Color.Builder resultBuilder =
47112 # Color
47113 # .newBuilder()
47114 # .setRed(red / denominator)
47115 # .setGreen(green / denominator)
47116 # .setBlue(blue / denominator);
47117 # int alpha = color.getAlpha();
47118 # if (alpha != 255) {
47119 # result.setAlpha(
47120 # FloatValue
47121 # .newBuilder()
47122 # .setValue(((float) alpha) / denominator)
47123 # .build());
47124 # }
47125 # return resultBuilder.build();
47126 # }
47127 # // ...
47128 #
47129 # Example (iOS / Obj-C):
47130 #
47131 # // ...
47132 # static UIColor* fromProto(Color* protocolor) {
47133 # float red = [protocolor red];
47134 # float green = [protocolor green];
47135 # float blue = [protocolor blue];
47136 # FloatValue* alpha_wrapper = [protocolor alpha];
47137 # float alpha = 1.0;
47138 # if (alpha_wrapper != nil) {
47139 # alpha = [alpha_wrapper value];
47140 # }
47141 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
47142 # }
47143 #
47144 # static Color* toProto(UIColor* color) {
47145 # CGFloat red, green, blue, alpha;
47146 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
47147 # return nil;
47148 # }
47149 # Color* result = [Color alloc] init];
47150 # [result setRed:red];
47151 # [result setGreen:green];
47152 # [result setBlue:blue];
47153 # if (alpha <= 0.9999) {
47154 # [result setAlpha:floatWrapperWithValue(alpha)];
47155 # }
47156 # [result autorelease];
47157 # return result;
47158 # }
47159 # // ...
47160 #
47161 # Example (JavaScript):
47162 #
47163 # // ...
47164 #
47165 # var protoToCssColor = function(rgb_color) {
47166 # var redFrac = rgb_color.red || 0.0;
47167 # var greenFrac = rgb_color.green || 0.0;
47168 # var blueFrac = rgb_color.blue || 0.0;
47169 # var red = Math.floor(redFrac * 255);
47170 # var green = Math.floor(greenFrac * 255);
47171 # var blue = Math.floor(blueFrac * 255);
47172 #
47173 # if (!('alpha' in rgb_color)) {
47174 # return rgbToCssColor_(red, green, blue);
47175 # }
47176 #
47177 # var alphaFrac = rgb_color.alpha.value || 0.0;
47178 # var rgbParams = [red, green, blue].join(',');
47179 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
47180 # };
47181 #
47182 # var rgbToCssColor_ = function(red, green, blue) {
47183 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
47184 # var hexString = rgbNumber.toString(16);
47185 # var missingZeros = 6 - hexString.length;
47186 # var resultBuilder = ['#'];
47187 # for (var i = 0; i < missingZeros; i++) {
47188 # resultBuilder.push('0');
47189 # }
47190 # resultBuilder.push(hexString);
47191 # return resultBuilder.join('');
47192 # };
47193 #
47194 # // ...
47195 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47196 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47197 # the final pixel color is defined by the equation:
47198 #
47199 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47200 #
47201 # This means that a value of 1.0 corresponds to a solid color, whereas
47202 # a value of 0.0 corresponds to a completely transparent color. This
47203 # uses a wrapper message rather than a simple float scalar so that it is
47204 # possible to distinguish between a default value and the value being unset.
47205 # If omitted, this color object is to be rendered as a solid color
47206 # (as if the alpha value had been explicitly given with a value of 1.0).
47207 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47208 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47209 },
47210 "width": 42, # The width of the border, in pixels.
47211 # Deprecated; the width is determined by the "style" field.
47212 "style": "A String", # The style of the border.
47213 },
47214 },
47215 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
47216 },
47217 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
47218 #
47219 # When writing, the new data validation rule will overwrite any prior rule.
47220 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
47221 # If true, "List" conditions will show a dropdown.
47222 "strict": True or False, # True if invalid data should be rejected.
47223 "inputMessage": "A String", # A message to show the user when adding data to the cell.
47224 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
47225 # BooleanConditions are used by conditional formatting,
47226 # data validation, and the criteria in filters.
47227 "type": "A String", # The type of condition.
47228 "values": [ # The values of the condition. The number of supported values depends
47229 # on the condition type. Some support zero values,
47230 # others one or two values,
47231 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
47232 { # The value of the condition.
47233 "relativeDate": "A String", # A relative date (based on the current date).
47234 # Valid only if the type is
47235 # DATE_BEFORE,
47236 # DATE_AFTER,
47237 # DATE_ON_OR_BEFORE or
47238 # DATE_ON_OR_AFTER.
47239 #
47240 # Relative dates are not supported in data validation.
47241 # They are supported only in conditional formatting and
47242 # conditional filters.
47243 "userEnteredValue": "A String", # A value the condition is based on.
47244 # The value will be parsed as if the user typed into a cell.
47245 # Formulas are supported (and must begin with an `=`).
47246 },
47247 ],
47248 },
47249 },
47250 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
47251 # on user entered strings, not formulas, bools, or numbers.
47252 # Runs start at specific indexes in the text and continue until the next
47253 # run. Properties of a run will continue unless explicitly changed
47254 # in a subsequent run (and properties of the first run will continue
47255 # the properties of the cell unless explicitly changed).
47256 #
47257 # When writing, the new runs will overwrite any prior runs. When writing a
47258 # new user_entered_value, previous runs will be erased.
47259 { # A run of a text format. The format of this run continues until the start
47260 # index of the next run.
47261 # When updating, all fields must be set.
47262 "startIndex": 42, # The character index where this run starts.
47263 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
47264 # Absent values indicate that the field isn't specified.
47265 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
47266 # for simplicity of conversion to/from color representations in various
47267 # languages over compactness; for example, the fields of this representation
47268 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
47269 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
47270 # method in iOS; and, with just a little work, it can be easily formatted into
47271 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
47272 #
47273 # Example (Java):
47274 #
47275 # import com.google.type.Color;
47276 #
47277 # // ...
47278 # public static java.awt.Color fromProto(Color protocolor) {
47279 # float alpha = protocolor.hasAlpha()
47280 # ? protocolor.getAlpha().getValue()
47281 # : 1.0;
47282 #
47283 # return new java.awt.Color(
47284 # protocolor.getRed(),
47285 # protocolor.getGreen(),
47286 # protocolor.getBlue(),
47287 # alpha);
47288 # }
47289 #
47290 # public static Color toProto(java.awt.Color color) {
47291 # float red = (float) color.getRed();
47292 # float green = (float) color.getGreen();
47293 # float blue = (float) color.getBlue();
47294 # float denominator = 255.0;
47295 # Color.Builder resultBuilder =
47296 # Color
47297 # .newBuilder()
47298 # .setRed(red / denominator)
47299 # .setGreen(green / denominator)
47300 # .setBlue(blue / denominator);
47301 # int alpha = color.getAlpha();
47302 # if (alpha != 255) {
47303 # result.setAlpha(
47304 # FloatValue
47305 # .newBuilder()
47306 # .setValue(((float) alpha) / denominator)
47307 # .build());
47308 # }
47309 # return resultBuilder.build();
47310 # }
47311 # // ...
47312 #
47313 # Example (iOS / Obj-C):
47314 #
47315 # // ...
47316 # static UIColor* fromProto(Color* protocolor) {
47317 # float red = [protocolor red];
47318 # float green = [protocolor green];
47319 # float blue = [protocolor blue];
47320 # FloatValue* alpha_wrapper = [protocolor alpha];
47321 # float alpha = 1.0;
47322 # if (alpha_wrapper != nil) {
47323 # alpha = [alpha_wrapper value];
47324 # }
47325 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
47326 # }
47327 #
47328 # static Color* toProto(UIColor* color) {
47329 # CGFloat red, green, blue, alpha;
47330 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
47331 # return nil;
47332 # }
47333 # Color* result = [Color alloc] init];
47334 # [result setRed:red];
47335 # [result setGreen:green];
47336 # [result setBlue:blue];
47337 # if (alpha <= 0.9999) {
47338 # [result setAlpha:floatWrapperWithValue(alpha)];
47339 # }
47340 # [result autorelease];
47341 # return result;
47342 # }
47343 # // ...
47344 #
47345 # Example (JavaScript):
47346 #
47347 # // ...
47348 #
47349 # var protoToCssColor = function(rgb_color) {
47350 # var redFrac = rgb_color.red || 0.0;
47351 # var greenFrac = rgb_color.green || 0.0;
47352 # var blueFrac = rgb_color.blue || 0.0;
47353 # var red = Math.floor(redFrac * 255);
47354 # var green = Math.floor(greenFrac * 255);
47355 # var blue = Math.floor(blueFrac * 255);
47356 #
47357 # if (!('alpha' in rgb_color)) {
47358 # return rgbToCssColor_(red, green, blue);
47359 # }
47360 #
47361 # var alphaFrac = rgb_color.alpha.value || 0.0;
47362 # var rgbParams = [red, green, blue].join(',');
47363 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
47364 # };
47365 #
47366 # var rgbToCssColor_ = function(red, green, blue) {
47367 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
47368 # var hexString = rgbNumber.toString(16);
47369 # var missingZeros = 6 - hexString.length;
47370 # var resultBuilder = ['#'];
47371 # for (var i = 0; i < missingZeros; i++) {
47372 # resultBuilder.push('0');
47373 # }
47374 # resultBuilder.push(hexString);
47375 # return resultBuilder.join('');
47376 # };
47377 #
47378 # // ...
47379 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47380 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47381 # the final pixel color is defined by the equation:
47382 #
47383 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47384 #
47385 # This means that a value of 1.0 corresponds to a solid color, whereas
47386 # a value of 0.0 corresponds to a completely transparent color. This
47387 # uses a wrapper message rather than a simple float scalar so that it is
47388 # possible to distinguish between a default value and the value being unset.
47389 # If omitted, this color object is to be rendered as a solid color
47390 # (as if the alpha value had been explicitly given with a value of 1.0).
47391 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47392 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47393 },
47394 "bold": True or False, # True if the text is bold.
47395 "strikethrough": True or False, # True if the text has a strikethrough.
47396 "fontFamily": "A String", # The font family.
47397 "fontSize": 42, # The size of the font.
47398 "italic": True or False, # True if the text is italicized.
47399 "underline": True or False, # True if the text is underlined.
47400 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070047401 },
47402 ],
47403 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070047404 ],
47405 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047406 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070047407 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047408 ],
47409 "properties": { # Properties of a sheet. # The properties of the sheet.
47410 "sheetType": "A String", # The type of sheet. Defaults to GRID.
47411 # This field cannot be changed once set.
47412 "index": 42, # The index of the sheet within the spreadsheet.
47413 # When adding or updating sheet properties, if this field
47414 # is excluded then the sheet will be added or moved to the end
47415 # of the sheet list. When updating sheet indices or inserting
47416 # sheets, movement is considered in "before the move" indexes.
47417 # For example, if there were 3 sheets (S1, S2, S3) in order to
47418 # move S1 ahead of S2 the index would have to be set to 2. A sheet
47419 # index update request will be ignored if the requested index is
47420 # identical to the sheets current index or if the requested new
47421 # index is equal to the current sheet index + 1.
47422 "title": "A String", # The name of the sheet.
47423 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
47424 # (If the sheet is an object sheet, containing a chart or image, then
47425 # this field will be absent.)
47426 # When writing it is an error to set any grid properties on non-grid sheets.
47427 "columnCount": 42, # The number of columns in the grid.
47428 "rowCount": 42, # The number of rows in the grid.
47429 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
47430 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
47431 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
47432 },
47433 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
47434 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
47435 # for simplicity of conversion to/from color representations in various
47436 # languages over compactness; for example, the fields of this representation
47437 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
47438 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
47439 # method in iOS; and, with just a little work, it can be easily formatted into
47440 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
47441 #
47442 # Example (Java):
47443 #
47444 # import com.google.type.Color;
47445 #
47446 # // ...
47447 # public static java.awt.Color fromProto(Color protocolor) {
47448 # float alpha = protocolor.hasAlpha()
47449 # ? protocolor.getAlpha().getValue()
47450 # : 1.0;
47451 #
47452 # return new java.awt.Color(
47453 # protocolor.getRed(),
47454 # protocolor.getGreen(),
47455 # protocolor.getBlue(),
47456 # alpha);
47457 # }
47458 #
47459 # public static Color toProto(java.awt.Color color) {
47460 # float red = (float) color.getRed();
47461 # float green = (float) color.getGreen();
47462 # float blue = (float) color.getBlue();
47463 # float denominator = 255.0;
47464 # Color.Builder resultBuilder =
47465 # Color
47466 # .newBuilder()
47467 # .setRed(red / denominator)
47468 # .setGreen(green / denominator)
47469 # .setBlue(blue / denominator);
47470 # int alpha = color.getAlpha();
47471 # if (alpha != 255) {
47472 # result.setAlpha(
47473 # FloatValue
47474 # .newBuilder()
47475 # .setValue(((float) alpha) / denominator)
47476 # .build());
47477 # }
47478 # return resultBuilder.build();
47479 # }
47480 # // ...
47481 #
47482 # Example (iOS / Obj-C):
47483 #
47484 # // ...
47485 # static UIColor* fromProto(Color* protocolor) {
47486 # float red = [protocolor red];
47487 # float green = [protocolor green];
47488 # float blue = [protocolor blue];
47489 # FloatValue* alpha_wrapper = [protocolor alpha];
47490 # float alpha = 1.0;
47491 # if (alpha_wrapper != nil) {
47492 # alpha = [alpha_wrapper value];
47493 # }
47494 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
47495 # }
47496 #
47497 # static Color* toProto(UIColor* color) {
47498 # CGFloat red, green, blue, alpha;
47499 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
47500 # return nil;
47501 # }
47502 # Color* result = [Color alloc] init];
47503 # [result setRed:red];
47504 # [result setGreen:green];
47505 # [result setBlue:blue];
47506 # if (alpha <= 0.9999) {
47507 # [result setAlpha:floatWrapperWithValue(alpha)];
47508 # }
47509 # [result autorelease];
47510 # return result;
47511 # }
47512 # // ...
47513 #
47514 # Example (JavaScript):
47515 #
47516 # // ...
47517 #
47518 # var protoToCssColor = function(rgb_color) {
47519 # var redFrac = rgb_color.red || 0.0;
47520 # var greenFrac = rgb_color.green || 0.0;
47521 # var blueFrac = rgb_color.blue || 0.0;
47522 # var red = Math.floor(redFrac * 255);
47523 # var green = Math.floor(greenFrac * 255);
47524 # var blue = Math.floor(blueFrac * 255);
47525 #
47526 # if (!('alpha' in rgb_color)) {
47527 # return rgbToCssColor_(red, green, blue);
47528 # }
47529 #
47530 # var alphaFrac = rgb_color.alpha.value || 0.0;
47531 # var rgbParams = [red, green, blue].join(',');
47532 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
47533 # };
47534 #
47535 # var rgbToCssColor_ = function(red, green, blue) {
47536 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
47537 # var hexString = rgbNumber.toString(16);
47538 # var missingZeros = 6 - hexString.length;
47539 # var resultBuilder = ['#'];
47540 # for (var i = 0; i < missingZeros; i++) {
47541 # resultBuilder.push('0');
47542 # }
47543 # resultBuilder.push(hexString);
47544 # return resultBuilder.join('');
47545 # };
47546 #
47547 # // ...
47548 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47549 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47550 # the final pixel color is defined by the equation:
47551 #
47552 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47553 #
47554 # This means that a value of 1.0 corresponds to a solid color, whereas
47555 # a value of 0.0 corresponds to a completely transparent color. This
47556 # uses a wrapper message rather than a simple float scalar so that it is
47557 # possible to distinguish between a default value and the value being unset.
47558 # If omitted, this color object is to be rendered as a solid color
47559 # (as if the alpha value had been explicitly given with a value of 1.0).
47560 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47561 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47562 },
47563 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
47564 "sheetId": 42, # The ID of the sheet. Must be non-negative.
47565 # This field cannot be changed once set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070047566 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047567 },
47568 ],
47569 "spreadsheetUrl": "A String", # The url of the spreadsheet.
47570 # This field is read-only.
47571 }</pre>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070047572</div>
47573
47574</body></html>